Since commit 8e1f385104ac ("kill task_struct->thread_group") remove
the thread_group, we will encounter below issue.
(gdb) lx-ps
TASK PID COMM
0xffff800086503340 0 swapper/0
Python Exception <class 'gdb.error'>: There is no member named thread_group.
Error occurred in Python: There is no member named thread_group.
We use signal->thread_head to iterate all threads instead.
Fixes: 8e1f385104ac ("kill task_struct->thread_group")
Cc: stable(a)vger.kernel.org
Signed-off-by: Kuan-Ying Lee <Kuan-Ying.Lee(a)mediatek.com>
---
scripts/gdb/linux/tasks.py | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/scripts/gdb/linux/tasks.py b/scripts/gdb/linux/tasks.py
index 17ec19e9b5bf..7c32f4c8284b 100644
--- a/scripts/gdb/linux/tasks.py
+++ b/scripts/gdb/linux/tasks.py
@@ -13,7 +13,7 @@
import gdb
-from linux import utils
+from linux import utils, lists
task_type = utils.CachedType("struct task_struct")
@@ -25,13 +25,9 @@ def task_lists():
t = g = init_task
while True:
- while True:
- yield t
-
- t = utils.container_of(t['thread_group']['next'],
- task_ptr_type, "thread_group")
- if t == g:
- break
+ thread_head = t['signal']['thread_head']
+ for thread in lists.list_for_each_entry(thread_head, task_ptr_type, 'thread_node'):
+ yield thread
t = g = utils.container_of(g['tasks']['next'],
task_ptr_type, "tasks")
--
2.18.0
This is the start of the stable review cycle for the 5.4.262 release.
There are 152 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 Tue, 28 Nov 2023 15:43:06 +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/v5.x/stable-review/patch-5.4.262-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.262-rc4
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush (for 5.4)
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: disable toggling dormant table state more than once
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: fix table flag updates
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nftables: update table flags from the commit phase
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: double hook unregistration in netns path
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: unregister flowtable hooks on netns exit
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: fix memleak when more than 255 elements expired
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_set_hash: try later when GC hits EAGAIN on iteration
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_set_rbtree: use read spinlock to avoid datapath contention
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_set_rbtree: skip sync GC for new elements in this transaction
Florian Westphal <fw(a)strlen.de>
netfilter: nf_tables: defer gc run if previous batch is still pending
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: use correct lock to protect gc_list
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: GC transaction race with abort path
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: GC transaction race with netns dismantle
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: fix GC transaction races with netns and netlink event exit path
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: remove busy mark and gc batch API
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_set_hash: mark set element as dead when deleting from packet path
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: adapt set backend to use GC transaction API
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: GC transaction API to avoid race with control plane
Florian Westphal <fw(a)strlen.de>
netfilter: nf_tables: don't skip expired elements during walk
Florian Westphal <fw(a)strlen.de>
netfilter: nft_set_rbtree: fix overlap expiration walk
Florian Westphal <fw(a)strlen.de>
netfilter: nft_set_rbtree: fix null deref on element insertion
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nft_set_rbtree: Switch to node list walk for overlap detection
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: drop map element references from preparation phase
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nftables: rename set element data activation/deactivation functions
Pablo Neira Ayuso <pablo(a)netfilter.org>
netfilter: nf_tables: pass context to nft_set_destroy()
Steven Rostedt (Google) <rostedt(a)goodmis.org>
tracing: Have trace_event_file have ref counters
Christian König <christian.koenig(a)amd.com>
drm/amdgpu: fix error handling in amdgpu_bo_list_get()
Kemeng Shi <shikemeng(a)huaweicloud.com>
ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
Zhang Yi <yi.zhang(a)huawei.com>
ext4: correct the start block of counting reserved clusters
Kemeng Shi <shikemeng(a)huaweicloud.com>
ext4: correct return value of ext4_convert_meta_bg
Kemeng Shi <shikemeng(a)huaweicloud.com>
ext4: correct offset of gdb backup in non meta_bg group to update_backups
Max Kellermann <max.kellermann(a)ionos.com>
ext4: apply umask if ACL support is disabled
Heiner Kallweit <hkallweit1(a)gmail.com>
Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E"
Mahmoud Adam <mngyadam(a)amazon.com>
nfsd: fix file memleak on client_opens_release
Vikash Garodia <quic_vgarodia(a)quicinc.com>
media: venus: hfi: add checks to handle capabilities from firmware
Vikash Garodia <quic_vgarodia(a)quicinc.com>
media: venus: hfi: fix the check to handle session buffer requirement
Vikash Garodia <quic_vgarodia(a)quicinc.com>
media: venus: hfi_parser: Add check to keep the number of codecs within range
Sean Young <sean(a)mess.org>
media: sharp: fix sharp encoding
Sean Young <sean(a)mess.org>
media: lirc: drop trailing space from scancode transmit
Heiner Kallweit <hkallweit1(a)gmail.com>
i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
Alexander Sverdlin <alexander.sverdlin(a)siemens.com>
net: dsa: lan9303: consequently nested-lock physical MDIO
Johnathan Mantey <johnathanx.mantey(a)intel.com>
Revert ncsi: Propagate carrier gain/loss events to the NCSI controller
Guan Wentao <guanwentao(a)uniontech.com>
Bluetooth: btusb: Add 0bda:b85b for Fn-Link RTL8852BE
Masum Reza <masumrezarock100(a)gmail.com>
Bluetooth: btusb: Add RTW8852BE device 13d3:3570 to device tables
Larry Finger <Larry.Finger(a)lwfinger.net>
bluetooth: Add device 13d3:3571 to device tables
Larry Finger <Larry.Finger(a)lwfinger.net>
bluetooth: Add device 0bda:887b to device tables
Artem Lukyanov <dukzcry(a)ya.ru>
Bluetooth: btusb: Add Realtek RTL8852BE support ID 0x0cb8:0xc559
Joseph Hwang <josephsih(a)chromium.org>
Bluetooth: btusb: add Realtek 8822CE to usb_device_id table
Alain Michaud <alainm(a)chromium.org>
Bluetooth: btusb: Add flag to define wideband speech capability
Pavel Krasavin <pkrasavin(a)imaqliq.com>
tty: serial: meson: fix hard LOCKUP on crtscts mode
Lad Prabhakar <prabhakar.mahadev-lad.rj(a)bp.renesas.com>
serial: meson: Use platform_get_irq() to get the interrupt
Neil Armstrong <narmstrong(a)baylibre.com>
tty: serial: meson: retrieve port FIFO size from DT
Colin Ian King <colin.king(a)canonical.com>
serial: meson: remove redundant initialization of variable id
Chandradeep Dey <codesigning(a)chandradeepdey.com>
ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
Takashi Iwai <tiwai(a)suse.de>
ALSA: info: Fix potential deadlock at disconnection
Helge Deller <deller(a)gmx.de>
parisc/pgtable: Do not drop upper 5 address bits of physical address
Helge Deller <deller(a)gmx.de>
parisc: Prevent booting 64-bit kernels on PA1.x machines
Joshua Yeong <joshua.yeong(a)starfivetech.com>
i3c: master: cdns: Fix reading status register
Zi Yan <ziy(a)nvidia.com>
mm/cma: use nth_page() in place of direct struct page manipulation
Alain Volmat <alain.volmat(a)foss.st.com>
dmaengine: stm32-mdma: correct desc prep when channel running
Sanjuán García, Jorge <Jorge.SanjuanGarcia(a)duagon.com>
mcb: fix error handling for different scenarios when parsing
Benjamin Bara <benjamin.bara(a)skidata.com>
i2c: core: Run atomic i2c xfer when !preemptible
Benjamin Bara <benjamin.bara(a)skidata.com>
kernel/reboot: emergency_restart: Set correct system_state
Eric Biggers <ebiggers(a)google.com>
quota: explicitly forbid quota files from being encrypted
Zhihao Cheng <chengzhihao1(a)huawei.com>
jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
Josef Bacik <josef(a)toxicpanda.com>
btrfs: don't arbitrarily slow down delalloc if we're committing
Brian Geffon <bgeffon(a)google.com>
PM: hibernate: Clean up sync_read handling in snapshot_write_next()
Brian Geffon <bgeffon(a)google.com>
PM: hibernate: Use __get_safe_page() rather than touching the list
Dan Carpenter <dan.carpenter(a)linaro.org>
mmc: vub300: fix an error code
Kathiravan Thirumoorthy <quic_kathirav(a)quicinc.com>
clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks
Helge Deller <deller(a)gmx.de>
parisc/pdc: Add width field to struct pdc_model
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
PCI: keystone: Don't discard .probe() callback
Uwe Kleine-König <u.kleine-koenig(a)pengutronix.de>
PCI: keystone: Don't discard .remove() callback
Herve Codina <herve.codina(a)bootlin.com>
genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
Rong Chen <rong.chen(a)amlogic.com>
mmc: meson-gx: Remove setting of CMD_CFG_ERROR
Werner Sembach <wse(a)tuxedocomputers.com>
ACPI: resource: Do IRQ override on TongFang GMxXGxx
Lukas Wunner <lukas(a)wunner.de>
PCI/sysfs: Protect driver's D3cold preference from user space
David Woodhouse <dwmw(a)amazon.co.uk>
hvc/xen: fix error path in xen_hvc_init() to always register frontend driver
Paul Moore <paul(a)paul-moore.com>
audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
Paul Moore <paul(a)paul-moore.com>
audit: don't take task_lock() in audit_exe_compare() code path
Maciej S. Szmigiero <maciej.szmigiero(a)oracle.com>
KVM: x86: Ignore MSR_AMD64_TW_CFG access
Nicolas Saenz Julienne <nsaenz(a)amazon.com>
KVM: x86: hyper-v: Don't auto-enable stimer on write from user-space
Pu Wen <puwen(a)hygon.cn>
x86/cpu/hygon: Fix the CPU topology evaluation for real
Chandrakanth patil <chandrakanth.patil(a)broadcom.com>
scsi: megaraid_sas: Increase register read retry rount from 3 to 30 for selected registers
Shung-Hsi Yu <shung-hsi.yu(a)suse.com>
bpf: Fix precision tracking for BPF_ALU | BPF_TO_BE | BPF_END
Kees Cook <keescook(a)chromium.org>
randstruct: Fix gcc-plugin performance mode to stay in group
Vikash Garodia <quic_vgarodia(a)quicinc.com>
media: venus: hfi: add checks to perform sanity on queue pointers
Anastasia Belova <abelova(a)astralinux.ru>
cifs: spnego: add ';' in HOST_KEY_LEN
Zhang Rui <rui.zhang(a)intel.com>
tools/power/turbostat: Fix a knl bug
Vlad Buslov <vladbu(a)nvidia.com>
macvlan: Don't propagate promisc change to lower dev in passthru
Rahul Rameshbabu <rrameshbabu(a)nvidia.com>
net/mlx5e: Check return value of snprintf writing to fw_version buffer for representors
Leon Romanovsky <leonro(a)nvidia.com>
net/mlx5_core: Clean driver version and name
Dust Li <dust.li(a)linux.alibaba.com>
net/mlx5e: fix double free of encap_header
Baruch Siach <baruch(a)tkos.co.il>
net: stmmac: fix rx budget limit check
Jose Abreu <Jose.Abreu(a)synopsys.com>
net: stmmac: Rework stmmac_rx()
Linkui Xiao <xiaolinkui(a)kylinos.cn>
netfilter: nf_conntrack_bridge: initialize err to 0
Linus Walleij <linus.walleij(a)linaro.org>
net: ethernet: cortina: Fix MTU max setting
Linus Walleij <linus.walleij(a)linaro.org>
net: ethernet: cortina: Handle large frames
Linus Walleij <linus.walleij(a)linaro.org>
net: ethernet: cortina: Fix max RX frame define
Eric Dumazet <edumazet(a)google.com>
bonding: stop the device in bond_setup_by_slave()
Eric Dumazet <edumazet(a)google.com>
ptp: annotate data-race around q->head and q->tail
Juergen Gross <jgross(a)suse.com>
xen/events: fix delayed eoi list handling
Willem de Bruijn <willemb(a)google.com>
ppp: limit MRU to 64K
Shigeru Yoshida <syoshida(a)redhat.com>
tipc: Fix kernel-infoleak due to uninitialized TLV value
Yonglong Liu <liuyonglong(a)huawei.com>
net: hns3: fix variable may not initialized problem in hns3_init_mac_addr()
Shigeru Yoshida <syoshida(a)redhat.com>
tty: Fix uninit-value access in ppp_sync_receive()
Eric Dumazet <edumazet(a)google.com>
ipvlan: add ipvlan_route_v6_outbound() helper
Olga Kornievskaia <kolga(a)netapp.com>
NFSv4.1: fix SP4_MACH_CRED protection for pnfs IO
Miri Korenblit <miriam.rachel.korenblit(a)intel.com>
wifi: iwlwifi: Use FW rate for non-data frames
Dan Carpenter <dan.carpenter(a)linaro.org>
pwm: Fix double shift bug
Tony Lindgren <tony(a)atomide.com>
ASoC: ti: omap-mcbsp: Fix runtime PM underflow warnings
Douglas Anderson <dianders(a)chromium.org>
kgdb: Flush console before entering kgdb on panic
Wayne Lin <wayne.lin(a)amd.com>
drm/amd/display: Avoid NULL dereference of timing generator
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
media: cobalt: Use FIELD_GET() to extract Link Width
Bob Peterson <rpeterso(a)redhat.com>
gfs2: ignore negated quota changes
Hans Verkuil <hverkuil-cisco(a)xs4all.nl>
media: vivid: avoid integer overflow
Rajeshwar R Shinde <coolrrsh(a)gmail.com>
media: gspca: cpia1: shift-out-of-bounds in set_flicker
Axel Lin <axel.lin(a)ingics.com>
i2c: sun6i-p2wi: Prevent potential division by zero
Hardik Gajjar <hgajjar(a)de.adit-jv.com>
usb: gadget: f_ncm: Always set current gadget in ncm_bind()
Yi Yang <yiyang13(a)huawei.com>
tty: vcc: Add check for kstrdup() in vcc_probe()
Jiri Kosina <jkosina(a)suse.cz>
HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W
Wenchao Hao <haowenchao2(a)huawei.com>
scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
atm: iphase: Do PCI error checks on own line
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields
Cezary Rojewski <cezary.rojewski(a)intel.com>
ALSA: hda: Fix possible null-ptr-deref when assigning a stream
Vincent Whitchurch <vincent.whitchurch(a)axis.com>
ARM: 9320/1: fix stack depot IRQ stack filter
Manas Ghandat <ghandatmanas(a)gmail.com>
jfs: fix array-index-out-of-bounds in diAlloc
Manas Ghandat <ghandatmanas(a)gmail.com>
jfs: fix array-index-out-of-bounds in dbFindLeaf
Juntong Deng <juntong.deng(a)outlook.com>
fs/jfs: Add validity check for db_maxag and db_agpref
Juntong Deng <juntong.deng(a)outlook.com>
fs/jfs: Add check for negative db_l2nbperpage
Ilpo Järvinen <ilpo.jarvinen(a)linux.intel.com>
RDMA/hfi1: Use FIELD_GET() to extract Link Width
Lu Jialin <lujialin4(a)huawei.com>
crypto: pcrypt - Fix hungtask for PADATA_RESET
zhujun2 <zhujun2(a)cmss.chinamobile.com>
selftests/efivarfs: create-read: fix a resource leak
Qu Huang <qu.huang(a)linux.dev>
drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL
Mario Limonciello <mario.limonciello(a)amd.com>
drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga
Mario Limonciello <mario.limonciello(a)amd.com>
drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
baozhu.liu <lucas.liu(a)siengine.com>
drm/komeda: drop all currently held locks if deadlock happens
Olli Asikainen <olli.asikainen(a)gmail.com>
platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e
ZhengHan Wang <wzhmmmmm(a)gmail.com>
Bluetooth: Fix double free in hci_conn_cleanup
Douglas Anderson <dianders(a)chromium.org>
wifi: ath10k: Don't touch the CE interrupt registers after power up
Eric Dumazet <edumazet(a)google.com>
net: annotate data-races around sk->sk_dst_pending_confirm
Eric Dumazet <edumazet(a)google.com>
net: annotate data-races around sk->sk_tx_queue_mapping
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: ath10k: fix clang-specific fortify warning
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: ath9k: fix clang-specific fortify warnings
Ping-Ke Shih <pkshih(a)realtek.com>
wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
Dmitry Antipov <dmantipov(a)yandex.ru>
wifi: mac80211_hwsim: fix clang-specific fortify warning
Mike Rapoport (IBM) <rppt(a)kernel.org>
x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size
Ronald Wahl <ronald.wahl(a)raritan.com>
clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware
Jacky Bai <ping.bai(a)nxp.com>
clocksource/drivers/timer-imx-gpt: Fix potential memory leak
Shuai Xue <xueshuai(a)linux.alibaba.com>
perf/core: Bail out early if the request AUX area is out of bound
John Stultz <jstultz(a)google.com>
locking/ww_mutex/test: Fix potential workqueue corruption
-------------
Diffstat:
Makefile | 4 +-
arch/arm/include/asm/exception.h | 4 -
arch/parisc/include/uapi/asm/pdc.h | 1 +
arch/parisc/kernel/entry.S | 7 +-
arch/parisc/kernel/head.S | 5 +-
arch/x86/include/asm/msr-index.h | 1 +
arch/x86/include/asm/numa.h | 7 -
arch/x86/kernel/cpu/hygon.c | 8 +-
arch/x86/kvm/hyperv.c | 10 +-
arch/x86/kvm/x86.c | 2 +
arch/x86/mm/numa.c | 7 -
crypto/pcrypt.c | 4 +
drivers/acpi/resource.c | 12 +
drivers/atm/iphase.c | 20 +-
drivers/bluetooth/btusb.c | 35 +-
drivers/clk/qcom/gcc-ipq8074.c | 6 -
drivers/clocksource/timer-atmel-tcb.c | 1 +
drivers/clocksource/timer-imx-gpt.c | 18 +-
drivers/dma/stm32-mdma.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +
drivers/gpu/drm/amd/display/dc/core/dc_stream.c | 4 +-
drivers/gpu/drm/amd/include/pptable.h | 4 +-
drivers/gpu/drm/amd/powerplay/hwmgr/pptable_v1_0.h | 16 +-
.../drm/arm/display/komeda/komeda_pipeline_state.c | 9 +-
drivers/hid/hid-ids.h | 1 +
drivers/hid/hid-quirks.c | 1 +
drivers/i2c/busses/i2c-i801.c | 19 +-
drivers/i2c/busses/i2c-sun6i-p2wi.c | 5 +
drivers/i2c/i2c-core.h | 2 +-
drivers/i3c/master/i3c-master-cdns.c | 6 +-
drivers/infiniband/hw/hfi1/pcie.c | 9 +-
drivers/mcb/mcb-core.c | 1 +
drivers/mcb/mcb-parse.c | 2 +-
drivers/media/pci/cobalt/cobalt-driver.c | 11 +-
drivers/media/platform/qcom/venus/hfi_msgs.c | 2 +-
drivers/media/platform/qcom/venus/hfi_parser.c | 15 +
drivers/media/platform/qcom/venus/hfi_venus.c | 10 +
drivers/media/platform/vivid/vivid-rds-gen.c | 2 +-
drivers/media/rc/ir-sharp-decoder.c | 8 +-
drivers/media/rc/lirc_dev.c | 6 +-
drivers/media/usb/gspca/cpia1.c | 3 +
drivers/mmc/host/meson-gx-mmc.c | 1 -
drivers/mmc/host/vub300.c | 1 +
drivers/net/bonding/bond_main.c | 6 +
drivers/net/dsa/lan9303_mdio.c | 4 +-
drivers/net/ethernet/cortina/gemini.c | 45 +-
drivers/net/ethernet/cortina/gemini.h | 4 +-
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/devlink.c | 2 +-
.../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 10 +-
.../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 4 +-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 13 +-
.../ethernet/mellanox/mlx5/core/ipoib/ethtool.c | 2 +-
drivers/net/ethernet/mellanox/mlx5/core/main.c | 10 +-
.../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 -
drivers/net/ethernet/realtek/r8169_main.c | 4 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 148 +++---
drivers/net/ipvlan/ipvlan_core.c | 41 +-
drivers/net/macvlan.c | 2 +-
drivers/net/ppp/ppp_synctty.c | 6 +-
drivers/net/wireless/ath/ath10k/debug.c | 2 +-
drivers/net/wireless/ath/ath10k/snoc.c | 18 +-
drivers/net/wireless/ath/ath9k/debug.c | 2 +-
drivers/net/wireless/ath/ath9k/htc_drv_debug.c | 2 +-
drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 14 +-
drivers/net/wireless/mac80211_hwsim.c | 2 +-
drivers/pci/controller/dwc/pci-keystone.c | 8 +-
drivers/pci/controller/dwc/pcie-tegra194.c | 9 +-
drivers/pci/pci-acpi.c | 2 +-
drivers/pci/pci-sysfs.c | 5 +-
drivers/platform/x86/thinkpad_acpi.c | 1 +
drivers/ptp/ptp_chardev.c | 3 +-
drivers/ptp/ptp_clock.c | 5 +-
drivers/ptp/ptp_private.h | 8 +-
drivers/ptp/ptp_sysfs.c | 3 +-
drivers/scsi/libfc/fc_lport.c | 6 +
drivers/scsi/megaraid/megaraid_sas_base.c | 4 +-
drivers/tty/hvc/hvc_xen.c | 5 +-
drivers/tty/serial/meson_uart.c | 33 +-
drivers/tty/vcc.c | 16 +-
drivers/usb/gadget/function/f_ncm.c | 27 +-
drivers/xen/events/events_base.c | 4 +-
fs/btrfs/delalloc-space.c | 3 -
fs/cifs/cifs_spnego.c | 4 +-
fs/ext4/acl.h | 5 +
fs/ext4/extents_status.c | 4 +-
fs/ext4/resize.c | 19 +-
fs/gfs2/quota.c | 11 +
fs/jbd2/recovery.c | 8 +
fs/jfs/jfs_dmap.c | 23 +-
fs/jfs/jfs_imap.c | 5 +-
fs/nfs/nfs4proc.c | 5 +-
fs/nfsd/nfs4state.c | 2 +-
fs/quota/dquot.c | 14 +
include/linux/mlx5/driver.h | 2 +
include/linux/pwm.h | 4 +-
include/linux/trace_events.h | 4 +
include/net/netfilter/nf_tables.h | 129 ++----
include/net/sock.h | 26 +-
include/uapi/linux/netfilter/nf_tables.h | 1 +
kernel/audit_watch.c | 9 +-
kernel/bpf/verifier.c | 7 +-
kernel/debug/debug_core.c | 3 +
kernel/events/ring_buffer.c | 6 +
kernel/irq/generic-chip.c | 25 +-
kernel/locking/test-ww_mutex.c | 20 +-
kernel/padata.c | 2 +-
kernel/power/snapshot.c | 16 +-
kernel/reboot.c | 1 +
kernel/trace/trace.c | 15 +
kernel/trace/trace.h | 3 +
kernel/trace/trace_events.c | 39 +-
kernel/trace/trace_events_filter.c | 3 +
mm/cma.c | 2 +-
net/bluetooth/hci_conn.c | 6 +-
net/bluetooth/hci_sysfs.c | 23 +-
net/bridge/netfilter/nf_conntrack_bridge.c | 2 +-
net/core/sock.c | 2 +-
net/ipv4/tcp_output.c | 2 +-
net/mac80211/cfg.c | 4 +
net/ncsi/ncsi-aen.c | 5 -
net/netfilter/nf_tables_api.c | 512 +++++++++++++++++----
net/netfilter/nft_chain_filter.c | 3 +
net/netfilter/nft_set_bitmap.c | 5 +-
net/netfilter/nft_set_hash.c | 110 +++--
net/netfilter/nft_set_rbtree.c | 375 ++++++++++++---
net/tipc/netlink_compat.c | 1 +
scripts/gcc-plugins/randomize_layout_plugin.c | 11 +-
sound/core/info.c | 21 +-
sound/hda/hdac_stream.c | 6 +-
sound/pci/hda/patch_realtek.c | 1 +
sound/soc/ti/omap-mcbsp.c | 6 +-
tools/power/x86/turbostat/turbostat.c | 2 +-
tools/testing/selftests/efivarfs/create-read.c | 2 +
135 files changed, 1626 insertions(+), 679 deletions(-)
If bus is marked as multi_link, but number of masters in the stream is
not higher than bus->hw_sync_min_links (bus->multi_link && m_rt_count >=
bus->hw_sync_min_links), bank switching should not happen. The first
part of do_bank_switch() code properly takes these conditions into
account, but second part (sdw_ml_sync_bank_switch()) relies purely on
bus->multi_link property. This is not balanced and leads to NULL
pointer dereference:
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
...
Call trace:
wait_for_completion_timeout+0x124/0x1f0
do_bank_switch+0x370/0x6f8
sdw_prepare_stream+0x2d0/0x438
qcom_snd_sdw_prepare+0xa0/0x118
sm8450_snd_prepare+0x128/0x148
snd_soc_link_prepare+0x5c/0xe8
__soc_pcm_prepare+0x28/0x1ec
dpcm_be_dai_prepare+0x1e0/0x2c0
dpcm_fe_dai_prepare+0x108/0x28c
snd_pcm_do_prepare+0x44/0x68
snd_pcm_action_single+0x54/0xc0
snd_pcm_action_nonatomic+0xe4/0xec
snd_pcm_prepare+0xc4/0x114
snd_pcm_common_ioctl+0x1154/0x1cc0
snd_pcm_ioctl+0x54/0x74
Fixes: ce6e74d008ff ("soundwire: Add support for multi link bank switch")
Cc: <stable(a)vger.kernel.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski(a)linaro.org>
---
drivers/soundwire/stream.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 9dc6399f206a..f9c0adc0738d 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -742,14 +742,15 @@ static int sdw_bank_switch(struct sdw_bus *bus, int m_rt_count)
* sdw_ml_sync_bank_switch: Multilink register bank switch
*
* @bus: SDW bus instance
+ * @multi_link: whether this is a multi-link stream with hardware-based sync
*
* Caller function should free the buffers on error
*/
-static int sdw_ml_sync_bank_switch(struct sdw_bus *bus)
+static int sdw_ml_sync_bank_switch(struct sdw_bus *bus, bool multi_link)
{
unsigned long time_left;
- if (!bus->multi_link)
+ if (!multi_link)
return 0;
/* Wait for completion of transfer */
@@ -847,7 +848,7 @@ static int do_bank_switch(struct sdw_stream_runtime *stream)
bus->bank_switch_timeout = DEFAULT_BANK_SWITCH_TIMEOUT;
/* Check if bank switch was successful */
- ret = sdw_ml_sync_bank_switch(bus);
+ ret = sdw_ml_sync_bank_switch(bus, multi_link);
if (ret < 0) {
dev_err(bus->dev,
"multi link bank switch failed: %d\n", ret);
--
2.34.1
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x b022f0c7e404887a7c5229788fc99eff9f9a80d5
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2023102138-riverbed-senator-e356@gregkh' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From b022f0c7e404887a7c5229788fc99eff9f9a80d5 Mon Sep 17 00:00:00 2001
From: Francis Laniel <flaniel(a)linux.microsoft.com>
Date: Fri, 20 Oct 2023 13:42:49 +0300
Subject: [PATCH] tracing/kprobes: Return EADDRNOTAVAIL when func matches
several symbols
When a kprobe is attached to a function that's name is not unique (is
static and shares the name with other functions in the kernel), the
kprobe is attached to the first function it finds. This is a bug as the
function that it is attaching to is not necessarily the one that the
user wants to attach to.
Instead of blindly picking a function to attach to what is ambiguous,
error with EADDRNOTAVAIL to let the user know that this function is not
unique, and that the user must use another unique function with an
address offset to get to the function they want to attach to.
Link: https://lore.kernel.org/all/20231020104250.9537-2-flaniel@linux.microsoft.c…
Cc: stable(a)vger.kernel.org
Fixes: 413d37d1eb69 ("tracing: Add kprobe-based event tracer")
Suggested-by: Masami Hiramatsu <mhiramat(a)kernel.org>
Signed-off-by: Francis Laniel <flaniel(a)linux.microsoft.com>
Link: https://lore.kernel.org/lkml/20230819101105.b0c104ae4494a7d1f2eea742@kernel…
Acked-by: Masami Hiramatsu (Google) <mhiramat(a)kernel.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat(a)kernel.org>
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index 3d7a180a8427..a8fef6ab0872 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -705,6 +705,25 @@ static struct notifier_block trace_kprobe_module_nb = {
.priority = 1 /* Invoked after kprobe module callback */
};
+static int count_symbols(void *data, unsigned long unused)
+{
+ unsigned int *count = data;
+
+ (*count)++;
+
+ return 0;
+}
+
+static unsigned int number_of_same_symbols(char *func_name)
+{
+ unsigned int count;
+
+ count = 0;
+ kallsyms_on_each_match_symbol(count_symbols, func_name, &count);
+
+ return count;
+}
+
static int __trace_kprobe_create(int argc, const char *argv[])
{
/*
@@ -836,6 +855,31 @@ static int __trace_kprobe_create(int argc, const char *argv[])
}
}
+ if (symbol && !strchr(symbol, ':')) {
+ unsigned int count;
+
+ count = number_of_same_symbols(symbol);
+ if (count > 1) {
+ /*
+ * Users should use ADDR to remove the ambiguity of
+ * using KSYM only.
+ */
+ trace_probe_log_err(0, NON_UNIQ_SYMBOL);
+ ret = -EADDRNOTAVAIL;
+
+ goto error;
+ } else if (count == 0) {
+ /*
+ * We can return ENOENT earlier than when register the
+ * kprobe.
+ */
+ trace_probe_log_err(0, BAD_PROBE_ADDR);
+ ret = -ENOENT;
+
+ goto error;
+ }
+ }
+
trace_probe_log_set_index(0);
if (event) {
ret = traceprobe_parse_event_name(&event, &group, gbuf,
@@ -1695,6 +1739,7 @@ static int unregister_kprobe_event(struct trace_kprobe *tk)
}
#ifdef CONFIG_PERF_EVENTS
+
/* create a trace_kprobe, but don't add it to global lists */
struct trace_event_call *
create_local_trace_kprobe(char *func, void *addr, unsigned long offs,
@@ -1705,6 +1750,24 @@ create_local_trace_kprobe(char *func, void *addr, unsigned long offs,
int ret;
char *event;
+ if (func) {
+ unsigned int count;
+
+ count = number_of_same_symbols(func);
+ if (count > 1)
+ /*
+ * Users should use addr to remove the ambiguity of
+ * using func only.
+ */
+ return ERR_PTR(-EADDRNOTAVAIL);
+ else if (count == 0)
+ /*
+ * We can return ENOENT earlier than when register the
+ * kprobe.
+ */
+ return ERR_PTR(-ENOENT);
+ }
+
/*
* local trace_kprobes are not added to dyn_event, so they are never
* searched in find_trace_kprobe(). Therefore, there is no concern of
diff --git a/kernel/trace/trace_probe.h b/kernel/trace/trace_probe.h
index 02b432ae7513..850d9ecb6765 100644
--- a/kernel/trace/trace_probe.h
+++ b/kernel/trace/trace_probe.h
@@ -450,6 +450,7 @@ extern int traceprobe_define_arg_fields(struct trace_event_call *event_call,
C(BAD_MAXACT, "Invalid maxactive number"), \
C(MAXACT_TOO_BIG, "Maxactive is too big"), \
C(BAD_PROBE_ADDR, "Invalid probed address or symbol"), \
+ C(NON_UNIQ_SYMBOL, "The symbol is not unique"), \
C(BAD_RETPROBE, "Retprobe address must be an function entry"), \
C(NO_TRACEPOINT, "Tracepoint is not found"), \
C(BAD_ADDR_SUFFIX, "Invalid probed address suffix"), \
The vmd_pm_enable_quirk() helper is called from pci_walk_bus() during
probe to enable ASPM for controllers with VMD_FEAT_BIOS_PM_QUIRK set.
Since pci_walk_bus() already holds a pci_bus_sem read lock, use the new
locked helper to enable link states in order to avoid a potential
deadlock (e.g. in case someone takes a write lock before reacquiring
the read lock).
Fixes: f492edb40b54 ("PCI: vmd: Add quirk to configure PCIe ASPM and LTR")
Cc: stable(a)vger.kernel.org # 6.3
Cc: Michael Bottini <michael.a.bottini(a)linux.intel.com>
Cc: David E. Box <david.e.box(a)linux.intel.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam(a)linaro.org>
Signed-off-by: Johan Hovold <johan+linaro(a)kernel.org>
---
drivers/pci/controller/vmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 94ba61fe1c44..0452cbc362ee 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -751,7 +751,7 @@ static int vmd_pm_enable_quirk(struct pci_dev *pdev, void *userdata)
if (!(features & VMD_FEAT_BIOS_PM_QUIRK))
return 0;
- pci_enable_link_state(pdev, PCIE_LINK_STATE_ALL);
+ pci_enable_link_state_locked(pdev, PCIE_LINK_STATE_ALL);
pos = pci_find_ext_capability(pdev, PCI_EXT_CAP_ID_LTR);
if (!pos)
--
2.41.0