commit 2bc54aaa65d2126ae629919175708a28ce7ef06e upstream.
IRQ trigger configuration is skipped if it has already been set before;
however, the IRQ line still needs to be OR'd to irq_enabled because
irq_enabled is reset for every events_configure call. This patch moves
the irq_enabled OR operation update to before the irq_trigger check so
that IRQ line enablement is not skipped.
Fixes: c95cc0d95702 ("counter: 104-quad-8: Fix persistent enabled events bug")
Cc: stable <stable(a)kernel.org>
Link: https://lore.kernel.org/r/20220815122301.2750-1-william.gray@linaro.org/
Signed-off-by: William Breathitt Gray <william.gray(a)linaro.org>
Link: https://lore.kernel.org/r/179eed11eaf225dbd908993b510df0c8f67b1230.16638447…
Signed-off-by: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
This is a backport for the 5.19-stable tree; just a simple context
adjustment to get it to apply cleanly.
Link: https://lore.kernel.org/r/16640913585139@kroah.com/
---
drivers/counter/104-quad-8.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/counter/104-quad-8.c b/drivers/counter/104-quad-8.c
index a17e51d65aca..4e3f88f0e0a4 100644
--- a/drivers/counter/104-quad-8.c
+++ b/drivers/counter/104-quad-8.c
@@ -426,6 +426,9 @@ static int quad8_events_configure(struct counter_device *counter)
return -EINVAL;
}
+ /* Enable IRQ line */
+ irq_enabled |= BIT(event_node->channel);
+
/* Skip configuration if it is the same as previously set */
if (priv->irq_trigger[event_node->channel] == next_irq_trigger)
continue;
@@ -439,9 +442,6 @@ static int quad8_events_configure(struct counter_device *counter)
priv->irq_trigger[event_node->channel] << 3;
base_offset = priv->base + 2 * event_node->channel + 1;
outb(QUAD8_CTR_IOR | ior_cfg, base_offset);
-
- /* Enable IRQ line */
- irq_enabled |= BIT(event_node->channel);
}
outb(irq_enabled, priv->base + QUAD8_REG_INDEX_INTERRUPT);
--
2.37.3
The patch titled
Subject: mm: fix BUG splat with kvmalloc + GFP_ATOMIC
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-fix-bug-splat-with-kvmalloc-gfp_atomic.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-hotfixes-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Florian Westphal <fw(a)strlen.de>
Subject: mm: fix BUG splat with kvmalloc + GFP_ATOMIC
Date: Mon, 26 Sep 2022 17:16:50 +0200
Martin Zaharinov reports BUG with 5.19.10 kernel:
kernel BUG at mm/vmalloc.c:2437!
invalid opcode: 0000 [#1] SMP
CPU: 28 PID: 0 Comm: swapper/28 Tainted: G W O 5.19.9 #1
[..]
RIP: 0010:__get_vm_area_node+0x120/0x130
__vmalloc_node_range+0x96/0x1e0
kvmalloc_node+0x92/0xb0
bucket_table_alloc.isra.0+0x47/0x140
rhashtable_try_insert+0x3a4/0x440
rhashtable_insert_slow+0x1b/0x30
[..]
bucket_table_alloc uses kvzalloc(GPF_ATOMIC). If kmalloc fails, this now
falls through to vmalloc and hits code paths that assume GFP_KERNEL.
Link: https://lkml.kernel.org/r/20220926151650.15293-1-fw@strlen.de
Fixes: a421ef303008 ("mm: allow !GFP_KERNEL allocations for kvmalloc")
Signed-off-by: Florian Westphal <fw(a)strlen.de>
Suggested-by: Michal Hocko <mhocko(a)suse.com>
Link: https://lore.kernel.org/linux-mm/Yy3MS2uhSgjF47dy@pc636/T/#t
Acked-by: Michal Hocko <mhocko(a)suse.com>
Reported-by: Martin Zaharinov <micron10(a)gmail.com>
Cc: Uladzislau Rezki (Sony) <urezki(a)gmail.com>
Cc: Vlastimil Babka <vbabka(a)suse.cz>
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
--- a/mm/util.c~mm-fix-bug-splat-with-kvmalloc-gfp_atomic
+++ a/mm/util.c
@@ -619,6 +619,10 @@ void *kvmalloc_node(size_t size, gfp_t f
if (ret || size <= PAGE_SIZE)
return ret;
+ /* non-sleeping allocations are not supported by vmalloc */
+ if (!gfpflags_allow_blocking(flags))
+ return NULL;
+
/* Don't even allow crazy sizes */
if (unlikely(size > INT_MAX)) {
WARN_ON_ONCE(!(flags & __GFP_NOWARN));
_
Patches currently in -mm which might be from fw(a)strlen.de are
mm-fix-bug-splat-with-kvmalloc-gfp_atomic.patch
This is the start of the stable review cycle for the 4.14.295 release.
There are 40 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 28 Sep 2022 10:07:26 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.295-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.295-rc1
Dongliang Mu <mudongliangabcd(a)gmail.com>
media: em28xx: initialize refcount before kref_get
Jan Kara <jack(a)suse.cz>
ext4: make directory inode spreading reflect flexbg size
Vitaly Kuznetsov <vkuznets(a)redhat.com>
Drivers: hv: Never allocate anything besides framebuffer from framebuffer memory region
Stefan Haberland <sth(a)linux.ibm.com>
s390/dasd: fix Oops in dasd_alias_get_start_dev due to missing pavgroup
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
serial: tegra: Use uart_xmit_advance(), fixes icount.tx accounting
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
serial: Create uart_xmit_advance()
Sean Anderson <seanga2(a)gmail.com>
net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD
Adrian Hunter <adrian.hunter(a)intel.com>
perf kcore_copy: Do not check /proc/modules is unchanged
Marc Kleine-Budde <mkl(a)pengutronix.de>
can: gs_usb: gs_can_open(): fix race dev->can.state condition
Florian Westphal <fw(a)strlen.de>
netfilter: ebtables: fix memory leak when blob is malformed
Liang He <windhl(a)126.com>
of: mdio: Add of_node_put() when breaking out of for_each_xx
Randy Dunlap <rdunlap(a)infradead.org>
MIPS: lantiq: export clk_get_io() for lantiq_wdt.ko
Benjamin Poirier <bpoirier(a)nvidia.com>
net: team: Unsync device addresses on ndo_stop
Lu Wei <luwei32(a)huawei.com>
ipvlan: Fix out-of-bound bugs caused by unset skb->mac_header
Brett Creeley <brett.creeley(a)intel.com>
iavf: Fix cached head and tail value for iavf_get_tx_pending
David Leadbeater <dgl(a)dgl.cx>
netfilter: nf_conntrack_irc: Tighten matching on DCC message
Igor Ryzhov <iryzhov(a)nfware.com>
netfilter: nf_conntrack_sip: fix ct_sip_walk_headers
Fabio Estevam <festevam(a)denx.de>
arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma
Chao Yu <chao.yu(a)oppo.com>
mm/slub: fix to return errno if kmalloc() fails
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda: add Intel 5 Series / 3400 PCI DID
Mohan Kumar <mkumard(a)nvidia.com>
ALSA: hda/tegra: set depop delay for tegra
jerry meng <jerry-meng(a)foxmail.com>
USB: serial: option: add Quectel RM520N
Carl Yin(殷张成) <carl.yin(a)quectel.com>
USB: serial: option: add Quectel BG95 0x0203 composition
Alan Stern <stern(a)rowland.harvard.edu>
USB: core: Fix RST error in hub.c
Siddh Raman Pant <code(a)siddh.me>
wifi: mac80211: Fix UAF in ieee80211_scan_rx()
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/sigmatel: Fix unused variable warning for beep power change
Hyunwoo Kim <imv4bel(a)gmail.com>
video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write
Youling Tang <tangyouling(a)loongson.cn>
mksysmap: Fix the mismatch of 'L0' symbols in System.map
Alexander Sverdlin <alexander.sverdlin(a)nokia.com>
MIPS: OCTEON: irq: Fix octeon_irq_force_ciu_mapping()
jerry.meng <jerry-meng(a)foxmail.com>
net: usb: qmi_wwan: add Quectel RM520N
Takashi Iwai <tiwai(a)suse.de>
ALSA: hda/sigmatel: Keep power up while beep is enabled
Xiaolei Wang <xiaolei.wang(a)windriver.com>
regulator: pfuze100: Fix the global-out-of-bounds access in pfuze100_regulator_probe()
Takashi Iwai <tiwai(a)suse.de>
ASoC: nau8824: Fix semaphore unbalance at error paths
Stefan Metzmacher <metze(a)samba.org>
cifs: don't send down the destination address to sendmsg for a SOCK_STREAM
Ard Biesheuvel <ardb(a)kernel.org>
efi: libstub: Disable struct randomization
Sami Tolvanen <samitolvanen(a)google.com>
efi/libstub: Disable Shadow Call Stack
Yang Yingliang <yangyingliang(a)huawei.com>
parisc: ccio-dma: Add missing iounmap in error path in ccio_probe()
Stuart Menefy <stuart.menefy(a)mathembedded.com>
drm/meson: Correct OSD1 global alpha value
Pali Rohár <pali(a)kernel.org>
gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx
Sergey Shtylyov <s.shtylyov(a)omp.ru>
of: fdt: fix off-by-one error in unflatten_dt_nodes()
-------------
Diffstat:
Makefile | 4 ++--
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 1 -
arch/mips/cavium-octeon/octeon-irq.c | 10 ++++++++
arch/mips/lantiq/clk.c | 1 +
drivers/firmware/efi/libstub/Makefile | 10 ++++++++
drivers/gpio/gpio-mpc8xxx.c | 1 +
drivers/gpu/drm/meson/meson_plane.c | 2 +-
drivers/hv/vmbus_drv.c | 10 +++++++-
drivers/media/usb/em28xx/em28xx-cards.c | 4 ++--
drivers/net/can/usb/gs_usb.c | 4 ++--
drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 5 +++-
drivers/net/ethernet/sun/sunhme.c | 4 ++--
drivers/net/ipvlan/ipvlan_core.c | 6 +++--
drivers/net/team/team.c | 24 ++++++++++++++-----
drivers/net/usb/qmi_wwan.c | 1 +
drivers/of/fdt.c | 2 +-
drivers/of/of_mdio.c | 1 +
drivers/parisc/ccio-dma.c | 1 +
drivers/regulator/pfuze100-regulator.c | 2 +-
drivers/s390/block/dasd_alias.c | 9 +++++--
drivers/tty/serial/serial-tegra.c | 5 ++--
drivers/usb/core/hub.c | 2 +-
drivers/usb/serial/option.c | 6 +++++
drivers/video/fbdev/pxa3xx-gcu.c | 2 +-
fs/cifs/transport.c | 4 ++--
fs/ext4/ialloc.c | 2 +-
include/linux/serial_core.h | 17 ++++++++++++++
mm/slub.c | 5 +++-
net/bridge/netfilter/ebtables.c | 4 +++-
net/mac80211/scan.c | 11 +++++----
net/netfilter/nf_conntrack_irc.c | 34 ++++++++++++++++++++++-----
net/netfilter/nf_conntrack_sip.c | 4 ++--
scripts/mksysmap | 2 +-
sound/pci/hda/hda_intel.c | 2 ++
sound/pci/hda/patch_hdmi.c | 1 +
sound/pci/hda/patch_sigmatel.c | 24 +++++++++++++++++++
sound/soc/codecs/nau8824.c | 17 ++++++++------
tools/perf/util/symbol-elf.c | 7 ++----
38 files changed, 192 insertions(+), 59 deletions(-)