commit 1a0388846138eda9f6eb4258ff227a223afc2f52 Author: Greg Kroah-Hartman Date: Mon Nov 23 08:44:24 2026 +0100 Linux 7.3.6 Link: https://lore.kernel.org/r/20261118150247.972732815@linuxfoundation.org Tested-by: Brett A C Sheffield Tested-by: Takeshi Ogasawara Tested-by: Sergey Lebedev # Surface Pro 11, btintel_pcie s2i= Tested-by: Peter Schneider Tested-by: Joungmin Lee Tested-by: Shuah Khan Tested-by: Markus Reichelt Tested-by: Sean Lyon Tested-by: Ron Economos Tested-by: Salvatore Bonaccorso Link: https://lore.kernel.org/r/20261120055248.913352689@linuxfoundation.org Tested-by: Brett A C Sheffield Tested-by: Joungmin Lee Tested-by: Takeshi Ogasawara Tested-by: Barry K. Nathan Tested-by: Salvatore Bonaccorso Tested-by: Pavel Machek (CIP) Tested-by: Miguel Ojeda Tested-by: Sergey Lebedev # Surface Pro 11, btintel_pcie s2i= Tested-by: Markus Reichelt Tested-by: Steffen Dirkwinkel Tested-by: Florian Fainelli Tested-by: Peter Schneider Tested-by: Benjamin Boortz Tested-by: SJ Park Tested-by: James Morris Signed-off-by: Greg Kroah-Hartman commit 1d1bcc50465e24d999bfecc539753d0820ddfcc2 Author: ZhengYuan Huang Date: Thu Aug 6 16:50:12 2026 +0800 ocfs2: reject inconsistent local xattr entries [ Upstream commit 415ad9147484a9994ad7963c46aaf56e14dd3b49 ] [BUG] A corrupt OCFS2 xattr entry can set OCFS2_XATTR_ENTRY_LOCAL while keeping xe_value_size larger than OCFS2_XATTR_INLINE_SIZE. When that entry reaches namevalue_size_xe(), the filesystem hits its BUG_ON: kernel BUG at fs/ocfs2/xattr.c:231! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI RIP: 0010:namevalue_size_xe fs/ocfs2/xattr.c:231 [inline] RIP: 0010:ocfs2_xa_block_wipe_namevalue+0x2e4/0x330 fs/ocfs2/xattr.c:1638 Call Trace: ocfs2_xa_wipe_namevalue fs/ocfs2/xattr.c:1470 [inline] ocfs2_xa_remove_entry+0xae/0x1d0 fs/ocfs2/xattr.c:1941 ocfs2_xa_remove fs/ocfs2/xattr.c:2043 [inline] ocfs2_xa_set+0x11a8/0x30a0 fs/ocfs2/xattr.c:2247 ocfs2_xattr_ibody_set+0x302/0xc50 fs/ocfs2/xattr.c:2795 __ocfs2_xattr_set_handle+0x7e6/0xdb0 fs/ocfs2/xattr.c:3416 ocfs2_xattr_set+0x1447/0x2610 fs/ocfs2/xattr.c:3650 ocfs2_xattr_security_set+0x37/0x50 fs/ocfs2/xattr.c:7241 __vfs_removexattr+0x14d/0x1d0 fs/xattr.c:518 cap_inode_killpriv+0x29/0x50 security/commoncap.c:355 security_inode_killpriv+0x105/0x220 security/security.c:2724 setattr_prepare+0x147/0x8a0 fs/attr.c:219 ocfs2_setattr+0x504/0x1fd0 fs/ocfs2/file.c:1148 notify_change+0x4b5/0x1030 fs/attr.c:546 do_truncate+0x1d2/0x230 fs/open.c:68 handle_truncate fs/namei.c:3596 [inline] do_open fs/namei.c:3979 [inline] path_openat+0x260f/0x2ce0 fs/namei.c:4134 do_filp_open+0x1f6/0x430 fs/namei.c:4161 do_sys_openat2+0x117/0x1c0 fs/open.c:1437 ... [CAUSE] namevalue_size_xe() assumes that local entries contain an inline value no larger than OCFS2_XATTR_INLINE_SIZE. Existing xattr metadata validation only checks whether the value fits the storage region, and cached entries can reach lookup and bucket maintenance paths without a semantic check. A corrupt entry can therefore be passed to namevalue_size_xe(). [FIX] Validate the local/value-size invariant in the existing flat and bucket metadata validators and before accepting matched entries or traversing bucket entries in paths that call namevalue_size_xe(). Return an OCFS2 corruption error instead of firing the assertion. Link: https://lore.kernel.org/20260806085012.2650042-1-gality369@gmail.com Signed-off-by: ZhengYuan Huang Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Heming Zhao Signed-off-by: Sasha Levin commit 68b9d50f12d6749d8070b8917919d76a69c85761 Author: Ben Horgan Date: Thu Nov 19 16:19:31 2026 +0100 arm_mpam: On saving mbwu state read the monitors before clearing CFG_MBWU_CTL commit 197a7a41e6e006916fe68c952e96d768933104fe upstream In mpam_save_mbwu_state() the monitor values are read using __ris_msmon_read_locked() which checks if the configuration provided matches that in the hardware and if not then resets the monitor. To avoid resetting the monitor before reading the value that needs saving only clear the configuration after the monitor is read. Fixes: d056d29aefbe ("arm_mpam: Use __ris_msmon_read() for saving MBWU state") Signed-off-by: Ben Horgan Signed-off-by: Catalin Marinas [backport: drop error returns, adjust to changed context] Signed-off-by: Andre Przywara Signed-off-by: Sasha Levin commit f9b393b166296deac27e48e02cf0125a81d2704c Author: David Hildenbrand (Arm) Date: Thu Oct 22 11:45:42 2026 +0800 mm/hugetlb: disable PMD sharing for UFFD missing mode [ Upstream commit 809cbe72ace890f75a9b126eb6a8b533081666d8 ] For UFFDIO_POISON to install a poison marker in a hugetlb mapping, it is sufficient to have the VMA registered for missing mode. However, UFFD missing mode does currently not block PMD table sharing, so installing the marker will be visible to everyone using the shared PMD table, which is wrong as UFFDIO_POISON must stay local to the process. To fix it, make uffd_disable_huge_pmd_share() cover VM_UFFD_MISSING as well. With missing mode covered, hugetlb PMD sharing is disabled for all userfaultfd registered VMAs, so the helper can simply return whether the VMA has a userfaultfd context instead of testing individual UFFD mode flags. Add a debug check on the marker installation path. The existing registration path will then unshare PMD tables, and subsequent faults will not share them while the mapping remains registered. The alternative would be to unshare PMD tables selectively when installing poison markers, which results in way more complexity. Or alternatively, simply failing the marker installation, which might break some use cases. This also disables PMD sharing for userfaultfd registrations that never use UFFDIO_POISON. Link: https://lore.kernel.org/20261022034543.51226-3-lizhe.67@bytedance.com Fixes: 8a13897fb0da ("mm: userfaultfd: support UFFDIO_POISON for hugetlbfs") Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Li Zhe Signed-off-by: Andrew Morton Suggested-by: Li Zhe Suggested-by: Mike Rapoport Acked-by: Mike Rapoport (Microsoft) Cc: Muchun Song Cc: Oscar Salvador Cc: Peter Xu Cc: Jose A. Perez de Azpillaga Signed-off-by: Sasha Levin commit 878dd63b28288fb36acc187e27b7d4f86ffdaac7 Author: Pauli Virtanen Date: Sat Aug 29 17:20:02 2026 +0300 Bluetooth: L2CAP: hold conn->lock for __l2cap_ecred_conn_rsp_defer [ Upstream commit 32d86e048d8efedb7aa6cbbd3c36c3c435401c92 ] __l2cap_ecred_conn_rsp_defer() > __l2cap_chan_list_id() accesses conn->chan_l which is guarded by conn->lock. The lock fails to be held when calling from l2cap_sock.c. Fix by using l2cap_chan_conn_lock(), and taking the locks in required order l2cap_conn::lock > l2cap_chan::lock > sk. Leave fast path with sk->sk_state precheck. Move the L2CAP defer handling to l2cap_sock_defer(). The code should also take l2cap_chan_lock() for sibling channels, but that needs separate fix due to lock nesting. Fixes: ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in hci_chan_del") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 64a6dc07805edd07e01916a2b6942488858e9f5f Author: Pauli Virtanen Date: Sat Aug 29 17:20:01 2026 +0300 Bluetooth: 6lowpan: avoid concurrent peer_del() in bt_6lowpan_disconnect [ Upstream commit df5175dfcf4879f6bcdadee614ac089e5627b721 ] bt_6lowpan_disconnect() looks up and accesses peer->chan, without holding locks guaranteeing peer_del() cannot free the peer concurrently. Take devices_lock to ensure peer can be dereferenced safely. Fixes: 15f32cabf426 ("Bluetooth: 6lowpan: add missing l2cap_chan_lock()") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit b47753eebca84904173dc4e6b6aa45c87d7a7cf3 Author: Pauli Virtanen Date: Sat Aug 29 17:19:59 2026 +0300 Bluetooth: 6lowpan: use l2cap_chan_close_unlocked() [ Upstream commit a69dd52612ea6c763f76553e355ee03b981b4ed4 ] 6lowpan.c is using l2cap_chan_close() without taking chan->conn->lock, so it may modify conn->chan_l without holding the guarding lock. Fix the locking by using the l2cap_chan_close_unlocked() helper that acquires the necessary locks. Fixes: 15f32cabf426 ("Bluetooth: 6lowpan: add missing l2cap_chan_lock()") Link: https://syzkaller.appspot.com/bug?extid=0e4ebcc970728e056324 Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 6dbe2ac00eb330be99898cd390be883221d6d156 Author: Pauli Virtanen Date: Sat Aug 29 17:19:58 2026 +0300 Bluetooth: L2CAP: fix race condition in l2cap_sock_shutdown() [ Upstream commit 79ff49a72c06abdf76872dccc687e2a83c4f407f ] l2cap_sock_shutdown() has the race condition [Task 1] [Task 2] l2cap_sock_shutdown l2cap_sock_connect l2cap_chan_lock l2cap_chan_connect conn = ... /* == NULL*/ l2cap_chan_unlock ------------> l2cap_chan_lock if (conn) /* false */ __l2cap_chan_add(conn, chan) l2cap_chan_lock <-------------- l2cap_chan_unlock l2cap_chan_close /* chan->conn->lock not held! */ conn->lock protects conn->chan_l and is not properly held here. Use the l2cap_chan_close_unlocked() helper that ensures conn->lock is held for l2cap_chan_close(). Fixes: ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in hci_chan_del") Reported-by: Eulgyu Kim Reported-by: Jaeyoung Chung Link: https://lore.kernel.org/linux-bluetooth/20260824153908.2327306-1-jjy600901@snu.ac.kr/ Link: https://syzkaller.appspot.com/bug?extid=0e4ebcc970728e056324 Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 5d038717af81b2eb79cc09bbf492b19a872d45d0 Author: Pauli Virtanen Date: Sat Aug 29 17:19:57 2026 +0300 Bluetooth: L2CAP: add l2cap_chan_close_unlocked() and locking helpers [ Upstream commit 608e0b7a675b2affbbf38167cad0fa63d8e064f7 ] l2cap_chan_close() requires holding chan->lock and chan->conn->lock if associated chan->conn exists, to guard eg. conn->chan_l. Taking the locks with right ordering requires handling a race condition. Add helper function l2cap_chan_(un)lock_conn that do the locking right. Add l2cap_chan_close_unlocked() that does not require locks to be held, as all callsites do this lock -> close -> unlock pattern. Link: https://syzkaller.appspot.com/bug?extid=0e4ebcc970728e056324 Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 8d17ace61a306733f72ca0115b82b3bb0b0d883f Author: Pauli Virtanen Date: Sat Aug 29 17:19:56 2026 +0300 Bluetooth: L2CAP: take chan->lock for l2cap_chan_add/ready/del [ Upstream commit 385c0829e09e7a6380ae67998ac6ef6f4dfd5303 ] chan->lock must be held for __l2cap_chan_add as eg. calls to l2cap_chan_close assume chan->conn writes are guarded by it. It must be held for l2cap_chan_del() due to l2cap_sock.c:l2cap_chan_conn, l2cap_monitor_timeout, etc. Similarly it should be held for l2cap_ops::ready (assumed in 6lowpan.c). Also teardown usually has chan->lock held, it should always have it held to have the same locking context. The lock is not correctly held by l2cap_core in several places. Add the missing locks for l2cap_chan_del/add/ready(), except in l2cap_ecred_rsp_defer() which needs separate fix as it needs lock nesting. Fixes: 6fef032af009 ("Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_new_connection_cb()") Signed-off-by: Pauli Virtanen Reported-by: Eulgyu Kim Reported-by: Jaeyoung Chung Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 1989a5a1ccb9405bce7baa352675a8f44d96bcba Author: Pauli Virtanen Date: Sun Aug 16 12:47:04 2026 +0300 Bluetooth: L2CAP: add locking annotations for l2cap_chan_lock/unlock [ Upstream commit 987935a58d289b78fc03b3c3c92942bf83d43830 ] Add minimal context analysis annotations to l2cap_chan_lock/unlock() and callers required for no warnings. Reviewed-by: Bart Van Assche Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 0683a0908174a527e540ab8d566170f31db230ea Author: Pauli Virtanen Date: Sun Aug 16 12:47:03 2026 +0300 Bluetooth: L2CAP: avoid maybe-return-locked in l2cap_get_chan_by_scid/dcid [ Upstream commit 15ad901d92a272327a7359b5560f1f24afa4975b ] Replace the maybe-return-locked pattern in l2cap_get_chan_by_scid/dcid() by doing locking in the caller after NULL check. This allows adding context analysis annotations for the locking. Reviewed-by: Bart Van Assche Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz [ sashal: Adjusted context in l2cap_config_rsp() by taking the channel lock before this tree's existing BT_CONFIG/BT_CONNECTED state check, so the early goto done unlocks a held lock. ] Signed-off-by: Sasha Levin commit 5145cf75e362a32b46ee1cae254170aa50a0cfbf Author: Adrián Larumbe Date: Wed Nov 4 19:51:54 2026 +0000 drm/panfrost: Fix race when restoring reset state in perfcnt commit a947f57843f1139821c6f9f94ebe899574e6636e upstream. struct panfrost_perfcnt::state should always be updated atomically, both in the dump ioctl and the reset sequence. Fixes: 9944dd07f3cf ("drm/panfrost: Fix races between perfcnt and reset sequence") Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patch.msgid.link/20261104-panfrost-reset-races-fixes-v3-2-09868a88c351@collabora.com Signed-off-by: Adrián Larumbe Signed-off-by: Greg Kroah-Hartman commit 4ccbada6bff88a7395fc9c472d79d1c4a65328b6 Author: Brian Norris Date: Tue Nov 3 14:14:39 2026 -0800 PM: runtime: Only queue an idle check for RPM-linked suppliers (part 2) commit bd56424ce808fb1f92a4dc5bdeedc45b85c5d6cd upstream. Commit be5755f023e7 ("PM: runtime: Only queue an idle check for RPM-linked suppliers") was incomplete. There are two other cases where we perform idle checks on non-DL_FLAG_PM_RUNTIME suppliers -- in pm_runtime_set_suspended(), and in cases where we failed to resume suppliers. Fixes: be5755f023e7 ("PM: runtime: Only queue an idle check for RPM-linked suppliers") Fixes: 5244f5e2d801 ("PM: runtime: Defer suspending suppliers") Signed-off-by: Brian Norris Link: https://patch.msgid.link/20261103141442.v2.1.If69ddc515c2e9fd4338441e87688b9d690d2ef36@changeid Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman commit dc8fd2f836c0174e37e65796c9cc51a76575e084 Author: Jérémy Jean Date: Mon Nov 2 13:24:19 2026 +0000 nvmet-auth: reject incomplete DHCHAP messages commit 29e027774324dbd5321a67bbd16840e8f7bcd189 upstream. Commit c9359401036e ("nvmet-auth: reject undersized AUTH_SEND payloads") only ensures that AUTH_SEND has auth_type and auth_id before nvmet_execute_auth_send() starts parsing the payload, but the DHCHAP path reads t_id before it verifies message lengths. A two-byte DHCHAP NEGOTIATE payload can therefore still trigger an OOB read that KASAN reports as: BUG: KASAN: slab-out-of-bounds in nvmet_execute_auth_send Read of size 2 at addr ffff8880030d8364 Require the payload to cover the minimum DHCHAP message length before parsing it. Fixes: c9359401036e ("nvmet-auth: reject undersized AUTH_SEND payloads") Cc: stable@vger.kernel.org Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Jérémy Jean Signed-off-by: Keith Busch Signed-off-by: Greg Kroah-Hartman commit 47deb17569e2a74e8283378fb651fec69c683475 Author: Christoph Hellwig Date: Mon Nov 2 06:55:58 2026 +0100 zloop: fix block size query commit 8fbee85a90789d367c347b1cfd5a5ef37f3a934a upstream. The block size obviously needs to be queried when it is not set, not when it already is set. Reported: Damien Le Moal Fixes: 5e9929e2f03c ("zloop: share more code for opening a zone backing file") Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/20261102055558.3212814-1-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman commit 16d490eedb6d2776df36533a47b4d5987cd86f14 Author: Sasha Levin Date: Sat Oct 31 11:28:46 2026 -0400 rust: bindings: derive Zeroable for bindgen's opaque array wrappers commit 57d916a3eb765ee0577d269bb2ac1bdf3a7a7f40 upstream. bindgen 0.73 emits the blob of some opaque types, such as ones aligned to more than 4 bytes, as a `__BindgenOpaqueArray` or `__BindgenOpaqueArray` newtype instead of a plain array. The newtype only derives `PartialEq`, `Eq`, `Copy`, `Clone`, `Debug` and `Hash`, and the `MaybeZeroable` custom derive does not reach it, so a struct that embeds such an opaque type is no longer `Zeroable`. `spinlock` is opaque (see rust/bindgen_parameters), and with lockdep its blob becomes a `__BindgenOpaqueArray8<[u8; 72]>`. Commit 71ec3c7d6db8 ("blk-mq: quiesce a queue that joins a quiesced tag set") added a `spinlock_t` to `struct blk_mq_tag_set`, so an allmodconfig build with bindgen 0.73 now fails: error[E0277]: the trait bound `bindings::__BindgenOpaqueArray8<[u8; 72]>: pin_init::Zeroable` is not satisfied --> rust/kernel/block/mq/tag_set.rs:41:49 Which wrappers exist depends on the bindgen version and on the opaque types of the configuration, so they cannot be covered by unconditional impls in rust/bindings/lib.rs like `__BindgenBitfieldUnit` is. Derive `Zeroable` for each wrapper in the generated bindings instead. The pattern allows for the spacing of bindgen's output when rustfmt is not available. Fixes: 71ec3c7d6db8 ("blk-mq: quiesce a queue that joins a quiesced tag set") Signed-off-by: Sasha Levin Reviewed-by: Alice Ryhl Reviewed-by: Alexandre Courbot Reported-by: Nathan Chancellor Closes: https://lore.kernel.org/rust-for-linux/20261030223702.GA1673281@ax162/ Link: https://patch.msgid.link/20261031152846.746656-1-sashal@kernel.org Signed-off-by: Miguel Ojeda Signed-off-by: Greg Kroah-Hartman commit f322a19ee54ff22dcd941041b4ce297bb686b31d Author: Shakeel Butt Date: Tue Oct 27 07:32:47 2026 -0700 kernfs: avoid READ_ONCE() on a kgid_t in kernfs_new_node() commit ef179363b04306dbc645c53207b9ad3516ebc75f upstream. kernfs_new_node() reads the parent's gid with READ_ONCE(attrs->ia_gid). That gid is a kgid_t, which is a struct. On SMP alpha, READ_ONCE() ends by casting the value it loaded back to the type of its argument. Here that is a cast from a struct to the same struct. GCC accepts that as an extension, but ISO C does not allow a cast to or from a struct type, so sparse warns: fs/kernfs/dir.c:751:31: sparse: sparse: cast to non-scalar fs/kernfs/dir.c:751:31: sparse: sparse: cast from non-scalar Read the gid_t inside the kgid_t instead, and wrap it back up with KGIDT_INIT(). This is still a single marked load of the same four bytes. There is no functional change. With GCC 12 for alpha (the config from the report) and GCC 14 for x86-64 (with and without KCSAN), fs/kernfs/dir.o has the same object code before and after this change. Fixes: 81bdc85b4c08 ("kernfs: fix up the unlocked attribute reads on the creation paths") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202610261608.vItiXCGW-lkp@intel.com/ Signed-off-by: Shakeel Butt Acked-by: Tejun Heo Link: https://patch.msgid.link/20261027143247.3537239-1-shakeel.butt@linux.dev Signed-off-by: Danilo Krummrich Signed-off-by: Greg Kroah-Hartman commit 4a3e1546bc16a2acd2fc6cb7084e9d2348252aa7 Author: Zhan Xusheng Date: Mon Oct 26 17:22:17 2026 +0800 erofs: fix disallowing superblock_share if device= is set commit aafea970fb04633e22c7ad74cba4caf563c6d6a9 upstream. superblock_share together with device= is rejected in erofs_fc_fill_super(): if (test_opt(&sbi->opt, SUPERBLOCK_SHARE) && sbi->devs->extra_devices) return -EINVAL; but extra_devices is kept in sbi->devs, not in sbi->opt, and erofs_sb_share_test_super() compares only the backing inode, the fsoffset and sbi->opt. So once the image is mounted with superblock_share, a second mount with superblock_share,device= matches that superblock and get_tree_super() reuses it without calling fill_super() at all. The same command line therefore either fails with -EINVAL or succeeds with device= quietly dropped, depending on whether a compatible mount already exists. Refuse to match a context that brought device= options, so that it gets a superblock of its own and fill_super() decides as it does today. Only the incoming context can be tested: a shared superblock may have extra_devices set itself, because erofs_scan_devices() fills the device table from the image when no device= was given. Fixes: cd4108319bb3 ("erofs: reuse superblock for file-backed mounts") Signed-off-by: Zhan Xusheng Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang (Docker) Signed-off-by: Greg Kroah-Hartman commit 95b0d95236f02baa0e349f465c18577999ec9d00 Author: Takashi Iwai Date: Sat Oct 24 10:00:10 2026 +0200 ALSA: usb-audio: Correct a typo in UMC404HD model comment commit 73e38d178bbd28fe2c30443e6c0cf74e3f584bdb upstream. The recently added quirk code has a comment for 1397:0509 as if it were UMC204HD, but it's UMC404HD. Correct it. Fixes: e88f4749c02f ("ALSA: usb-audio: Avoid applying boot quirk for Behringer UMC204HD") Suggested-by: Gergo Koteles Link: https://patch.msgid.link/20261024080011.2258391-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman commit 161c8e43d2a209cb4e2361433e5270a9ea7daec1 Author: Damien Le Moal Date: Fri Sep 18 15:29:59 2026 +0900 scsi: core: Fix additional sense code definition commit 3b7ccba37858dd3d7d3780eb42ab943152e5b7ec upstream. The ASC() macro used to define an additional sense code with no additional sense code qualifier conflicts with the ASC macro definition of the file arch/sparc/include/asm/ns87303.h, leading to compilation errors. Avoid this conflict by renaming the macro as SCSI_ASC() and the ASC_DEF() macro to SCSI_ASC_DEF() to be consistent. Reported-by: kernel test robot Fixes: 72c54bd0cbb2 ("scsi: core: Define all additional sense codes and their qualifiers") Closes: https://lore.kernel.org/oe-kbuild-all/202609180743.kyprDg18-lkp@intel.com/ Signed-off-by: Damien Le Moal Link: https://patch.msgid.link/20260918062959.2245533-1-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Greg Kroah-Hartman commit 7b00354250198f136364124135c6c1d37baff6d6 Author: Krzysztof Wilczyński Date: Fri Aug 14 07:05:20 2026 +0000 PCI/sysfs: Decouple acpi_index from the optional device name element [ Upstream commit 337bdf853101a0ee66eadf668f0fef21f8276b52 ] The "_DSM for Naming a PCI or PCI Express Device Under Operating Systems" (PCI Firmware r3.3, sec 4.6.7) returns a package of two elements: 1) Instance number (mandatory Integer) 2) String name (optional String, null string if not populated) These are exposed as sysfs 'acpi_index' and 'label'. Previously, if the name was malformed, reads of 'acpi_index' failed unnecessarily. Validate each element only for the attribute that exports it. So "acpi_index" now depends on the instance number alone, and "label" reads fail with -EIO when the name element is neither a string nor a buffer. The package elements pointer is read only after the object type has been checked. On platforms with a valid instance number and a malformed name element the "acpi_index" attribute starts returning data. Because udev derives the onboard interface name from "acpi_index", an interface on such a platform may be renamed once, on the first boot after this change. That is the attribute assuming the value the firmware always provided. Link: https://github.com/pciutils/pciutils/issues/175 Signed-off-by: Krzysztof Wilczyński [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260814070522.2327975-3-kwilczynski@kernel.org Signed-off-by: Sasha Levin commit 76e0915502943e485694e90271b1889515597bd2 Author: Linus Torvalds Date: Mon Oct 19 19:24:05 2026 -1000 vdpa_sim: disable page faults around vringh_need_notify_iotlb() [ Upstream commit 05fb07c40e0013ba5ae373c6ea1bcc622eaea7f0 ] When vdpa_sim runs with use_va (the default), its rings live in user memory, and vringh reads the ring's flags and event index with __get_user() through the user address. The net and block simulators call vringh_need_notify_iotlb() with bottom halves disabled, so those reads happen in atomic context. That only works today because __get_user() has no might_fault() check: a fault is not handled in atomic context and simply comes back as -EFAULT. Make that explicit with pagefault_disable() around the call, so vringh can use the normal user accessors without complaint. Only the notification check needs this: the rest of the ring processing runs in the same kthread without bottom halves disabled, and can fault normally. Tested-and-acked-by: Michael S. Tsirkin Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin commit 660e962b5da0a7a10f43654ddcb643c384c3cd3d Author: Stian Halseth Date: Sat Oct 31 09:14:07 2026 +0100 sched/cputime: Don't warn when the tick period starts after idle exit [ Upstream commit b327e63683a2b894b500027375342c25222b58ef ] kcpustat_dyntick_stop() warns if idle ends before the tick period that the next tick will account has started. That happens on x86 in a CPU's first idle period with the tick stopped, right after the switch from the jiffies clocksource to tsc-early. On the jiffies clocksource ktime only moves at the tick. When the clocksource switches some time d after a tick, that d is lost: ktime continues from the value of the last tick. The next tick comes TICK_NSEC after the last one, but ktime has only moved TICK_NSEC - d, while tick_periodic() still adds a full TICK_NSEC to tick_next_period, which is now d ahead of ktime. When NOHZ starts, tick_init_jiffy_update() rounds it up to a multiple of TICK_NSEC and the sched timer is armed there, up to nearly two ticks after now. A tick stop saves that as ts->last_tick, and an idle exit before now reaches ts->last_tick - TICK_NSEC sees the tick period in the future. Nothing is accounted twice then. The first tick covers a period that starts after the idle exit, and the code already handles it. Drop the warning. Fixes: 96a494c9cfd8 ("sched/cputime: Don't account idle time twice after dyntick-idle") Reported-by: Paul Menzel Reported-by: Breno Leitao Reported-by: Linus Torvalds Reviewed-by: Kayra Cizmeci Reviewed-by: Frederic Weisbecker Signed-off-by: Stian Halseth Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/all/auTCQauaU733PY5z@gmail.com/ Link: https://lore.kernel.org/all/CAHk-=winC2u2D1FAX5grfq9F=bxmARxhuiQ4MvHAiJFu3iF6gw@mail.gmail.com/ Link: https://patch.msgid.link/20261031081408.3378884-1-stian@itx.no Closes: https://lore.kernel.org/all/bfe9b14a-6e65-41c5-b638-26f6e033788b@molgen.mpg.de/ -- kernel/sched/cputime.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) Signed-off-by: Sasha Levin commit df6ddad435d710bcb4a19182449762d16b1d2483 Author: Imre Kaloz Date: Tue Oct 13 14:02:07 2026 +0200 rtc: ds1685: do not sleep in the power-off handler [ Upstream commit 21a829af60a7f5c7456f1f0ff9b6b0eff0ceb738 ] Power-off handlers run from an atomic notifier chain and must not sleep. Use mdelay() for the delay before setting PAB. Fixes: aaaf5fbf56f1 ("rtc: add driver for DS1685 family of real time clocks") Reported-by: Sashiko Closes: https://lore.kernel.org/all/sashiko-outbox-169477@kernel.org/ Signed-off-by: Imre Kaloz Acked-by: Joshua Kinard Link: https://patch.msgid.link/20261013120208.11268-3-kaloz@kernel.org Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 214cd9aea4b006b5fc42a29c7eee3fd117ca5bc7 Author: Imre Kaloz Date: Tue Oct 13 14:02:06 2026 +0200 rtc: ds1685: arm the wake-up alarm at power-off only if an alarm is set [ Upstream commit c2373bcd50d9654b76eac585c7c98105665b3321 ] ds1685_rtc_poweroff() always sets WIE. The wake-up alarm then compares the time-of-day and date alarm registers, which hold whatever was last written to them, and a match powers the machine straight back on. Set WIE only when AIE is set in Control B, and clear it otherwise. Fixes: aaaf5fbf56f1 ("rtc: add driver for DS1685 family of real time clocks") Signed-off-by: Imre Kaloz Acked-by: Joshua Kinard Link: https://patch.msgid.link/20261013120208.11268-2-kaloz@kernel.org Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit c5e739d8ace3e3b923041844e07b68bacfe9192d Author: Nguyen Ngoc Thang Date: Fri Oct 16 18:58:51 2026 +0700 minix: reject rmdir of a directory with a corrupted link count [ Upstream commit fc9577079df8a44ccbf39d2f06634017d286e4f0 ] minix_rmdir() calls minix_unlink(), which drops the victim's link count once, and then drops it a second time for the "." entry. An image where an empty directory has i_nlink < 2 makes the second drop hit drop_nlink() with i_nlink == 0: WARNING: fs/inode.c:408 at drop_nlink minix_rmdir+0xe9/0x150 vfs_rmdir filename_rmdir __do_sys_unlinkat The parent's link count is already validated; do the same for the directory being removed and fail with -EFSCORRUPTED. Reported-by: syzbot+8420e667af06b1709c00@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=8420e667af06b1709c00 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Nguyen Ngoc Thang Link: https://patch.msgid.link/20261016115851.14276-1-ngocthang2710.1999@gmail.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit d17eceb1c87db46952ee2fec202c36331916ca65 Author: Nickolai Zeldovich Date: Mon Oct 26 21:58:13 2026 -0400 fs_pin: do not trust the pin after a spurious wakeup in pin_kill() [ Upstream commit f3a6dae67c9ca3d913cbb42fe324c9b47c8d9e53 ] A task waiting in pin_kill() for another task's ->kill() can take p->wait.lock after the pin has been freed, and can return with its on-stack wait entry still on p->wait. With BSD process accounting this is a use-after-free of the acct structure when umount() of the mount holding the accounting file races with acct(2). pin_kill() takes a still-queued entry as proof that pin_remove() has not run, so p is alive. But autoremove_wake_function() dequeues only when try_to_wake_up() succeeds: if the waiter was already woken spuriously, pin_remove() leaves the entry queued, acct_pin_kill() frees the acct with kfree_rcu(), and the grace period can end while the waiter sits between schedule() and rcu_read_lock(). Dequeue the entry unconditionally in a private wake function; pin_remove() is the only waker and sets p->done first. Reproduced under QEMU with KASAN and test-only delays: a slab-use-after-free in pin_kill() before the patch, no report after. Fixes: 59eda0e07f43 ("new fs_pin killing logics") Signed-off-by: Nickolai Zeldovich Link: https://patch.msgid.link/20261027015813.841821-1-nickolai@csail.mit.edu Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 0aa5576a9836d68e4e6fa92d5bf6b95bad1fd697 Author: Nickolai Zeldovich Date: Fri Oct 23 21:55:13 2026 -0400 ucount: read the parent ucounts before dropping the rlimit count [ Upstream commit 38bf603d1ea5d5a65a9cb277df75327ffec01ff1 ] do_dec_rlimit_put_ucounts() drops its share of iter->rlimit[type] and only then loads iter->ns->ucounts. If the decrement leaves the count non-zero, a concurrent caller can take it to zero and put the last reference, which frees the ucounts and possibly its user namespace with kfree_rcu(). An exiting task frees its pending signals without siglock or any RCU read-side section, so when it is preempted between the decrement and the load for a grace period it reads freed memory and then decrements a counter through the pointer it found there. A pending signal holds no reference on its ucounts: the reference is taken by whoever moves the count from 0 to 1 and dropped by whoever moves it back to 0, so the caller's share of the count is all that keeps iter alive, and only until it is dropped. Load the parent first; it stays pinned by the caller's share of its own count. Fixes: 15bc01effefe ("ucounts: Fix signal ucount refcounting") Signed-off-by: Nickolai Zeldovich Link: https://patch.msgid.link/20261024015513.830312-1-nickolai@csail.mit.edu Reviewed-by: Bradley Morgan Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit f84674a6ddb56164df4be96bd7106a16a977928e Author: Nickolai Zeldovich Date: Sat Oct 17 22:55:41 2026 -0400 splice: retry tee() instead of returning 0 when it races [ Upstream commit b2aa970a0a03c117306f48d75a4c3125a8cc9957 ] tee() can return 0 while the input pipe still has writers, when another task reads the input pipe or fills the output pipe at the same time. tee(2) documents 0 as "no data was copied" because the input pipe has no writers, and loops built on it (the man page example breaks out on 0) stop early. In a test with one thread writing 1 byte at a time to the input pipe, one reading it and one draining the output pipe, about one tee() call in 150 returned 0. do_tee() runs ipipe_prep() and opipe_prep() to wait for data and room, each under its own pipe lock, and only then takes both locks in link_pipe(). If the input pipe was emptied or the output pipe filled in between, link_pipe() finds nothing to do and returns 0. splice_pipe_to_pipe(), which was modelled on tee(), handles the same race by dropping both locks and going back to the prep steps ("A zero return value means EOF, so retry instead"), and returns -EAGAIN for SPLICE_F_NONBLOCK. Do the same in link_pipe(): move the prep steps into it and retry when nothing was linked although the input pipe still has writers. Tested under QEMU (x86_64) with the program in the notes: 154 of 22698 tee() calls returned 0 before the change, none of 34429 after it. Fixes: aadd06e5c56b ("[PATCH] splice: fix problems with sys_tee()") Signed-off-by: Nickolai Zeldovich Link: https://patch.msgid.link/20261018025541.799135-1-nickolai@csail.mit.edu Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit c4bff528a845184a0cfc0a9b16d8a2fb59e2b2b8 Author: Nickolai Zeldovich Date: Sat Oct 24 00:13:33 2026 -0400 pidfs: do not report fields that do not fit into the caller's struct [ Upstream commit 1534c37167488f2b85c74de048e1d6a4ba3848de ] The documentation of struct pidfd_info promises that "If the structure size is too small to contain a field (requested or not), to avoid confusion the mask will not contain a bit for that field", and asks userspace to trust the returned mask when deciding which fields hold valid data. pidfd_info() does not keep that promise. It builds kinfo.mask without looking at the size encoded in the ioctl command, and copy_struct_to_user() then truncates the copy to that size. A caller that passes a 64-byte struct (PIDFD_INFO_SIZE_VER0) and requests PIDFD_INFO_COREDUMP or PIDFD_INFO_SUPPORTED_MASK gets a mask with PIDFD_INFO_COREDUMP, PIDFD_INFO_COREDUMP_SIGNAL, PIDFD_INFO_COREDUMP_CODE and PIDFD_INFO_SUPPORTED_MASK set, while the coredump_* and supported_mask fields behind the 64 bytes were never written. Trusting the mask as documented, userspace then reads whatever its own buffer held at those offsets. The same happens for a 72- or 80-byte struct and the fields added after it. Clear the bits of the fields that lie beyond the caller's size before the copy, in the one place that knows both the final mask and the size. A request for a field that cannot be returned is thereby answered the way the header describes: the field is simply absent from the mask. Fixes: 1d8db6fd698d ("pidfs, coredump: add PIDFD_INFO_COREDUMP") Signed-off-by: Nickolai Zeldovich Link: https://patch.msgid.link/20261024041334.831273-2-nickolai@csail.mit.edu Acked-by: Luca Boccassi Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 0e08e0911511e882ac8e53b054e9952566d37a25 Author: Zhiyu Zhang Date: Thu Oct 29 01:41:36 2026 -0400 watch_queue: keep info_id separate from rcu_head [ Upstream commit 53d72818f9e2aeb03a6053544ee6efa4eb2a3988 ] struct watch overlays info_id with rcu_head. A notification poster reads info_id under rcu_read_lock(), but a concurrent final put can enqueue the watch with call_rcu(). Enqueueing the callback writes rcu_head before the grace period has elapsed, so it can corrupt info_id while the object remains legally visible to the reader. __post_watch_notification() then merges that value into the notification info word without masking it. Pointer bits can corrupt WATCH_INFO_LENGTH and make post_one_notification() copy beyond the posting task's stack record. Give info_id storage separate from rcu_head so RCU enqueueing cannot modify it. Place it after the kref, which uses existing tail padding on x86-64. Mask info_id with WATCH_INFO_ID at the point of use as an additional invariant check. An unprivileged shell and keyctl reproducer was run for 30 seconds in QEMU. The vulnerable baseline produced malformed notification lengths, while this change completed with 288631 key notifications and no malformed record. Fixes: c73be61cede5 ("pipe: Add general notification queue support") Reported-by: Tong Liu Reported-by: Qi Tang Reported-by: Zhiyu Zhang Closes: https://lore.kernel.org/lkml/CALf2hKveij_sHgANY9Aktm1dPa4wfKjKNkHyp9yPbjORWFXagA@mail.gmail.com/ Link: https://lore.kernel.org/netdev/CALf2hKvp0NPVLwr=a3+jUHtPohxbra8gox+aYAfWathJnn-J+Q@mail.gmail.com/ Signed-off-by: Zhiyu Zhang Link: https://patch.msgid.link/20261029054136.1174216-1-zhiyuzhang999@gmail.com Reviewed-by: Bradley Morgan Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 3faac0d89b92bd60e2b9a62c8500f05ca4c67138 Author: Qu Wenruo Date: Fri Oct 30 07:21:23 2026 +1030 iomap: only follow dio alignment requirement if specified [ Upstream commit 87d02f3e98a86abf70441b0a0418e01cb1d64b44 ] After commit 4025185cf953 ("iomap: follow the alignment requirement for iomap_dio_hole_iter()"), generic/091 fails on both xfs and ext4. The reason is that ext4 and xfs (except COW write) do not require full block alignment for direct IO. They are totally fine reading a sub-block range. That commit fails any direct read of sub-block holes/prealloc, even those filesystems can handle it without any problem. Fix the regression by only follow the block alignment if the IOMAP_DIO_FSBLOCK_ALIGNED flag is set. Fixes: 4025185cf953 ("iomap: follow the alignment requirement for iomap_dio_hole_iter()") Reviewed-by: Pankaj Raghav(Samsung) Signed-off-by: Qu Wenruo Link: https://patch.msgid.link/0e89c49b6f7804081f4041007b81ac620a153830.1793307063.git.wqu@suse.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 2b1979b2a864e7bc634e7706484f88a09a788f5f Author: Xiao Liang Date: Tue Oct 27 18:18:27 2026 +0800 tun: drop batched packets while the device is down [ Upstream commit 8f44631ba02afe9fff2f0a0fb66560ab19df87fd ] tun_sendmsg() handles TUN_MSG_PTR batches from vhost-net by calling tun_xdp_one() instead of tun_get_user(). But this path does not check IFF_UP, allowing packets from a guest to be injected into the host receive path while the device is administratively down. Check IFF_UP in tun_xdp_one() before running XDP or building an skb. Drop the packet when the device is down, matching tun_get_user(). Fixes: 043d222f93ab ("tuntap: accept an array of XDP buffs through sendmsg()") Signed-off-by: Xiao Liang Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20261027101830.85327-1-shaw.leon@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit bb25160be4913d876674cbf7ebc7d0343538a857 Author: John Johansen Date: Wed Sep 30 08:49:43 2026 -0700 apparmor: advertise that sctp is being mediated [ Upstream commit 35b8ab3f36ac0fcd8fc910da0bed889b6c75c426 ] Enable the test harness to detect that the kernel should be properly mediating sctp. Fixes: 7a82f9a06459f ("apparmor: fix check SCTP bind, and connect permission checks") Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit b8848da3e0278723d02a6736949977464dc74ece Author: Jhonata Poma-Hansen Date: Tue Oct 27 15:04:01 2026 +0100 netlink: check sk_rcvbuf before charging the dump skb [ Upstream commit b45d37740cfb4bdfccef3fbd9fd970fd3224438f ] Since commit ae8f160e7eb2 ("netlink: Fix wraparounds of sk->sk_rmem_alloc."), netlink_dump() charges the dump skb first and queues it only if sk_rmem_alloc is still below sk_rcvbuf. Commit a215b5723922 ("netlink: make sure we allow at least one dump skb") added an exception for an empty socket. A dump that starts while something else is still charged to a socket with a small receive buffer fails with ENOBUFS and stays running. Every recvmsg() retries it, fails again and sets sk_err, so a reader that peeks before reading, as libnl does, gets ENOBUFS on the read after each peek, never consumes the message at the head of the queue and spins forever. I hit this with "iw dev wlan0 scan" hanging at 100% CPU on an arm64 board with a 6.6 based kernel (iw 5.19 sets SO_RCVBUF to 8KiB). A kprobe trace showed the scan dump starting while the NEW_SCAN_RESULTS notification iw had just read was still charged to its socket, because iw had preempted the sender before netlink_broadcast() returned. Check the limit before charging, as before ae8f160e7eb2, which also covers the empty socket. netlink_recvmsg() continues a dump only at or below half of sk_rcvbuf, so the skb is then always queued, and a dump goes over the limit by at most one skb. Refuse a skb that would take sk_rmem_alloc past INT_MAX, so the wraparound stays fixed. Reproduced on net in a KVM guest with a userspace reproducer and the selftest in the next patch; both pass with this fix. Fixes: ae8f160e7eb2 ("netlink: Fix wraparounds of sk->sk_rmem_alloc.") Signed-off-by: Jhonata Poma-Hansen Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20261027-netlink-dump-livelock-v2-1-c4bb05352a33@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 4cfd4eb1004913255e5089099139399b5cd89d84 Author: Eric Dumazet Date: Wed Oct 28 13:27:02 2026 +0100 openvswitch: use eth_type_trans_careful() in internal_dev_recv() [ Upstream commit b55e5a0159c8f53edefcb7848d95eb93db37bce1 ] OVS actions like pop_eth followed by pop_mpls(ETH_P_TEB) or pop_nsh can expose an inner Ethernet header which is not in the linear part of the skb. Output to an internal port then crashes in eth_type_trans(): flow: in_port(0),eth(),eth_type(0x8847),mpls(lse=0x00010140) actions: pop_eth,pop_mpls(0x6558),0 # AF_PACKET SOCK_RAW on dp0: eth / mpls / eth / 4096 bytes of payload kernel BUG at include/linux/skbuff.h:2839! RIP: 0010:eth_type_trans (include/linux/etherdevice.h:635 net/ethernet/eth.c:163) Call Trace: internal_dev_recv (net/openvswitch/vport-internal_dev.c:202) openvswitch do_execute_actions (net/openvswitch/actions.c:1296) openvswitch ovs_execute_actions (net/openvswitch/actions.c:1606) openvswitch ovs_dp_process_packet (net/openvswitch/datapath.c:310) openvswitch ovs_vport_receive (net/openvswitch/vport.c:448) openvswitch internal_dev_xmit (net/openvswitch/vport-internal_dev.c:42) openvswitch dev_hard_start_xmit (include/linux/netdevice.h:5455 include/linux/netdevice.h:5464 net/core/dev.c:4057 net/core/dev.c:4073) __dev_queue_xmit (net/core/dev.c:5066) packet_sendmsg (net/packet/af_packet.c:3157 net/packet/af_packet.c:3189) Use eth_type_trans_careful(), and drop the packet if the Ethernet header can not be pulled. This covers all OVS actions at the consumer, instead of fixing each producer. Fixes: b2d0f5d5dc53 ("openvswitch: enable NSH support") Fixes: f66b53fdbb22 ("openvswitch: New MPLS actions for layer 2 tunnelling") Signed-off-by: Eric Dumazet Reviewed-by: Aaron Conole Reviewed-by: Jamal Hadi Salim Tested-by: Jamal Hadi Salim Acked-by: Alexei Starovoitov Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20261028122703.2093730-5-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 33df534198c218d985702266a95d49432166f349 Author: Eric Dumazet Date: Wed Oct 28 13:27:01 2026 +0100 net: use eth_type_trans_careful() in __dev_forward_skb2() [ Upstream commit 695e1408eb908ac7acf78069933201f92b95727c ] A tc egress BPF program can push a tiny link-layer header with bpf_skb_change_head() on an skb whose head is almost empty, then redirect it to an Ethernet device ingress. __bpf_redirect_common() only checks mac_header < network_header, and __dev_forward_skb2() crashes in eth_type_trans(): tc filter add dev lo egress pref 1 matchall action vlan pop_eth continue tc filter add dev lo egress pref 2 bpf da obj prog.o # prog: bpf_skb_change_head(skb, 1, 0); # return bpf_redirect(veth1_ifindex, BPF_F_INGRESS); # AF_PACKET SOCK_RAW on lo: eth / eth / 8192 bytes of payload kernel BUG at include/linux/skbuff.h:2839! RIP: 0010:eth_type_trans (include/linux/etherdevice.h:635 net/ethernet/eth.c:163) Call Trace: __dev_forward_skb2 (net/core/dev.c:2507) dev_forward_skb_nomtu (net/core/dev.c:2546) __dev_queue_xmit (net/core/dev.c:4738 net/core/dev.c:4998) packet_sendmsg (net/packet/af_packet.c:3157 net/packet/af_packet.c:3189) Use eth_type_trans_careful(), and drop the packet if the Ethernet header can not be pulled. This also covers other dev_forward_skb() users (veth, macvlan, ipvlan, netdevsim, l2tp_eth). Update the empty_skb BPF selftest: at lwt_xmit, BPF_PROG_TEST_RUN strips the Ethernet header, so the "veth ETH_HLEN+1" packet is a 1-byte skb. Redirecting it to veth ingress used to read the Ethernet header past skb->tail and deliver a 1-byte frame; it is now dropped with NET_RX_DROP, as veth_xmit() already does at egress. Fixes: 3a0af8fd61f9 ("bpf: BPF for lightweight tunnel infrastructure") Signed-off-by: Eric Dumazet Reviewed-by: Jamal Hadi Salim Tested-by: Jamal Hadi Salim Acked-by: Alexei Starovoitov Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20261028122703.2093730-4-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 54972be11b8f639a506bbad1cfb75958e5c042a3 Author: Eric Dumazet Date: Wed Oct 28 13:27:00 2026 +0100 loopback: use eth_type_trans_careful() [ Upstream commit 093a28998374f4007ffe67cc661f8192c1b062a9 ] tc egress actions can leave an skb with fewer than ETH_HLEN bytes in its linear part. loopback_xmit() then crashes in eth_type_trans(): tc qdisc add dev lo clsact tc filter add dev lo egress matchall action vlan pop_eth # AF_PACKET SOCK_RAW: eth / eth / 8192 bytes of payload kernel BUG at include/linux/skbuff.h:2839! RIP: 0010:eth_type_trans (include/linux/etherdevice.h:635 net/ethernet/eth.c:163) Call Trace: loopback_xmit (drivers/net/loopback.c:87) dev_hard_start_xmit (include/linux/netdevice.h:5455 include/linux/netdevice.h:5464 net/core/dev.c:4057 net/core/dev.c:4073) __dev_queue_xmit (net/core/dev.c:5066) packet_sendmsg (net/packet/af_packet.c:3157 net/packet/af_packet.c:3189) The same happens with "action ife decode" on lo egress. Use eth_type_trans_careful(), and drop the packet if the Ethernet header can not be pulled. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Vega Link: https://lore.kernel.org/netdev/20261005052249.1914367-2-weir@nebusec.ai/ Signed-off-by: Eric Dumazet Reviewed-by: Jamal Hadi Salim Tested-by: Jamal Hadi Salim Acked-by: Alexei Starovoitov Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20261028122703.2093730-3-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit e4f374877cd572cb8f5d4e2bef274e0f1e8c5c5f Author: Eric Dumazet Date: Wed Oct 28 13:26:59 2026 +0100 net: add eth_type_trans_careful() [ Upstream commit 2519a6fe7a8bba57a961eb804e43e7df35ac40fe ] eth_type_trans() assumes ETH_HLEN bytes are present in skb->head. NIC drivers always provide this, and they should keep using the fast version. Devices looping skbs from their transmit path back to their receive path get skbs built by the stack instead. Their link-layer header might have been popped by tc actions (act_vlan pop_eth, act_ife decode) or OVS actions (pop_eth + pop_mpls / pop_nsh), leaving fewer than ETH_HLEN bytes in the linear part. eth_type_trans() then hits the BUG() in __skb_pull(). Add eth_type_trans_careful(), which first pulls the Ethernet header, and returns a drop reason on failure, so that the few devices exposed to this can drop such packets. Signed-off-by: Eric Dumazet Reviewed-by: Aaron Conole Reviewed-by: Willem de Bruijn Reviewed-by: Jamal Hadi Salim Tested-by: Jamal Hadi Salim Acked-by: Alexei Starovoitov Link: https://patch.msgid.link/20261028122703.2093730-2-edumazet@kernel.org Signed-off-by: Jakub Kicinski Stable-dep-of: 093a28998374 ("loopback: use eth_type_trans_careful()") Signed-off-by: Sasha Levin commit ca5dec39bbfec68d2356bcd1e3dd5c0379c357e1 Author: Kyle Zeng Date: Wed Oct 28 16:41:01 2026 +0100 tcp: initialize mapped children before route lookup [ Upstream commit b7ff0e7a9ae3df2f123807a7e670bc348b1e1b9d ] IPv4 passive opens on a dual-stack listener go through tcp_v4_syn_recv_sock() with tcp_v6_mapped_child_init() as the optional initializer. The callback currently runs after the output route lookup. If that lookup fails, tcp_done() destroys a clone whose pinet6 and ipv6_fl_list still refer to the listener's state. With the flowlabel list head in inet_sock, fl6_free_socklist() walks the clone's list and RCU-frees its nodes without unlinking them from the live listener. Subsequent flowlabel operations can use or free the nodes again. Commit 858d2a4f67ff ("tcp: fix potential race in tcp_v6_syn_recv_sock()") moved the initializer before ehash insertion, but did not cover this error path. Invoke the existing initializer after the IPv4 fields it consumes have been set, but before route lookup can fail. It needs neither the destination nor sk_setup_caps(), and all later disposal paths remain covered. Fixes: 1c17f4373d4d ("ipv6: Move ipv6_fl_list from ipv6_pinfo to inet_sock.") Signed-off-by: Kyle Zeng Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20261028154101.2153360-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 01e02c690b6b85e807330d328592dafd04fc6c87 Author: John Johansen Date: Thu Oct 29 09:03:55 2026 -0700 apparmor: fix check SCTP bind, and connect permission checks [ Upstream commit 7a82f9a06459ff1c37b5e97b204430442cc076e3 ] SCTP mediation of bind is not being checked correctly because bind permission needs to be checked in the sctp_bind_connect() hook. Require for bind permissions when CTP_SET_PEER_PRIMARY_ADDR, and SCTP_SOCKOPT_BINDX_ADD are asked for. The peer initialized ASCONF cases (SCTP_PARAM_ADD_IP and SCTP_PARAM_SET_PRIMARY) are processed in softirq context and are not mediated atm. SCTP_PRIMATEY_ADDR, and SCTP_SET_PEER_PRIMARY_ADDR only select among address already in the association. Fixes: 56974a6fcfef ("apparmor: add base infastructure for socket mediation") Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit 92f78b000427f5705171497135fe4f0d202c0a88 Author: Kyle Zeng Date: Wed Oct 28 17:08:47 2026 +0100 tcp: avoid double destroy in tcp_abort() of an unaccepted child [ Upstream commit dbd62ad55a4c898f5a4c9edb20c0c062afb799df ] tcp_abort() checks for TCP_CLOSE while only owning the socket lock, then grabs the BH lock before calling tcp_done_with_error(). For a child still sitting in a listener accept queue (which can be reached via SOCK_DESTROY or bpf_sock_destroy()), inet_csk_listen_stop() can run in this window: it only holds the child BH lock, and calls inet_child_forget(), which disconnects, orphans and destroys the child. tcp_abort() then calls tcp_done_with_error() -> tcp_done(), which sees SOCK_DEAD and calls inet_csk_destroy_sock() a second time, leading to a double sock_put() and a use-after-free. Recheck TCP_CLOSE after acquiring the BH lock, unless we just closed a listener ourselves, in which case tcp_done_with_error() must still run to report the error. Note that the WARN_ON(sock_owned_by_user(child)) in inet_csk_listen_stop() can still trigger in this window. Fixes: bac76cf89816 ("tcp: fix forever orphan socket caused by tcp_abort") Signed-off-by: Kyle Zeng [edumazet: recheck TCP_CLOSE under the BH lock instead of moving the test, smaller diff] Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20261028160847.2170959-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 4489cb65d52e488e60b88022b25122e887e24b6f Author: Rosen Penev Date: Wed Oct 28 09:48:39 2026 -0700 net: bgmac: fix TX DMA unmapping and slot cleanup [ Upstream commit 4f45e97b3aac2282f2b436d97338c9c2c484d093 ] When mapping a fragment fails, bgmac_dma_tx_add() unwinds with the wrong slots. It passes the failed fragment's slot->dma_addr, which holds the mapping error, to dma_unmap_single() for the head. The fragment loop indexes from ring->end instead of ring->end + 1, so it unmaps the head a second time as a page and leaves the last mapped fragment mapped. None of the affected slots get their dma_addr cleared either, which includes the head slot when mapping the head fails. bgmac_dma_tx_ring_free() unmaps every slot with a non-zero dma_addr, so tearing down the ring unmaps these addresses again. It also frees the skbs of pending TX slots but leaves slot->skb and slot->dma_addr set. The slots survive a down/up cycle, and bgmac_dma_tx_add() only sets slot->skb on the last slot of a packet. If a slot with a stale pointer is later used for the head or a fragment of a scatter/gather packet, bgmac_dma_tx_free() frees the old skb a second time when that slot completes. bgmac_dma_tx_ring_free() also picks dma_unmap_single() or dma_unmap_page() by looking at slot->skb, which is set on the last slot of a packet, while the head was mapped with dma_map_single() and the fragments with skb_frag_dma_map(). In the error path, unmap the head and each mapped fragment from their own slots, and clear dma_addr on every slot the failed packet touched. In bgmac_dma_tx_ring_free(), choose the unmap function by the SOF flag of the descriptor like bgmac_dma_tx_free() does, unmap every slot before freeing any skb, since a packet can wrap around the end of the ring with its skb on the last slot, and clear both fields. This was found through code inspection by an LLM while hitting other bugs on an Asus RT-N16. It did not hit these ones specifically. Fixes: 9cde94506eac ("bgmac: implement scatter/gather support") Signed-off-by: Rosen Penev Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20261028164839.28605-1-rosenp@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b37485e08dcce6db7e78f5c90d99c512170e983f Author: Kyle Zeng Date: Wed Oct 28 18:13:50 2026 +0100 gro: do not GRO GSO packets with inconsistent payload [ Upstream commit de788d8a7032475f900c16e9cc0c1417f4f719eb ] tcp_gro_receive() excludes empty non-GSO packets with the unsigned len - 1 check, but its GSO branch only checks that gso_size matches the held packet's MSS. A trusted TCP GSO skb can reach GRO again with no payload after TC pedit increases its TCP data offset. If the skb is fully linear, skb_gro_receive() then enters its fragment transfer path with nr_frags == 0. The do-while loop copies skb_frag_t entries backwards beyond both fragment arrays. An unprivileged process using its own user and network namespaces can trigger a KASAN slab-out-of-bounds write and panic through veth, pedit and GRE. More generally, the payload of such a packet can be shrunk to any value, making it inconsistent with its gso_segs, and a GSO packet with gso_segs == 0 contributes no segment to the GRO packet. Do not aggregate GSO packets with gso_segs == 0, and require the payload of GSO packets to be consistent with gso_segs and gso_size, the last segment being allowed to be short. This rejects the empty skb before either TCP merge helper, and covers both IPv4 and IPv6. Fixes: 5eddb24901ee ("gro: add support of (hw)gro packets to gro stack") Signed-off-by: Kyle Zeng [edumazet: check payload against gso_segs, refuse gso_segs == 0] Signed-off-by: Eric Dumazet Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20261028171350.2205175-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 972281a89a906c0637a7b967653cd900fea38189 Author: Jakub Kicinski Date: Tue Oct 27 16:49:40 2026 -0700 eth: bnxt: hand XDP frags over to the copybreak skb [ Upstream commit 364b88b54fc260d22ee318bae862c2d7d8c31dc6 ] With a multi-buffer XDP program attached, a packet only has agg buffers if it filled its head buffer, which in page mode holds most of a page. The program can still move the start of the packet forward with bpf_xdp_adjust_head() and leave at most rx_copybreak bytes in the head. bnxt_rx_pkt() then copies the head into a new skb, puts the head page back on the ring, and calls bnxt_xdp_build_skb() on the copy. bnxt_xdp_build_skb() only sets nr_frags and the skb's length accounting, because it expects an skb built around the head page, sharing its shinfo with the xdp_buff. The copy ends up with nr_frags set but no frag descriptors, and the stack later reads and releases whatever its frags array happens to contain. The real frags leak. Copy the frag descriptors to the new skb in bnxt_copy_xdp(), so that bnxt_xdp_build_skb() finds the frags where it expects them. The frags now belong to the skb, and the head page goes back on the ring as before. Pointed out in LLM review of the first patch of the series. Confirmed by reading the code, the unfixed kernel was not run with the reproducer below. Tested on a BCM57504 at MTU 9000 with rx-copybreak raised to 1024 and a frags-capable XDP program moving the start of multi-buffer frames 3000B forward with bpf_xdp_adjust_head(), receiving 8000B ICMPv6 echo requests (a head and two agg buffers each). All 60k frames took the copybreak path with frags attached, the sampled skbs reached GRO with len=4998 data_len=4492 nr_frags=2, and were freed by the stack with the page pools' inflight count staying flat, no KASAN or DEBUG_PAGEALLOC splats. Fixes: 1dc4c557bfed ("bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff") Reviewed-by: Michael Chan Link: https://patch.msgid.link/20261027234940.1267225-6-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit bd56d9c36a640d7540a2313d5728c210b029255d Author: Jakub Kicinski Date: Tue Oct 27 16:49:39 2026 -0700 eth: bnxt: free XDP frags when xdp_do_redirect() fails [ Upstream commit c10f3420d59859df107838aa97b49357616d9b47 ] When xdp_do_redirect() fails bnxt_rx_xdp() recycles the head page but not the frags of a multi-buffer frame. Their agg ring slots have already been refilled, so the pages leak, and the page pool can't be destroyed until they are returned, which will never happen. Redirect to an AF_XDP socket in copy mode fails this way with -ENOMEM whenever the socket's fill ring runs out of buffers. A socket bound without XDP_USE_SG also fails with -ENOSPC for every frame that doesn't fit in a single chunk. All the other drop paths in this function free the frags. Pointed out in LLM review of the first patch of the series. Tested on a BCM57504 at MTU 9000 by redirecting 60k 8000B ICMPv6 echo requests (a head and two agg buffers each) to lo, which can't transmit XDP frames. The page pools' inflight count stayed flat rather than growing by two pages per frame. Fixes: a7559bc8c17c ("bnxt: support transmit and free of aggregation buffers") Reviewed-by: Michael Chan Link: https://patch.msgid.link/20261027234940.1267225-5-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit e83550fdb3eccad6095d70d2b07571b31475d546 Author: Jakub Kicinski Date: Tue Oct 27 16:49:38 2026 -0700 eth: bnxt: don't leak buffers when XDP agg buffer allocation fails [ Upstream commit 1b2f02fb4ba92d01603c8261c94be8d348de65b0 ] If a replacement agg buffer can't be allocated for a packet received with XDP attached, bnxt_rx_pkt() drops the packet without returning its head buffer to the ring. The head buffer leaks, and since rx_prod still advances, the device gets a BD with a stale DMA address which points at a buffer the driver no longer owns. When that BD completes the driver finds no buffer in the slot. The agg buffers consumed before the failing one have already been replaced on the agg ring, they are referenced only by the frags of the xdp_buff, which nobody frees. bnxt_xdp_buff_frags_free() would skip them since the frags flag is set only on success, so set it upfront. Pointed out in LLM review of the first patch of the series. Tested on a BCM57504 at MTU 9000 with a frags-capable XDP_PASS program, receiving 8000B ICMPv6 echo requests (a head and two agg buffers each) while page_pool_alloc_netmems() called from bnxt_rx_agg_netmems_xdp() failed half of the time (bpftrace override()). 44.7k packets were dropped, the page pools' inflight count stayed flat and there were no KASAN or DEBUG_PAGEALLOC splats. Fixes: 4c6c123c9af9 ("bnxt: adding bnxt_rx_agg_pages_xdp for aggregated xdp") Reviewed-by: Michael Chan Link: https://patch.msgid.link/20261027234940.1267225-4-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 25c6ce4d12bfc36a24d6fd9ba346eaf44acf21bc Author: Jakub Kicinski Date: Tue Oct 27 16:49:37 2026 -0700 eth: bnxt: resize Rx head buffers when rx-copybreak changes [ Upstream commit 09f10efee6f93863ea71489ce84563f4d51787f6 ] Since rx-copybreak became configurable, bnxt_set_ring_params() sizes the head buffers to fit at least rx_copybreak bytes, and the copybreak path in bnxt_copy_data() syncs rx_copybreak bytes of the head buffer. bnxt_set_tunable() however only updates bp->rx_copybreak, and nothing on the open path recalculates the ring parameters. After raising rx-copybreak the head buffers keep their old size until some other setting changes, and bnxt_copy_data() syncs past their end, into the next buffer in the page or past the end of the page: DMA-API: bnxt_en 0000:01:00.0: device driver tries to sync DMA memory it has not allocated [device address=0x00000002aa210c40] [size=1024 bytes] WARNING: kernel/dma/debug.c:1162 at check_sync+0x577/0x1eb0, CPU#22: swapper/22/0 Call Trace: debug_dma_sync_single_for_cpu+0x66/0x90 bnxt_copy_data+0x12f/0x290 bnxt_rx_pkt+0x24ea/0x50f0 __bnxt_poll_work+0x42c/0xc00 bnxt_poll_p5+0x579/0x17a0 __napi_poll+0x8b/0x2c0 net_rx_action+0x58f/0xbb0 Here the head buffers were still sized for the 640B HDS threshold, four 1kB buffers per page, while rx-copybreak was raised to 1024. Without coherent DMA or with swiotlb the oversized sync can corrupt a neighboring buffer owned by the device or by an skb. The device must be down for rx-copybreak to change, so recalculate the ring parameters right away, like bnxt_set_ringparam() does. Hit while testing patch 1, tested on BCM57504 - boot; set rx-copybreak to 1024 with the link down (CONFIG_DMA_API_DEBUG); ifup. Fixes: 152f4da05aee ("bnxt_en: add support for rx-copybreak ethtool command") Reviewed-by: Michael Chan Link: https://patch.msgid.link/20261027234940.1267225-3-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit a91d91e41021f9f3fcdea5b440eaf5a8327e638a Author: Jakub Kicinski Date: Tue Oct 27 16:49:36 2026 -0700 eth: bnxt: recycle agg buffers when Rx head buffer allocation fails [ Upstream commit db2c610df81e34d497f49b68a0a1681c3f203bdb ] bnxt_rx_pkt() tries to return the aggregation buffers of a packet to the ring when the copybreak allocation fails, but the same logic is missing on the rx_skb_func() failure path. The agg BDs consumed by the device are then never posted again. The agg ring is only refilled one-for-one as completions consume its buffers, so each such failure permanently shrinks it. Under sustained memory pressure the ring drains completely, and the queue stops receiving anything that does not fit into the head buffer, even once memory is available again. Only re-creating the rings (e.g. ifdown / ifup) recovers it. Commit 296d5b541639 ("bnxt_en: Fix aggregation buffer leak under OOM condition.") fixed the copybreak path only. Recently commit bd3beb5c8691 ("eth: bnxt: disable rx-copybreak by default") made the non-copybreak path the default, re-surfacing the issue. With XDP, the agg buffers are attached to the xdp_buff as frags by this point. Their agg ring slots have already been refilled. We need to keep the original head page (and therefore shinfo) around until the xdp_buff cleanup. Note the odd split of ownership here: rx_skb_func() only deals with the head buffer, the agg buffers stay with the caller in whatever state they are in, still on the ring without XDP, or frags of the xdp_buff with XDP. This complicates rx_skb_func() cleaning up all the buffers (head and frags), which would be more intuitive. Discovered in production, severe packet loss would persist after a transient OOM event. Tested on a BCM57504 by failing the head buffer allocations in bnxt_rx_skb() (bpftrace override() of should_failslab() and should_fail_alloc_page()) while receiving 1400B ICMPv6 echo requests. 341k packets were dropped on that queue, enough to drain its 8188 entry agg ring 40 times over, and the queue kept receiving large frames afterwards with no loss and no new HW drops. With a frags-capable XDP_PASS program at MTU 9000, receiving 8000B ICMPv6 echo requests while napi_build_skb() called from bnxt_rx_multi_page_skb() failed, 9.2k packets were dropped, the page pools' inflight count stayed flat and there were no KASAN or DEBUG_PAGEALLOC splats. Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.") Fixes: 4c6c123c9af9 ("bnxt: adding bnxt_rx_agg_pages_xdp for aggregated xdp") Reviewed-by: Michael Chan Link: https://patch.msgid.link/20261027234940.1267225-2-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 85780eacecdbe095c1ba4f3659d2cdfcc69d5ca9 Author: Naman Gulati Date: Mon Oct 26 22:13:06 2026 +0000 netdev-genl: ignore NETDEV_UNREGISTER rebroadcasts [ Upstream commit fd0909e963ed8f36967bd072ed484be7babe46de ] netdev_wait_allrefs_any() re-sends NETDEV_UNREGISTER every second while it waits for the last references on a device to be dropped. By then netdev_run_todo() has already marked the device NETREG_UNREGISTERED and RTNL has been dropped at least once since the initial notification sent by unregister_netdevice_many_notify(). netdev_genl_netdevice_event() does not tell these rebroadcasts apart from the initial notification and sends a NETDEV_CMD_DEV_DEL_NTF multicast for each of them. At best this spams NETDEV_NLGRP_MGMT listeners with duplicate notifications; at worst the pernet state of the netns the device belongs to is already gone and the handler dereferences a NULL pointer. default_device_exit_batch() only unregisters the devices still listed in the exiting netns; it does not wait for in-flight unregistrations of devices that were already unlisted (the barrier doing that was removed by commit 8a4fc54b07d7 ("net: get rid of rtnl_lock_unregistering()")). So when a device is unregistered by something other than the cleanup_net() of its own netns while references on it are still held, e.g. a veth whose peer in another netns gets deleted, and that netns exits while the device is stuck in netdev_wait_allrefs_any(), the remaining pernet exit handlers run and genl_pernet_exit() sets net->genl_sock to NULL. The next rebroadcast then crashes in genl_has_listeners(): BUG: KASAN: null-ptr-deref in netlink_has_listeners+0x3d/0x3f0 net/netlink/af_netlink.c:1388 Read of size 8 at addr 0000000000000578 by task syz.0.0/5325 Call Trace: netlink_has_listeners+0x3d/0x3f0 net/netlink/af_netlink.c:1388 genl_has_listeners include/net/genetlink.h:644 [inline] netdev_genl_dev_notify+0x161/0x450 net/core/netdev-genl.c:93 netdev_genl_netdevice_event+0x98/0x3c0 net/core/netdev-genl.c:1491 notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 netdev_wait_allrefs_any net/core/dev.c:11690 [inline] netdev_run_todo+0x731/0x1060 net/core/dev.c:11808 rtnl_unlock net/core/rtnetlink.c:157 [inline] rtnl_dellink+0x68f/0x810 net/core/rtnetlink.c:3707 syzbot hit this by moving one end of a veth pair into a short-lived netns while netdevsim's deferred FIB event processing still held a reference on it, and then deleting the other end (repro [1]). While the source of this bug is netdevsim deferring FIB processing for and holding onto the device reference for O(seconds) which is being fixed separately [2], any driver may introduce such a delay and trigger the null-ptr-deref. Skip the rebroadcasts, which are the only NETDEV_UNREGISTER events delivered with reg_state == NETREG_UNREGISTERED. The notifications sent by unregister_netdevice_many_notify() and, for a device leaving a netns, by __dev_change_net_namespace() are issued under RTNL in the same critical section that unlists the device, before its netns can be torn down, and keep being handled. This mirrors what ip6_route_dev_notify() already does to cope with the rebroadcasts. This change should not break the UAPI spec as it defines dev-del-ntf as a "Notification about device disappearing." which is a single event. The rebroadcast in netdev_wait_allrefs_any() exists to re-kick in-kernel subsystems holding references; netdev-genl happens to be on the notifier chain and forwards it. [1] https://gist.github.com/NamanGulati/2d1b49b8757f9a88b0bd6e55018c02ae [2] https://lore.kernel.org/r/20261023191517.607834-1-kuniyu@google.com Fixes: d3d854fd6a1d ("netdev-genl: create a simple family for netdev stuff") Reported-by: syzbot+1269fe6cc2016008124e@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6adf9f64.6200f071.51519.0ed1.GAE@google.com/ Reviewed-by: Kuniyuki Iwashima Signed-off-by: Naman Gulati Link: https://patch.msgid.link/20261026221306.3151025-1-namangulati@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 250e001cc4bf5f8ca3bdfa028454db16813cf3aa Author: Jérémy Jean Date: Fri Sep 25 20:54:48 2026 +0000 apparmor: check connect permission for SCTP [ Upstream commit 2f764c08bb191a8c8f4051926dba0d25d195f39b ] SCTP can start an association through sendmsg() or CONNECTX. These paths call the SCTP-specific sctp_bind_connect hook instead of the normal socket connect hook, but AppArmor does not register it. As a result, a profile can deny connect and allow send or setopt, yet a task can still create an SCTP association. Register the SCTP hook. Ask for connect permission when SENDMSG_CONNECT or CONNECTX creates an association. Fixes: 56974a6fcfef ("apparmor: add base infastructure for socket mediation") Assisted-by: LLM Signed-off-by: Jérémy Jean Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit f371a726a8e9e003f962b6c1a3d09ef3b2d1a866 Author: Wentao Liang Date: Thu Sep 17 16:43:02 2026 +0000 apparmor: Fix namespace reference leak in __aa_find_or_create_ns() [ Upstream commit 8f1f7f664c1822af34c5465f9820b4e39146786b ] When the namespace already exists, the reference taken by aa_get_ns() is overwritten with ERR_PTR(-EEXIST) without being released. The caller in apparmorfs.c clears ns on IS_ERR() and so cannot drop it either, leaking the reference on raced mkdir of an existing namespace. Release the reference before returning -EEXIST. Fixes: 73688d1ed0b8 ("apparmor: refactor prepare_ns() and make usable from different views") Signed-off-by: Wentao Liang Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit 920e782ca7c6026865200d7901e1459ee5915aa5 Author: Maxime Bélair Date: Tue Sep 1 16:07:15 2026 +0200 apparmor: convert duplicated dfa transitions to match_char() [ Upstream commit e667fc72f7f4a54674962c324048ca2cc58bc703 ] For historical reasons several matchers duplicate the dfa character transition instead of using match_char(). This is because aa_dfa_match_until() and aa_dfa_matchn_until() were written on a branch that did not yet have match_char(), and copied code from aa_dfa_match(). leftmatch_fb() used the same pattern. When match_char() added support for diff-encoded states, the change was never ported to these copies. match_char() resolves a diff encoded state by using def[state] and retrying the same character, until it reaches a state with a valid transition. The copies instead do a simple `state = def[state];` after the character is consumed, so on a diff encoded state one byte is dropped and the walk continues from the diff parent in the wrong state. This makes an unnamed px/Px/cx/Cx transition resolve to no profile, and exec fails with apparmor="DENIED" operation="exec" info="profile transition not found" Convert the three copies to match_char(). For a dfa with no diff encoded state this is a no-op. This bug is latent until the kernel advertises policy/diff-encode. Closes: https://gitlab.com/apparmor/apparmor/-/work_items/663 Fixes: 21f606610502 ("apparmor: improve overlapping domain attachment resolution") Fixes: 031dcc8f4e84f ("apparmor: dfa add support for state differential encoding") Signed-off-by: Maxime Bélair Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit 3b2d73aa4c0228b232af7950f2d0cc32b9b8b81a Author: Maxime Bélair Date: Thu Sep 3 09:25:51 2026 +0200 apparmor: fix table_size() integer overflow on 32 bit [ Upstream commit 449195a4bb7d9c456c02b871eec6905edb449bd2 ] table_size() checks ALIGN(sizeof(struct table_header) + len * el_size, 8) in size_t, where @len is td_lolen, a u32 user-provided value from the policy blob. On 32 bit kernels both operations can overflow. Triggering this bug allows to: - overflow a 16 byte allocation with up to 4GiB of policy data - store the table header at address ZERO_SIZE_PTR (kvzalloc(0)) However, this bug requires CAP_MAC_ADMIN, only affects 32 bit kernels, and the copy runs until the machine is destroyed, so it gives no controllable primitive and is therefore not a security issue. Compute the size with the checked helpers and return 0 when the result is not representable, so the callers can reject the table. A valid table is never 0 bytes, the header alone is 12. 64 bit kernels cannot overflow (these structs are 32 bit), and are hence not affected. Fixes: e06f75a6a2b4 ("AppArmor: dfa match engine") Signed-off-by: Maxime Bélair Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit 8a983154635ef75c6a548d399ece4d3071eaf87b Author: Christoph Hellwig Date: Thu Oct 29 16:03:35 2026 +0100 zloop: check that the zone backing file support ->{read,write}_iter [ Upstream commit 0c10f8a1a7ae1502ea4ea7e13f222df89c28adf4 ] I/O to backing files requires support for iter based read/write, so check for that upfront instead of dereferencing a NULL pointer later. Fixes: eb0570c7df23 ("block: new zoned loop block device driver") Reported-by: Josef Bacik Signed-off-by: Christoph Hellwig Link: https://patch.msgid.link/20261029150353.2503201-5-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 6369ee8c5c4dc0a5b3823204b9b39b17e5af003b Author: Christoph Hellwig Date: Thu Oct 29 16:03:34 2026 +0100 zloop: fput file after failed zone init [ Upstream commit 134ffb0755626c91af82fc7debc8b6f75f1f777e ] Clean up after failure in zloop_init_zone, as the caller only cleans up the zones before the current one. Fixes: eb0570c7df23 ("block: new zoned loop block device driver") Signed-off-by: Christoph Hellwig Link: https://patch.msgid.link/20261029150353.2503201-4-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit acbdd31ca338227b150d5c1979e037a19f263c62 Author: Christoph Hellwig Date: Thu Oct 29 16:03:33 2026 +0100 zloop: share more code for opening a zone backing file [ Upstream commit 5e9929e2f03c79574e76605e1a82509575db2d30 ] Use a common path for opening and querying the block size. Signed-off-by: Christoph Hellwig Link: https://patch.msgid.link/20261029150353.2503201-3-hch@lst.de Signed-off-by: Jens Axboe Stable-dep-of: 134ffb075562 ("zloop: fput file after failed zone init") Signed-off-by: Sasha Levin commit b0706ec669aa5079faa9dc16d2fcd53bc388cab9 Author: Christoph Hellwig Date: Thu Oct 29 16:03:32 2026 +0100 zloop: remove a duplicate call to zloop_get_block_size [ Upstream commit 0835f4909553e78a97d1ac59ed6eb776b4f78c92 ] The sequential zone path has two calls to zloop_get_block_size, one conditional on not having a block size, and one unconditionally. Remove the latter as the block size only needs to be queried once. Fixes: eb0570c7df23 ("block: new zoned loop block device driver") Signed-off-by: Christoph Hellwig Link: https://patch.msgid.link/20261029150353.2503201-2-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 34d4411c7dce7c79a174c800aed24d3b800dd7b9 Author: Maxime Bélair Date: Wed Aug 19 10:00:19 2026 +0100 apparmor: report a label allocation failure as -ENOMEM [ Upstream commit 07aee062c6ecaa7199be583c83a1c74ae9885f03 ] aa_label_strn_parse() returns -ENOENT for every failure, so a caller cannot tell "no such profile" from "could not allocate a label". Report an allocation failure as -ENOMEM. Fixes: f1bd904175e8 ("apparmor: add the base fns() for domain labels") Signed-off-by: Maxime Bélair Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit 7a2962d20612a834e45d8a8bde5b36abb8e93aeb Author: Maxime Bélair Date: Wed Aug 19 14:19:44 2026 +0100 apparmor: fix a leak on a rejected string table entry [ Upstream commit f7bd6285ffeb425793334f6d48ccb5035cab2fa7 ] unpack_strs_table() stores each entry into the table only after validating it, so an entry the validation rejects is never freed. Up to 64KB leaks per rejected entry. Store the pointer before validating it. Fixes: c140dcd1246b ("apparmor: make str table more generic and be able to have multiple entries") Reviewed-by: Ryan Lee Signed-off-by: Maxime Bélair Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit fd51e06e345d1bdafcfb6d08c6b9eea6e0b66784 Author: John Johansen Date: Tue Oct 20 12:23:13 2026 -0700 apparmor: remove unconfined_profile() check in inet socket mediation [ Upstream commit 1f5428b9f9bfb9dab6828015a5254dcd7c582a01 ] When a stacked label is used the early bailout !unconfined(label) fails, and the individual profile components of the label are checked. This can lead to aa_profile_af_perm() being called which results in WARNING: security/apparmor/net.c:263 at aa_profile_af_perm+0x228/0x3b0 on any inet socket using basic socket mediation. Remove the AA_BUG(profile_unconfined(profile)) check, it is not needed as the code already handles the unconfined_profile() case. In addition also a comment to indicate that this case is covered. Fixes: 89ac6aa752ec ("apparmor: push inet mediation into profile callbacks, and improve auditing") Reported-by: Georgia Garcia Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit 95532969b057e235b30b4b9624d646677a9161f4 Author: Michail Andreas Michalopoulos Date: Tue Oct 20 16:00:30 2026 +0200 apparmor: check address length before reading AF_UNSPEC bind address [ Upstream commit 4890a8b1a9df880dd188adb8b8e8fab107ad69d9 ] bind_map_addr() handles AF_UNSPEC on an IPv4 socket by reading addr4->sin_addr.s_addr to check for INADDR_ANY. At that point the only length check done is addrlen >= offsetofend(struct sockaddr, sa_family), i.e. 2 bytes, while sin_addr sits at offset 4. move_addr_to_kernel() copies only addrlen bytes into the on-stack sockaddr_storage, so a bind() with a short AF_UNSPEC address makes AppArmor branch on bytes the caller never supplied. Depending on those bytes, a confined task gets -EAFNOSUPPORT instead of the -EINVAL that inet_bind_sk() returns for the same request. Kernels built with CONFIG_INIT_STACK_ALL_ZERO read zeroes and happen to behave correctly. Check the length first, as inet_bind_sk() does, and as the AF_INET6 case above already does for inet6_bind_sk(). Fixes: 89ac6aa752ec ("apparmor: push inet mediation into profile callbacks, and improve auditing") Assisted-by: LLM Signed-off-by: Michail Andreas Michalopoulos Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit 6bac94125c0b9471f46a18be21916d6d4a5bcd60 Author: shaos Date: Tue Oct 20 00:12:56 2026 +0000 apparmor: mediate AF_UNSPEC socket disconnects [ Upstream commit 049760746597cfd054c181fe850531be3c1e7358 ] aa_inet_connect_perm() returns success immediately for AF_UNSPEC before checking the active AppArmor profile. AF_UNSPEC is the socket disconnect operation for TCP and UDP. A process confined by a profile containing deny network can therefore disconnect inherited sockets even though ordinary socket creation and connect calls are denied. console output: https://gist.githubusercontent.com/shaos26/73b057c77b9ea22d5e6813c259dbf43c/raw/fab5c58d6f184f5fab88a3a31a80c2b919efecf0/console-output.txt reproduction kernel config: https://gist.githubusercontent.com/shaos26/73b057c77b9ea22d5e6813c259dbf43c/raw/b9192c97c92fdd3b59089704bad6fbd0a33ccf06/kernel-config.txt reproducer: https://gist.githubusercontent.com/shaos26/73b057c77b9ea22d5e6813c259dbf43c/raw/92c7dd098a227276fe3daeea45996e2848e66439/poc.c Build the kernel from HEAD with the attached reproduction config, then make a one-file initramfs. The PoC mounts sysfs and securityfs itself; DEVTMPFS_MOUNT supplies /dev/console. mkdir -p build rootfs cp kernel-config.txt build/.config make O=build olddefconfig make O=build -j"$(nproc)" bzImage cc -O2 -static -Wall -Wextra -o poc poc.c cp poc rootfs/poc (cd rootfs && find poc | cpio -o -H newc --owner=0:0) | gzip -9 > initramfs.cpio.gz timeout 900 qemu-system-x86_64 -kernel build/arch/x86/boot/bzImage \ -initrd initramfs.cpio.gz -append "console=ttyS0 rdinit=/poc panic=-1 loglevel=7 lsm=apparmor security=apparmor apparmor=1" \ -nographic -m 1024 -smp 1 -no-reboot 2>&1 | tee console.log Under the deny-network profile, socket() and connect(AF_INET) returned EACCES, but connect(fd, AF_UNSPEC) returned success and tore down the inherited connection and listener. Two fresh boots matched. A one-line control that routed AF_UNSPEC through aa_sk_perm returned EACCES and kept both sockets alive. Impact and prerequisites: A confined process that inherits a TCP/UDP socket can bypass the profile's network mediation for disconnect and disrupt that socket. The finding does not permit socket creation, bind, or arbitrary peer connections; no privilege escalation is demonstrated. Fixes: 89ac6aa752ec8 ("apparmor: push inet mediation into profile callbacks, and improve auditing") Signed-off-by: shaos Signed-off-by: John Johansen Signed-off-by: Sasha Levin commit d9af0b56bb2d3e5fa532f006b79b6b18aa283667 Author: Jamie Nguyen Date: Tue Oct 27 09:29:45 2026 -0700 selftests: net: txtimestamp: fix out-of-bounds read in raw UDP checksum [ Upstream commit 8daacee78b3d2798fcf92398b6dff364eab64466 ] With -r (SOCK_RAW, IPPROTO_UDP) the test writes only the UDP header and payload, and the kernel adds the IP header. get_udp_csum() still expects the IP source and destination addresses to directly precede the UDP header, and reads 2 * alen bytes before the start of the buffer: 8 bytes for IPv4, 32 bytes for IPv6. ASan reports a heap-buffer-overflow for both -4 -r and -6 -r. Without ASan the read usually goes unnoticed, but it faults when the buffer is the first chunk in the heap. That happens on Ubuntu 26.04, where the kselftest runner wraps the test in uutils stdbuf, and txtimestamp.sh fails with SIGSEGV on every run. Even without a crash, -r packets were sent with a checksum computed over unrelated heap memory, so their UDP checksum was invalid. Build the pseudo-header from the destination address and checksum only the UDP header and payload. -R and -P already write daddr as both the source and destination address, so their checksums are unchanged. With -r the kernel selects the source address, which equals daddr for the loopback addresses used by txtimestamp.sh. Fixes: b52354aa068e ("selftests: expand txtimestamp with ipv6 dgram + raw and pf_packet") Signed-off-by: Jamie Nguyen Reviewed-by: Willem de Bruijn Reviewed-by: Hangbin Liu Link: https://patch.msgid.link/20261027162945.2122306-1-jamien@nvidia.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit da227c9773756e829388a1740f311d2f2d8b0ede Author: Kunhai Dai Date: Mon Oct 19 08:54:12 2026 -0400 blk-iocost: publish hweights as one atomic value [ Upstream commit 0150554a3f38e1850d5964102eb89a720c5fe789 ] current_hweight() publishes the cache generation and both weights with separate stores. Refreshers running on different CPUs can interleave their stores and leave a new generation paired with weights from an older calculation. The compiler can also reorder the generation store before the weight stores, so a reader that sees the new generation can accept stale weights. A stale weight is not only a reporting artifact. It feeds the cost calculation and the donation logic, where an inconsistent combination can lead to a zero divisor in transfer_surpluses(). In addition, the slow path rereads iocg->hweight_active/inuse after publishing them, so the value it returns can be the one written by another refresher instead of the locally computed one. Pack the generation and both weights into a single atomic64_t and publish them with one atomic write. Readers take one atomic snapshot and return the local values. Weights are in [1, WEIGHT_ONE]; storing each minus one preserves the full range in 16 bits and leaves 32 bits for the generation. The two weight fields remain as the donation workspace used under ioc->lock. Tracepoints decode the packed cache without refreshing it and iocost_monitor.py is updated accordingly. Developed with assistance from Claude Code (Anthropic): the assistant drafted the packed representation, the helpers and the tracepoint/monitor changes, and ran the checks listed below. The author reviewed the result and remains responsible for it. Fixes: 7caa47151ab2 ("blkcg: implement blk-iocost") Signed-off-by: Kunhai Dai Tested-by: Tao Cui Reviewed-by: Tao Cui Acked-by: Tejun Heo Link: https://patch.msgid.link/20261019125412.3123895-3-daikunhai@didiglobal.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 0fcec36fc1a28ebb29a524088e472605ca224840 Author: Chris Mason Date: Wed Oct 28 10:41:43 2026 -0600 rnbd-srv: publish the sess_dev at the end of OPEN [ Upstream commit 08ebf69c78a02afb39b7728f3358c09bc4cf067d ] rnbd_sess_dev_alloc() stores the empty sess_dev in the XArray as its first step. An IO message with the new ID from another connection can find it before bdev_file is set, or hold a reference while a failing OPEN frees it after a mere RCU grace period. Both are reachable from any host that can open a device. Reserve the ID with a NULL entry and store the sess_dev once nothing can fail anymore. The error path still erases the ID, and no longer needs synchronize_rcu(). Fixes: 2de6c8de192b ("block/rnbd: server: main functionality") Cc: "Md. Haris Iqbal" Cc: Jack Wang Signed-off-by: Chris Mason Link: https://patch.msgid.link/20261028164415.1262013-41-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit ccae722c4bc716df8a4cdde462071d034f92f32d Author: Chris Mason Date: Wed Oct 28 10:41:42 2026 -0600 rnbd-srv: fix use-after-free on two CLOSE messages [ Upstream commit 4912dab88baa5f7034dc9e38807804d470ae5438 ] process_msg_close() looks the sess_dev up with a kref, drops it right away, and only then takes the session mutex for the teardown. A session has several connections handled by different workers, so two CLOSE messages for the same ID both finish the lookup before either one tears the sess_dev down, and the second one works on freed memory. Any host that can open a device on the server can do that. Take the mutex first and look the ID up with xa_load() under it. The second CLOSE then finds nothing. Fixes: 2de6c8de192b ("block/rnbd: server: main functionality") Cc: "Md. Haris Iqbal" Cc: Jack Wang Signed-off-by: Chris Mason Link: https://patch.msgid.link/20261028164415.1262013-40-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit fe6edac8f026c17b2ccf378de9ed77f2eebb86c6 Author: Josef Bacik Date: Wed Oct 28 10:41:20 2026 -0600 block/rnbd-srv: drop the sess_dev kobject unlocked [ Upstream commit 81941915d53ef3384ab4e4b68e92673e66cf66d7 ] rnbd_srv_create_dev_session_sysfs() drops the kobject reference when it fails. The release function is rnbd_destroy_sess_dev(), which takes srv_dev->lock, and the caller holds that lock: the worker deadlocks on itself. A client opening one device as "ram0" and "./ram0" gets there through -EEXIST from kobject_add(). Have process_msg_open() drop the reference after releasing the lock, and leave the rest of the cleanup to the release function. Fixes: 8cee532f469b ("block/rnbd: server: sysfs interface functions") Fixes: d3a95ccaaf4d ("block/rnbd: call kobject_put in the failure path") Cc: "Md. Haris Iqbal" Cc: Jack Wang Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-18-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit f000dff3584a5f79ab8006fd019618f01c4d4918 Author: Josef Bacik Date: Wed Oct 28 10:41:19 2026 -0600 block/rnbd-srv: don't free the device on a sysfs error [ Upstream commit d9667ade40f986c565769a900ced6ee95edd33c6 ] rnbd_srv_create_dev_sysfs() drops the only kobject reference on its error paths, and the release function frees the rnbd_srv_dev. process_msg_open() keeps using it and ends in destroy_device() with a list_del() and a second kfree(). This doesn't need memory pressure: a client opening a device while its last mapping goes away gets -EEXIST from kobject_add() against the old directory. Only undo kobject_add() on failure and leave the reference to destroy_device(). Initialise the kobject once, the next open retries. Fixes: 8cee532f469b ("block/rnbd: server: sysfs interface functions") Fixes: d3a95ccaaf4d ("block/rnbd: call kobject_put in the failure path") Cc: "Md. Haris Iqbal" Cc: Jack Wang Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-17-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 7bffd0c804ff390cf8f7f4edc22511d55d4bf60f Author: Josef Bacik Date: Wed Oct 28 10:41:17 2026 -0600 drbd: take req_lock to skip the initial sync as peer [ Upstream commit bf7fff620c890a7ee0b444f1c7e9f0d1263a30ac ] _drbd_set_state() must be called with req_lock held. drbd_adm_new_c_uuid() does, receive_uuids() on the peer doesn't, so a concurrent state change gets lost: the device is Secondary again, or its failed disk UpToDate, while the work for the lost change is already queued. Fixes: b411b3637fa7 ("The DRBD driver") Cc: Philipp Reisner Cc: Lars Ellenberg Cc: "Christoph Böhmwalder" Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-15-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 041733a0e5892f2bc5adced60c212d1fdc3ff503 Author: Josef Bacik Date: Wed Oct 28 10:41:15 2026 -0600 drbd: stop the start_resync timer of a dying device [ Upstream commit a439d3fe3ec2bfe0b4ccb77973ae97949bcf46ec ] start_resync_timer gets armed for up to a second and nothing ever deletes it, so drbd_destroy_device() can free the device with the timer pending. Shut it down where request_timer is shut down. Fixes: 370a43e7982d ("drbd: Work on the Ahead -> SyncSource transition") Cc: Philipp Reisner Cc: Lars Ellenberg Cc: "Christoph Böhmwalder" Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-13-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit cc8ffeaa80e603d56badc6e2a290c4fce5fccac9 Author: Josef Bacik Date: Wed Oct 28 10:41:47 2026 -0600 block: apply the segment size to the integrity buffer [ Upstream commit 26edfdee11eb2afe08fb5f874edcdf0786d6b66c ] The integrity buffer is a single segment and must not exceed max_segment_size. max_integrity_io_size() applies that limit to the data size instead, which is off by a factor of 64 for 8 bytes of PI per 512 bytes of data. A SCSI host that doesn't set a maximum segment size gets 64KiB, lpfc and qla2xxx among them, so a DIX disk behind one of those does no IO above 64KiB. Limit the buffer and derive the data size from that, which makes it 4MiB for that case. Fixes: ec7f31b2a2d3 ("block: make bio auto-integrity deadlock safe") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-45-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit ef9cac5ed4c982ac2f9983de6f1d25b391a8ae19 Author: Josef Bacik Date: Wed Oct 28 10:41:46 2026 -0600 blk-mq: free the bitmaps of tags in the SRCU callback [ Upstream commit 10b249e9b05eed0c4c65b9b89dfc2cf33d68d19a ] Commit ad0d05dbddc1 keeps struct blk_mq_tags and the requests until the iterators under tags_srcu are gone, but the two bitmaps they walk are still freed right away. When the number of hardware queues shrinks, blk_mq_tagset_busy_iter() may be about to walk tags that __blk_mq_update_nr_hw_queues() frees. sbitmap_free() clears the map pointer, so that's a NULL dereference or a use-after-free, depending on the timing. Free the bitmaps with the rest in the callback. Fixes: ad0d05dbddc1 ("blk-mq: Defer freeing of tags page_list to SRCU callback") Signed-off-by: Josef Bacik Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20261028164415.1262013-44-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 19ffd201c2622363a30be5e2535520b1c80647fa Author: Josef Bacik Date: Wed Oct 28 10:41:45 2026 -0600 block: partitions/mac: compute the sectors in 64 bits [ Upstream commit 6c55f94317249bc195e197f6a8730c843e72ea8c ] start_block and block_count are converted to 512 byte sectors in 32-bit arithmetic, although put_partition() takes a sector_t. With a block size above 512 bytes anything beyond 2TiB wraps and the partition lands on top of another one. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-43-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 515e211124113b4faecf3b0cb20087965286ee0c Author: Josef Bacik Date: Wed Oct 28 10:41:41 2026 -0600 blk-mq: set up a queue under tag_list_lock [ Upstream commit 4fcc499ea9bc31b02393904a1903e794d146f5f7 ] blk_mq_init_allocated_queue() only takes tag_list_lock at the end, when it adds the queue to the set. Before that it sizes the queue by set->nr_hw_queues, hands out set->tags[], maps by set->map[], and blk_mq_map_swqueue() frees tags of the set. An update clearing the maps at that time makes the new queue free tags that all the other queues share. An NVMe controller reset during a namespace scan does exactly that. Take the lock before the first look at the set. An update can be part of error handling, so the allocations under the lock must not wait for IO: memalloc_noio_save(), as in add_disk_fwnode(). Fixes: 868f2f0b7206 ("blk-mq: dynamic h/w context count") Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-39-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit b11079315bcbe2bd947e5e819e5f5c03451afc61 Author: Josef Bacik Date: Wed Oct 28 10:41:40 2026 -0600 blk-mq: exit the hctxs of a queue under tag_list_lock [ Upstream commit 89a2381482d8ff8e4fe0b7d32797bb4f77503b89 ] blk_mq_update_nr_hw_queues() exits and replaces the hctxs of every queue on set->tag_list under tag_list_lock. blk_mq_exit_queue() exits its hctxs without the lock and only then takes the queue off the list, so an update running at the same time exits them again and sets up new ones that nobody exits. del_gendisk() is kept away by update_nr_hwq_lock, disk_release() of a never added disk and blk_mq_destroy_queue() are not, and nvme_alloc_ns() drops such a disk when it finds the queues frozen by a reset. Hold tag_list_lock for both steps. Fixes: 630ef623ed26 ("blk-mq: Swap two calls in blk_mq_exit_queue()") Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-38-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit d5b692b20b48c5197ae43f8090d75b4a6df08779 Author: Josef Bacik Date: Wed Oct 28 10:41:39 2026 -0600 blk-mq: quiesce a queue that joins a quiesced tag set [ Upstream commit 71ec3c7d6db80737b781d2739d1325b7e39758e1 ] blk_mq_quiesce_tagset() only quiesces the queues on the list at that moment. A queue added before blk_mq_unquiesce_tagset() runs unquiesced, and then gets unquiesced without ever having been quiesced, which trips the warning in blk_mq_unquiesce_queue(). NVMe gets there when a controller fails while its namespaces are being scanned. Count the quiesce calls in the tag set and quiesce a joining queue that many times, under a spinlock that also serializes the two functions. It can't be tag_list_lock, see commit 59e25ef2b413. Fixes: 414dd48e882c ("blk-mq: add tagset quiesce interface") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-37-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit b1ea5bc61ba3012298ec0b90c160ea22abcf092e Author: Josef Bacik Date: Wed Oct 28 10:41:35 2026 -0600 blk-mq-dma: initialize the dma state for P2P, too [ Upstream commit 035236c9e135a2ce7d0f68cb56e63d4a3da2abe1 ] blk_rq_dma_map_iter_start() promises that the caller need not initialize the dma_iova_state, but the P2P bus address path returns before it does so. The state then holds what the last request with that tag left, and blk_rq_dma_map_coalesce() describes a transfer as one IOVA range that it isn't. Clear it on that path too. Fixes: 858299dc6160 ("block: add scatterlist-less DMA mapping helpers") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-33-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit a69cc72c747a030516b44f2bdd0d4f3fa5706636 Author: Josef Bacik Date: Wed Oct 28 10:41:34 2026 -0600 blk-mq: don't forget a timer the driver has restarted [ Upstream commit 0db9f8968a8941d4fc9fddf220d4983d9b68deaf ] If ->timeout() returns BLK_EH_RESET_TIMER, blk_add_timer() gives the request a new deadline that blk_mq_timeout_work() doesn't know about when it picks the next expiry. A 2s nbd read next to a 60s one expires once and then not again for a minute. Let the new deadline take part. Fixes: 320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism") Signed-off-by: Josef Bacik Link: https://patch.msgid.link/20261028164415.1262013-32-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 47947572ad14c01872b60e91084954e0b0ebcadb Author: Josef Bacik Date: Wed Oct 28 10:41:33 2026 -0600 blk-mq: don't bring back flags of a completed request [ Upstream commit 9531230ee1fcb8eca2c9cbb9bf02651cbf798842 ] The timeout handler sets and clears RQF_TIMED_OUT in a request it only holds a reference to, with a plain read-modify-write, while the completion clears flags in rq_flags the same way. If the two interleave, blk_mq_finish_request() runs twice with the flags back: the zone write plug reference is dropped twice and the scheduler's ->finish_request() is called again. Change RQF_TIMED_OUT with cmpxchg, so the handler never writes back a flag that changed under it. Fixes: e5c0ca13659e ("blk-mq: release scheduler resource when request completes") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-31-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit e36706f3e33c516e599278e5572649097ffde50c Author: Josef Bacik Date: Wed Oct 28 10:41:32 2026 -0600 blk-mq: keep sharing tags fairly after a queue update [ Upstream commit 620cfc7a664278a55d068ed88fff1242fddc4ef2 ] A hctx only gets BLK_MQ_F_TAG_QUEUE_SHARED from blk_mq_add_queue_tag_set(). The hctxs blk_mq_update_nr_hw_queues() allocates for queues that joined long ago never get it, so they aren't counted in active_queues and hctx_may_queue() lets them take all the tags. One NVMe namespace can starve the others after the first update. Set the flag on the new hctxs. Fixes: 868f2f0b7206 ("blk-mq: dynamic h/w context count") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-30-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit f6d85fc206d58ac6d91e73e865329124ba57be60 Author: Josef Bacik Date: Wed Oct 28 10:41:30 2026 -0600 blk-mq: don't trust the cookie in blk_mq_poll() [ Upstream commit 24974185999fd80b676fbe2a6c7a97bbd38aaf3a ] blk_mq_poll() indexes queue_hw_ctx[] with bio->bi_cookie unchecked. Zone write plugging keeps the segment count of a plugged write in __bi_nr_segments, which shares a union with the cookie, and clears REQ_POLLED, but bio_poll() only looks at the cookie. A plugged polled write with more segments than there are hardware queues reads past the array. The bio is also SLAB_TYPESAFE_BY_RCU, so a cookie from a bio reused for another device can meet the wrong array as well. Ignore a cookie that is out of range or doesn't name a poll queue. Fixes: 3e08773c3841 ("block: switch polling to be bio based") Fixes: dd291d77cc90 ("block: Introduce zone write plugging") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-28-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 204a406cd53537cb89a75582c3264c471e842577 Author: Josef Bacik Date: Wed Oct 28 10:41:08 2026 -0600 block: don't lose the status of a failed flush request [ Upstream commit 67c43ceaa29e9b904216651697adf20445b219fc ] flush_end_io() stores the status in fq->rq_status for whoever drops the last reference to finish the flush sequence. blk_mq_put_rq_ref() calls it with BLK_STS_OK from tag iterators and the timeout handler and overwrites an error the real completion stored. With two extra references, reading /sys/block//inflight is enough for that, a failed flush completes everything waiting on it with success and fsync() lies to the application. Only store a status that is an error. Fixes: 2e315dc07df0 ("blk-mq: grab rq->refcount before calling ->fn in blk_mq_tagset_busy_iter") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-6-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 86a3554597ca63d77dd75713c409c815e2ef0eb2 Author: Josef Bacik Date: Wed Oct 28 10:41:07 2026 -0600 block: fix use-after-free of the disk in sync_bdevs() [ Upstream commit cebb1c2331c2af1b7f1c822ac672a7f77b54bd90 ] sync_bdevs() holds a reference to the bdev inode while it takes bd_disk->open_mutex. For a partition the inode doesn't keep the gendisk alive, the device reference does: part_release() drops the disk as soon as the last reference to the partition device is gone. A sync(2) racing with the last close of a partition of an already deleted disk locks a freed open_mutex. Take a device reference before touching the disk, like blkdev_get_no_open() does, and skip the bdev if it's on its way out. Fixes: a8698707a183 ("block: move bd_mutex to struct gendisk") Signed-off-by: Josef Bacik Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/20261028164415.1262013-5-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 49b4791b48c1240084eb137ca2a2ea18de128461 Author: Josef Bacik Date: Sun Oct 4 13:54:57 2026 +0000 namei: don't assert S_ISDIR on a stale rcu-walk inode [ Upstream commit e227cdac03dffa896e02ed7260f9149c4c382715 ] lookup_inode_permission_may_exec() asserts that it is only ever handed a directory, on the grounds that link_path_walk() has already checked d_can_lookup(). In rcu-walk that does not follow. step_into() samples ->d_inode and validates it against ->d_seq, but link_path_walk() loads ->d_flags again afterwards, and nothing orders that load against changes of the dentry: CPU0 (rcu-walk of "x/y") CPU1 step_into(x) inode = x->d_inode // regular file read_seqcount_retry(&x->d_seq) == 0 nd->inode = inode unlink("x") d_delete() // x goes negative mkdir("x") d_instantiate() // same dentry d_can_lookup(x) // true now may_lookup() VFS_BUG_ON_INODE(!S_ISDIR(nd->inode->i_mode)) With CONFIG_PREEMPT_RCU the walker can be preempted in that window, so it is not limited to a few instructions. mkdir() only gets the same dentry back if the filesystem keeps negative dentries around. tmpfs doesn't, ext4 does. Apart from the assertion the stale inode is harmless, and has been there since before the assertion was added: nd->seq no longer matches x->d_seq, so lookup_fast(), follow_dotdot_rcu() and try_to_unlazy() all fail with -ECHILD and the walk is redone in ref-walk, whatever the permission check on the old inode said. Keep the assertion for ref-walk, where the dentry is pinned and can't change type, and skip it for rcu-walk. No change for kernels without CONFIG_DEBUG_VFS. Fixes: e631df89cd5d ("fs: speed up path lookup with cheaper handling of MAY_EXEC") Signed-off-by: Josef Bacik Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit b808e1141a5b2df5b89e2ea4d512ae94597e9dd8 Author: Amir Goldstein Date: Fri Oct 16 17:11:13 2026 +0200 selftests/ovl: fix detached layer mountinfo expectations [ Upstream commit aefaf9521c999206b7cd2df8435a270ea8b8112b ] set_layers_via_detached_mount_fds was copied from the attached-fd test and still looks for /tmp paths. Detached open_tree() layers are recorded by d_path() as upperdir=/upper, workdir=/work, and lowerdir+=/ and datadir+=/ for each cloned directory. The test has failed since it was added. Reported-by: Disha Goel Link: https://lore.kernel.org/linux-unionfs/20260924112858.51392-2-disgoel@linux.ibm.com Fixes: ccc829b15d48a ("selftests: add tests for using detached mount with overlayfs") Signed-off-by: Amir Goldstein Signed-off-by: Sasha Levin commit 3a0260fc82412405c00491efe2287650bcbfb373 Author: Dominik Maier Date: Fri Oct 23 01:21:19 2026 +0200 xattr: always invoke cap_convert_nscap() for security.capability writes [ Upstream commit 0f4a9e682f7fa5becc3af7204606d9bf4780e425 ] Commit 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") changed cap_inode_setxattr() to return 0 unconditionally for XATTR_NAME_CAPS ("security.capability") and moved capability validation into cap_convert_nscap(), but placed the call inside the "if (size)" block in setxattr(). Commit 7c03e2cda4a5 ("vfs: move cap_convert_nscap() call into vfs_setxattr()") preserved that "size &&" condition in vfs_setxattr(): if (size && strcmp(name, XATTR_NAME_CAPS) == 0) { error = cap_convert_nscap(idmap, dentry, &value, size); ... } For security.* extended attributes, xattr_permission() skips inode_permission(MAY_WRITE) and leaves permission checks to the security module, while cap_inode_setxattr() returns 0 for XATTR_NAME_CAPS assuming cap_convert_nscap() has already validated the write. Because __vfs_setxattr() treats size == 0 as an empty attribute write (setting value = "") rather than a removal, calling setxattr(2) on "security.capability" with size == 0 bypasses cap_convert_nscap() and allows an unprivileged caller without CAP_SETFCAP or write permission on the target inode to write a 0-byte security.capability xattr (or overwrite an existing one). When that binary is subsequently executed, get_vfs_caps_from_disk() reads the 0-byte security.capability xattr and fails the size < sizeof(magic_etc) check with -EINVAL, causing execve(2) to fail with -EINVAL. Always invoke cap_convert_nscap() when strcmp(name, XATTR_NAME_CAPS) == 0 regardless of size, so that 0-byte writes hit the existing !*ivalue / !validheader() checks in cap_convert_nscap() and are rejected with -EINVAL. Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") Signed-off-by: Dominik Maier Link: https://patch.msgid.link/20261022232119.2537209-1-dmnk@google.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 83b15cf6a6113d1f7336ad83f520ae36e52e4220 Author: Sasha Levin Date: Wed Oct 28 10:44:46 2026 -0400 ASoC: SOF: Intel: hda: Stop the controller before freeing its DMA buffers [ Upstream commit 11ae63bd9030349a0136fb2edd1622a4a029edc8 ] hda_dsp_probe() starts the CORB/RIRB DMA engines through hda_dsp_ctrl_init_chip(), but neither hda_dsp_remove() nor the error path of hda_dsp_probe() stops them before hda_dsp_stream_free() frees the CORB/RIRB ring buffer and the position buffer. Unsolicited responses also stay enabled, so the controller can keep writing RIRB entries into the freed page. Until commit 9e6966f70404 ("ASoC: SOF: Intel: hda: Keep non-alt mlinks powered at probe on ACE2+"), hda_init_caps() dropped the initial references to the non-alternate links, and dropping the last one stopped the command DMA, so a probe that failed later, e.g. because the firmware is missing, did not leave it running. Now it does, and as the probe runs from a work item, the device stays bound after the failure, with bus mastering enabled and the DMA engines pointed at freed memory. Normal removal resumes the device first, which restarts the command DMA, so there the ring buffer is freed while the DMA is running until pci_disable_device() clears bus mastering. Stop the controller with hda_dsp_ctrl_stop_chip() before freeing the buffers, as is done on suspend, and export it for use from hda.c. This was reproduced by binding SOF in DSPless mode to a QEMU ich9-intel-hda: after the probe fails with "SOF firmware and/or topology file not found", CORB and RIRB DMA are still running with unsolicited responses and bus mastering enabled, and the page they use is soon reused as a page table. Fixes: 9e6966f70404 ("ASoC: SOF: Intel: hda: Keep non-alt mlinks powered at probe on ACE2+") Signed-off-by: Sasha Levin Acked-by: Peter Ujfalusi Tested-by: Li Yifan Reported-by: Li Yifan Closes: https://github.com/thesofproject/linux/pull/5976 Link: https://patch.msgid.link/20261028144446.992948-1-sashal@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 8d4f952d9b5f43447a6d3a9e9ec4a1bf17f6cf79 Author: Josef Bacik Date: Tue Oct 13 19:25:26 2026 +0000 fork: Let nobody keep a task that may not come to life [ Upstream commit 5cf0881344cfa0a3b558107741884d8f43269d7b ] dup_task_struct() sets rcu_users to 2. From then on bpf_task_acquire() hands out references to the new task, which BPF programs see as a trusted pointer long before it is sure to live: in the task_alloc LSM hook and in ops.init_task() of sched_ext. If copy_process() fails later on, it undoes what it has done and frees the task without a look at the count. A program that has stored its reference in a map is left with a pointer to freed memory: BUG: KASAN: slab-use-after-free in put_task_struct_rcu_user+0x22/0x90 The program is loaded by the administrator, but any user can make a fork fail, for example at the pids.max of a cgroup. Honouring the count would not do: the task would stay behind with its mm, files and credentials freed. Leave rcu_users at zero until copy_process() cannot fail any more. bpf_task_acquire() returns NULL until then, which its callers have to be prepared for, and which they get for init_task, whose count has always been zero. The other users of rcu_users deal with tasks that have run. Fixes: 90660309b0c7 ("bpf: Add kfuncs for storing struct task_struct * as a kptr") Signed-off-by: Josef Bacik Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 91de947d27493d391da5629165dd81cc5a2177ab Author: Nicolai Buchwitz Date: Tue Oct 27 20:54:07 2026 +0100 octeontx2-pf: pass the skb to otx2_dma_unmap_skb_frags() [ Upstream commit 92cb8653970e4efaa7d2c2e2819c6d050b25e462 ] After a DMA mapping error, the unmap reads an skb pointer that is not set yet. It can be NULL or left over from an earlier packet. Fixes: 195c3d463181 ("octeontx2-pf: map skb data as device writeable") Signed-off-by: Nicolai Buchwitz Acked-by: Ratheesh Kannoth Link: https://patch.msgid.link/20261027-nb-otx2-ipsec-tx-fixes-net-v1-2-2114c4f10c36@tipi-net.de Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit dda90148483fb3ef8f6c1d3842b4970bdddc238d Author: Nicolai Buchwitz Date: Tue Oct 27 20:54:06 2026 +0100 octeontx2-pf: fix skb use-after-free on ipsec transmit drop [ Upstream commit 14d01ff1a4952198abae713a4ad428e07819b4aa ] When an SA is removed while packets for it are still queued, the transmit path frees the packet but reports the queue as busy. The stack then requeues the freed skb, and the DMA mappings leak. Fixes: 6a77a158848a ("cn10k-ipsec: Process outbound ipsec crypto offload") Signed-off-by: Nicolai Buchwitz Reviewed-by: Ratheesh Kannoth Link: https://patch.msgid.link/20261027-nb-otx2-ipsec-tx-fixes-net-v1-1-2114c4f10c36@tipi-net.de Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 4187c827d9b30484412c8170cb4e502b7c722616 Author: Markus Probst Date: Wed Sep 30 15:31:50 2026 +0000 rtc: s35390a: Read 24-hour mode on access [ Upstream commit 6199051016cddba920b6023a44199c5221352c44 ] Instead of reading if the 24-hour mode is used on probe once, read it on access. This makes it impossible for the mode to be out of sync and fixes time corruption if resetting the chip while in 12-hour mode, as `s35390a_init` did not update the cached value. Fixes: 16486d0c1c65 ("rtc: s35390a: handle invalid RTC time") Signed-off-by: Markus Probst Link: https://patch.msgid.link/20260930-rtc_s35390a_int1-v10-4-e7b1cbc50a7b@posteo.de Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit d97ae94e9787ade07cbf3d808454031d6ee8061b Author: Markus Probst Date: Wed Sep 30 15:31:49 2026 +0000 rtc: s35390a: Fix alarm not disabling [ Upstream commit d93f29e41089bbb14637289fe77bdd72b71e9ac5 ] Implement alarm_irq_enable callback. Fixes: 542dd33a4925 ("drivers/rtc/rtc-s35390a.c: add wakealarm support for rtc-s35390A rtc chip") Signed-off-by: Markus Probst Link: https://patch.msgid.link/20260930-rtc_s35390a_int1-v10-3-e7b1cbc50a7b@posteo.de Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit c39096d5260226b2ea63e5ddff2fac94b642dca2 Author: Markus Probst Date: Wed Sep 30 15:31:47 2026 +0000 rtc: s35390a: Add missing newline to dev_err [ Upstream commit a27b25bb9b422c8468cb6965b2d72b7b64187fd2 ] Fixes: 3bd32722c827d ("rtc: s35390a: improve irq handling") Signed-off-by: Markus Probst Link: https://patch.msgid.link/20260930-rtc_s35390a_int1-v10-2-e7b1cbc50a7b@posteo.de Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit dcc521f4255a390c6e4d14f6cca8622a91c59585 Author: Joas Antonio dos Santos Date: Sat Oct 24 19:04:28 2026 -0300 net: mctp: free reassembly head skb when key_add fails on SOM [ Upstream commit d2bfe74a8fe219a86b86c1f126e1d722a5001790 ] When a start-of-message fragment creates a new reassembly key on the broadcast/bind path, mctp_frag_queue() stores the skb as key->reasm_head before the key is made observable with mctp_key_add(). If mctp_key_add() fails (a race with another SOM packet for the same source/dest/tag, or the receiving socket going away), the error path only drops the key reference via mctp_key_unref(). The final key destructor frees the key itself but not key->reasm_head, and since the key was never added to any list, neither the expiry worker nor socket teardown can reach it to release the queued fragment. The skb is leaked. Free key->reasm_head on the key_add failure path before releasing the key. Other teardown paths (__mctp_key_done_in(), EOM delivery) already clear reasm_head before the final unref, so this only affects the failure path. Fixes: 4a992bbd3650 ("mctp: Implement message fragmentation & reassembly") Signed-off-by: Joas Antonio dos Santos Reported-by: Guikun Yang Closes: https://lore.kernel.org/all/tencent_43A65D51143E18518EA968DF9323694EFD08@qq.com/ Acked-by: Jeremy Kerr Link: https://patch.msgid.link/179287946888.17431.11219154409333681184@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 7563d6969fe7fb497eeafc0e71d27f5364ab7b14 Author: Josef Bacik Date: Sun Oct 4 20:33:45 2026 +0000 writeback: don't kick a missing wb for dontcache writes [ Upstream commit aa6439028dc39230e62917ba0a7dafdc103564cf ] With CONFIG_CGROUP_WRITEBACK, inode->i_wb stays NULL until the inode is dirtied for the first time (folio_account_dirtied(), __mark_inode_dirty() or wbc_attach_fdatawrite_inode() attach it). generic_write_sync() calls filemap_dontcache_kick_writeback() for every IOCB_DONTCACHE write, including O_DIRECT ones, which never dirty the page cache. The function then passes the NULL returned by unlocked_inode_to_wb_begin() to wb_has_dirty_io(): fd = open("/dev/ram0", O_WRONLY | O_DIRECT); pwritev2(fd, &iov, 1, 0, RWF_DONTCACHE); BUG: KASAN: null-ptr-deref in filemap_dontcache_kick_writeback+0xec Oops: general protection fault, probably for non-canonical address RIP: 0010:filemap_dontcache_kick_writeback+0xfd/0x7a0 The task dies inside rcu_read_lock(). blkdev_write_iter() gets there for any block device whose page cache has not been dirtied yet. nfs_file_direct_write() calls generic_write_sync() the same way. An inode without a wb has never had dirty pages, so there is nothing to flush: skip the kick. Fixes: e1bf79628453 ("mm: kick writeback flusher for IOCB_DONTCACHE with targeted dirty tracking") Signed-off-by: Josef Bacik Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 2dbe2d06ec09a8cc06186cc052217f666f45e9d1 Author: Cosmin Ratiu Date: Mon Oct 26 10:45:03 2026 +0200 net/mlx5: Only set num_doorbells on a fully initialized SF [ Upstream commit fa503935c2d6603856dafff0a0852631ab6e9503 ] The validation for the num_doorbells devlink param rejects values greater than num_channels. For lightweight SFs, this ends up accessing a NULL priv->eq_table, leading to a crash. Fix that by rejecting setting num_doorbells on uninitialized SFs. Fixes: 11bbcfb7668c ("net/mlx5e: Use the 'num_doorbells' devlink param") Signed-off-by: Cosmin Ratiu Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20261026084503.4122732-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit bd1cfd24d92135224a4d6ef760a9aa813700f522 Author: Linkui Xiao Date: Tue Oct 27 16:52:00 2026 +0800 net: bridge: netlink: do not clear the vlan info dump error [ Upstream commit fcc00b15cb21a6de76826e5012b2c758505f5e65 ] br_fill_ifinfo() assigns the result of br_fill_vlan_tunnel_info() over the result of br_fill_ifvlaninfo() or br_fill_ifvlaninfo_compressed() instead of only running the second helper when the first one succeeded. When the vlan information no longer fits in the skb but the port has no vlan mapped to a tunnel dst, br_fill_vlan_tunnel_info() walks the vlan list and returns 0 without touching the skb. The -EMSGSIZE is lost, br_fill_ifinfo() completes a message whose IFLA_AF_SPEC is truncated, and the dump carries on to the next interface instead of stopping, so userspace silently sees an incomplete vlan list. Only fill the tunnel information when the vlan information was filled successfully. This was flagged as a pre-existing issue in the Sashiko review of the net-next series, which noted that the VLAN fill result is overwritten before it is tested (see the Link tag below). Not triggered or tested. Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support") Link: https://lore.kernel.org/bridge/ed1de95e-e112-4076-93f0-6f7668e657ad@blackwall.org/T/#u#5 Signed-off-by: Linkui Xiao Reviewed-by: Eric Dumazet Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20261027085200.1501599-1-xiaolinkui@126.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 44dad6107138838a45e9b255c5381a3ccc8a63ce Author: Karol Kolacinski Date: Tue Oct 27 17:05:39 2026 -0700 ice: E822: keep Tx timestamps disabled during offset calibration [ Upstream commit 56af436b90acce7eaa7531189c827773983f7d07 ] Do not clear the tx.calibrating flag immediately after starting the PHY timer in ice_ptp_port_phy_restart(). Instead, keep Tx timestamps disabled until the offset verification work (ice_ptp_wait_for_offsets) has confirmed that the Tx PHY offset is properly configured. Previously, tx.calibrating was set to true, then immediately back to false right after ice_start_phy_timer_e82x() returned. This allowed Tx timestamp requests to be served during the window where offset verification was still pending. Timestamps produced during this window should have their valid bit cleared, but it is better to prevent requests until the driver has confirmed calibration is complete. Rename the tx.calibrating field to tx.disabled, and change where it is cleared. Only clear it in ice_ptp_wait_for_offsets(), and only after Tx offset configuration has completed successfully. This ensures that new Tx timestamp requests are only accepted after the PHY has properly calibrated the Tx offset. If ice_start_phy_timer_e82x() fails, do not restore disabled to false. The device is in a state where timestamps cannot succeed properly anyways. A dev_err message is already logged on failure to start the timer at the end of the function. Renaming the field improves clarity and will better reflect the nature of the flag in a future change that also applies disabling Tx timestamps in software in a following commit. Log a debug message while offset calibration is still pending, including the specific Tx/Rx error codes to aid debugging stalled calibration. This path is expected on every routine link-up: ov_work is first queued with no delay and the vernier offset cannot be computed until at least one packet has been transmitted, so the first several invocations normally land here. Use dev_dbg() rather than a rate-limited warning to avoid emitting KERN_WARNING on every link-up during normal operation. Log a debug message when calibration completes successfully. Note that sashiko review has previously complained that leaving the disabled flag set "permanently" disables Tx timestamps if vernier calibration never completes. This is true, but its important to realize that timestamps would still fail regardless of whether the flag is set. Until vernier calibration completes the device will not report valid timestamps regardless. Thus, keeping the calibrating flag set simply prevents new timestamp requests from software while it is known that the hardware will not complete them. Fixes: 3a7496234d17 ("ice: implement basic E822 PTP support") Signed-off-by: Karol Kolacinski Reviewed-by: Aleksandr Loktionov Signed-off-by: Arkadiusz Kubalewski Signed-off-by: Przemyslaw Korba Signed-off-by: Jacob Keller Link: https://patch.msgid.link/20261027-reduction-v1-3-81237c67a361@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit bac741bac969635a57ed4a4ee5281adad0567240 Author: Jacob Keller Date: Tue Oct 27 17:05:38 2026 -0700 ice: set in_use only after preparing Tx timestamp index [ Upstream commit 50870d62116038e6f1e17a6aedcf2a95cec37ec7 ] The ice_ptp_request_ts() function is used to request a timestamp index for use with a packet. When reserving an index, it sets the start time and saves a pointer to the skb into the appropriate index. The function marks the in_use bit first before doing any of these steps. The IRQ handler which clears the timestamps reads the in_use bits uses a lockless flow for reading the in_use bits to determine which ones are in-use. This is necessary as actually processing a complete timestamp must be able to sleep so we cannot hold the timestamp tracker lock over the entire sequence. Additionally, blocking the Tx hotpath with such a lock indefinitely would be problematic. However, the existing flow now has a very narrow window where the IRQ handler could see a timestamp as in-use but read a stale value for its "start" time. Fix this by ordering the sequence to mark the in_use bit last, and add a memory barrier to prevent re-ordering of the previous writes to setup the index. This was found and reported by Sashiko while reviewing an unrelated change. Closes: https://sashiko.dev/#/patchset/20260821-jk-e825c-minimized-fixes-v1-0-9d0731eb4858%40intel.com?part=7 Fixes: ea9b847cda64 ("ice: enable transmit timestamps for E810 devices") Signed-off-by: Jacob Keller Link: https://patch.msgid.link/20261027-reduction-v1-2-81237c67a361@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 91b962d7059d63a8566868be6f2871ed3c2cbe89 Author: Jacob Keller Date: Tue Oct 27 17:05:37 2026 -0700 ice: use reference counting and SRCU for PTP port access [ Upstream commit d5d859a6efff473d799d35999a35aa764dcc185b ] The ice adapter structure maintains a list of ports associated with the adapter. This is used for supporting PTP, where the clock owner must handle many operations that require access to the PTP port structures of the associated PFs. This is implemented using a linked list and a mutex. This sort of works, but a few places within the code do not acquire the mutex when iterating the list. This includes ice_ptp_flush_all_tx_tracker(), ice_ptp_restart_all_phy(), and ice_ptp_prepare_rebuild_sec(). Fixing this is tricky, especially since it is not clear if we can simply acquire the lock around the complete iterations. The pattern of use for the port list is read-mostly with modifications only happening during PF initialization when elements are inserted. This typically only happens during early boot, though a PF could in principle be removed or loaded at arbitrary times via bind and unbind operations. The use of a mutex does mean the driver can sleep while holding it, but it still creates complicates with lock ordering and prevents iterating the list in any code path that *can't* sleep. Instead, use SRCU primitives for the port linked list, along with a reference count on the port. The kref reference counter ensures that a PF will have a valid lifetime and not be removed until the reference is released. Note that this change focuses solely on the port list and does not make an effort to resolve access to ctrl_pf, which is currently being investigated by another developer. Use of sleepable RCU is required because we often iterate the PTP port list and perform operations that might sleep. Attempts at implementing regular RCU have thus far not proven to be acceptable. The remove path first removes the port from the list, and we use kref_get_unless_zero to ensure that such ports are skipped when iterating the list. This ensures that once a port starts removing we will drop references and no longer be able to acquire new ones. This avoids loop iterations chaining together to indefinitely block removal. The ice_ptp_release_port_srcu() function is used as the release function for the kref_put() call. This uses wake_up_var() to wake the removing thread. The waiting thread will block until the final reference has been removed, then it will use synchronize_srcu() to ensure any outstanding SRCU critical sections have had the necessary grace period. This flow ensures that accesses to ports via the adapter port list will remain valid until both the SRCU critical sections have ended and all the references to the ports have been dropped. Strictly speaking, SRCU alone might be sufficient for existing code paths, but the reference count allows the option for passing a pointer to the port on to other functions if necessary in the future. Fixes: e800654e85b5 ("ice: Use ice_adapter for PTP shared data instead of auxdev") Reviewed-by: Maciek Machnikowski Signed-off-by: Jacob Keller Link: https://patch.msgid.link/20261027-reduction-v1-1-81237c67a361@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 6468407050173d03d5889fae9f997b012930d507 Author: Dharmender Garg Date: Mon Oct 26 14:57:57 2026 +0530 bnge: fix RSS table sizing for large RX ring counts [ Upstream commit 8b97091eae744a577573797e5d5abc3e0da10769 ] bnge_adjust_pow_two() adds one block before rounding up to a power of two only when the quotient is 0 or 1. A larger quotient that is already a power of two is returned unchanged, so 129-192 RX rings get a 128-entry RSS indirection table and 257-320 rings a 256-entry one. The rings above the table size never receive default RSS traffic. bnxt_calc_nr_ring_pages() always adds one, which is correct. Make bnge_adjust_pow_two() always add one block before rounding up. bnge_adjust_pow_two() also sizes the RX, RX aggregation, TX and completion ring pages. For the default 511-entry rings their page counts do not change. The completion ring is sized from more than the default depth, so its page count changes where the old code dropped a partial page. With 8K ring pages, TPA off and the default rings, its budget is 1533 entries and the page count goes from 2 to 4. With 4K ring pages and TPA on, when the firmware reports a max_aggs_supported of 260 to 387, it goes from 16 to 32. In these cases the old completion ring held fewer entries than its budget. Fixes: 627c67f038d2 ("bng_en: Add resource management support") Signed-off-by: Dharmender Garg Reviewed-by: Vikas Gupta Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261026092757.9168-3-vikas.gupta@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit e859b49576e20c4cd70b953f45fd0212cdef8ca4 Author: Dharmender Garg Date: Mon Oct 26 14:57:56 2026 +0530 bnge: cap RSS contexts and RX rings to the RSS table size [ Upstream commit e8f6ca11167d4753386340ce88444b5445dff831 ] The hardware supports at most BNGE_RSS_TABLE_MAX_TBL (8) RSS contexts. They are stored in vnic->fw_rss_cos_lb_ctx[8] and back a 512-entry (BNGE_MAX_RSS_TABLE_ENTRIES) indirection table and DMA buffer, so at most 512 RX rings can be served by RSS. bnge_cal_nr_rss_ctxs() has no upper bound, so with more RX rings it returns more than 8 contexts: bnge_setup_vnic() writes past fw_rss_cos_lb_ctx[], bnge_set_dflt_rss_indir_tbl() and bnge_fill_hw_rss_tbl() write past the indirection table and its DMA buffer, and the pad computation in bnge_set_dflt_rss_indir_tbl() underflows into a huge memset(). Cap the number of contexts at BNGE_RSS_TABLE_MAX_TBL and the number of RX rings at BNGE_MAX_RSS_TABLE_ENTRIES, so the sizes derived from the ring count always fit the arrays. Fixes: 627c67f038d2 ("bng_en: Add resource management support") Signed-off-by: Dharmender Garg Reviewed-by: Vikas Gupta Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261026092757.9168-2-vikas.gupta@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 5e5dcd56f86d2c65f4c5331ac5035dd8033a1d3b Author: Eric Dumazet Date: Mon Oct 26 16:59:27 2026 +0100 ppp: linearize and segment bridged packets when required [ Upstream commit 0de4e69cd021c99d0aa13e1f30aafd13ad74a2a5 ] PPP channel bridging hands packets received on one channel directly to the start_xmit() of another. Packets received by PPPoE can be non-linear, GSO since commit 55a5d8fca836 ("net: pppoe: implement GRO/GSO support"), or CHECKSUM_PARTIAL when injected with a virtio_net_hdr. The regular transmit path never sees such packets, and only PPPoE, which uses dev_queue_xmit(), handles them: - PPP Async reads the whole packet through skb->data, transmitting unrelated memory for non-linear packets. - PPP Async and Sync send GSO packets as single frames of up to 64KB, and CHECKSUM_PARTIAL packets with a bad L4 checksum. - PPTP and L2TP cannot segment a TCP GSO packet once their GRE or UDP header is pushed, and do not finish pending checksums. Add a xmit_offload flag to struct ppp_channel, set for PPPoE. For other channels, segment GSO packets in software, using the PPP protocol field as the L2 header, finish CHECKSUM_PARTIAL checksums (including SCTP CRC32c), and linearize packets for channels without direct_xmit, as ppp_push() does. Packets are dropped if any step fails, or if the channel is busy, as before. skb->dev is NULL at this point for PPPoE (cleared by __sk_receive_skb()), and tunnel and IPv6 UFO GSO handlers dereference it: only TCP, UDP L4 and fraglist GSO packets without encapsulation are segmented, others are dropped. Receive paths like L2TP pull headers without updating the checksum state, possibly leaving a CHECKSUM_PARTIAL state with csum_start before skb->data. Reset it to CHECKSUM_NONE, as skb_postpull_rcsum() does, so that skb_checksum_help() does not warn, and so that PPPoE does not offload a checksum at a wrong offset. Tested in a VM by bridging PPPoE (on a TAP with IFF_NAPI_FRAGS, or on veth) to PPP Async on a PTY, PPPoL2TP and PPPoE: non-linear packets no longer leak garbage, GSO packets (including fraglist GRO) are sent as valid segments for IPv4 and IPv6, CHECKSUM_PARTIAL packets get a valid checksum, and PPPoE still receives GSO packets unchanged. Fixes: 4cf476ced45d ("ppp: add PPPIOCBRIDGECHAN and PPPIOCUNBRIDGECHAN ioctls") Fixes: 55a5d8fca836 ("net: pppoe: implement GRO/GSO support") Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/20260908072135.877364-1-qingfang.deng@linux.dev Co-developed-by: Qingfang Deng Signed-off-by: Qingfang Deng Signed-off-by: Eric Dumazet Cc: Felix Fietkau Cc: Pablo Neira Ayuso Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261026155927.707655-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 3de1e2d28d1b51e01897b3e523d3a73d9ab3f785 Author: Kuniyuki Iwashima Date: Tue Oct 27 06:52:45 2026 +0000 ipv6: Protect multiple routes insertion by table lock. [ Upstream commit 4c6fbb1fbafa85029fa789b5b01f39ebcb459d1a ] syzbot reported the warning below. [0] While call_fib6_multipath_entry_notifiers() is called locklessly, fib6_siblings could be changed concurrently, leading to the warning (and later null-ptr-deref). Let's protect multiple routes insertion with tb6_lock. Along with that, __ip6_ins_rt() and ip6_route_del() are changed to fib6_add() and fib6_del(). Note that fib6_del() finally calls rt6_multipath_rebalance(), which requires rcu_read_lock(). [0]: i != fen6_info->nsiblings WARNING: drivers/net/netdevsim/fib.c:831 at nsim_fib6_event_init drivers/net/netdevsim/fib.c:831 [inline], CPU#0: syz.0.157/6279 WARNING: drivers/net/netdevsim/fib.c:831 at nsim_fib6_prepare_event drivers/net/netdevsim/fib.c:947 [inline], CPU#0: syz.0.157/6279 WARNING: drivers/net/netdevsim/fib.c:831 at nsim_fib_event_schedule_work drivers/net/netdevsim/fib.c:1003 [inline], CPU#0: syz.0.157/6279 WARNING: drivers/net/netdevsim/fib.c:831 at nsim_fib_event_nb+0x1029/0x11d0 drivers/net/netdevsim/fib.c:1043, CPU#0: syz.0.157/6279 Modules linked in: CPU: 0 UID: 0 PID: 6279 Comm: syz.0.157 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:nsim_fib6_event_init drivers/net/netdevsim/fib.c:831 [inline] RIP: 0010:nsim_fib6_prepare_event drivers/net/netdevsim/fib.c:947 [inline] RIP: 0010:nsim_fib_event_schedule_work drivers/net/netdevsim/fib.c:1003 [inline] RIP: 0010:nsim_fib_event_nb+0x1029/0x11d0 drivers/net/netdevsim/fib.c:1043 Code: eb 0d 4d 89 fd e8 b7 c5 6c fa be 01 00 00 00 48 89 df e8 5a 38 85 fd 4d 89 ef 4c 8b 6c 24 20 e9 4a f3 ff ff e8 98 c5 6c fa 90 <0f> 0b 90 e9 db fa ff ff 89 e9 80 e1 07 80 c1 03 38 c1 0f 8c df f0 RSP: 0018:ffffc900047bef10 EFLAGS: 00010293 RAX: ffffffff875b59a8 RBX: 0000000000000002 RCX: ffff888079770000 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ffffc900047bf0a0 R08: ffff88805c0bb02f R09: 1ffff1100b817605 R10: dffffc0000000000 R11: ffffed100b817606 R12: dffffc0000000000 R13: 0000000000000000 R14: 0000000000000001 R15: ffff88802c792000 FS: 00007f334ba076c0(0000) GS:ffff888123ad0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f334ba06ff8 CR3: 000000007a5b2000 CR4: 00000000003526f0 Call Trace: notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 atomic_notifier_call_chain+0xda/0x180 kernel/notifier.c:223 call_fib_notifiers+0x31/0x60 net/core/fib_notifier.c:36 call_fib6_multipath_entry_notifiers+0xf5/0x160 net/ipv6/ip6_fib.c:428 ip6_route_multipath_add net/ipv6/route.c:5542 [inline] inet6_rtm_newroute+0x14f5/0x1a30 net/ipv6/route.c:5664 rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7163 netlink_rcv_skb+0x226/0x4a0 net/netlink/af_netlink.c:2572 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x7bd/0x940 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1916 sock_sendmsg_nosec+0x14e/0x190 net/socket.c:800 __sock_sendmsg net/socket.c:818 [inline] ____sys_sendmsg+0x54e/0x850 net/socket.c:2715 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2769 __sys_sendmmsg+0x273/0x4d0 net/socket.c:2858 __do_sys_sendmmsg net/socket.c:2885 [inline] __se_sys_sendmmsg net/socket.c:2882 [inline] __x64_sys_sendmmsg+0xa0/0xc0 net/socket.c:2882 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f334ab9e1d9 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f334ba07028 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f334ae26090 RCX: 00007f334ab9e1d9 RDX: 04000000000001f2 RSI: 0000200000000000 RDI: 0000000000000004 RBP: 00007f334ac35888 R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000000fc R11: 0000000000000246 R12: 0000000000000000 R13: 00007f334ae26128 R14: 00007f334ae26090 R15: 00007ffd96688aa8 Fixes: 169fd62799e8 ("ipv6: Get rid of RTNL for SIOCADDRT and RTM_NEWROUTE.") Reported-by: syzbot+751b587577d0ebca10f2@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/6adbaed6.67317f00.38c4bc.001b.GAE@google.com/T/ Signed-off-by: Kuniyuki Iwashima Reviewed-by: Eric Dumazet Reviewed-by: David Ahern Link: https://patch.msgid.link/20261027065247.2871134-1-kuniyu@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 332cbbcee569d412aaa8339a9faef8faa1b95c03 Author: Chuck Lever Date: Mon Oct 26 18:52:14 2026 -0700 tls: Honor O_NONBLOCK in tls_sw_splice_read() [ Upstream commit 78ded647d43e335891f981f68c5992a2e763cfcc ] tls_sw_splice_read() takes its blocking behavior from SPLICE_F_NONBLOCK alone. When splicing from a socket to a pipe, do_splice() sets that flag from the pipe's O_NONBLOCK, not the socket's. On a nonblocking socket, a splice(2) call without SPLICE_F_NONBLOCK therefore sleeps in tls_rx_rec_wait() until a record arrives. tcp_splice_read() instead reads sock->file->f_flags and returns -EAGAIN. Polling first does not avoid the sleep once tls_sw_splice_read() consumes zero-length records, as it does after a later patch in this series. tls_sw_sock_is_readable() reports the socket readable while any record sits on rx_list, including a zero-length record that delivers no bytes to the pipe. For TLS 1.3 the strparser announces a record before decryption, when its plaintext length is still unknown, so the readiness test cannot screen such a record out. A splice that consumes the record and waits for the next stalls every connection an event loop multiplexes. An LLM audit of the TLS read paths found this defect. Treat the socket's O_NONBLOCK as nonblocking too. A caller that sets O_NONBLOCK on the socket and splices without SPLICE_F_NONBLOCK now gets -EAGAIN where the splice blocked before. sendfile(2) from a TLS socket changes the same way, because do_sendfile() leaves the input file's O_NONBLOCK out of the splice flags. Both now behave as they do on a plain TCP socket. Fixes: c46234ebb4d1 ("tls: RX path for ktls") Signed-off-by: Chuck Lever Link: https://patch.msgid.link/20261027015215.605919-2-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 39042ffba46976f559efe8471c2d2264571f7d34 Author: Joas Antonio dos Santos Date: Sat Oct 24 22:47:24 2026 -0300 net: dcb: initialize PFC value before calling getpfccfg [ Upstream commit ca87a2dffbb550fc934647d5e8d1c4ae85590132 ] dcbnl_getpfccfg() and dcbnl_cee_fill() pass the address of an uninitialized stack u8 to the driver's getpfccfg() op and then put it into the netlink reply unconditionally. The op returns void, so the core cannot tell whether the driver wrote the value. i40e_dcbnl_get_pfc_cfg() and ice_dcbnl_get_pfc_cfg() return without writing *setting unless the DCBX agent is host managed and in CEE mode. Both drivers normally run with firmware managed DCBX (DCB_CAP_DCBX_LLD_MANAGED), and i40e with FW LLDP disabled runs host managed in IEEE mode, so on a DCB capable i40e/ice port the PFC values in DCB_CMD_PFC_GCFG and DCB_CMD_CEE_GET replies, and in the CEE part of RTNLGRP_DCB notifications, come from uninitialized stack. The same u8 is reused for all eight priorities, so this is one byte per reply. dcb_doit() only requires CAP_NET_ADMIN for RTM_SETDCB, so the GET commands are available to unprivileged users. Set the value to 0 before each call, like the PG config path already presets its outputs to DCB_ATTR_VALUE_UNDEFINED. 0 is also what the reply contains today on kernels built with CONFIG_INIT_STACK_ALL_ZERO, so nothing changes for those. Found by code inspection, compile-tested only (W=1). I don't have i40e/ice hardware to check the reply. Fixes: b94b013eb626 ("ice: Implement DCBNL support") Fixes: 5effa78e7c94 ("i40e: Add netlink callbacks support for software based DCB") Signed-off-by: Joas Antonio dos Santos Link: https://patch.msgid.link/179289284460.50470.572724041164324949@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b4289d4f3ea000d9aa39638246e9db67ab45d250 Author: Nicolai Buchwitz Date: Thu Oct 22 10:54:07 2026 +0200 net: bcmgenet: restore the Tx coalescing setting when the rings are rebuilt [ Upstream commit ff8a7c0c06762a2a2333fbd6148d637bbd3d5090 ] bcmgenet_set_coalesce() writes tx_max_coalesced_frames straight into DMA_MBUF_DONE_THRESH and keeps no copy of it, while bcmgenet_init_tx_ring() programs a fixed 1. An ifdown and ifup or a resume then puts the Tx coalescing back to one frame per interrupt. Rx keeps its value per ring and reapplies it on init. Do the same for Tx. Fixes: 2f9130709d2c ("net: bcmgenet: Implement TX coalescing control knobs") Signed-off-by: Nicolai Buchwitz Reviewed-by: Simon Horman Reviewed-by: Florian Fainelli Link: https://patch.msgid.link/20261022-nb-genet-fini-dma-net-v3-2-6e9fc89c0156@tipi-net.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 357902cbc81465b71de69db5616d06a2f2cba244 Author: Nicolai Buchwitz Date: Thu Oct 22 10:54:06 2026 +0200 net: bcmgenet: recover from a failed resume [ Upstream commit 1c1f51c3ee9ccf86462e36548291ed44fecd5355 ] A resume that fails in bcmgenet_init_dma() returns with the interface still IFF_UP and the datapath gone. The next ifdown runs the teardown a second time and napi_disable() waits for a NAPI_STATE_SCHED bit that nothing will clear: task:ip state:D usleep_range_state+0xec/0x158 napi_disable_locked+0x254/0x318 napi_disable+0x3c/0x68 bcmgenet_netif_stop+0x1c8/0x318 bcmgenet_close+0x24/0xd0 __dev_close_many+0x18c/0x310 RTNL is held across the wait, so everything else blocks behind it. The same resume gates the clock and detaches the device. Close releases the clock a second time and ifup fails with -ENODEV. The hardware filters stay armed, so the next WoL suspend wakes on any frame. That suspend sets CMD_RX_EN for magic packet detection, so the WoL resume reuses rings that are gone. A failed resume should leave a state the ordinary paths can handle. Clear rx_cbs and tx_cbs as they are freed so they answer whether a datapath exists, and leave the clock alone so close and suspend release it once. The WoL resume rebuilds instead, so stop the PHY first, phy_start() only takes PHY_READY or PHY_HALTED. Flagged in a sashiko review and reproduced on a CM4 by forcing the resume allocation to fail. Fixes: b6e978e50444 ("net: bcmgenet: add suspend/resume callbacks") Fixes: 254f3239dd07 ("net: bcmgenet: revise suspend/resume") # for the WoL parts Signed-off-by: Nicolai Buchwitz Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261022-nb-genet-fini-dma-net-v3-1-6e9fc89c0156@tipi-net.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d8d1acc226f1f4b7efd32391f703b2d43521b3cd Author: Josef Bacik Date: Wed Oct 28 10:41:37 2026 -0600 block: don't enter reclaim under rq_qos_mutex [ Upstream commit 045cbfc369f5929ed473f7c200dc2e8146569ce5 ] ioc_qos_write() and the wbt_lat_usec writers take rq_qos_mutex with the queue frozen, blkcg_deactivate_policy() does the same with blkcg_mutex, so nothing holding either may wait for IO. blkg_conf_prep() got GFP_NOIO for the blkg in commit 5d726c4dbeed, but the radix_tree_preload() right after it, the policy init functions and the GFP_KERNEL fallback in blkcg_activate_policy() can still enter reclaim there. lockdep reports the cycle on the first write to io.max. Use GFP_NOIO for all of them. Fixes: 9730763f4756 ("block: correct locking order for protecting blk-wbt parameters") Fixes: 5d726c4dbeed ("blk-cgroup: fix possible deadlock while configuring policy") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-35-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 8ac5b16f08288d94c3bbd3d7a83d396fb3ceca77 Author: Josef Bacik Date: Wed Oct 28 10:41:29 2026 -0600 blk-throttle: make blkio.reset_stats reset I/O counts [ Upstream commit ac81a07a0bd5e75e8edc0eb5be563be1b2d56554 ] blkio.throttle.io_service_bytes and io_serviced were reset by blkcg_reset_stats() while the counters were part of the blkg. Now that they live in the throtl_grp, add a pd_reset_stats_fn for them. Fixes: 7ca464383aec ("blk-throtl: stop using blkg->stat_bytes and ->stat_ios") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-27-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit cbc58a54473c7e52f53c3f1d0a1388e623fb837e Author: Josef Bacik Date: Wed Oct 28 10:41:28 2026 -0600 blk-throttle: pass the I/O counts of a dead group on [ Upstream commit 587edb931fdda032bcd63fdfb0db4ded75159ee9 ] The recursive io_service_bytes and io_serviced files sum up the online groups plus what dead descendants left in aux_cnt. That worked while the counters lived in the blkg. Since commit 7ca464383aec they're in the throtl_grp and nobody passes them up, so the files go backwards when a child is removed. Add them to the parent in throtl_pd_offline(). Fixes: 7ca464383aec ("blk-throtl: stop using blkg->stat_bytes and ->stat_ios") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-26-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 9debb2a0b8af1f13f30ef059bda305d4e95a6db8 Author: Josef Bacik Date: Wed Oct 28 10:41:26 2026 -0600 blk-iolatency: flush enable_work after going offline [ Upstream commit 020f61242d6ebeba5f8f2ef6e429aeffdd63f1c1 ] blkcg_iolatency_exit() flushes enable_work before it deactivates the policy, but iolatency_pd_offline() schedules it again for the last group with a target, so the blk_iolatency is freed with the work queued. Flush it after the deactivation. Fixes: 8a177a36da6c ("blk-iolatency: Fix inflight count imbalances and IO hangs on offline") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-24-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 3933c871982c626571671e4d4929d046c26da50b Author: Josef Bacik Date: Wed Oct 28 10:41:22 2026 -0600 blk-cgroup: don't free a blkg with its punt work queued [ Upstream commit 4def096314cf29fb6940b74c087a0b923185580e ] blkg_async_bio_workfn() relies on the bios on the list pinning the blkg. But blkcg_punt_bio_submit() can call queue_work() after a running instance already took and completed the bio, and queue_work() succeeds on an empty list for the same reason. Nothing holds the blkg then, and free_work shares its memory with async_bio_work on top of that. Hold a reference across blkcg_punt_bio_submit(), give the two works memory of their own, and cancel async_bio_work in blkg_free_workfn(). Fixes: d3f77dfdc718 ("blkcg: implement REQ_CGROUP_PUNT") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-20-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 4ffd46e3a9257e7b99cdbbdb6b3924dcdce0b2ae Author: Josef Bacik Date: Wed Oct 28 10:41:16 2026 -0600 blk-cgroup: fix root io.stat byte counts on 32-bit [ Upstream commit e335b853d919f2c6246ca0993115285742a2acc1 ] blkcg_fill_root_iostats() shifts the unsigned long sector counts by 9 before adding them to the u64 byte counts, so on 32-bit the contribution of a CPU wraps every 4GB. Widen before the shift. Fixes: ef45fe470e1e ("blk-cgroup: show global disk stats in root cgroup io.stat") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-14-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit ee3dde4ea51752fd908f9a9510b6020365efedd1 Author: Josef Bacik Date: Wed Oct 28 10:41:06 2026 -0600 blk-throttle: don't truncate the cgroup v1 iops limits [ Upstream commit 7d96874ba80ba7a2ab578ea9139c2af79c353b88 ] tg_set_conf() parses the limit into a u64 and stores the iops ones through an unsigned int, so anything above UINT_MAX is truncated and a multiple of 2^32 becomes a limit of 0. The next IO of the group then divides by it in tg_within_iops_limit(). Clamp to UINT_MAX, which means no limit, like tg_set_limit() does on the default hierarchy. Fixes: af133ceb2610 ("blkcg: move blkio_group_conf->iops and ->bps to blk-throttle") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-4-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit c83c406922a2fb59e4abd5fce0624494b4f961d1 Author: Josef Bacik Date: Wed Oct 28 10:41:05 2026 -0600 blk-iocost: free struct ioc after a grace period [ Upstream commit 05ce1df3756773862c056ca8698f8ec4cdd7fe98 ] ioc_qos_prfill() and ioc_cost_model_prfill() take ioc->lock from blkcg_print_blkgs(), which since commit 56cc24f59c14 runs under RCU only. That covers the policy data, which is freed after a grace period, but not the ioc it points to: ioc_rqos_exit() frees that right away, and a concurrent read of io.cost.qos locks freed memory. Free the ioc with kfree_rcu_mightsleep(). Fixes: 56cc24f59c14 ("blk-cgroup: don't nest queue_lock under rcu in blkcg_print_blkgs()") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-3-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit ea58c831fa3e8af216b8a35668f8f8bc9cbedb0a Author: Josef Bacik Date: Wed Oct 28 10:41:04 2026 -0600 blk-cgroup: keep the old blkg while reassociating a bio [ Upstream commit 0e1daaf9b20df2125452846f768a68d8ea280adf ] bio_associate_blkg_from_css() drops the bio's old blkg before it looks up the new one through the css. The css is pinned by the blkg, not by the bio, so if the cgroup is gone the bio may hold the last reference and the blkcg can be freed under blkg_tryget_closest(). The rcu_read_lock() around the whole thing used to cover that, until commit 457d3c4f0fdd dropped it. Put the old blkg after the new one has been looked up. Fixes: 457d3c4f0fdd ("blk-cgroup: don't nest queue_lock under rcu in bio_associate_blkg()") Cc: Tejun Heo Signed-off-by: Josef Bacik Acked-by: Tejun Heo Link: https://patch.msgid.link/20261028164415.1262013-2-axboe@kernel.dk Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 961ff9e3a453665574fa143ea5f496b97350333a Author: Chris Mason Date: Wed Oct 28 10:42:41 2026 -0600 nvmet: don't clear sq->ctrl for a Connect with sqsize 0 [ Upstream commit 89480d137bf0d943a82c64f86ae2407a15276b5e ] nvmet_install_queue() checks sqsize first and jumps to err on zero, where sq->ctrl is set to NULL. Since commit b71df12605ca the cmpxchg() that sets sq->ctrl comes after the checks, so err now undoes a bind that this call never made. Over RDMA a host can send two Connects together and the second is parsed before the first executes, so a second Connect with sqsize 0 clears the sq->ctrl the first one set. The reference it held is never dropped and the controller leaks, with its cntlid, until reboot. The discovery subsystem lets any host do that, 20 connections leak around 10 controllers. A pending AER on such a queue hangs nvmet_sq_destroy() forever, and a queue can keep its "authenticated" mark across a rebind. Return the status directly, as the two checks after it do, so err is only reached after this call's cmpxchg() succeeded. Fixes: b71df12605ca ("nvmet: avoid duplicate qid in connect cmd") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Chris Mason Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 79c4b29b0520d52010caf94bc7b1b44c3e9de6f1 Author: Chris Mason Date: Wed Oct 28 10:42:38 2026 -0600 nvmet-rdma: fix double puts after a failed RDMA WRITE [ Upstream commit f1dac2a2e75260d1466d9f03ccf0944d6d0449a4 ] For a read with T10-PI the RDMA WRITE is posted alone and nvmet_rdma_write_data_done() posts the SEND once the metadata check result is known. By then the request has been completed and its references put: __nvmet_req_complete() put ns->ref and the pc_ref, and nvmet_req_complete() sq->ref, right after queuing the response. The error branch of nvmet_rdma_write_data_done() copies the one from nvmet_rdma_read_data_done() and calls nvmet_req_uninit(), which puts all three again. A WRITE fails whenever the connection ends with reads in flight, which is up to the host. Depending on timing the sq->ref count goes to zero early and the queue is freed under the remaining completions, or never reaches zero and nvmet_sq_destroy() sleeps forever, or percpu_ref_put() dereferences NULL after percpu_ref_exit(). ns->ref stays too low for good, so disabling the namespace hangs too. Reproduced with KASAN over rxe with a test patch forcing the PI path. Drop the nvmet_req_uninit(). The branch still releases the RDMA context and the response, which is all the request owns at that point. Fixes: b09160c3996c ("nvmet-rdma: add metadata/T10-PI support") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Chris Mason Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit b580abd990c0ed27ed1ee9ae9e7c3b99a1b3bd3b Author: Chris Mason Date: Wed Oct 28 10:42:33 2026 -0600 nvmet-rdma: disable interrupts under rsp_wr_wait_lock [ Upstream commit 14e4e09443ac2b5cd90c1e313ee3c0bdd4928e0d ] rsp_wr_wait_lock protects the list of commands waiting for room in the send queue, and it's taken with plain spin_lock(). But nvmet_rdma_queue_response() calls nvmet_rdma_release_rsp() directly if ib_post_send() fails, and that processes the wait list. The call chain starts in nvmet_req_complete(), which for a block device namespace runs from the bio end_io callback, which can be in hard interrupt context. An interrupt that completes a command on a CPU holding the lock for the same queue spins forever. Lockdep over siw with a null_blk namespace: inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage Use spin_lock_irqsave() for both takers. The processing loop still drops the lock, and restores the caller's interrupt state, around nvmet_rdma_execute_command(). Fixes: 8f000cac6e7a ("nvmet-rdma: add a NVMe over Fabrics RDMA target driver") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Chris Mason Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit c388ad09d0758bd31a38310cf76713d55eb1b43c Author: Chris Mason Date: Wed Oct 28 10:42:31 2026 -0600 nvmet-rdma: flush nvmet-wq on module exit [ Upstream commit 2b646788ee24d895b8862514e12a95ce5d72d6cc ] nvmet_rdma_exit() relies on ib_unregister_client() to flush nvmet-wq through nvmet_rdma_remove_one(), but since commit a3dd7d0022c3 that returns at once for a device no longer on device_list. The release work of the last queue takes the device off the list in nvmet_rdma_free_dev() and still has to drop the mutex, free the struct and return through nvmet_rdma_release_queue_work(), so an rmmod in that window frees the module code it's running. Flush nvmet-wq after ib_unregister_client(). No release work can be queued after that point. Fixes: a3dd7d0022c3 ("nvmet-rdma: Don't flush system_wq by default during remove_one") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Chris Mason Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit c93411299eb8c016588452d0af27dd47cba6df0f Author: Josef Bacik Date: Wed Oct 28 10:42:23 2026 -0600 nvme-loop: don't BUG() if a scan runs beside a reset [ Upstream commit 64e21d782020e267ca57765a30216c38b34f296d ] A reset sets queue_count to 1 while it destroys the I/O queues and counts it back up when the new ones are made, and it doesn't stop the scan work. A new namespace found in that window trips the check in nvme_loop_init_hctx() for every hctx but the first: kernel BUG at drivers/nvme/target/loop.c:224! nvme_loop_init_hctx+0x7d/0x80 __blk_mq_realloc_hw_ctxs+0x3af/0xa80 nvme_alloc_ns+0x1a2/0x22f0 The check protects nothing. ctrl->queues has nr_io_queues + 1 entries for the life of the controller, the tag set never has more hardware queues than that, and nvme_loop_queue_rq() rejects requests until the controller is live again. Remove it. Fixes: 3a85a5de29ea ("nvme-loop: add a NVMe loopback host driver") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 23e3b95e11332ae0a0f16c38be566d0f1300ad05 Author: Josef Bacik Date: Wed Oct 28 10:42:21 2026 -0600 nvmet-tcp: don't read a removed port at Connect time [ Upstream commit 3f98ce65a87979e881343dcf082c9595ec90ddc7 ] nvmet_tcp_alloc_cmd() takes the nvmet port of a command from queue->port, and the commands of a queue are allocated from the io work when the Connect arrives. nvmet_tcp_remove_port() shuts down the queues that have no controller yet and frees the port without waiting for them, they're released later from a work. An io work handling a Connect at that moment reads the freed port for every command of the queue and hands the result to the core. Note the nvmet port in the queue at allocation. It outlives the transport port. Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit a6434048f84d38c19201508f1471ace28d94b58d Author: Josef Bacik Date: Wed Oct 28 10:42:19 2026 -0600 nvmet: fix NULL dereference in debugfs host_traddr [ Upstream commit 81ce4d9bbe8cf47d4b023e932ee29b22367545e6 ] The host_traddr callbacks of tcp, rdma and fc take the host address from the transport queue around ctrl->sqs[0], which nvmet_sq_destroy() clears when the admin queue goes away while the controller lives on with its I/O queues. A host that closes the admin connection and keeps an I/O queue leaves such a controller behind, and reading its host_traddr in debugfs dereferences a near-NULL pointer: BUG: kernel NULL pointer dereference, address: 00000000000002e0 RIP: 0010:nvmet_tcp_host_port_addr+0x19/0x50 [nvmet_tcp] Don't ask the transport if there's no admin queue. Nothing holds the queue for debugfs, so a reader that's past the check when the queue goes away is still on its own. Fixes: 7e5c3de3f2f2 ("nvmet: add 'host_traddr' callback for debugfs") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit ef3dc45850555cf0b00e019372d0ceab29c9ed5d Author: Josef Bacik Date: Wed Oct 28 10:42:16 2026 -0600 nvmet-tcp: stop listening when a port is removed [ Upstream commit ece0f4e67f08792c8572080fb0fcc231554f08ca ] nvmet_tcp_accept_work() accepts until there's nothing left. A connection that is already dead when accepted is torn down right there, which takes a few ms, and more can arrive meanwhile. nvmet_tcp_remove_port() waits for the work with cancel_work_sync(), so someone opening and closing connections in a loop keeps the removal from finishing. It holds nvmet_config_sem for writing, so nothing can be configured and no port answers a Connect until the flood stops. No secret needed, just an admin removing the port at the wrong time. Shut the listening socket down first. Pending connections are dropped, as they were on release, and the next kernel_accept() fails and ends the work. Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target driver") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 90a6757a81b7c55ee9c017bce2e58143af2f9adf Author: Josef Bacik Date: Wed Oct 28 10:42:15 2026 -0600 nvmet: fix NULL dereference of PCI endpoint targets [ Upstream commit 4a5ace11b5a367270bc86097d31c35cb61890a95 ] nvmet_pci_epf_create_ctrl() calls nvmet_alloc_ctrl() without a queue, the admin queue comes later from the host. nvmet_alloc_ctrl() passes args->sq to nvmet_queue_tls_keyid(), which with CONFIG_NVME_TARGET_TCP_TLS dereferences it, so every PCI endpoint controller creation crashes on such a kernel. The debugfs tls_key file passes ctrl->sqs[0] to the same function, which is NULL until the admin queue exists and again once a fabrics host has closed it while keeping an I/O queue. A queue that isn't there has no TLS key. Fixes: fa2e0f8bbc68 ("nvmet-tcp: support secure channel concatenation") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 4fa202329187f6cdce942ee66ead0411ab2dbb14 Author: Josef Bacik Date: Wed Oct 28 10:42:08 2026 -0600 nvmet-auth: take only AUTH_Negotiate for a negotiation [ Upstream commit 7dd1d31e2e3124f331056d68af9a48c501b37e02 ] nvmet_execute_auth_send() hands a common-type message to nvmet_auth_negotiate() if its ID is AUTH_Negotiate or matches the step the queue is in. The second case is wrong: the only other common-type message a host sends is AUTH_Failure2, and no queue waits in that step. A host can name the step on purpose though, and its message is then treated as a new AUTH_Negotiate without the work that goes with a new transaction, like reloading the keys on the admin queue. Fail every other common-type message, as AUTH_Failure2 already is. Fixes: db1312dd9548 ("nvmet: implement basic In-Band Authentication") Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit ab80320e0586f04864ad5dd7b4d2873839fcd540 Author: Josef Bacik Date: Wed Oct 28 10:41:48 2026 -0600 nvmet: don't truncate the length of big discards [ Upstream commit 424bd0e98ca4f227d424c3543166a9982ca45819 ] nvmet_bdev_execute_discard() shifts the 32-bit nlb of a DSM range into sectors before widening it to sector_t, so on a 4k namespace the top bits are lost. A 3 TiB range discards 1 TiB, a 2 TiB range discards nothing, and both complete with success. The target announces no DMRSL, and hosts other than Linux (and nvme dsm passthrough) do send ranges that big. Widen before the shift. Fixes: a07b4970f464 ("nvmet: add a generic NVMe target") Cc: Christoph Hellwig Cc: Sagi Grimberg Cc: Chaitanya Kulkarni Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 6d6db00776fee82707aa55afccd0d1d9adf3fd4b Author: Naveen Kumar Chaudhary Date: Wed Jun 17 07:58:20 2026 +0530 kdb: unify CMD_BUFLEN definition into kdb_private.h [ Upstream commit 2a052074582d976bfa81e41a0337d8ae6dd1dc65 ] CMD_BUFLEN was defined separately in kdb_io.c (256) and kdb_main.c (200), causing kdb_main.c to use the wrong size when formatting the prompt string into kdb_prompt_str (which is 256 bytes). Move CMD_BUFLEN (256) into kdb_private.h so all users share a single consistent definition, and remove the local definitions from both files. Fixes: 5d5314d6795f ("kdb: core for kgdb back end (1 of 2)") Signed-off-by: Naveen Kumar Chaudhary Link: https://lore.kernel.org/r/l6b6bomrw3bvkehlv73fyghk6loz6jpdwqk5c4nthnhl7j7kzk@4jjhfpzv5zon Signed-off-by: Daniel Thompson Signed-off-by: Sasha Levin commit 3ba8d7bd47fc110fd4b598e11160722e9d15b934 Author: Naveen Kumar Chaudhary Date: Wed Jun 17 07:19:32 2026 +0530 kdb: fix memory leak in kdb_setenv() when environment is full [ Upstream commit 22d59ccad2935b7dea7f818793b739343de433a8 ] When kdb_setenv() fails to find a free slot in __env[], the function returns KDB_ENVFULL without freeing the previously allocated string buffer 'ep', leaking memory on every failed call. Add the missing kfree(ep) before returning KDB_ENVFULL. Fixes: a30d4ff8193e ("kdb: remove usage of static environment buffer") Signed-off-by: Naveen Kumar Chaudhary Reviewed-by: Douglas Anderson Link: https://lore.kernel.org/r/mbwhul34esbxkdbmlbjaquv5lgyzznn6pdapohry3lsiidbz6n@zucvm5os363q Signed-off-by: Daniel Thompson Signed-off-by: Sasha Levin commit c004531360acd098a25b10c494665bb3b81967cf Author: Surabhi Gogte Date: Tue Sep 22 14:07:17 2026 -0600 nvme-tcp: refactor I/O queue setup path [ Upstream commit c58465c1e3d6f6fa720c922781cad4330a573cfb ] Split the I/O queue setup helpers apart so that the individual steps can be called directly from nvme_tcp_configure_io_queues(): - Queue count negotiation moves out of nvme_tcp_alloc_io_queues() into a new nvme_tcp_set_io_queue_count(), leaving the allocator with just the per-queue allocation loop. - TLS PSK validation moves out of __nvme_tcp_alloc_io_queues() into a new nvme_tcp_tls_check_psk(). - nvme_tcp_configure_io_queues() now calls the three steps directly in the same order as before. Signed-off-by: Surabhi Gogte Reviewed-by: Hannes Reinecke Reviewed-by: Sagi Grimberg Signed-off-by: Keith Busch Stable-dep-of: 12c20e290356 ("nvme-tcp: skip TLS control records while waiting for the ICResp") Signed-off-by: Sasha Levin commit 3783c349a3de6a1d994b50b7a01402e682be1d87 Author: Christian Aurich Zanettini Martins Date: Sat Oct 24 18:37:37 2026 -0300 nvme-rdma: fix NULL metadata_sgl dereference with T10-PI [ Upstream commit 557114b52c1d73f45c603337ac3465bba6667e34 ] Since commit 2a8513091d2f ("nvme-rdma: parallelize I/O queue allocation and startup") the I/O tag set is allocated before the I/O queues. nvme_rdma_init_request() only sets req->metadata_sgl if queue->pi_support is set, but pi_support is only set later by nvme_rdma_alloc_queue(), so every I/O request is left with a NULL metadata_sgl. With an RDMA device that supports integrity and a namespace formatted with protection information, nvme_rdma_dma_map_req() then dereferences the NULL pointer on the first integrity I/O, already during the namespace scan when there is more than one I/O queue. Queues that a later reconnect adds for the first time have the same problem. Check queue_idx and the controller's max_integrity_segments instead, which is what nvme_rdma_alloc_queue() derives pi_support from. Fixes: 2a8513091d2f ("nvme-rdma: parallelize I/O queue allocation and startup") Signed-off-by: Christian Aurich Zanettini Martins Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 0c9d85e54196fd69810017a2624614fb6619cb8d Author: Rongzheng Wang Date: Sat Oct 24 03:18:51 2026 +0800 nvmet: use the enabled transport when disabling a port [ Upstream commit 60385038754ed9fb05dab127b35f88c702252505 ] nvmet_disable_port() looks up the transport from the current disc_addr.trtype, while nvmet_enable_port() records the transport in port->tr_ops. If trtype is changed while a port is being enabled, the port can be removed through a different transport, passing the private data of the original transport to the wrong ->remove_port(). The same mismatch is reachable with loop and RDMA: loop add_port() leaves port->priv NULL, and RDMA remove_port() dereferences it. Use port->tr_ops for removal and serialize trtype changes with nvmet_config_sem in nvmet_addr_trtype_store(), so the transport that added the port is also the one that removes it. Fixes: 8f000cac6e7a ("nvmet-rdma: add a NVMe over Fabrics RDMA target driver") Reported-by: syzbot+c98b21427617af7f547a@syzkaller.appspotmail.com Link: https://syzkaller.appspot.com/bug?extid=c98b21427617af7f547a Link: https://lore.kernel.org/all/6acbc835.a150a118.27e199.003c.GAE@google.com/T/ Signed-off-by: Rongzheng Wang Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 50d500af2b01e23405e91d862ed667c373921b34 Author: Qing Zhang Date: Fri Oct 23 19:29:28 2026 +0800 nvmet: protect nvmet_ports_list with nvmet_config_sem [ Upstream commit cead6beb89256ae7145b65fbe8e8a5fedba4a47c ] Readers of nvmet_ports_list (e.g. nvmet_subsys_disc_changed()) hold nvmet_config_sem and assert it via lockdep. The writers -- nvmet_ports_make() and nvmet_port_release() -- do not take the lock; they rely on the parent directory's VFS inode lock for serialization, which is an implementation detail of configfs and not a guaranteed contract. Align the writers with the lock the readers already require. Also move list_add() in nvmet_ports_make() to after the port is fully initialized: the old position published the port on the global list before INIT_LIST_HEAD(&port->subsystems), so a concurrent reader could traverse uninitialized list heads. flush_workqueue() in nvmet_port_release() stays outside the semaphore to avoid a lock dependency on nvmet_wq. Fixes: b662a078576e ("nvmet: enable Discovery Controller AENs") Reviewed-by: Maurizio Lombardi Signed-off-by: Qing Zhang Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 6e0496f9213d3b37c4b3d0fe490f69386b9f845e Author: Maurizio Lombardi Date: Fri Oct 23 11:48:05 2026 +0200 nvme-pci: fix early boot hang with nvme.quirks parameter [ Upstream commit ed75528c095bc7760a3cf34a3f3e2ec7a59eb285 ] Passing nvme.quirks on the kernel command line causes a silent boot hang when the NVMe driver is compiled as a built-in module. This happens because the parameter is currently registered using module_param_cb(). For built-in modules, this macro flags the parameter to be evaluated at initcall level -1. Consequently, quirks_param_set() is called before the memory allocators are initialized. Fix this by replacing module_param_cb() with device_param_cb(). This defers the parameter parsing to initcall level 6, guaranteeing that the system memory allocators are fully functional before the quirk string is parsed and allocated. Fixes: 7bb8c40f5ad8 ("nvme: add support for dynamic quirk configuration via module parameter") Reviewed-by: Laurence Oberman Signed-off-by: Maurizio Lombardi Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 5f981beb9a8d050a7cabd7184cf4c96643eff9a7 Author: Avi Weiss Date: Thu Oct 22 09:29:23 2026 +0300 nvmet: prevent double-free after metadata SGL allocation failure [ Upstream commit 2f61b9d1d54edf75a352c43eebe3804144b5d44e ] If metadata SGL allocation fails, nvmet_req_alloc_sgls() frees req->sg without clearing it. The RDMA error completion path later frees the same scatterlist again. Use nvmet_req_free_sgls() instead so that the scatterlist pointers and counts are cleared before response cleanup. Fixes: c6e3f13398123 ("nvmet: add metadata support for block devices") Signed-off-by: Avi Weiss Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit b137593b022753fdcace4c7be758d6a7b3555c20 Author: Andrea Parri Date: Thu Oct 22 15:29:31 2026 +0200 nvmet: zns: reject a NUMD whose byte count wraps [ Upstream commit 12740bec646dafe009a7d9a4d22d3495ef1ea5cd ] Zone Management Receive computes its buffer size as (numd + 1) << 2 in u32, in nvmet_bdev_validate_zone_mgmt_recv(), nvmet_bdev_zone_zmgmt_recv_work() and nvmet_bdev_execute_zone_mgmt_recv(). NUMD is a 32-bit dword count, so any NUMD from 0x3fffffff up wraps. The data length check in nvmet_bdev_execute_zone_mgmt_recv() sees the same wrapped value, so such a command can pass it. A data length that does not match the wrapped size is already rejected by that check, with Data SGL Length Invalid. Every site agrees on the wrapped size, so the target zeroes and fills only that many bytes and nothing leaks, but it answers a command whose NUMD asks for 4 GiB or more. Reject a NUMD from U32_MAX / 4 up with Invalid Field at the start of nvmet_bdev_execute_zone_mgmt_recv(), before this handler or its work item computes the byte count. A size_t computation would still wrap on 32-bit kernels, where nvmet_check_transfer_len() and req->transfer_len are 32 bits wide. nvmet_io_cmd_transfer_len() in core.c, which the pci-epf transport uses to size its buffer, computes the same expression before this handler runs. Return 0 there for such a NUMD, so pci-epf allocates no buffer and the handler then rejects the command. Tested over the loop, tcp, rdma and fc transports with a zoned null_blk namespace: a wrapping NUMD, sent with a data length that matches the wrapped size, was accepted before this patch and now fails with Invalid Field, while ordinary NUMD values still succeed. The core.c change only affects pci-epf and is build-tested only. Fixes: aaf2e048af27 ("nvmet: add ZBD over ZNS backend support") Signed-off-by: Andrea Parri Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit c612381761d07f6629012955f75d2db0a73074c8 Author: bui duc phuc Date: Fri Oct 23 17:28:18 2026 +0700 ASoC: xilinx: formatter_pcm: Fix read-modify-write of AUD_CTRL in hw_params [ Upstream commit 3b54e739273752b370e49b09976da152fa3b802c ] xlnx_formatter_pcm_hw_params() does a read-modify-write on XLNX_AUD_CTRL but only ORs in the new data width and active channel values without clearing the old ones. If hw_params is called more than once on an open stream, these fields may retain bits from the previous configuration, resulting in an incorrect sample width or channel count. Clear both fields before writing the new values, and use FIELD_PREP() so the values cannot spill into neighbouring bits. Fixes: 6f6c3c36f091 ("ASoC: xlnx: add pcm formatter platform driver") Signed-off-by: bui duc phuc Reviewed-by: Gaddipati, Naveen Link: https://patch.msgid.link/20261023102818.523331-1-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e98aa58eba91af2d14c7f5f1780f8efe1070be4f Author: Sicong Huang Date: Sat Oct 24 12:49:03 2026 +0800 nfp: flower: fix use-after-free in neighbour update work [ Upstream commit 083aaafd453c3fb14411519d6ada9a8917573fdb ] The netevent notifier handles neighbour updates and redirects by queuing nfp_tun_neigh_update() on system_highpri_wq. Each work item holds a reference to the neighbour, but only stores a pointer to the flower app. During device removal, nfp_tunnel_config_stop() unregisters the notifier. This waits for notifier callbacks to return, but does not wait for the work they queued. The teardown then frees app->priv and app without waiting for these work items. Flushing cmsg_work in nfp_flower_clean() does not cover the neighbour update work. A pending work item can therefore run after the app has been freed. Its call to nfp_flower_get_port_id_from_netdev() can then access freed memory while checking whether the neighbour's device can be offloaded. Even notifications for unrelated devices can reach this check. The same problem affects shutdown and probe error paths that tear down the app after the netevent notifier has been registered. One possible interleaving is shown below. The neighbour belongs to another network device that remains registered. CPU0 (remove) CPU1 (notifier / kworker) nfp_tun_neigh_event_handler() queue_work(system_highpri_wq, ...) return /* Work has not run yet. */ nfp_tunnel_config_stop() unregister_netevent_notifier() /* Notifier callbacks have finished, but work may be pending. */ nfp_flower_clean() vfree(app->priv) app->priv = NULL nfp_app_free() kfree(app) nfp_tun_neigh_update() app = update_work->app nfp_flower_get_port_id_from_netdev() app->priv /* use-after-free */ The work items are allocated per event and free themselves, so they cannot be cancelled individually, and flushing system_highpri_wq is not allowed. Use a dedicated workqueue for neighbour updates instead. In nfp_tunnel_config_stop(), unregister the notifier and destroy the workqueue before cleaning up the tunnel state. This prevents new work from being queued and waits for pending and running work to finish while the app and its resources are still valid. Found by code inspection. Fixes: 0ad722bd9ee3 ("nfp: flower: fix for take a mutex lock in soft irq context and rcu lock") Signed-off-by: Sicong Huang Reviewed-by: Daniel Machon Signed-off-by: Dave Miller Signed-off-by: Sasha Levin commit ad21c227c49fd5fb6d6eca4b7eea9e559893de13 Author: Namjae Jeon Date: Tue Oct 27 14:12:59 2026 +0900 ksmbd: return complete and aligned stream information [ Upstream commit 206fc30f71b005156085fd8523ccc84a2c67791b ] FILE_STREAM_INFORMATION responses are assembled without aligning entries and truncated to the client buffer length after the fact. A short query can therefore return STATUS_BUFFER_OVERFLOW with an incomplete entry and a nonzero NextEntryOffset, which clients may reject as an invalid network response. Standalone queries can also exhaust the server response buffer and silently omit streams while reporting success. Allocate the same large response buffer used by other variable-length QUERY_INFO classes for stream queries. Pack only complete entries within the requested output length and available response space, aligning each entry to eight bytes and sizing names after UTF-16 conversion. Return STATUS_BUFFER_OVERFLOW when more entries remain, using an SMB2 error response if no entry fits. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Fixes: 6b8b79226bc3 ("ksmbd: fix partial file information responses") Link: https://github.com/namjaejeon/ksmbd/issues/522#issuecomment-6391152923 Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit d1a31f1523543513da5b285d82598977303011c7 Author: Rishikesh Jethwani Date: Tue Oct 20 15:44:59 2026 -0600 tls: keep TX and RX hardware offload on the same device [ Upstream commit 1c8a70075235cd733095532a97f2405037c52a7b ] After TX is offloaded on device A, a route change, or a change in the usable-slave set of an 802.3ad or balance-xor (layer3+4) bond, can make RX setup program device B. tls_device_attach() sees the existing TLS destructor and keeps ctx->netdev pointing at A. The RX driver state on B is then untracked: tls_dev_resync() and tls_dev_del() are invoked on A for a context it never created, and neither socket close nor NETDEV_DOWN on B calls tls_dev_del() for B, so the driver context leaks. The reverse setup order has the same problem. Check the shared device binding under device_offload_lock before each tls_dev_add(). Permit the first attachment and a second direction on the same device. Reject a different device, including when the old binding was cleared by NETDEV_DOWN: the TLS destructor remains installed and tls_device_attach() cannot establish a new binding. Setup then falls back to software for the requested direction. The RX check precedes allocation and software setup. TX uses its existing resource unwind path without calling the driver. Document the shared binding and clarify that fallback is per direction. This issue was discovered during code review and subsequently reproduced on hardware using mlx5 and TLS 1.2 AES-GCM-128. Changing the route between TX and RX setup installed the second direction on a different device. Driver traces showed successful adds on both devices, but both deletes at socket close targeted the first device, leaving an orphaned context on the second. Both setup orders reproduced the leak, even though all current core TLS context counters returned to zero. No crash was observed. With the fix, the same tests correctly fall back to software for the second direction and leave no orphaned hardware context. Fixes: 4799ac81e52a ("tls: Add rx inline crypto offload") Signed-off-by: Rishikesh Jethwani Signed-off-by: Dave Miller Signed-off-by: Sasha Levin commit b4dd95d47cfdc374740831ac6f16136d1b9e23c9 Author: Peter Morrow Date: Tue Oct 20 17:42:39 2026 +0100 net/mlx4: always create the eth and ib auxiliary devices [ Upstream commit 557d80138618b9d17407733d4ec25b33d3971d60 ] Since commit 7d22b1cb9d84 ("mlx4: Connect the infiniband part to the auxiliary bus"), mlx4_core creates the "ib" auxiliary device only for an IB port or a device that advertises IBoE. Before it, each mlx4 interface was offered every device and decided in its own add callback. mlx4_ib_add() accepted Ethernet ports without IBoE and registered them for raw packet QPs only. ConnectX-3 VFs on Azure have an Ethernet port and no IBoE, so since v6.6 they get no RDMA device. DPDK's mlx4 PMD, which needs only raw packet QPs, then cannot open them: net_mlx4: cannot access device, is mlx4_ib loaded? Restore the old behaviour by creating both auxiliary devices for every device and letting mlx4_en and mlx4_ib decide in probe, as their add callbacks did. mlx4_ib_probe() returns -ENODEV when there are no usable ports, and mlx4_en_probe() binds a device without Ethernet ports but creates no netdevs, as mlx4_en_add() did. Tested on 6.12.111 on an Azure VM with two ConnectX-3 VFs: each gets an eth and an ib auxiliary device, and DPDK attaches both VFs and passes traffic through them. Fixes: 7d22b1cb9d84 ("mlx4: Connect the infiniband part to the auxiliary bus") Closes: https://lore.kernel.org/r/20261014133951.3219055-1-pdmorrow@gmail.com Suggested-by: Leon Romanovsky Assisted-by: LLM Signed-off-by: Peter Morrow Reviewed-by: Simon Horman Reviewed-by: Daniel Machon Acked-by: Tariq Toukan Signed-off-by: Dave Miller Signed-off-by: Sasha Levin commit c16a49677579c5591e4355fae1a7240d32f269ec Author: Slawomir Stepien Date: Wed Jul 15 12:29:34 2026 +0000 fs/ntfs3: handle partial allocation in attr_data_get_block_locked() [ Upstream commit ec67e8d61eb40a4e69b16d8931da217352447367 ] When allocating clusters for a sparse or compressed attribute in attr_data_get_block_locked(), the requested virtual cluster number (vcn0) is aligned down to a frame boundary (vcn). The function then attempts to allocate a full frame of clusters. If the disk is nearly full and highly fragmented, attr_allocate_clusters() might only manage to allocate a small fragment and return success with a partial allocation length. If this partial allocation is so small that it does not even reach the originally requested vcn0 (i.e., end <= vcn0), vcn0 remains unallocated (a sparse hole). When the code subsequently calls run_lookup_entry() for vcn0, it finds the original SPARSE_LCN entry, which triggers a WARN_ON(1). Fix this by adding a check to verify if the partial allocation reached vcn0. If it did not (vcn0 >= end), treat this as an -ENOSPC failure and jump to the undo1 label. This safely rolls back the partial allocation, restores the original size, and repacks the runs, leaving the inode in a consistent state before returning the error to the caller. WARNING: fs/ntfs3/attrib.c:1236 at attr_data_get_block_locked+0x1980/0x25d0 fs/ntfs3/attrib.c:1236 RIP: 0010:attr_data_get_block_locked+0x1980/0x25d0 fs/ntfs3/attrib.c:1236 Call Trace: attr_data_get_block+0x1f1/0x2a0 fs/ntfs3/attrib.c:979 ntfs_fallocate+0xd3d/0xf70 fs/ntfs3/file.c:670 vfs_fallocate+0x663/0x7f0 fs/open.c:338 ksys_fallocate fs/open.c:362 [inline] __do_sys_fallocate fs/open.c:367 [inline] __se_sys_fallocate fs/open.c:365 [inline] __x64_sys_fallocate+0xbf/0x110 fs/open.c:365 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f Fixes: 099ef9ab9203 ("fs/ntfs3: implement iomap-based file operations") Assisted-by: Gemini:gemini-3.1-pro-preview Gemini:gemini-3-flash-preview syzbot Reported-by: syzbot+7be6ad5cb228286af3e3@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=7be6ad5cb228286af3e3 Link: https://syzkaller.appspot.com/ai_job?id=3c9dee6e-001d-4972-8bf6-f6c960708246 Signed-off-by: Slawomir Stepien Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit 7298c7d60108c72400f4cdd028ae481265cd080a Author: Yun Zhou Date: Wed Jul 1 09:30:49 2026 +0800 ntfs3: release ni_lock before dir_emit in ntfs_readdir to fix deadlocks [ Upstream commit 7a5aa6c45072b54c8d97c5d54bbdf18aabf0ee6d ] ntfs_readdir() holds ni_lock while calling ntfs_read_hdr(), which calls dir_emit() to copy directory entries to userspace. If the user buffer triggers a page fault, the fault handler may need mmap_lock or mapping->invalidate_lock, creating lock-order inversions with paths that acquire those locks before ni_lock (e.g. ntfs_fallocate, mmap). Fix by releasing ni_lock before calling ntfs_read_hdr(): - For non-root index nodes, indx_read_ra() returns data in a kmalloc'd buffer (node->index) that remains valid after ni_unlock. - For the root index header, the data lives in the main MFT record whose lifetime is bound to the inode. i_rwsem shared prevents concurrent directory modifications, so it is safe to access after ni_unlock. Reported-by: syzbot+7736960b837908f3a81d@syzkaller.appspotmail.com Reported-by: syzbot+262a71e9d2faf8747085@syzkaller.appspotmail.com Reported-by: syzbot+cfc6e8106bec1c524f7d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=7736960b837908f3a81d Closes: https://syzkaller.appspot.com/bug?extid=262a71e9d2faf8747085 Closes: https://syzkaller.appspot.com/bug?extid=cfc6e8106bec1c524f7d Fixes: d62cf685d12e ("fs/ntfs3: hold ni_lock across readdir metadata walk") Signed-off-by: Yun Zhou Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit 312d2d9bf2e887bb8f7e885356c694d13240ec5e Author: Konstantin Komarov Date: Thu Oct 8 00:06:32 2026 +0200 fs/ntfs3: take ni_lock() once in ntfs_readdir() [ Upstream commit fb058ccff5799ac4eb90ee183419835d3c0072f5 ] ntfs_readdir() took ni_lock() to load subrecords, dropped it, and then took it again for the index walk. The double-checked pattern around ni_load_all_mi() and the separate out_unlock label exist only because of that split. Take the lock once for the whole function and drop the second acquisition, the inner re-check and the duplicate error label. Signed-off-by: Konstantin Komarov Stable-dep-of: 7a5aa6c45072 ("ntfs3: release ni_lock before dir_emit in ntfs_readdir to fix deadlocks") Signed-off-by: Sasha Levin commit edf4ae4ba4e7fabc1003c66aacaad2529769573f Author: Feng Yang Date: Wed Oct 28 11:19:33 2026 +0800 bpf: Fix out-of-bounds btf->types write for split BTF [ Upstream commit 6c476d2b73056ed151c3f8b884c627c75999ed7c ] btf_add_type() stores the types of a BTF in btf->types[], which can hold at most BTF_MAX_TYPE entries. The types of a split BTF get IDs start_id .. start_id + nr_types - 1, so only BTF_MAX_TYPE - start_id of them fit, but neither the limit check nor the size used to grow the array accounts for start_id: the check is an equality test against BTF_MAX_TYPE ('start_id + btf->types_size == BTF_MAX_TYPE') and the new size is clamped to BTF_MAX_TYPE. The check therefore only fires if the array happens to grow to exactly BTF_MAX_TYPE - start_id entries. Otherwise, if the module has more than BTF_MAX_TYPE types, the array is filled up to BTF_MAX_TYPE entries. The next type that needs to be added reallocates the array to the same size, after which btf->types_size no longer equals btf->nr_types and the growth path is not taken anymore, so every following type is written past the end of the array: BUG: unable to handle page fault for address: ffffc90006200000 RIP: 0010:btf_add_type+0x74/0x270 Call Trace: btf_check_all_metas btf_parse_module Bound both the array size and the limit check by BTF_MAX_TYPE - start_id. Base BTF (start_id == 0) is unaffected. Fixes: 951bb64621b8 ("bpf: Add in-kernel split BTF support") Signed-off-by: Feng Yang Signed-off-by: Alexei Starovoitov Reviewed-by: Mahe Tardy Acked-by: Ihor Solodrai Link: https://patch.msgid.link/20261028031933.277550-1-yangfeng59949@163.com Signed-off-by: Sasha Levin commit 009c5c6acd08f93a9bbf55c0881ae06cc221247a Author: Alexei Starovoitov Date: Tue Oct 27 19:03:13 2026 +0000 bpf: Keep stack arguments in arch_bpf_timed_may_goto() [ Upstream commit 4d0f560f4926417f010ce38f8628c41bcad29c9f ] The JITs pass the first stack arguments of a call in registers: x86-64 r9 argument 6 arm64 x5-x7 arguments 6-8 riscv64 a5-a7 arguments 6-8 '*(u64 *)(r11 - 8) = rX' writes such a register in the caller. 'rX = *(u64 *)(r11 + 8)' reads it in the callee. A call changes these registers. Thus the verifier accepts no call between the write and the call of the callee, and no call in the callee before the read. may_goto is not a call for the verifier. But one time in 65535 iterations it calls arch_bpf_timed_may_goto(), and this function calls C code. It saves R0-R5 only. *(u64 *)(r11 - 8) = 0 ; the verifier: argument 6 is 0 call sub sub: 1: may_goto 2f ; C code changes r9 goto 1b 2: r2 = *(u64 *)(r11 + 8) ; r2 is a kernel address r1 = map_value r1 += r2 *(u64 *)(r1 + 0) = 0 On x86-64 the C code changes r9 when the time of may_goto is up. With the hpet clocksource a look at the clock changes r9 too. The prog above crashes the kernel. LLVM does not emit such code: it reads stack arguments at the entry of a function, and it writes them immediately before the call. Save and restore these registers too. The cost is 2 insns on x86-64, 4 on arm64 and 6 on riscv64, one time in 65535 iterations. Fixes: 324c3ca6eed6 ("bpf,x86: Implement JIT support for stack arguments") Fixes: 235b2fe772f5 ("bpf, arm64: Add JIT support for stack arguments") Fixes: ba754185f902 ("riscv, bpf: Add BPF stack arguments support for RV64 JIT") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261027190314.1440199-19-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 357947420496ba49df729225faeaa5a7e497797b Author: Pu Lehui Date: Sat Sep 5 08:58:55 2026 +0000 riscv, bpf: Remap BPF_REG_0 and RV_REG_TCC [ Upstream commit f80a09c486e7c2a0e4ca43dbff7570df668484c5 ] To prepare for supporting bpf stack arguments and unifying the calling convention between bpf2bpf calls and kfunc calls, remap BPF_REG_0 to t6 and RV_REG_TCC to t5. In the riscv abi, a0-a7 are designated for function argument passing. Freeing a5 and a6 allows bpf2bpf calls to pass extra arguments (6th to 8th) via a5-a7 consistently with kfuncs. Signed-off-by: Pu Lehui Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/20260905085857.14143-2-pulehui@huaweicloud.com Signed-off-by: Kumar Kartikeya Dwivedi Stable-dep-of: 4d0f560f4926 ("bpf: Keep stack arguments in arch_bpf_timed_may_goto()") Signed-off-by: Sasha Levin commit b64003335d1abfac3741930e2ef10dc0617aa411 Author: Chen Pei Date: Wed Aug 19 20:09:24 2026 +0800 selftests/bpf: Enable arena LDSX tests for riscv64 [ Upstream commit 8f2087a1b43bbc57231eca4b99415cc18fb3429a ] Now that the riscv64 JIT supports signed arena loads (BPF_PROBE_MEM32SX), enable the arena LDSX tests on riscv64: add JIT disassembly assertions for arena_ldsx_disasm (arena base in s7, add into t2, sign-extending lw/lh/lb loads) and run arena_ldsx_exception and arena_ldsx_s8/s16/s32 on riscv64. Signed-off-by: Chen Pei Tested-by: Pu Lehui Reviewed-by: Pu Lehui Acked-by: Björn Töpel Link: https://lore.kernel.org/bpf/1bab696ec36f196fa6ec74a0f056030b39730da7.1787140923.git.cp0613@linux.alibaba.com Signed-off-by: Kumar Kartikeya Dwivedi Stable-dep-of: 4d0f560f4926 ("bpf: Keep stack arguments in arch_bpf_timed_may_goto()") Signed-off-by: Sasha Levin commit 49a524e41033800e8f3c47cb0ae9a737980a0ecb Author: Ömer Mete Kaya Date: Sat Oct 24 11:42:08 2026 +0300 usbnet: fix EVENT_RX_PAUSED race in usbnet_skb_return() [ Upstream commit 67ae1b80cf73f592b35e4b5e5001a24d6d6c8637 ] On SMP, usbnet_skb_return() can observe EVENT_RX_PAUSED as set on CPU0 while usbnet_resume_rx() clears the flag and drains rxq_pause on CPU1. The skb can then be queued after the drain has completed and remain stranded until the next MTU change or device stop. Synchronize the EVENT_RX_PAUSED state transition and paused-queue dequeue operations with rxq_pause.lock. In usbnet_resume_rx() splice the paused queue into a local queue under the lock, then drain the local queue lock-free. In usbnet_skb_return() use a double-check pattern under rxq_pause.lock on the slow path, keeping the normal RX fast path lock-free. Use spin_lock_irqsave() to match the lockdep class shared with other sk_buff_head locks taken from hardirq context in defer_bh(). Discovered by Sashiko, not triggered, not tested on real hardware. Fixes: 43daa96b166c ("usbnet: Stop RX Q on MTU change") Signed-off-by: Ömer Mete Kaya Link: https://patch.msgid.link/20261024084538.256596-1-omermetekaya0@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 33ee2f54ccf57bdad9d748dfe6ba154d2bdfc14d Author: Florian Fainelli Date: Mon Oct 26 09:47:33 2026 -0700 net: dsa: mv88e6xxx: fix 88E6171 statistics type [ Upstream commit df66431f39426b685f6693f0731cd5881c51679c ] The 88E6171 uses the 6095 statistics operations, which advertise and name BANK0 and PORT counters. Its stats_type bitmap instead selects BANK0 and BANK1. Since statistics collection started using that bitmap, it has written a different set of counters from the one advertised to ethtool. For this chip, get_sset_count() accounts for 30 BANK0 counters, three PORT counters and five ATU/VTU counters. Collection instead writes 30 BANK0 counters, 26 BANK1 counters and five ATU/VTU counters: 61 entries rather than the advertised 38. This mislabels the tail of the returned statistics and writes past the advertised statistics buffer. Select BANK0 and PORT counters to match the chip's statistics operations and restore the filter used before the bitmap was introduced. Tested on an EA4500, where the two-bridge forwarding and multicast snooping tests now pass their hardware counter checks. Fixes: 5595e3613ea7 ("dsa: mv88e6xxx: Move available stats into info structure") Reviewed-by: Andrew Lunn Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261026164733.737299-3-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 457194c2ec993569a3002dd5fbb93bb8a0d9125c Author: Florian Fainelli Date: Mon Oct 26 09:47:32 2026 -0700 net: dsa: mv88e6xxx: fix 6351 family statistics snapshot [ Upstream commit 9663edfa71e8807890203578dab6db60c6b548c4 ] The 88E6171, 88E6175, 88E6350 and 88E6351 take the port number in the low bits of the statistics operation register. The 6320 snapshot helper instead encodes the port as (port + 1) << 5. On an EA4500 with an 88E6171, this causes ethtool -S to return physical port 0's MIB counters for every user port. Traffic on other ports does not update their reported hardware counters. Before the snapshot operation was moved into the chip operations, only the 6320 and 6352 families used the shifted encoding. The refactoring incorrectly assigned that encoding to all four 6351 family chips. Use the unshifted snapshot helper for the entire 6351 family. This matches the Marvell DSDT statsCapture() implementation, which uses the raw port number for chips outside DEV_RMON_PORT_BITS, including these four chips. The original 88E6171 change was tested on an EA4500: pings through different switch ports updated only the corresponding port's hardware counters. The other three chips have not been hardware tested. Fixes: a605a0fe7115 ("net: dsa: mv88e6xxx: Abstract stats_snapshot into ops structure") Link: https://lore.kernel.org/all/404d5f2d-24a5-4edc-897b-b1b3c54a20e1@lunn.ch/ Signed-off-by: Florian Fainelli Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20261026164733.737299-2-f.fainelli@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 2954e93f472d0db185feb07d75c59c4678404bc8 Author: Daniel Machon Date: Mon Oct 26 14:45:58 2026 +0100 net: lan966x: don't disable hardirqs in fdma tx clear path [ Upstream commit b2e17432e7ee75997657f99862eb83be0c78a6c1 ] lan966x_fdma_tx_clear_buf() runs from the NAPI poll and frees the buffers of completed tx DCBs with napi_consume_skb(), page_pool_recycle_direct() and xdp_return_frame_bulk(), under lan966x->tx_lock. Before this patch, the lock is taken with spin_lock_irqsave(), so the buffers are freed with hardirqs disabled. RX skbs are marked for page_pool recycling, so when such an skb is forwarded back out and its tx completion frees it here, the free path reaches __page_pool_put_page(), which warns via lockdep_assert_no_hardirq(). Take tx_lock with a plain spin_lock(), as the other tx_lock users, lan966x_port_xmit() and lan966x_fdma_xmit_xdpf(), already do. tx_clear_buf() runs from the NAPI poll, so disabling hardirqs there is not needed. Found with lockdep enabled (CONFIG_PROVE_LOCKING), which the assert depends on. Reproduced on a lan9668 board by redirecting received frames out of another port with tc mirred. Fixes: 11871aba1974 ("net: lan96x: Use page_pool API") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261026-lan966x-fdma-tx-clear-hardirq-v1-1-5f70f026a2e4@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d59af23187882ce9c275c21764d879ac3d0ee344 Author: Zhewei Yuan Date: Mon Oct 26 09:52:07 2026 +0000 tcp: Fix fastreuse cache initialization on first bind [ Upstream commit 947ccedf683ed6cc53c1f88ac9eb8747e4567ed6 ] inet_csk_update_fastreuse() initializes the reuse caches only when tb->bhash2 is empty, but both inet_csk_get_port() and __inet_inherit_port() link tb2 before calling it, so the first-bind branch is never taken. As a result, SO_REUSEADDR binds never get fastreuse=1 and keep scanning existing owners, and SO_REUSEPORT starts in STRICT instead of ANY. Initialize the caches when tb2 is the only entry in tb->bhash2 and has no owners. Timewait sockets are also linked on tb2->owners, so this is equivalent to the old hlist_empty(&tb->owners) test. Found by manual code inspection and confirmed with GDB. Binding 16000 SO_REUSEADDR sockets to one address/port in a KVM guest takes 4.18 s before and 19.4 ms after this patch. Existing bind/reuse selftests pass. Analysis and testing were assisted by an AI tool (Codex). Fixes: 8002d44fe84d ("tcp: Check hlist_empty(&tb->bhash2) instead of hlist_empty(&tb->owners).") Reviewed-by: Eric Dumazet Signed-off-by: Zhewei Yuan Reviewed-by: Kuniyuki Iwashima Reviewed-by: Jason Xing Link: https://patch.msgid.link/20261026095208.58504-1-yzwlhm@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit e117f66da998e24eba6c7c445930b439df1c7362 Author: Wang Zhaolong Date: Tue Oct 27 22:43:24 2026 +0800 ksmbd: fix named-pipe reply loss with small output buffers [ Upstream commit 2d5c7afbb1d19f51f76c0865b4cb2e4e8347ade6 ] FSCTL_PIPE_TRANSCEIVE copies at most MaxOutputResponse bytes from an RPC reply and reports STATUS_BUFFER_OVERFLOW when it does not fit. It then frees the complete IPC reply, including the bytes that were not returned. The client cannot recover those bytes with a subsequent READ, so an RPC call can fail even though userspace produced a complete reply. Pipe READ also ignores the requested Length when copying an IPC reply. In the reproduced Windows NetShareEnum case, a 2632-byte reply is limited to 1024 bytes of SMB output. The remaining 1608 bytes are discarded instead of being available to the follow-up READ. Increasing the application-level enumeration budget does not change that SMB output limit. Keep unread reply data on the pipe and respect each operation's output limit. Preserve it until successfully included in a response: response preparation failures and later input must not discard output that the client has yet to receive. Treat a failed IPC exchange as an I/O error, rather than reporting an empty read or acknowledging a write without an IPC reply. Additional RPC reply queueing remains userspace's responsibility. Reject TRANSCEIVE with STATUS_PIPE_BUSY while cached reply data remains. Do this before contacting userspace, without accepting new input or consuming cached output. The client can drain the reply with READ and explicitly resubmit the transaction. A successful positive-length READ that leaves a suffix of the same cached reply reports STATUS_BUFFER_OVERFLOW. Keep cached bytes on failed requests, and consume them only after the response is pinned successfully. Release the original reply when drained or when its pipe is closed, logged off or disconnected. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Link: https://bugzilla.kernel.org/show_bug.cgi?id=222196 Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202610260610.5prVfJss-lkp@intel.com/ Signed-off-by: Wang Zhaolong Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit dbb4b1d59549a3000d4ba4aca0d0abd05066bd79 Author: Wang Zhaolong Date: Tue Oct 27 22:43:23 2026 +0800 ksmbd: avoid races between named-pipe operations [ Upstream commit a43e0718a4abed7f859a67bd7b154acf213589fa ] RPC IPC replies are matched by pipe handle. READ, WRITE, TRANSCEIVE and CLOSE on the same pipe all use that handle. The session RPC lock protects the handle table, but is dropped before a pipe I/O request waits for its reply. Another operation, including CLOSE, can issue a request with the same handle while that wait is still in progress. These requests have no separate IPC correlation ID, so overlapping waits can interfere with reply delivery. CLOSE can also release the handle before an earlier operation finishes. Protecting table access alone does not provide the serialization or lifetime needed by an active pipe. Serialize operations per pipe and keep its state and handle alive until all users finish. Avoid holding the session table lock across IPC waits, so a blocked pipe does not hold up unrelated pipes. This also provides the lifetime needed to retain unread replies in the following patch. Recheck cancellation, connection release and session teardown after taking the pipe lock, and mark a removed pipe closed before waiting for its active operation. Close all session RPC pipes on logoff after the other requests have drained; keeping the TCP connection open must not retain old handles. Use standard SMB2 error replies for failed pipe operations while preserving the selected status. Link: https://bugzilla.kernel.org/show_bug.cgi?id=222197 Signed-off-by: Wang Zhaolong Signed-off-by: Namjae Jeon Stable-dep-of: 2d5c7afbb1d1 ("ksmbd: fix named-pipe reply loss with small output buffers") Signed-off-by: Sasha Levin commit 5ecaa25ea1fc4b5df73ac019915e7785c7df50c3 Author: Fernando Fernandez Mancera Date: Mon Oct 26 18:44:03 2026 +0100 devlink: region: fix snapshot id leak on kernel-allocated ids [ Upstream commit ef8f0a1d888e0280452792f6d4edad237c934a51 ] When DEVLINK_CMD_REGION_NEW is issued without a snapshot id, the kernel allocates one with __devlink_region_snapshot_id_get(). That helper counts the caller as a user of the id, and the caller must release this hold once it is done. devlink_nl_region_new_doit() never drops it. The refcount of the id goes 1 (allocation) -> 2 (snapshot created) and stays at 2. When the snapshot is deleted the count only drops to 1, so the id is never erased from the snapshot_ids xarray. The id then stays in use for the lifetime of the devlink instance: requesting a snapshot with that explicit id fails with -EEXIST, and there is no snapshot left to delete to clean it up. Reproducer steps: # devlink region new pci/0000:13:00.0/device-caps pci/0000:13:00.0/device-caps: snapshot 0 # devlink region del pci/0000:13:00.0/device-caps snapshot 0 # devlink region new pci/0000:13:00.0/device-caps snapshot 0 kernel answers: File exists Drop the caller's reference right after the snapshot has been created, as the snapshot then holds its own. Fixes: 043b3e22768d ("devlink: let kernel allocate region snapshot id") Reported-by: Guikun Yang Closes: https://lore.kernel.org/netdev/tencent_BE912BA710539F285F9FCF28E854ABEFCD07@qq.com/ Signed-off-by: Fernando Fernandez Mancera Link: https://patch.msgid.link/20261026174403.512-1-fmancera@suse.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit cc4002090acfe2d3662b919c89b01bac3764b05a Author: Dudu Lu Date: Wed Oct 21 23:55:22 2026 +0800 net-sysfs: reject a one-entry RPS flow table [ Upstream commit 24927bdf0f62f63470a065c21d80fff7e4e9f207 ] store_rps_dev_flow_table_cnt() accepts rps_flow_cnt == 1. For count == 1 the round-up loop leaves mask == 0, which is stored as log == 0 in the tag (tag_ptr |= ilog2(mask) + 1). get_rps_cpu() then calls rfs_slot() -> hash_32(hash, rps_tag_to_log(tag_ptr)) with log == 0: include/linux/hash.h:68 return __hash_32(val) >> (32 - bits); /* bits == 0 -> shift by 32 */ The shift by 32 is undefined and yields the full 32-bit hash, which is used to index the one-entry rps_dev_flow[] table unchecked: UBSAN: shift-out-of-bounds in ./include/linux/hash.h:68:24 shift exponent 32 is too large for 32-bit type 'unsigned int' __ubsan_handle_shift_out_of_bounds+0x11c/0x208 get_rps_cpu+0x12fc/0x1344 netif_rx_internal+0x1e0/0x4d4 rps_dev_flow[] is then read (rflow->cpu) and written (last_qtail) out of bounds on the packet path. Require at least two entries. Fixes: f3483c8e1da6 ("net: rfs: hash function change") Signed-off-by: Dudu Lu Link: https://patch.msgid.link/20261021155522.67521-1-phx0fer@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit e2c24a4c8929a013df288d871b583331f4f6851f Author: Daniel Machon Date: Mon Oct 26 14:47:05 2026 +0100 net: microchip: fdma: fix DCB corruption under sustained load [ Upstream commit 573a6d4c7a21e34d7a2174b8d3c7ca67a5e850b6 ] __fdma_dcb_add() prepares a DCB and links it into a channel's chain by writing its address to the NEXT_PTR of the current last DCB. The FDMA may be processing the chain while this happens. Before this patch, the link is written before the new DCB's own nextptr and info fields, so the FDMA can follow it to a DCB that hasn't been fully prepared yet. Under sustained load this stalls the FDMA. Prepare the new DCB fully before linking it, and update the previous DCB's NEXT_PTR using the two-step sequence from the datasheet (poison the LSB and flush, then clear it) so the FDMA never observes a partially-updated pointer. Reported by a customer running iperf3 --bidir against a lan969x board. Reproduced on lan969x with iperf3, throughput collapsing to zero: [ 5] 1.00-2.00 sec 73.9 MBytes 620 Mbits/sec 0 305 KBytes [ 5] 2.00-3.00 sec 73.9 MBytes 620 Mbits/sec 0 305 KBytes [ 5] 3.00-4.00 sec 13.9 MBytes 116 Mbits/sec 2 1.41 KBytes [ 5] 4.00-5.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes [ 5] 5.00-6.00 sec 0.00 Bytes 0.00 bits/sec 0 1.41 KBytes [ 5] 6.00-7.00 sec 0.00 Bytes 0.00 bits/sec 1 1.41 KBytes The race is timing-dependent: across three reproductions the stall appeared anywhere from ~400s to ~3000s into the run. Fixes: 30e48a75df9c ("net: microchip: add FDMA library") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261026-microchip-fdma-dcb-corruption-v1-1-36dab6caca07@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 3a5ff2083305ae4250a3375c964dfc03acdee0e0 Author: Daniel Machon Date: Mon Sep 28 21:32:52 2026 +0200 net: microchip: fdma: use little-endian types for descriptor fields [ Upstream commit 9786c387b299bda5277eed98284a6f6fa7331fb9 ] The FDMA engine reads and writes the DCB and DB descriptors in little-endian byte order. So far the descriptors have only been produced by the little-endian SoC itself, so plain u64 fields were fine. With the PCIe FDMA path, the descriptors live in host memory and are written by the host CPU, which may be big-endian. Change the descriptor fields to __le64 and convert at the library boundary: in __fdma_db_add() and __fdma_dcb_add() on write, and in the fdma_db_*() accessors on read. The dataptr and nextptr callbacks keep their u64 signatures, so their implementations are unchanged. Add fdma_db_dataptr_get(), and convert the lan966x sites that read the descriptor fields directly to use the accessors. No functional change on little-endian hosts. Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260928-lan966x-pci-fdma-v9-4-a17caf60f89a@microchip.com Signed-off-by: Jakub Kicinski Stable-dep-of: 573a6d4c7a21 ("net: microchip: fdma: fix DCB corruption under sustained load") Signed-off-by: Sasha Levin commit fe5e30618d7c609eaf5298f3d5560dd1170b05d2 Author: Daniel Machon Date: Mon Oct 26 14:46:54 2026 +0100 net: lan966x: release the in-flight slot of a stale TX skb [ Upstream commit 074caa30a62726c0ee959e8b8ccb64cda0b26ae5 ] lan966x_ptp_txtstamp_request() counts every two step TX skb waiting for its timestamp in lan966x->ptp_skbs, and refuses new ones once LAN966X_MAX_PTP_ID are in flight. lan966x_ptp_txtstamp_old_release() frees the skbs that have waited longer than LAN966X_PTP_TIMEOUT. Before this patch, old_release() does not decrement ptp_skbs, so every skb whose timestamp never arrives, for example because the switch discarded the frame, keeps its slot forever. Once LAN966X_MAX_PTP_ID slots are lost, two step frames fail to transmit on every port of the switch. Return the number of released skbs from old_release() and subtract it from ptp_skbs in txtstamp_request(), under the ptp_ts_id_lock it already takes. This fixes the accounting only. A port's stale skbs are still aged out only when that port sends a two step frame, so a port that stops sending them keeps its stale skbs, and their slots, until it sends one again. That behaviour is unchanged by this patch. Found by an AI code review agent. Reproduced on a lan9668 board. Fixes: 77eecf25bd9d ("net: lan966x: Update extraction/injection for timestamping") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261026-lan966x-ptp-stale-tx-slot-v1-1-9f7c895eb1ff@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 92b35a3669db7cfb2fff5a58a09c2a3d3640bf89 Author: Daniel Machon Date: Mon Oct 26 14:46:39 2026 +0100 net: lan966x: fix the DB dataptr of frames from ndo_xdp_xmit [ Upstream commit ce3192e0dafa829e76edefecc16a32589b53c875 ] lan966x_fdma_xmit_xdpf() transmits both XDP_TX frames and xdp_frames from ndo_xdp_xmit, and builds the DB with lan966x_fdma_xdp_tx_dataptr_cb(), which adds XDP_PACKET_HEADROOM to the stored DMA address. Before this patch, the headroom is also added for xdp_frames. For XDP_TX the stored address is the start of the page pool page, but for an xdp_frame it is the mapping of the IFH placed in front of the frame data, so frames from ndo_xdp_xmit are read from XDP_PACKET_HEADROOM bytes after their IFH. Use the plain tx dataptr callback for xdp_frames. Found by an AI code review agent. Reproduced on a lan9668 board with an XDP program redirecting frames from one port to another: none of the 20 frames arrived intact on the link partner. With the fix all 20 did. Fixes: 29cc3a66a81d ("net: lan966x: use FDMA library for adding DCB's in the tx path") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261026-lan966x-xdp-xmit-dataptr-v1-1-d0dd068324de@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b4b7e1e309a4f387ad28764e75c5df47af195b98 Author: Harkirat Gill Date: Wed Oct 21 10:06:36 2026 -0400 drm/amdgpu: re-enable GFXOFF for compute on GFX12 [ Upstream commit 6a1dbb006056ad1ce6df0d6d5f2155767c20f410 ] Commit 2affe2bbc997 ("drm/amdgpu: disable gfxoff with the compute workload on gfx12") disabled GFXOFF whenever a user-mode compute queue exists, as a workaround for an OpenCL test failure. The MES firmware issue behind that failure has since been addressed, so the workaround is no longer required. Without this change, idle inference servers that hold a context for hours never let the graphics block power down, costing roughly 3-4% reported GPU activity and ~3 W per GPU at idle. Measured on gfx1200 with an idle HIP process holding one stream and two resident KFD queues: before: VDDGFX 695 mV, GPU load 2%, ~9-10 W after: VDDGFX 35 mV, GPU load 0%, ~8 W (idle baseline) The resident queue count is unchanged in both cases; only GFXOFF availability differs. The ocltst runtime suite (40 tests) passes with and without this change. Fixes: 2affe2bbc997 ("drm/amdgpu: disable gfxoff with the compute workload on gfx12") Signed-off-by: Harkirat Gill Reviewed-by: Kenneth Feng Signed-off-by: Alex Deucher (cherry picked from commit f6d97ecb68b8623da2f83997a9c8c57a1a9649f9) Signed-off-by: Sasha Levin commit a0e83689c1f11cc5a1ffe2372d651c6213fa11d4 Author: Florian Fainelli Date: Mon Oct 26 10:48:10 2026 -0700 perf parse-events: Include errno.h before kernel headers [ Upstream commit 022b0ac5d3e87f87cb7ba42d04d0bc3ddfdd6be4 ] Building perf against uClibc fails in config_term_common(): util/parse-events.c:954:30: error: 'ERANGE' undeclared The kernel headers included before errno.h pull in asm/errno.h. uClibc's bits/errno.h undefines EDOM, EILSEQ and ERANGE before including linux/errno.h, but the kernel header include guards prevent these macros from being defined again. Include errno.h before the kernel headers so ERANGE remains defined. Fixes: 6b9c0261b3fb298b ("perf record: Add ratio-to-prev term") Reviewed-by: James Clark Signed-off-by: Florian Fainelli Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Faisal Bukhari Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Qinxin Xia Cc: Thomas Falcon Cc: Thomas Richter Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit d37c6484852ccae6c95ec33b861dafe13589fa7a Author: Florian Fainelli Date: Mon Oct 26 10:45:31 2026 -0700 perf print_insn: Include sys/types.h for ssize_t [ Upstream commit e0e4470aa53c0022418290fb551c21da4bd50209 ] print_insn.h declares fprintf_insn_asm() with an ssize_t return type but does not include the header defining that type. This causes builds where stdio.h does not provide ssize_t to fail when compiling util/print_insn.c: util/print_insn.h:21:1: error: unknown type name 'ssize_t' Include sys/types.h so the header provides its own dependency for ssize_t. Fixes: 218c200f677d8af4 ("perf script: Consolidate capstone print functions") Reviewed-by: James Clark Signed-off-by: Florian Fainelli Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: Ian Rogers Cc: Ingo Molnar Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 8054f188e959edcd3a9a9285581c95f89438a1e3 Author: Paul Moses Date: Tue Oct 20 17:21:07 2026 +0000 perf mmap: Preserve the consumed cursor in forward mode [ Upstream commit 1e826983ceef421d7047ed76581840b778294ad4 ] perf_mmap__read_event() updates prev as it consumes forward-buffer records. perf_mmap__read_done() then overwrites prev with a fresh producer head, even when unread records remain. perf_kvm__mmap_read_idx() stops after 25 records per mmap and calls read_done(). If more records are pending, prev advances past them. The next drain starts at that new position and skips the unread remainder. An event arriving after the last empty read_event() and before read_done() can also be skipped. read_done() does not itself update the kernel's data_tail. Only refresh prev for overwrite buffers, which need the current head as the end of the next backward read. Leave the forward cursor at the consumed position. Fixes: 53172f9057e92c9b ("perf kvm: Switch to new perf_mmap__read_event() interface") Signed-off-by: Paul Moses Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 35ccd6bbd819471c0b8b688b2844ad7785a401de Author: Paul Moses Date: Tue Oct 20 17:20:58 2026 +0000 perf mmap: Use the head selected by read_init [ Upstream commit 022c64992af554cfd8c564bff86100fb5ed98678 ] perf_mmap__push() reads the producer head before calling perf_mmap__read_init(), which reads it again to select the range to copy. If the producer advances between those reads, push() copies through the newer head but stores the earlier head in prev. The next drain starts at that earlier position and can write the same records to perf.data again. Use the head selected by read_init(): end for forward buffers and start for overwrite buffers. Save it before the copy loop advances start so prev matches the range that was copied. Fixes: 8872481bd04850b1 ("perf mmap: Introduce perf_mmap__read_init()") Signed-off-by: Paul Moses Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Ian Rogers Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Kan Liang Cc: Kan Liang Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 5830369b9885061e2ff39e213da1480211f70028 Author: Ian Rogers Date: Sun Oct 25 23:50:43 2026 -0700 perf libdw: Optimize fallback logic for missing DWARF [ Upstream commit 62d7cdc8d58702feb31b320f1713642e3977d7f3 ] When libdw encounters a DWARF definition it cannot accurately un-inline or an address block natively missing structural line maps, dwfl_module_getsrc() returns NULL. Previously, libdw__addr2line() returned -1 in both dwfl_module_getdwarf() and dwfl_module_getsrc() failure paths while addr2line() in srcline.c only stopped its fallback loop on ret > 0. This caused perf's addr2line_style loop to fall back to llvm, libbfd, and the cmd__addr2line() subprocess wrapper on every unmapped address or stripped DSO. Update the addr2line_style pipeline return semantics consistently: 1. Backends return 0 to denote conclusively missing information (e.g. valid ELF but no DWARF inside, or parsed DWARF with no mapped lines), stopping the fallback loop. 2. Backends (and uncompiled stubs) return < 0 to denote initialization or backend errors, instructing the loop to iterate to the next configured fallback. 3. Backends return > 0 on successful source line resolution. Fixes: bf96e296d52d74a1 ("perf libdw: Fix Dwfl discovery with split files") Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Alessio Podda Cc: Alireza Haghdoost Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Michael Liang Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Shimin Guo Cc: Tanushree Shah Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 008b4e9bb29769c903c727e55230ad9908116d14 Author: Tejun Heo Date: Tue Oct 27 08:03:53 2026 -1000 sched_ext: Reject scx_bpf_sub_grant/revoke() in tracing programs [ Upstream commit af4ed5682e62556beb399b76f2f1274ae1aad9e2 ] A tracing program can call scx_bpf_sub_grant() and scx_bpf_sub_revoke() through scx_kfunc_ids_any, which is registered on the tracing kfunc hook. Before returning, both invoke ops.sub_caps_updated() of the sub-schedulers whose caps changed, so those ops run in the tracing program's context. No SCX op expects to run from an arbitrary tracing context. With an rq lock held, this leads to the same deadlock that b07a7450f6ef ("sched_ext: Reject rq-lock-taking kfuncs in tracing programs") fixed for direct calls: 1. A tp_btf/sched_switch program fires from __schedule() with the rq lock held. scx_locked_rq() only tracks rq locks held across SCX callbacks, so it returns NULL there. 2. The program calls scx_bpf_sub_grant() on a child, which invokes the child's ops.sub_caps_updated() before returning. 3. That op calls scx_bpf_cidperf_set() on this cpu, which sees no locked rq and takes the rq lock the cpu already holds. Add both kfuncs to scx_kfunc_ids_no_tracing and rewrite the set's comment to cover both reasons for membership: taking an rq lock and running SCX ops. Fixes: 5f2a9a4c2e6c ("sched_ext: Add coalescing sub_caps_updated() notifier for sub-schedulers") Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit e8c369a46f591bcfb82395adecca9db9accae5d1 Author: Tejun Heo Date: Mon Oct 26 14:17:49 2026 -1000 sched_ext: Fix a lone IMMED task waiting behind a kept prev [ Upstream commit 5173b2965834ad71d8c9035048354dce7c391125 ] While dispatch is in progress, rq_is_open() returns true and dsq_inc_nr() schedules no reenqueue for an IMMED task inserted on an empty local DSQ. The check at the end of dispatch_one() schedules the reenqueue only when more than one task is queued, so a dispatch that keeps prev leaves a lone IMMED task behind: 1. a parent's ops.dispatch() sub-dispatches into a child, which consumes a task with SCX_ENQ_IMMED onto the empty local DSQ 2. the parent extends prev's slice and dispatch keeps prev 3. the local DSQ holds one task, so no reenqueue is scheduled The IMMED task waits on the local DSQ behind prev. Schedule the reenqueue when dispatch keeps prev and an IMMED task is queued, as even a lone IMMED task can't run right away behind prev. v2: The description and dispatch_one()'s comment are reworded. Fixes: 98d709cba319 ("sched_ext: Implement SCX_ENQ_IMMED") Reported-by: Sashiko Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Signed-off-by: Sasha Levin commit eb239e0c6d93c25577927e9b66e6a86e35098574 Author: Tejun Heo Date: Mon Oct 26 14:17:48 2026 -1000 sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE [ Upstream commit 5c23d1710606d3c14a0feafd8940df9f20bca7be ] A task already queued on a bypass DSQ stalls when the host loses SCX_CAP_BASE on that cpu, as the cpu no longer consumes the DSQ. Sending a bypassed task to rescue at enqueue time covers only a task enqueued after the loss, and the balancer no longer donates to a capless cpu. Have the bypass load balancer drain such a DSQ: a cpu where the host lacks BASE is a donor with a target of zero, and the donees take its tasks under their ordinary fill. A drained task no donee can take is reenqueued at its home: to rescue when the host lacks BASE there and rescue is enabled, and to the home's bypass DSQ otherwise. A balancing donor leaves a task that can't move to its donee where it is. Reenqueueing it at home would put a task homed on the donor cpu at the tail of its own DSQ, and a blocked task that proxy execution migrated there, which every remote cpu refuses, would go to the tail on every pass. Without rescue, a task homed on the drained cpu goes back onto the drained DSQ, once per pass, and waits for the host to regain BASE, the bypass to end, or the stall watchdog to eject the host. Its reenqueues are not counted against the reenqueue limit, as its scheduler is bypassing. A BASE loss kicks the balancer so that the drain doesn't wait for the next interval. With a zero interval the kick is the only pass, and a task that lands on the drained DSQ after it waits the same way. v2: The description drops an in-flight affinity change from the causes of a refused balancer move. v3: - The description says that a stuck task's reenqueues are not counted against the reenqueue limit (sashiko). - The description names the stall watchdog as the way out for a task stuck without rescue, and the tasks a zero interval leaves on a drained DSQ. - bypass_lb_reenq_home()'s kerneldoc and the description give the placement with rescue disabled and for a task that must run at home, and the other two comments on that placement point to the kerneldoc. v4: - Skip a task the donee would refuse on a balancing donor instead of reenqueueing it at home (Andrea). - bypass_lb_reenq_home()'s kerneldoc is corrected on a migration-disabled task homed on a donee and on the local DSQ admission. - The description is condensed. Fixes: 147d1885f390 ("sched_ext: Add the SCX_CAP_ENQ_IMMED cap") Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Signed-off-by: Sasha Levin commit 5020d3271646c216c5df964b99b99483bc3fd705 Author: Tejun Heo Date: Mon Oct 26 14:17:47 2026 -1000 sched_ext: Let the bypass load balancer move tasks homed on other cpus [ Upstream commit a043733588a06e12e69918fbf080a6c45446e6a5 ] The following patch uses the bypass load balancer to drain a cpu's bypass DSQ when the host loses SCX_CAP_BASE there. The host no longer consumes that DSQ, so the drain has to move every task on it. The balancer skips the ones homed on another cpu. An earlier pass moved such a task in from its home cpu's DSQ, and the donor cpu has not consumed it yet. A task's DSQ membership may only change under the task's rq lock, which the balancer does not hold. Take such a task off the donor DSQ with unlink_dsq_and_switch_rq_lock(), the handshake a remote consumer uses. It drops the DSQ lock and switches to the task's rq lock. A dequeue that gets in between takes the task, and the balancer moves on. The insert then runs under the task's home rq lock, as it already does for a donor-homed task. A task whose donee is its own cpu can always run there. task_can_run_on_remote_rq() warns when asked about a task's own cpu, so the balancer skips the test for such a task. The walk holds the donor rq lock, which keeps the donor cpu's dispatch and its enqueuers away from the donor DSQ. A move of a task homed elsewhere switches to the task's rq lock, and both can reach the DSQ meanwhile. The parked cursor keeps the walk's place through a consume, and the sequence bound keeps a task enqueued meanwhile out of the pass. v2: The description says "the following patch", not "patches", uses the balancer to drain a DSQ. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Stable-dep-of: 5c23d1710606 ("sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE") Signed-off-by: Sasha Levin commit 56e054bc03b7fc70ff651e6cc85b5d96e645b016 Author: Tejun Heo Date: Mon Oct 26 14:17:46 2026 -1000 sched_ext: Factor out bypass_lb_move() and insert with the donor DSQ unlocked [ Upstream commit f0bbe21d73e2784fea25524af6e8e241b40b5b22 ] Prepare the bypass load balancer for moving tasks homed on other cpus. Such a move takes the task's own rq lock through the remote consumer's handshake, which drops the donor DSQ lock on the way, so its insert runs with the donor DSQ unlocked and under the task's rq lock. The balancer's own move holds the donor DSQ lock throughout, with the donee DSQ lock nested inside. Switch the donor-homed move to the same scheme so that one body can serve both: factor it out of bypass_lb_cpu() into bypass_lb_move(), which takes the task off the donor DSQ and inserts with the DSQ unlocked. A task that can't run on the donee goes back to the head of the donor DSQ instead of being skipped in place. The walk parks its cursor behind the task before each move and resumes from it afterwards. It is bounded to the tasks queued when it began, by their DSQ sequence numbers, so a task it put back is not visited again in the same pass. Before, the walk held both the donor rq lock and the donor DSQ lock across every move. The donor DSQ can be very long and contended, a walk competing with the cpu's dispatch and the enqueues for the DSQ lock would crawl, and the walk is what relieves that contention by moving tasks off the DSQ. The walk now cycles the DSQ lock around each insert but still holds the rq lock throughout, and that alone keeps dispatch and enqueues away. The DSQ lock is uncontended when retaken, so cycling it is cheap. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Stable-dep-of: 5c23d1710606 ("sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE") Signed-off-by: Sasha Levin commit b249ce64dfca18cfd27a596573e1bb79eb8ade16 Author: Tejun Heo Date: Wed Oct 7 23:15:39 2026 -1000 sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes [ Upstream commit da3bad759ef2df9db38ad851a061d719091d74dd ] A grant or revoke only records the target caps. They take effect on a cid at its next dispatch, and nothing tells the parent when. Without that the parent cannot act on a revoke: a child that ran a cid at a low cpuperf target leaves the target there when PERF is revoked, as the kernel resets targets only at root enable. Nor can the parent tell when it may schedule on the cid again. Add ops.sub_child_ecaps_updated(), delivered to the direct parent right after the child's own ops.sub_ecaps_updated() with the child's cgroup id and the same before and after caps, in the same dispatch context. Both deliveries are suppressed while the child is bypassing and replayed together afterwards. A disabled child reports nothing: ops.sub_detach() is where the parent restores what it had delegated. A sub is now bypassed before it is linked, so that the grants queued for it from ops.sub_attach() are consumed while it is bypassed and replayed to it and the parent once it is enabled. Otherwise a sync consumed before the sub's ops are registered would reach the parent but never the sub. v2: Drop the disable report with its sleep lock and nested-dispatch gate, the parent restores from ops.sub_detach() instead. Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Stable-dep-of: 5c23d1710606 ("sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE") Signed-off-by: Sasha Levin commit 9446d232c64e0c01219ee9c9458d1cff4b1d78a9 Author: Tejun Heo Date: Mon Oct 5 07:52:12 2026 -1000 sched_ext: Add ops.sub_cid_sched_updated() to report the sched running on a cid [ Upstream commit 457fff158adcd2a60f2a908957e193cb78649dbf ] A parent sched that delegates cpus to sub-scheds has no way of telling how much each delegatee is using them. A parent that sizes its delegations by demand cannot measure it, and one that wants to hand a cid from one sub to another cannot see which sub it would take the cid from. Add ops.sub_cid_sched_updated(), invoked on a sched when what it sees running on a cid changes: NONE when no task of its subtree runs there, SELF for its own task, or a direct child's cgroup id. Changes inside a child's subtree are not reported. The op costs one pointer compare per context switch when the sched does not change, a notification reaches only the scheds that see a change, and the whole mechanism sits behind a static key that is on only while a loaded sched implements the op. After a sched's tasks are gone, its disable closes every rq session still pointing at it, so nothing refers to it once it is freed. The op is cid-form only like the other sub ops and runs with the rq lock held on the context switch path. Signed-off-by: Tejun Heo Stable-dep-of: 5c23d1710606 ("sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE") Signed-off-by: Sasha Levin commit f0c398670285b67ec8f4766e694f2fc624c3db06 Author: Andrea Righi Date: Tue Sep 22 18:51:46 2026 +0200 sched_ext: Fix ops.running/stopping() pairing for proxy-exec donors [ Upstream commit 5f882051efabaf19f9b4dbe4b50cee1d250ac19e ] With proxy execution, pick_next_task() can select a blocked task as the scheduling context before find_proxy_task() resolves the execution context. From the BPF scheduler perspective, that donor is running while its scheduling context drives the lock owner; ops.tick() and other accounting must therefore remain enclosed by a matching ops.running()/ops.stopping() session. In this scenario, the session boundaries do not always match physical task switches. Keep the "running" session open when the same donor continues on the same CPU. When proxy execution migrates a donor's scheduling context to another CPU, end its running session on the source CPU and start a new session on the destination CPU only after proxy resolution succeeds. This prevents a failed resolution from exposing a provisional ops.running() event. Track these sessions with a new SCX_TASK_RUN_TRACKED flag. The explicit running-state tracking is also required by later donor-based accounting: it prevents an EXT owner executing for a non-EXT donor from being treated as the active EXT scheduling context when it is dequeued. This is a preparatory change for enabling proxy execution together with sched_ext. Acked-by: John Stultz Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo Stable-dep-of: 5c23d1710606 ("sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE") Signed-off-by: Sasha Levin commit a3490d97b57967f1cf6bc0c2901ef19ef36fa2d5 Author: Andrea Righi Date: Tue Sep 22 18:51:44 2026 +0200 sched: Add sched_ext hooks for proxy execution [ Upstream commit be100c77178ef2299a080eb698720832a870248b ] Proxy execution splits the scheduling context (the donor) from the execution context (the lock owner). sched_ext needs to observe that split at three points in __schedule(): - whether a blocked EXT task can be retained on the runqueue as a donor, - when a donor's scheduling context starts driving a lock owner, - after proxy resolution, when deferred reenqueue work that was blocked by an active proxy relationship can be retried. Introduce scx_allow_proxy_exec(), scx_proxy_donor_start() and scx_proxy_reenqueue_retry(), and add their call sites in __schedule(). The implementations are empty here and are filled in by the sched_ext changes that follow, so that all the sched core changes needed by proxy execution stay together in the preparatory patches. SCHED_PROXY_EXEC still depends on !SCHED_CLASS_EXT, so the new hooks are inert: they are compiled out with CONFIG_SCHED_CLASS_EXT=n and unreachable otherwise. This is a preparatory change to support proxy execution with sched_ext. No functional change. Signed-off-by: Andrea Righi Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260922165445.943315-6-arighi@nvidia.com Stable-dep-of: 5c23d1710606 ("sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE") Signed-off-by: Sasha Levin commit 122c4b570d03f939cd33752291e41c77424cc3a3 Author: Shubhang Kaushik (Ampere) Date: Thu Sep 17 16:06:59 2026 -0700 sched: Restart fair hrtick after same-task repicks [ Upstream commit c72945693b90423f1b46ac2dbc8749c2b7804fc8 ] Fair hrticks are one-shot timers. A same-task repick after hrtick expiry skips set_next_task_fair() and leaves no hrtick armed for the next fair preemption point: hrtick() -> task_tick_fair(..., queued=1) -> entity_tick() -> resched_curr() -> schedule() -> pick_task_fair() selects current -> put_prev_set_next_task(rq, prev, next) -> next == prev -> return Introduce SNT_REPICK for the next == prev path: put_prev_set_next_task(rq, prev, next) -> next == prev -> next->sched_class->set_next_task(rq, next, SNT_REPICK) -> set_next_task_fair() -> hrtick_start_fair() set_next_task_fair() skips task-transition work for SNT_REPICK and restarts the fair hrtick. hrtick_start() records the delay during schedule(), and hrtick_schedule_exit() rearms the timer. Do not restart the SCHED_DEADLINE hrtick for SNT_REPICK. Same-task repicks skip put_prev_task() for both fair and SCHED_DEADLINE, but pick_task_fair() refreshes the selected fair entity before selecting it again. hrtick_start_fair() reads that refreshed entity, including with group scheduling. The SCHED_DEADLINE picker has no corresponding current-runtime update. Restarting its hrtick on SNT_REPICK could therefore use stale dl_se->runtime and delay the next runtime enforcement point. Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Shubhang Kaushik (Ampere) Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Zhan Xusheng Link: https://patch.msgid.link/20260917-sched-fair-hrtick-restart-v4-1-4dd1414da81a@gentwo.org Stable-dep-of: 5c23d1710606 ("sched_ext: Fix queued bypassed tasks stalling when the host loses SCX_CAP_BASE") Signed-off-by: Sasha Levin commit 9a61a62bc2d0ddf27fc94e73a1975b16ab38bc8c Author: Tejun Heo Date: Mon Oct 26 14:17:45 2026 -1000 sched_ext: Fix the bypass load balancer stranding tasks on cpus where the host lacks SCX_CAP_BASE [ Upstream commit 53cc8dd06944979fd6a4754958aa8d6fa159f2da ] The bypass load balancer spreads a host's bypassed tasks over the cpus of a node by moving them between its per-cpu bypass DSQs. It counts every cpu of the node as capacity and takes any cpu below the target as a donee. A cpu's dispatch only descends into schedulers holding SCX_CAP_BASE on it, so a bypass DSQ on a cpu where the host lacks BASE is never consumed. A task moved there sits until the host regains the cap or the bypass window ends. Count only cpus where the host holds BASE as capacity and pick donees from them. The target rises to spread the node's tasks over the cpus that can run them, and a capless cpu receives nothing. A capless cpu with tasks is still an ordinary donor, offloaded down to the donor target when its queue grows past the threshold; draining it is left to the following patches. Fixes: 147d1885f390 ("sched_ext: Add the SCX_CAP_ENQ_IMMED cap") Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Signed-off-by: Sasha Levin commit f75fcb6e85149fd3f39b1ed4c86fb00cd44d7f03 Author: Tejun Heo Date: Mon Oct 26 14:17:37 2026 -1000 sched_ext: Fix rescue served time disagreeing with the slice under proxy execution [ Upstream commit 006e9e9336b96964aafa4bb045e75077ee38f50b ] Rescue measures served time as the rescuee's sum_exec_runtime minus a snapshot taken at admission. Under proxy execution that measure follows the wrong task. update_se() credits sum_exec_runtime to rq->curr, the mutex owner that executes, while update_curr_scx() drains the slice of rq->donor and charges its rescue. A rescuee can be either, so its served time and its slice disagree in both directions. As the owner running for another donor, the rescuee accrues served time that drained no slice and charged no budget, and its rescue ends early. As the donor, its rescue runs long: 1. the rescuee blocks on a mutex and the owner runs in its place 2. the owner's run drains the rescuee's slice and the budget, but not the served time 3. the slice runs out with the rescue still open, and scx_rescue_keep() restores a remainder that the owner's run didn't reduce 4. the owner keeps running on the rescue until it releases the mutex, past the admitted slice and overdrawing the budget Count served time in scx_rescue_charge() from the delta that drains the slice. Charging the owner's run to the donor's rescue matches proxy execution, which drains the donor's slice and accounts the cgroup time to the donor for the owner's run. scx_rescue_keep() also ignored the return of scx_set_task_slice(). The call refuses the restore on a rescuee that escalation marked SCX_TASK_PROTECTED, and the rescuee was kept with a zero slice and its protection set. That refusal is now unreachable. Escalation sets the slice to the unserved remainder before it protects the task. From then on every slice write a scheduler can reach is refused. Only a sub-scheduler's task is rescued, and sub-schedulers are cid-form, which rejects direct slice writes. The slice then moves only by what update_curr_scx() drains, and that drain charges the rescue by the same amount, so the slice runs out exactly when the charge ends the rescue. WARN and end the rescue if the restore is refused anyway. Fixes: 5fd501744b10 ("sched_ext: Add bandwidth-limited rescue execution for stranded tasks") Reported-by: Sashiko Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Signed-off-by: Sasha Levin commit 1321de51d5cb66cb2c35c6e9c9657686351c6494 Author: Tejun Heo Date: Mon Oct 26 14:17:35 2026 -1000 sched_ext: Fix bypassed tasks looping on a host without SCX_CAP_ENQ [ Upstream commit a676ada0d6544928c0ceb032fb991a9abe0977db ] Bypass exists so that runnable tasks make progress without trusting the BPF scheduler. A host with SCX_CAP_ENQ_IMMED (BASE) but not SCX_CAP_ENQ on a cpu cannot run a single bypassed task there. The task loops instead: 1. a bypassed task lands on the host's bypass DSQ for the cpu 2. the cpu's dispatch descends into the host, which holds BASE there 3. the host consumes the task into the local DSQ as a plain insert 4. the insert needs ENQ and the host lacks it, so the task is rejected 5. the reject drain reenqueues the task and it is back at step 1 A bypass consume puts a task on the cpu being dispatched for, to run right away. That is the IMMED contract, and BASE is the cap it needs. Consume with SCX_ENQ_IMMED. BASE is then the one cap a bypassed task ever needs. Dispatch descends into a host only on a cpu where the host holds BASE, so a consume never lacks it. A consumed task is first on the local DSQ when dispatch enters the host with the DSQ empty. That is always the case for the root and normally for a parent dispatching into a child. A consumed task that cannot run right away is reenqueued like any IMMED task and goes back to the bypass DSQ. Waiting on the local DSQ would need ENQ. The task cannot run right away when a higher class or a HEAD insert took the cpu meanwhile, or when the parent queued its own task before dispatching into the host. Each such task waits on the bypass DSQ for the next dispatch. The reenqueue is not counted against the reenqueue limit, as the task's scheduler is bypassing. v2: The description says that the reenqueue of a consumed task is not counted against the reenqueue limit (sashiko). Fixes: 701b7bcad868 ("sched_ext: Add the SCX_CAP_ENQ cap") Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Signed-off-by: Sasha Levin commit 59d581d8e9cc019ebedc8145ec8ba56ca04e2383 Author: Mani Tofigh Date: Tue Oct 27 13:03:42 2026 -0400 bpf: Fix bpf_timer callback running on a freed map [ Upstream commit 815a0a2a40d6c5985a153041231731651bc4024b ] A bpf_timer in an inner map can fire after the map has been freed, and bpf_timer_cb() then reads the freed map: [ 50.709520] BUG: KASAN: slab-use-after-free in bpf_timer_cb+0x249/0x290 [ 50.709540] Read of size 4 at addr ff11000003bc1030 by task bpftimer/72 ... [ 50.710783] Freed by task 12: ... [ 50.710826] bpf_map_free+0x1a2/0x380 When user space closes the map, its timers are cancelled and their callbacks are cleared. Since commit 1bfbc267ec91 ("bpf: Enable bpf_timer and bpf_wq in any context"), bpf_timer_set_callback() and bpf_timer_start() run without a lock, so a program that found the timer just before the close can still use it afterwards: Task A Task B Task C ------ ------ ------ bpf_timer_start() finds the timer bpf_timer_set_callback() finds the timer close(map_fd) clears the callback cancels the timer sets the callback arms the timer deletes the map from the outer map map is freed the timer fires bpf_timer_cb() reads the freed map The timer is cancelled once more when it is finally freed, but that happens well after the inner map is freed, so a timer started this way can still fire on the freed map. Clear the timer's map pointer in bpf_async_cancel_and_free() before the map can be freed, and make the bpf_timer and bpf_wq callbacks return early when it is NULL. The map is not freed until callbacks that are already running have finished, so a callback either sees the map while it is still valid or sees NULL. The reproducer below calls the two helpers in a loop on two CPUs while a third CPU keeps creating an inner map with a timer, closing it and removing it from the outer map. This bug was identified and confirmed with the help of a deterministic hypervisor currently under development, but the non-deterministic C reproducer can typically trigger it in the 1-50s time range. With the fix, nothing is triggered after 600 seconds. Fixes: 1bfbc267ec91 ("bpf: Enable bpf_timer and bpf_wq in any context") Signed-off-by: Mani Tofigh Signed-off-by: Alexei Starovoitov Tested-by: Mahe Tardy Link: https://patch.msgid.link/20261027-bpf-timer-freed-map-v1-1-30402b0ee99b@columbia.edu Signed-off-by: Sasha Levin commit e338159c0c06c1a734aab9d50cafbfd3b8d4eea0 Author: Len Brown Date: Wed May 6 10:00:00 2026 -0400 x86_energy_perf_policy: Cleanup: Check fseek() in VM path [ Upstream commit 2778dc35d40e7e84c134ca4cab1376fa58208f80 ] Add return value validation for fseek() and ensure consistent resource cleanup on all error paths in err_on_hypervisor(). Fixes: 0936cdfbb527 ("tools/power x86_energy_perf_policy: Input/output error in a VM") Assisted-by: GitHub-Copilot:Claude-Sonnet-4.6 Reviewed-by: Andy Shevchenko Signed-off-by: Len Brown Signed-off-by: Sasha Levin commit 9876dac265178911e8b39a2a2fde029ca2da2487 Author: Len Brown Date: Wed May 6 10:00:00 2026 -0400 x86_energy_perf_policy: Fix optarg keyword matching [ Upstream commit 0177067d195a4757149f6702af191987377c71c3 ] Replace strncmp() with strcmp() for exact string matching in parse_optarg_string(). Exact keyword matching is safer and clearer. This prevents accidental matches with longer strings like "performance-foo". Fixes: 4beec1d75196 ("tools/power x86_energy_perf_policy: support HWP.EPP") Assisted-by: GitHub-Copilot:Claude-Sonnet-4.6 Reviewed-by: Andy Shevchenko Signed-off-by: Len Brown Signed-off-by: Sasha Levin commit e62ca4fcc71482cf0e8d5ba3185498ce01864cc0 Author: Junbin Zhang Date: Tue Oct 27 13:16:34 2026 +0800 sched_ext: Reject rq-lock-taking kfuncs in tracing programs [ Upstream commit b07a7450f6ef98c79ebd450a92fc4bb6b8f1e02e ] scx_bpf_cpuperf_set() and scx_bpf_cidperf_set() are members of scx_kfunc_ids_any, which is registered for BPF_PROG_TYPE_TRACING. A tracing program can run in a context which already holds the target rq lock, in which case scx_cpuperf_set() attempts to acquire the same lock again: __schedule() rq_lock(rq); /* rq->__lock is held */ trace_sched_switch(); BPF tracing program scx_bpf_cpuperf_set(smp_processor_id(), 1024); scx_cpuperf_set(); locked_rq = scx_locked_rq(); /* NULL */ rq_lock_irqsave(rq, &rf); /* same lock */ scx_locked_rq() only tracks rq locks held during SCX callback invocations, so it cannot detect an rq lock held by the surrounding kernel code. The deadlock can be reproduced with two BPF programs. The first is a minimal SCX scheduler, which only needs to be registered and enabled: SEC(".struct_ops.link") struct sched_ext_ops minimal_ops = { .name = "minimal", }; The second is a tracing program attached to tp_btf/sched_switch, which fires from __schedule() with rq->__lock already held: SEC("tp_btf/sched_switch") int BPF_PROG(on_sched_switch, bool preempt, struct task_struct *prev, struct task_struct *next, unsigned int prev_state) { scx_bpf_cpuperf_set(bpf_get_smp_processor_id(), 1024); return 0; } With both programs attached, the next context switch on any CPU deadlocks that CPU. Lockdep reports: WARNING: possible recursive locking detected 7.3.0-rc7 #3 Not tainted swapper/3/0 is trying to acquire lock: (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x1e/0x30 but task is already holding lock: (&rq->__lock){-.-.}-{2:2}, at: __schedule+0xeb/0x1430 Possible unsafe locking scenario: CPU0 ---- lock(&rq->__lock); lock(&rq->__lock); *** DEADLOCK *** Call Trace: print_deadlock_bug.cold+0xc0/0xd0 __lock_acquire+0x12fa/0x1b80 lock_acquire+0xd1/0x2f0 _raw_spin_lock_nested+0x32/0x40 raw_spin_rq_lock_nested+0x1e/0x30 scx_cpuperf_set+0x1e9/0x310 scx_bpf_cpuperf_set+0x9b/0x230 bpf_prog_..._on_sched_switch+0x3d/0x41 bpf_trace_run4+0x125/0x450 __traceiter_sched_switch+0x4b/0x70 __schedule+0x94a/0x1430 schedule_idle+0x26/0x50 cpu_startup_entry+0x2d/0x30 start_secondary+0xfc/0x100 The CPU remains locked up with interrupts disabled. scx_bpf_cidperf_set() is similarly affected, as it resolves the CID through scx_cid_to_cpu() before reaching the same rq-locking path. There is no reliable way for these kfuncs to determine whether the surrounding tracing context already holds an rq lock. Reject calls to both kfuncs from tracing programs at verification time, while preserving their availability to SCX struct_ops and syscall programs. Fixes: a11d6784d731 ("sched_ext: Fix missing rq lock in scx_bpf_cpuperf_set()") Signed-off-by: Junbin Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 88740103211666082e5210be65e308d680a0ba3d Author: Kumar Kartikeya Dwivedi Date: Tue Oct 27 22:51:36 2026 +0800 LoongArch: BPF: Fix stack arguments for indirect trampolines [ Upstream commit 67ab1a331481ef282c53003e6c041c8c4348d4cd ] LoongArch passes arguments beyond a0-a7 at the caller stack pointer. The trampoline store_args() helper always reads those arguments at FP + 16, which is correct for a regular fentry trampoline: its prologue leaves FP 16 bytes below the stack pointer at trampoline entry to hold the saved RA/FP frame record of the parent function. A struct_ops indirect trampoline is entered through a function pointer and only saves its own RA and FP before setting FP to the entry stack pointer. Its stack arguments therefore start at FP rather than FP + 16. As a result, every stack-passed struct_ops argument is currently read two slots late. Select the source offset based on whether the trampoline is indirect. This also prepares the stack-passed arena argument path to consume the actual pointer slot. With this patch the BPF selftest "./test_progs -t struct_ops_multi_args" passed on LoongArch. Fixes: c9ebe2016de9 ("LoongArch: BPF: Support up to 12 function arguments for trampoline") Acked-by: Hengqi Chen Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Tiezhu Yang Signed-off-by: Huacai Chen Signed-off-by: Sasha Levin commit d81c411773b364fcc075ba27aaa9ab7a8a341e87 Author: Zhenxian Ma Date: Thu Oct 22 14:25:13 2026 +0800 block: fix recursive i_rwsem locking in blkdev_write_iter() [ Upstream commit 21b88cc8bafceee6c6c82503e3b2cc6f1d0c78bf ] Commit 2fec4fd97cc3 ("block: take i_rwsem for the direct I/O write fallback") takes i_rwsem around blkdev_buffered_write() in the direct write fallback to close a race with set_blocksize(). Commit 1b1be9ea4e34 ("block: take the inode lock for buffered write fallback") fixes the same race by taking i_rwsem inside blkdev_buffered_write() instead. With both commits applied, the fallback path takes i_rwsem recursively: blkdev_write_iter() inode_lock_shared(bd_inode) blkdev_buffered_write() inode_lock_shared(inode) syzbot reports this as: WARNING: possible recursive locking detected syz.0.40/6005 is trying to acquire lock: ffff888024956f68 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: blkdev_buffered_write+0xd7/0x160 block/fops.c:738 but task is already holding lock: ffff888024956f68 (&sb->s_type->i_mutex_key#10){++++}-{4:4}, at: blkdev_write_iter+0x6c5/0x810 block/fops.c:815 rw_semaphore read locks are not recursive: once a writer is queued, new readers block behind it. If set_blocksize() calls inode_lock() between the two acquisitions, it waits for the first read lock to be released, while the second inode_lock_shared() waits behind set_blocksize(), and the task deadlocks. Drop the outer locking in the fallback. Fixes: 1b1be9ea4e34 ("block: take the inode lock for buffered write fallback") Reported-by: syzbot+bd975ef54294bec73f0e@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=bd975ef54294bec73f0e Cc: Tal Zussman Cc: Julian Sun Assisted-by: LLM Signed-off-by: Zhenxian Ma Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20261022062513.77372-1-mzx199711@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit d671999250049a2a551e2d03e56829ffcb52d705 Author: Daniel Machon Date: Mon Oct 26 14:46:28 2026 +0100 net: lan966x: do not warn on MAC entries that are not port destined [ Upstream commit 2cffcf1aeabb187e4f08fe4f5363128a3c45d786 ] lan966x_mac_irq_handler() scans the rows of the MAC table that the analyzer reports as changed, reads back all four columns of each row and treats ANA_MACACCESS.DEST_IDX as a port number. Before this patch, a destination index above num_phys_ports hits a WARN_ON(). The driver installs such entries itself: lan966x_mac_cpu_learn() uses PGID_CPU, and L2 multicast entries use a general-purpose PGID. A row holding one of them is read back whenever another entry in the same row is learned or aged out, so the scan warns in normal operation, repeatedly once the MAC table is busy. Skipping such a column is already the right behaviour. Drop the WARN_ON() and keep the bounds check as a plain filter. Found by an AI code review agent. Reproduced on a lan9668 board by bridging two ports with a 10 s ageing time and sending three rounds of 2048 new source MACs: the base kernel warned 42 times from lan966x_mac_irq_process(), the fixed kernel did not warn. Fixes: 5ccd66e01cbe ("net: lan966x: add support for interrupts from analyzer") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261026-lan966x-mac-warn-v1-1-9c885f9cbda9@microchip.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit a287ac76e7b5735bce619c060237095824eb0ae5 Author: Daniel Machon Date: Mon Oct 26 14:46:15 2026 +0100 net: lan966x: do not inject uninitialised bytes past skb->len [ Upstream commit b4a7180558eb3cd8affa1e240b22171425bdfcb4 ] lan966x_port_ifh_xmit() writes the frame to the injection FIFO one 32-bit word at a time, and pads frames shorter than 60 bytes with zero words. Before this patch, the last word is loaded whole even when skb->len is not a multiple of four, so 1 to 3 bytes past the end of the frame are read. For a frame shorter than 60 bytes those bytes are also transmitted, as VLD_BYTES marks the whole last word valid and the padding starts at the next word. Write the trailing bytes from a zeroed word. The number of words written and VLD_BYTES are unchanged. Found by an AI code review agent. Reproduced on a lan9668 board with register injection, by sending a 57 byte frame and capturing it on the link partner: byte 57 of the padded frame was not zero. With the fix all padding bytes are zero. Fixes: d28d6d2e37d1 ("net: lan966x: add port module support") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261026-lan966x-inject-tail-bytes-v1-1-51d599a48313@microchip.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 540c49f4cf0c62bbd4c56ceed0873b8ed7251400 Author: Dudu Lu Date: Wed Oct 21 23:55:38 2026 +0800 net: xps: bound the cleanup loop by the old map's num_tc [ Upstream commit 6d5a2cb0b7d6caf170d37ae7ac74738d592d2a05 ] __netif_set_xps_queue() walks the OLD dev_maps to free its entries. The per-row trip count uses the NEW num_tc while the row stride uses the OLD dev_maps->num_tc, so when dev->num_tc was raised without rebuilding the XPS map the last row indexes attr_map[] past the allocation: BUG: KASAN: slab-out-of-bounds in __netif_set_xps_queue+0x1458/0x1ee8 Read of size 8 at addr ffff000014f69458 by task insmod/112 The loop frees entries in dev_maps, so both the trip count and the stride must come from dev_maps->num_tc. The map is sized XPS_CPU_DEV_MAPS_SIZE(old num_tc)/XPS_RXQ_DEV_MAPS_SIZE(old num_tc, ...), so iterating the new (larger) num_tc reads past the end. Fixes: 255c04a87f43 ("net: embed num_tc in the xps maps") Signed-off-by: Dudu Lu Reviewed-by: Antoine Tenart Link: https://patch.msgid.link/20261021155538.67867-1-phx0fer@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 65cb39815f8ab6e65f86c58f4e1d58da017c716a Author: Qingfang Deng Date: Mon Oct 26 14:12:58 2026 +0800 pppoe: wait for RCU readers before reusing a socket [ Upstream commit e7b01bc0202a57f1b7dcdf19b2ffab6b781d47f8 ] When pppoe_connect() disconnects or reuses a socket, it removes the old session from the hash table and resets the socket's fields. An RCU reader that reached the entry before it was unlinked can still be using its address, ifindex or next pointer. If sockets A and B share a hash bucket with A preceding B, a concurrent __get_item() looking for B can be traversing A when it is removed. Clearing A->next then makes the lookup miss B and drop the packet. Reinserting A can similarly redirect the reader into another hash chain. Call synchronize_net() after unlinking the old session and before clearing its fields. This allows existing receive-path and /proc/net/pppoe readers to finish before the socket is cleared or reused. This was found by Sashiko's static analysis, and reproduced on a VM stress test with KCSAN. BUG: KCSAN: data-race in hash_item+0x1c/0x60 race at unknown origin, with read to 0xffff888000a1c566 of 2 bytes by task 147 on cpu 2: hash_item+0x1c/0x60 pppoe_seq_next+0x112/0x1b0 seq_read_iter+0x595/0x700 seq_read+0xb0/0xe0 proc_reg_read+0xd0/0xf0 vfs_read+0xbd/0x220 ksys_read+0xa9/0x100 __x64_sys_read+0x47/0x60 x64_sys_call+0x98/0x1fd0 do_syscall_64+0x5b/0x260 entry_SYSCALL_64_after_hwframe+0x4b/0x53 value changed: 0x0002 -> 0x0000 Fixes: 72cdc67e7fa7 ("pppoe: remove rwlock usage") Reported-by: Sashiko Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261020092118.47416-1-qingfang.deng@linux.dev Signed-off-by: Qingfang Deng Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20261026061300.256009-1-qingfang.deng@linux.dev Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 4ce635a28e1ea10d20af7e5c08e0dea5b56bc504 Author: Hannes Laimer Date: Fri Oct 23 13:14:27 2026 +0200 vxlan: keep reserved_bits across changelink [ Upstream commit e3a629477d52a9f49d50d72903be06a4d1f4aa58 ] vxlan_nl2conf() derives reserved_bits from the extension attributes set in the netlink message if IFLA_VXLAN_RESERVED_BITS is absent. A changelink having it set is rejected, so this means that every changelink will reset all extension bits and reserve them again. vxlan_nl2flag() rejects setting a flag on an attribute that is create-only on changelink. So also setting an extension attribute will fail before it can un-reserve its fields. The extension's header bits being reserved again then makes vxlan_rcv() drop frames that have them set in their header as invalid. The device still reports the extension as enabled, because only the reserved_bits are rebuilt and the flags are just copied. A simple reproducer is ip link add vxgbp type vxlan id 1 dstport 4789 local 10.0.0.1 gbp ip link set dev vxgbp type vxlan ageing 300 After setting the unrelated ageing, incoming packets with the GBP bit set in the header start getting dropped. Keeping the reserved_bits on changelink is safe because anything a changelink accepts leaves the header bits enabled extensions use unchanged. Ran into this when adding support for the GBP flag in ifupdown2, see link below. The device kept dropping packets after some time, it turned out it always started after a changelink. Tested this by changing ageing by hand on a vxlan device that was created by ifupdown2 with the gbp flag, and checking the reserved bits using ip -d link show vxgbp | grep -o 'reserved_bits 0x[0-9a-f]*' Without the fix I got 0xf7ffffff000000ff after the changelink, and with the fix it stayed 0x77000000000000ff. The following patch contains a selftest that fails without the fix and passes with it. Fixes: e4f8647767cf ("vxlan: Track reserved bits explicitly as part of the configuration") Link: https://lore.proxmox.com/pve-devel/20260828134708.692354-1-h.laimer@proxmox.com/ Signed-off-by: Hannes Laimer Reviewed-by: Nikolay Aleksandrov Reviewed-by: Petr Machata Link: https://patch.msgid.link/20261023-b4-vxlan-changelink-gbp-v1-1-f0d13951c09b@proxmox.com Tested-by: Gabriel Goller Reviewed-by: Gabriel Goller Reviewed-by: Hangbin Liu Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 497aac8d16e4f2fb593fb1b4ee0d89504d5ea499 Author: Allison Henderson Date: Wed Oct 21 12:58:37 2026 -0700 net/rds: do not initialize transports after rds_init() failed [ Upstream commit ffbbc315b8b883a1c0e131fb3186b9428d2812aa ] rds, rds_rdma and rds_tcp each have their own module_init(). When they are built in, those run in link order, so rds_init() goes first, but do_initcalls() does not stop when it fails. The transports then initialize against a core that has already been torn down: rds_wq has been destroyed, yet rds_ib_dev_put(), rds_ib_unregister_client() and rds_tcp_accept_work() still queue onto or flush it, and rds_trans_register() hands the transports to a core whose socket family may never have been registered. This was seen with CONFIG_SYSCTL=n, where rds_sysctl_init() failed and rds_ib_init()'s error path then flushed the freed rds_wq [1], but any rds_init() failure after rds_threads_init() has the same effect. Record whether rds_init() succeeded and have rds_rdma_init() and rds_tcp_init() bail out with -ENODEV otherwise. Modular builds are unaffected: the transports need symbols exported by rds.ko, so they cannot be loaded unless rds_init() succeeded. [1] https://lore.kernel.org/oe-lkp/202610190310.9737b2e3-lkp@intel.com Fixes: 55b7ed0b582f ("RDS: Common RDMA transport code") Fixes: 70041088e3b9 ("RDS: Add TCP transport to RDS") Suggested-by: Oleg Nesterov Signed-off-by: Allison Henderson Link: https://patch.msgid.link/20261021195837.142802-3-achender@kernel.org Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 0dd3cabf0fc8c675ee550681e6b9bf8f4e11378d Author: Allison Henderson Date: Wed Oct 21 12:58:36 2026 -0700 net/rds: do not fail init when CONFIG_SYSCTL=n [ Upstream commit fbea154a86641d2543a871aa19f7c77a366de542 ] With CONFIG_SYSCTL=n, register_net_sysctl() and register_net_sysctl_sz() are inline stubs that return NULL. rds_sysctl_init(), rds_ib_sysctl_init() and rds_tcp_init_net() all treat that NULL as -ENOMEM, so RDS refuses to initialize at all even though every tunable has a sane compiled-in default. When RDS is built in, that is worse than a missing feature: the failed rds_init() destroys rds_wq, but the rds_rdma initcall still runs, and when rds_ib_sysctl_init() fails the same way, the error path in rds_ib_init() flushes the already freed workqueue: BUG: KASAN: slab-use-after-free in touch_wq_lockdep_map ... __flush_workqueue rds_ib_init rds_rdma_init ... Allocated by task 1: alloc_workqueue_noprof rds_threads_init rds_init ... Freed by task 0: kfree rcu_do_batch Only treat the NULL return as a failure when sysctl support is actually compiled in. The exit paths need no change: unregister_net_sysctl_table() is an empty stub with CONFIG_SYSCTL=n and already tolerates a NULL header otherwise. The underlying problem of built-in transports initializing after rds_init() has failed is independent of sysctl and is addressed separately. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202610190310.9737b2e3-lkp@intel.com Fixes: 3e5048495c85 ("RDS: sysctls") Fixes: e6babe4cc4ce ("RDS/IB: Stats and sysctls") Fixes: c6a58ffed536 ("RDS: TCP: Add sysctl tunables for sndbuf/rcvbuf on rds-tcp socket") Suggested-by: Joel Granados Signed-off-by: Allison Henderson Reviewed-by: Joel Granados Acked-by: Oleg Nesterov Link: https://patch.msgid.link/20261021195837.142802-2-achender@kernel.org Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 28e78e51d25cacc9c51dab8aebf0a9627559ebc7 Author: Tao Gong Date: Thu Oct 22 20:56:48 2026 +0000 net: dsa: mt7530: trap frames to conduit in MFC on EN7581 and AN7583 [ Upstream commit a58b221496dd576191095d12996f39cee58cf6a8 ] On EN7581, STP BPDUs received on switch user ports never reach the CPU. Like MT7531 and MT7988, EN7581 and AN7583 only set the CPU port bitmap in MT7531_CFC and are skipped by mt753x_conduit_state_change(). On EN7581 this is not enough: trapped BPDUs reach the CPU only when MT7530_CPU_EN and MT7530_CPU_PORT are also set in MT753X_MFC. Add EN7581 and AN7583 to mt753x_conduit_state_change(). Tested on an AN7581 board (Gemtek W1700K, airoha,en7581-switch), where only lan3 and lan4 are switch user ports. With RSTP BPDUs arriving on lan4: - without this patch, none reached the CPU; - setting CPU_EN and CPU_PORT by hand delivered them, and clearing them stopped them; - with this patch, they are received from boot. Only BPDUs were tested. AN7583 is untested and is included because the driver sets it up like EN7581. Fixes: 2b0229f67932 ("net: dsa: mt7530: Add EN7581 support") Fixes: d76556db10bf ("net: dsa: mt7530: Add AN7583 support") Acked-by: Lorenzo Bianconi Signed-off-by: Tao Gong Link: https://patch.msgid.link/20261022205649.2351696-1-gongtao0607@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 7ec13d37f494bebee33ee55a8db98db93c8523af Author: Ian Bridges Date: Mon Oct 26 20:29:47 2026 -0500 ksmbd: fix SMB2 CREATE response buffer overflow in compound requests [ Upstream commit d1557d8324c8f757229619f96f8227f7674bdd9e ] A CREATE response that carries an AAPL create context can reach create_rsp_size (572 bytes for SMB 3.1.1). Commit 713c31a3a225 ("ksmbd: fix SMB2 CREATE response buffer overflow") makes smb2_allocate_rsp_buf() reserve that much, but only for the first command of a compound. A CREATE later in the compound is guarded by is_chained_smb2_message() instead, which reserves only MAX_CIFS_SMALL_BUFFER_SIZE (448 bytes) for the next response. smb2_open() then appends the create contexts without checking the space left. That check also uses the unpadded length of the response so far. init_chained_smb2_rsp() pads the previous response to 8 bytes before the next command runs, so the next response can start up to 7 bytes later than the check assumes. When a CREATE follows a command that fills the response buffer, such as QUERY_DIRECTORY, it writes its create contexts past the end of the buffer. The AAPL context is written last. BUG: KASAN: slab-out-of-bounds in create_aapl_rsp_buf+0x31/0x6e0 [ksmbd] Call Trace: create_aapl_rsp_buf+0x31/0x6e0 [ksmbd] smb2_open+0x4fa8/0xd900 [ksmbd] handle_ksmbd_work+0x88c/0x1cb0 [ksmbd] When the next command is a CREATE, reserve create_rsp_size, as smb2_allocate_rsp_buf() does for a single CREATE, and check the reserve against the 8-byte aligned offset where the next response starts. Fixes: 8f1b796ff113 ("ksmbd: add AAPL kAAPL_SERVER_QUERY create context support") Signed-off-by: Ian Bridges Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit f5fbedfb039cc124bfeded1afd8e58ac76b2d55d Author: Cheng Yongkang Date: Thu Oct 22 08:26:48 2026 -0700 net: tun: hold napi_mutex when deleting NAPI in tun_detach_all() [ Upstream commit 6c799b4998c87bb44574bb090b8728bb3b3dbc47 ] With IFF_NAPI_FRAGS, tun_get_user() takes tfile->napi_mutex, gets the skb from napi_get_frags() and copies the user data into it before it enters the RCU read-side section around napi_gro_frags(). tun_detach_all() waits with synchronize_net() and then calls tun_napi_del() without napi_mutex. netif_napi_del() frees napi->skb through napi_free_frags(). A writer that is still copying has not yet entered its RCU section, so synchronize_net() does not wait for it, and deleting the device frees the skb while the writer is using it: BUG: KASAN: slab-use-after-free in skb_copy_datagram_from_iter+0x175/0x720 Read of size 8 at addr ffff888077def990 by task br029-poc/9406 Call Trace: skb_copy_datagram_from_iter+0x175/0x720 tun_get_user+0xb42/0x3d00 tun_chr_write_iter+0x113/0x200 ... Freed by task 9405: kmem_cache_free+0x184/0x670 __netif_napi_del_locked+0x2bb/0x3c0 tun_net_uninit+0x566/0xa70 unregister_netdevice_many_notify+0x1a26/0x2090 rtnl_dellink+0x514/0x710 __tun_detach() also calls tun_napi_del() without the mutex, but only from tun_chr_close(), when no write on that file can be in flight. Take napi_mutex around tun_napi_del() in tun_detach_all() for both attached and disabled queues. Fixes: 90e33d459407 ("tun: enable napi_gro_frags() for TUN/TAP driver") Signed-off-by: Cheng Yongkang Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/179268538303.70821.16548460883330758972@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 7666c06da6422ed2d59b70bb9c063b64a780d0cc Author: Denis Kulikov Date: Mon Oct 26 15:55:41 2026 +0300 ksmbd: use the resolved share path for the share root [ Upstream commit 03b47bdc9ac8e9dacbf1d66a1dfc54b328e283f2 ] If the share path is a mount point and crossmnt is not set (crossmnt = no, or ksmbd-tools that predate the option), the share root looks empty to clients: QUERY_DIRECTORY on it returns only "." and "..". Files created in the root go to the mounted filesystem, but a directory query cannot find them afterwards, so e.g. "rm" of a file that was just uploaded fails with STATUS_NO_SUCH_FILE. An empty name refers to the share root. For it, ksmbd_vfs_path_lookup() looks up share_conf->path again starting from its parent, and the mount on the last component is not followed, which gives the directory covered by the mount. All other names are looked up relative to share_conf->vfs_path, which was resolved through the mount when the share was set up. share_conf->vfs_path already refers to the share root, so return a reference to it instead of looking the path up again. Fixes: 74d7970febf7 ("ksmbd: fix racy issue from using ->d_parent and ->d_name") Signed-off-by: Denis Kulikov Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit bf6f4d54f6c01ec1be5bf70610e6838e0fbfbada Author: Gao Xiang Date: Tue Oct 27 09:07:46 2026 +0100 erofs: drop unnecessary .read_folio() checks for file-backed mounts [ Upstream commit 209108a5456171ab430e25b54b2dfe083455bfb6 ] Since currently dedicated EROFS-owned meta inodes are used for file-backed mounts, .read_folio() checks are now redundant. As a result, EROFS file-back mounts can now apply to tmpfs too. Fixes: e587a984d332 ("erofs: use dedicated meta inodes for file-backed mounts") Signed-off-by: Gao Xiang (Docker) Signed-off-by: Sasha Levin commit 2d67153930bb341d48b66c0b9cf5db1f9dbe8fa1 Author: Giuseppe Scrivano Date: Fri Oct 2 18:31:44 2026 +0200 erofs: reuse superblock for file-backed mounts [ Upstream commit cd4108319bb3355a54252377eeaa610e8d603ba7 ] When the same file-backed image is mounted multiple times (via path or fd) with the superblock_share mount option, reuse the existing superblock instead of creating a new one. This allows multiple mounts of the same image to share in-kernel data structures more efficiently. The backing file is identified by its inode and fsoffset. If mount options conflict or extra devices are used, a separate superblock is created transparently as a fallback. Remount is not allowed on shared superblocks. Tested by mounting a 177M Fedora EROFS image 20 times with full traversal: #!/bin/sh IMG=${1:-/root/fedora.erofs} OPTS=${2:+-o $2} N=20 DIR=$(mktemp -d) trap "umount $DIR/m* 2>/dev/null; rm -rf $DIR" EXIT sync; echo 3 > /proc/sys/vm/drop_caches INODES_BEFORE=$(grep erofs_inode /proc/slabinfo | awk '{print $2}') MEM_BEFORE=$(grep ^Slab: /proc/meminfo | awk '{print $2}') for i in $(seq 1 $N); do mkdir $DIR/m$i mount -t erofs $OPTS "$IMG" $DIR/m$i find $DIR/m$i > /dev/null done echo "Superblocks: $(grep $DIR /proc/self/mountinfo | \ awk '{print $3}' | sort -u | wc -l)" echo "erofs_inode delta: +$(( $(grep erofs_inode /proc/slabinfo | \ awk '{print $2}') - INODES_BEFORE ))" echo "Slab delta: +$(( $(grep ^Slab: /proc/meminfo | \ awk '{print $2}') - MEM_BEFORE )) kB" without superblock_share: # time ./test.sh /root/fedora.erofs Superblocks: 20 erofs_inode delta: +45864 Slab delta: +37448 kB real 0m2.311s user 0m0.222s sys 0m1.998s with superblock_share: # time ./test.sh /root/fedora.erofs superblock_share Superblocks: 1 erofs_inode delta: +2044 Slab delta: +284 kB real 0m0.679s user 0m0.157s sys 0m0.469s The time difference shows that sharing the superblock also benefits the page cache and inode cache, as subsequent mounts of the same image avoid re-reading the backing file. This is particularly useful for container hosts running multiple containers from the same base image. Signed-off-by: Giuseppe Scrivano Reviewed-by: Gao Xiang Signed-off-by: Gao Xiang Stable-dep-of: 209108a54561 ("erofs: drop unnecessary .read_folio() checks for file-backed mounts") Signed-off-by: Sasha Levin commit 3f94a905f3763573e0faf1a10facba574c8508b8 Author: Giuseppe Scrivano Date: Fri Oct 2 18:31:43 2026 +0200 fs: rename vfs_get_super() to get_tree_super() and export it [ Upstream commit 64571ba6581695e936cd701e345efdbe43e05920 ] Rename and export it so filesystems that need a custom superblock matching policy can reuse it directly instead of open-coding sget_fc() + fill_super(). No functional change. This is a preparatory fix for the next patch. Signed-off-by: Giuseppe Scrivano Link: https://patch.msgid.link/20261002163225.1258203-2-giuseppe@scrivano.org Reviewed-by: Christoph Hellwig Reviewed-by: Jan Kara Signed-off-by: Christian Brauner (Amutable) Stable-dep-of: 209108a54561 ("erofs: drop unnecessary .read_folio() checks for file-backed mounts") Signed-off-by: Sasha Levin commit 319a3e9566ccf66bc8203f297fac3fbb0739f6a3 Author: Sally Marcher Date: Mon Oct 26 14:29:34 2026 +0100 ALSA: usb-audio: Add correct datainterval in the quirks-table for Microbook II [ Upstream commit a09c2f3b267e47767b8937f65930567edbb88d44 ] This patch fixes playback issues on the Microbook II. The correct value was in the older driver for this device (https://github.com/manuel-rhdt/snd-microbookii/blob/dd304c097bb6a9d52276ac29c6969fa02bc7674a/audio.c#L914). Datainterval needs to be set explicitly. Fixes: a634090a0f24 ("ALSA: usb-audio: Add quirk for MOTU MicroBook II") Signed-off-by: Sally Marcher Link: https://lore.kernel.org/d5dfd044-69f6-4fc3-9884-6599d88afb55@student.tugraz.at Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 72f65fd08bba0803885f61cc9370ed9f03bea3bc Author: HyeongJun An Date: Tue Oct 27 10:22:27 2026 +0900 ALSA: pcmtest: Honor the enable parameter [ Upstream commit fe3b45a0875a8b0944d2adee3ca62283d876edc0 ] The enable module parameter is declared and documented as "Enable pcmtest soundcard.", but nothing reads it. Loading the module with enable=0 still creates the card. Return -ENODEV from mod_init() when enable is false, as the pcsp driver does. Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Signed-off-by: HyeongJun An Link: https://patch.msgid.link/20261027012228.3797565-1-sammiee5311@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 344166dd22d2232cff2dcf48b5a84d3728874a46 Author: Nicolai Buchwitz Date: Sat Oct 24 15:23:07 2026 +0200 net: usb: cdc_mbim: don't enable BHs in tx_fixup under netpoll [ Upstream commit bfd7ced012c7857b5ab5edf7e416c2789b652702 ] cdc_mbim_tx_fixup() has the same spin_unlock_bh() as cdc_ncm_tx_fixup(). Under netpoll it runs pending softirqs while the txq lock is held, and a transmit from one of them spins on that lock. Use plain spin_lock() as in cdc_ncm. Fixes: 9bf211a30b3f ("net: cdc_mbim: adding MBIM driver") Signed-off-by: Nicolai Buchwitz Link: https://patch.msgid.link/20261024-cdc-ncm-netpoll-v3-2-6284ca03f967@tipi-net.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 8b70445ba6d55b46d2e2159d8c7381458be1b987 Author: Nicolai Buchwitz Date: Sat Oct 24 15:23:06 2026 +0200 net: usb: cdc_ncm: don't enable BHs in tx_fixup under netpoll [ Upstream commit 108ca34cf4b453f6375a70079e32b11866b02601 ] netpoll holds the txq lock and calls ndo_start_xmit() with IRQs off but BHs on. The spin_unlock_bh() in cdc_ncm_tx_fixup() then runs pending softirqs. If one of them transmits, it spins on the txq lock that netpoll holds. With netconsole on a cdc_ncm device this ends in a soft or hard lockup. Every caller of cdc_ncm_tx_fixup() holds the txq lock with BHs or IRQs off, so the softirq user of ctx->mtx cannot interrupt it. Use plain spin_lock(). Fixes: c84ff1d6dff3 ("cdc_ncm: reduce driver latency in the data path") Reported-by: Mikkel Eskildsen Closes: https://lore.kernel.org/netdev/PRAP189MB185019A5A8D411482BB6E0CDA9982@PRAP189MB1850.EURP189.PROD.OUTLOOK.COM/ Signed-off-by: Nicolai Buchwitz Link: https://patch.msgid.link/20261024-cdc-ncm-netpoll-v3-1-6284ca03f967@tipi-net.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit f3c9889dede78991b1cc6339035cdc0bb0e155fc Author: Binbin Deng <18983559317@163.com> Date: Tue Oct 20 10:26:30 2026 +0800 net: atlantic: Unregister before clearing RXNFC rules [ Upstream commit 13b364c765e69db1f8446399d8db0b331c23b50c ] aq_pci_remove() clears the driver's RXNFC rule list before unregistering the netdevice. Until unregister_netdev() returns, ethtool operations can still call aq_get_rxnfc_rule(), aq_get_rxnfc_all_rules(), aq_add_rxnfc_rule(), or aq_del_rxnfc_rule(). Those paths traverse the same unlocked hlist that aq_clear_rxnfc_all_rules() is mutating and freeing. The race is reachable by issuing RXNFC ethtool commands concurrently with PCI device removal or driver unbind. A reader can dereference a node that has just been freed, and two writers can corrupt the list or free the same rule more than once, causing KASAN reports, list corruption, or a kernel panic. Reverse the removal order: unregister the netdevice first, then clear the RXNFC rules. After unregister_netdev() returns, ethtool can no longer enter the driver, while the PCI device is still available for the rule-clearing routine to issue hardware commands. Found during a static-analysis-assisted audit: candidate sites were surfaced by a Coccinelle rule, and the reader/writer paths were confirmed by LLM-assisted (GLM-5.3) code inspection. The issue was not observed at runtime; it is identified by code inspection only. Fixes: 8d0bcb012f57 ("net: aquantia: add infrastructure for ntuple rules") Signed-off-by: Binbin Deng <18983559317@163.com> Link: https://patch.msgid.link/20261020022630.515209-1-18983559317@163.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d1ee3d3fc55fdef6f56570dd2a889a2470041880 Author: Paolo Abeni Date: Fri Oct 23 10:44:09 2026 +0200 gtp: hold RCU in gtp_genl_send_echo_req() [ Upstream commit a204e9c001dfafe83cac01b16508b1cf5c953355 ] Such function is invoked in process context, performs an RCU device lookup and dereference the found device with no additional protection. ============================= WARNING: suspicious RCU usage 7.3.0-virtme #7 Not tainted ----------------------------- net/core/dev.c:1047 RCU-list traversed in non-reader section!! other info that might help us debug this: rcu_scheduler_active = 2, debug_locks = 1 locks held by python3/233: 2, last CPU#5: #0: ffffffffbab93268 (cb_lock){++++}-{4:4}, at: genl_rcv+0x19/0x40 #1: ffffffffbab93320 (genl_mutex){+.+.}-{4:4}, at: genl_rcv_msg+0x12c/0x160 stack backtrace: CPU: 5 UID: 0 PID: 233 Comm: python3 Not tainted 7.3.0#7 PREEMPT(full) Hardware name: Bochs, BIOS Bochs 01/01/2011 Call Trace: dump_stack_lvl+0x6f/0xb0 lockdep_rcu_suspicious.cold+0x37/0x8e dev_get_by_index_rcu+0x135/0x180 gtp_find_dev+0xe7/0x360 [gtp] gtp_genl_send_echo_req+0x298/0xb30 [gtp] genl_family_rcv_msg_doit+0x20f/0x310 genl_family_rcv_msg+0x3a8/0x640 genl_rcv_msg+0xbb/0x160 netlink_rcv_skb+0x154/0x3a0 genl_rcv+0x28/0x40 netlink_unicast+0x54b/0x860 netlink_sendmsg+0x7fb/0xf60 __sys_sendto+0x3d6/0x450 __x64_sys_sendto+0xe4/0x1f0 do_syscall_64+0xff/0x530 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7ffa43b0256e Code: 4d 89 d8 e8 d4 bd 00 00 4c 8b 5d f8 41 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 11 c9 c3 0f 1f 80 00 00 00 00 48 8b 45 10 0f 05 c3 83 e2 39 83 fa 08 75 e7 e8 03 ff ff ff 0f 1f 00 f3 0f 1e fa RSP: 002b:00007ffd3b8828d0 EFLAGS: 00000202 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007ffd3b8829e0 RCX: 00007ffa43b0256e RDX: 0000000000000034 RSI: 00007ffa3519d0d0 RDI: 0000000000000006 RBP: 00007ffd3b8828e0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffa351cc0c0 R13: 00007ffd3b8829e0 R14: 00007ffa354ca130 R15: 00007ffa4433d498 Add the missing RCU guards and keep it for the whole function body, while the RCU-protected device is used. Found by code inspection, validated explicitly testing the relevant code path. Fixes: d33bd757d362 ("gtp: Implement GTP echo request") Signed-off-by: Paolo Abeni Link: https://patch.msgid.link/ed27d133fe73afd377d3fa4e553c34e7987b6dd9.1792744478.git.pabeni@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 096c263e91e324d46c2c0cc6789081015819eaaa Author: Qingfang Deng Date: Fri Oct 23 16:00:00 2026 +0800 pppoe: drop discovery frames with no MAC header [ Upstream commit 406bf2dc8d6d3e93fdae0b66d2ae99b6b62e479c ] Commit 8540827ebac6 ("pppoe: fix reception of frames with no mac header") drops PPPoE session frames with no MAC header to avoid reading uninitialized memory. Apply the same to PPPoE discovery frames, as both functions read eth_hdr(skb)->h_source. Found by LLM static analysis, and reproduced using the same TUN injection as described in the mentioned commit. Fixes: 8540827ebac6 ("pppoe: fix reception of frames with no mac header") Signed-off-by: Qingfang Deng Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261023080002.221332-1-qingfang.deng@linux.dev Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit c83e717d431ebb55ffa200c384f26512a38e07f3 Author: Tung Nguyen Date: Fri Oct 23 12:28:18 2026 +0700 tipc: fix refcount panic in tipc_rcv() when receiving shared skb [ Upstream commit 5308a2049b764aa55513c90c68933abf596c51d2 ] TIPC assumes that the received skb is not shared with other users. However, syzbot reports a bug triggered by receiving a shared skb: ... RIP: 0010:pskb_expand_head+0x135a/0x13a0 net/core/skbuff.c:2308 __pskb_pull_tail+0x111/0x1870 net/core/skbuff.c:2890 skb_cow_data+0x2ed/0xc50 net/core/skbuff.c:5398 tipc_aead_decrypt net/tipc/crypto.c:892 [inline] tipc_crypto_rcv+0x346/0x23d0 net/tipc/crypto.c:1843 tipc_rcv+0x4b7/0x1040 net/tipc/node.c:2119 tipc_l2_rcv_msg+0x2d9/0x470 net/tipc/bearer.c:669 deliver_ptype_list_skb net/core/dev.c:2533 [inline] ... The root cause is that local delivery hooks in the kernel (e.g., deliver_skb()) may increment the skb's reference count (`users`) before TIPC processes it on ingress. Fix this by calling skb_share_check() to ensure exclusive ownership before passing the skb to tipc_rcv(). As TIPC needs to modify the skb's data, the cloned skb needs to be uncloned when needed. This can be addressed in separate patch. Reported-by: syzbot+0017742620a9d06f06ef@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=0017742620a9d06f06ef Closes: https://lore.kernel.org/all/20261018145928.58317-1-ngocthang2710.1999@gmail.com/T/ Fixes: b97bf3fd8f6a ("[TIPC] Initial merge") Co-developed-by: Nguyen Ngoc Thang Signed-off-by: Nguyen Ngoc Thang Signed-off-by: Tung Nguyen Link: https://patch.msgid.link/20261023052921.54220-1-tung.quang.nguyen@est.tech Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b729cb1d4343cb5e7b1186530b24f0c8355a929c Author: Jerome Brunet Date: Wed Oct 14 18:11:53 2026 +0200 clk: cdce925: Size the PLL child name buffer for any int [ Upstream commit e9e6b4dc303dff637ef725aca4f4968d7600798b ] The PLL child node name is built from "PLL%d" in a 6 byte stack buffer. The PLL index is bounded by the chip's num_plls, at most 4, but GCC cannot see that bound and, with W=1, warns that the formatted string may not fit. Make the buffer large enough to hold any int and use snprintf() with sizeof() so the size stays tied to the declaration. Fixes: 19fbbbbcd3a3 ("Add TI CDCE925 I2C controlled clock synthesizer driver") Signed-off-by: Jerome Brunet Link: https://patch.msgid.link/20261014-cdce925-truncate-child-name-v1-1-00136be00c49@baylibre.com Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit c58111ae3998c234ea694246868dd9f58cb769e5 Author: Gabriel Fernandez Date: Mon Oct 12 15:18:59 2026 +0200 clk: stm32: fix clock array size for STM32MP21 [ Upstream commit 40e5d379cc19fa7fa477414087df5e915d5e843f ] STM32MP21_LAST_CLK is used as the number of entries of the onecell clk_hw array allocated in stm32_rcc_clock_init(), and as the bound of the clock IDs it can hold. It was wrongly set to CK_SCMI_KER_ETR (112), which belongs to the SCMI clock ID range, whereas the RCC clock IDs go up to CK_KER_STM (289). As a result the array is too small, and registering a clock whose ID is greater than 111 writes past the end of the allocated clk_hw array (hws[cfg_clock->id] = hw), and consumers requesting such a clock get rejected or read out of bounds. Define STM32MP21_LAST_CLK as CK_KER_STM + 1 so that the array covers all the RCC clock IDs. No device tree node uses the STM32MP21 RCC driver yet, so there is no need to backport this patch to stable kernels. Fixes: 37ae8501cdb0 ("clk: stm32: introduce clocks for STM32MP21 platform") Signed-off-by: Gabriel Fernandez Link: https://patch.msgid.link/20261012131859.215240-1-gabriel.fernandez@foss.st.com Signed-off-by: Jerome Brunet Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 251e82909e7f8bad46762c778e5ee415b9db28a5 Author: bui duc phuc Date: Tue Oct 6 18:05:01 2026 +0700 clk: lmk04832: Handle reset GPIO lookup errors [ Upstream commit 5c7c0cbf81bba69695efa12e451f0f2ecd4b92a5 ] devm_gpiod_get_optional() may return -EPROBE_DEFER or other errors, but lmk04832_probe() currently ignores them. Check the return value and propagate errors from the reset GPIO lookup. Fixes: 3bc61cfd6f4a ("clk: add support for the lmk04832") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261006110501.57051-1-phucduc.bui@gmail.com Signed-off-by: Jerome Brunet Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit e81f8fd56cafb91f5edaa41d45db06ae01b399bd Author: Eric Dumazet Date: Sun Oct 25 12:13:37 2026 +0100 ipmr: clear skb->cb[] in reg_vif_xmit() [ Upstream commit 389952e8776a4663044df2ae3e8987a9e81964cf ] reg_vif_xmit() hands the skb to ipmr_cache_report() as an IGMPMSG_WHOLEPKT report. When the mroute socket has IP_PKTINFO enabled, ipmr_cache_report() calls ipv4_pktinfo_prepare() on the original skb, which reads skb->cb[] as IPCB. By the time the pimreg device transmits the packet, skb->cb[] is not IPCB anymore: qdisc_pkt_len_init() overwrites IPCB(skb)->iif with qdisc_skb_cb(skb)->pkt_len, and any qdisc installed on the device or a tc BPF program writing skb->cb[] fills the area holding the IP options and IPCB(skb)->flags. For locally generated packets routed out pimreg (they carry an rtable dst), the mroute socket can therefore receive a bogus ipi_ifindex (the packet length), and the l3mdev slave test in ipv4_pktinfo_prepare() is driven by stale qdisc data. Clear IPCB before building the report, as done for IPv6 in commit 238164201431 ("ip6mr: clear skb->cb[] in reg_vif_xmit()"). The skb is freed right after, so nothing else depends on its control block. Fixes: bb7403655b3c ("ipmr: support IP_PKTINFO on cache report IGMP msg") Signed-off-by: Eric Dumazet Reviewed-by: Ido Schimmel Reviewed-by: Hangbin Liu Link: https://patch.msgid.link/20261025111337.142787-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 3befe3ce154f542f608736d5b1d7b4ee725afeab Author: Eric Dumazet Date: Thu Oct 22 17:54:36 2026 +0200 net: harden qdisc_pkt_len_segs_init() against malicious GSO packets [ Upstream commit c6648c9f3b51c5a8a3df470c1542b2aa378d88f9 ] An SKB_GSO_DODGY packet can carry untrusted gso_size and headers. For instance, gso_size=1 and hdr_len=65532 for a 524275-byte frame makes qdisc_pkt_len_segs_init() compute an accounted length of about 4,294,574,091 bytes (after gso_segs silently wrapped in a u16). With DRR quantum 256, the dequeue path then needs ~16.8 million deficit refills before it can dequeue the skb, keeping the CPU in the qdisc path long enough to trigger the soft-lockup watchdog. Commit 8f735d64382d ("net/sched: bound qdisc_pkt_len to prevent qdisc soft lockup") added QDISC_PKT_LEN_MAX to bound size table amplification. Use the same bound for DODGY packets: - Make gso_segs a u32 and drop packets whose segment count does not fit GSO_MAX_SEGS, instead of silently truncating it. - Drop packets whose estimated qdisc_pkt_len() would exceed QDISC_PKT_LEN_MAX. Fixes: 15e5a0307164 ("net_sched: better precise estimation on packet length for untrusted packets") Reported-by: shaos Closes: https://lore.kernel.org/netdev/20261022144755.65025-1-shawnq1@163.com/ Signed-off-by: Eric Dumazet Cc: Jamal Hadi Salim Cc: "Michael S. Tsirkin" Acked-by: Michael S. Tsirkin Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20261022155436.117507-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 47c79318c9a1cbdbb7329e3560dbd23679ee7eb9 Author: alex todadze Date: Tue Oct 20 22:42:24 2026 +0000 net: stmmac: fix rx checksum offload with extended descriptors [ Upstream commit 72ee27b97986f4d331fe1c26e4333f12738d982f ] With extended descriptors, bit 0 of RDES0 is the Extended Status Available flag. enh_desc_get_rx_status() still reads it as the payload checksum error bit of the checksum offload table, so every IP frame that has extended status is reported as csum_none and its checksum is verified again in software. When extended status is available, take the result from RDES4 instead. A TCP, UDP or ICMP payload with no IP header error, no payload error and no checksum bypass is a good frame. Everything else keeps the status from RDES0. Since RDES4 now decides the checksum status, read it after the own bit with dma_rmb(). While at it, fix the IP payload type mask, which covered bits 6:2 instead of 2:0 and had no users. Tested on a Siflower SF19A2890 (GMAC 3.70) with the board as the iperf3 endpoint. TCP receive goes from 326 to 378 Mbit/s with one stream and from 259 to 329 Mbit/s with four, and CPU use while receiving 200 Mbit/s drops from 26.6% to 21.5%. In stmmac_rx(), frames with a bad TCP, UDP or ICMP checksum, over IPv4 and IPv6 and including fragmented UDP, are still passed up as CHECKSUM_NONE and dropped by the stack. Fixes: c24602ef8664 ("stmmac: support extend descriptors") Signed-off-by: alex todadze Link: https://patch.msgid.link/20261020-stmmac-rx-csum-v2-1-330c8d0951ea@proton.me Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ae0c55799795196a1ea157ca47868d7acc80a5c7 Author: Dudu Lu Date: Wed Oct 21 23:54:17 2026 +0800 net/sched: taprio: unwind the netdevice notifier if register_qdisc() fails [ Upstream commit c5234f89d7cb311880ef218cb7a969794a106678 ] taprio_module_init() registers taprio_device_notifier and then returns register_qdisc()'s error directly. When register_qdisc() fails the notifier stays registered, but the loader's failure path frees the module image without ever calling the __exit function, so netdev_chain is left pointing at taprio_device_notifier.notifier_call -- a function pointer that lives in text that has just been freed. register_qdisc() has two failure returns: -EEXIST (duplicate .id) and -EINVAL (malformed cl_ops). taprio_class_ops satisfies every checked implication, so -EINVAL is unreachable and -EEXIST is the only reachable failure; it needs a pre-existing "taprio" entry in qdisc_base. In-tree that is reachable only through bpf_qdisc_reg() (CONFIG_NET_SCH_BPF); a module calling the exported register_qdisc() reaches it as well. Once the notifier is left dangling, the next netdevice event that walks netdev_chain calls through the stale pointer: BUG: KASAN: vmalloc-out-of-bounds in notifier_call_chain+0x650/0xb5c Read of size 8 at addr ffff80001fc5ab08 by task ip/110 notifier_call_chain+0x650/0xb5c raw_notifier_call_chain+0x34/0x64 call_netdevice_notifiers_info+0xa8/0x198 __dev_close_many+0xe0/0x800 ... >ffff80001fc5ab00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 The shadow row is all f8 (KASAN_VMALLOC_INVALID): the read lands in vmalloc memory that was poisoned when the module image was freed, and the indirect call is unguarded because the only check, func_ptr_is_kernel_text(), is compiled out unless CONFIG_DEBUG_NOTIFIERS. Mirror the sibling sch_cbs.c and act_mirred.c, which unwind the notifier on this failure path. Fixes: 7b9eba7ba0c1 ("net/sched: taprio: fix picos_per_byte miscalculation") Signed-off-by: Dudu Lu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261021155417.66254-1-phx0fer@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 6f2c6a4eee6eedba45fd3e1b7506471e75b94a08 Author: Alexandre Cassen Date: Wed Oct 21 21:32:18 2026 +0200 net/sched: act_api: inherit filter offload flags only on new actions [ Upstream commit 9463e8d8c6922a5aa87f7e4fe6deb4f16925d498 ] tcf_action_init() gives the skip_sw and skip_hw flags of a filter to the actions it binds. An action that another filter created gets them too, they then apply to every filter that uses this action. When a skip_sw filter reuses the action of a software filter, the software filter silently stops running it. This happens even when the filter add fails on a later action. A skip_hw filter likewise prevents a later filter without flags from reusing the action. Give the flags only to the actions that the filter creates. The mismatch check still rejects a filter that reuses an action with a flag that the filter does not have. Discovered by manual code inspection after the Sashiko AI review [1] of a tunnel_key patch questioned how actions get the filter flags. Reproduced on netdevsim without kernel changes. The egress filter below runs in software only, since netdevsim offloads only ingress filters. Once the skip_sw filter reuses its drop action, the last command shows skip_sw on this action and the egress filter stops dropping packets: ethtool -K eth0 hw-tc-offload on tc qdisc add dev eth0 clsact tc filter add dev eth0 egress protocol ip flower dst_ip 192.0.2.1 \ action gact drop index 1 tc filter add dev eth0 ingress protocol ip flower skip_sw \ dst_ip 192.0.2.2 action gact drop index 1 tc actions get action gact index 1 Tested with the reproducer and the tc-testing action, matchall and flower tests. Fixes: 34d35b4edbbe ("net/sched: act_api: deny mismatched skip_sw/skip_hw flags for actions created by classifiers") Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261009051930.3619697-1-acassen%40corp.free.fr [1] Signed-off-by: Alexandre Cassen Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261021193222.1318333-2-acassen@corp.free.fr Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 08280c4a2a03b3423d3639a5beb165f17d963cc5 Author: Prashant Sengar Date: Wed Oct 21 01:45:37 2026 +0530 net: usb: lan78xx: avoid NULL PHY dereference in WoL setup [ Upstream commit dacb77e32e2bba78f90a8637fd27e13e2c9775dd ] LAN7801 supports fixed-link configurations without an attached PHY. However, lan78xx_set_wol() unconditionally passes netdev->phydev to phy_ethtool_set_wol(), causing a NULL pointer dereference when a userspace WoL request reaches this path. Report no WoL capabilities when no PHY is attached, and return -EOPNOTSUPP from lan78xx_set_wol() before modifying the wakeup configuration. Keep the existing phylib WoL handling for devices with an attached PHY. The issue was reproduced using USB Raw Gadget and dummy_hcd in QEMU. An ETHTOOL_SWOL ioctl triggered a kernel Oops with the original driver. With this change, the PHY-less configuration no longer advertises unsupported WoL operations, avoiding the crash. Fixes: e110bc825897 ("net: usb: lan78xx: Convert to PHYLINK for improved PHY and MAC management") Signed-off-by: Prashant Sengar Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20261020201537.2465655-1-prashantsengar25031@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 9139eb97efcf9296a1b94470811e4813972c9662 Author: Dudu Lu Date: Wed Oct 21 23:54:33 2026 +0800 net/sched: gred: keep the qdisc lock while updating the table [ Upstream commit 306f788134a21a3d60c1eb872d0ec0ce7c7e09bc ] gred_change_table_def() publishes table->DPs/def/red_flags under sch_tree_lock(), drops the lock, and then keeps writing state the datapath reads without it: - gred_enable_rio_mode()/gred_disable_rio_mode()/gred_disable_wred_mode() set/clear table->flags; - the red_flags_changed loop writes table->tab[i]->red_flags; - the shadowed-VQ loop frees table->tab[i] and clears the slot. gred_enqueue() and gred_dequeue() read those same fields (test_bit on table->flags, q->red_flags, t->tab[]/t->DPs) under the same root lock on another CPU, so the post-unlock writes race with the enqueue path: BUG: KCSAN: data-race in gred_change_table_def [sch_gred] / gred_enqueue [sch_gred] read (marked) to 0xffff000007ad3b00 of 8 bytes by task 110 on cpu 0: gred_enqueue+0x88/0xc60 [sch_gred] dev_qdisc_enqueue+0x4c/0x19c __dev_queue_xmit+0x10a4/0x1ea4 The comment justifying the early unlock only covers the DP-vs-DPs check, which the shadowed-VQ free loop relies on; it does not cover the scalar mode bits and per-VQ red_flags written afterwards. Move the unlock below those updates so everything the datapath reads is published under the lock that protects it. Fixes: 6639607ed9de ("[PKT_SCHED]: GRED: Use a central table definition change procedure") Signed-off-by: Dudu Lu Reviewed-by: Simon Horman Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20261021155434.66572-1-phx0fer@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit fa0d3becd0da00fc6b5d7bf63110d93785b16afc Author: Zhang Yi Date: Mon Oct 26 13:48:37 2026 +0800 ASoC: codecs: es*: Modify the maximum value of DMIC_GAIN [ Upstream commit 29b867d8351de378704775d3733bfb589c48ab1f ] The Kcontrol related to DMIC_GAIN affects bits[3:2]. However, the old code sets ES8375_DMIC_GAIN_MAX to 4, which causes the Kcontrol to affect bits [4:2],this is incorrect. Therefore, change ES8375_DMIC_GAIN_MAX to 3. Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375") Reviewed-by: HyeongJun An Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20261026054837.13618-3-zhangyi@everest-semi.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 4e6bd02526d1caa440aade1988d57e63cc27874d Author: Zhang Yi Date: Mon Oct 26 13:48:36 2026 +0800 ASoC: codecs: es*: Modify the registers related to ALC RECOVERY [ Upstream commit dd64271fe1b935252cf454a72a558cbdb7be57c5 ] The register related to "ALC Capture Recovery Level" is ES8326_ALC_RECOVERY, not ES8326_ALC_LEVEL. Fixes: 5c439937775d ("ASoC: codecs: add support for ES8326") Reviewed-by: HyeongJun An Signed-off-by: Zhang Yi Link: https://patch.msgid.link/20261026054837.13618-2-zhangyi@everest-semi.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9b65674c8058ba087116fbee8a12a8b8dfd94e39 Author: Marek Szyprowski Date: Thu Oct 22 11:09:22 2026 +0200 ASoC: codecs: wsa881x: Fix shared powerdown GPIO handling [ Upstream commit c80f86ed857e21dcdd389559d3e62bf53ff39f9a ] On Qualcomm RB5 both WSA8815 speaker amplifiers share a single powerdown GPIO (TLMM 130), which is handled by the shared GPIO proxy. Since commit b30973e8c392 ("gpio: shared: make the voting mechanism adaptable") the proxy treats the value set by the first user on request as the default and lets any single user vote for the opposite value. The driver requests the GPIO de-asserted (GPIOD_OUT_LOW), so powering the amplifier up became the default and asserting powerdown became the winning vote. Once both amplifiers are runtime suspended, resuming them deadlocks: the first one releases its powerdown vote and waits for SoundWire enumeration, but the line stays asserted, because the second amplifier is still suspended and votes for powerdown. The wait times out and playback fails: wsa881x-codec sdw:1:0:0217:2110:00:3: Initialization not complete wsa881x-codec sdw:1:0:0217:2110:00:3: ASoC error (-110): at snd_soc_pcm_component_pm_runtime_get() on sdw:1:0:0217:2110:00:3 Request the GPIO asserted, so that powerdown is the default state and the line is de-asserted as long as any amplifier needs to be powered, then de-assert it to power up the amplifier as before. Also use gpiod_set_value_cansleep() instead of gpiod_direction_output() in the runtime PM callbacks. The line is already configured as an output and the proxy resets its default value when the direction is set while it has only a single user, which can happen if the other amplifiers have not been probed yet. Fixes: bfa336cee332 ("ASoC: wsa881x: Move custom workaround to gpiolib-of") Fixes: b30973e8c392 ("gpio: shared: make the voting mechanism adaptable") Signed-off-by: Marek Szyprowski Link: https://patch.msgid.link/20261022090923.769464-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 342b5d38e68dac5b5735c5cf849db17e2aa9f4bb Author: Ravi Hothi Date: Fri Oct 23 18:13:16 2026 +0100 ASoC: codecs: wsa883x: Fix VI sense port channel count [ Upstream commit 9728b328d7adf228d5f691d0ec43bb7a6d07e44b ] The VI sense port carries both the voltage and the current sense data of the speaker, but it is described with max_ch = 1 and, since commit ed3b274abc40 ("ASoC: codecs: wsa883x: Correct VI sense channel mask"), a channel mask of 0x1, so only half of the V/I pair is transferred. Describe the port as two channels and set the channel mask back to 0x3. Fixes: ed3b274abc40 ("ASoC: codecs: wsa883x: Correct VI sense channel mask") Cc: Krzysztof Kozlowski Signed-off-by: Ravi Hothi Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20261023171316.819857-8-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 848728924de1ff16773dd4b6eca1a55fc8ff1416 Author: Ravi Hothi Date: Fri Oct 23 18:13:15 2026 +0100 ASoC: codecs: wsa884x: Fix VI sense port channel count [ Upstream commit a6093f98cbfc4a717ef3d1048b0e38fb2035be98 ] The VI sense port carries both the voltage and the current sense data of the speaker, but it is described with max_ch = 1 and, since commit 060fac202eb8 ("ASoC: codecs: wsa884x: Correct VI sense channel mask"), a channel mask of 0x1, so only half of the V/I pair is transferred. Describe the port as two channels and set the channel mask back to 0x3. Fixes: 060fac202eb8 ("ASoC: codecs: wsa884x: Correct VI sense channel mask") Cc: Krzysztof Kozlowski Signed-off-by: Ravi Hothi Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20261023171316.819857-7-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c13289e91312a21228a4dbe28262f8fdcda562fc Author: Srinivas Kandagatla Date: Fri Oct 23 18:13:14 2026 +0100 ASoC: codecs: wsa883x: disable runtime PM on unbind [ Upstream commit ea63182d71956dc33c6f08dc4171f1052f8409a9 ] Probe enables runtime PM but nothing disables it on unbind, or when registering the component fails. A pending autosuspend can then run wsa883x_runtime_suspend() after the devm-managed regmap is freed, and dereference NULL, as seen on wsa884x. Use devm_pm_runtime_enable() so runtime PM is disabled before the regmap is freed. Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support") Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20261023171316.819857-6-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9cf81e5632e75a97b3fdfff1167a76febe066ea0 Author: Srinivas Kandagatla Date: Fri Oct 23 18:13:13 2026 +0100 ASoC: codecs: wsa884x: disable runtime PM on unbind [ Upstream commit 54c121eaeed8ee7751935db8100b6b5c57124db9 ] Probe enables runtime PM but nothing disables it on unbind. The pending autosuspend then runs wsa884x_runtime_suspend() after the devm-managed regmap is freed, and dereferences NULL: Unable to handle kernel NULL pointer dereference at virtual address 0000000000000020 pc : regcache_cache_only+0x18/0x80 lr : wsa884x_runtime_suspend+0x24/0x40 [snd_soc_wsa884x] Use devm_pm_runtime_enable() so runtime PM is disabled before the regmap is freed. Fixes: aa21a7d4f68a ("ASoC: codecs: wsa884x: Add WSA884x family of speakers") Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20261023171316.819857-5-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 67855639630dc566b2bbff8e5e46a012125744be Author: Hungyu Lin Date: Fri Oct 23 06:07:24 2026 +0000 thermal: Fix CPU mask truncation in power limit trace event [ Upstream commit 82c9c94f54a444a686e926c872dae4b198d1036f ] num_possible_cpus() counts CPUs, but CPU IDs need not be contiguous. Using it to size the thermal_power_cpu_limit bitmap can omit CPUs with higher IDs. For example, possible CPUs 0 and 64 produce an eight-byte bitmap on a 64-bit system, dropping CPU 64. Use nr_cpumask_bits for both sizing and copying the bitmap. Fixes: 6828a4711f99 ("thermal: add trace events to the power allocator governor") Signed-off-by: Hungyu Lin Link: https://patch.msgid.link/20261023060724.5691-1-dennylin0707@gmail.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 1521dff9d84e1c32ed1421d1f68c96b72476f788 Author: Ovidiu Panait Date: Mon Oct 5 11:11:57 2026 +0000 PM: suspend: Do not call suspend_ops->begin()/end() for s2idle [ Upstream commit 4785d5faa935a828a04743c5a7d279baf454c723 ] Commit 7602c0ec0bbf ("firmware: psci: Set pm_set_resume/suspend_via_firmware() for SYSTEM_SUSPEND") made psci_system_suspend_begin() call pm_set_suspend_via_firmware(), so that device drivers can prepare for the possible removal of the power before PSCI SYSTEM_SUSPEND. Since then, on platforms where PSCI firmware supports SYSTEM_SUSPEND, pm_suspend_via_firmware() returns true during both s2ram and s2idle. This is inconsistent, since SYSTEM_SUSPEND is only invoked for s2ram. This was observed while investigating PCI-related suspend/resume issues on Renesas platforms (RZ/G3S, RZ/V2H), and was traced to platform_suspend_begin() falling back to suspend_ops->begin() (PSCI in this case) when there is no s2idle_ops->begin() callback: platform_suspend_begin(PM_SUSPEND_TO_IDLE) suspend_ops->begin() psci_system_suspend_begin() pm_set_suspend_via_firmware() platform_resume_end() falls back to suspend_ops->end() in the same way. Since s2idle has its own set of callbacks in s2idle_ops, make platform_suspend_begin() and platform_resume_end() only invoke those for s2idle, like the other platform_*() helpers do. Fixes: 7602c0ec0bbf ("firmware: psci: Set pm_set_resume/suspend_via_firmware() for SYSTEM_SUSPEND") Signed-off-by: Ovidiu Panait Tested-by: Claudiu Beznea Link: https://patch.msgid.link/20261005111157.17256-1-ovidiu.panait.rb@renesas.com [ rjw: Added Fixes: tag ] Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit bbe790d6722b99820f8788b915253c2d21dd53b2 Author: Sasha Levin Date: Wed Oct 14 16:01:25 2026 -0400 selftests/thermal: allow cross builds of the Intel tests [ Upstream commit ff4194e54f840b4df4eb2489c63ee88283895efc ] The power_floor and workload_hint Makefiles build nothing when CROSS_COMPILE is set, even for an x86 target, and they include lib.mk only on x86. Other architectures therefore have no install or emit_tests rules for these suites, and their installation fails with a missing target. Select the x86 tests from the target ARCH when it is given and from the host's SUBARCH otherwise, and include lib.mk unconditionally so that the suites install and emit an empty runlist on other architectures. Use a private ARCH_PROCESSED instead of the ARCH override added by commit 5a1292137e89 ("selftests: fix ARCH normalization to handle command-line argument"): the override changed the value lib.mk uses to pick the clang target, whereas leaving ARCH unset lets lib.mk use the compiler's native triple. A command-line ARCH such as x86_64 is still normalized for the selection, while an ARCH spelling that lib.mk does not know, such as i686 with LLVM=1, is rejected as in other selftests. Fixes: 27801542b2b8 ("selftests/thermel/intel: Add test to read workload hint") Fixes: d4d27e5a1a88 ("selftests/thermel/intel: Add test to read power floor status") Signed-off-by: Sasha Levin Link: https://patch.msgid.link/20261014200127.1363472-4-sashal@kernel.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 79ea6e42f8bae1edd16ef8ca6e5984a7e8bb0993 Author: Jérémie Rodon Date: Sun Oct 25 10:50:37 2026 +0100 spi: cs42l43: Add speaker ID quirk for Dell XPS 13 DX13260 SKU 0E54 [ Upstream commit 7da2aca123754c0e06092bbe179d58078b58d8d4 ] The Dell XPS 13 DX13260 is also sold with SKU 0E54, which has the same ACPI speaker ID layout as SKU 0E53: two pins in one GpioIo() while the spk-id-gpios _DSD property references only the first. Without the quirk the speaker ID is wrong (0), so there is no speaker audio and no amp firmware is loaded. Add a DMI entry for SKU 0E54 using the same handler. Fixes: cad16d850e37 ("spi: cs42l43: Workaround for wrong speaker ID on Dell XPS 13 DX13260") Signed-off-by: Jérémie Rodon Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/20261025095037.18891-1-jeremie.rodon@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit a57076d14f0fc0dfbda1d5baa7c44637768e6e40 Author: TJ Adams Date: Tue Sep 29 09:08:13 2026 -0700 block: advance iterator after copy-in for SG_DXFER_TO_FROM_DEV [ Upstream commit 82e72ea18d0af724914c31a1f274c1aef452aad0 ] When a passthrough request uses transfer direction SG_DXFER_TO_FROM_DEV, bio_copy_user_iov() sets up a temporary iterator iter2 with data_source = ITER_SOURCE to copy user data into the bio pages before execution. bio_copy_from_iter(bio, &iter2) copies the data and advances iter2, but the original iter is never advanced. Consequently, iov_iter_count(&i) remains non-zero in the caller loop in blk_rq_map_user_iov(): i = *iter; do { if (copy) ret = bio_copy_user_iov(rq, map_data, &i, gfp_mask); ... } while (iov_iter_count(&i)); Because i is never advanced, blk_rq_map_user_iov() loops indefinitely, continually allocating bios and consuming map_data pages until it exhausts pages and fails with -EINVAL. Fix this by calling iov_iter_advance(iter, bio->bi_iter.bi_size) in the map_data && map_data->from_user branch after bio_copy_from_iter(). Fixes: 13f3956eb568 ("block: Fix WARNING in _copy_from_iter") Signed-off-by: Terrence Adams Assisted-by: LLM Acked-by: Christian A. Ehrhardt Link: https://patch.msgid.link/20260929160813.1599129-1-tadamsjr@google.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 439b2fa8a24b7f09b3bd97fee71bd17224e9d70c Author: Waiman Long Date: Sun Oct 25 19:53:59 2026 -0400 cgroup/cpuset: Release invalid isolated CPUs with a shrunk root partition parent [ Upstream commit ec0254b9eb49ebc9383dc3ae5cb69c8606f88499 ] It is also reported by sashiko that there may be leakages of isolated CPUs when a root partition parent shrinks its effective_xcpus with isolated partition children. Leakage here means that isolated_cpus may contain extra CPUs that are not in any isolated partitions and not boot time isolated. Those CPUs cannot be used in any isolated partitions anymore. There are 2 different cases here. The effective_xcpus becomes empty and the isolated partition should be invalidated in this case. Alternatively some of its effective_xcpus are not in parent's effective xcpus but still have some valid effective_xcpus left. The isolated partition can remain valid. In both cases, the invalid isolated CPUs will have to be released from isolated_cpus if appropriate. Fix that by calling isolated_cpus_release() to release those isolated CPUs from isolated_cpus. New test cases are added to test_cpuset_prs.sh to test this. Fixes: 11e5f407b64a ("cgroup/cpuset: Keep track of CPUs in isolated partitions") Signed-off-by: Waiman Long Reviewed-by: Guopeng Zhang Tested-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 7784be9742733d62e361208674f6a434089ef91e Author: Waiman Long Date: Sun Oct 25 17:44:46 2026 -0400 cgroup/cpuset: Release invalid isolated CPUs in compute_partition_effective_cpumask() [ Upstream commit a7d89d92fdfbceb678d82710135d4eee2623d727 ] It is found by sashiko that when a child isolated partition with parent root partition is invalidated in compute_partition_effective_cpumask(), the switching of the isolated exclusive CPUs from child to parent will not be reflected in isolated_cpus leading to CPU leakage. Fix that by calling isolated_cpus_update() when that happens. Also simplify compute_partition_effective_cpumask() by doing child partition invalidation only for the special case of no more effective_cpus left in a populated parent. The other case doesn't actually warrant invalidation at this stage and subsequent iteration in update_cpumasks_hier() and update_parent_effective_cpumask() for that child should handle that. Also drop the make_partition_invalid() helper by inlining it into compute_partition_effective_cpumask() as it is the only caller. A new test case is add to test_cpuset_prs.sh to verify this. Fixes: 11e5f407b64a ("cgroup/cpuset: Keep track of CPUs in isolated partitions") Signed-off-by: Waiman Long Reviewed-by: Guopeng Zhang Tested-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit bc6f75f16ceb8f0241874786545346dfcda09da3 Author: Waiman Long Date: Sun Oct 25 17:44:45 2026 -0400 cgroup/cpuset: Make sure compute_partition_effective_cpumask() is only called for valid partition [ Upstream commit 356a3aa7404e420e6f19c5ed42db7b8bd0c7ee9f ] With visual inspection to make sure that compute_partition_effective_cpumask() is only called for valid partition root, it was found that the function can be called for an invalidated partition near the end of cpuset_hotplug_update_tasks(). When partcmd is set, update_parent_effective_cpumask() is called to either invalidate a valid partition or with partcmd_update to check if an invalid partition can be switched back to valid. In both cases, cpuset_force_rebuild() should be invoked. However, compute_partition_effective_cpumask() should only be called when an invalid partition is switched back to valid. When a partition is invalidated, compute_effective_cpumask() should be called instead. Also add a WARN_ON_ONCE() in compute_partition_effective_cpumask() to ensure that a valid partition root is passed in. Fixes: 72c6303acfa1 ("cgroup/cpuset: Take isolated CPUs out of workqueue unbound cpumask") Signed-off-by: Waiman Long Acked-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 5d1ae77c96412705b25a8e7b39fff4b94b3e53e8 Author: Waiman Long Date: Sun Oct 25 17:44:44 2026 -0400 cgroup/cpuset: Prevent recursive call of remote_cpus_update() via update_cpumasks_hier() [ Upstream commit 10a6f00d82544a1baa901de8d28f41f28c364995 ] Guopeng reports that changing the cpumask of a remote partition root may set the effective_cpus of the top_cpuset incorrectly. It is due to the following call sequence: update_cpumask() -> partition_cpus_change() -> remote_cpus_update() -> update_sibling_cpumasks() -> update_cpumasks_hier() -> remote_cpus_update() The second remote_cpus_update() call passes in the cs->effective_xcpus instead of the trialcs->effective_xcpus of the first remote_cpus_update() call. As a result, the second call can revert what has been done in the first call leading to incorrect effective_cpus of the top_cpuset as well as subpartitions_cpus. Fix that by adding a new remote_partition_updating flag into the cpuset structure to indicate that a remote partition is being updated and update_cpumasks_hier() should skip the whole subtree as update_cpumask() or update_exclusive_cpumask() which calls partition_cpus_change() will eventually calls update_cpumasks_hier() for that subtree anyway. This new flag is currently set only in remote_cpus_update() to prevent recursive call of remote_cpus_update() on the same cpuset. A test case is added to test_cpuset_prs.sh to verify this change. Reported-by: Guopeng Zhang Link: https://lore.kernel.org/lkml/20261010075947.333549-2-guopeng.zhang@linux.dev Reviewed-by: Guopeng Zhang Tested-by: Guopeng Zhang Fixes: f62a5d39368e ("cgroup/cpuset: Remove remote_partition_check() & make update_cpumasks_hier() handle remote partition") Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 5fec40de680b9360f1194767b6c297fd37d1a027 Author: Waiman Long Date: Sun Oct 25 17:44:42 2026 -0400 cgroup/cpuset: Minor fixes to prstate_housekeeping_conflict() [ Upstream commit 40702b2ca8fa08fb64b926d8c72a4909d0330580 ] Commit 9527ff78a413 ("cgroup/cpuset: Consider all the exclusive CPUs when doing housekeeping check") changes the way prstate_housekeeping_conflict() is being used by considering all the exclusive xcpus to be owned by the partition when doing housekeeping check. However there are two minor issues reported by sashiko with that patch: 1) In partition_cpus_change(), prstate_housekeeping_conflict() can be called with an invalid partition root. In that case, there are no isolated CPUs that are going to be returned back to the system to become housekeeping CPUs, so the calculation of the del_cpus cpumask is meaningless. 2) The checking of del_cpus in prstate_housekeeping_conflict() to see if it can contain an active housekeeping CPU that can be returned to the system ignores the fact that an active CPU not in HK_TYPE_DOMAIN_BOOT HK cpumask will not become an active housekeeping CPU when it is released by an isolated partition. Update the existing code to handle these two issues properly to make prstate_housekeeping_conflict() produce more accurate result. Fixes: 9527ff78a413 ("cgroup/cpuset: Consider all the exclusive CPUs when doing housekeeping check") Signed-off-by: Waiman Long Reviewed-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 641635cbb850efb69e7b22f77efbc28adc317bfd Author: Waiman Long Date: Sun Oct 25 17:44:41 2026 -0400 cgroup/cpuset: Fix incorrect effective_cpus bug in update_cpumasks_hier() [ Upstream commit d3873b45bea4cc99d135922cdc89841164f33855 ] With the introduction of cpuset.cpus.exclusive, the computation of effective_cpus differs depending on if a cpuset is a valid partition root or not. In update_cpumasks_hier(), effective_cpus is computed early to check if the current subtree can be skipped. Later on update_parent_effective_cpumask() may be called which can change the partition state from valid to invalid or vice versa. If the partition state changes, the previously computed effective_cpus may no longer be valid. Fix that by recomputing effective_cpus again when that happens. Also add a new test case into test_cpuset_prs.sh to verify this change. Fixes: e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2") Signed-off-by: Waiman Long Reviewed-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 220c4130d3b49bbc669f96c03993d3874ab907d4 Author: Waiman Long Date: Sun Oct 25 17:44:40 2026 -0400 cgroup/cpuset: Properly compute effective xcpus in update_parent_effective_cpumask() [ Upstream commit 69a75e4f377629928bd173747b864694c2af4e1c ] Since the introduction of cpuset.cpus.exclusive in commit e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2"), a compute_effective_exclusive_cpumask() helper which is later renamed to compute_excpus() is added to compute the effective xcpus of a partition root. However update_parent_effective_cpumask() is not updated in all proper places to use the new helper to check if a given cpuset should remain a valid partition root. This can cause a cpuset to incorrectly remain a valid partition root even if no effective xcpus is left. Fix that problem by using compute_excpus() to compute the effective xcpus into delmask in all cases except partcmd_disable, partcmd_invalidate or partcmd_update with newmask set and use it for tasks_nocpu_error() check as well as checking its emptiness. This enables us to catch invalid partition root more accurately in update_parent_effective_cpumask(). In the case of partcmd_update with newmask set, the passed in new effective xcpus value will directly be used in the tasks_nocpu_error() check without relying on old data in the cpuset. For the partcmd_update with NULL newmask case, the cpu exclusivity test there is also relaxed to be performed only if exclusive_cpus is empty. Some test case are added to test_cpuset_prs.sh for invalidating a partition root due to its effective xcpus becoming empty as well as making sure that an invalid partition can only be revived when exclusive CPUs are available agin. Fixes: e2ffe502ba45 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2") Signed-off-by: Waiman Long Reviewed-by: Guopeng Zhang Tested-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 8c6412fecad0c43a3852a23e82d8def28456974f Author: Waiman Long Date: Mon Oct 19 14:10:17 2026 -0400 cgroup/cpuset: Don't allow a child root partition under an isolated parent [ Upstream commit c0189e75d3b8355ed29fea33c184c3eb00dc273d ] Although it is not typical for real users to create a complicated nested partition hierarchy, it is currently allowed to create nested root and isolated partitions. In addition, disabling or invalidating a partition should always be allowed especially when the cpuset is being deleted. With a nested root and isolated partition hierarchy, it is possible that all active housekeeping CPUs can be exhausted when disabling or invalidating a root partition and returning its CPUs to the isolated parent. One way to avoid this problem is to disallow the creation of a root partition under an isolated parent. It is indeed a new limitation imposed on the existing cpuset partition functionality. However an isolated partition is usually a left node where scheduling and some other kernel noises are disabled. It doesn't make much sense to create a child root partition under an isolated parent and remove some CPUs from the set of isolated CPUs again. Creation of a child isolated partition under a root or isolated parent is still allowed. If a partition with child root partitions is converted to isolated, the child root partitions will be invalidated. The cgroup-v2 documentation is also updated to reflect this new limitation. New test cases are added to test_cpuset_prs.sh to verify this new behavior. Some existing test cases are also updated accordingly. Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Stable-dep-of: 69a75e4f3776 ("cgroup/cpuset: Properly compute effective xcpus in update_parent_effective_cpumask()") Signed-off-by: Sasha Levin commit 7e413e7d08e7d8f796b45dbd4912582c45f5848f Author: Waiman Long Date: Sun Oct 25 17:44:39 2026 -0400 cgroup/cpuset: Find furthest isolated ancestor for invalidated isolated partition [ Upstream commit 0bce85ff2cc0f7f7d8de16f5fdfc0ae7d29f21f1 ] Commit 46b885416c27 ("cgroup/cpuset: Fix a missing isolated_cpus update in update_cpumasks_hier()") searches for the closet partition root ancestor to determine if the isolated CPUs in a to be invalidated isolation partition should be removed from isolated_cpus or not. As reported by sashiko, this method may not work when there is a deeply nested isolated partition hierarchy. For instance, Consider a nested hierarchy A0 -> A1 -> A2 -> A3 where all four are PRS_ISOLATED: A0: effective_xcpus = 0-4 A1: effective_xcpus = 1-4 A2: effective_xcpus = 2-4 A3: effective_xcpus = 3-4 When A1 shrinks its exclusive_cpus from 1-4 to 1-2, A2 will update it effective_xcpus to 2. A3 will find its closet partition root ancestor A2 and decides that its effective_xcpus 3-4 should be removed from isolated_cpus which is incorrect. Address this corner case by adding a new isolated_cpus_release() helper to replace the existing ancestor_partition() helper. This new helper will search for the furthest isolated partition root ancestor to decide if some or all of its isolated CPUs should be removed from isolated_cpus and also perform the removal when appropriate. The is_remote_partition() and is_local_partition() helpers are also moved up so they can be used in earlier functions. There are other pre-existing problems that will still prevent the above test case to work correctly. These problems will be addressed in subsequent patches. Fixes: 46b885416c27 ("cgroup/cpuset: Fix a missing isolated_cpus update in update_cpumasks_hier()") Signed-off-by: Waiman Long Reviewed-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit bb57a8a8df761c4d758393395a9bf353cdb81c45 Author: Nguyen Ngoc Thang Date: Fri Oct 2 07:06:17 2026 +0000 libceph: reject bad connect_seq in msgr1 READY reply [ Upstream commit 6dfc1b1a99da4909aee07a906352be5c3fc9baba ] process_connect() WARN_ON()s when the peer's READY/SEQ reply carries a connect_seq other than ours + 1. That value comes off the wire, so a misbehaving or malicious server can trigger the warning at will (and panic machines running with panic_on_warn). Check it before touching connection state and fail the connection with a protocol error instead, like the other bad-reply cases here. Fixes: 31b8006e10a4 ("ceph: messenger library") Reported-by: syzbot+21f8628595b2061c438d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=21f8628595b2061c438d Signed-off-by: Nguyen Ngoc Thang Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit 09e91a5ef35d5fceea6732a71be39dccd0c9e3bb Author: Yogesh Gaur Date: Fri Sep 11 19:01:10 2026 +0530 ceph: don't keep a mon_addr string that failed to parse [ Upstream commit 6c82bff8561f4c20dc0113f81cb2f6e6e2b4cf70 ] ceph_parse_mon_addr() stores the string in fsopt->mon_addr before handing it to ceph_parse_mon_ips(), and then returns that function's error. So after a mon_addr= that does not parse, fsconfig() reports the failure but the mount context keeps the rejected string. That matters because ceph_get_tree() uses fsopt->mon_addr as the "monitor addresses were supplied" test: if (fsopt->new_dev_syntax && !fsopt->mon_addr) return invalfc(fc, "No monitor address"); Userspace is free to ignore the error from fsconfig(FSCONFIG_SET_STRING) and go straight to FSCONFIG_CMD_CREATE. The check then passes on a value that was rejected, and the mount continues with ceph_options::num_mon still 0 - which is how syzbot reached the BUG_ON() in pick_new_mon() fixed by the previous patch. Parse first and commit only on success. A failed mon_addr= now leaves any previously accepted value in place instead of replacing it with one that does not parse. Fixes: 7b19b4db5add ("ceph: new device mount syntax") Reported-by: syzbot+1dbed5969931c19d3eb5@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=1dbed5969931c19d3eb5 Assisted-by: Cursor Signed-off-by: Yogesh Gaur Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit a59568451161ece882e7847591edf9dce7fae287 Author: Xiang Mei Date: Mon Sep 14 21:43:02 2026 -0700 ceph: fix off-by-one NUL termination in decode_encrypted_symlink() [ Upstream commit 4da259ea8bf4bd6a91a63f33630a26592d2353f8 ] decode_encrypted_symlink() allocates enclen + 1 bytes but writes the NUL terminator at sym[declen + 1] instead of sym[declen]. A malicious MDS can report symlink_len == 0 for an encrypted inode, and base64_decode() returns 0 for a zero-length input, so the store lands one byte past a kmalloc(1) allocation. Terminate at sym[declen], which is always within the allocation. BUG: KASAN: slab-out-of-bounds in ceph_fill_inode (fs/ceph/inode.c:996) Write of size 1 at addr ffff888020aad361 by task kworker/0:0/9 Workqueue: ceph-msgr ceph_con_workfn Call Trace: kasan_report (mm/kasan/report.c:595) ceph_fill_inode (fs/ceph/inode.c:996 fs/ceph/inode.c:1277) ceph_fill_trace (fs/ceph/inode.c:1716) ceph_con_process_message (net/ceph/messenger.c:1424) ceph_con_v1_try_read (net/ceph/messenger_v1.c:1430) ceph_con_workfn (net/ceph/messenger.c:1576) ... The buggy address belongs to the object at ffff888020aad360 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 0 bytes to the right of allocated 1-byte region [ffff888020aad360, ffff888020aad361) Fixes: 79f2f6ad878c ("ceph: create symlinks with encrypted and base64-encoded targets") Reported-by: co+b0f93e29183ce737@bugs.sh Assisted-by: LLM Signed-off-by: Xiang Mei Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit ec98267960b9fdb591dd50ebd7a16a82577c8598 Author: Tal Zussman Date: Mon Sep 7 15:38:19 2026 +0000 ceph: don't clear write_congested when collecting folios [ Upstream commit 77ff2ba4630b9e9e9f73bbaaeb675638b2c20dd0 ] ceph_process_folio_batch() assigns the result of is_write_congestion_happened() to fsc->write_congested for every folio it collects. The code it replaced only ever set write_congested to true here, leaving the decrement paths to clear it once writeback_count drops below CONGESTION_OFF_THRESH. The unconditional assignment means that a sync writeback that runs while the count sits between the off and on thresholds clears the flag on its first folio, and background writeback resumes early. Only set the flag here, as before. Fixes: ce80b76dd327 ("ceph: introduce ceph_process_folio_batch() method") Assisted-by: Claude:fable-5.1 Signed-off-by: Tal Zussman Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit 11fdd8b32d25d3f79b611c35638a8a385ce30501 Author: Tal Zussman Date: Mon Sep 7 15:38:19 2026 +0000 ceph: fix writeback_count leak when a bounce page allocation fails [ Upstream commit 7807710d88ad03e7ca9b5f79f518f040db2a4e09 ] ceph_process_folio_batch() calls is_write_congestion_happened(), which increments fsc->writeback_count, before calling move_dirty_folio_in_page_array(). If the fscrypt bounce page allocation there fails, the folio is redirtied and never makes it into the page array, but the count is never dropped. write_congested is only cleared when a decrement falls below CONGESTION_OFF_THRESH, so the leaked counts set congestion early and eventually leave write_congested set for good. Every WB_SYNC_NONE writeback then returns 0 and background writeback stops entirely. Bump the count only once the folio is in the page array. Fixes: d55207717ded ("ceph: add encryption support to writepage and writepages") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260902-remove-wait-on-page-writeback-v5-0-0b512e77e75b%40columbia.edu?part=1 Assisted-by: Claude:fable-5.1 Signed-off-by: Tal Zussman Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit c335168835626e75adb726a35b82d0c50abe16d1 Author: Tal Zussman Date: Wed Sep 2 12:11:26 2026 -0400 ceph: wait for pending fscache write in write_folio_nounlock() [ Upstream commit 3f7655f0d9186656c6f1cbc012a39c866d4aaabf ] write_folio_nounlock() marks the folio with PG_private_2 via ceph_set_page_fscache() and starts an async write to the cache via ceph_fscache_write_to_cache(). PG_private_2 is only cleared once that write completes. If the OSD write fails, the error paths return without waiting for the cache write. On retry, ceph_find_incompatible() would wait for writeback, but not for PG_private_2, before calling write_folio_nounlock() again, which would trip the VM_BUG_ON_FOLIO() in folio_start_private_2(). Wait for any pending cache write before starting writeback on the folio. Do so before bumping the writeback congestion count and allocating the possibly mempool-backed OSD request, so that a thread sleeping on the cache I/O does not hold either while it waits. Add ceph_folio_wait_fscache(), a wrapper for folio_wait_private_2(), and use it. Fixes: 1702e7973410 ("ceph: add fscache writeback support") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260804-remove-wait-on-page-writeback-v2-0-81f0ab065284%40columbia.edu?part=7 Signed-off-by: Tal Zussman Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit 323d7bbd07594edcc4095c5fd5c00a7f81bb4ac1 Author: Tal Zussman Date: Wed Sep 2 12:11:25 2026 -0400 ceph: fix error handling when the OSD client is stopping in ceph_submit_write() [ Upstream commit ad67b498de17b709f050d7ebf84749b1fc6a242d ] When ceph_inc_osd_stopping_blocker() fails, ceph_submit_write() redirties and unlocks the folios remaining in ceph_wbc->fbatch. However, none of those folios are locked at this point: locked folios were moved to ceph_wbc->pages[] and removed from the fbatch by ceph_process_folio_batch(). Unlocking them triggers VM_BUG_ON_FOLIO(!folio_test_locked(folio)) in folio_unlock(), or unlocks a folio locked by another task. This error path also returns -EIO without fully cleaning up the folios in ceph_wbc->pages[]: their references are never dropped, fscrypt bounce pages are never freed, the writeback congestion count is never decremented, and the pages array is leaked. ceph_wbc->locked_pages is also left non-zero, so ceph_writepages_start() loops back around and hits BUG_ON(ceph_wbc.locked_pages). Leave the fbatch folios alone, as ceph_writepages_start() drops their references when releasing the batch, and unwind ceph_wbc->pages[] the same way writepages_finish() would have. Abort writeback in ceph_writepages_start() instead of continuing, matching the handling of ceph_inc_osd_stopping_blocker() failure on entry, as the OSD client is being torn down and further writeback cannot make progress. An LLM was used to verify that the cleanup was comprehensive, and suggested aborting the writeback instead of continuing. Fixes: 1551ec61dc55 ("ceph: introduce ceph_submit_write() method") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260804-remove-wait-on-page-writeback-v2-0-81f0ab065284%40columbia.edu?part=5 Assisted-by: Claude:fable-5 Signed-off-by: Tal Zussman Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit 5fe1b1ccdcd2d5d51531fe556feaa697ad238b1f Author: Alex Markuze Date: Mon Aug 24 18:50:03 2026 +0000 ceph: fix page vector leak on encrypted netfs read EIO path [ Upstream commit 00a0d7f377f6af59bc559b2e07dffff63eaa5544 ] ceph_netfs_issue_read() pins pages with iov_iter_get_pages_alloc2() for encrypted inodes and attaches them with own_pages=false. If ceph_inc_osd_stopping_blocker() then fails, the request is dropped without calling finish_netfs_read(), so the page array and the references taken on those pages leak: ceph_osd_data_release() only frees pages when own_pages is true, and __free_pages() would be the wrong destructor for GUP-pinned pages. Release the vector with put_page() and kvfree() on that error path, matching finish_netfs_read(). Unencrypted ITER reads are unaffected. Fixes: 1464de9f813e ("ceph: wait for OSD requests' callbacks to finish when unmounting") Signed-off-by: Alex Markuze Reviewed-by: Tal Zussman Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit c9e687b81c52b068bc2db1b47a18c6f94d7ee44e Author: Xiubo Li Date: Thu Aug 27 04:08:16 2026 -0700 ceph: mark the superblock active after mounting [ Upstream commit 32eacfae3b16f6a9c0c20f946115abf5a091c922 ] ceph_get_tree() calls sget_fc() directly and so never goes through vfs_get_super(), which is what sets SB_ACTIVE after fill_super for filesystems that use it. Before commit 82995cc6c5ae ("libceph, rbd, ceph: convert to use the new mount API") the flag used to be set by get_sb_nodev(), which did this for ceph, but the conversion dropped it. SB_ACTIVE is required for iput_final() to retain an inode on the inode LRU instead of evicting it once its last reference goes away. This has gone unnoticed because ceph sets inode_just_drop() for ->drop_inode, which always asks for eviction, so the retain branch in iput_final() was never reachable. The next patch makes ->drop_inode() able to retain inodes, and that needs the flag to actually work. Set it once the mount is up, like nfs_get_tree() does. Fixes: 82995cc6c5ae ("libceph, rbd, ceph: convert to use the new mount API") Signed-off-by: Xiubo Li Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit 097f074ce15da80b364ede1113a8765638ad91cc Author: Max Kellermann Date: Mon Aug 24 20:41:49 2026 +0200 ceph: remove unused field `i_cap_migration_resv` [ Upstream commit a200e12135c96893f7c29bdf97f46868132f695d ] This field was added 17 years ago by commit de57606c23afd ("ceph: client types") but it was never used. This reduces the size of `struct ceph_inode_info` by 8 bytes. Fixes: de57606c23afd ("ceph: client types") Signed-off-by: Max Kellermann Reviewed-by: Viacheslav Dubeyko Reviewed-by: Alex Markuze Signed-off-by: Ilya Dryomov Signed-off-by: Sasha Levin commit d9818e325217d347a5df8b18a6c315e81b9a9ff8 Author: Henry Martin Date: Mon Oct 26 11:09:28 2026 +0800 netlink: fix out-of-bounds bitmap access clearing stale mc groups [ Upstream commit 6430fb7f1cc4e329e386521b7b208df443de92f2 ] netlink_realloc_groups() sizes nlk->groups to the number of groups that exist at bind/ADD_MEMBERSHIP time. When more multicast groups are registered later (e.g. a new genl family), existing sockets keep their smaller bitmap. When clearing a multicast group of a departing family, __netlink_clear_multicast_users() runs netlink_update_socket_mc() on each socket on mc_list, which does test_bit()/__assign_bit() on group - 1 with no regard to nlk->ngroups. Skip sockets whose bitmap predates the group: such a socket can never have joined it. The overflow windows differ per architecture, both needing privileged module (un)loading. On 32-bit kernels the ~54 dynamically allocated genl groups already exceed the initial 32-bit bitmap, so the table can grow there directly. On 64-bit kernels the same in-tree set fits the initial 64-bit bitmap only while allocation stays contiguous: genl_allocate_reserve_groups() takes the first free contiguous range and unregister does not compact, so an unload/reload sequence can fragment the ~59 free IDs until no fitting range remains, forcing the table past 64 bits and reaching the same stale-bitmap overflow on the next family teardown. This issue was discovered by Tencent CodeBuddy Security. Fixes: 84659eb529b3 ("[NETLIKN]: Allow removing multicast groups.") Signed-off-by: Henry Martin Signed-off-by: Dave Miller Signed-off-by: Sasha Levin commit 74bcc59c720e63cf41b6023b3cd2429bbd1401a9 Author: HyeongJun An Date: Mon Oct 26 12:16:55 2026 +0900 ALSA: pcmtest: Reject invalid fill_mode values [ Upstream commit 5deb9c57ba93d28a52871a96f3d8794d2cbed035 ] The fill_block() function handles only fill_mode 0 (random) and 1 (pattern). With any other value it writes nothing and does not move the buffer position. A capture stream then gets no data, and a read fails with -EIO after the timeout. Nothing in the kernel log says why. Check the value in a set callback, so a bad value is rejected both when the module is loaded and when the parameter is written. Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/20261026031655.2699561-1-sammiee5311@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 2baf358407edb426fc3c6d90e1df9ee9f88f8e07 Author: Weiming Shi Date: Sun Oct 25 18:52:49 2026 -0700 bpf: Validate stack arg reads against caller state [ Upstream commit 90aedf8854c05713c02b381c41c59081b5cedbcc ] check_stack_arg_read() bounds a stack argument index with the callee's BTF-derived argument count, then uses the index in the caller's stack_arg_regs[] array. The array's actual logical length is recorded in caller->out_stack_arg_cnt, so the bound and indexed object can diverge. A crafted BPF_PROG_LOAD can use an argument mismatch to mark a static subprogram's BTF information unreliable. Later calls return from btf_check_subprog_call() before check_outgoing_stack_args(), while check_func_call() continues the static call on -EINVAL. The callee can then read a slot that the caller never allocated or initialized. The earlier commit 4286f5deee14 ("bpf: Validate outgoing stack args when btf_prepare_func_args fails") closed this hole for the first call, but not for later calls after the subprogram has been marked unreliable. Callbacks have a related problem. The verifier can make incoming stack arguments readable from outgoing slots at the helper call site. However, helpers and kfuncs invoke callbacks through an ABI that passes at most five arguments, so the runtime callback receives no stack arguments. Async callback verification can also reach check_stack_arg_read() without a caller frame. On x86-64, KASAN reports the direct-call out-of-bounds copy as: BUG: KASAN: slab-out-of-bounds in check_load_mem+0xb51/0xc60 Read of size 80 at addr ffff8881009af550 by task poc/131 Call Trace: check_stack_arg_read at kernel/bpf/verifier.c:4234 (inlined by) check_load_mem at kernel/bpf/verifier.c:6645 do_check_common at kernel/bpf/verifier.c:19568 bpf_check at kernel/bpf/verifier.c:21318 bpf_prog_load at kernel/bpf/syscall.c:3134 Reject callback subprograms with incoming stack arguments before their state is pushed. For direct calls, retrieve the slot with bpf_get_spilled_stack_arg(), which validates the index against the caller's out_stack_arg_cnt and rejects uninitialized slots before copying the register state. Fixes: 0f6bd5e7a804 ("bpf: Support stack arguments for bpf functions") Reported-by: Signed-off-by: Weiming Shi Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261026015250.1674676-1-bestswngs@gmail.com Signed-off-by: Sasha Levin commit 68dcb241ad0c35b917a8cd60d218aa40369cbc3d Author: Thomas Weißschuh Date: Wed Sep 2 14:06:15 2026 +0200 vdso/gettimeofday: Correct the read of tz_minuteswest and tz_dsttime [ Upstream commit cbd0f65b48f52d308c457b0fd5201324abadb501 ] When these fields got moved from 'struct vdso_time_data' to the new 'struct vdso_clock', this access was forgotten. 'vd' is not an array, but a pointer to a single structure. The code works by accident in its current form as CS_HRES_COARSE is 0. Replace the incorrect array access with a regular pointer dereference. Fixes: 886653e36639 ("vdso: Rework struct vdso_time_data and introduce struct vdso_clock") Signed-off-by: Thomas Weißschuh Signed-off-by: Thomas Gleixner Reviewed-by: Nam Cao Reviewed-by: Vincenzo Frascino Link: https://patch.msgid.link/20260902-vdso-tz-v1-1-4d37a6b85ff9@linutronix.de Signed-off-by: Sasha Levin commit 3d5c1df3716a6350c049dd8e48c29fa773c307ef Author: Hui Su Date: Fri Oct 16 10:09:44 2026 +0900 sched/idle: Use hrtimer cleanup class in play_idle_precise() [ Upstream commit bd091346971c88fccd44afd2547d28366f824572 ] Pair on-stack setup with destruction using the hrtimer_on_stack cleanup class in play_idle_precise(). Keep the cleanup object's scope around timer start and the idle wait. Start the timer in pinned hard mode, so its callback runs as a hardirq on the current CPU. The interrupted task observes it.done only after the callback returns. Since the callback returns HRTIMER_NORESTART, the timer is not requeued before the cleanup object tears down its on-stack debug object. Fixes: c1de45ca831a ("sched/idle: Add support for tasks that inject idle") Signed-off-by: Hui Su Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/eccd97b2003a16291817974798cbe98b25b582a0.1792083743.git.sh_def@163.com Signed-off-by: Sasha Levin commit bd7aefd93f9c7212251bd7c31850dc96d36db845 Author: Hui Su Date: Fri Oct 16 10:09:43 2026 +0900 hrtimer: Add cleanup class for on-stack timers [ Upstream commit 064bcd117e8a1a266bb92b840f63862999b7cb87 ] hrtimer_setup_on_stack() requires callers to destroy the timer before its backing stack storage goes out of scope, but the setup interface does not encode the required teardown pairing. Add an hrtimer_on_stack cleanup class that pairs on-stack setup with destroy_hrtimer_on_stack(). Document the existing setup API's lifetime requirement. The cleanup class provides debug-object teardown, not timer cancellation. Callers must ensure that no hrtimer operation can still access the timer before the scope ends; in particular, the timer must no longer be queued and any running callback must have completed. Signed-off-by: Hui Su Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/5f48c32490d19f51035e4209174f9cfe44472c71.1792083743.git.sh_def@163.com Stable-dep-of: bd091346971c ("sched/idle: Use hrtimer cleanup class in play_idle_precise()") Signed-off-by: Sasha Levin commit b2e9318c106b65d6ca97bae44372037936455a10 Author: Avi Weiss Date: Tue Oct 20 15:55:18 2026 +0300 kthread: Fall back when no preferred housekeeping CPU is online [ Upstream commit 78ff77ded78f2d3d6040705a3ab5a83cc45275e3 ] kthread_fetch_affinity() falls back to the housekeeping mask only when the intersection with the preferred mask is empty. If the intersection contains only offline CPUs, set_cpus_allowed_ptr() returns -EINVAL and the kthread keeps its previous affinity, which may still include an isolated CPU. Check whether the intersection contains an online CPU instead. Fall back to the full housekeeping mask when none are online. Fixes: e894f6339808 ("kthread: Honour kthreads preferred affinity after cpuset changes") Signed-off-by: Avi Weiss Reviewed-by: Bradley Morgan Signed-off-by: Frederic Weisbecker Signed-off-by: Sasha Levin commit c88dbfbd092315cabf71deccd8685541186f8533 Author: Cen Zhang Date: Sat Oct 24 16:02:47 2026 +0800 ALSA: ump: Drain sequencer callbacks before freeing their client [ Upstream commit 9b30046de03acb3b3f2135d45af6be7ee0b565b6 ] seq_ump_client_free() cancels group_notify_work while the endpoint still publishes seq_ops and seq_client. A received Function Block update can enter the sequencer callback after cancellation and queue the work again. Even disabling the work cannot protect a callback that already loaded seq_client and then resumes after the client has been freed. A USB UMP endpoint can continue receiving while its sequencer binding is removed. The following order uses the same endpoint and client: Sequencer binding removal UMP input completion ------------------------- -------------------- cancel_work_sync() load seq_ops and seq_client delete sequencer client clear endpoint binding kfree(client) schedule group_notify_work read client->seq_client Cover all calls through seq_ops with SRCU in the UMP core. Withdraw the operations pointer and wait for those callbacks before canceling work and deleting the client. No producer can then queue work after the final cancellation, and both the client and callback code remain available until the last in-flight callback returns. Publish seq_ops with release/acquire ordering so the separately stored seq_client is initialized before any callback uses it. Use SRCU because sequencer notification delivery can sleep; no callback needs to change its existing execution context or allocation behavior. Fixes: 4a16a3af0571 ("ALSA: seq: ump: Handle FB info update") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-00625126b81966d1bf1d-v2-915f6bbabe1fd458c3ab@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 7162658a12e0cb2723ad886035be6b32b0afdd7c Author: Xu Yunxiang Date: Sat Oct 24 18:06:46 2026 +0800 bpf: Track borrowed iterator results by default [ Upstream commit d09c2aa3109f5cb1d0be7d382231ab5d58583cad ] An open-coded iterator can return a struct pointer borrowed from its current element. The verifier has not tied such results to iterator state since the task_vma iterator was introduced, so a saved result can still be used after destroy. Commit bee9ef4a40a27 ("bpf: switch task_vma iterator from mmap_lock to per-VMA locks") also made next release the protection of the prior element. A later snapshot conversion made vm_file explicitly borrowed from that element. Associate non-RCU, non-acquired struct results with the iterator reference by default. Invalidate dependents before next forks its NULL and non-NULL paths, while retaining the iterator itself. Let destroy propagate child-reference errors. Add KF_ITER_RET_INDEPENDENT for results that outlive the current element, preserving existing RCU and acquired-reference rules. Trusted pointer field loads also need to preserve the source lifetime. Loading a trusted field does not acquire a reference to the pointed-to object. Set the field pointer's parent_id to the source's reference ID if the source is referenced, or inherit its parent_id if it is borrowed. This is a generic rule, including accesses unrelated to iterators. For example, the following access is now rejected: file = bpf_get_task_exe_file(task); if (!file) return 0; inode = file->f_inode; bpf_put_file(file); ino = inode->i_ino; The inode pointer borrows the file's lifetime. Releasing the acquired file reference removes that lifetime guarantee, so the verifier must invalidate the derived inode pointer as well. This does not imply that bpf_put_file() immediately frees the file or inode. Reading the inode while the file reference is held remains valid. Fields with independent RCU protection retain their existing lifetime rules. For an iterator result, the same propagation keeps trusted fields such as vm_file and f_inode tied to the current element. Propagate the backing object's lifetime through dynptr construction too, so its descendants remain in the invalidation graph. Share the invalidation traversal between next and release, so advancing the iterator preserves its own reference. Fixes: 4ac454682158 ("bpf: Introduce task_vma open-coded iterator kfuncs") Suggested-by: Amery Hung Signed-off-by: Xu Yunxiang Signed-off-by: Alexei Starovoitov Reviewed-by: Amery Hung Link: https://patch.msgid.link/20261024100647.2579244-2-xyx2021@mail.ustc.edu.cn Signed-off-by: Sasha Levin commit 2ef14d46311a598b1473717708fef505401ec8ff Author: Dimitris Charisis Date: Mon Oct 5 12:47:27 2026 +0000 maple_tree: fix maple_range_64 crashes in RCU mode [ Upstream commit baed735a956f2a7badb5436bef6810303034f920 ] Patch series "maple_tree: fix maple_range_64 crashes in RCU mode", v3. The patch series fixes two RCU destroy path issues on maple_range_64 nodes. Both arising from the fact that a maple_range_64 node repurposes the last slot to hold metadata when the node is not full. Patch 1 addresses the issues, and patch 2 adds a test used to catch them. Currently there is no in-tree user of maple_range_64 nodes in RCU mode. All in-tree users of MT_FLAGS_USE_RCU also set MT_FLAGS_ALLOC_RANGE which makes the internal nodes maple_arange_64. Below is the minimal reproducer used during debugging: static DEFINE_MTREE(tree); static int __init maple_fix_init(void) { unsigned long i, j; for (i = 10; i < 4000; i++) { mt_init_flags(&tree, MT_FLAGS_USE_RCU); for (j = 0; j < i; j++) { mtree_insert_range(&tree, j * 10, j * 10 + 9, xa_mk_value(j), GFP_KERNEL); } mtree_destroy(&tree); rcu_barrier(); } return 0; } The splat for the first issue addressed by the first patch is shown below. mt_clear_meta() runs after the slots have been rewritten with raw pointers by mte_dead_leaves(), so it cannot recognize a valid last pointer because the type information is stripped. On my 64-bit LE machine, it clears bytes 248 and 249 of the maple_range_64 which are the two least significant bytes of the last pointer. The lowest byte is already zero, since nodes are 256-byte aligned, but zeroing byte 249 corrupts the pointer. KASAN catches it as a double-free, because that corrupted pointer happens to land on a node that was freed previously. The splat appears at 226 insertions in the reproducer. This is when the tree has a full root node on a 64-bit build. ================================================================== BUG: KASAN: double-free in mt_free_walk+0x138/0x3a0 Free of addr ffff0000f3d40000 by task swapper/2/0 [...] Call trace: [...] kmem_cache_free_bulk+0x5b8/0xc18 mt_free_walk+0x138/0x3a0 rcu_core+0x5d0/0x1638 rcu_core_si+0x18/0x30 [...] Allocated by task 1218: [...] kmem_cache_alloc_from_sheaf_noprof+0xa8/0x2f0 dst_setup+0x210/0x630 mas_wr_split+0x568/0x26e0 mas_wr_store_entry+0x98c/0x1de0 mas_insert.isra.0+0x3d0/0x5d8 mtree_insert_range+0xec/0x1c8 maple_fix_init+0x94/0xff8 [maple_fix_obj] [...] Freed by task 0: [...] __kasan_slab_free+0x88/0xb8 __rcu_free_sheaf_prepare+0x94/0x360 rcu_free_sheaf+0x30/0x138 rcu_core+0x5d0/0x1638 rcu_core_si+0x18/0x30 [...] The buggy address belongs to the object at ffff0000f3d40000 which belongs to the cache maple_node of size 256 The buggy address is located 0 bytes inside of 256-byte region [ffff0000f3d40000, ffff0000f3d40100) [...] Memory state around the buggy address: ffff0000f3d3ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000f3d3ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000f3d40000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000f3d40080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000f3d40100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== The second issue fixed in the first patch is in the mt_free_walk(). mt_free_walk() descends by checking if the corresponding slot[offset] entry is non-zero. In a maple_range_64 node that has MAPLE_RANGE64_SLOTS-1 valid pointers to child nodes, all slots will be non-zero, since the last slot holds the metadata. Thus, mte_dead_walk() dereferences the metadata as if it were a node and hits the null-ptr-deref as shown in the splat below. After fixing the first issue, the reproducer reaches this case at 3166 insertions. The affected node is the root on a tree with height 3 and it has 15 valid child nodes on a 64-bit machine. The first fix does not introduce this bug, but it exposes it for the root node because it no longer clears the root metadata. On an unmodified kernel, the same bug exists and is reachable when such a maple_range_64 node appears below the root, where mt_clear_meta() is not called. Second KASAN splat: Unable to handle kernel paging request at virtual address dfff800000000006 KASAN: null-ptr-deref in range [0x0000000000000030-0x0000000000000037] [...] Call trace: mte_dead_walk+0x78/0x140 (P) mt_free_walk+0x1f8/0x3a0 rcu_core+0x5d0/0x1638 rcu_core_si+0x18/0x30 [..] Both splats are from an arm64 QEMU guest. The test_maple_tree and the userspace suite pass after each patch in the series. This patch (of 2): This commit fixes two issues in maple_range_64 nodes under RCU mode. A maple_range_64 node repurposes its last slot to hold metadata whenever the node is not full. Both issues arise from mishandling that last slot. More specifically the two fixes are: 1. Remove mt_clear_meta() function. mt_clear_meta() decides whether the last slot of a maple_range_64 node holds a child pointer or a struct maple_metadata with the check if (unlikely((mte_to_node(next) && mte_node_type(next)))) return; /* no metadata, could be node */ The check expects the pointer to be encoded. But the only callsite of mt_clear_meta() is mt_destroy_walk() on the RCU destroy path, and by the time it runs, mte_dead_leaves() has overwritten every slot on a full node with a raw pointer, stripping the type information. Thus, the check above never returns early for a full node as it should. It falls through and then: meta->gap = 0; meta->end = 0; zeroes two bytes of a valid child pointer. Later, mt_free_walk() dereferences the corrupted pointer. Fix this by removing mt_clear_meta() along with its only callsite. mt_clear_meta() is only called for the root of each sub-tree destroyed under RCU. Descendant nodes retain their metadata until they are freed. RCU readers may use the metadata while traversing a node, but do not use cleared metadata to detect that a node has been removed. They detect a dead node via ma_dead_node(). 2. Fix invalid memory access in mt_free_walk(). mt_free_walk() descends to the left-most unvisited "parent-of-a-leaf" node by checking the condition: if ((offset < mt_slots[type]) && rcu_dereference_protected(slots[offset], lock_is_held(&rcu_callback_map))) slots = mte_dead_walk(&enode, offset); On a maple_range_64 node with MAPLE_RANGE64_SLOTS-1 children *all* slots are non-NULL. The first MAPLE_RANGE64_SLOTS-1 hold valid pointers to child nodes, and the last slot contains metadata. The above check therefore passes for all offsets, and mte_dead_walk() dereferences the metadata as if it were a node. To trigger this, a node at least two levels above the leaves has to have exactly MAPLE_RANGE64_SLOTS-1 valid pointers to other nodes. maple_arange_64 nodes cannot hit this since they store the metadata in a separate field. Fix this by bounding the descent with slot_len which holds the number of children of a dead node. Link: https://lore.kernel.org/20261005-fix-maple-tree-range64-rcu-v3-0-ebe7fb278e20@cslab.ece.ntua.gr Link: https://lore.kernel.org/20261005-fix-maple-tree-range64-rcu-v3-1-ebe7fb278e20@cslab.ece.ntua.gr Fixes: 54a611b60590 ("Maple Tree: add new data structure") Fixes: 2e5b4921f8ef ("maple_tree: fix freeing of nodes in rcu mode") Signed-off-by: Dimitris Charisis Signed-off-by: Andrew Morton Reviewed-by: Liam R. Howlett (Google) Reviewed-by: Florian Schmaus Cc: Alice Ryhl Cc: Andrew Ballance Cc: Suren Baghdasaryan Cc: Matthew Wilcox (Oracle) Signed-off-by: Sasha Levin commit caf9cea4878ebbce96b1647ed8d5d8447bc9040b Author: Liam R. Howlett (Google) Date: Mon Oct 19 23:31:28 2026 -0400 tools/testing/shared: catch a failed posix_memalign() [ Upstream commit c9ed13789061af00d9239f9fab8e246adbed2076 ] posix_memalign() returns zero or a positive error number and never sets errno, so the checks for a negative return in kmem_cache_alloc_lru() and kmem_cache_alloc_bulk() is not possible. A failed aligned allocation carries on with the pointer unset, into the constructor or the memset(). Test for any non-zero return. Link: https://lore.kernel.org/20261020033128.1934349-1-liam@infradead.org Fixes: 8801c35c3672 ("tools: fix -Wunused-result in linux.c") Signed-off-by: Liam R. Howlett (Google) Signed-off-by: Andrew Morton Reviewed-by: Andrew Morton Reviewed-by: Lorenzo Stoakes (ARM) Reviewed-by: Vishal Moola (Fractile) Reviewed-by: SJ Park Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Sasha Levin commit 72f18760ef63f80c673b8676945ff36103ad23c2 Author: Ren Tamura Date: Wed Sep 30 15:03:17 2026 +0900 tools/cgroup: sum shrinker object counts across NUMA nodes [ Upstream commit ae2514c95518b39b36fa463d855c74f29c91d064 ] Each row of a memcg-aware shrinker's debugfs count file contains the cgroup ID followed by one object count per NUMA node. memcg_shrinker.py uses only the first count when sorting and displaying entries. This undercounts objects on NUMA systems. An entry with counts of 0 and 23 is treated as zero and omitted from the output, even though its total is 23. Sum all count fields after the cgroup ID so that the displayed totals and sort order account for every node. Single-node input retains the same result. Link: https://lore.kernel.org/179074810112.139422.9274126921568167859@gmail.com Fixes: d261ea23533b ("tools: add memcg_shrinker.py") Signed-off-by: Ren Tamura Signed-off-by: Andrew Morton Assisted-by: LLM Cc: Roman Gushchin Signed-off-by: Sasha Levin commit c6953c7a552f9a7631aed4824d73fa3ea14d09c2 Author: Lorenzo Stoakes (ARM) Date: Fri Oct 23 11:21:31 2026 +0100 ALSA: us122l: mark hwdep mappings VM_MIXEDMAP [ Upstream commit bbde9d5bdd2d7cf94707b2a8bb466f2e074f9db2 ] mm has recently moved to a strict model which requires any driver which clears VMA_MAYWRITE_BIT to be mapping non-mm-managed memory (VMA_PFNMAP_BIT or VMA_MIXEDMAP_BIT), failing any such mmap() with an error and a kernel warning - see "mm/vma: only allow mmap to clear VMA_MAYWRITE_BIT if not mm-managed". However, simultaneous to this, commit 71c610aeb177 ("ALSA: us122l: Prevent write upgrades for read mappings") updated us122l to clear VMA_MAYWRITE_BIT without marking the region with either VMA_PFNMAP_BIT or VMA_MIXEDMAP_BIT. vm_insert_pages() and friends set this automatically, however this driver maps its pre-allocated pages from a fault handler, so never calls these. Simply set the flag in usb_stream_hwdep_mmap() to resolve the issue. This correctly marks the mapping as one whose pages core mm does not manage, which has no meaningful impact for this driver beyond preventing the mmap() from failing. Link: https://lore.kernel.org/20261023-fix-us122l-mixedmap-v1-1-e7bdd053850f@kernel.org Fixes: 71c610aeb177 ("ALSA: us122l: Prevent write upgrades for read mappings") Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Andrew Morton Reported-by: David Carlier Closes: https://lore.kernel.org/20261018025905.201296-1-devnexen@gmail.com Acked-by: Takashi Iwai Cc: Kazuki Hanai Cc: Jaroslav Kysela Signed-off-by: Sasha Levin commit 576fd7bb41baac757502cef5c95fe99f5164ca59 Author: Pooyan Azad Date: Tue Sep 29 09:18:46 2026 +0200 zram: fix short reads from block_state [ Upstream commit 372012202260db088b489ed00059c4571a602552 ] read_block_state() formats each entry directly into the buffer supplied by read(). If the remaining buffer is too small for one complete record, snprintf() returns the full record length and the function stops without copying data or advancing the file position. A read from this debugfs file which is smaller than a record therefore returns zero at a non-EOF position and cannot make progress. Convert block_state to seq_file so formatted records are buffered independently of the userspace read size. Keep dev_lock held across each seq_file iteration and continue to protect individual entries with their slot locks. Link: https://lore.kernel.org/20260929071846.24829-1-pooyan.azadparvar@gmail.com Fixes: c0265342bff4 ("zram: introduce zram memory tracking") Signed-off-by: Pooyan Azad Signed-off-by: Andrew Morton Closes: https://lore.kernel.org/r/CANC3H+LdtoydSp+o2ecErAw7k6R2+gRf9LyxcaoHv_mGhJmyQQ@mail.gmail.com/ Reviewed-by: Sergey Senozhatsky Tested-by: Sergey Senozhatsky Cc: Minchan Kim Cc: Jens Axboe Signed-off-by: Sasha Levin commit 221567d5c0de768ba3af09062ea4d76617bde83b Author: Ting-Han Hou Date: Sun Oct 11 10:30:44 2026 +0800 scripts/gdb: fix stack depot out-of-bounds diagnostic [ Upstream commit b6232ca8d194c60ee603586e42b5ea584d4b7be9 ] The pool_index field was renamed to pool_index_plus_1, but the out-of-bounds diagnostic in stack_depot_fetch() still accesses the old field. Looking up a handle whose pool index is outside stack_pools therefore raises "There is no member named pool_index" instead of printing the diagnostic and returning an empty result. Use the already decoded pool_index variable in the diagnostic. Link: https://lore.kernel.org/20261011023044.1722-3-ue081723@gmail.com Fixes: 9d938f40b228 ("scripts/gdb: rename pool_index to pool_index_plus_1") Signed-off-by: Ting-Han Hou Signed-off-by: Andrew Morton Assisted-by: LLM Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kuan-Ying Lee Signed-off-by: Sasha Levin commit e734a6c168e0da9a023b0f104d370cbae15b1b81 Author: Ting-Han Hou Date: Sun Oct 11 10:30:43 2026 +0800 scripts/gdb: fix radix tree lookup pointer handling [ Upstream commit 66d190b072b4e261aff35debb53872ace9b80628 ] Patch series "scripts/gdb: fix radix tree lookup and stack depot diagnostic", v2. Two scripts/gdb fixes. Patch 1 fixes $lx_radix_tree_lookup(), which dereferenced slot contents as if they were node pointers. v2 also handles the XArray sibling, retry and zero entries that Sashiko pointed out: they carry the internal tag but are not node pointers, and the v1 patch raised a GDB MemoryError on them. Large folios in the page cache make sibling entries common, so this was worth fixing rather than documenting. Patch 2 is unchanged from v1 apart from being resent with git send-email, since the earlier copy was word-wrapped by the mail client. Sorry about that. Both patches are tested against standalone GCC-built fixtures that use the kernel struct layouts (details below the --- line of each patch), not against a running kernel. This patch (of 2): lookup() casts each slot to a pointer to a node pointer and then dereferences it. Since the slot already contains an entry pointer, this reads the entry's contents as another pointer instead of returning the entry itself. Internal entries also keep their tag bits when descending, so multi-level trees are read from the wrong address and $lx_radix_tree_lookup() fails with a memory error. Sibling, retry and zero entries carry the same internal tag but are small integers rather than node pointers, so the tag alone must not decide whether to descend. A page cache populated with large folios has a sibling entry in every slot but the first of each folio. Walk the tree the way xas_load() does: descend only through entries that xa_is_node() would accept, follow sibling entries to the canonical slot of a multi-index entry, and treat retry and zero entries like empty slots since they hold no data. Remove the explicit shift counter, as traversal now follows the entry type. Link: https://lore.kernel.org/20261011023044.1722-1-ue081723@gmail.com Link: https://lore.kernel.org/20261011023044.1722-2-ue081723@gmail.com Fixes: b7235d6bb516 ("scripts/gdb: add a Radix Tree Parser") Signed-off-by: Ting-Han Hou Signed-off-by: Andrew Morton Assisted-by: LLM Cc: Jan Kiszka Cc: Kieran Bingham Cc: Kuan-Ying Lee Signed-off-by: Sasha Levin commit 32e4917d1f8ad788fd797e145a3519d67f10d693 Author: Avi Weiss Date: Tue Oct 20 13:12:24 2026 +0300 profiling: fix sampling step on 64-bit big-endian systems [ Upstream commit b1d68946a08313895f352af5336623d29739c299 ] read_profile() stores the sampling step in an unsigned long but copies only four bytes to userspace. On 64-bit big-endian systems (not common obviously), this copies the upper 32 bits and discards the rest, causing /proc/profile to report zero for normal shift values. Cast to unsigned int so we get the correct 4 bytes, while keeping the shift calculation in unsigned long. A small C reproducer under qemu-s390x reproduced this and proved the fix works for prof_shift=2. Link: https://lore.kernel.org/20261020101225.917959-1-thnkslprpt@gmail.com Fixes: 2d186afd04d6 ("profiling: fix shift-out-of-bounds bugs") Signed-off-by: Avi Weiss Signed-off-by: Andrew Morton Reviewed-by: Bradley Morgan Signed-off-by: Sasha Levin commit 0c6d4ce458f4f9d0eff0fd77ee1bf5c0a177e34e Author: Edward Adam Davis Date: Tue Oct 20 09:05:59 2026 +0800 kernel/reboot: avoid potential deadlocks during suspension [ Upstream commit 66644b992f25f6a33775788c8b69a8bb3d41ad67 ] Invoking reboot with LINUX_REBOOT_CMD_SW_SUSPEND causes kernel/reboot.c to acquire system_transition_mutex and invoke hibernate(). hibernate() calls lock_system_sleep(), which sets PF_NOFREEZE on current and attempts to acquire system_transition_mutex again, potentially hitting: WARNING: possible recursive locking detected -------------------------------------------- syz.3.5755/5950 is trying to acquire lock: ffffffff8fc04760 (system_transition_mutex){+.+.}-{4:4}, at: lock_system_sleep+0x49/0x70 kernel/power/main.c:71 but task is already holding lock: ffffffff8fc04760 (system_transition_mutex){+.+.}-{4:4}, at: __do_sys_reboot kernel/reboot.c:774 [inline] ffffffff8fc04760 (system_transition_mutex){+.+.}-{4:4}, at: __se_sys_reboot+0x223/0x460 kernel/reboot.c:738 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(system_transition_mutex); lock(system_transition_mutex); *** DEADLOCK *** May be due to missing lock nesting notation locks held by syz.3.5755/5950: 1, last CPU#0: #0: ffffffff8fc04760 (system_transition_mutex){+.+.}-{4:4}, at: __do_sys_reboot kernel/reboot.c:774 [inline] #0: ffffffff8fc04760 (system_transition_mutex){+.+.}-{4:4}, at: __se_sys_reboot+0x223/0x460 kernel/reboot.c:738 Call Trace: lock_system_sleep+0x49/0x70 kernel/power/main.c:71 hibernate+0x162/0x680 kernel/power/hibernate.c:784 __do_sys_reboot kernel/reboot.c:816 [inline] Move the suspension operation outside the scope protected by lock system_transition_mutex. Link: https://lore.kernel.org/20261020010559.23031-1-eadavis@sina.com Fixes: 55f2503c3b69 ("PM / reboot: Eliminate race between reboot and suspend") Signed-off-by: Edward Adam Davis Signed-off-by: Andrew Morton Reported-by: Closes: https://syzkaller.appspot.com/bug?extid=1f0fbc2561b3e5d51b91 Tested-by: Reviewed-by: Bradley Morgan Cc: Pingfan Liu Cc: "Rafael J. Wysocki" Signed-off-by: Sasha Levin commit 8d418195f5f9d6f47637d839225d20f780af91e9 Author: Aditya Sharma Date: Thu Oct 1 12:54:48 2026 +0530 bpf: Remove nmi_uaccess_okay() check in bpf_send_signal_common() [ Upstream commit 93bd472336ac2424f5f3cf05cbb24e02242343b7 ] nmi_uaccess_okay() takes no task argument and is a statement about current. When commit 6280cf718db0 ("bpf: Implement bpf_send_signal_task() kfunc") made the PF_KTHREAD/PF_EXITING and is_global_init() test the supplied task, nmi_uaccess_okay() was left testing current. As a result bpf_send_signal_task() returns -EPERM whenever the calling context happens to be a kernel thread, regardless of which task the signal is aimed at. The same call with the same target succeeds or fails depending only on what the CPU was running: bpf_send_signal_task() from tp_btf/workqueue_execute_start : -EPERM bpf_send_signal_task() from tp_btf/sys_enter : 0 The check was carried over from bpf_probe_write_user() when bpf_send_signal() was added in commit 8b401f9ed244 ("bpf: implement bpf_send_signal() helper"). There it guards a user memory write, but bpf_send_signal_common() does no user memory access, so the check has nothing to guard here. It is also already a no-op outside x86. Remove it, and drop the part of the comment above it that described the memory access checks, as none remain. Fixes: 6280cf718db0 ("bpf: Implement bpf_send_signal_task() kfunc") Suggested-by: Andrii Nakryiko Signed-off-by: Aditya Sharma Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/20260819124324.43162-1-adi.sharma@zohomail.in/T/#u Link: https://patch.msgid.link/20261001072449.1377267-2-adi.sharma@zohomail.in Signed-off-by: Sasha Levin commit 47d60e842766aad3a6385ae900abdda80985f2a1 Author: Ayushman Rout Date: Thu Oct 22 16:53:11 2026 +0530 bpf: Use memmove() to load bytes from an skb and an xdp_buff [ Upstream commit b93cf2c8a0552b544e90e25802e4bf989987d29d ] bpf_dynptr_read() on an skb or xdp dynptr ends in bpf_skb_load_bytes() or bpf_xdp_load_bytes(). The destination can be a slice of the same packet, so it can overlap the source, which memcpy() does not allow. On x86 with FSRM memcpy() copies forward, so a destination above the source gets the first bytes repeated: p = bpf_dynptr_slice_rdwr(&ptr, 8, NULL, 64); bpf_dynptr_read(p, 64, &ptr, 0, 0); leaves bytes 8-71 of the packet as bytes 0-7 repeated, not bytes 0-63. Reproduced with BPF_PROG_TEST_RUN on both an xdp and a tc program. Use memmove(), as the store side does since commit 1db084f42884 ("bpf: Use memmove() to store bytes in an skb") and commit ab08863c58b1 ("bpf: Use memmove() to store bytes in an xdp_buff"). A read that spans xdp frags still goes through bpf_xdp_copy_buf() and is not changed here. bpf_skb_load_bytes_relative() has the same pattern and is reachable from tc and sk_filter programs, so use memmove() there as well. Reproduced with BPF_PROG_TEST_RUN on a tc program: loading into a slice at offset 8 gave wrong bytes before the change and correct bytes after. Fixes: 2012c867c800 ("bpf: verifier: Accept dynptr mem as mem in helpers") Signed-off-by: Ayushman Rout Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261022112312.31563-1-ayushmanrout27@gmail.com Signed-off-by: Sasha Levin commit a704a0e7b2749f665b5bc16ef4e49e27f750adda Author: Feng Yang Date: Thu Oct 22 14:47:27 2026 +0800 bpf: Propagate btf_add_type() errors in btf_check_all_metas() [ Upstream commit fb2b27d214c3b88d926a303267dd83cfdb428b13 ] btf_check_all_metas() ignores the return value of btf_add_type(), so a type that could not be registered is silently dropped while the loop keeps walking over the type section. Both failure modes are reachable: - -E2BIG. Once the types array reaches its capacity (BTF_MAX_TYPE), every following btf_add_type() fails the same way, so btf_check_all_metas() still returns 0 and the BTF object is created with btf->nr_types capped while hdr->type_len claims more records. - -ENOMEM. btf->nr_types is not incremented and the array is not grown, so the next type is recorded at the slot of the dropped one and btf->types[] stays off by one with respect to the type ids for all remaining types. btf_type_by_id() then returns the wrong type for those ids for the whole lifetime of the object, and the last type is silently left unresolved. Propagate the error so that the object is rejected instead. Fixes: 69b693f0aefa ("bpf: btf: Introduce BPF Type Format (BTF)") Signed-off-by: Feng Yang Signed-off-by: Alexei Starovoitov Reviewed-by: Mahe Tardy Acked-by: Alan Maguire Link: https://patch.msgid.link/20261022064727.747304-1-yangfeng59949@163.com Signed-off-by: Sasha Levin commit 8814314e439963ab85ca3883bfe8246e49650f33 Author: Qiliang Yuan Date: Thu Oct 22 16:48:39 2026 +0800 selftests/bpf: Wait for the struct_ops map to be freed in assoc_in_timer [ Upstream commit ac3df711a428a9ff4277100ee26c6765e8f80a3b ] st_ops_assoc_in_timer_no_uref runs .test_1, which starts a timer to call it again 500ms later, drops every reference to the struct_ops map, and expects the timer callback to find no struct_ops associated with its program anymore. The association goes away only when the last reference to the map is dropped. syscall_prog holds one through its own association and drops it only when it is freed, in a work item after an RCU tasks trace grace period. With other tests running in parallel, that can take longer than 500ms, and the callback still reaches the struct_ops and gets MAP_MAGIC instead of -1. Have the timer callback restart the timer until the map is gone, as it does for st_ops_assoc_in_timer_free. Calling the struct_ops through the association until then is safe, as the map is freed only after a grace period that follows clearing the association. st_ops_assoc_in_timer_no_uref run 100 times with test_progs -j32 running in the background, on a KASAN kernel with the fix, x86_64 VM with 32 vCPUs, before and after this patch: before after outcome 2 of 100 failed (MAP_MAGIC) 0 of 100 failed (MAP_MAGIC) Fixes: 0e841d19263a ("selftests/bpf: Test getting associated struct_ops in timer callback") Signed-off-by: Qiliang Yuan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261022-selftests-bpf-struct-ops-assoc-timer-v6-4-2c0f18e82582@gmail.com Signed-off-by: Sasha Levin commit 8a62ae988a1c7490b32bed9c8db6220222a868a8 Author: Qiliang Yuan Date: Thu Oct 22 16:48:38 2026 +0800 selftests/bpf: Test freeing a struct_ops map under a running prog [ Upstream commit a451867eb5f645a199d0f70cb2b1f541e07f33ec ] st_ops_assoc_in_timer_no_uref drops every reference to the struct_ops map while a timer callback of its prog calls .test_1 through the association, and checks that the callback ends up with no struct_ops. The timer first fires 500ms later and .test_1 returns right away, so the callback hardly ever runs .test_1 while the map is freed, and the test can't catch a map that is freed under a running .test_1. Add st_ops_assoc_in_timer_free, which starts the timer right away, restarts it with no delay until the association is gone, and makes .test_1 spin in bpf_loop() when the timer callback calls it. Share the steps of st_ops_assoc_in_timer_no_uref with it through a helper, which stops when associating or running syscall_prog fails instead of waiting for a timer that never starts. st_ops_assoc_in_timer_free run in a loop on kernels of the same bpf-next commit with KASAN enabled, x86_64 VM with 32 vCPUs, without and with the previous fix: without the fix with the fix outcome Oops (int3) on run 1 100 of 100 passed, median 0.28 s Signed-off-by: Qiliang Yuan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261022-selftests-bpf-struct-ops-assoc-timer-v6-3-2c0f18e82582@gmail.com Stable-dep-of: ac3df711a428 ("selftests/bpf: Wait for the struct_ops map to be freed in assoc_in_timer") Signed-off-by: Sasha Levin commit 7e7bd62d6dc76f4de8cce81ba9143881074488d5 Author: Alexander Koskovich Date: Mon Oct 5 17:02:06 2026 +0000 scsi: ufs: qcom: Power down UFS during system suspend on Milos [ Upstream commit fb2a238f15f0fc2dacd12f8847b0ec0a1cf7ccac ] On Milos the UFS PHY GDSC is turned off on every system suspend and the PHY loses its register state, so exiting hibern8 on resume fails: ufshcd-qcom 1d84000.ufshc: pwr ctrl cmd 0x18 with (MIBattribute 0x0, mode 0x0) failed, host upmcrs:0x5 ufshcd-qcom 1d84000.ufshc: ufshcd_uic_hibern8_exit: hibern8 exit failed. ret = 5 ufshcd-qcom 1d84000.ufshc: __ufshcd_wl_resume: hibern8 exit failed 5 Set no_phy_retention so the controller and device are powered down during system suspend and the link is brought up again on resume. Fixes: 04bb37433330 ("arm64: dts: qcom: milos: Add UFS nodes") Signed-off-by: Alexander Koskovich Tested-by: Jorijn van der Graaf Link: https://patch.msgid.link/20261005-milos-ufs-suspend-v1-1-a6f8b89d5b63@pm.me Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 3f855b9b9056b0df82cc5a316fb0adf4e7a55d1f Author: Haotian Zhang Date: Fri Oct 9 02:54:03 2026 +0800 scsi: elx: libefc: Fix resource leak in efcport_init() error path [ Upstream commit b4bd078b78c248d4263a1da7033cbe7a74ce0e12 ] efcport_init() creates efc->node_pool and efc->node_dma_pool before allocating efc->els_io_pool. When the latter allocation fails it returns -ENOMEM without releasing the node dma pool or the node pool, leaking both. The caller efct_efclib_config() only logs the error and efct_device_attach() failure path never calls efcport_destroy(), so the resources are never freed. Destroy node_dma_pool and node_pool before returning from the els_io_pool allocation failure path. Fixes: d7b71fd2195e ("scsi: elx: libefc: Emulex FC discovery library APIs and definitions") Assisted-by: DeepSeek-V4.1-Flash Signed-off-by: Haotian Zhang Reviewed-by: Daniel Wagner Link: https://patch.msgid.link/20261008185403.2791781-1-vulab@iscas.ac.cn Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 18f6c145a2fdaf002524935333f5787456dadf7a Author: Dudu Lu Date: Wed Oct 21 23:54:01 2026 +0800 net/sched: etf: initialise the sock_exterr_skb before filling it [ Upstream commit 7076f684d5132e6a6145e1da2fa74771ecd052e5 ] report_sock_error() clones the transmitted skb, overlays a struct sock_exterr_skb on its control block and fills in the seven struct sock_extended_err fields, but never clears addr_offset and port. skb_clone() copies cb[] verbatim, so the errqueue entry carries the TX skb's stale control block to the receive side, and the ipv4 error-queue reader trusts those bytes: net/ipv4/ip_sockglue.c:556 sin->sin_addr.s_addr = *(__be32 *)(skb_network_header(skb) + serr->addr_offset); sin->sin_port = serr->port; The gate that is supposed to guard that read only asks whether an address was requested at all: net/ipv4/ip_sockglue.c:484 return serr->ee.ee_origin == SO_EE_ORIGIN_ICMP || serr->ee.ee_origin == SO_EE_ORIGIN_LOCAL || serr->port; SO_EE_ORIGIN_TXTIME is neither ICMP nor LOCAL, so for sch_etf the gate is decided by serr->port alone -- by the stale byte pair. When it is non-zero the reader dereferences skb_network_header() + addr_offset with an arbitrary offset. On the TCP path cb[40..44) is not zero: the transmit path stored delivered_mstamp there (tcp_rate_skb_sent()), which is exactly where addr_offset/port sit in the arm64 struct layout. Reached with an unmodified 7.3-rc4 (arm64, KASAN, in-tree modules): a TCP socket enables TX-timestamp error reporting (SO_TXTIME with SOF_TXTIME_REPORT_ERRORS), a sch_etf qdisc drops the packet, and a recvmsg() reaches ip_recv_error(): BUG: KASAN: slab-out-of-bounds in ip_recv_error+0x970/0xa0c Read of size 4 at addr ffff0000158ffdd5 by task A-227-A227-1_S2/113 ip_recv_error+0x970/0xa0c inet_recv_error+0x94/0xdc tcp_recvmsg+0x378/0x408 ... The buggy address is located 149 bytes to the right of allocated 704-byte region Zero the whole overlay rather than the two fields individually: the errqueue entry is handed to the receive side as a self-contained record, which is what every other producer in the tree already does (sch_etf was the only error-queue producer that cleared neither field). This does not change what the in-tree selftest observes -- so_txtime.c reads only ee_origin/ee_errno/ee_code/ee_data/ee_info, never msg_name or sin_port. Fixes: 4b15c7075352 ("net/sched: Make etf report drops on error_queue") Signed-off-by: Dudu Lu Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261021155401.65997-1-phx0fer@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 69bb302af0ee1b570a49689970367ccfee406b1c Author: Nandor Kracser Date: Wed Oct 21 09:32:33 2026 +0200 tls: avoid field-spanning write when copying crypto info [ Upstream commit c43c1c24f3cdc0d2d3f59e5686573ac3129637aa ] do_tls_setsockopt_conf() copies the cipher-specific part of the crypto info to crypto_info + 1, where crypto_info points at the 4-byte info member of union tls_crypto_context. When optval is a kernel sockptr, copy_from_sockptr_offset() is a memcpy(), and FORTIFY_SOURCE bounds the destination by that member: [ 6.948348] memcpy: detected field-spanning write (size 52) of single field "dst" at include/linux/sockptr.h:49 (size 0) [ 6.948480] WARNING: include/linux/sockptr.h:49 at tls_setsockopt+0x9b2/0xa30, CPU#1: init/1 [ 7.001355] Call Trace: [ 7.003146] do_sock_setsockopt+0xb0/0x190 [ 7.003975] __sys_setsockopt+0x76/0xc0 [ 7.005368] do_syscall_64+0xda/0x4b0 tls_setsockopt() gets a kernel sockptr whenever a cgroup setsockopt BPF program is attached, even one that leaves the option alone, because __cgroup_bpf_run_filter_setsockopt() passes optval on in a kernel buffer. With a no-op program on the root cgroup, a plain TLS_TX setsockopt() with AES-GCM-256 triggers the warning above on an x86_64 build with CONFIG_FORTIFY_SOURCE. Copy into the union at offset sizeof(struct tls_crypto_info) instead. crypto_ctx already points at the right union for both the first set and the TLS 1.3 rekey (tmp) case, and the address is unchanged. Fixes: a7b75c5a8c41 ("net: pass a sockptr_t into ->setsockopt") Signed-off-by: Nandor Kracser Link: https://patch.msgid.link/20261021073233.16720-1-nandor@riptides.io Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 4880d64cc6d6881293f270757655ea50d4b8ea64 Author: Greg Thelen Date: Wed Oct 21 08:26:58 2026 -0700 selftests/net: tcp_mmap: remove unused -k option and keepflag [ Upstream commit 5536d5553f274c8baa77c44854c9091657213970 ] Commit aacb0c2e524c ("selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE") removed the only read of keepflag in child_thread(), leaving the file-scope keepflag variable set by the -k option in main() but never read. This triggers a Clang 23 warning: tcp_mmap.c:91:12: error: variable 'keepflag' set but not used [-Werror,-Wunused-but-set-global] Remove the unused keepflag variable and the dead -k getopt option. Fixes: aacb0c2e524c ("selftests: net: tcp_mmap must use TCP_ZEROCOPY_RECEIVE") Signed-off-by: Greg Thelen Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20261021152658.2618709-1-gthelen@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ac74db01740499ac2153145118a40cd709bbc0c4 Author: Allison Henderson Date: Mon Oct 19 17:28:16 2026 -0700 net/rds: keep the connected peer's scope id apart from the bound one [ Upstream commit 3fe64a5f670dbd6c7c84c2345b0b9726b3b79b31 ] rds_connect() has nowhere to keep the scope of a link-local peer, so it stores it in rs_bound_scope_id, the scope of the socket's own bound address, for rds_bind() to check a later link-local bind against. That field is then also what a send without a destination uses as the request's scope, what getpeername() and recvmsg() report as the peer's scope, and what a later bind() overwrites: rds_add_bound() stores the bound address's scope unconditionally, which for a non-link-local address is 0. So after connect(fe80::x%ifA) followed by bind(global), a send() with no destination asks for fe80::x with scope 0. rds_conn_lookup() keys on the interface, so that finds or creates a connection with c_dev_if 0, which the TCP transport then tries to connect through sin6_scope_id 0 and tcp_v6_connect() rejects for a link-local peer: the connected socket's data is queued on a connection that can never come up. In the other order, bind(global) then connect(fe80::x%ifB), the connect leaves a global-bound socket with rs_bound_scope_id ifB, so sends to other link-local peers are refused as off-link and sends to global peers inherit a meaningless interface. Give the connected peer its own rs_conn_scope_id. rds_connect() records it there and leaves the bound scope alone, rds_bind()'s connected-socket check compares against it, and the destination-less send takes its scope from it - falling back to the bound scope for a non-link-local peer, so that send() and sendto() to the connected peer compute the same scope, and so the same connection. getpeername() reports the connected peer with its own scope. recvmsg() used to report every sender with the socket's bound scope; a connected socket receives from any peer, so neither the bound scope nor the connected peer's scope is right for an arbitrary sender. It now reports a link-local sender with the interface recorded on its connection, c_dev_if: the TCP accept path takes it from the incoming socket, and the IB passive side resolves it from the local address, the closest the CM gets to the arrival interface. Any other sender is reported with scope 0, the inet6 convention. Either way, a reply to the address an application was given reaches the same connection. Found by inspection while reworking the sendmsg connection cache; not observed in the field. Fixes: 1e2b44e78eea ("rds: Enable RDS IPv6 support") Signed-off-by: Allison Henderson Link: https://patch.msgid.link/20261020002816.3087414-3-achender@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 3f359c719339579c043b4d360557a27d071dd6b8 Author: Allison Henderson Date: Mon Oct 19 17:28:15 2026 -0700 net/rds: include the scope id in the sendmsg connection cache check [ Upstream commit b7dfff5e3eb3984d42026a6d653ec2a3d5cec729 ] rds_sendmsg() reuses the connection cached in rs->rs_conn when its peer address and ToS match the request. The interface index is part of a connection's identity as well: rds_conn_create_outgoing() passes the request's scope_id down as dev_if, and rds_conn_lookup() compares c_dev_if, so sends to the same link-local address through two interfaces are two different connections. The cache-hit test never looked at it. A socket bound to a non-link-local address has rs_bound_scope_id 0, and the scope check at the top of rds_sendmsg() accepts any non-zero destination scope for such a socket. So after a send to fe80::x%ifA, a send to fe80::x%ifB hits the cached ifA connection and the datagram leaves through ifA, to whichever peer answers to that address there. Compare c_dev_if with the request's scope_id in the cache test, so that such a send takes the lookup path and finds, or creates, the ifB connection - the same key the lookup uses. A send without a destination takes its scope from the socket, and the connection it created was keyed on that same scope, so the comparison holds for it too; the next patch gives that send the connected peer's own scope. Found by inspection while reworking this cache for the connection lifetime series on net-next; not observed in the field. Fixes: 1e2b44e78eea ("rds: Enable RDS IPv6 support") Signed-off-by: Allison Henderson Link: https://patch.msgid.link/20261020002816.3087414-2-achender@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit aeb02b5806d30a66d081271b41176c4f0d654540 Author: Gal Pressman Date: Wed Oct 21 09:42:31 2026 +0300 net/mlx5e: IPsec, Fix out-of-bounds comparison of neighbour keys [ Upstream commit 520631554a689d2cd52452578f3140f045730ee0 ] mlx5e_ipsec_netevent_event() keeps the L2 headers of offloaded tunnel mode SAs up to date: on every neighbour change it looks for SAs whose endpoint matches the neighbour's address. The compare width, 4 bytes for IPv4 or 16 for IPv6, is chosen from the SA's address family, with no check that the neighbour is of the same family. An ARP entry only stores a 4-byte key, so with an IPv6 tunnel mode SA offloaded, any IPv4 neighbour update in the system is compared as if it were a 16-byte IPv6 address, reading past the end of the object: BUG: KASAN: slab-out-of-bounds in mlx5e_ipsec_netevent_event+0x736/0x8d0 [mlx5_core] Read of size 4 at addr ff110001260a4ad8 by task swapper/8/0 Call Trace: mlx5e_ipsec_netevent_event+0x736/0x8d0 [mlx5_core] notifier_call_chain+0x97/0x2b0 atomic_notifier_call_chain+0x5d/0x130 neigh_timer_handler+0x35c/0x1140 call_timer_fn+0x164/0x490 __run_timers+0x5b9/0x960 run_timer_softirq+0xf0/0x1d0 handle_softirqs+0x189/0x8a0 __irq_exit_rcu+0x10d/0x250 ... Allocated by task 1015: __kmalloc_noprof+0x2e6/0x8b0 ___neigh_create+0xcc9/0x24c0 ip_finish_output2+0xfc7/0x1e80 ip_output+0x172/0x3b0 ip_send_skb+0xa5/0x1b0 udp_send_skb+0x852/0x10f0 udp_sendmsg+0x1333/0x2150 ... The opposite mix (IPv4 SA with IPv6 neighbour) stays in bounds, but only the first 32 bits of the IPv6 address are compared, so an unrelated neighbour can match. Skip neighbours whose address family doesn't match the SA. Fixes: 4c24272b4e2b ("net/mlx5e: Listen to ARP events to update IPsec L2 headers in tunnel mode") Signed-off-by: Gal Pressman Reviewed-by: Leon Romanovsky Reviewed-by: Yael Chemla Signed-off-by: Tariq Toukan Reviewed-by: Fernando Fernandez Mancera Link: https://patch.msgid.link/20261021064231.3466989-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 0bd7fcfdb961551b8c545d294d038b9602736516 Author: Cosmin Ratiu Date: Wed Oct 21 09:28:05 2026 +0300 net/mlx5e: SHAMPO: Do not merge PSP packets [ Upstream commit 46bd2bf65b93573f3b73ce8c61f862ac901c076d ] PSP packets are UDP-encapsulated, and enabling HW GRO (SHAMPO in mlx5) makes it possible to merge those packets in a silly way: IP|UDP|PSP1|payload1|PSP2|payload2|... That happens because the HW GRO machinery doesn't know about PSP and considers it part of the UDP payload. Reject merging when the incoming CQE has PSP marker or the pending skb has the PSP extension. Fixes: 29d7f433fcec ("net/mlx5e: Add Rx data path offload") Signed-off-by: Cosmin Ratiu Reviewed-by: Dragos Tatulea Signed-off-by: Tariq Toukan Reviewed-by: Daniel Zahka Link: https://patch.msgid.link/20261021062805.3466208-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ed887c24ea5aca455dfd61498e3a771a3ddd95e7 Author: Eric Dumazet Date: Wed Oct 21 18:18:58 2026 +0200 net: fix frag_list leak in skb_segment_list() error path [ Upstream commit 546daf344420b5dce27eded3ad15be12628dd185 ] skb_segment_list() detaches the frag_list from the head skb and moves its members one by one to the skb->next chain. On error, err_linearize frees that chain with kfree_skb_list(skb->next), relying on the members not yet processed to still be linked after the current one. This does not hold when the current member was shared: it is replaced by skb_clone(), and __skb_clone() clears ->next. If __skb_linearize() then fails on that clone, the remaining members are no longer reachable from skb->next nor from skb_shinfo(skb)->frag_list, and they leak. The skb_shared() error branch already relinks nskb->next to list_skb before jumping to err_linearize. Do it unconditionally right after nskb is added to the chain, so every error exit sees the remaining members. On the last member list_skb is NULL, which still terminates the chain. Fixes: 53475c5dd856 ("net: fix use-after-free when UDP GRO with shared fraglist") Signed-off-by: Eric Dumazet Cc: Simon Polack Reviewed-by: Willem de Bruijn Reviewed-by: Wang Zhan Reviewed-by: Jiayuan Chen Link: https://patch.msgid.link/20261021161858.761205-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d45aa648149ac97bf14eca1ebfa70d122334cac6 Author: Jiayuan Chen Date: Tue Oct 20 20:12:39 2026 +0800 tls: fix the open record check in the max payload size setsockopt [ Upstream commit ed642349d87dd7067a44c30319f0cffd22780376 ] do_tls_setsockopt_tx_payload_len() refuses to resize records while one is open, but the check is broken in two ways. It reaches for the open record through tls_sw_ctx_tx(), an unchecked cast of ctx->priv_ctx_tx. Under device offload that pointer is a tls_offload_context_tx, so the check reads a field of the wrong struct: it returns EBUSY on whatever happens to be there, and never sees the record that really is open. Dispatch on tx_conf. The socket lock alone is also not enough to tell no sender is in flight. The device tx path drops it in sk_stream_wait_memory() after tls_push_record() cleared open_record, so setsockopt can slip in mid-sendmsg and shrink the limit. tls_push_data() latches the limit once per call, and a record left open by MSG_MORE can then be bigger than the new limit, making the u32 subtraction in the copy clamp wrap around and build an oversized record. Take tx_lock like the sendmsg paths do so setsockopt waits for in-flight senders. Re-reading the limit inside the tls_push_data() loop could close the wrap too, but a parked sender would still finish with the old limit, so serializing on tx_lock is simpler. Take tx_lock interruptible, as tls_sw_sendmsg() does. Both sendmsg paths keep it across sk_stream_wait_memory(), which sleeps until the peer reads, so a plain mutex_lock() could park setsockopt in D state for as long as the sender waits. The lock_sock() after it is fine uninterruptible: a sender sleeping for memory has released the socket lock, so that wait only covers short critical sections, like every other setsockopt. Fixes: 82cb5be6ad64 ("net/tls: support setting the maximum payload size") Signed-off-by: Jiayuan Chen Link: https://patch.msgid.link/20261020121240.29082-1-jiayuan.chen@linux.dev Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit bedf11540c68416621c7b735e7213f6de24ebe8b Author: Hangbin Liu Date: Thu Oct 22 11:09:35 2026 +0800 selftests: gro: remove unused variable total_data [ Upstream commit 86537a8fb24750fc25a96a27ff29400054d052b5 ] I hit a build warning when building the net selftests. gro.c: In function 'check_capacity_pkts': gro.c:1249:13: warning: variable 'total_data' set but not used [-Wunused-but-set-variable=] 1249 | int total_data = 0; | ^~~~~~~~~~ Remove the total_data variable, as it is no longer used. Fixes: d97348474708 ("selftests: drv-net: gro: always wait for FIN in the capacity test") Signed-off-by: Hangbin Liu Reviewed-by: Antoine Tenart Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20261022-self_unused_var-v1-1-8ab10a6b7f44@kylinos.cn Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b92e3f70dcae641828e68c339b7b8507dad53d03 Author: Daniel Machon Date: Wed Oct 21 16:04:59 2026 +0200 net: sparx5: fix tx DCB index drift in fdma xmit [ Upstream commit 1df26063ab9ba64f5fb11049fa4be686b7fc309e ] sparx5_fdma_xmit() advances dcb_index before checking that the FDMA is done with the DCB, and does not undo the advance when the check fails. Before commit f4aa7e361ae2 ("net: sparx5: use FDMA library for adding DCB's in the tx path") the next DCB was always the one after last_dcb. Since then dcb_index drifts one DCB further away from last_dcb on every failed transmit. While the ring is full, this drops frames even though completed DCBs sit behind dcb_index. After a run of failures, dcb_index can also land on last_dcb itself. Re-adding last_dcb loses the frame, because the FDMA has already passed the tail of the chain, and that DCB is never completed again. Fix this by making dcb_index the next DCB to use, and advancing it only after the DCB has been added, as the rx path does. dcb_index and last_dcb now only move together, so dcb_index always points at the DCB after last_dcb. The issue was found by an AI code review agent. It was reproduced on a sparx5 PCB135 board with a modified kernel that forces 63 consecutive transmit failures. Afterwards, about 1 in 64 frames is lost for good. With the fix, the same test loses no frames. Fixes: f4aa7e361ae2 ("net: sparx5: use FDMA library for adding DCB's in the tx path") Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261021-sparx5-fdma-last-dcb-v2-1-7b8fabdb9239@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 1d5328be401baa9f1c98178ec1120bbb46b765fa Author: Daniel Machon Date: Wed Oct 21 12:48:26 2026 +0200 net: sparx5/lan969x: do not read past skb->len when injecting a frame [ Upstream commit 9642ce6cb51ebd596d0a02074ba9b2a387e974b0 ] sparx5_inject() writes the frame to the injection FIFO one 32-bit word at a time, and pads frames shorter than 60 bytes with zero words. Before this patch, the last word is loaded whole even when skb->len is not a multiple of four, so 1 to 3 bytes past the end of the frame are read. For a frame shorter than 60 bytes those bytes are also transmitted, as VLD_BYTES marks the whole last word valid and the padding starts at the next word. Write the trailing bytes from a zeroed word. The number of words written and VLD_BYTES are unchanged. Found by an AI code review agent, and reproduced on lan969x and sparx5 with register injection: bytes 57 to 59 of a 57 byte frame were not zero. With the fix they are zero, and traffic still passes on both chips. Fixes: f3cad2611a77 ("net: sparx5: add hostmode with phylink support") Signed-off-by: Daniel Machon Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261021-sparx5-inject-tail-bytes-v1-1-7dcc035c8ddf@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b5cf51c49c46fcb10ad53afe4244cd341f5b06b7 Author: Piotr Kubik Date: Mon Oct 19 18:24:53 2026 +0200 net: pse-pd: si3474: validate the channels of a PI [ Upstream commit 110eb808324fd9713b04d874c97283d965e43d2a ] si3474_get_of_channels() accepted channel 8, one past the last channel. The driver then accessed channel 4 instead: quad 1, channel index 0. It also accepted a 4-pair PI whose two channels are not a channel pair of one quad. The chip forms a 4-pair port only from channels 0+1 or 2+3 of a quad (2P/4P mode bit in POWER_ALLOCATION, PORT_REMAP default), and the driver sends every register access of a PI to the quad of its first channel, so such a PI enabled and measured the wrong channels. Reject both at probe. Discovered by an AI code review agent; no shipped device tree triggers it. Validated and tested on an SDG-9000 board (MediaTek MT7988A, two Si3474) with Linux 6.18 and a modified device tree: one chip with a channel at reg 8, the other with a 4-pair PI on channels 1 and 2. The driver now rejects both at probe, and the unmodified device tree still probes all eight PIs. No kernel selftest covers PSE hardware. Fixes: a2317231df4b ("net: pse-pd: Add Si3474 PSE controller driver") Signed-off-by: Piotr Kubik Reviewed-by: Kory Maincent Link: https://patch.msgid.link/20261019162453.1244120-3-piotr@kubik.pl Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b95007282ddf6e73c22adbd60182ef384ce6984b Author: Piotr Kubik Date: Mon Oct 19 18:24:52 2026 +0200 net: pse-pd: si3474: keep detection enabled on the other PIs [ Upstream commit b530456be77160b13efe8dececb6c826538bd4a2 ] DETECT_CLASS_ENABLE holds the detection and classification bits of all four channels of a quad. si3474_pi_enable() wrote the register with the bits of its own PI only, so it cleared them for the other PI of the quad. In AUTO mode that PI keeps its admin state and a PD that already has power keeps it, but the port runs no new detection: a PD plugged in later, or one waiting for detection when the other PI is enabled, gets no power. Read the register and set the PI bits, as the PORT_MODE update above already does. Discovered by an AI code review agent. Confirmed on an SDG-9000 board (MediaTek MT7988A, two Si3474 in AUTO pin mode) with Linux 6.18: with both PIs of one quad disabled, enabling PI A and then PI B left DETECT_CLASS_ENABLE with the bits of PI B only, and a PD on PI A never got power. No kernel change was needed to reproduce it. Tested on the same board with the same sequence in both orders: DETECT_CLASS_ENABLE keeps the bits of both PIs, and the PD gets power. No kernel selftest covers PSE hardware. Fixes: a2317231df4b ("net: pse-pd: Add Si3474 PSE controller driver") Signed-off-by: Piotr Kubik Reviewed-by: Kory Maincent Link: https://patch.msgid.link/20261019162453.1244120-2-piotr@kubik.pl Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 022646367a284f3b5f01484b1aae027791d6f958 Author: Dimitri Daskalakis Date: Tue Oct 20 10:27:06 2026 -0700 eth: fbnic: Correct packet header prefetch [ Upstream commit 286154ae6998a32cca698abd713e1d4728e81924 ] The existing call to net_prefetch() fetched a stale address. The data pointer is not initialized until after the call to xdp_prepare_buff(). Thus, making the prefetch ineffective. Open code the address calcuation to give the prefetch as much time as possible. This was found by manual code inspection. No issues have been observed from this. Fixes: 9064ab485f04 ("eth: fbnic: Prefetch packet headers on Rx") Signed-off-by: Dimitri Daskalakis Reviewed-by: Björn Töpel Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20261020172706.1090951-1-dimitri.daskalakis1@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b86f621d34c690bfd0d58314deed7282c7120084 Author: James Clark Date: Tue Oct 20 07:35:25 2026 +0700 net: ethernet: ti: am65-cpts: fix support for PTP_EXTTS_REQUEST2 ioctl [ Upstream commit e3aaeebbef56ceaa27001d1d5a0c1d73d648e6f4 ] Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") modified the PTP core to validate the supported flags of external timestamp requests, rather than relying on each driver to check them. am65_cpts_extts_enable() ignores the flags, and am65-cpts was not given any .supported_extts_flags. Since PTP_EXTTS_REQUEST2 always implies PTP_STRICT_FLAGS, the core now rejects every PTP_EXTTS_REQUEST2 for this driver with -EOPNOTSUPP, where before that commit the same requests succeeded. Only the PTP_EXTTS_REQUEST ioctl still works. Tests on a BeagleY-AI (J722S) show that the CPTS hardware timestamp push inputs timestamp just the rising edge. Encode this in .supported_extts_flags. A PTP_EXTTS_REQUEST2 for the rising edge then succeeds, and one for the falling edge or for both edges fails with -EOPNOTSUPP. Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") Signed-off-by: James Clark Acked-by: Jacob Keller Reviewed-by: Vadim Fedorenko Reviewed-by: Kory Maincent Link: https://patch.msgid.link/20261020003525.1237742-1-jjc@jclark.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 7177963335a8a5e9ba5b56604836b9de51a01c67 Author: Florian Fuchs Date: Thu Oct 22 18:32:41 2026 +0200 ALSA: sh: aica: Fix spu_memset() stride [ Upstream commit 0d01f90b07e877ef31f9959e9b0bc6bcca9b99df ] spu_memset() writes one 32-bit word per iteration, but advances the destination offset by only one byte. spu_reset() calls it with 0x200000 / 4 words to clear the 2 MiB of sound RAM, so: - three out of four writel() calls target an unaligned address. The SH4 can't do that. Each one traps and is emulated by the unaligned access fixup. This call to spu_memset() causes 393216 unaligned accesses, visible in /proc/cpu/alignment. - the clear covered only about 512 KiB of sound RAM, not 2 MiB. Advance the offset by the size of the written word, to clear the full sound RAM using aligned writes. Fixes: 198de43d758c ("[ALSA] Add ALSA support for the SEGA Dreamcast PCM device") Signed-off-by: Florian Fuchs Acked-by: Adrian McMenamin Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261022163241.2504922-1-fuchsfl@gmail.com Signed-off-by: Sasha Levin commit bc9de8e8356e18151bb36bf41d86d7441450e44f Author: Gregory Price (Meta) Date: Thu Oct 22 00:39:43 2026 -0400 cgroup/cpuset: check effective mems for a movable-only configuration [ Upstream commit 4c047bd0499602161959478b90e66f4c8e523c9b ] check_insane_mems_config() warns and enables cpusets_insane_config_key when a cpuset's tasks can allocate only from movable memory. In cgroup v2 the request may name a memoryless node, which has no zones and cpusets reports it as a movable-only nodemask. For example, with node 2 a CPU-only node: # echo +cpuset > /sys/fs/cgroup/cgroup.subtree_control # mkdir /sys/fs/cgroup/test # echo 2 > /sys/fs/cgroup/test/cpuset.mems # cat /sys/fs/cgroup/test/cpuset.mems.effective 0-1 # dmesg Unsupported (movable nodes only) cpuset configuration detected (nmask=2)! This is a bit confusing, especially consider mems.effective ends up with a valid nodemask by-design (cpuset.mems is treated as-if it were empty). Check each new effective mask in update_nodemasks_hier() instead, as the hotplug path already does. The allocator's bail-out tests the task's mems_allowed, which comes from the effective mask. A request naming a movable-only not present in the parent's nodemask no longer warns (since, again, the cpuset.mems gets overridden and treated as empty). However, it will warn if the parent's mems include the node later. For Example, with node 3 a movable-only node: # echo 0 > /sys/fs/cgroup/test/cpuset.mems # echo 3 > /sys/fs/cgroup/test/child/cpuset.mems # cat /sys/fs/cgroup/test/child/cpuset.mems.effective 0 # dmesg { empty } # echo 0,3 > /sys/fs/cgroup/test/cpuset.mems # cat /sys/fs/cgroup/test/child/cpuset.mems.effective 3 # dmesg Unsupported (movable nodes only) cpuset configuration detected (nmask=3)! Fixes: 8ca1b5a49885 ("mm/page_alloc: detect allocation forbidden by cpuset and bail out early") Signed-off-by: Gregory Price (Meta) Reviewed-by: Waiman Long Reviewed-by: Ridong Chen Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit c64d34f285267e5eabadd677cc2c89447d51d5d1 Author: Kaifeng Wang Date: Mon Oct 19 17:45:22 2026 +0000 tcp: reject devmem tx with fastopen and repair [ Upstream commit 89b9db72918bc209029fad8cccc42191b498d511 ] tcp_sendmsg_locked() enforces that devmem TX can only proceed if the zero-copy path is active and a valid dmabuf binding exists. However, subsequent branches in tcp_sendmsg_locked() can still intercept the message before it reaches the devmem zero-copy loop: 1. TCP Fast Open (MSG_FASTOPEN or DEFER_CONNECT): If TCP_FASTOPEN_CONNECT is set, the socket may have a valid dst with NETIF_F_SG (so zc == MSG_ZEROCOPY and binding is present), but tcp_sendmsg_fastopen() -> tcp_send_syn_data() will use copy_page_from_iter() to byte-copy from the iterator. Since iov_base represents dma-buf offsets rather than user virtual addresses, this misinterprets offsets as user pointers and copies the caller's memory at those addresses into the SYN packet. 2. TCP repair mode: If tp->repair is enabled with TCP_RECV_QUEUE, tcp_send_rcvq() similarly calls skb_copy_datagram_from_iter(), byte-copying from the iterator. Neither path supports or makes sense for devmem transmission. Reject devmem sends inside the Fast Open and TCP repair branches when a devmem binding is present. Checking inside the tp->repair branch also covers the case where repair mode is enabled while sk_stream_wait_connect() drops the socket lock. Additionally, drop the !sockc_err gate from the devmem validation check and return sockc_err if set. Otherwise, if a valid SCM_DEVMEM_DMABUF is followed by a failing cmsg, sockc.dmabuf_id remains set while binding is not acquired, allowing the Fast Open and TCP_RECV_QUEUE repair paths to proceed and return before sockc_err is checked. This pre-existing issue was identified by Sashiko AI review on commit 125755776bc6 ("tcp: reject non zerocopy devmem tx") and has not been hit in production. Fixes: 125755776bc6 ("tcp: reject non zerocopy devmem tx") Fixes: bd61848900bf ("net: devmem: Implement TX path") Reviewed-by: Mina Almasry Signed-off-by: Kaifeng Wang Acked-by: Stanislav Fomichev Reviewed-by: Eric Dumazet Reviewed-by: Pavel Begunkov Link: https://patch.msgid.link/20261019174522.55644-1-kaifengw@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 6f5c3ae194f95e76570b1ddaab0730a5ddf5c5bd Author: Xingyuan Mo Date: Mon Oct 19 15:37:57 2026 +0800 sctp: reject forged cookie peer_addr with unknown address family [ Upstream commit 9802123ceca818aa69284c615114ca55b9cc94a1 ] When cookie authentication is disabled, COOKIE-ECHO peer_addr is attacker-controlled. An invalid sa_family made sctp_get_af_specific() return NULL and crash in sctp_transport_init() on af_specific->sockaddr_len. Validate it with af->addr_valid() in sctp_unpack_cookie(), which also rejects a mismatched family, e.g. an AF_INET6 peer_addr on an IPv4 socket that would later crash in sctp_v6_get_dst() on inet6_sk(sk)->opt. Validate a copy of peer_addr, since addr_valid() rewrites a v4-mapped v6 address in place and the cookie still lives in the received skb, which is not guaranteed to be unshared. Store the validated copy in the new association and pass it to sctp_process_init() instead of the raw cookie, so a v4-mapped v6 address is normalised to AF_INET before the association and its primary transport are built from it. For that, sctp_v6_addr_valid() has to return 0 for a non-v4-mapped address when it is called with a socket that is not PF_INET6, so that IPv6 addresses are never used on IPv4 sockets. The check is done after the v4-mapped handling, so v4-mapped addresses passed to an IPv4 socket through the socket API keep being accepted. As addr_valid() now also checks sk_family and ipv6_only_sock, simplify the address handling in sctp_process_param() with it, as it additionally filters out non-unicast addresses. As a side effect, a v4-mapped address in an IPv6 address parameter is now normalised to AF_INET before the transport is created, matching what the socket API paths already do. Also add the missing !af check in sctp_process_init(), as sctp_get_af_specific(AF_INET6) returns NULL on CONFIG_IPV6=n builds. BUG: KASAN: null-ptr-deref in sctp_transport_new+0xa7/0x350 Read of size 4 at addr 00000000000000b4 by task poc/682 Call Trace: sctp_transport_new+0xa7/0x350 sctp_assoc_add_peer+0x153/0x850 sctp_process_init+0xf9/0x1180 sctp_sf_do_5_1D_ce+0x464/0xbc0 sctp_do_sm+0x114/0x2990 sctp_endpoint_bh_rcv+0x280/0x430 sctp_inq_push+0xdd/0x100 sctp_rcv+0x17f5/0x1ae0 sctp4_rcv+0x2b/0x40 ip_protocol_deliver_rcu+0x25b/0x270 ip_local_deliver+0xd1/0xe0 Kernel panic - not syncing: Fatal exception in interrupt Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Xingyuan Mo Acked-by: Xin Long Link: https://patch.msgid.link/20261019073747.178626-1-hdthky0@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit cacf8667b3663be6fcf6535f6cd9fa8342114ad1 Author: Jiale Yao Date: Fri Oct 16 18:05:22 2026 +0800 regulator: irq: freeze deferred hardware access during suspend [ Upstream commit 8a6d73e316f95e398a1de1d1f58314b6d3e7f641 ] The regulator IRQ helper delays status checks and recovery callbacks on non-freezable workqueues. Those callbacks may access regulator hardware after the backing bus has been suspended. Use system_freezable_wq for normal-priority callbacks. Allocate a freezable high-priority workqueue when requested so the high_prio contract is preserved while hardware access is frozen across suspend. Signed-off-by: Jiale Yao Fixes: 7111c6d1b31b ("regulator: IRQ based event/error notification helpers") Reviewed-by: Matti Vaittinen Link: https://patch.msgid.link/20261016100522.2582557-3-yaojiale02@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit a2d0ba3fb77969b879d442d886c90f4495714cad Author: Steven Rostedt Date: Thu Oct 22 15:33:59 2026 -0400 cpuidle: haltpoll: Only define guest_halt_poll_ns tracepoint when used [ Upstream commit 107b87efc8fcd6a597f1b534f116385620770e56 ] Tracepoints that are defined take up around 5K each, even if they are not used. When a tracepoint is used only in code when a specific config is enabled, their definition must also be only defined when the same config is enabled otherwise it wastes memory. The tracepoint guest_halt_poll_ns is only used when CONFIG_CPU_IDLE_GOV_HALTPOLL is enabled. Guard the definition of that tracepoint with the same config. Link: https://patch.msgid.link/20261022153359.2433474b@gandalf.local.home Fixes: 0da11bf0cab90 ("cpuidle: haltpoll: Add trace points for guest_halt_poll_ns grow/shrink") Acked-by: Rafael J. Wysocki Signed-off-by: Steven Rostedt Signed-off-by: Sasha Levin commit 46e1b3df75ecb0070188ce54915d85f693f8ef59 Author: bui duc phuc Date: Fri Oct 16 15:50:47 2026 +0700 ASoC: amd: raven: Fix memory leak in acp3x_dma_close() [ Upstream commit e0b17f84f6e3fa1201b8e2857094023c42ce5636 ] acp3x_dma_open() allocates a struct i2s_stream_instance for each substream, but acp3x_dma_close() never frees it, leaking it on every open/close cycle. Free it in acp3x_dma_close(). Fixes: 9f7041b71a2f ("ASoC: amd: closing specific instance.") Reported-by: sashiko-reviews Closes: https://lore.kernel.org/all/sashiko-outbox-173760@kernel.org/ Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261016085047.535265-1-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b455bcb13502696e588c7a0e60a196851fb87474 Author: Lee Jia Jie Date: Thu Oct 22 20:58:48 2026 +0800 perf: Fix UAF in attach_task_ctx_data() [ Upstream commit 64ea0e8226ed98d14e0231af1beae10c3d5c043a ] struct perf_ctx_data is RCU protected. In attach_task_ctx_data(), the cmpxchg retry loop runs without holding rcu_read_lock(). If task->perf_ctx_data already holds a pointer (call it `cd1`), then try_cmpxchg(&task->perf_ctx_data, &old, cd) fails and loads old = cd1. A concurrent thread running detach_task_ctx_data() could free cd1 leading to UAF and further memory corruption when cd1 is reclaimed by another thread. CPU 0: attach_task_ctx_data() CPU 1: detach_task_ctx_data() ----------------------------- ----------------------------- try_cmpxchg(&task->perf_ctx_data, &old, cd2) -> fails; loads old = cd1 refcount_dec_and_test(&cd1->refcount) try_cmpxchg(&task->perf_ctx_data, &cd1, NULL) perf_free_ctx_data_rcu(cd1) [ RCU grace period -> kfree(cd1) ] refcount_inc_not_zero(&old->refcount) -> UAF on freed cd1 Fix this by taking rcu_read_lock across the race window. Fixes: 506e64e710ff ("perf: attach/detach PMU specific data") Signed-off-by: Lee Jia Jie Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sasha Levin commit 6770a56f9c4a40aa2cc0c5d18b57b7ba52a16d30 Author: Michail Andreas Michalopoulos Date: Fri Oct 23 02:40:45 2026 +0200 ksmbd: select CRYPTO_AES [ Upstream commit 2c36c4a86104d763ee798d4a89e2d3384b4cd626 ] ksmbd allocates "gcm(aes)" and "ccm(aes)" AEAD transforms for SMB3 encryption, but SMB_SERVER only selects CRYPTO_GCM and CRYPTO_CCM, not an AES cipher. With a configuration in which nothing else enables CRYPTO_AES, ksmbd builds but cannot allocate the transforms, and every session that uses encryption fails: ksmbd: Failed to alloc encrypt aead : -2 ksmbd: crypto alloc failed Select CRYPTO_AES, as the SMB client already does. Fixes: a848c4f15ab6 ("cifsd: add Kconfig and Makefile") Assisted-by: LLM Signed-off-by: Michail Andreas Michalopoulos Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 9da9c02a13b8f7ec4a617af8896724f312ede926 Author: Ivan Hu Date: Mon Oct 19 16:54:17 2026 +0200 ACPICA: Initialize parser_state.aml_end in acpi_install_method() [ Upstream commit ec696f34774db985841bac9a2df179c0040ef073 ] In AcpiInstallMethod(), the local ParserState is stack-allocated and only ParserState.Aml was initialized. Parser helpers called by this path read ParserState.AmlEnd for bounds checking: AcpiPsPeekOpcode() reads it before validating the first AML opcode, and AcpiPsGetNextPackageEnd() reads it indirectly via AcpiPsGetNextPackageLength(). The subsequent package-limit check also compares against ParserState.AmlEnd. Because AmlEnd was never set, these checks operated on an uninitialized value, which Coverity flagged as an uninitialized read (CID 1684785) and which could lead to incorrect parser bounds decisions. Coverity report: *** CID 1684785: Memory - illegal accesses (UNINIT) /src/acpica/source/components/namespace/nsxfname.c: 712 in AcpiInstallMethod() ParserState.Aml += AcpiPsGetOpcodeSize (Opcode); >>> CID 1684785: Memory - illegal accesses (UNINIT) >>> Using uninitialized value "ParserState.AmlEnd" when calling "AcpiPsGetNextPackageEnd". ParserState.PkgEnd = AcpiPsGetNextPackageEnd (&ParserState); Initialize ParserState.AmlEnd to the end of the table (Buffer + Table->Length) so the parser bounds checks operate on a valid limit. Link: https://github.com/open-acpica/acpica/commit/19429ef91ebfb2144c918038dce13e297b4ef051 Fixes: bdc357540129 ("ACPICA: add boundary checks in two places") Signed-off-by: Ivan Hu Signed-off-by: Maciej Wieczor-Retman Signed-off-by: Leonard Lausen [ rjw: Subject tweaks ] Link: https://patch.msgid.link/20261019145421.47181-2-leonard@lausen.nl Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 5b3684dca489fcc7f44aa4218044d8db9e31c34b Author: Daniel Lezcano Date: Tue Oct 20 16:45:25 2026 +0200 ACPI: platform_profile: Separate handler locking from sysfs lifetime [ Upstream commit b66621ad2a8fb553c4cb75b9d69fead4f0532933 ] Registration and removal currently hold profile_lock across device_unregister() and sysfs_update_group(). These operations can remove sysfs attributes and wait for their active callbacks to finish. The profile read and write callbacks acquire profile_lock themselves, so a concurrent access can deadlock: Removal/update path Active sysfs callback ------------------- --------------------- acquire profile_lock hold kernfs active reference remove a sysfs attribute wait for profile_lock wait for its active references The removal path cannot finish until the callback returns, and the callback cannot return until the removal path releases profile_lock. This applies both to per-provider device teardown and to updates of the legacy aggregate attribute group. Commit 041142d7d252 ("ACPI: platform-profile: Fix possible deadlock in platform_profile_remove()") previously fixed this lock ordering by moving sysfs_remove_group() outside profile_lock. Commit 55b1e68134bf ("ACPI: platform_profile: Use guard(mutex) for register/unregister") reintroduced the issue by extending the mutex guard over sysfs_remove_group(). Later, commit 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile") replaced that teardown with device_unregister() and sysfs_update_group(), still under the same mutex, extending the problem to class-device teardown and aggregate attribute updates. Simply dropping profile_lock around these operations is insufficient. Aggregate operations currently discover providers through the class device list. A provider being unregistered could therefore still be selected for an aggregate read, write or cycle while its sysfs files are being torn down. Concurrent registrations and removals would also race when updating aggregate attribute visibility. Introduce profile_registration_lock to serialize registration, removal and aggregate sysfs updates. Sysfs callbacks never acquire this mutex. Retain profile_lock for profile operations and use it to protect an explicit list of handlers participating in the aggregate interface. Add a handler to that list only after device_register() succeeds. On removal, unlink it under profile_lock before calling device_unregister(). Acquiring profile_lock first waits for any aggregate operation already using the handler to complete; unlinking prevents later aggregate operations from finding it. Release profile_lock before draining sysfs callbacks, allowing active per-provider callbacks to complete before the device is released. Apply the same unlink-before-unregister ordering to registration error cleanup. Walk this list for aggregate reads, writes and profile cycling, and use its emptiness to determine aggregate attribute visibility. The class devices remain the per-provider userspace interface. There can now be an interval between removing the last handler from the list and removing the aggregate attributes. Explicitly reject choices reads and writes during that interval: the intersection bitmap starts with every bit set, so an empty traversal must not advertise all profiles or report a successful write without updating a provider. This separates aggregate membership from class device teardown while preserving the existing class and ACPI sysfs interfaces. Fixes: 55b1e68134bf ("ACPI: platform_profile: Use guard(mutex) for register/unregister") Fixes: 77be5cacb2c2 ("ACPI: platform_profile: Create class for ACPI platform profile") Signed-off-by: Daniel Lezcano Reviewed-by: Ilpo Järvinen Reviewed-by: Mark Pearson [ rjw: Subject adjustment, added two empty code lines ] [ rjw: Renamed profile_walk_handlers() to profile_for_each_handler() ] Link: https://patch.msgid.link/20261020144525.3265851-1-daniel.lezcano@oss.qualcomm.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 09a5a04a2d36c33881e323ddf7d84cf252bf6682 Author: Nickolai Zeldovich Date: Fri Oct 16 23:35:38 2026 -0400 nsproxy: Fix cred leak in the error path of prepare_nsset() [ Upstream commit e08601d3a7b2236f4915497dca353dcf117bab5c ] A task that calls setns() with CLONE_NEWUSER together with CLONE_NEWNS and at least one more namespace flag leaks a struct cred (and the user_namespace, ucounts and group_info references it holds) whenever the call fails at the fs_struct copy. On a kernel with CONFIG_USER_NS the leak is one cred per failed setns(); under memory pressure, or driven by a fault-injecting attacker, it accumulates and pins user namespaces that can then never be freed. prepare_nsset() sets nsset->flags only on the success path: if (flags & CLONE_NEWUSER) nsset->cred = prepare_creds(); ... } else if (flags & CLONE_NEWNS) { nsset->fs = copy_fs_struct(me->fs); if (!nsset->fs) goto out; /* flags still 0 here */ } nsset->flags = flags; return 0; out: put_nsset(nsset); put_nsset() decides what to release from nsset->flags: if (flags & CLONE_NEWUSER) put_cred(nsset_cred(nsset)); On the copy_fs_struct() failure arm prepare_creds() has already allocated the cred, but nsset->flags is still the zero from the caller's "struct nsset nsset = {}", so put_nsset() does not see CLONE_NEWUSER and never drops it. The caller (__do_sys_setns) returns the error without touching nsset, so the cred is lost. Set nsset->flags at the start of prepare_nsset(), before anything can fail, so every error exit through put_nsset() releases what was taken. commit_nsset(), which clears nsset->cred on success, is unaffected. Reproduced on x86_64 under QEMU with failslab aimed at the fs_struct cache and kmemleak enabled: 500 calls of setns(pidfd, CLONE_NEWUSER | CLONE_NEWNS | CLONE_NEWUTS) each fail with -ENOMEM and leave 851 unreferenced cred objects allocated from prepare_creds() via setns() before the fix, and none after (the program is in the notes below). Found by formal verification of kernel/nsproxy.c. Fixes: 303cc571d107 ("nsproxy: attach to namespaces via pidfds") Signed-off-by: Nickolai Zeldovich Link: https://patch.msgid.link/20261017033538.793280-1-nickolai@csail.mit.edu Reviewed-by: Serge Hallyn Reviewed-by: Bradley Morgan Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit adcc1323084e276f04db8d72e5ae7df72745410d Author: Avi Weiss Date: Tue Oct 20 21:11:01 2026 +0300 signal: skip blocked signals in dequeue_synchronous_signal() [ Upstream commit 4bd3a0e8e53decd614853fbb487a268f139f679e ] dequeue_synchronous_signal() checks whether an unblocked synchronous signal is pending, but its queue scan can select a different blocked entry with a positive si_code. This can deliver a signal while it is still blocked. Check the blocked mask for each queued entry. Forced faults are unblocked when necessary by force_sig_info_to_task(), and the existing pending bookkeeping is unchanged. Fixes: 7146db3317c6 ("signal: Better detection of synchronous signals") Signed-off-by: Avi Weiss Link: https://patch.msgid.link/20261020181101.1605736-1-thnkslprpt@gmail.com Acked-by: Oleg Nesterov Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 0880f2191a2b9ebd4d99b1ec5201030a48b82789 Author: Karl Mehltretter Date: Fri Oct 9 07:55:46 2026 +0200 fs: fix ramfs_fs_info leak when rootfs is unmounted [ Upstream commit c60f9fe1988dd6f96b4b1d4f25fe7474340c7b87 ] When rootfs is a ramfs, for example with root= on the command line, its superblock carries a struct ramfs_fs_info from ramfs_init_fs_context(). ramfs_kill_sb() frees it, but rootfs_fs_type uses kill_anon_super(). Before commit 576ee5dfd459 ("fs: add immutable rootfs") rootfs could not be unmounted. Since then prepare_namespace() pivots into the real root and unmounts rootfs. When the superblock is destroyed, the structure is leaked. kmemleak on an SH7785LCR board: unreferenced object 0x8100a720 (size 32): comm "swapper/0", pid 0, jiffies 4294892299 backtrace (crc c8bfd23b): ... ramfs_init_fs_context+0x16/0x48 rootfs_init_fs_context+0x16/0x2c alloc_fs_context+0x98/0x114 fs_context_for_mount+0x16/0x24 ... Call ramfs_kill_sb() when rootfs is a ramfs. tmpfs frees its own data in put_super and keeps kill_anon_super(). Fixes: 576ee5dfd459 ("fs: add immutable rootfs") Reported-by: John Paul Adrian Glaubitz Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20261009055546.85279-1-kmehltretter@gmail.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 8c520cbefc77720c066aaf62f49d607dafbd2fc6 Author: Christian Brauner Date: Mon Oct 12 14:31:19 2026 +0200 super: convert to plain hashtable [ Upstream commit c84de57efe88c9c513cfbc3746361502db0978e2 ] Convert the rhltable to a plain hashtable under a spinlock. The walks keep their place with a cursor entry in the chain. A claim is unhashed the moment it's dropped and a walk that finds a superblock that isn't born yet waits for it to be born or to die and looks again. Since hashing can't fail anymore the entry for the superblock's own s_dev is embedded in struct super_block and the preallocation in alloc_super() goes away. This all simplifies things quite a lot. It also fixes a btrfs bug where fs_bdev_freeze() ended up freezing a btrfs filesystem through a stale member that open_ctree() had already released while the freeze was waiting for SB_BORN. The resume doesn't find a holder for that device anymore so the filesystem stays frozen for good. The walks return superblocks instead of table entries now and user_get_super() hands out the passive reference the walk took. Reproducer, a three device btrfs with a stale copy of a removed member. dm-delay under the remaining members stretches the window between btrfs_open_devices() and btrfs_free_extra_devids(): truncate -s 1G a1 a2 b A1=$(losetup -f --show a1); A2=$(losetup -f --show a2); B=$(losetup -f --show b) mkfs.btrfs -f -d single -m single $A1 $A2 $B cp b b.old mount $A1 /mnt && btrfs device remove 3 /mnt && umount /mnt OLD=$(losetup -f --show b.old) dmsetup create d1 --table "0 $(blockdev --getsz $A1) delay $A1 0 200" dmsetup create d2 --table "0 $(blockdev --getsz $A2) delay $A2 0 200" dmsetup create old --table "0 $(blockdev --getsz $OLD) linear $OLD 0" mount -o device=/dev/mapper/d2,device=/dev/mapper/old /dev/mapper/d1 /mnt & sleep 1; dmsetup suspend old; wait dmsetup resume old touch /mnt/foo # hangs until fsfreeze -u /mnt That left btrfs frozen in 5 of 5 rounds with the same tables issued through raw dm ioctls. The -o degraded variant needs the mount held between the insertion and the bd_fsfreeze_count check in fs_bdev_register() with a kprobe. Fixes: cdb5146f8d5f ("fs: look up superblocks via the device table in fs_holder_ops") Link: https://patch.msgid.link/20261012-work-super-dev_hash-v1-2-305cf71cd334@kernel.org Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit f70387f83e869613dcbb6e288484957bba7c2ea4 Author: Karl Mehltretter Date: Sat Sep 5 07:17:38 2026 +0200 netfs: Restore selective debug mask handling [ Upstream commit 62400ce406f66b1154dfbd0d60a7e3baa374e105 ] The netfs debug macros test only whether netfs_debug is nonzero. Consequently, selecting one debug point enables every entry, exit and general debug message. Documentation/filesystems/caching/fscache.rst and the NETFS_DEBUG Kconfig help still describe /sys/module/netfs/parameters/debug as a bitmask of per-stream function entry, exit and general debugging points, and the fscache_*.c files still define FSCACHE_DEBUG_LEVEL, but nothing has decoded either since the mask handling was dropped when FS-Cache was folded into netfs. Restore the per-level and per-point mask decoding. Files that do not define FSCACHE_DEBUG_LEVEL, which includes the netfs core, fall under the cache management stream, the same default the FS-Cache macros had. Fixes: 915cd30cdea8 ("netfs, fscache: Combine fscache with netfs") Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260905051738.11317-1-kmehltretter@gmail.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 33f9ff6266407ff2dc8aa1fa755f09b8278b0909 Author: Nickolai Zeldovich Date: Sat Oct 17 23:03:41 2026 -0400 nsfs: check the trailing bytes of a file handle in bytes, not words [ Upstream commit ad0312e1decd40d18e0e75de96c9c52013ec05be ] open_by_handle_at(2) gets the wrong answer for a namespace file handle longer than struct nsfs_file_handle: a 16-byte handle padded with zeros to 48 bytes or more, which is what the comment above the check promises to accept, is refused with -ESTALE, while a 20-byte handle whose extra word is garbage is accepted. Reproduced on v7.0 and on mainline with the handle of /proc/self/ns/net from name_to_handle_at(AT_SYMLINK_FOLLOW); no privilege is needed, as nsfs_fh_to_dentry() admits the caller's own namespaces. Since v6.18. nsfs_fh_to_dentry() receives fh_len in 32-bit words, like every fh_to_dentry(), and NSFS_FID_SIZE_U32_LATEST is the struct size in words (4). The check that the bytes past the struct are zero adds that word count to a byte pointer and passes the word difference to memchr_inv() as a byte count: it inspects bytes 4 .. fh_len - 1 of the handle instead of bytes 16 .. 4 * fh_len - 1. Up to a 44-byte handle that range lies inside ns_id, ns_type and ns_inum, so the outcome depends on the values of those fields (a padded net namespace handle passes because the upper bytes of its ns_id and ns_type are zero) and the real trailing bytes are never looked at; from 48 bytes on the range always covers a non-zero field byte and every padded handle is refused. Start NSFS_FILE_HANDLE_SIZE_LATEST bytes into the handle and check (fh_len - NSFS_FID_SIZE_U32_LATEST) * sizeof(u32) bytes. Tested with a program that encodes /proc/self/ns/net and opens the handle with handle_bytes 16, 20, 36, 48 and 128 (zero padding), and 20 and 48 with a non-zero last byte. Before: 48 and 128 refused, the 20-byte garbage handle accepted; after: every padded handle opens, both garbage handles are refused. Fixes: 5222470b2fbb ("nsfs: support file handles") Signed-off-by: Nickolai Zeldovich Link: https://patch.msgid.link/20261018030342.799383-1-nickolai@csail.mit.edu Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 2fa4ef092711bedd4eb86ce41b7a1276cc30add3 Author: Tianyi Chen Date: Mon Oct 19 18:39:27 2026 +0900 eventpoll: propagate wakeup source creation failure in ep_modify() [ Upstream commit 9f2b8f4a452db79741c06e6ea91448347f4a975c ] When EPOLL_CTL_MOD adds EPOLLWAKEUP, ep_modify() ignores the return value of ep_create_wakeup_source(). If allocation fails, it returns success with EPOLLWAKEUP set but no per-item wakeup source, so the requested suspend protection is missing. This can happen without fault injection on SELinux systems: creating the wakeup source's sysfs nodes can require GFP_KERNEL_ACCOUNT allocations for security.selinux xattrs, which can fail when the caller's memory cgroup is over its limit. Create the wakeup source before updating the event mask and data, and return the error if creation fails. Leave any newly created per-epoll source in place until ep_free(), as ep_insert() does on failure. Fixes: 4d7e30d98939 ("epoll: Add a flag, EPOLLWAKEUP, to prevent suspend while epoll events are ready") Signed-off-by: Tianyi Chen Link: https://patch.msgid.link/179240281988.1700986.8309527041821666235@tychen.cc Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 19cae0afc4daf856c08f60a75e9f2d8edb6fc697 Author: Nickolai Zeldovich Date: Fri Oct 16 23:47:39 2026 -0400 proc/kcore: advance the vmalloc retry by the last copy, not the total [ Upstream commit 88c3f9d6145204cfd88e5d9cbc9463ffd892e10a ] A readv() or preadv() of /proc/kcore fails with EFAULT, although every byte of the destination is writable, when the page of a later iovec is not present at the moment the copy of a KCORE_VMALLOC chunk is retried: swapped out, migrated by compaction or NUMA balancing, write-protected by KSM, or unmapped by MADV_DONTNEED from another thread. Only root can read /proc/kcore, and the read must use more than one iovec. On an x86_64 defconfig kernel (v7.3-rc7) a preadv() of one vmalloc page into two 2 KiB iovecs on separate pages, with a second thread repeatedly unmapping the second page, failed 77701 of 200000 calls with EFAULT; with the fix all 200000 succeed. Affected since v6.4. read_kcore_iter() copies a KCORE_VMALLOC chunk with vread_iter(), which writes to the user buffer with page faults disabled and stops at the first iovec whose page is absent, after the earlier iovecs were written; the loop then faults the rest of the buffer in and calls vread_iter() again for what is left. It keeps the running total in `read` and advances the source address and the remaining length by that total: read += vread_iter(iter, src, left); if (read == tsz) break; src += read; left -= read; In the reproducer the first call copies the 2048 bytes of the first iovec and stops at the second: read is 2048, and src and left move by 2048, which is right. The page that fault_in_iov_iter_writeable() then faults in is unmapped again before the second call, which copies 0 bytes: read is still 2048, but src moves by another 2048 to the end of the chunk and left drops to 0. The third call has nothing to copy, src moves by 2048 once more, left wraps around, and fault_in_iov_iter_writeable() fails on that length, so the read returns -EFAULT. When both short copies are non-zero (three or more iovecs) the extra call also copies bytes from the wrong offset of the page into the buffer before the failure. A single iovec is not affected: its nofault copy is all or nothing, so a short copy is always empty and the advance by the total is still the advance by the last copy. Keep the return value of each vread_iter() call and advance src and left by that; `read` stays the running total compared with tsz. Found while formally verifying vread_iter() against the kernel binary. Fixes: 4c91c07c93bb ("mm: vmalloc: convert vread() to vread_iter()") Signed-off-by: Nickolai Zeldovich Link: https://patch.msgid.link/20261017034739.793431-1-nickolai@csail.mit.edu Reviewed-by: Omar Sandoval Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 10867f0ae298f8b8e7c701431dcbbb7dda7bb198 Author: Marek Szyprowski Date: Thu Oct 22 12:15:28 2026 +0200 ASoC: wm8994: follow AIF clock source changes in MCLK gating [ Upstream commit 8731e33a3b98ea1ccade059b3a1ce06b7dd66b17 ] The AIF clock source can be changed by configure_aif_clock() while the AIF clock is running, for example the Midas machine driver switches AIF1 between MCLK2 and FLL1 while AIF1CLK is kept enabled for jack detection. aif_mclk_set() only enables the MCLK selected at the time the AIF clock is turned on, so an MCLK selected later this way is never enabled, and the codec may run from a stopped clock. Track whether the AIF clock is running and, if so, enable the newly selected MCLK in configure_aif_clock() before switching to it, then release the previously enabled one. Fixes: 001b83d395ab ("ASoC: wm8994: Add support for MCLKn clock gating") Signed-off-by: Marek Szyprowski Link: https://patch.msgid.link/20261022101531.775891-1-m.szyprowski@samsung.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0e833b45127032953e2ea6b3659e827dc67e064a Author: Zhan Xusheng Date: Tue Oct 20 21:44:33 2026 +0800 ntfs: fix u16 truncation of the update sequence array count check [ Upstream commit b713b69cf79ef52b1737a1a6c09df2522ff875af ] ntfs_check_restart_page_header() bounds the on-disk system page size by recomputing the update sequence array count from it: u16 ra_ofs, usa_count, usa_ofs, usa_end = 0; ... usa_count = 1 + (logfile_system_page_size >> NTFS_BLOCK_SIZE_BITS); if (usa_count != le16_to_cpu(rp->usa_count)) return false; The right hand side is computed in u32 but stored in a u16, so the count wraps once the system page size reaches 0x2000000. An image claiming any larger power of two passes the check by also claiming usa_count == 1. Nothing else limits the value, so ntfs_check_and_load_restart_page() goes on to kvzalloc() up to 2 GiB for the restart page and copy that many bytes a page at a time. The size is only rejected afterwards, by the (size >> NTFS_BLOCK_SIZE_BITS) != usa_count test in post_read_mst_fixup(). Compute the count in a u32 so the existing check rejects an over-large system page size instead of being defeated by the truncation. This adds no new limit: the array holds one u16 per protected sector plus the update sequence number and must end within the first sector, which caps usa_count at 240 and the system page size at 64 KiB. Widen ra_ofs and usa_ofs as well, as ntfs_check_restart_area() already does: both are loaded from __le16 on-disk fields and every comparison is against a non-negative value, so no result changes. Fixes: 1e9ea7e04472 ("Revert "fs: Remove NTFS classic"") Signed-off-by: Zhan Xusheng Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit bae87fc0e80c50f065f1feca232e38e3292be425 Author: Hang Nan <2122295973@qq.com> Date: Tue Oct 20 16:53:53 2026 +0800 ntfs: reject index blocks with a too small entries offset [ Upstream commit 20e14268ef410cbabff54a79405813a8b9ce8e89 ] Index blocks read from the volume are checked for a plausible header, but nothing keeps a block from placing its entries closer to the header than ntfs_ib_alloc() does when it creates one. The allocation adds the update sequence array, one entry per 512-byte sector plus the terminator, to the index header and aligns the result to 8 bytes, so the first entry of a 4096-byte block starts at offset 40, while a corrupt block may declare 16. ntfs_ib_copy_tail() then copies the entries that follow the median entry from the source block into a freshly allocated destination. The tail is sized as index_length minus entries_offset and the median entry, both from the source, while the destination only has allocated_size minus the canonical offset of room. With the values above the tail is 4040 bytes and the destination holds 4032, so the last 8 bytes are written past the end of the new allocation, with contents taken from the mounted image. Reject such a block when it is read: entries_offset must not be smaller than the canonical offset for the block size. Derive it from block_size rather than from the block's own usa_count, which post_read_mst_fixup() treats as "not protected" when it does not match the block size, and use the same helper in ntfs_ib_alloc() so both stay in sync. Fixes: 0a8ac0c1fa0b ("ntfs: update directory operations") Signed-off-by: Hang Nan <2122295973@qq.com> Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 11c64df89050b7e1b84b2605b62c1a83641b13fe Author: Binbin Deng <18983559317@163.com> Date: Mon Oct 19 18:43:52 2026 +0800 tipc: fix use-after-free of broadcast reception link at node release [ Upstream commit 473167593f42551ce6b00c05cee8cd20309d45ac ] When the last reference to a tipc_node is dropped, the node itself is deferred to the RCU callback tipc_node_free(), but the nested broadcast reception link, n->bc_entry.link, is kfree()d synchronously in tipc_node_kref_release(), before call_rcu(), and the pointer is never cleared. Readers that obtained the node from node_list and then dereference bc_entry.link deep into the link (tipc_link_name() in tipc_nl_node_reset_link_stats(), bcl->name/stats in tipc_nl_add_bc_link() on the link dump path) therefore touch freed memory although the enclosing node stays alive for a full grace period. The sibling per-bearer links get "kfree + NULL" under the node write lock in tipc_node_clear_links(); the broadcast entry was missed. The race is reachable through the node cleanup timer: once a peer has been unreachable for NODE_CLEANUP_AFTER (300 s), tipc_node_timeout() -> tipc_node_cleanup() unlinks the node under the write lock, and the final tipc_node_put() at the caller runs outside node_list_lock, so the kfree executes in timer softirq context, concurrently with genl dump/ reset walkers that hold only rcu_read_lock(). (A netlink "peer remove" cannot race those walkers itself: tipc_genl_family has no parallel_ops, so all doit/dumpit calls serialize on the global genl lock.) Reproduced in a QEMU/KVM guest running v7.3.0 with KASAN and PREEMPT(full): 10 TIPC peer namespaces on veth bearers, bearer removal staggered so the 300 s node cleanup timers expire while other tasks loop link dumps with the broadcast filter and reset-link-stats lookups. KASAN hit within two cleanup cycles: BUG: KASAN: slab-use-after-free in strlen+0x85/0xa0 Read of size 1 at addr ffff88800b54a004 by task poc_eth/371 strlen+0x85/0xa0 tipc_nl_add_bc_link+0x2f9/0xd40 __tipc_nl_add_node_links+0x10c/0x140 tipc_nl_node_dump_link+0x8d5/0xd50 Freed by task 0: kfree+0x121/0x380 tipc_node_timeout+0xa33/0xcf0 run_timer_softirq+0x144/0x250 sysvec_apic_timer_interrupt with the freed object being the kmalloc-1k tipc_link allocated by tipc_link_bc_create() during peer discovery. The same defect fires in strcmp() called from tipc_nl_node_reset_link_stats(). Move the kfree of n->bc_entry.link into the tipc_node_free() RCU callback so the broadcast link lives exactly as long as the enclosing node. All readers are covered: the netlink walkers are inside rcu_read_lock(), and the packet reception path reaches the node via tipc_node_find(), whose kref defers kref_release itself. Found during a static-analysis-assisted audit: candidate sites were surfaced by a Coccinelle rule, and the reader/writer paths were confirmed by LLM-assisted (GLM-5.3) code inspection. Fixes: d25a01257e42 ("tipc: fix crash during node removal") Assisted-by: GLM-5.3 coccinelle Signed-off-by: Binbin Deng <18983559317@163.com> Reviewed-by: Simon Horman Reviewed-by: Tung Nguyen Link: https://patch.msgid.link/20261019104352.488347-1-18983559317@163.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit bb7ba9492f7759f0e886535104f438ae4bbcff5e Author: Baek Kyu, Kim Date: Wed Oct 21 02:26:01 2026 +0900 gpiolib: Propagate emulated drive errors when setting arrays [ Upstream commit 15665047024e30f9c2227563d03034061c99ac2c ] gpiod_set_array_value_complex() ignores errors from the open-drain and open-source emulation helpers. If a direction change fails, GPIO_V2_LINE_SET_VALUES_IOCTL still reports success, including when updating a single line. Return the first emulation error after freeing the temporary bitmaps. Keep updates already made to earlier lines and stop processing the remaining lines, as for errors from gpiochip_set_multiple(). Fixes: 8ce258f62f90 ("gpiolib: make value setters have return values") Signed-off-by: Link: https://patch.msgid.link/20261020172601.221861-1-pocj8ur4in@gmail.com Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin commit fa567f8077c96a24b040eff8163624f0511622f1 Author: Rand Deeb Date: Thu Oct 15 22:49:35 2026 +0300 ata: libata-core: Ignore forced transfer modes the host does not support [ Upstream commit ea5a5af9159cc89e8bcb7a95336e02c8b70aa3d2 ] The libata.force parameter can force a transfer mode (pio0-6, mwdma0-4, udma0-7) for a port or device. ata_force_xfermask() applies it in ata_do_set_mode() right after ata_dev_xfermask() has limited the device masks to what the host supports. It replaces those masks with the forced mode without checking the host masks, so a mode the controller does not support is passed to the driver's ->set_piomode() or ->set_dmamode(). Several PATA drivers rely on the host masks to keep the mode number in range when indexing their timing tables. ata_piix, pata_efar, pata_it8213, pata_oldpiix, pata_radisys and pata_rdc declare ATA_PIO4 and ATA_MWDMA12_ONLY, index a five-entry PIO timing table with pio_mode - XFER_PIO_0, and index a three-entry needed_pio[] table with dma_mode - XFER_MW_DMA_0. Booting with libata.force=pio5, pio6, mwdma3 or mwdma4 makes them read past those tables, use the values read as further indices into the timing table, and write the result to the controller's timing registers. Make ata_force_xfermask() skip, with a warning, a forced transfer mode that is not in the port's PIO, MWDMA or UDMA mask, and keep looking for an earlier matching libata.force entry, as it already does for entries that do not apply to the device. With libata.force=pio4,1.0:pio5 on a PIO4 host, device 1.0 now gets pio4 instead of pio5. Forcing a mode the host supports still works as before, including a mode that ata_dev_xfermask() removed for the device or cable. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 332673257056 ("libata: implement libata.force module parameter") Signed-off-by: Rand Deeb Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20261015194935.1497-1-rand.sec96@gmail.com Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit ec48683e7090f8ab5342e2fe388ab76f2b14adc3 Author: Cosmin Ratiu Date: Tue Oct 20 18:36:59 2026 +0300 net/mlx5e: Stop asserting for RTNL when closing channels [ Upstream commit e0a958ddfc89f2e1c43448cdaeb5b30e54e19448 ] mlx5e_close_channels() has an ASSERT_RTNL() from the time when RTNL was required for closing channels. But the driver has been switched to using the netdev lock a while back, and this fired from a flow which was forgotten during the conversion: mlx5e_tx_timeout_work() -> mlx5e_reporter_tx_timeout() -> mlx5e_health_report() -> mlx5e_tx_reporter_timeout_recover() -> mlx5e_safe_reopen_channels() -> mlx5e_safe_switch_params() -> mlx5e_close_channels() The RTNL is not acquired here, but the netdev lock is, and it is enough. Rather than switching to netdev_assert_locked(), simply drop the assert. Upper layers (networking core, ethtool core) provide locking and lower layers (NAPI helpers) assert that the netdev lock is held. Fixes: 8f7b00307bf1 ("net/mlx5e: Convert mlx5 netdevs to instance locking") Signed-off-by: Cosmin Ratiu Reviewed-by: Carolina Jubran Signed-off-by: Tariq Toukan Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20261020153659.3440902-1-tariqt@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 1dc2a6858c7f8522ac22249cd44d58b5b7aa655a Author: Eric Dumazet Date: Tue Oct 20 17:19:54 2026 +0200 net: shrink the payload-only part of skb dataref to one bit [ Upstream commit 4957ea03bf2696f5da12c09144f48d040696ecc2 ] skb_shinfo(skb)->dataref is split in two 16-bit halves: the lower one counts all references, the upper one the payload-only (nohdr) references. __skb_clone() increments dataref without bound, and skb_cloned() only checks the low 16 bits. With 65,537 references the low half reads 1, the head looks private, and pskb_expand_head() (or skb_unclone(), skb_cow(), ...) frees it while clones still point to it. An unprivileged user can reach this from a user and network namespace: about 32,770 AF_PACKET sockets on lo bring dataref to 0x10001, then any pskb_expand_head() on the receive path (here a pull of a large IPv6 Hop-by-Hop header) frees the shared head: BUG: KASAN: slab-use-after-free in _copy_to_iter+0x187/0x1330 Read of size 1590 at addr ff110001104a9002 by task dataref_wrap/87 skb_copy_datagram_iter+0x60/0x190 packet_recvmsg+0x1f5/0x12b0 __sys_recvfrom+0x18d/0x290 Freed by task 87: kfree+0xf3/0x3b0 pskb_expand_head+0x344/0xeb0 __pskb_pull_tail+0xf9/0x1bf0 ipv6_parse_hopopts+0x377/0x4f0 ip6_rcv_core+0xc67/0x1620 The upper half never holds more than 1. It is only set by __skb_header_release(), with atomic_set() on an skb owning its head (TCP/SCTP output, and GRO which never sees cloned skbs). __skb_clone() clears nohdr, and __copy_skb_header() does not copy it. Move SKB_DATAREF_SHIFT to 30, so that the reference count gets 30 bits, and dataref stays positive. Wrapping it would need 2^30 live clones of a single skb, which socket buffer limits and memory make unreachable. This issue was found by Anthropic using Claude, and validated by Ada Logics. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Stephan Lipp Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20261020151954.22953-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 6a0eefa1faca1515063cd80d1a261cd171a4bc92 Author: Tianyi Gao Date: Fri Oct 16 22:42:16 2026 +0100 veth: schedule the peer's NAPI after XDP_TX when only GRO is enabled [ Upstream commit f16b8c6a656e62bfa7bb6a3b876f9ccdaf53bd43 ] veth_xdp_xmit() queues XDP_TX frames on the peer's ring if the peer has NAPI. A peer with GRO enabled and no XDP program also has NAPI. veth_xdp_flush() then schedules the peer's NAPI, but only if the peer's xdp_prog is set, so for such a peer the frames are never processed. Nothing else schedules that NAPI by default. Once the ring is full, every XDP_TX frame is dropped, and so are the skbs that veth_xmit() queues on the same ring. Commit 0e672f306a28 ("veth: check for NAPI instead of xdp_prog before xmit of XDP frame") changed the check in veth_xdp_xmit() but not the one in veth_xdp_flush(). Make veth_xdp_flush() check the napi pointer instead of xdp_prog, as veth_xdp_xmit() does. Fixes: 0e672f306a28 ("veth: check for NAPI instead of xdp_prog before xmit of XDP frame") Signed-off-by: Tianyi Gao Reviewed-by: Mohsin Bashir Acked-by: Lorenzo Bianconi Acked-by: Jesper Dangaard Brouer Link: https://patch.msgid.link/20261016214217.16942-2-tianyi@cloudflare.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 600833098a7661573cdfc8f936e26b801392629f Author: Daniel Machon Date: Tue Oct 20 10:57:27 2026 +0200 net: lan969x: don't disable hardirqs in fdma tx clear [ Upstream commit 9770818b8a92fb5fb77725bd5055f165eee3f52e ] lan969x_fdma_tx_clear_buf() runs from the NAPI poll and frees the skbs of completed tx DCBs with napi_consume_skb(), under sparx5->tx_lock. Before this patch, the lock is taken with spin_lock_irqsave(), so the skbs are freed with hardirqs disabled. RX skbs are marked for page_pool recycling, so when such an skb is forwarded back out and its tx completion frees it here, the free path reaches __page_pool_put_page(), which warns via lockdep_assert_no_hardirq(). Take tx_lock with a plain spin_lock(), as the only other tx_lock user, sparx5_port_xmit_impl(), already does. tx_clear_buf() is only called from softirq context, so disabling hardirqs is not needed. Found with lockdep enabled (CONFIG_PROVE_LOCKING), which the assert depends on. Reproduced on lan969x by redirecting received frames out of another port with tc mirred. Fixes: d84ad2c0d80c ("net: lan969x: add FDMA implementation") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261020-lan969x-fdma-tx-clear-irq-v1-1-b9f9d1eda317@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 9ea56000ee0554e010db4960139d906f6941bf80 Author: Daniel Machon Date: Tue Oct 20 10:58:58 2026 +0200 net: sparx5/lan969x: do not clobber the PSFP cycle timer update period [ Upstream commit 5a3dcad8e101ddcd3a886907c8992df54472f749 ] sparx5_psfp_init() enables the periodic stream gate cycle timer update, which keeps the cycle start time of each stream gate within one cycle time of the current time. SG_CT_CLKS sets the update period, in system clock cycles. Before this patch, the update is enabled with a full register write of SG_CT_UPDATE_ENA only, which also sets SG_CT_CLKS to zero. That is below the documented minimum, the number of stream gates (1024 on sparx5 and 256 on lan969x). Write both fields, and set the period to the recommended 10 us, computed from the core clock since it differs per target (6250 cycles at 625 MHz, 3280 at 328 MHz). Found by an AI code review agent, and confirmed on lan969x and sparx5 by reading the register back as 0x80000000. Fixes: e116b19db202 ("net: microchip: sparx5: initialize PSFP") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261020-sparx5-psfp-cycle-timer-v1-1-00f2908f096a@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d09865db5f1ea1000bdd3e43e8ead0449864572c Author: Daniel Machon Date: Tue Oct 20 10:58:35 2026 +0200 net: lan969x: fix DSM calendar for empty taxis [ Upstream commit a031ec9ff5a2e55867430e74e9b497fe844116ba ] lan969x_dsm_calendar_calc() computes the DSM calendar schedule of one taxi. sparx5_config_dsm_calendar() calls it for each taxi, reusing the same sparx5_calendar_data. Before this patch, the schedule is only cleared after the n_devs == 0 early return. For a taxi with no active ports, the function writes SPX5_DSM_CAL_EMPTY only to schedule[0] and leaves the remaining slots at whatever they held before. For the first taxi that is zero from kzalloc(), so sparx5_dsm_cal_len() returns a bogus length and sparx5_dsm_calendar_check() fails, which fails the probe: Port 0: distance 20 above limit 0 A later empty taxi inherits the previous taxi's schedule instead, which passes the check, so only an empty taxi 0 triggers the failure. Clear the full schedule up front on every path, and on the empty path place a single idle marker (SPX5_DSM_CAL_MAX_DEVS_PER_TAXI) in slot 0, so the update step sees a calendar length of one and programs one idle slot into the hardware, matching what sparx5_dsm_calendar_calc() does. Reported by a customer whose DT enables none of the ports in a taxi. Reproduced on lan969x by disabling all taxi 0 ports in the DT. Fixes: 5d2ba3941016 ("net: lan969x: add function for calculating the DSM calendar") Signed-off-by: Daniel Machon Link: https://patch.msgid.link/20261020-lan969x-dsm-empty-taxi-v1-1-14790f1e7430@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit e612e5e046bb5941f532a13ed18b662820736acb Author: Willem de Bruijn Date: Mon Oct 19 23:15:50 2026 -0400 virtio-net: fix frag overflow in big packets receive [ Upstream commit b0e4ea3a0cd42eccad9cc4153afcad555480b9e6 ] In big packets mode with guest GSO, add_recvbuf_big() posts a chain of MAX_SKB_FRAGS + 1 pages. page_to_skb() copies only ETH_HLEN of the first page into the linear area and adds the rest of that page as a frag, then one frag per remaining page. A device that fills the entire buffer therefore causes MAX_SKB_FRAGS + 1 frags, writing one skb_frag_t past the end of skb_shinfo(skb)->frags[]. Post one page less. The buffer still fits a maximal GSO packet. A well behaved device does not trigger this, as GSO packets are at most 64KB. Also check the frag count in page_to_skb() before adding any frag as defense in depth. Fixes: 9ab86bbcf8be ("virtio_net: Defer skb allocation in receive path Date: Wed, 13 Jan 2010 12:53:38 -0800") Signed-off-by: Willem de Bruijn Acked-by: Michael S. Tsirkin Link: https://patch.msgid.link/20261020032108.81879-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 522c7494e7369edd9fbd0a9504b63229b440ed8c Author: Jijie Shao Date: Fri Oct 16 19:04:21 2026 +0800 net: hibmcge: set netdev_ops before hbg_init() to fix NULL pointer dereference [ Upstream commit 9b8ae9aaa1b8e2b6c1cbf5613d3a37923cf53bc5 ] The driver assigns netdev_ops after hbg_init(), but hbg_init() calls hbg_mdio_init() -> hbg_phy_connect() -> phy_connect_direct() -> phy_attach_direct() -> phy_link_topo_add_phy(), which invokes netdev_need_ops_lock(). With CONFIG_NET_SHAPER enabled, this function dereferences dev->netdev_ops->net_shaper_ops. Since netdev_ops is still NULL at this point, a NULL pointer dereference occurs. Move the netdev_ops assignment before hbg_init() so that netdev_need_ops_lock() can safely access netdev_ops during PHY attachment. The issue was hit and verified on an evaluation board. Fixes: ff4edac6e9bd ("net: hibmcge: Implement some .ndo functions") Signed-off-by: Jijie Shao Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20261016110421.2288670-1-shaojijie@huawei.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 9150b7787824c9e1d3435fc9be7ed5ca6a270e2f Author: Eric Joyner Date: Thu Oct 15 16:03:31 2026 -0700 ionic: free port_info when probe fails after the port is set up [ Upstream commit 4e15e0a941ce901d51b5f203713fa90feee9c4d3 ] ionic_probe() allocates the port_info DMA buffer via ionic_setup_one() -> ionic_port_init(). If probe then fails anywhere after that, it unwinds through err_out_pci, which never calls ionic_port_reset(); ionic_dev_teardown() and ionic_clear_pci() do not touch port_info, and so the buffer is leaked. The call was lost when the setup code was moved into ionic_setup_one(). Since ionic_remove() already frees the port_info DMA buffer with ionic_port_reset(), call that on the probe error path too. Every path to err_out_pci runs after ionic_setup_one() succeeded, so the BARs are still mapped and the firmware gets a PORT_RESET before the buffer is freed, the same order as in ionic_remove(). Fixes: 0de38d9f1dba ("ionic: extract common bits from ionic_probe") Signed-off-by: Eric Joyner Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20261015-ionic-port-info-lifetime-v2-2-57232013fd79@amd.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit fff691dbd53867aeb0b3da2da35592f1dbc6b306 Author: Nikhil P. Rao Date: Thu Oct 15 16:03:30 2026 -0700 ionic: fix port_info use-after-free on firmware recovery [ Upstream commit d90d1a768b3b022c52beafb3a4701ee2ee3d2b5e ] ionic_port_init() allocates port_info when the pointer is NULL, but its error path frees it without checking whether this call allocated it. Before commit ddc5911b9bd2 ("ionic: call ionic_port_init after fw-upgrade") the function returned early when the buffer already existed, so the two were symmetric. Since then a failed PORT_INIT on either recovery path - fw_up or reset_done - frees a buffer an earlier init owns, while the netdev is registered and the ethtool ops are reading it. Free only what this call allocated. Fixes: ddc5911b9bd2 ("ionic: call ionic_port_init after fw-upgrade") Signed-off-by: Nikhil P. Rao Signed-off-by: Eric Joyner Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20261015-ionic-port-info-lifetime-v2-1-57232013fd79@amd.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit fe7817d22605c99ee300c80239d80a5c9aa65dea Author: Sivansh Gupta Date: Mon Sep 28 10:59:39 2026 +0530 mailbox: qcom-cpucp: read mbox hardware register using readq() [ Upstream commit 74f1cf02d9fe0fd32ca299cd4d71bc29d3bf2a54 ] Mailbox hardware registers are 64 bit wide, but the interrupt handler currently reads only 32 bits with readl() at offset 0x4 (upper 32 bits). This returns an incorrect value, while reading using readq() returns the expected value. Use readq() to access the 64 bit register and pass the expected value to the mailbox client. Fixes: 0e2a9a03106c ("mailbox: Add support for QTI CPUCP mailbox controller") Signed-off-by: Sivansh Gupta Reviewed-by: Sibi Sankar Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit d51df3303119921f11ea246da2348fc9aea0a272 Author: Ian Rogers Date: Tue Oct 20 13:58:51 2026 -0700 perf lock contention: Filter events before creating lock_stat [ Upstream commit c58d1598e79554cc8f587668ab2ebcaeb616b076 ] In report_lock_contention_begin_event(), lock_stat_findnew() was called before checking filters.nr_types (-Y), filters.nr_addrs (-L), and match_callstack_filter() (-S). When a filtered-out lock event (such as a mutex contention when running with -Y spinlock) shared the same aggregation key as a subsequent matching event (for example, contention on the mutex's internal wait_lock spinlock from the same caller), the first event created the lock_stat entry with the filtered-out lock's flags and the second event reused that entry, causing non-spinlock entries to appear in -Y spinlock output. Check the type, address, and callstack filters before looking up or creating the lock_stat entry. Fixes: b4a7eff93c39f985 ("perf lock contention: Add -Y/--type-filter option") Reviewed-by: Namhyung Kim Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 32a06265833f241b96598694f9168b71ee042628 Author: Hui Su Date: Wed Oct 21 18:12:14 2026 +0900 sched_ext: Reject oversized automatic CID shards [ Upstream commit 651694bc47a15b99e756ebb27f4e6be6d59bf397 ] Automatic topology packing starts a new shard before adding a core when the current shard would exceed its target size. However, a first core is always accepted so that cores remain indivisible. An indivisible core with more than SCX_CID_SHARD_MAX_CPUS CPUs cannot be represented without exceeding the hard shard limit. Per-shard state uses fixed-size inline cmask storage sized for SCX_CID_SHARD_MAX_CPUS. Passing an oversized shard to alloc_pshard() can therefore make cmask initialization overwrite the following fields. Reject an indivisible core larger than SCX_CID_SHARD_MAX_CPUS before adding it to a shard. Existing non-empty shard splitting already keeps the total within the hard cap, while an indivisible core may still exceed cid_shard_size when it fits within the hard limit. Report the oversized core and the hard limit with scx_error() so that the rejection is diagnosable. tj: The bug is only reproducible with artificial VM topologies. It can't happen on real hardware. Fixes: e2c841b91bf9 ("sched_ext: Add CID sharding") Reviewed-by: Andrea Righi Tested-by: Andrea Righi Signed-off-by: Hui Su Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 1fb8f424e4f039495a88a4ded10ced729bd3cb1f Author: Daniel Wagner Date: Wed Oct 14 09:46:43 2026 +0200 nvme-fabrics: clear the poll map if no poll queues are mapped [ Upstream commit 36ede1aa85d5d74c39ed375a906f6eadb15cee5b ] blk_mq_alloc_tag_set sets the nr_queues of every map to nr_hw_queues. When nr_poll_queues is set but no queues are left for polling, nvmf_map_queues skips the poll map and leaves it this way, with all CPUs mapped to hctx 0. The queue then claims poll support, polled I/O ends up on hctx 0, which isn't a poll queue, and hctx 0 is marked as a poll hctx, so even the Connect command of the first I/O queue is marked as polled. Clear the poll map when no poll queues are mapped, so polled I/O is rejected with -EOPNOTSUPP. Fixes: 1a9460cef571 ("nvme-tcp: support simple polling") Fixes: 5651cd3c4336 ("nvme-rdma: fix queue mapping when queue count is limited") Reviewed-by: Hannes Reinecke Tested-by: Maurizio Lombardi Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 63e65f8425f6584a9b28be7a34f66b5032b95254 Author: Daniel Wagner Date: Wed Oct 14 09:46:42 2026 +0200 nvme-fabrics: limit each queue type to the number of online CPUs [ Upstream commit 99fd0cbae84988e0af34784aa18ddd51ae094ade ] nvmf_nr_io_queues limits each queue type to the number of online CPUs when asking for I/O queues, but nvmf_set_io_queues hands out the granted queues without these limits, and only nr_io_queues is clamped when parsing the options. E.g. with 2 CPUs, nr_io_queues=2, nr_write_queues=10 and nr_poll_queues=10, 2 + 2 + 2 = 6 queues are requested, but handed out as 4 default, 2 read and 0 poll queues. blk_mq_map_queues can't create more CPU masks than there are CPUs, so default queues 2 and 3 take over the CPUs of default queues 0 and 1, and connecting the I/O queue of default queue 1 fails with -EXDEV. Apply the same limits in nvmf_set_io_queues. A queue type with more queues than online CPUs always has a hardware context without an online CPU, so no working setup changes. The options are not modified, so the limits follow CPU hotplug on reconnect. Fixes: 6486199378a5 ("nvme-tcp: fix queue mapping when queue count is limited") Fixes: a249d3066de6 ("nvme-fabrics: add queue setup helpers") Reviewed-by: Hannes Reinecke Tested-by: Maurizio Lombardi Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 0402ae823759c4dc695596f00a039dfd078b2e37 Author: Daniel Wagner Date: Wed Oct 14 09:46:41 2026 +0200 nvme-fabrics: reset io_queues before computing the queue mapping [ Upstream commit 9588769af5fc8ac12290d48ce1014a78916681fc ] nvmf_set_io_queues only sets the io_queues entries of the queue types it hands out, but the array is reused on every reconnect. When the controller grants fewer queues on a reconnect, stale entries survive and nvmf_map_queues maps CPUs to hardware contexts that don't exist anymore, which crashes blk_mq_map_swqueue with a NULL pointer dereference. E.g. with nr_io_queues=8, nr_write_queues=8 and nr_poll_queues=8, 24 queues are mapped 8/8/8 (default/read/poll). If the controller grants only 16 queues on the reconnect, the poll map still starts at hardware context 16. Clear the array before computing the new mapping. Fixes: 6486199378a5 ("nvme-tcp: fix queue mapping when queue count is limited") Fixes: 5651cd3c4336 ("nvme-rdma: fix queue mapping when queue count is limited") Reviewed-by: Hannes Reinecke Tested-by: Maurizio Lombardi Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 8cbeae58d1a86a84311a266f6f15918e70f9eeab Author: James Clark Date: Fri Oct 2 12:15:11 2026 +0100 perf cs-etm: Don't add global v0 HW_IDs to unformatted queues [ Upstream commit 31627cfb63ae4af5a233dc6ced04e5172789aa92 ] In the case of mixed formatted and unformatted trace with v0 HW_IDs, or no HW_IDs at all resulting in the cs_etm__map_trace_ids_metadata() fallback, formatted queues will write their HW_IDs to unformatted queues. This will result in an assert because of multiple decoders on an unformatted queue. Fix it by not inserting trace ID nodes on other unformatted queues. This isn't an issue for v0.1 HW_IDs because they aren't global so will only add to their own queue. Fixes: 19c3e4db38c5bf30 ("perf: cs-etm: Create decoders based on the trace ID mappings") Reviewed-by: Leo Yan Signed-off-by: James Clark Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 0b042812528c7c5481ec3d929e9aa9cd78e5c79a Author: Namhyung Kim Date: Thu Oct 15 16:32:37 2026 -0700 perf c2c: Fix memory leaks on output fields [ Upstream commit 7d0fe18bc905a4bf59271e2f7ecc95479caebd7b ] The perf_hpp_list was not freed after use. Let's add it for the main c2c hists list in perf c2c report and a local list in print_pareto(). Previously it was detected by ASAN like below. ================================================================= ==42183==ERROR: LeakSanitizer: detected memory leaks Indirect leak of 1064 byte(s) in 7 object(s) allocated from: #0 0x7f17334ef24f in calloc (/lib64/libasan.so.8+0xef24f) (BuildId: 61e8165ca90f7a4f06b73f064a938c76deaae079) #1 0x0000005fa099 in zalloc ../../lib/zalloc.c:8 #2 0x0000004faf6d in get_format tools/perf/builtin-c2c.c:1978 #3 0x0000004fb45e in c2c_hists__init_output tools/perf/builtin-c2c.c:2004 #4 0x0000004fb7de in __hpp_list__parse tools/perf/builtin-c2c.c:2047 #5 0x0000004fbae9 in hpp_list__parse tools/perf/builtin-c2c.c:2085 #6 0x0000004fee13 in print_pareto tools/perf/builtin-c2c.c:2563 #7 0x0000004ffcd7 in perf_c2c__hists_fprintf tools/perf/builtin-c2c.c:2708 #8 0x000000500ab5 in perf_c2c_display tools/perf/builtin-c2c.c:2949 #9 0x0000005045c3 in perf_c2c__report tools/perf/builtin-c2c.c:3522 #10 0x000000505caa in cmd_c2c tools/perf/builtin-c2c.c:3676 #11 0x0000005df50e in run_builtin tools/perf/perf.c:383 #12 0x0000005df9b1 in handle_internal_command tools/perf/perf.c:436 #13 0x0000005dfd7f in run_argv tools/perf/perf.c:480 #14 0x0000005e02d6 in main tools/perf/perf.c:581 #15 0x7f1729450680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c) #16 0x7f1729450797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c) #17 0x000000409c34 in _start (tools/perf/perf+0x409c34) (BuildId: 36a64600776d92e4ab7dfd5ca20c92280d72a645) SUMMARY: AddressSanitizer: 1064 byte(s) leaked in 7 allocation(s). Fixes: c75540e3160fb586 ("perf c2c report: Add dimension support") Reviewed-by: Aaron Tomlin Reviewed-by: Dmitry Ilvokhin Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit dbe924e5b70fb093dedd732f5b46b27982263599 Author: Lorenzo Bianconi Date: Wed Sep 9 17:28:29 2026 +0200 PCI/pwrctrl: Power off child devices on power-on failure [ Upstream commit b6087ff2b7a4c9f98c78f56f0f357557fc008768 ] pci_pwrctrl_power_on_device() recursively powers on the child nodes of a device before powering on the device itself. If powering on a child fails (e.g. returning -EPROBE_DEFER), the function returned immediately, leaving the sibling children that were already powered on in the same loop iteration enabled. Since probe deferral is a standard boot path, this leads to unbounded regulator and clock enable increments across retries. The error path in pci_pwrctrl_power_on_devices() only powers off the top-level children processed before the failing one and explicitly stops at it, so it can never clean up the siblings leaked deeper in the failed subtree. Power off the sibling children that were successfully powered on before a child fails, and power off all children if the device's own power_on() fails after its children were already enabled. Switch to a manual child iterator so the failing node can be tracked and its reference released in the error path. Fixes: b35cf3b6aa1e ("PCI/pwrctrl: Add APIs to power on/off pwrctrl devices") Signed-off-by: Lorenzo Bianconi Signed-off-by: Bjorn Helgaas Reviewed-by: Bartosz Golaszewski Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260909-pwrtctl-power-on-rallback-v1-1-412ef996ba27@oss.qualcomm.com Signed-off-by: Sasha Levin commit 2f8d4e2f472ff48cd1d6e6b3e70e1975f1f710ae Author: Waldemar Brodkorb Date: Wed Oct 21 02:02:50 2026 +0200 sh: Select BINFMT_FLAT_NO_DATA_START_OFFSET for !MMU [ Upstream commit f45711b39e03ff5e80b60dcc1fd34b3fc7d3d36c ] binfmt_flat offsets the in-memory start of the data segment by MAX_SHARED_LIBS words and then aligns it to FLAT_DATA_ALIGN, so FLAT_FLAG_RAM binaries end up with a gap between text and data (commit 2217b9826246 ("binfmt_flat: revert "binfmt_flat: don't offset the data start"")). SH position-independent code finds the GOT with a PC-relative mova of _GLOBAL_OFFSET_TABLE_, which assumes data follows text directly, as elf2flt lays out the image. With the gap, the GOT register points below the real GOT, so every GOT load reads the neighbouring slot and gets a wrong pointer. On a J2 (sh2eb, no MMU) this made userland crash or hang right after start-up. In my case the data was moved up by 0x20 bytes. Commit 04d82a6d0881 ("binfmt_flat: allow not offsetting data start") added CONFIG_BINFMT_FLAT_NO_DATA_START_OFFSET for architectures that cannot tolerate such a gap; currently only riscv !MMU selects it. Select it on SH as well when building without an MMU. Tested on a J2 board (Numato Mimas V2, sh2eb, no MMU) with Linux 7.3 and FLAT binaries built with elf2flt: with this change the data segment starts exactly at the end of text and init runs. Without the patch bootup fails with: [ 12.080472] Fixing up unaligned userspace access in "init" pid=1 pc=0x(ptrval) ins=0x6583 [ 12.123609] Fixing up unaligned userspace access in "init" pid=1 pc=0x(ptrval) ins=0x6583 [ 12.175153] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 Fixes: 2217b9826246 ("binfmt_flat: revert "binfmt_flat: don't offset the data start"") Signed-off-by: Waldemar Brodkorb Assisted-by: LLM Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: Sasha Levin commit 61281b6c9231bc81e6074d213ee87e1580da9020 Author: Qiliang Yuan Date: Mon Oct 19 14:35:55 2026 +0800 selftests/bpf: Time tc_edt from its first packet with data [ Upstream commit b116ac6087541d3d98031e786adbe9c733cd6df3 ] tc_edt sends 1MB over a TCP connection that a BPF program shapes with EDT, and checks that the rate it measures is within 2% of the target rate. The transfer takes about 200ms, so the margin is about 4ms. The measurement starts before send_recv_data(), which first creates the sender thread and accepts the connection. On a KASAN kernel, x86_64 VM with 32 vCPUs, that takes 0.7ms when idle and up to 4.7ms with all CPUs busy, while the BPF program spreads the data over 200.08ms in the median. The test also fails without test_progs -j where everything runs slower, e.g. on s390x and with ASAN in BPF CI. Have the BPF program note when the first packet with data goes out, and start the measurement there. tc_edt run 100 times on the same VM, idle and with 32 busy loops in the background, before and after this patch: before after idle 0 of 100 failed 0 of 100 failed busy loops 3 of 100 failed 0 of 100 failed Fixes: b0f82e7ab6fb ("selftests/bpf: integrate test_tc_edt into test_progs") Signed-off-by: Qiliang Yuan Signed-off-by: Alexei Starovoitov Reviewed-by: Alexis Lothoré (eBPF Foundation) Link: https://patch.msgid.link/20261019-selftests-bpf-tc-edt-serial-v2-1-41c3813e7916@gmail.com Signed-off-by: Sasha Levin commit 69a01b2f019cc0d65b1260b7b4881f924ff63f55 Author: Nicolás Antinori Date: Mon Oct 19 12:23:15 2026 -0300 rust: i2c: remove TryFrom<&Device> implementation for &I2cClient [ Upstream commit e7755b5f29ccbfd1222dd52dc2d6eebf39d02289 ] Remove the `TryFrom<&device::Device>` implementation for `&I2cClient` since it has had no users since its introduction. Fixes: 57c5bd9aee94 ("rust: i2c: add basic I2C device and driver abstractions") Reported-by: Georgios Androutsopoulos Closes: https://github.com/Rust-for-Linux/linux/issues/1264 Signed-off-by: Nicolás Antinori Signed-off-by: Igor Korotin Signed-off-by: Sasha Levin commit 92456ede23f64e11e444c3d3e6033cf3c6639be6 Author: Marek Szyprowski Date: Wed Oct 21 12:17:45 2026 +0200 ASoC: samsung: midas_wm1811: run FLL1 at the AIF1 configured rate when idle [ Upstream commit d9c23ac1217ab094e6bd9ab95e159ec72c8baca5 ] When the codec is brought up without an active stream, for example because the mixer state restored by alsactl powers up a digital path, midas_start_fll1() sets FLL1 to the default 11.2896MHz rate. The codec's AIF1 however keeps the configuration of the last stream, or its reset default of 48kHz at 256fs before the first stream, which needs a 12.288MHz AIF1 clock. The digital paths then run with AIF1 clocked at a rate not matching its configuration. Remember the FLL1 rate requested by the last hw_params() call, which matches the AIF1 configuration kept in the codec, and use it when no specific rate is requested. Change the default rate used before the first stream to 12.288MHz, matching the codec's default AIF1 configuration. Fixes: fd0ea9cd9698 ("ASoC: samsung: Add sound support for Midas boards") Signed-off-by: Marek Szyprowski Link: https://patch.msgid.link/20261021101750.3297770-5-m.szyprowski@samsung.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5d3f37191bbb98823aa50dc0359216ca49a85c6a Author: Marek Szyprowski Date: Wed Oct 21 12:17:44 2026 +0200 ASoC: wm8994: fix MCLK index used for setting MCLK rate [ Upstream commit 7916b55b100973b5fb5b974e8f7c8ae9f3ac1d2e ] wm8994_set_dai_sysclk() passes the AIF index (dai->id - 1) to wm8994_set_mclk_rate(), which uses it to index the MCLK clocks and their cached rates. As a result, selecting MCLK2 as the AIF1 clock source sets and reads back the rate of MCLK1 instead, and the rate of MCLK1 is then stored as the MCLK2 rate. On the Exynos4412 Trats2 board, where MCLK1 is a fixed 24MHz clock and MCLK2 a 32768Hz clock used when the codec is idle, this gives: wm8994-codec wm8994-codec: AIF1 using MCLK2 at 24000000Hz so the driver assumes a 12MHz SYSCLK while it actually runs at 32kHz. This skips the 128fs AIF clock ratio setup for low SYSCLK rates and makes the mic detection rate configuration use the wrong clock rate. Pass the MCLK index matching the selected clock source instead. Fixes: 419e2f508336 ("ASoC: wm8994: Add support for setting MCLK clock rate") Signed-off-by: Marek Szyprowski Reviewed-by: Charles Keepax Reviewed-by: Sylwester Nawrocki Link: https://patch.msgid.link/20261021101750.3297770-4-m.szyprowski@samsung.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c7b252e6f44033e9a99385f429750bc9003e1b34 Author: Marek Szyprowski Date: Wed Oct 21 12:17:43 2026 +0200 ASoC: wm8994: don't lose the AIF clock ratio when staying at 32kHz SYSCLK [ Upstream commit 693574504051a19383640cfb99524a6b69e4624f ] When SYSCLK drops below 50kHz, the AIFnCLK rate ratio is saved and temporarily lowered to 128fs for accessory detection, then restored once SYSCLK gets fast enough again. The ratio is however saved again on each clock reconfiguration done while SYSCLK is still slow, which overwrites the original ratio with the 128fs one. This happens on the Exynos4412 Trats2 board, which set MCLK2 as SYSCLK twice during the card probe and then configure FLL1 while still running from MCLK2. Once SYSCLK is switched to FLL1, the 128fs ratio is "restored", so AIF1 is left configured for 48kHz at 128fs while being clocked at 256fs. If any digital path is powered up before a stream reconfigures the AIF, the codec raises FIFO error interrupts every 10ms, flooding the kernel log: wm8994-codec wm8994-codec: FIFO error Save the original ratio only when entering the low SYSCLK mode. While at it, move the code duplicated in _wm8994_set_fll() and wm8994_set_dai_sysclk() to a common helper. Fixes: 6730049a4763 ("ASoC: wm8994: Lower AIFnCLK divisor when dropping to 32kHz") Signed-off-by: Marek Szyprowski Reviewed-by: Charles Keepax Reviewed-by: Sylwester Nawrocki Link: https://patch.msgid.link/20261021101750.3297770-3-m.szyprowski@samsung.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e76c605e03ae9903fe6e5f2d5ce135954a00379a Author: Marek Szyprowski Date: Wed Oct 21 12:17:42 2026 +0200 ASoC: wm8994: fix MCLK gating for AIF clocks sourced from MCLK2 [ Upstream commit 872215109fc880de7a03fa30437346f9212649e8 ] aif_mclk_set() masks the AIFnCLK_SRC field of the AIFn clocking register, but compares the result with unshifted field values. The MCLK2 source (0x08) therefore never matches, so MCLK2 is never enabled for an AIF clocked from it, and the AIF relies on other users of that clock to keep it running. On the Exynos4412 Trats2 board, AIF1 and SYSCLK run from MCLK2, the 32768Hz PMIC clock, while the codec is idle. That clock is shared with the WLAN and Bluetooth chips, which enable it only once their drivers are loaded. Until then the codec runs from a stopped clock: FLL1 fails to lock when configured from that state, and the codec floods the kernel log with FIFO error interrupts once a digital path is powered up: wm8994-codec wm8994-codec: Timed out waiting for FLL lock wm8994-codec wm8994-codec: FIFO error Booting with clk_ignore_unused, which keeps that clock running from the bootloader, makes both issues disappear. Fixing just the comparison is not enough. The AIF clock source can be changed while the AIF clock is running, for example the Midas machine driver switches AIF1 between MCLK2 and FLL1 while AIF1CLK is kept enabled for jack detection. Looking up the clock again on disable can then release a different MCLK than the one enabled, leaking the enable count of one clock and underflowing the other. Shift the field value before decoding it, and remember which MCLK has been enabled for each AIF, so that the same clock is released on disable. While at it, report the MCLK number 1-based in the error message. Fixes: 001b83d395ab ("ASoC: wm8994: Add support for MCLKn clock gating") Signed-off-by: Marek Szyprowski Reviewed-by: Charles Keepax Reviewed-by: Sylwester Nawrocki Link: https://patch.msgid.link/20261021101750.3297770-2-m.szyprowski@samsung.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 40ce3ee67f23250b93c524d4fee657e4de4b1295 Author: Ajanesh Lal Date: Thu Oct 22 02:24:53 2026 +1200 ALSA: hda/realtek: Add mute and mic-mute LEDs for HP ENVY 16 (103c:8be5) [ Upstream commit ed7995e4ec3789a90e37eb826bfccf43cc85d2fd ] The HP ENVY Laptop 16-h1xxx (PCI SSID 103c:8be5) uses an ALC245 codec with CS35L41 I2C speaker amplifiers. No LED fixup is applied for this subsystem ID, so the speaker mute LED and the microphone mute LED are never driven and do not follow their keys. Add a fixup that calls the existing ALC245 mute LED COEF helper and the GPIO mic-mute LED helper directly, then chains to the CS35L41 I2C amplifier setup so the speakers keep working. Use it for 103c:8be5. Tested on an HP ENVY Laptop 16-h1xxx running kernel 7.2.11: the hda::mute and hda::micmute LEDs appear and follow their keys, and the speaker amplifiers still bind (CS35L41 Bound in dmesg). The mic LED GPIO pin and polarity are not verified on other hardware. Fixes: aa8e3ef4fe53 ("ALSA: hda/realtek: Add quirks for various HP ENVY models") Assisted-by: Claude:claude-haiku-5-5 Signed-off-by: Ajanesh Lal Link: https://patch.msgid.link/20261021142453.177174-1-ajaneshlal3@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 4d5d90e4234e7ab678c2d908702836daec9c8369 Author: HyeongJun An Date: Wed Oct 21 20:25:54 2026 +0900 selftests: ALSA: pcmtest: Compare all captured bytes in ni_capture [ Upstream commit c8c199e1b1b3bb0ef52a2a02d1ec87bee574ce13 ] The ni_capture test reads rate * time frames into each channel buffer and then compares rate * time bytes. A frame is sample_size bytes per channel, so with S16_LE only the first half of each channel is checked. If the second half is wrong the test still passes. Compare rate * time * sample_size bytes per channel. Fixes: 10b98a4db11a ("selftests: ALSA: Add test for the 'pcmtest' driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/20261021112554.4037107-1-sammiee5311@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 7debb50be9e5c242121b05ec84ba117722b1ffcc Author: Alexandre Cassen Date: Mon Oct 19 15:31:57 2026 +0200 net/mlx5: HWS, fix modify header pool match for copy actions [ Upstream commit d425ec9bb9371d52d492ac4d09f0da6e26561684 ] mlx5_fs_hws_mh_pool_match() compares a single dword of each action since rules pass their values as arguments. Copy and add_field actions keep their destination in the second dword and HWS reads them from the pattern alone. Two modify headers whose copies differ only in destination then share a pool and the second rule writes to the wrong field. Use the HWS core comparison that checks these actions in full. Found while checking a Sashiko AI review report and confirmed against the HWS pattern code. Not reproduced. No in-kernel user puts such actions on the FDB but RDMA flow actions can. Tested for regressions on ConnectX-7 with firmware 28.48.1000 on a little-endian host. Fixes: b36315ca69cb ("net/mlx5: fs, add HWS modify header API function") Signed-off-by: Alexandre Cassen Reviewed-by: Yevgeny Kliteynik Link: https://patch.msgid.link/20261019133159.1742411-3-acassen@corp.free.fr Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit da28b5abef231b52e2f6c5d708f81c4c4f2b4282 Author: Alexandre Cassen Date: Mon Oct 19 15:31:56 2026 +0200 net/mlx5: HWS, fix modify header pattern compare on big-endian [ Upstream commit 7eed173447fba937a19e2f5f2dc79780793f72e7 ] mlx5hws_pat_compare_pattern() casts each __be64 action to __be32 to compare only its control dword. On big-endian this keeps the data dword instead, which HWS clears from the pattern of set and add actions. Two such actions writing the same value into different fields then share a pattern and the second rule modifies the wrong field. Read the first dword of each action from memory instead. Little-endian behavior is unchanged. Discovered by an AI code review agent [1] and confirmed by code inspection. Not reproduced for lack of big-endian hardware running HWS. Tested for regressions on ConnectX-7 with firmware 28.48.1000 on a little-endian host. Fixes: aefc15a0fa1c ("net/mlx5: HWS, added modify header pattern and args handling") Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261010120147.135825-1-acassen%40corp.free.fr [1] Reviewed-by: Simon Horman Signed-off-by: Alexandre Cassen Reviewed-by: Yevgeny Kliteynik Link: https://patch.msgid.link/20261019133159.1742411-2-acassen@corp.free.fr Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit b0bc2e1837bcf1801b431e7efd99da1c584fe771 Author: Anil Kaushik Date: Fri Oct 16 09:32:23 2026 +0000 gtp: hold RCU for the device lookup when adding a PDP context [ Upstream commit fe3e1a42fb7eb18d8c55d714b50a3d51f8cd6ffe ] gtp_genl_new_pdp() calls gtp_find_dev(), which looks the device up with dev_get_by_index_rcu(). Since commit e2d1baca2b33 ("gtp: remove useless rcu_read_lock()"), this only runs under the rtnl lock, and kernels with CONFIG_PROVE_RCU_LIST warn: WARNING: suspicious RCU usage net/core/dev.c:1047 RCU-list traversed in non-reader section!! ... dev_get_by_index_rcu gtp_find_dev gtp_genl_new_pdp Hold the RCU read lock around the lookup only: gtp_pdp_add() allocates with GFP_KERNEL, and the rtnl lock keeps the device alive afterwards. Found with the gtp selftest on a debug kernel. Fixes: e2d1baca2b33 ("gtp: remove useless rcu_read_lock()") Signed-off-by: Anil Kaushik Link: https://patch.msgid.link/20261016093225.1036375-3-anilkaushikwireless@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit d1c91f1611f094618e2e1526a5eb88060909405b Author: Anil Kaushik Date: Fri Oct 16 09:32:22 2026 +0000 gtp: set a valid genl command in PDP context get and dump replies [ Upstream commit 758d8928d2c5d6703da827577cef86d643155236 ] gtp_genl_fill_info() stamps the reply with the command its callers pass in. gtp_genl_get_pdp() and gtp_genl_dump_pdp() pass nlmsg_type, which in a genl message is the dynamically assigned family id rather than a GTP_CMD_* value, so replies to a PDP context get or dump carry a meaningless command number. libgtpnl ignores the command and is unaffected, but parsers that check it (for example the ynl tooling) treat the reply as an unknown command and discard it. Pass GTP_CMD_GETPDP, as gtp_tunnel_notify() already passes a real command on the notification path. No uapi change. Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Anil Kaushik Link: https://patch.msgid.link/20261016093225.1036375-2-anilkaushikwireless@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 9263495f903f26f85cb011abda3072a13cb5bf54 Author: HyeongJun An Date: Tue Oct 20 19:18:37 2026 +0900 selftests: ALSA: pcmtest: Make room for the longest fill pattern [ Upstream commit c338e77291d6b1b6aee6d45b3cc523f97199a011 ] The driver accepts fill patterns of up to 4096 bytes, as pcmtest.rst documents. The test reads each pattern into a 1024-byte buffer, using the length the driver reports. So a pattern longer than 1024 bytes overflows the buffer into the next pattern and past the array. Size the buffer to the driver's maximum. Fixes: 10b98a4db11a ("selftests: ALSA: Add test for the 'pcmtest' driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/7cbbcef84d2c14a2f0ec0ad2ba55c6ba0a15a8d8.1792390197.git.sammiee5311@gmail.com Signed-off-by: Sasha Levin commit 3c470249f35a3f4b9667fcd7e2886fd712ffca09 Author: HyeongJun An Date: Tue Oct 20 19:18:36 2026 +0900 selftests: ALSA: pcmtest: Check the frame count of each transfer [ Upstream commit 317f2ddb6662fca8954e381a1bc632667872c4a3 ] The tests keep the result of snd_pcm_writei(), snd_pcm_readi() and their non-interleaved forms in a size_t. A size_t is never negative, so ASSERT_GE(res, 0) always passes. The capture tests still catch a failed read when they compare the data. But the playback tests do not. The driver sets pc_test to 1 when it saw no corrupted data, and that is also true when it saw no data at all. So a playback test passes even when every write fails. Store the result as snd_pcm_sframes_t and check that the whole request was transferred. The calls block, so a short count means an error. Fixes: 10b98a4db11a ("selftests: ALSA: Add test for the 'pcmtest' driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/6f16e2a01f18c0ea069164bab31999182ff6d49e.1792390197.git.sammiee5311@gmail.com Signed-off-by: Sasha Levin commit 60ee8c182392ea8c0c0a3dfe2d71dd9bf49feb9f Author: Takashi Iwai Date: Wed Oct 21 08:39:55 2026 +0200 platform/x86: ibm_rtl: Fix potential OOB read at signature search [ Upstream commit f1d81af2521ad504a20481fef12c358d26e6c3a6 ] The loop for signature search fetches 22 bytes of struct ibm_rtl_table at each check, while the loop count is calculated in 4 bytes unit, which means that, at the last entry, it fetches over the limit. Rewrite the loop to use the byte offset and correct the boundary condition check for avoiding the potential OOB access. Fixes: 15dd100349b8 ("platform/x86: ibm_rtl: fix EBDA signature search pointer arithmetic") Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261021064012.457870-1-tiwai@suse.de Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit eb8006acfe98f7fb78cc44e64c43ddbb4b81a641 Author: Jiale Yao Date: Sun Oct 18 11:46:16 2026 +0800 mshv_vtl: initialize poll file mutex before device registration [ Upstream commit 60de22022fe0cb37bdec608d60d53292050903d5 ] mshv_vtl_init() registers /dev/mshv before initializing the poll file mutex. A concurrent MSHV_SET_POLL_FILE ioctl can therefore attempt to lock an uninitialized mutex while module initialization is still in progress. Initialize the file-scope mutex statically so it is ready before the misc device becomes visible. Fixes: 7bfe3b8ea6e3 ("Drivers: hv: Introduce mshv_vtl driver") Signed-off-by: Jiale Yao Reviewed-by: Naman Jain Signed-off-by: Wei Liu Signed-off-by: Sasha Levin commit 6e43f5959c4f6967eeb61369d44efcaa8d10e249 Author: Shradha Gupta Date: Fri Oct 9 03:22:46 2026 -0700 Drivers: hv: Run VMBus kexec cleanup from syscore shutdown [ Upstream commit 228e21764b389a71a05af6a356efa1bad0751b5e ] ARM64 Hyper-V guests do not run the VMBus kexec cleanup before secondary CPUs are stopped. Consequently, the old VMBus connection and SynIC state remain active when the kexec kernel starts. Run the VMBus kexec handler from the existing VMBus syscore shutdown callback. syscore_shutdown() runs after device shutdown and before machine shutdown, while all CPUs needed by the SynIC CPU hotplug teardown are still available. Guard the callback with kexec_is_in_progress() so normal restart, halt, and poweroff paths are unchanged. Use the same path on x86 and remove the architecture-specific handler pointer and the weak setup/remove interfaces. VMBus teardown now precedes hv_stimer_global_cleanup() on x86. The new x86 ordering relies on commit be0cfab740e5 ("clocksource: hyper-v: Remove support for stimer interrupts in message mode"), which removed the synthetic timer's dependency on VMBus message delivery. Older kernels that retain message-mode stimer interrupts must preserve the existing x86 ordering and therefore require an ARM64-specific backport. Document the VMBus cleanup path and its position in shutdown ordering. Fixes: 9bbb888824e3 ("arm64: hyperv: Initialize hypervisor on boot") Link: https://lore.kernel.org/all/20260814093133.3191250-1-shradhagupta@linux.microsoft.com/ Suggested-by: Catalin Marinas Suggested-by: Michael Kelley Signed-off-by: Shradha Gupta Reviewed-by: Michael Kelley Reviewed-by: Bradley Morgan Reviewed-by: Naman Jain Signed-off-by: Wei Liu Signed-off-by: Sasha Levin commit bd89099ea48eee27b63ed26ae7104fb5016550a9 Author: Shradha Gupta Date: Fri Oct 9 03:22:32 2026 -0700 kexec: Add helper to report an active kexec reboot [ Upstream commit 14c73a2b061e494ab6da346ab075b14f2a4b2d06 ] A shutdown callback in a loadable module may need to distinguish a kexec reboot from a normal restart, halt, or poweroff. The Hyper-V VMBus driver needs this distinction when moving its kexec cleanup into a common syscore shutdown callback. Add kexec_is_in_progress() and export it to GPL modules so the callback can remain guarded when VMBus is built as a module. Provide a false inline implementation when CONFIG_KEXEC_CORE is disabled. The helper reports only the normal kexec reboot path. Crash kexec and preserve-context kexec do not set this state. Signed-off-by: Shradha Gupta Acked-by: Mike Rapoport (Microsoft) Reviewed-by: Michael Kelley Reviewed-by: Bradley Morgan Reviewed-by: Naman Jain Signed-off-by: Wei Liu Stable-dep-of: 228e21764b38 ("Drivers: hv: Run VMBus kexec cleanup from syscore shutdown") Signed-off-by: Sasha Levin commit 7c361effa870b995e58f569006592350332d2cdd Author: Jiale Yao Date: Sat Oct 17 14:43:13 2026 +0800 Drivers: hv: vmbus: Check ACPI companion before use [ Upstream commit dd57772e36f72f8d9a53d7fa4d90c974d8ebbcff ] Platform drivers can be forced to bind to devices outside their match tables through driver_override. vmbus_acpi_add() assumes that every bound device has an ACPI companion and dereferences it without checking. Return -ENODEV when the companion is absent to avoid a NULL pointer dereference. Signed-off-by: Jiale Yao Fixes: 9c8434238041 ("Drivers: hv: vmbus: Convert acpi_device to more generic platform_device") Reviewed-by: Naman Jain Signed-off-by: Wei Liu Signed-off-by: Sasha Levin commit be4b155f78ff4d948c5ace037a8ed7d3b7db34f7 Author: Sasha Levin Date: Mon Oct 12 07:53:29 2026 -0400 selftests/proc: proc-pid-vm: fix unused variable warning on non-x86 [ Upstream commit c4d9005e7e1ee6ce277f47cf53d44fc5b90b287b ] g_vsyscall is only used by the x86_64 test, so clang builds for other architectures get: proc-pid-vm.c:224:21: warning: unused variable 'g_vsyscall' [-Wunused-variable] The vsyscall strings next to it had the same problem and were marked __maybe_unused for it. Move all of the vsyscall variables into the __x86_64__ block that uses them instead, and drop those annotations along with the local __maybe_unused fallback that was added for them. Link: https://lore.kernel.org/20261012115330.3777115-1-sashal@kernel.org Fixes: 17415606f9d8 ("tools/testing/selftests/proc/proc-pid-vm.c: test with vsyscall in mind") Signed-off-by: Sasha Levin Signed-off-by: Andrew Morton Suggested-by: Andrew Morton Assisted-by: LLM Cc: Shuah Khan Cc: Alexey Dobriyan Signed-off-by: Sasha Levin commit 4a4d57f94d5112b3bf1e373caee8cf1042c4c118 Author: Cen Zhang Date: Fri Oct 9 09:43:43 2026 +0800 ocfs2: initialize status waiters before publishing them [ Upstream commit f6bfa6c458288d72948af95391b205f3eb775721 ] o2net_prep_nsw() publishes its stack waiter in nn_status_idr and nn_status_list under nn_lock, then initializes the wait queue and completion status after releasing the lock. A concurrent disconnect can find that waiter through o2net_complete_nodes_nsw() and call wake_up() before the wait queue has a valid lock and list head. The sender can also overwrite a completion status with its initial value. Initialize the wait queue and status before publishing the waiter. nn_lock then orders publication against completion, and no reader can observe a partially initialized object. Leave the IDR allocation and its failure handling unchanged. A controlled case-modified test kernel used a synthetic connection to enter the real send path and overlap publication with disconnect. The candidate completion and wake-up code were unchanged. Its Oops includes: KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:__wake_up_common+0xa0/0x1f0 Call Trace: __wake_up+0x36/0x60 o2net_complete_nsw_locked+0x222/0x370 o2net_set_nn_state+0x917/0xea0 o2net_disconnect_node+0xd0/0x190 o2net_validate_control_write+0x454/0x500 full_proxy_write+0x11f/0x180 vfs_write+0x25a/0x1010 ksys_write+0x111/0x200 do_syscall_64+0x114/0x620 entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: Link: https://lore.kernel.org/pm-ocfs2-objects-candidate-0066-v1-437a0422801b292a2879@gmail.com Fixes: 98211489d414 ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem") Signed-off-by: Cen Zhang Signed-off-by: Andrew Morton Reviewed-by: Joseph Qi Assisted-by: LLM Cc: Mark Fasheh Cc: Joel Becker Cc: Kees Cook Cc: Jakub Kicinski Cc: Kurt Hackel Cc: Jia-Ju Bai Cc: Signed-off-by: Sasha Levin commit 34b104a11a4f82e86189c528304e164aca389856 Author: Joseph Qi Date: Sat Oct 10 19:34:54 2026 +0800 ocfs2: reserve xattr value tree metadata only once [ Upstream commit 5365f1f417b36627f825aacf9844ae24b671b525 ] ocfs2_calc_xattr_set_need() asks for the new value's extent tree twice when it replaces an inline value smaller than a value root with one large enough to be stored outside. The "stored outside" branch reserves the tree and then falls through to meta_guess instead of going out: if (!ocfs2_xattr_is_local(xe)) { ... xv = (struct ocfs2_xattr_value_root *) (base + name_offset + name_len); value_size = OCFS2_XATTR_ROOT_SIZE; } else xv = &def_xv.xv; if (old_clusters >= new_clusters) { ... goto out; } else { meta_add += ocfs2_extend_meta_needed(&xv->xr_list); ... if (value_size >= OCFS2_XATTR_ROOT_SIZE) goto out; } On the fall-through xv is def_xv, so what gets added here is the two blocks ocfs2_extend_meta_needed() wants for an empty value root -- and both sides of meta_guess reserve that same tree again. The create side has done so since commit 3ed2be719eb9 ("ocfs2: allow for more than one data extent when creating xattr"), which ported this reservation to the create case without noticing it was already on the way in, and the existing-block side since commit 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs"). Both were chasing the same RESTART_META failure in ocfs2_xattr_extend_allocation(), for xattr create and then for xattr update. ocfs2_init_xattr_set_ctxt() hands the total straight to ocfs2_reserve_new_metadata_blocks(), so the surplus is two blocks held for the whole transaction. A setxattr that would otherwise fit can come back -ENOSPC on a filesystem whose metadata allocator is nearly exhausted. Move the reservation into the branch that stops there, leaving meta_guess as the only place that reserves for a value tree the fall through is about to create. The paths that do go out keep reserving against the value root they already have, which for an external old value is the on-disk one and so can legitimately ask for more than two blocks. Both sides of meta_guess have to come out even on their own now that the copy covering for them is gone. The existing-block side only started reserving the value tree in the commit this one is tagged against. The create side has reserved the tree since 3ed2be719eb9, but only the tree: the block ocfs2_create_xattr_block() claims came out of the same two, and on the fall-through it was the duplicate removed here that made up the difference. So "ocfs2: reserve metadata for a new xattr block and its value tree" has to land first -- without it the create side reserves 2 where 3 are needed and the value tree is back to RESTART_META. That one fixes a shortfall of its own on the path that reaches meta_guess directly, where there was never a duplicate to cover it, so it is worth taking alone; this patch is not. Link: https://lore.kernel.org/20261010113454.1420939-4-joseph.qi@linux.alibaba.com Fixes: 0cdc7dde00ec ("ocfs2: fix missing metadata reservation for large xattrs") Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Cc: Heming Zhao Cc: Mark Fasheh Cc: Joel Becker Signed-off-by: Sasha Levin commit 43ebf38c78453cf6b9b6c9e6f93e8c3d5ae6c483 Author: Dmitry Antipov Date: Mon Oct 19 11:22:14 2026 +0300 tcp_bpf: propagate error code in tcp_bpf_sendmsg() [ Upstream commit 82e31923c0553fdbfcddcd910ca07952880ca9b9 ] In tcp_bpf_sendmsg(), the value returned by sk_msg_memcopy_from_iter() is checked for error but not propagated to 'out_err' label, so error handling may not work as expected. Fix this by assigning error value to 'err', thus making sure that error won't be silently ignored. Reported-by: Sashiko Fixes: 5153a75ef34b ("tcp_bpf: Fix copied value in tcp_bpf_sendmsg") Signed-off-by: Dmitry Antipov Reviewed-by: Kuniyuki Iwashima Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20261019082214.102398-1-dmantipov@yandex.ru Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 7499fcbf69dfc5470404d581b1eea66902545e30 Author: Carolina Jubran Date: Mon Oct 19 20:41:52 2026 +0300 net: skbuff: don't copy alloc_cpu in skb header copies [ Upstream commit 78d4bd22ec9df490135303c00e190ac43d5c334a ] Commit 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists") added alloc_cpu to struct sk_buff and placed it in the headers group copied by __copy_skb_header(). This is wrong for newly allocated skbs. For example, skb_segment() allocates a new skb and records the current CPU in alloc_cpu, but __copy_skb_header() overwrites it with the value from the original skb. If the original skb was allocated on another CPU, the segment may later be treated as remotely allocated and unnecessarily deferred there when it is freed. Move alloc_cpu out of the headers group so it is preserved across header copies. Copy it explicitly in skb_clone(), which allocates the skb object directly instead of going through __alloc_skb(). This was discovered while investigating a throughput regression with software IPsec. The load used 512 IPsec tunnels carrying traffic over VXLAN, with 512 parallel iperf3 flows and an MTU of 4500. Before the fix: 16.09% queued_spin_lock_slowpath | --15.90%--_raw_spin_lock_irqsave | --9.37%--__slab_free kfree skb_release_data napi_consume_skb mlx5e_poll_tx_cq After the fix: 6.84% queued_spin_lock_slowpath | --6.57%--_raw_spin_lock_irqsave | --5.00%--__slab_free kfree skb_release_data napi_consume_skb mlx5e_poll_tx_cq Fixes: 68822bdf76f1 ("net: generalize skb freeing deferral to per-cpu lists") Signed-off-by: Carolina Jubran Reviewed-by: Dragos Tatulea Reviewed-by: Björn Töpel Reviewed-by: Jason Xing Reviewed-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20261019174152.2932829-1-cjubran@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit c114b21a0a6d80af6b0473517efce35164f68990 Author: Carlo Szelinsky Date: Tue Oct 20 19:11:32 2026 +0200 net: pse-pd: si3474: fix use-after-free in ancillary client error path [ Upstream commit 70c29b35fd87f87a7b8dad6eb8d55ce54a0d549a ] If devm_add_action_or_reset() fails, it has already unregistered the ancillary I2C client, and the error message then reads that client's device. It can only fail with -ENOMEM, which is already reported, so drop the message. Found by code inspection. Not reproduced. Fixes: a2317231df4b ("net: pse-pd: Add Si3474 PSE controller driver") Reviewed-by: Kory Maincent Signed-off-by: Carlo Szelinsky Link: https://patch.msgid.link/20261020171134.852878-2-github@szelinsky.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d1d370f35b5e2dec339c6b5224cc7323bb4aac5e Author: Michail Andreas Michalopoulos Date: Tue Oct 20 21:03:51 2026 +0200 ksmbd: reject FILE_ATTRIBUTE_TEMPORARY on directories [ Upstream commit 8323aab48525b83f750e712f66e6e9387b550cf4 ] Setting FILE_ATTRIBUTE_TEMPORARY on a directory with SMB2 SET_INFO (FileBasicInformation) succeeds: ksmbd keeps the attribute and, with "store dos attributes" enabled, also writes it to the DOS attribute xattr. MS-FSA (FileBasicInformation) says the request must fail with STATUS_INVALID_PARAMETER when FILE_ATTRIBUTE_TEMPORARY is set on a directory, and Samba rejects it too. smbtorture's smb2.create.dosattr_tmp_dir checks this and fails against ksmbd. Return -EINVAL, which is sent as STATUS_INVALID_PARAMETER, when a directory is asked to become TEMPORARY. Do the check before any timestamp is changed, so a rejected request leaves the open file and the inode unchanged. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Assisted-by: LLM Signed-off-by: Michail Andreas Michalopoulos Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 7087474b2e2869ce75a2758c349f83fa3d039624 Author: Mohammed Alquraini Date: Tue Oct 20 20:30:00 2026 +0300 ksmbd: reject foreign RPC pipe handles on IPC$ read and write [ Upstream commit da25995071e5e0f3aa9a41160b00b2f833127b3e ] RPC pipe handles on IPC$ are allocated from a single server-global IDA, and ksmbd.mountd looks a pipe up by handle alone, with no session information. smb2_read_pipe() and smb2_write_pipe() take the handle straight from the client request (VolatileFileId) and pass it to the daemon without checking that the requesting session opened it. An authenticated user can therefore issue an SMB2 READ or WRITE on IPC$ with another session's handle and receive that session's in-flight DCERPC response, or write attacker-chosen bytes into its pipe stream. A tree connect to IPC$, which every RPC client already has, is the only requirement. Validate ownership before the transfer, the way the sibling pipe paths already do: under sess->rpc_lock, ksmbd_session_rpc_method() returns 0 for a handle the session did not open. smb2_get_info_file_pipe() and the FSCTL_PIPE_TRANSCEIVE ioctl already reject such handles; read and write were the remaining gap. Reject them with STATUS_FILE_CLOSED, as the ioctl path does. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Assisted-by: LLM Signed-off-by: Mohammed Alquraini Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 7ec499897018d15f4f845491aee227adca9d0452 Author: Namjae Jeon Date: Tue Oct 20 10:19:19 2026 +0900 ksmbd: fix fd_limit accounting across durable reconnects [ Upstream commit df5c868f6b80ca16c171cfac5e4e6c9be83ba4c2 ] A disconnected durable handle keeps its ksmbd_file and the fd_limit reservation taken at its initial open. Reconnecting allocates another volatile ID and takes another reservation for the same file. Final close returns only one reservation, so repeated reconnects permanently reduce the server-wide open-file budget. Move reservation into ksmbd_open_fd() and release it on every creation failure. Keep the reservation until final close, including while a durable handle is disconnected. Make ID allocation independent of fd_limit so reconnects neither consume nor return slots. This also avoids returning an unreserved slot when persistent ID allocation fails. New opens continue to return -EMFILE when the budget is exhausted, keeping the existing STATUS_INSUFFICIENT_RESOURCES mapping. Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2") Reported-by: Mohammed Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit f964b753f938cc6dd15efb62cc8c4ea0316f2f45 Author: DaeMyung Kang Date: Sat Oct 17 12:40:51 2026 +0900 ksmbd: round SetAllocation to the advertised allocation unit [ Upstream commit aad7d86a6651efefb2c0a4f02c86dfeff3c176a2 ] SetAllocation rounds requests to 512-byte blocks, although FS_SIZE_INFORMATION advertises the filesystem's f_bsize as its allocation unit. For example, on a filesystem with a 4 KiB unit, a 1000-byte request can truncate an 8 KiB file to 1024 bytes instead of 4 KiB. Round the request to the advertised unit and use the same result for the block-count decision, fallocate, truncate, and the size stored on the open handle. Validate the unit and rounded size before either operation. Use DIV_ROUND_UP_ULL() so the calculation works on 32-bit kernels. This does not change the existing block-count decision for whether to call fallocate. In particular, success does not yet guarantee reservation of holes within the requested range on a sparse file. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: DaeMyung Kang Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 477cb2b01949ebd18ce507a54e5d534522f50f6f Author: Namjae Jeon Date: Sun Oct 18 00:00:00 2026 +0900 ksmbd: inherit FileIds in related compound requests [ Upstream commit 318cd7461a7facb9cd5f7a5d1580fd874440e035 ] MS-SMB2 specifies that subsequent related operations use the FileId from the preceding operation. Track FileIds from handle-bearing requests so related requests that use the all-ones placeholder resolve to the inherited handle. Return STATUS_INVALID_HANDLE when a related request refers to a FileId but the preceding operation neither contained nor generated one. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Reported-by: Ronnie Sahlberg Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit ec37b45a4e980db7b8e11dbd16d6d1daf30dba6b Author: Namjae Jeon Date: Mon Oct 5 11:20:33 2026 +0900 ksmbd: keep lease tables until their last lease is closed [ Upstream commit 20e3068315423e6e493588dd94d462c8e7fd3a2e ] Disconnecting one channel destroys the lease table for its ClientGuid, even when another channel still uses the same opens. A lease break ACK on the surviving channel can no longer find the lease. Detached durable opens also lose their lease lookup entries before reconnect or expiry. Tie a client table to its lease entries instead of the connection which created it. Remove the table when its last lease is removed, and release any remaining entries at server shutdown. Do not destroy client tables from connection teardown or keep a connection reference in each table. For a detached lease, collect break candidates using the table's ClientGuid directly. The existing notification retry path takes its own references on matching live connections. Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers") Reported-by: Pan Guihua Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 1f53d5fc06bd34f1debc5bc31337a267e76c8a5e Author: Stefan Metzmacher Date: Fri Oct 9 12:28:27 2026 +0200 smb: smbdirect: don't WARN on an unexpected receive opcode [ Upstream commit e8592dec2e935befe842f90f4044d210f59c4d30 ] The receive completion handlers smbdirect_connection_recv_io_done(), smbdirect_accept_negotiate_recv_done() and smbdirect_connect_negotiate_recv_done() verify that the completion is a regular receive with WARN_ON_ONCE(wc->opcode != IB_WC_RECV). But wc->opcode is controlled by the remote peer: a posted receive work request is consumed not only by an incoming SEND, but also by an RDMA Write with Immediate, which completes as IB_WC_RECV_RDMA_WITH_IMM. An unauthenticated peer can transmit such a message, even before the negotiate completes, so it reaches the accept/connect negotiate handlers as well. With panic_on_warn set this is a remote denial of service, and otherwise it still taints the kernel and spams the log for something a peer can trigger at will. The opcode check itself was inherited from the original client and server recv_done() handlers (fs/smb/client/smbdirect.c and fs/smb/server/transport_rdma.c), where an unexpected opcode was simply logged and the connection was torn down. Only the WARN_ON_ONCE() was added on top during the socketization rework. Drop the WARN_ON_ONCE() and keep the existing graceful error path, which logs the unexpected opcode (unless the status is IB_WC_WR_FLUSH_ERR) and tears the connection down. Fixes: ea4151222a93 ("smb: smbdirect: introduce smbdirect_connection_recv_io_done()") Fixes: eb3ed1e9048c ("smb: smbdirect: introduce smbdirect_accept_connect_request()") Fixes: d1f187656797 ("smb: smbdirect: introduce smbdirect_connect[_sync]()") Reported-by: Sashiko Closes: https://sashiko.dev/#/bug/linux-5341a0c0-7b00-4eef-915c-91e099649d3e Cc: Namjae Jeon Cc: Paulo Alcantara Cc: Tom Talpey Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Stefan Metzmacher Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit c01c6196922d6aa436c0f1c642662df9bb004edf Author: Namjae Jeon Date: Sun Oct 4 09:58:56 2026 +0900 ksmbd: fix durable reconnects for root shares [ Upstream commit 25e36df831a47597c03c6239fbc71285e7d714c2 ] When a share exports "/", ksmbd_validate_name_reconnect() expects another slash after the share path. For a file at /foo, this rejects the valid reconnect name "foo" even though the file is in the share. Compare the requested name with the rendered file path after its leading slash when the resolved share root is "/". Keep the exact-root/empty-name check and reject rendered paths without an initial slash. Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2") Reported-by: Dairui Zhang Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit f3a8374d7844c07cfa6134413aa5499a09b02808 Author: Namjae Jeon Date: Sun Oct 4 09:58:34 2026 +0900 ksmbd: cache the resolved share path for durable reconnects [ Upstream commit 2a90ba573d41efa82e075ba9ac532bb3ec0519c4 ] A share configured as /a/link/b, with /a/link pointing to /real, is opened relative to share->vfs_path at /real/b. However, ksmbd_validate_name_reconnect() compares the file's d_path() result against the original /a/link/b string and rejects a valid reconnect. Render share->vfs_path with d_path() after the existing kern_path() lookup and cache a copy in real_path along with its length. Use the resolved string for durable reconnect name validation. Keep path and path_sz as the configured spelling for existing consumers, including the volume serial calculation and path lookups. Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2") Reported-by: Dairui Zhang Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit e65ce91a6ba957dc5951f2c3761a22fcf43a54aa Author: Namjae Jeon Date: Wed Sep 30 07:37:38 2026 +0900 ksmbd: disconnect on invalid encryption transform flags [ Upstream commit 0882f124ae329eefb66b00e63b9043f24c006b0e ] MS-SMB2 3.3.5.2.1.1 requires the Flags/EncryptionAlgorithm field in an SMB2 transform header to be 0x0001. The server must disconnect the connection when it has any other value. smb3_decrypt_req() currently ignores this field. A client with the session key can therefore send a correctly authenticated encrypted request with invalid flags and have it processed. Check the field before looking up the session key or decrypting the request. The caller aborts the connection when this check fails. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 243a1dbe3fffa53fa126a906b6f6a001ec26f5b1 Author: ChenXiaoSong Date: Tue Sep 15 06:46:55 2026 +0000 smb/server: fix trailing period in generated short names [ Upstream commit e8486c5cfbdd07811afa4196060bafbf78ccdae2 ] Reproducer: 1. touch /mnt/file 2. smbinfo filealternatenameinfo /mnt/file Alternate Name: FILE~9!. See MS-FSCC 2.1.5.2.1. The base filename MUST be 1-8 characters in length and MUST NOT contain a "." period character. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: ChenXiaoSong Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit ed7ea0aca4b4621cd75396250f3b566c2cb8b52a Author: Gael Blivet Date: Mon Sep 14 01:26:38 2026 +0200 ksmbd: print IPv6 client addresses correctly in procfs [ Upstream commit cf0ef575a56993147f087d3f251fc2a04fdffbeb ] conn->inet_addr and conn->inet6_addr share a union, and three procfs printers choose between them by testing whether inet_addr is zero. For an IPv6 peer that field aliases the first four bytes of the address, which are zero only for :: prefixed addresses, so a client with a global IPv6 address takes the IPv4 branch and is listed from those four bytes. A client at 2001:db8::1 is listed as 32.1.13.184. IPv4 mapped addresses begin with zero bytes, so the listing is correct until a native IPv6 client connects. Record the address family where the address is stored and select on that, in the client listing and in both session listings. Fixes: fe4dc5987d7d ("ksmbd: expose connection runtime state in procfs") Signed-off-by: Gael Blivet Assisted-by: Claude:claude-opus-5 Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 75d301b2301caba641056852386d866c3402ae91 Author: Gael Blivet Date: Mon Sep 14 01:26:37 2026 +0200 ksmbd: fix AFP_AfpInfo header fields in synthesized xattr [ Upstream commit d3ef5ae55a16d4b31859e7feadbb50a0cd38dfcc ] smb2_set_stream_name_xattr() synthesizes a 60-byte AFP_AfpInfo xattr when a client opens a nonexistent one on a Time Machine share, so the probe is answered instead of failing with -EBADF. Its header does not match what clients write: ksmbd uses 0x00051607 and 0x00020000 for the first two fields and leaves the third zero. The user.DosStream.AFP_AfpInfo:$DATA xattr a macOS client writes begins: 00000000: 4146 5000 0000 0100 0000 0000 0000 0080 AFP............. Write those sixteen bytes: the signature, the version at offset 4 and the backup time at offset 12. The 60-byte length is already correct and the rest stays zeroed: a zero type and creator lets the client use the file extension for icon and type detection. Fixes: eaff8e924f60 ("ksmbd: synthesize empty AFP_AfpInfo xattr on first probe") Signed-off-by: Gael Blivet Assisted-by: Claude:claude-opus-5 Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit ec8ded44bbe300c8c6e40f23b0e6a0bd0f3d1933 Author: Henry Hu Date: Sat Sep 12 00:35:16 2026 +0800 ksmbd: report IPv4 and IPv6 addresses independently in iface query [ Upstream commit bb0326a5806015fb7e5a6a721a50ff172c92c6e4 ] fsctl_query_iface_info_ioctl() appends an entry before checking that a usable address was found, so it advertises unspecified-address placeholders: an entry containing 0.0.0.0 when an in_device exists but has no primary IPv4 address, and an entry containing :: when an inet6_dev exists but its address list is empty or every address is tentative or deprecated. The loop also couples IPv6 reporting to IPv4 success: when __in_dev_get_rtnl() returns NULL it continues to the next interface, skipping the IPv6 pass, so an interface without an in_device is dropped even if it has a usable IPv6 address. Query IPv4 and IPv6 independently and append an entry only when an address is found. Factor out the common entry initialization and query the link speed once per interface instead of once per address family. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260910090818.24479-1-15815827059%40163.com Assisted-by: Codex:gpt-5.6-sol Signed-off-by: Henry Hu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit df3f71e61b9d36cf49453918f909274d712a6313 Author: Henry Hu Date: Sat Sep 12 00:35:15 2026 +0800 ksmbd: fix invalid Next offset in interface info replies [ Upstream commit 2c50a4a5e75db55880eca43c035649cb51fcb52a ] fsctl_query_iface_info_ioctl() assigns nii_rsp to the next output slot before checking whether the interface has an in_device or inet6_dev. If either lookup returns NULL, the loop continues without advancing nbytes, leaving nii_rsp pointing at an uncommitted slot. If no later entry is committed, clearing nii_rsp->Next updates that slot instead of the last returned entry, leaving the latter with a nonzero Next offset. Fix this by using nbytes to locate the last committed entry and clear its Next field, but only when the response contains at least one entry. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260910090818.24479-1-15815827059%40163.com Signed-off-by: Henry Hu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 31133a5420e6faed6714c75ebe43950d752447e6 Author: Henry Hu Date: Sat Sep 12 00:35:14 2026 +0800 ksmbd: fix unlocked IPv6 addr_list walk in fsctl_query_iface_info_ioctl() [ Upstream commit a63bb4d91c784f63ad7c063717dff7920d8445be ] fsctl_query_iface_info_ioctl() walks idev6->addr_list with a plain list_for_each_entry() while holding only rtnl_lock(). rtnl does not serialize all writers of this list: the DAD-failure path (addrconf_dad_failure -> ipv6_add_addr) can insert addresses without holding RTNL. It updates idev->addr_list with list_add_tail_rcu() under write_lock_bh(&idev->lock), so it can race with the unlocked walk. addr_list is RCU managed, so walk it with list_for_each_entry_rcu() under rcu_read_lock(), matching the other lockless readers of the list. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260910090818.24479-1-15815827059%40163.com Co-developed-by: Xuanqiang Luo Signed-off-by: Xuanqiang Luo Signed-off-by: Henry Hu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 9acc5061317753d5b7700f2806ad5913963b6733 Author: Henry Hu Date: Sat Sep 12 00:35:13 2026 +0800 ksmbd: fix link speed query in fsctl_query_iface_info_ioctl() [ Upstream commit 2bc1d25fc8597fa6cbf6b1ff92653881939a6436 ] fsctl_query_iface_info_ioctl() used to call netdev->ethtool_ops->get_link_ksettings() directly and never checked the return value. If the callback fails, cmd.base.speed may be left uninitialized. Also, SPEED_UNKNOWN (-1) is treated as a numeric link speed and would be converted into a bogus link speed. Use __ethtool_get_link_ksettings() to acquire the per-netdev ops lock when needed. Fall back to 1Gbps when the query fails, or when the reported speed is 0 or SPEED_UNKNOWN. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Signed-off-by: Henry Hu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 590fb6597864980fdaf27436d0bf94dae18a69bb Author: Henry Hu Date: Tue Sep 15 22:08:34 2026 +0800 ksmbd: fix iface_list use-after-free during server reset [ Upstream commit d34d38ab0c62fe4eb9e746420c554e6d0e6f54db ] ksmbd_find_netdev_name_iface_list() walks iface_list for fsctl_query_iface_info_ioctl(), which holds RTNL. But during server reset, ksmbd_tcp_destroy() unlinks and frees the entries without RTNL, and queued SMB requests can still be running at that point. So an FSCTL_QUERY_NETWORK_INTERFACE_INFO request can therefore race with interface destruction and dereference a freed entry. With debug-only instrumentation to make the race deterministic, KASAN reports: BUG: KASAN: slab-use-after-free in ksmbd_find_netdev_name_iface_list ksmbd_find_netdev_name_iface_list fsctl_query_iface_info_ioctl smb2_ioctl handle_ksmbd_work Freed by: kfree ksmbd_tcp_destroy ksmbd_conn_transport_destroy kill_server_store The fix is to detach iface_list to a temporary list under RTNL, then drop RTNL before cleanup because the following cleanup may block and hold RTNL for a long time. Fixes: b2d99376c5d6 ("ksmbd: browse interfaces list on FSCTL_QUERY_INTERFACE_INFO IOCTL") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260911163516.6403-1-15815827059%40163.com Assisted-by: LLM Signed-off-by: Henry Hu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit d2d1d0cfb0bbd1912761fcb567c04eaea851e9a8 Author: Danilo Krummrich Date: Wed Oct 14 09:08:35 2026 +0000 rust: workqueue: replace deprecated system_wq with system_{percpu,dfl}_wq [ Upstream commit 10ff62c6bb0baf9c2f77f92d2bcdaf6566c31191 ] system_wq is deprecated and triggers a runtime warning: [ 0.857414] workqueue: work func ...WorkItemPointerKy0_E3runB7_ enqueued on deprecated workqueue. Use system_{percpu|dfl}_wq instead. Replace system() with system_percpu() and system_dfl(), to match the previous behavior of the deprecated system() and convert doc examples and tests to system_dfl(). system_unbound_wq is deprecated in the same way, in favor of system_dfl_wq. Since system_unbound() has no users, just remove it as well. Fixes: 64d8eae3f895 ("workqueue: Add warnings and fallback if system_{unbound}_wq is used") Signed-off-by: Danilo Krummrich Reviewed-by: Daniel Almeida Reviewed-by: Boqun Feng Reviewed-by: Dongliang Mu Signed-off-by: Alice Ryhl Reviewed-by: Gary Guo Acked-by: Marco Crivellari Acked-by: Tejun Heo Link: https://patch.msgid.link/20261014-rust-workqueue-system-fix-v2-1-c018b8f870f9@google.com Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin commit 888c47e481ad44852a26774639f80fb2ef28060f Author: Nicolas Falesy Date: Sat Oct 10 19:15:13 2026 +0000 exfat: clean stale bdev buffers of newly allocated clusters [ Upstream commit 0550ac7f5f577e34e5fcf2bd7a51965f5c1b0194 ] Directory entries are read and written through buffer_heads of the block device. Removing the entries of a directory dirties such a buffer. If the directory is then removed and its cluster is reused for file data before writeback, the stale buffer stays dirty in the block device mapping, and the next flush of the block device (fsync, syncfs or umount) writes it over the new file data. The file silently reads back with one sector replaced by the deleted directory entries. This was harmless while file data went through exfat_get_block(), as __block_write_begin_int() and do_direct_IO() call clean_bdev_aliases() for newly allocated blocks. Since data I/O moved to iomap, nothing drops these buffers any more. Clean the aliases in exfat_alloc_cluster(), once per contiguous run of allocated clusters. Doing it at allocation time covers every path that allocates clusters: buffered and direct writes, and also fallocate() and an extending truncate(), which allocate clusters before the data is written, so the later iomap mapping does not see them as new. Tested on the exfat dev branch in a KVM guest with a reproducer that removes the entries of a directory, removes the directory and writes a file over its freed cluster: buffered with and without fsync, O_DIRECT, after fallocate(), after an extending ftruncate(), and with the freed cluster in the middle of a fragmented allocation. Without this patch every run corrupted the file (55/55); with it, none did (0/55). A churn test that creates, removes, preallocates and truncates directories and files, then runs fsck.exfat, is clean with and without the patch. Fixes: 82a81a7352bc ("exfat: add iomap buffered I/O support") Fixes: 867b9c96dc83 ("exfat: add iomap direct I/O support") Link: https://lore.kernel.org/all/010001a1222f66ba-0c745f29-d4fe-4862-93ff-1db2055b05fc-000000@email.amazonses.com/ Suggested-by: Namjae Jeon Assisted-by: Claude-Opus-5.5 Signed-off-by: Nicolas Falesy Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit fbeeaba1993ed019509fb9d777cbbd66c7a31a28 Author: Chi Zhiling Date: Sat Sep 5 13:49:51 2026 +0800 exfat: take bitmap_lock at the start of exfat_alloc_cluster() [ Upstream commit 48acff2eedef7fecdfbd39be1b6f4463a9e43e3e ] exfat_alloc_cluster() checks sbi->used_clusters against the total number of data clusters before acquiring sbi->bitmap_lock. A concurrent allocation can update sbi->used_clusters after the check but before the lock is acquired, making the check stale. This can allow the allocation to proceed even though there are not enough free clusters, causing it to fail partway through. Acquire sbi->bitmap_lock before checking sbi->used_clusters so that the free-space check and subsequent cluster allocation are serialized with concurrent allocations. Fixes: f55c096f62f1 ("exfat: do not zero the extended part") Signed-off-by: Chi Zhiling Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit fabe14fd8555ae8bc5933df390e548d77e7336fd Author: Chi Zhiling Date: Sat Sep 5 13:49:50 2026 +0800 exfat: fix used_clusters accounting during cluster allocation [ Upstream commit cb9dbf8a4e34b4fdf311598835ab4d76ed7e07c1 ] In the current exfat_alloc_cluster(), p_chain->size is incremented as each cluster is allocated so that the partially allocated chain can be freed by __exfat_free_cluster() on the error path. However, sbi->used_clusters is still updated only after all clusters have been allocated, while __exfat_free_cluster() unconditionally subtracts the number of freed clusters from sbi->used_clusters. Therefore, when allocation fails partway through, the partially allocated clusters are subtracted from sbi->used_clusters even though they were never added to it. This corrupts the free-space accounting and can cause sbi->used_clusters to underflow. Increment sbi->used_clusters together with p_chain->size as each cluster is allocated. This keeps the accounting consistent with __exfat_free_cluster() on both the success and error paths. This issue is caught by generic/476 with 256k cluster size: Ran: generic/476 Failures: generic/476 Failed 1 of 1 tests *** fsck.exfat output *** ERROR: : more clusters are allocated. truncate to N bytes ... /dev/vdc: corrupted. directories 331, files 526 /dev/vdc: files corrupted 9, files fixed 0 *** end fsck.exfat output *** Fixes: d5c514b6a0c0 ("exfat: fix the newly allocated clusters are not freed in error handling") Signed-off-by: Chi Zhiling Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit dcf7fee13e50633a9cc99ef55c91d35fe0a5734f Author: Mingming Cao Date: Tue Oct 13 11:29:26 2026 -0700 ibmveth: check headers in the RX large send and checksum helpers [ Upstream commit 9486c89a8e157cedecfb561c3d86053e654d32ab ] ibmveth_rx_mss_helper() and ibmveth_rx_csum_helper() trust the IP and TCP headers of received frames, which come from another partition on the virtual LAN. The worst case is an IPv4 frame with ihl 0 and iph->check 0xffff: the checksum helper calls ip_fast_csum(iph, 0), and the ppc64 version loops ihl - 1 times on an unsigned count, reading up to 16 GiB in softirq: a long stall, or an oops once the read leaves mapped memory. Both helpers also read and write header fields past the end of a short frame. The large send helper takes the segment size from the TCP checksum field and gso_segs from a TCP header length it never checks, and treats an IPv4 TCP fragment as a large send, which can zero two of its bytes; the checksum helper can write a checksum into a later fragment's payload. The ihl problem dates from the first commit in Fixes:, the large send helper from the second, and the checksum helper from the third. Before using a header, check that it fits the frame, that the IPv4 ihl is at least 5, and that an IPv4 TCP frame is not a fragment. In the large send helper, also require a TCP doff of at least 5, TCP payload within the IP length, and an IP length equal to the frame length: Ethernet padding or other bytes past the IP length would otherwise stay in a bridged or switched frame, which the stack does not trim, and be segmented but not counted in gso_segs. Compute gso_segs from the IP length, and keep the segment size at or above TCP_MIN_GSO_SIZE, as virtio_net_hdr_to_skb() does since commit c27c449d455a ("virtio-net: Ensure that TCP packets don't overflow gso_segs"), and below GSO_BY_FRAGS, which virtio rejects. With the headers checked and gso_segs computed, the skb is not marked SKB_GSO_DODGY, which would also keep it from hardware TSO on the egress device. A frame that fails a check is passed up unchanged, without the GSO fields or CHECKSUM_UNNECESSARY, so nothing downstream trusts its segment count or checksum. The skb is linear, so the checks use skb_headlen(); pskb_may_pull() could reallocate the head under the helpers' header pointers. Add KUnit cases for both helpers: valid IPv4 and IPv6 large sends, the segment size clamp, and refused frames. With any one of the ihl, doff, IP length, TCP payload, fragment or clamp checks, or the checksum helper's IPv4 options, IPv6 header or TCP header length checks, removed, a case fails; without the checksum helper's ihl check, ip_fast_csum() oopses on qemu. Found by the Sashiko review of the previous version of this series and confirmed by code inspection and the KUnit cases above. Tested with KUnit on qemu pseries (ppc64le) and on a POWER10 LPAR with iperf3 large sends over IPv4 and IPv6 at MTU 1500 and 9000, threaded NAPI and busy polling, with no new drops or InCsumErrors. No kernel selftests cover ibmveth. Fixes: 9c7e8bc584f5 ("ibmveth: Add support for Large Receive Offload") Fixes: 7b5967389f5a ("ibmveth: set correct gso_size and gso_type") Fixes: 66aa0678efc2 ("ibmveth: Support to enable LSO/CSO for Trunk VEA.") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-10-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit f06e26d0970f71b60e7244446a0fc601a57377f0 Author: Mingming Cao Date: Tue Oct 13 11:29:25 2026 -0700 ibmveth: wait for the RX poll to return before freeing the RX queue [ Upstream commit 3f872b34368c7c1d2a8900950e0fee4cb4dd9a34 ] napi_disable() returns once ibmveth_poll() has called napi_complete_done(), but the poll is not finished: it then re-enables the interrupt and calls ibmveth_rxq_pending_buffer(), which reads the RX queue. ibmveth_close() can free that queue in the meantime, and the late enable can leave the interrupt unmasked after close() masked it. The request_irq() failure path in ibmveth_open() frees the same memory after napi_disable() too. Call synchronize_net() after napi_disable() on both paths. Every caller of ibmveth_poll() runs it with bottom halves or interrupts disabled, so this waits for the poll to return. Found in review of the ibmveth multi-queue RX series and confirmed by code inspection; also raised by the Sashiko review of the first version of this series. The race was not reproduced. Tested on a POWER10 LPAR under an incoming ping flood with 30 rapid link down/up cycles and 30 rapid MTU cycles (1500 <-> 9000); ran cleanly with no warnings or faults. No kernel selftests cover ibmveth. Fixes: bea3348eef27 ("[NET]: Make NAPI polling independent of struct net_device objects.") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-9-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 112246361e6a7cdc8a4cc4e5c71d1e2f50e86e60 Author: Mingming Cao Date: Tue Oct 13 11:29:24 2026 -0700 ibmveth: wait for in-flight transmits in ibmveth_close() [ Upstream commit c807573ea58e615339a9c72675c45c157ffe245c ] ibmveth_close() frees the TX buffers after netif_tx_stop_all_queues(), which does not wait for an ibmveth_start_xmit() already running on another CPU. That transmit can copy into a freed buffer and hand PHYP a stale DMA address. MTU, csum/TSO and buffer pool changes call ibmveth_close() directly while traffic flows. ifdown and the reset work go through dev_close(), which waits for running transmits only when the qdisc has an enqueue function, so with noqueue they race the same way. Use netif_tx_disable(), which waits for running transmits. Found in review of the ibmveth multi-queue RX series and confirmed by code inspection; the race was not reproduced. Tested on a POWER10 LPAR with MTU changes during a ping flood, with no warnings. No kernel selftests cover ibmveth. Fixes: d6832ca48d8a ("ibmveth: Copy tx skbs into a premapped buffer") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-8-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 0124442af231cd5e475f7c8f940b6fbf5e0344bc Author: Mingming Cao Date: Tue Oct 13 11:29:23 2026 -0700 ibmveth: return the error when set_channels cannot add TX queues [ Upstream commit 16abfa871dc840e55f1726408c5994c66a9773e2 ] When ibmveth_set_channels() cannot allocate a TX buffer for a new queue, it falls back to the old queue count, and the successful netif_set_real_num_tx_queues() call then overwrites rc. ethtool -L reports success while the queue count is unchanged. Return the allocation error when the fallback succeeds. Found in review of the ibmveth multi-queue RX series and confirmed by code inspection. Tested on a POWER10 LPAR with the TX buffer allocation forced to fail by a test-only module parameter (not part of this patch): ethtool -L tx 8 now fails with -ENOMEM and the device keeps its four queues and passes traffic. No kernel selftests cover ibmveth. Fixes: 10c2aba89cc0 ("ibmveth: Ethtool set queue support") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-7-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 495edc8d67e858b9e3691db76df1528a457bc630 Author: Mingming Cao Date: Tue Oct 13 11:29:22 2026 -0700 ibmveth: release the pool kobjects when probe fails [ Upstream commit fd052c6823b31eb45f824660567ab3f2da2d5195 ] If register_netdev() fails in ibmveth_probe(), for example with -EINTR when the binding task is killed, probe frees the netdev but leaves the pool%d kobjects embedded in it registered in sysfs. Reading /sys/devices/vio//pool0/num is then a use-after-free, and the next probe cannot add pool0. Put the kobjects before freeing the netdev, as ibmveth_remove() does, on this path and on the netif_set_real_num_tx_queues() one. The kobjects also have no release(). With CONFIG_DEBUG_KOBJECT_RELEASE, kobject_put() defers their cleanup, including removing the sysfs files, to a work item, so free_netdev() can free them first, here and in remove(). Add a release() that signals a per-pool completion, and wait for it in both places before free_netdev(). Without that config, release() runs from kobject_put() and the wait returns at once. Found in review of the ibmveth multi-queue RX series and confirmed by code inspection; the release() part was raised by the Sashiko review of the first version. Tested on a POWER10 LPAR with register_netdev() forced to fail with -EINTR by a test-only module parameter (not part of this patch): no pool%d directories remain and the device binds again. No kernel selftests cover ibmveth. Fixes: 860f242eb534 ("[PATCH] ibmveth change buffer pools dynamically") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-6-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 7b6a6d2c1ac8b3bc15634cef9e313fffbd9d1c15 Author: Mingming Cao Date: Tue Oct 13 11:29:21 2026 -0700 ibmveth: step past bad RX correlators instead of spinning or oopsing [ Upstream commit c9b95adc755f2396307be676ce838161fb011986 ] ibmveth_poll() mishandles a bad RX correlator from PHYP in two ways. If harvest fails or ibmveth_rxq_get_buffer() returns NULL, poll breaks out without advancing the ring and restarts on the same slot forever. For an out-of-range correlator it also fires a WARN_ON() and schedules a reset each pass, but the reset is queued on that CPU and never runs, and the CPU stalls RCU, so RTNL holders hang too. This dates from the first commit in Fixes:, which turned the BUG_ON()s here into WARN_ON() plus a reset. The range check also accepts a correlator naming an inactive buffer pool (pools 2 and 3 by default), whose skbuff array is NULL, so the lookup dereferences NULL in softirq. Pools became inactive with the second commit in Fixes:. Validate the correlator in one helper that also rejects a pool with no skbuff array. On a bad slot, advance the ring, count the drop in rx_dropped and still schedule the reset, which rebuilds the pools. The slot has moved, so stay in the budget loop and count it in frames_processed. Breaking out would complete NAPI, re-arm, and napi_schedule() with budget left. When the final check finds more work, queue the NAPI and return instead of going back to restart_poll: after napi_complete_done() the NAPI is no longer this call's, and with threaded NAPI and busy polling the kthread can already be polling it on another CPU. frames_processed is below budget there, so busy_poll_stop() does not queue it a second time. Mask the interrupt before queueing, as ibmveth_interrupt() does; masking after napi_schedule() could land after that kthread has finished and unmasked, leaving RX masked with nothing scheduled. Drop a frame whose offset + length does not fit the pool buffer: copybreak would read past the RX buffer and skb_put() would BUG(). Also drop one shorter than an Ethernet header, which eth_type_trans() would read past. Read the correlator once per slot and use that value for the lookup, the bound and the harvest. The base driver never checked frame bounds, and they have not been seen in the field, so they have no Fixes: tag of their own. The tags below are for the correlator hang. The correlator comes from PHYP, and with the ring advancing a burst of bad slots would WARN once per slot (and panic with panic_on_warn), so use a ratelimited netdev_err() instead. Also free the rx_copybreak skb if harvest fails there. Add a KUnit case for harvest advancing on errors and extend the existing cases to an inactive pool. Run against the unfixed driver, with the calls changed back to its signatures, the first fails and the others oops. Found in review of the ibmveth multi-queue RX series (the frame bound by the Sashiko review of v2 of this series) and confirmed by code inspection and the KUnit cases above. Hitting either correlator bug needs PHYP to return a bad correlator, so neither was reproduced on hardware. Tested with KUnit on qemu pseries (ppc64le), and on a POWER10 LPAR with a ping flood and MTU changes under traffic. No kernel selftests cover ibmveth. Fixes: 2c91e2319ed9 ("net: ibmveth: Reset the adapter when unexpected states are detected") Fixes: 860f242eb534 ("[PATCH] ibmveth change buffer pools dynamically") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-5-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 03825bb38fbb9a09c6d9aab3f1c0e5f5fc2ba1e4 Author: Mingming Cao Date: Tue Oct 13 11:29:20 2026 -0700 ibmveth: disable the reset work before unregister in remove [ Upstream commit 1412235447869922eb0ee041a31fab6176e60ab0 ] ibmveth_remove() cancels the reset work before unregister_netdev(), but NAPI keeps running until unregister closes the device and can queue the reset again, on an interrupt enable failure, a bad free_map entry or a bad RX slot. The reset can then run on the adapter after free_netdev(), or reopen the device during unregister. Use disable_work_sync(), which waits for a running reset and keeps the work from being queued again. A bad RX slot also makes poll spin, which can stall unregister; a later patch in this series fixes that. Found in review of the ibmveth multi-queue RX series and confirmed by code inspection; it was not reproduced. Tested on a POWER10 LPAR with unbind and bind cycles under traffic. No kernel selftests cover ibmveth. Fixes: 2c91e2319ed9 ("net: ibmveth: Reset the adapter when unexpected states are detected") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-4-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 151397505c97bbd096779904ba143dcdd5c0a467 Author: Mingming Cao Date: Tue Oct 13 11:29:19 2026 -0700 ibmveth: do not close twice after a failed reopen [ Upstream commit 95811c873d1b97c424a7e6e731730cbf6656ab7e ] ibmveth_change_mtu(), veth_pool_store(), ibmveth_set_csum_offload() and ibmveth_set_tso() call close() and open() directly. If open() fails, NAPI is left disabled while IFF_UP stays set, so the next close() (ifdown, unregister or another reconfiguration) calls napi_disable() again and waits forever with RTNL held. Networking and shutdown hang; only a reboot recovers. ethtool -L in that state also wakes queues that have no TX buffer and dereferences NULL in ibmveth_start_xmit(). Any open() failure on those paths triggers it, for example an allocation failure on an MTU change to jumbo frames. Track a successful open in adapter->opened. close() returns early when it is clear, and set_channels() checks it instead of IFF_UP. The open() error-path leaks were fixed separately in net by commit af0524bf4ce1 ("ibmveth: h_free logical LAN on open-fail after register") and commit 84bec0bf0352 ("ibmveth: fix TX LTB and filter unwind on open-fail"), which are now in net-next too, so a failed open() no longer leaves TX buffers or the logical LAN registration behind for the early return to skip. Found in review of the ibmveth multi-queue RX series and confirmed by code inspection. Tested on a POWER10 LPAR with ibmveth_open() forced to fail by a test-only module parameter (not part of this patch): 'ip link set dev eth1 mtu 9000' fails, then 'ip link set dev eth1 down' returns at once and 'ip link set dev eth1 up' recovers the interface. No kernel selftests cover ibmveth. Fixes: 860f242eb534 ("[PATCH] ibmveth change buffer pools dynamically") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-3-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 7049291d38a6e8787c9fc934d026f023b6db488d Author: Mingming Cao Date: Tue Oct 13 11:29:18 2026 -0700 ibmveth: fix netpoll races with RX replenish [ Upstream commit 8d9ecac6b96e61d0e6d126c60644829fd9f66952 ] ibmveth_poll_controller() runs RX replenish outside NAPI and without a lock, racing NAPI's replenish on another CPU. Both can fill the same slot, so an skb and its DMA mapping leak and PHYP can write into an unmapped buffer. netpoll calls it from netconsole and from netpoll-enabled bonds. ibmveth_open() also enables NAPI before the RX resources exist. ibmveth_change_mtu(), veth_pool_store(), ibmveth_set_csum_offload() and ibmveth_set_tso() call close() and open() directly, so while open() is still setting up, netpoll and the direct ibmveth_interrupt() calls can replenish NULL pools and read freed memory. Remove the callback, as Eric Dumazet did for many drivers after commit ac3d9dd034e5 ("netpoll: make ndo_poll_controller() optional"), including ibmvnic in commit 0c3b9d1b37df ("ibmvnic: remove ndo_poll_controller"). netpoll then polls NAPI itself with budget 0. napi->poll_owner serializes that with NAPI, but not with a NAPI poll that was already running when netpoll was set up, so skip RX replenish at budget 0, which netpoll uses for TX only. TX completes synchronously, so ibmveth_poll() has nothing else to do for netpoll. Enable NAPI just before request_irq(), once everything ibmveth_poll() touches exists. Found in review of the ibmveth multi-queue RX series and confirmed by code inspection of poll_one_napi() and the direct close()/open() callers; neither race was reproduced. Tested on a POWER10 LPAR with netconsole over ibmveth: a ping flood (678,470 packets, no loss) during a printk flood, and MTU changes and buffer pool toggles under traffic, with no warnings. No kernel selftests cover ibmveth. Fixes: 6b4223748895 ("[PATCH] ibmveth: Add netpoll function") Fixes: bea3348eef27 ("[NET]: Make NAPI polling independent of struct net_device objects.") Signed-off-by: Mingming Cao Link: https://patch.msgid.link/20261013182926.30417-2-mmc@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d0444048eaa16cc2b6b8edee509cb98416f4fa72 Author: Ovidiu Panait Date: Tue Oct 13 11:45:02 2026 +0000 net: stmmac: Track the TX DMA threshold per queue [ Upstream commit 9dd53418781900f02897c805eed397555cf98417 ] Commit 3a6c12a0c6c3 ("net: stmmac: bump tc when get underflow error from DMA descriptor") made dwmac4 raise the DMA threshold of the queues that report TX underflows. This is done by incrementing a module global parameter 'tc' by 64 on each underflow. This leads to inconsistent TX DMA thresholds between queues and causes issues on platforms with multiple stmmac controllers, as 'tc' is shared by all of them. Once 'tc' goes over 256 the bumping stops, and queues that did not underflow before are left at the initial threshold. On the Renesas RZ/V2H platform, which has two dwmac4 controllers, we observed sporadic iperf3 TCP TX failures: iperf3 -c -t5 --bind-dev end1 ... [ 5] 0.00-5.00 sec 1.00 MBytes 1.68 Mbits/sec 87 sender [ 5] 0.00-5.00 sec 768 KBytes 1.26 Mbits/sec receiver This happens because the TX queues of end1 were underflowing on a large fraction of the packets, but the DMA TX threshold was never raised from the default of 64 bytes. The threshold was not raised because end0 had underflowed first and had already pushed 'tc' past 256. Which controller is affected depends on which one underflows first. To fix this, make the TX DMA threshold per queue instead of global. Each time an underflow happens on a queue, its TX DMA threshold gets incremented, without affecting other queues or controllers. With this change, 'tc' is only used as the initial value, and the RX threshold is no longer bumped together with the TX one, as TX underflows have nothing to do with the RX side. Fixes: 3a6c12a0c6c3 ("net: stmmac: bump tc when get underflow error from DMA descriptor") Signed-off-by: Ovidiu Panait Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20261013114503.57487-2-ovidiu.panait.rb@renesas.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 88c8240649e86de29cbc2ef0a240f9201fa94726 Author: Jiale Yao Date: Mon Oct 19 17:54:07 2026 +0200 team: reject CAN, IEEE 802.15.4 and 6LoWPAN devices in team_port_add [ Upstream commit 9043be310c6a4c5e57f7bba4b9870554eac7aa96 ] When the first port has a non-Ethernet type, team_setup_by_port() copies port_dev->type to the team device while netdev_priv() of the team device still holds a struct team. Several L2 stacks identify their devices by dev->type alone and then access type specific data that the team driver never sets up: - CAN protocols rely on the CAN mid-layer private data (ml_priv) - IEEE 802.15.4 code dereferences ieee802154_ptr and the mlme ops in ml_priv - the 6LoWPAN netdev notifier writes through lowpan_dev(dev) on NETDEV_DOWN and reads it on NETDEV_UP/NETDEV_CHANGE Enslaving such a device (e.g. vxcan, wpan0, lowpan0) therefore leads to NULL pointer dereferences or to writes into struct team. This is the same problem that syzbot reported for the bonding driver with a vxcan device enslaved to a bond master, which crashed in can_rx_unregister() and was fixed by commit 8ba68464e478 ("bonding: refuse to enslave CAN devices"). The team driver has the same gap. Reject ARPHRD_CAN, ARPHRD_IEEE802154, ARPHRD_IEEE802154_MONITOR and ARPHRD_6LOWPAN devices in team_port_add(). Link: https://lore.kernel.org/all/b58d98e0-8fe3-4e4e-b8a5-c1c7e647ccca@hartkopp.net/ Link: https://syzkaller.appspot.com/bug?extid=8ed98cbd0161632bce95 # bonding splat Fixes: 1d76efe1577b ("team: add support for non-ethernet devices") Signed-off-by: Jiale Yao Signed-off-by: Oliver Hartkopp Reviewed-by: Hangbin Liu Link: https://patch.msgid.link/20261019155407.61487-1-socketcan@hartkopp.net Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 2c7d4e38337de373e159a3c0adfe0d4810c30c9f Author: Ido Schimmel Date: Mon Oct 19 17:03:36 2026 +0300 ipv6: Hold RCU when emitting route hardware flags notification [ Upstream commit 7c9cb1edaf8fd8e1af25e39741e603500986ef66 ] fib6_info_hw_flags_set() is called by drivers from process context without RTNL or RCU. When the route uses a nexthop object, rt6_nlmsg_size() and rt6_fill_node() access the nexthop's RCU protected nexthop info and group pointers via rcu_dereference_rtnl(), resulting in suspicious RCU usage splats [1]. Fix by holding RCU while sizing and filling the notification, like fib_alias_hw_flags_set() already does. Switch to GFP_ATOMIC for the skb allocation accordingly. Reproducer: # echo "10 0" > /sys/bus/netdevsim/new_device # sysctl -wq net.ipv6.fib_notify_on_flag_change=1 # sysctl -wq net.ipv4.nexthop_compat_mode=1 # ip -6 nexthop add id 1 blackhole # ip -6 route add 2001:db8:1::1/128 nhid 1 [1] WARNING: suspicious RCU usage 7.3.0-rc7-virtme-g191aa41548b2 #38 Not tainted net/ipv4/nexthop.c:1539 suspicious rcu_dereference_check() usage! [...] Workqueue: events nsim_fib_event_work Call Trace: dump_stack_lvl (lib/dump_stack.c:94 lib/dump_stack.c:120) lockdep_rcu_suspicious.cold (kernel/locking/lockdep.c:6972) nexthop_for_each_fib6_nh (net/ipv4/nexthop.c:1539 (discriminator 16)) rt6_nlmsg_size (net/ipv6/route.c:5728) fib6_info_hw_flags_set (net/ipv6/route.c:6503) nsim_fib6_rt_add (drivers/net/netdevsim/fib.c:671 drivers/net/netdevsim/fib.c:694) nsim_fib6_rt_insert (drivers/net/netdevsim/fib.c:759) nsim_fib_event_work (drivers/net/netdevsim/fib.c:856 drivers/net/netdevsim/fib.c:889 drivers/net/netdevsim/fib.c:1493) process_one_work (kernel/workqueue.c:3396) worker_thread (kernel/workqueue.c:3479 kernel/workqueue.c:3560) kthread (kernel/kthread.c:436) ret_from_fork (arch/x86/kernel/process.c:158) ret_from_fork_asm (arch/x86/entry/entry_64.S:245) Fixes: 907eea486888 ("net: ipv6: Emit notification when fib hardware flags are changed") Reported-by: Sashiko Closes: https://lore.kernel.org/netdev/179152182668.434549.18232968419539498055@kernel.org/ Signed-off-by: Ido Schimmel Reviewed-by: Eric Dumazet Reviewed-by: David Ahern Link: https://patch.msgid.link/20261019140337.2886875-2-idosch@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 3b5b353968bacf8be4a41fbffcd7a2a1c97c38d6 Author: Eric Dumazet Date: Sat Oct 17 12:42:28 2026 +0200 ip6mr: clear skb->cb[] in reg_vif_xmit() [ Upstream commit 238164201431a425e48dfcb8e9a59de63caf175b ] reg_vif_xmit() hands the skb to ip6mr_cache_report() as an MRT6MSG_WHOLEPKT report. skb_realloc_headroom() copies skb->cb[] into the report, which is queued to the mroute socket, where rawv6_recvmsg() reads it as IP6CB. By the time the pim6reg device transmits the packet, skb->cb[] is not IP6CB anymore: qdisc_pkt_len_init() overwrites iif and ra, and any qdisc installed on the device (fq, fq_codel, pie, cake...) or a tc BPF program writing skb->cb[] fills the area holding dst0, srcrt, dst1, lastopt and flags. Since commit dd433671fef3 ("ipv6: validate extension header length before copying to cmsg") these stale offsets can no longer cause out-of-bounds reads, but the mroute socket can still receive bogus IPV6_PKTINFO ifindex and extension header ancillary data. Clear IP6CB before building the report. The skb is freed right after, so nothing else depends on its control block. Fixes: 14fb64e1f449 ("[IPV6] MROUTE: Support PIM-SM (SSM).") Signed-off-by: Eric Dumazet Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 33b879fc15046335d631347f05c2489997ff3bd3 Author: Dimitri Daskalakis Date: Fri Oct 16 17:54:01 2026 -0700 net/mlx5e: Update netdev features only after a successful ringparam set [ Upstream commit 23dd5be7e19ceab8c1c79110ee3552bcabc463ef ] mlx5 couples HW-GRO with tcp-data-split. If a user sets rx-gro-hw on -> tcp-data-split on -> rx-gro-hw off, the driver will leave HW-GRO on. mlx5e_ethtool_set_tcp_data_split() calls netdev_update_features() when tcp-data-split goes from enabled to disabled in case HW-GRO needs to be released. mlx5e_fix_features() reads the new HDS config from dev->cfg_pending, so HW-GRO is released before all ring parameters are validated. If the subsequent call to mlx5e_ethtool_set_ringparam() fails, the ethtool core discards the pending change and reports tcp-data-split enabled. The device is no longer splitting, and subsequent ring changes are blocked. Move the call to netdev_update_features() after mlx5e_ethtool_set_ringparam() exits successfully. The issue was discovered by manual code inspection during review of a change that stops mlx5 users from disabling tcp-data-split. It was reproduced on a ConnectX-7 with ethtool alone. Steps to reproduce: ethtool -K eth0 rx-gro-hw on ethtool -G eth0 tcp-data-split on ethtool -K eth0 rx-gro-hw off # HW-GRO kept on for tcp-data-split ethtool -G eth0 tcp-data-split off rx 1 # de-sync driver & kernel state netlink error: mlx5_core: rx (1) < min (16) netlink error: Invalid argument ethtool -G eth0 rx 1024 # valid ring changes are now blocked netlink error: mlx5_core: TCP-data-split is not supported when GRO HW is disabled netlink error: Invalid argument This is not a terminal state, users can recover by setting rx-gro-hw on. With the fix, the failing ringparam set leaves rx-gro-hw on and later ring changes succeed. Fixes: 46bcce5dfd33 ("net/mlx5e: Support ethtool tcp-data-split settings") Reported-by: Björn Töpel Closes: https://lore.kernel.org/87se2grw3d.fsf@all.your.base.are.belong.to.us/ Signed-off-by: Dimitri Daskalakis Reviewed-by: Björn Töpel Reviewed-by: Nimrod Oren Acked-by: Tariq Toukan Link: https://patch.msgid.link/20261017005401.1582755-1-dimitri.daskalakis1@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit bdd8913e4731d46e417dce73d123c716e9089df6 Author: Rosen Penev Date: Wed Oct 14 12:48:18 2026 -0700 net: phy: marvell: keep WOL_EIE across interrupt reconfiguration [ Upstream commit f434191f93884c9de58c38f18ac7fc7f1fdf9e42 ] marvell_config_intr() rewrites the whole interrupt enable register, so the config_intr call from phy_init_hw() on resume silently cleared WOL_EIE on the 88E1318S and 88E1510: m88e1318_get_wol() still reported WAKE_MAGIC, but a matched magic packet was no longer routed to INTn and the board did not wake. Bit 7 of that register is WOL_EIE only on these two PHYs; on others, such as the 88E1111, it enables a FIFO error interrupt. So give the 88E1318S and 88E1510 their own config_intr and handle_interrupt, and leave the shared callbacks unchanged. m88e1318_set_wol() now records whether WoL is enabled, and both it and the new config_intr derive WOL_EIE from that state under the MDIO bus lock. WOL_EIE stays set across config_intr while WoL is enabled, except when the PHY has an interrupt line and interrupts are being disabled, as in phy_free_interrupt(): INTn is then the PHY IRQ, and nothing would read IEVENT after free_irq() to release it. The bit is set again once interrupts are re-enabled. phy_probe() still clears a WOL_EIE left by a previous boot, since WoL starts out disabled. The new handler also claims WoL events, so they do not go unacknowledged when the PHY IRQ is in use. Helios4 (Armada 388, 88E1512), 7.2.9. With this patch WOL_EIE stays set over 3 link down/up cycles, "wol d" clears it, and a magic packet on a running board is a handled interrupt. Without it, WOL_EIE is lost on the first down/up, survives "wol d", and the magic packet is an unhandled interrupt. Fixes: 3871c3876f80 ("mv643xx_eth with 88E1318S: support Wake on LAN") Signed-off-by: Rosen Penev Tested-by: Igor Velkov Link: https://patch.msgid.link/20261014194818.11640-2-rosenp@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 0a430b4fe10b5aeca3b95dee7f3bd4b736386220 Author: Myeonghun Pak Date: Sat Oct 17 23:33:53 2026 -0400 platform/x86: gpd pocket fan: Cancel work before releasing GPIOs [ Upstream commit 9962770049c715fc30a7b3274d8f245167c0a410 ] The fan worker changes the direction of both GPIOs and schedules its next run. Its managed cancellation action is registered before the GPIOs are acquired, so devres releases the GPIOs before cancelling the work. A running worker can therefore change a GPIO after the driver has released it. Register the work cancellation action after both GPIO acquisitions. This makes devres cancel and drain the worker before releasing either GPIO. No work has been queued yet if GPIO acquisition or action registration fails. This issue was identified as part of our ongoing research while reviewing kernel code. Fixes: b82a7b018b93 ("platform/x86: gpd pocket fan: Clean-up by using managed work init") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://patch.msgid.link/179229442299.3956787.17526066623947466315.gpd-pocket-fan@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 0f682611dc7e7d13f0e8aa843d5e76f867a30a1b Author: Eric Dumazet Date: Fri Oct 16 11:15:56 2026 +0200 ipv6: account route exceptions to the netns of their dst [ Upstream commit 8ff017b891e89276c15f06dfd7155981d572af77 ] rt6_insert_exception() and rt6_remove_exception() update rt6_stats->fib_rt_cache of dev_net(rt6i->dst.dev), but the device of an exception dst can move to another netns while the exception is still in its bucket. This happens when the bucket is flushed from an RCU callback, for instance from nexthop_free_rcu() for the nh_info of a replaced nexthop, whose exceptions still point to live routes. If the device moves to another netns before that callback runs, the decrement hits the other netns, whose u32 counter underflows in /proc/net/rt6_stats, while the counter of the original netns never goes back down. Account exceptions to the netns their dst was allocated in, derived from dst->ops as ip6_dst_gc() already does, which does not depend on the device. The dst already relies on that netns' ip6_dst_ops being alive when it is destroyed, which happens after the exception is removed. Fixes: 81eb8447daae ("ipv6: take care of rt6_stats") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20261016091556.2750902-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ea3570709ff0f6a3d466743df6cada074a75cfcd Author: Sagi Maimon Date: Thu Oct 15 11:47:43 2026 +0300 net: axienet: release every RX buffer in axienet_dma_bd_release() [ Upstream commit b59787892d04a5647a7e662fbb02cd0abdb1a993 ] The RX walk in axienet_dma_bd_release() stops at the first descriptor without an skb, assuming that such a slot and all after it were never filled. That holds on the axienet_dma_bd_init() error path, but not once the ring has been running: when axienet_rx_poll() fails to allocate or map a replacement buffer it leaves the slot it emptied with a NULL skb, in the middle of a populated ring, until a later poll refills it. Closing the interface before then leaks the skb and the streaming DMA mapping of every descriptor after that slot, which can be most of the ring, and is most likely under memory pressure. The walk also frees each skb before unmapping it. With swiotlb, the DMA_FROM_DEVICE unmap copies the bounce buffer back into the skb data that was just freed, and on non-coherent platforms it invalidates cache lines that may already belong to a new owner. Skip empty slots instead of stopping at the first one. An emptied slot still has a non-zero cntrl but its buffer is already unmapped, so the skip has to cover the unmap too, which it does by coming before it. Then unmap before freeing, as axienet_rx_poll() does. This was reported by the Sashiko AI review bot. Tested on the AXI Ethernet MAC of an ADVA TimeCard X2 (PCIe card, with the built-in AXI DMA): traffic passes after each of ten down/up cycles, each running axienet_dma_bd_release(), so the unmap-then-free order is exercised on every buffer. A failed RX refill was not reproduced, so the skip over an empty slot was not exercised. Fixes: f26667a373f3 ("net: axienet: Fix DMA descriptor cleanup path") Fixes: 7a7d340ba4d9 ("net: axienet: fix RX ring refill allocation failure handling") Signed-off-by: Sagi Maimon Link: https://patch.msgid.link/20261015084743.1798326-1-maimon.sagi@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 268981f0661c78b9ace931092d80a5b5054b332a Author: Konrad Dybcio Date: Wed Sep 16 14:37:49 2026 +0200 PCI: qcom: Ignore -ENODEV after Root Port reset [ Upstream commit bea2ff3b9de1e32716bc517082b7e3c7330e2151 ] Root Port recovery may race with a device hot-unplug. In that case, dw_pcie_wait_for_link() returns -ENODEV because no device is detected after the controller has been successfully reset. This is a valid outcome and should not cause Root Port recovery to fail. Ignore -ENODEV while continuing to propagate other link-training errors. Fixes: 4d88cb82a6d9 ("PCI: qcom: Implement .reset_root_port() and use for link down") Signed-off-by: Konrad Dybcio Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Krishna Chaitanya Chundru Link: https://patch.msgid.link/20260916-topic-pcie_portrec_enodev-v1-1-5dc7bde39552@oss.qualcomm.com Assisted-by: LLM Signed-off-by: Sasha Levin commit 3842c22aaf34d66f272141d85a53ae50782d97ae Author: Ido Schimmel Date: Fri Oct 16 13:14:06 2026 +0300 bridge: mcast: Delete empty MDB entry when port group creation fails [ Upstream commit 1d0590f96fa4133578b7370ea9ce1d871f6bfc21 ] When a port group cannot be created for a new group, the MDB entry that was created for it is left with no ports and is not joined by the host. Its timer is never armed, so the entry is never deleted, but it is counted towards mcast_hash_max. When this maximum is reached, the bridge disables multicast snooping. Since commit b57e8d870d52 ("net: bridge: Maintain number of MDB entries in net_bridge_mcast_port"), port group creation also fails when the port reached its mcast_max_groups limit. A host behind such a port can therefore disable snooping by sending reports for new groups, which is what the limit is meant to prevent. The RTM_NEWMDB path has the same problem. Fix by deleting the entry after a failure if it is unused. Delete it immediately rather than arming its timer, so that it stops counting towards the maximum right away. Fixes: b57e8d870d52 ("net: bridge: Maintain number of MDB entries in net_bridge_mcast_port") Reported-by: Yunlong Ma Closes: https://lore.kernel.org/netdev/2f5b61e2.1e71a.1a11fcb3809.Coremail.yunlong_ma@buaa.edu.cn/ Acked-by: Nikolay Aleksandrov Signed-off-by: Ido Schimmel Tested-by: Gabriel Goller Reviewed-by: Gabriel Goller Link: https://patch.msgid.link/20261016101407.2030133-2-idosch@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 03b61410e39199481aad8d122033257502e7e6d5 Author: Florian Fainelli Date: Tue Oct 13 13:44:39 2026 -0700 net: bcmasp: fix network filter lookup and wake filter pair allocation [ Upstream commit fa1459375794f14fb65039cd19c9398d759b491e ] In bcmasp_netfilt_get_init(), when looking up an existing filter (!init) for a specified location, if the filter at loc was not claimed, the previous loop continued searching higher indices and could return an arbitrary unrelated filter belonging to the port. This caused flow get or delete operations on an empty rule location to return or delete an unintended filter. Fix this by checking only the requested location on lookup and rejecting RX_CLS_LOC_ANY when !init. In addition, harden wake filter allocation and release by ensuring wake filter pair searches stay on even boundaries where both entries are free, checking that loc + 1 is free for positioned wake filters, and validating parity and bounds on release. Fixes: c5d511c49587 ("net: bcmasp: Add support for wake on net filters") Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261013204439.3494046-7-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 02b5c8bbb942c76e657013a428425fab095fa611 Author: Florian Fainelli Date: Tue Oct 13 13:44:38 2026 -0700 net: bcmasp: account for offload header in TX short packet padding [ Upstream commit 74667a55122ad2fad88af4fd7672e4c8175c2558 ] When hardware checksum offload is enabled for an skb, bcmasp_csum_offload() prepends a struct bcmasp_pkt_offload header (20 bytes) to the skb via skb_push(). This increases skb->len and skb_headlen(skb) by sizeof(struct bcmasp_pkt_offload). Because the hardware descriptor processor strips this offload header before transmitting the packet on the wire, the wire packet length is smaller by sizeof(struct bcmasp_pkt_offload). The padding calculation must account for this extra header; otherwise, short frames are sent on the wire smaller than the minimum Ethernet frame size (ETH_ZLEN + ETH_FCS_LEN). Furthermore, small frames with payload in page fragments (such as small TCP segments with CHECKSUM_PARTIAL) have nr_frags > 0 and were skipping padding entirely because the padding check was restricted to nr_frags == 0. Perform the padding check on skb->len before the descriptor loop using skb_put_padto(), adding sizeof(struct bcmasp_pkt_offload) to min_size when checksum offload is enabled, and re-read nr_frags after padding in case the skb was linearized. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Reviewed-by: Justin Chen Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261013204439.3494046-6-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit bbe170d29e34fdfa1af08f4e974d75f612dbb58a Author: Florian Fainelli Date: Tue Oct 13 13:44:37 2026 -0700 net: bcmasp: fix OF node reference leak for phy_dn [ Upstream commit a31623d91c6e48b08c74dc95567aeb62f1f35938 ] In bcmasp_interface_create(), intf->phy_dn is obtained via of_parse_phandle() or assigned ndev_dn. of_parse_phandle() returns a node reference with its refcount incremented, but of_node_put() was never called on intf->phy_dn in bcmasp_interface_destroy() or the error unwind path in bcmasp_interface_create(). Acquire a reference on ndev_dn for the fixed-link case as well so that intf->phy_dn consistently holds a reference, and release it with of_node_put() on teardown and error. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Reviewed-by: Nicolai Buchwitz Reviewed-by: Justin Chen Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261013204439.3494046-5-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit c13103e247cbfbb0a39bddadbb69efaa441092a6 Author: Florian Fainelli Date: Tue Oct 13 13:44:36 2026 -0700 net: bcmasp: validate minimum RX packet size in bcmasp_rx_poll() [ Upstream commit 07b624d2f5a4517d7d0022fbd4aef17e884b5686 ] In bcmasp_rx_poll(), the driver removes a 2-byte alignment pad and optionally strips the ETH_FCS_LEN CRC from received packets before passing them to eth_type_trans(). If the hardware reports a descriptor size smaller than the sum of the 2-byte pad, the Ethernet header (ETH_HLEN), and optional CRC (ETH_FCS_LEN), subtracting the pad and CRC lengths underflows u32 len. This adds ~4 GiB to rx_bytes statistics, while the undersized frame reaches eth_type_trans(), which reads past skb->len into stale buffer data. Check that desc->size is at least (2 + ETH_HLEN + (crc_fwd ? ETH_FCS_LEN : 0)) before proceeding to process the descriptor. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Reviewed-by: Justin Chen Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261013204439.3494046-4-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit f2c1a1b53c323d776e2678a6867d5816046a2204 Author: Florian Fainelli Date: Tue Oct 13 13:44:35 2026 -0700 net: bcmasp: unmap previous DMA mappings on TX map failure [ Upstream commit a3cf9877558ab2c51182af558815dde64fc17cb9 ] When mapping an skb with fragments for transmission in bcmasp_xmit(), if mapping fails on fragment i > 0, the error handler calls bcmasp_clean_txcb() for previous iterations j < i. However, bcmasp_clean_txcb() only zeroes the control block fields without unmapping the DMA buffers, leaking the DMA mappings allocated for the head and earlier fragments. Call dma_unmap_single() before calling bcmasp_clean_txcb() in the error cleanup loop. Fixes: 490cb412007d ("net: bcmasp: Add support for ASP2.0 Ethernet controller") Reviewed-by: Nicolai Buchwitz Reviewed-by: Justin Chen Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261013204439.3494046-3-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 26b8ea3a7f0783037a48caa588c370257f4150be Author: Florian Fainelli Date: Tue Oct 13 13:44:34 2026 -0700 net: bcmasp: fix mib counters struct alignment with ethtool stats [ Upstream commit db45c15c98134f5ebd13c4dc5b6be5d1cd3fc706 ] When EDPKT stats were removed in commit e9f31435ee7d ("net: bcmasp: Add support for asp-v3.0"), the corresponding entries were removed from bcmasp_gstrings_stats in bcmasp_ethtool.c, but the edpkt_* fields were left at the beginning of struct bcmasp_mib_counters in bcmasp.h. Because bcmasp_update_mib_counters() and bcmasp_get_ethtool_stats() index into struct bcmasp_mib_counters sequentially based on the order of bcmasp_gstrings_stats, this 16-byte offset caused ethtool to read from shifted offsets: the first four software counters read unused fields and reported 0, the next four software counters reported the values of alloc_rx_skb_failed, tx_dma_failed, mc_filters_full_cnt, and uc_filters_full_cnt, while filters_combine_cnt, promisc_filters_cnt, tx_realloc_offload_failed, and tx_timeout_cnt were never reported. Remove the obsolete edpkt_* fields from struct bcmasp_mib_counters so that it aligns with bcmasp_gstrings_stats. Fixes: e9f31435ee7d ("net: bcmasp: Add support for asp-v3.0") Reviewed-by: Nicolai Buchwitz Reviewed-by: Justin Chen Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20261013204439.3494046-2-florian.fainelli@broadcom.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ac813b0c73b7f884fbbad9dd40c1487d7a5935dd Author: Myeonghun Pak Date: Wed Oct 14 22:26:35 2026 -0400 net: hix5hd2: serialize timeout recovery with interface teardown [ Upstream commit 87cce46329a811ea3fe108ac721e0a2400d0a3bb ] The timeout worker calls the driver's close and open methods without RTNL or a running-state check. A timeout queued before an interface is closed can call close again after ndo_stop has disabled NAPI. The second napi_disable() can then wait indefinitely. The worker can also race with an ongoing close. Take RTNL and skip recovery when the interface is no longer running. Use the netdev core close and open helpers so a failed reopen leaves the interface down, rather than leaving it marked running with NAPI disabled. After unregister_netdev() has stopped the watchdog, drain the worker before releasing its MDIO and descriptor resources. This wait is outside RTNL, allowing an already queued worker to take RTNL, observe the down state, and finish. This issue was identified as part of our ongoing research while reviewing kernel code. Fixes: 57c5bc9ad7d7 ("net: hisilicon: add hix5hd2 mac driver") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Reviewed-by: Jijie Shao Link: https://patch.msgid.link/179203116093.2621539.3718842986255459438.G202@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 0b88a329955bbf069b439d9b38bb858469b0ebc6 Author: Karl Mehltretter Date: Thu Oct 15 06:50:01 2026 +0200 net: phy: realtek: restore RTL8211F RGMII delays on resume [ Upstream commit 20c0c677362468b0af23e26e5fdb871ea911bc25 ] RTL8211F and RTL8211F-VD both use rtl8211f_config_rgmii_delay() during initialization and share rtl821x_resume(). The RTL8211F-VD loses its RGMII TX and RX delay enable bits across a software power-down, but the shared resume path only clears BMCR_PDOWN and waits for the receive clock to stabilize. On a BeagleV Ahead configured for rgmii-id, carrier and the negotiated speed return after an interface close/open, but the receive path does not work. At 100 Mbit/s no frames were received. At 1000 Mbit/s all 11 observed frames had CRC errors. Reapply the RGMII delay configuration after the existing resume delay. Tested on a BeagleV Ahead with an RTL8211F-VD at 100 and 1000 Mbit/s, including close/open without a link partner. Fixes: bb726b753f75 ("net: phy: realtek: add support for RTL8211F(D)(I)-VD-CG") Reviewed-by: Andrew Lunn Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20261015045001.83986-1-kmehltretter@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 30801459568eeab9e1a82e74742ef4ce25a7d88e Author: Anirudh Virdi Date: Tue Oct 13 16:24:51 2026 +0530 net: qede: initialize extack in qede_flow_spec_to_rule() [ Upstream commit 106e562966a02f61917c2e0b83909aa2b088447f ] qede_flow_spec_to_rule() declares a netlink_ext_ack on the stack without initializing it. qede_parse_flow_attr() and qede_flow_spec_validate() only set extack._msg on error paths via NL_SET_ERR_MSG_MOD(), so on a successful parse the err_out block reads an uninitialized pointer. If that garbage happens to be non-NULL, DP_NOTICE("%s", extack._msg) dereferences it inside vsnprintf, causing a page fault and kernel panic. This manifests when configuring ethtool ntuple flow rules (ethtool -U flow-type tcp4/udp4) on kernels built with CONFIG_INIT_STACK_NONE=y. With CONFIG_INIT_STACK_ALL_ZERO=y the bug is masked because the compiler zero-initializes extack, making _msg NULL. Reproduced on RHEL 9.8 (kernel-5.14.0-687.47.1.el9_8) and mainline (v7.3-rc6) with the following reproducer: IFACE=ens2f0 ip link set $IFACE up ethtool -K $IFACE ntuple on for i in $(seq 1 100); do ethtool -U $IFACE flow-type udp4 src-ip 192.168.2.$i action -1 done The loop panics reliably after 10-15 iterations with: BUG: unable to handle page fault RIP: string+0x49/0xd0 Call Trace: vsnprintf qede_flow_spec_to_rule+0x2b6/0x4b0 [qede] qede_add_cls_rule ethtool_set_rxnfc Zero-initialize extack so _msg is NULL unless explicitly set by an error path. Fixes: eb705d734525 ("net: qede: use faked extack in qede_flow_spec_to_rule()") Signed-off-by: Anirudh Virdi Reviewed-by: Asbjørn Sloth Tønnesen Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20261013105451.201211-1-avirdi@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 69b78aa3fef0f9c56077578159b94d6b6834f21f Author: Binbin Deng <18983559317@163.com> Date: Wed Oct 14 14:42:04 2026 +0800 octeontx2: Fix use-after-free of qos node in delete path [ Upstream commit dcaa6219648955f7a8160313f1685321dbd1bf28 ] hash_del_rcu() only unlinks the node; a reader that already holds the bucket iterator still uses the node. The immediate kfree() has no grace period, so a concurrent transmit on a socket whose skb priority carries the deleted classid reads node->classid / node->qid from freed memory (use-after-free in the softirq transmit path). Fix this by calling synchronize_net() before the node is freed, as mlx5e does. Found during a static-analysis-assisted audit: candidate sites were surfaced by a Coccinelle rule, and the reader/writer paths were confirmed by LLM-assisted (GLM-5.3) code inspection. The issue was not observed at runtime; it is identified by code inspection only. Fixes: 5e6808b4c68d ("octeontx2-pf: Add support for HTB offload") Signed-off-by: Binbin Deng <18983559317@163.com> Reviewed-by: Ratheesh Kannoth Link: https://patch.msgid.link/20261014064204.291688-1-18983559317@163.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 5c8b1902b865c1039237669c0344ca10ff1b39e9 Author: Rishikesh Jethwani Date: Tue Oct 13 15:35:17 2026 -0600 tls: device: protect async RX resync state during device-down [ Upstream commit f89a228125238f8d4c7e2b8161e2a85fe35307b6 ] tls_device_rx_resync_new_rec() can run in process context with the socket lock held, but without an RCU read lock: from the strparser work item (tls_strp_work()) and from the receive paths (tls_rx_rec_wait(), tls_rx_rec_done()). The resync_async pointer belongs to the driver RX context, which tls_device_down() tears down from the netdev notifier without taking the socket lock; only the softirq entry to the parser is implicitly inside an RCU section. If the parser passes the TLS_RX_DEV_DEGRADED check before device-down sets it, tls_device_down() can complete synchronize_net() and delete the driver context before the parser accesses resync_async->req or its record log. In the asynchronous stage the parser also writes the record log, so this is a write to freed memory, not only a stale read. The RCU section in tls_device_resync_rx() starts after those accesses and therefore does not prevent the use-after-free. Found by code inspection; not reproduced. Hitting the window requires the parser to be preempted between the DEGRADED check and the resync_async access across the device-down grace period and the driver's teardown. Fixes: ed9b7646b06a ("net/tls: Add asynchronous resync") Signed-off-by: Rishikesh Jethwani Link: https://patch.msgid.link/20261013213517.2219663-1-rjethwani@purestorage.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 61076edd5def44417d16ce405c636a02c933555e Author: Eric Dumazet Date: Fri Oct 16 10:48:02 2026 +0200 tcp: tcp_metrics: use the socket netns, not the dst device netns [ Upstream commit 504bdcb8c1566a6f887f9accebe1aa99b502ae97 ] tcp_get_metrics(), __tcp_get_metrics_req() and tcpm_new() look up and create metrics entries in the netns of the cached dst device rather than in the netns of the socket. These usually match, but not after the device has been moved to another netns or unregistered: a socket can keep a stale dst in sk_dst_cache until it is checked again, and tcp_update_metrics() reads it with __sk_dst_get() without any dst_check(). Once dst_dev_put() has run, the dst device is blackhole_netdev and the entry is created in init_net. Before that, for instance for routes through nexthop objects whose cached dsts are released from a nested RCU callback, it is the netns the device has just been moved to. A TCP socket of netns A that enters TIME_WAIT in that window then creates or updates an entry carrying A's addresses and RTT in another netns, where TCP_METRICS_CMD_GET can dump it and where new connections to the same peer inherit those metrics. The metrics belong to the netns of the socket, so use sock_net() for full sockets and request sockets, and pass it to tcpm_new(). Kernel sockets that do not hold a netns reference can still reach tcp_time_wait() after tcp_net_metrics_exit_batch() has flushed the entries of their dismantling netns, and an entry created then would never be flushed and would keep a dangling tcpm_net. Make tcpm_new() refuse to create entries when check_net() fails. Its callers are in an RCU read-side section, and cleanup_net() waits for a grace period between the refcount reaching zero and the flush, so an entry added after a successful check is always seen by the flush. Fixes: 51c5d0c4b169 ("tcp: Maintain dynamic metrics in local cache.") Signed-off-by: Eric Dumazet Cc: Qiliang Yuan Reviewed-by: Neal Cardwell Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20261016084802.2725187-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 53ddc75a2190ef413cc853f5ad8e735327054d0b Author: Fernando Fernandez Mancera Date: Thu Oct 15 14:47:49 2026 +0200 net: openvswitch: drop IP fragments on SCTP set action [ Upstream commit 4d0d8f491307f22aea34b22f73351e1cd2ede735 ] The SCTP checksum is a CRC32c over the whole SCTP packet. set_sctp() updates it as old_csum ^ old_correct_csum ^ new_csum, with the two CRCs computed over the bytes of the current skb only. That is correct only when the skb holds the whole SCTP packet. For a first fragment, and for a later fragment, it holds just a part of it, and the CRC delta of a change at the start of the packet depends on how many bytes follow, so the checksum written is wrong. The receiver drops the reassembled packet. validate_set() accepts SCTP set action for any flow with ip.proto set to SCTP, regardless of the fragmentation bits, as it only receives the masked key. As the checksum cannot be fixed up without the whole datagram, fail the action for packets that are IP fragments of either family, so the packet is dropped with OVS_DROP_ACTION_ERROR instead of being forwarded with modified ports and an invalid checksum. Link: https://lore.kernel.org/netdev/d4fc14f3-4308-4560-9012-43c09c1b3845@ovn.org/ Fixes: a175a723301a ("openvswitch: Add SCTP support") Signed-off-by: Fernando Fernandez Mancera Reviewed-by: Ilya Maximets Link: https://patch.msgid.link/20261015124749.4694-2-fmancera@suse.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 2934793dba55dc195cda36cef86f841db470db0b Author: Fernando Fernandez Mancera Date: Thu Oct 15 14:47:48 2026 +0200 net: openvswitch: skip IPv4 later fragments on TCP/UDP set actions [ Upstream commit 14c0350142ab0a10ebeefed03b779df23749e16a ] An IPv4 later fragment carries no L4 header, but key extraction leaves ip.proto set to the real protocol and the flow may wildcard the frag field, so validate_set() accepts such packets. set_tcp() and set_udp() then treat the first bytes of the fragment payload as an L4 header, rewrite them as ports and patch the bytes at the checksum offset, corrupting the packet. Skip these actions for OVS_FRAG_TYPE_LATER. IPv6 later fragments are not affected, since their ip.proto is NEXTHDR_FRAGMENT and validate_set() rejects L4 set actions for them. Fixes: ccb1352e76cf ("net: Add Open vSwitch kernel components.") Signed-off-by: Fernando Fernandez Mancera Reviewed-by: Ilya Maximets Link: https://patch.msgid.link/20261015124749.4694-1-fmancera@suse.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 743cf225425fe9041ceca379c128825b11ecf2d8 Author: Andrea Righi Date: Tue Oct 20 10:43:20 2026 +0200 sched_ext: Use irq_work for deferred actions with proxy execution [ Upstream commit 9b5ce4345bf4d01dbf9ae5f6f6b1fb9cfdfc7b48 ] maybe_queue_balance_callback() clears SCX_RQ_BAL_CB_PENDING when it queues the deferred callback. Proxy resolution can then zap the callback without running it, leaving the deferred actions unscheduled until a later wakeup or deferred request. Use the existing irq_work fallback for dispatch-time deferred requests when proxy execution is enabled. This keeps the work scheduled even if proxy resolution retries the pick or falls back to idle, without relying on another SCX dispatch to restore a discarded callback. Fixes: a8ad873113d3 ("sched_ext: defer queue_balance_callback() until after ops.dispatch") Reported-by: Tejun Heo Link: https://lore.kernel.org/r/08cac02c604dd73ef96fc92eb29d692b@kernel.org Signed-off-by: Andrea Righi Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit ec8543658d33cbe854f75a6396265d0b41cf94a7 Author: Linus Torvalds Date: Mon Oct 19 19:24:08 2026 -1000 vhost: vringh: use get_user()/put_user() for IOTLB 16-bit accesses [ Upstream commit 95a214f31a3b1ef40034f1e1cb3b9d758a374f01 ] getu16_iotlb() and putu16_iotlb() use __get_user() and __put_user() when the IOTLB maps to user virtual addresses. Nothing nearby checks the translated address: that relies on the mapping having been validated against the user's VMAs when it was set up. Use get_user() and put_user(), which do the same single, untorn access and also check the address. The only atomic-context use, the vdpa simulators' notification check, now disables page faults around it, so the might_fault() in the checked accessors stays quiet there. This is part of getting rid of __get_user() and __put_user() entirely. Tested-and-acked-by: Michael S. Tsirkin Fixes: 42823a871fd4 ("vringh: support VA with iotlb") Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin commit 1257047e91efd9e82550b0aac75c9516a7d9baa9 Author: Rob Herring (Arm) Date: Mon Sep 21 18:28:06 2026 -0500 dt-bindings: clock: mediatek: Add MT8516 fallbacks [ Upstream commit 1d48ecb48e2ab9dd2564e735a1c1b29a5eeeb599 ] MT8516 topckgen and apmixedsys nodes use the common syscon fallback form. Add the MT8516 compatibles to the branches that allow the syscon fallback. Fixes: cd9fdd06b0e8 ("dt-bindings: arm: mediatek: topckgen: Convert to DT schema") Fixes: 16a146735df3 ("dt-bindings: arm: mediatek: apmixedsys: Convert to DT schema") Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260921232807.3137010-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) Signed-off-by: Sasha Levin commit 0271b41b4426101099417ef45ddcd5f7d0db7f64 Author: HyeongJun An Date: Mon Oct 19 21:40:22 2026 +0900 ASoC: cs42l56: Remove the ADC Mute Switch control [ Upstream commit ff404ef11b975baf38c4472c51a6674c239e8021 ] The ADC Mute Switch control writes bits 2 and 3 of the Misc ADC Control register. These are the ADCA Invert and ADCB Invert bits, which have their own controls. The ADC mute bits are bits 0 and 1, and the DAI mute callback already sets them. So the control has never muted the ADCs, and nobody can be relying on it. Remove it rather than point it at the mute bits, so the ADCs are muted in one place only. Fixes: 272b5edd3b8f ("ASoC: Add support for CS42L56 CODEC") Suggested-by: Charles Keepax Link: https://lore.kernel.org/all/atXh3Br+fuH83S0q@opensource.cirrus.com/ Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20261019124022.3410793-1-sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit becb1000d2425a4a05adb41cc224d74d36f5860e Author: Hui Su Date: Wed Sep 16 00:59:53 2026 +0900 sched/mmcid: Fix affinity-triggered switch back to per-task mode [ Upstream commit 7dbc307b6c72a5412e3f4e9fa2e0e926925fc5d6 ] MM CID switches to per-CPU ownership when the number of users of an mm exceeds the maximum number of CIDs. When the affinity union grows, the per-CPU threshold is recalculated and the MM can switch back to per-task ownership through deferred work. mm_cid_calc_pcpu_thrs() incorrectly uses min(nr_cpus_allowed, users) to calculate that switch-back threshold. This makes pcpu_thrs no larger than users, so the users < pcpu_thrs check in mm_update_cpus_allowed() can never succeed. For example, with three users restricted to two CPUs, the MM enters per-CPU mode. On an eight-CPU system, widening the affinity union to all eight CPUs should produce a threshold of four, but the old calculation produces three and returns early. The MM therefore remains in per-CPU mode even though the widened CPU set makes per-task ownership preferable. Calculate pcpu_thrs from nr_cpus_allowed directly. The users bound in __mm_update_max_cids() still controls when per-CPU mode is entered, so this does not change the threshold calculated when switching from per-task to per-CPU ownership. Tested with an x86_64 QEMU reproducer using three users, an initial two-CPU affinity, and an eight-CPU affinity expansion. The baseline does not invoke mm_cid_work_fn() after the affinity expansion. The fixed kernel invokes the deferred work once and completes the switch back to per-task mode. Fixes: fbd0e71dc370 ("sched/mmcid: Provide CID ownership mode fixup functions") Signed-off-by: Hui Su Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260915155953.2856524-1-sh_def@163.com Signed-off-by: Sasha Levin commit 26f73588ab1e46f3f4bc2fc1c0d63deab81d2a25 Author: Liang Hao Date: Wed Sep 30 14:36:21 2026 +0800 timers: Clear pending_map on CPU hotplug [ Upstream commit e7cad586d73276cbd4466de81b2092287d7475c0 ] CPU hotplug migration leaves pending_map bits set on the outgoing CPU while its wheel vectors are empty. After re-online, a later next_expiry recalc can treat those empty buckets as pending and temporarily pull next_expiry forward until collect drains the bits. Clear pending_map under the base lock after migration in timers_dead_cpu(). Fixes: 500462a9de65 ("timers: Switch to a non-cascading wheel") Signed-off-by: Liang Hao Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260930063621.37740-1-haohlliang@gmail.com Signed-off-by: Sasha Levin commit 2af973e5e1eb5d7445f5aeae5661c70df2882ad2 Author: Carolina Jubran Date: Thu Oct 15 11:02:18 2026 +0300 net/mlx5e: Fix NULL deref in PTP TX timestamp recovery warn [ Upstream commit 0df412012a26389582b120844d098e1e961f10a6 ] PTP SQs are allocated via mlx5e_ptp_alloc_txqsq(), which never sets sq->channel. The excessive port timestamp delta recovery path incorrectly used sq->channel->netdev for netdev_warn(), causing a NULL pointer dereference. Use sq->netdev instead. Fixes: 391dad2e686f ("net/mlx5e: Recover SQ on excessive PTP TX timestamp delta") Signed-off-by: Carolina Jubran Reviewed-by: Alex Lazar Signed-off-by: Tariq Toukan Reviewed-by: Kalesh AP Reviewed-by: Vadim Fedorenko Link: https://patch.msgid.link/20261015080218.1102172-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 638eeef3ab3c82243693fbf8a1a92cd3103503ba Author: Carolina Jubran Date: Thu Oct 15 10:40:35 2026 +0300 net/mlx5: DPLL, fix fractional frequency offset scaling [ Upstream commit 0edb8222b852f430e5b5e0475cc2650d409214a0 ] The frequency_diff is reported by firmware in parts-per-trillion, which is exactly what the DPLL core now expects from the ffo_get callback. Commit bc443c253fcd ("dpll: expose fractional frequency offset in ppt") switched the callback contract to ppt but assumed frequency_diff was in ppm and scaled it by 1000000 to "convert" it. Since the value was already ppt, this makes both exported attributes wrong. Report frequency_diff as is and let the core divide it down for the legacy ppm attribute. Fixes: f035dca34ede ("net/mlx5: DPLL, Implement fractional frequency offset get pin op") Signed-off-by: Carolina Jubran Reviewed-by: Jiri Pirko Signed-off-by: Tariq Toukan Reviewed-by: Daniel Machon Reviewed-by: Ivan Vecera Link: https://patch.msgid.link/20261015074035.1092340-1-tariqt@nvidia.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit b7f2125ed66edcb5e990b1f6a2ca9dc5c61a3d30 Author: Karl Mehltretter Date: Tue Oct 20 09:59:21 2026 +0200 rtc: class: Make the time32 hctosys limit configurable [ Upstream commit b253c2e96a80aac8e2bc67b425bf007ed78d4d8c ] The RTC_HCTOSYS feature faces an impossible dilemma on 32-bit systems: a) systemd requires RTC_HCTOSYS=y with the correct timestamp for its intended operation b) broken RTC hardware can produce random future timestamps beyond 2038 at boot time c) time32 userspace immediately hangs if the time is set to a date beyond 2038 and requires timestamps to be clamped d) time64 userspace is intended to survive the actual 2038 date and requires timestamps to not be clamped Commit b3a5ac42ab18 ("rtc: hctosys: Ensure system time doesn't overflow time_t") introduced this limit to protect time32 userspace from future RTC dates that can break boot and address constraints a), b) and c), but broke d) in the process by limiting RTC_HCTOSYS to the time32 range and falling back to RTC_HCTOSYS=n behavior when the RTC time overflows that. Make the behavior configurable with a new RTC_HCTOSYS_TIME32_LIMIT option that chooses between breaking c) or d). On systems with COMPAT_32BIT_TIME=n, only RTC_HCTOSYS_TIME32_LIMIT=n is allowed since userspace can be assumed to be fully built for time64. 64-bit kernels running 32-bit userland never had the cutoff and continue to not offer the option. Warn on rejection with the RTC date and option name so users can identify the cause and find the setting. [arnd: reword Kconfig text and patch description, add COMPAT_32BIT_TIME dependency] ---- I ended up rewriting most of the text but kept Karl's ownership as he did the original patch. Fixes: b3a5ac42ab18 ("rtc: hctosys: Ensure system time doesn't overflow time_t") Link: https://lore.kernel.org/all/20220908115337.1604277-1-arnd@kernel.org/ Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20261020080026.2461578-1-arnd@kernel.org Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit e7c1e5a0dac59601f4fdea152b4e7ab859dd326c Author: Baek Kyu, Kim Date: Tue Oct 20 00:10:24 2026 +0900 rtc: mpfs: Fix alarm register word order [ Upstream commit d691a96370b6cd7e684e4da1c473c09df963611b ] mpfs_rtc_readalarm() swaps the low and high words of the alarm time. The RTC core reads this value during device registration to initialize its alarm timer. This can populate the cached alarm and timer queue with an incorrect expiry time, or leave an enabled hardware alarm out of the timer queue if the decoded time appears to be in the past. Read the low 32 bits from ALARM_LOWER_REG and place the masked high 11 bits from ALARM_UPPER_REG in bits 42:32. This matches the layout used by mpfs_rtc_setalarm() and the low/high assembly in mpfs_rtc_readtime(), so the RTC core imports the programmed alarm time correctly during device registration. Fixes: 0b31d703598d ("rtc: Add driver for Microchip PolarFire SoC") Signed-off-by: Baek Kyu, Kim Reviewed-by: Conor Dooley Link: https://patch.msgid.link/20261019151024.2232338-1-pocj8ur4in@gmail.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 6fb59b588a01d99ae49ebc50cbfbaf498d30b923 Author: James Hilliard Date: Tue Oct 13 14:35:42 2026 -0600 net: stmmac: avoid duplicate XSK TX completions [ Upstream commit daac93975b8ff0a0a036a5e3562236c0b40c3e36 ] stmmac_tx_clean() reports completed AF_XDP TX descriptors through xsk_tx_completed(), but leaves their buffer type as STMMAC_TXBUF_T_XSK_TX. The slots retain that type until they are reused for another buffer type. On interface close or XDP teardown, dma_free_tx_skbufs() walks the entire TX ring, not just the dirty_tx..cur_tx range. stmmac_free_tx_buffer() counts the stale XSK_TX slots again, causing xsk_tx_completed() to advance the completion-ring producer for buffers that have already been returned. This publishes completion entries without matching outstanding TX reservations and corrupts completion accounting for a socket which stays bound across the teardown. Reset the XSK buffer type after counting the completion in both stmmac_tx_clean() and stmmac_free_tx_buffer(). XSK TX slots have a NULL skb pointer and no per-slot DMA mapping, so the SKB type represents an empty slot. Pending XSK descriptors keep their type until they are completed or released, and a released slot can no longer be counted again by a later cleanup. Fixes: 132c32ee5bc0 ("net: stmmac: Add TX via XDP zero-copy socket") Signed-off-by: James Hilliard Link: https://patch.msgid.link/20261013-submit-stmmac-xsk-tx-completion-v1-v1-1-f21b9d098e62@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit d0df668d184893e596c9ce9ec55fff339949c803 Author: Alexandre Cassen Date: Mon Oct 12 12:05:54 2026 +0200 net/mlx5: HWS, fix modify header pool creation race [ Upstream commit e4ab8ab27ab1c9f0cd1589bee471d93319e20c95 ] mlx5_cmd_hws_modify_header_alloc() creates a pool at the index after the last one if no pool matches the pattern. TC and CT allocate modify headers concurrently, meaning two callers can take the same index and the second call fails with -EBUSY. Its error path also destroys the pool it just created although another caller may already use it. Keep such a pool since cleanup releases it. Pools now live until cleanup so the lookup needs no lock. A miss looks again under a mutex before creating the pool. Tested for regressions on ConnectX-7 with firmware 28.48.1000. Fixes: b36315ca69cb ("net/mlx5: fs, add HWS modify header API function") Signed-off-by: Alexandre Cassen Reviewed-by: Moshe Shemesh Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261012100555.1317878-3-acassen@corp.free.fr Acked-by: Tariq Toukan Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 3ad5ffe42adb753fbe1f7bbf3c4424a23356569d Author: Alexandre Cassen Date: Mon Oct 12 12:05:53 2026 +0200 net/mlx5: HWS, fix reformat pool creation race [ Upstream commit d730ca15cf3e4806e38fa8fc6f2af8d7405ef2a4 ] mlx5_fs_get_pr_encap_pool() inserts a new pool when the lookup misses. Two callers allocating the first reformat of a size at once both create one and the second fails with -EBUSY. TC serializes these allocations under encap_tbl_lock while RDMA flow actions on the FDB don't. Sashiko AI review of an earlier series spotted this issue. Tested for regressions on ConnectX-7 with firmware 28.48.1000. Fixes: aecd9d1020e3 ("net/mlx5: fs, add HWS packet reformat API function") Reviewed-by: Moshe Shemesh Signed-off-by: Alexandre Cassen Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261012100555.1317878-2-acassen@corp.free.fr Acked-by: Tariq Toukan Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit e20e5f49c083eeba97f5cb14e02f637473c799e2 Author: James Hilliard Date: Wed Oct 14 12:33:48 2026 -0600 xsk: freeze deferred pool teardown without blocking unregister [ Upstream commit fece8420e76fe53ee84f0439f18d026b4c7641da ] Deferred pool destruction calls ndo_bpf() under RTNL. system_wq is not frozen during system sleep, so that callback can run after a device has suspended and gated its clocks. Use system_freezable_wq so running destruction finishes before device suspend and new work waits until process thaw. Keep assigned pools visible to NETDEV_UNREGISTER independently of the socket list. A released socket has already left that list, but its final pool put can queue destruction after workqueues freeze. A resume-time unregister would then wait for a device reference whose release cannot run until the resume completes. Track assigned pools per netdev with netdev operations locking and detach remaining pools after the notifier socket walk, including copy-mode pools. This also covers leased queues without scanning pools from unrelated devices or network namespaces. Remove the entry on assignment failure and normal teardown. The deferred worker still owns the pool and later observes the cleared device pointer, avoiding a second driver detach or put. The lifetime problem was identified by code inspection of the deferred release and system-sleep paths. Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem") Signed-off-by: James Hilliard Reviewed-by: Björn Töpel Reviewed-by: Jason Xing Acked-by: Stanislav Fomichev Link: https://patch.msgid.link/20261014-xsk-suspend-teardown-v4-1-27795582e4a3@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 5eb28b4f552e334b6d788c5d83165769dc45d450 Author: Sunny Tiwari Date: Sat Oct 17 05:28:56 2026 +0000 RDMA/irdma: Bound in-flight CQP ops across deferred completions [ Upstream commit c3e8e9451e6f1b69f685b75e0fbf14f3d0fb2539 ] On IRDMA_GEN_3+ devices, CQP operations can complete in two stages: Stage-1 on the CCQ acknowledges receipt and moves an entry from cqp->ooo_avail to cqp->ooo_pnd, while Stage-2 signals final completion via an AEQ event or a subsequent CCQ CQE. In irdma_sc_ccq_get_cqe_info(), Stage-1 processing advances cqp->sq_ring.tail so the SQ descriptor slot can be reused once consumed by hardware, whereas cqp->completed_ops is only incremented on Stage-2. Because irdma_cqp_ring_full() only checks cqp->sq_ring, a burst of backlogged commands in dev->cqp_cmd_head allows irdma_process_bh() to submit more concurrent in-flight CQP commands than the maximum supported limit (cqp->sq_size - 1) while earlier commands await Stage-2. This causes CQP completions to be lost and synchronous waiters to time out with -ETIMEDOUT (-110). Fix this by: - Updating irdma_cqp_ring_full() to bound total in-flight CQP operations (cqp->requested_ops - cqp->completed_ops) to (cqp->sq_size - 1). - Calling irdma_process_bh() at the end of irdma_process_ae_def_cmpl() so backlogged commands are drained after Stage-2 AEQ completions increment cqp->completed_ops and free in-flight capacity. Fixes: c7db0abe5f2b ("RDMA/irdma: Add GEN3 CQP support with deferred completions") Assisted-by: Gemini Signed-off-by: Sunny Tiwari Link: https://patch.msgid.link/20261017052856.3570063-1-sunnytiwari@google.com Reviewed-by: Jacob Moroni Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 022e7fcc29f96d6664e0a842ea171d6553dcb651 Author: Yongzhao Chen Date: Tue Oct 13 21:03:39 2026 +0200 net: phy: qca83xx: read resolved QCA8337 link status [ Upstream commit 42a91cbfc7a3ab99d05cb2ed0de5a24b9652cfed ] After a QCA8337 SmartSpeed downshift, genphy_read_status() can report 1000 Mbit/s from the advertised modes when the PHY is running at 100 Mbit/s. On a Redmi AX5400 running downstream OpenWrt Linux 6.18.52, this caused qca8k to program the user-port MAC for 1000 Mbit/s and traffic failed. An earlier prototype that read the resolved speed from the PHY restored traffic. Wrap genphy_read_status() and use at803x_read_specific_status() to replace its speed and duplex result when an autonegotiated link comes up. Resolve pause for the resulting duplex. Until the PHY reports a resolved speed and duplex, report the link as down so that the next poll reads them again, as marvell_read_status_page_an() does. In that case also clear the duplex, master/slave state and link partner modes that genphy_read_status() read for an up link. QCA8337's register layout matches the helper (data sheet 80-Y0619-3 Rev. D, pages 327-328). Keep the generic master/slave read order and the early return for a steady autonegotiated link. This avoids additional reads of the clear-on-read idle error count in MII_STAT1000. Forced mode continues to use BMCR. Report the MDI-X state read at link-up and invalidate it when the link goes down or autonegotiation is disabled. Clear mdix_ctrl because this driver does not implement MDI-X configuration. The QCA8327 entries keep genphy_read_status(). The AR8327 data sheet (MKG-15791 Rev. 1.0) lists the QCA8327-A PHY ID and documents the same PHY-specific status layout, with SmartSpeed enabled after a hardware reset, so those PHYs may have the same problem. That is untested on QCA8327 hardware, so limit this change to QCA8337. Fixes: b3591c2a3661 ("net: dsa: qca8k: Switch to PHYLINK instead of PHYLIB") Suggested-by: Andrew Lunn Signed-off-by: Yongzhao Chen Assisted-by: LLM Link: https://patch.msgid.link/20261013190339.51909-1-yongzhao.derek@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 34441ba500df3d1ada339651f1cdbbee1562a4cd Author: Namjae Jeon Date: Tue Oct 13 09:15:00 2026 +0900 ntfs: fix NULL dereference on index allocation open failure [ Upstream commit 9365c4a1357e2a5d7f1aff140429028ad292161f ] ntfs_index_lookup() returns -ENOENT when ntfs_ia_open() fails to open the index allocation. This error path leaves icx->ib unset, unlike a missing key in an otherwise valid index, which returns an insertion context. ntfs_ie_add() treats -ENOENT as a valid insertion position and dereferences icx->ib when the lookup is not in the index root. A corrupt $I30 bitmap attribute can therefore cause a NULL pointer dereference when adding a directory entry. Return -EIO for index allocation open failures so insertion aborts through the existing error path. Keep -ENOENT for genuinely missing keys and document that other errors leave no valid index entry. Fixes: 0a8ac0c1fa0b ("ntfs: update directory operations") Reported-by: 1sh1ro Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 389ab01cff8a352c46cb137ef382d5eab4c0bbf9 Author: Zhan Xusheng Date: Fri Oct 9 15:55:23 2026 +0800 ntfs: widen the sub-block offsets in ntfs_decompress() [ Upstream commit d45f99f816c9e40cf89b93b90396b1503eda1e47 ] ntfs_decompress() tracks where the current sub-block starts and ends inside the destination page with two u16s: u16 do_sb_start; u16 do_sb_end; ... do_sb_start = *dest_ofs; do_sb_end = do_sb_start + NTFS_SB_SIZE; *dest_ofs is an int page offset masked with ~PAGE_MASK, and NTFS_SB_SIZE is 0x1000, so do_sb_end needs PAGE_SIZE + 0xfff of range. That exceeds u16 once PAGE_SIZE reaches 0x10000: the last sub-block of a page starts at 0xf000 and do_sb_end wraps from 0x10000 to 0. The zero-fill that pads a short sub-block then computes a negative length: if (dp_addr < dp_sb_end) { int nr_bytes = do_sb_end - *dest_ofs; memset(dp_addr, 0, nr_bytes); A sub-block made only of symbol tokens reaches this without consulting do_sb_end on the way, because that path just does *dp_addr++ = *cb++; ++*dest_ofs; and is bounded by dp_addr against dp_sb_end. With do_sb_start at 0xf000 and eight literal bytes emitted, nr_bytes is -61448 and the memset() runs for 18446744073709490168 bytes. Getting there is cheap: fifteen sub-blocks of eleven bytes each advance *dest_ofs to 0xf000, since the same zero-fill pads each of them out to 0x1000 while do_sb_end is still exact, and the sixteenth one triggers the wrap. A compression block is 0x10000 bytes with 4 KiB clusters and the fixed compression unit of 4, so all sixteen fit with room to spare. Phrase tokens are bounded against do_sb_end and so return -EOVERFLOW instead, and the if (*dest_index == dest_max_index && do_sb_end > dest_max_ofs) check at the top of the sub-block stops firing for the same reason. Use int for both, matching *dest_ofs and dest_max_ofs. The narrow type came in with the original import and survived the removal and revert of the driver. Fixes: 1e9ea7e04472 ("Revert "fs: Remove NTFS classic"") Signed-off-by: Zhan Xusheng Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit b51fc8c694c05b1dbae7c496476c83ee7b2e5516 Author: Zhan Xusheng Date: Mon Oct 12 14:20:40 2026 +0800 ntfs: reject direct I/O reads of encrypted files [ Upstream commit b08619bf3c213cd5605d72b363dd3000663c35c1 ] ntfs_file_read_iter() refuses direct I/O for compressed and WOF compressed attributes but lets encrypted ones reach iomap_dio_rw(). ntfs_read_iomap_begin_non_resident() has no NInoEncrypted() test, so it reports IOMAP_MAPPED for the attribute's real clusters and the raw on-disk ciphertext is copied to the caller. Buffered reads are refused by ntfs_read_folio(), but direct I/O never calls it. Fixes: 9c87959601e8 ("ntfs: update file operations") Signed-off-by: Zhan Xusheng Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit a80d34e2da8b43b9c8933acd1f388b8044f965fc Author: Zhan Xusheng Date: Mon Oct 12 14:20:39 2026 +0800 ntfs: do not read ahead encrypted files [ Upstream commit 5db65a43ed8bd1a4c0b01a20e494384bc45e4312 ] ntfs_read_folio() refuses EFS-encrypted files with -EOPNOTSUPP because decryption is not implemented. ntfs_readahead() has no NInoEncrypted() test and passes them to iomap_readahead(), which maps the runlist and fills the folios with the raw on-disk ciphertext. The folios are marked uptodate, so the read that follows never reaches ->read_folio and returns ciphertext instead of -EOPNOTSUPP. ntfs_read_locked_inode() sets NInoEncrypted() and NInoNonResident() for a non-resident encrypted $DATA attribute and rejects the encrypted-and-compressed combination, so none of the three existing conditions fires. read(), mmap(), splice() and fadvise() all populate the page cache through readahead. Skipping readahead leaves the folio unpopulated, so the read falls back to ntfs_read_folio() and gets the intended error. Fixes: b041ca562526 ("ntfs: update iomap and address space operations") Signed-off-by: Zhan Xusheng Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit a84122d8770b23b87a8ab2b9f98817ace43e824a Author: Namjae Jeon Date: Wed Oct 7 17:12:54 2026 +0900 ntfs: propagate EA truncate errors [ Upstream commit 27110888543c046fecdb947fc34bcc3b64313488 ] Propagate errors from truncating an EA stream so callers do not report a successful xattr update after a failed resize. Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations") Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 1820e5d78ca7393866e4615a9b1f17fd3050dc25 Author: Namjae Jeon Date: Wed Oct 7 17:12:45 2026 +0900 ntfs: clear stale pagecache on initialized-size extension [ Upstream commit 58442927b729acbe2b7c7f7ad888d040c44faa3e ] iomap_zero_range() skips holes, so EOF-polluted cache data can survive gap zeroing. Discard the uninitialized cache range before advancing initialized_size so later reads cannot expose stale bytes. Perform the cleanup in ntfs_extend_initialized_size() so both file writes and shared writable mmap preparation use it. Hold the invalidate lock while reading initialized_size, clearing the cache, zeroing the gap, and updating the attribute. Release the lock on every exit path. Fixes: af0db57d4293 ("ntfs: update inode operations") Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit cc93fb374c62ebbb25d696d5f7bf30e022cd2c29 Author: Namjae Jeon Date: Wed Oct 7 16:43:28 2026 +0900 ntfs: sync attribute inode size after resize [ Upstream commit 3e38885ff66c797fc90cf90ab94c372bb4386e84 ] Internal attribute truncation bypasses truncate_setsize(), so successful resizes must update the attribute inode's i_size. Restrict the update to attribute inodes to keep KEEP_SIZE fallocate from changing a file's i_size. Fixes: 495e90fa3348 ("ntfs: update attrib operations") Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 7a82de7f8a31471b6fa388e74abc7c62612babf1 Author: Hyunchul Lee Date: Tue Oct 6 11:24:12 2026 +0900 ntfs: only require compressed size on first extent [ Upstream commit 8deea344965f44d2ccde3e6153f8272196242501 ] The attribute validator required the compressed_size field for every sparse or compressed extent. Continuation extents omit that field, so their valid mapping_pairs_offset of 64 was rejected and compressed reads failed. Fixes: ffc755828de1 ("ntfs: Fix min_len for compressed/sparse attributes in ntfs_non_resident_attr_value_is_valid()") Signed-off-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 73f263f5332ae8f924def3c41a6b50288ac32597 Author: Jiale Yao Date: Sat Oct 3 17:30:34 2026 +0800 ntfs: drain in-flight DIO before buffered write fallback [ Upstream commit c10e0c37697c4dd47006709af49b98cd3af45ddd ] An asynchronous direct write can remain in flight after the inode lock is released. If another direct write falls back to buffered I/O while the first write is still pending, iomap_file_buffered_write() can dirty pages before the first write completes its post-I/O page cache invalidation. The invalidation then finds dirty pages, reports a page cache invalidation failure, and records -EIO in the mapping error sequence. A later fsync() therefore returns -EIO. Commit 15cdefd0c0522f9d5e12d947fa04f4c11649b699 ("ext4: drain in-flight DIO before buffered write fallback") fixed the same race in ext4. NTFS has an equivalent fallback after iomap_dio_rw() returns -ENOTBLK or a short write, but does not drain other in-flight DIO before dirtying the page cache. Wait for in-flight DIO before calling iomap_file_buffered_write() in the fallback path. Since NTFS supports IOCB_NOWAIT, do not enter the blocking fallback for such requests. Return -EAGAIN if no bytes were written, or preserve the positive short-write result if the direct write made partial progress. A reproducer using concurrent AIO direct writes and buffered fallback triggered the following warning and made a subsequent fsync() return -EIO: Page cache invalidation failure on direct I/O. Possible data corruption due to collision with buffered I/O! Fixes: 9c87959601e8 ("ntfs: update file operations") Link: https://lore.kernel.org/r/20260629113827.4074335-3-libaokun@linux.alibaba.com Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Jiale Yao Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit faf1e98e624a45a091de2a8cc636f6a2c7b8d2bc Author: Matthias Goergens Date: Sun Oct 4 17:56:08 2026 +0800 ntfs: do not give a contiguous cluster allocation a second run [ Upstream commit b05a67615b982cfaa903df8a6fb055d18ebafe11 ] ntfs_attr_map_cluster() asks ntfs_cluster_alloc() for contiguous clusters and merges the whole result into the runlist, but reports only its first run, so its callers zero only that run. Within a bitmap page the allocator keeps such a request to one run, because a cluster in use ends it. The zone search can also move on without testing the clusters after the run, though: it skips a bitmap page that has no free clusters, it goes from the end of the zone to the start of pass 2, and once every zone has been searched it shrinks the MFT zone by half and goes on at its new end. After each of these jumps the first cluster tested is still taken as the next one of the run, and if it is free it starts a second run elsewhere on the volume. fallocate() over a hole then leaves the clusters of that second run holding whatever they held before: on a nearly full volume, 16 of 20 fallocated clusters read back a deleted file's data, in each of the three cases. Delayed allocation gets a second run without punching any holes: filling the same volume with write() reaches the last case when the MFT zone is shrunk. The allocator then takes only the first run off the dirty-cluster count, and after the fill statfs() reported no free space while 939 clusters were still free, until the next mount. Before setting the bit of a cluster for a contiguous request, check that the cluster comes right after the run, and return the run as it is if not; no bit has to be cleared. ntfs_attr_map_cluster() already handles a short run, which a cluster in use produces in the same way: its callers ask again for the rest. Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator") Suggested-by: Namjae Jeon Link: https://lore.kernel.org/all/CAKYAXd-agPFvDj2-HvjP3SLtG7AxkqUeNPqYyrLt-BN7fT8w6g@mail.gmail.com/ Signed-off-by: Matthias Goergens Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit b3ea661893590c4eadd1ed26493c6e012889a686 Author: Matthias Goergens Date: Sun Oct 4 17:56:07 2026 +0800 ntfs: do not refuse fallocate() when the MFT zone is empty [ Upstream commit 540fe7e8cf432a7de22064a50bb8c33d1240c1e9 ] ntfs_fallocate() fails with -ENOSPC whenever the MFT zone has shrunk to nothing. The cluster allocator gives the MFT zone up when it cannot find free clusters elsewhere, and nothing restores it before the next mount, so after one such failure every fallocate() on the volume fails with ENOSPC, punching holes included, however much space is freed. The allocator failure fixed by the previous patch was enough to get there: afterwards a one-cluster fallocate() failed with ENOSPC while 123 MiB of the 128 MiB volume were free. write() and truncate() do not look at the MFT zone, and ntfs_allocate_range() already fails with -ENOSPC when too few clusters are free. Remove the check. Fixes: 9c87959601e8 ("ntfs: update file operations") Signed-off-by: Matthias Goergens Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 52df8c5fb224ce77c01a6045ed6038e0605296a2 Author: Matthias Goergens Date: Sun Oct 4 17:56:06 2026 +0800 ntfs: restart the zone search when the allocation hint fails [ Upstream commit 18d4d2a3ce756af690a620a5199616ce2611c2c9 ] When ntfs_cluster_alloc() is given a start_lcn, it first tries the clusters from there on. If that does not satisfy the request, it moves on to the zone's current position, but keeps the pass, the zone_end and the has_guess state it had. That loses free clusters in two ways. If the search had already moved on to pass 2, whose range ends at the hint, it scans only from the zone position to the hint and misses every free cluster between the start of the zone and the zone position. If no cluster had been tested yet, has_guess is still set, so the cluster at the zone position is tried as if it had been the hint, and when that cluster is in use the rest of the bitmap buffer is skipped. Both happen when the hint lies at or past the end of the volume, which ntfs_attr_map_cluster() produces when it extrapolates from the last allocated run across a hole. The allocator then finds nothing, shrinks the MFT zone to nothing trying to satisfy the request, and fails with -ENOSPC. To reproduce on a 128 MiB volume with 4 KiB clusters, extend two files in turn by one cluster at a time, alternating between fallocate(), write() past EOF and truncate() up, so that the runs of each file are separated by holes. When the volume is full, truncate both files back to 1 MiB and start again. During the second round a one-cluster fallocate() fails with ENOSPC while 40 MiB is free. Start the zone over as if no hint had been given. A contiguous request can get there with the run from the hint already allocated, when that run reached the end of a bitmap buffer or of the zone. Return that run instead, as when a cluster in use ends it; going on at the zone position gives the request a second run that its caller does not expect. That could happen before this patch too, whenever the cluster at the zone position was free. ntfs_attr_map_cluster() reports and zeroes only the first run, so after a fallocate() of 20 clusters over a hole, with the hint 4 clusters before the end of the volume, 16 of them read back the data of a deleted file. Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator") Suggested-by: Baolin Liu Signed-off-by: Matthias Goergens Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit d794e2484968dafd3e2f4f004dad4d575051d7e4 Author: Matthias Goergens Date: Sun Oct 4 17:56:05 2026 +0800 ntfs: set the attribute list size before reserving space for it [ Upstream commit 4985f322659f1e667226370e4a7129ebd850c990 ] ntfs_attrlist_update_locked() resizes the attribute list and then, for $MFT, tries to reserve the maximum list size. When that allocation fails with -ENOSPC it falls back to ntfs_attrlist_repack(), which reads the list through ntfs_inode_attr_pread(). The read stops at i_size, but i_size is only updated after the reserve, so when the list has just grown the repack gets a short read and returns -EIO. Only -ENOSPC from the reserve is ignored, so the -EIO fails the $MFT extension and with it the file creation that needed a new mft record. On a 32 MiB volume with 512-byte clusters whose $MFT has a non-resident attribute list, 591 of 1500 creations of empty files succeed and the rest fail with EIO while 742 KiB is still free: ntfs: (device vda): ntfs_attrlist_update_locked(): Failed to reserve attribute list space ntfs: Failed add attr entry to attrlist ntfs: MP update failed ntfs: (device vda): ntfs_mft_record_alloc(): Failed to extend mft data allocation. Update i_size as soon as the list has been resized. File creation then goes on until the volume is full and fails with ENOSPC. Fixes: b1d732e62a5b ("ntfs: repack $MFT/$ATTRIBUTE LIST") Signed-off-by: Matthias Goergens Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 9419091ac2d6f9ee619bca3bc5e70efeadfcf678 Author: Matthias Goergens Date: Wed Sep 30 11:48:35 2026 +0800 ntfs: reject non-resident attributes whose sizes exceed their allocation [ Upstream commit 8e91379152204a9cc18fa7e16724646ad3aec759 ] ntfs_read_locked_inode(), ntfs_read_locked_attr_inode() and ntfs_read_locked_index_inode() take a non-resident attribute's data_size and initialized_size from disk without checking them against its allocated_size. The runlist ends at allocated_size and the read path maps what lies beyond it as a hole, so a data_size larger than the allocation makes reads return zeros that are not on disk, with no error. On a crafted volume with 4 KiB clusters where a 6144000-byte file claims a data_size and initialized_size 64 KiB beyond its allocation, reading the file returns 16 clusters of such zeros. A sparse file behaves the same. A compressed file instead fails with -EIO after a burst of "Still have pages left!" errors from ntfs_read_compressed_block(). Require 0 <= initialized_size <= data_size <= allocated_size, with allocated_size a multiple of the cluster size, when the inode is read, as fs/ntfs3 does in mi_enum_attr(), and fail with -EIO otherwise, which marks the inode bad and the volume as having errors. initialized_size above data_size is rejected too because an extending write zeroes the gap it opens only from initialized_size onwards. An unaligned allocated_size ends inside a cluster that the read path treats as past the end: a crafted 66440-byte file with 4 KiB clusters reads its last 904 bytes as zeros. Sparse and compressed attributes need no exception. Every non-resident attribute has a cluster-aligned allocated_size >= data_size, holes included, on eight public test volumes (seven written by Windows, with LZNT1-compressed files, a sparse $UsnJrnl:$J and a OneDrive placeholder whose unnamed $DATA is one hole, and one by mkntfs), on a volume written by ntfs-3g and on one written by this driver, and the patched driver reads every file on them as before. fs/ntfs3 has enforced the same checks since v6.6, also without exceptions. The layout.h comment saying that data_size can exceed allocated_size for compressed and sparse attributes is corrected. This also covers a non-resident attribute list, which load_attribute_list() reads through ntfs_attr_iget(), and $MFT, whose inode goes through ntfs_read_locked_inode() after the previous patch's check. $MFT's own non-resident attribute list goes through neither: ntfs_read_inode_mount() loads it with load_attribute_list_mount() and ntfs_read_locked_inode() skips it for $MFT, so the check is added there too. The check was already missing in the classic driver; the Fixes tag names the commit that brought that code back. Fixes: 1e9ea7e04472 ("Revert "fs: Remove NTFS classic"") Signed-off-by: Matthias Goergens Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 02fa27256038e8c173b37aae2873cd7749eb053a Author: Hyunchul Lee Date: Mon Sep 28 16:25:13 2026 +0900 ntfs: accept standard sparse compression unit [ Upstream commit 87a548005f7a56e4171ff5d2050c591547b5449f ] Windows native sparse-file inspection shows that a non-resident $DATA attribute can be marked sparse and record the standard compression unit (4) even when the file is not compressed. Fixes: af0db57d4293 ("ntfs: update inode operations") Reviewed-by: Baolin Liu Signed-off-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 04dff7b21f27e8625ced2ae73579652739505dad Author: Hyunchul Lee Date: Mon Sep 28 16:24:51 2026 +0900 ntfs: avoid misclassifying directory reparse points [ Upstream commit 22002cb8b6594830dc0b2d26faf1aa5fa3de94c1 ] Windows directory symlinks and junctions can carry FILE_ATTR_DUP_FILE_NAME_INDEX_PRESENT in their entry while the reparse flag is stored only in. The old directory enumeration path treated such entries as DT_DIR, allowing no-follow userspace scanners to recurse through symlink targets. Fixes: 0a8ac0c1fa0b ("ntfs: update directory operations") Signed-off-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 481f38c9f9006dfdae5a5cdf2f385e571a0a6fed Author: Xuewen Wang Date: Thu Sep 24 09:45:14 2026 +0800 ntfs: account for direct MFT bitmap cluster allocation [ Upstream commit 109c9b0f67f97a34b19491fa82242a2130114903 ] The MFT bitmap extension fast path sets $Bitmap directly, bypassing ntfs_cluster_alloc() and its free_clusters and lcn_empty_bits_per_page updates. Successful extensions overreport free space, and rollback adds back counts that were never deducted. Update both counts under lcnbmp_lock and the bitmap folio lock. Require a nonzero page count and space remaining after delayed-allocation reservations; otherwise use the regular allocator. The page check also prevents underflow when the initial scan recorded zero after a read error. Fixes: 6251f0b0de7d ("ntfs: update super block operations") Suggested-by: Baolin Liu Reviewed-by: Baolin Liu Signed-off-by: Xuewen Wang Reviewed-by: Baolin Liu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 13b5f9ba12e983518c0aca0deb7056f81005f388 Author: Xuewen Wang Date: Thu Sep 24 09:45:13 2026 +0800 ntfs: wait for the bitmap scan before MFT bitmap extension [ Upstream commit 0c3f2944e9060c31a221f32906267b827659b0c7 ] If MFT bitmap extension fails before the initial $Bitmap scan completes, rollback calls ntfs_bitmap_clear_bit(), which holds a folio lock while ntfs_set_lcn_empty_bits() waits for the scan. The scanner deadlocks if it still needs that folio. Wait for the initial scan before taking the runlist or bitmap folio locks and attempting allocation. Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator") Reviewed-by: Baolin Liu Signed-off-by: Xuewen Wang Reviewed-by: Baolin Liu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 8d20b7a996ff57c998c7093a0d5b203a477fd0a4 Author: pwngets <2605452642@qq.com> Date: Wed Sep 23 13:41:06 2026 +0800 ntfs: fix runlist marker allocation and count [ Upstream commit c1bd2f1c22c2fa8c5f0f51f82afad23f2dd1bcf1 ] The marker path can append an unmapped element and an ENOENT terminator after the merge helpers have already computed the resulting runlist count. In that case, allocating ds + 2 elements leaves no room for the terminator at ds + 2. The path also increments new_rl_count even though the merge helper already accounted for the final runlist size, causing a later merge to start past the terminator. Allocate space through ds + 2, and derive new_rl_count from the final terminator index instead of incrementing the count a second time. A crafted NTFS image can reach this path through a normal read after the image has been mounted and trigger out-of-bounds kernel heap accesses. Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator") Assisted-by: OpenAI Codex:GPT-5 Signed-off-by: pwngets <2605452642@qq.com> Reviewed-by: Baolin Liu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit b7729ff67ac04fe7290d53c1401019c778b0c873 Author: Baolin Liu Date: Mon Sep 7 11:00:43 2026 +0800 ntfs: fix error handling in ntfs_extent_inode_open and propagate errors [ Upstream commit 67f27176e2ca8161f212b72ec48d8c8d6e7f5e7e ] ntfs_extent_inode_open() has two issues: 1. When map_mft_record() fails or a stale extent reference is found, it returns the non-NULL 'ni' pointer instead of an error, causing the caller to treat the failure as success. 2. For allocation failures, it returns NULL, losing information about what actually went wrong (-ENOMEM). Fix both by converting the function to return ERR_PTR() on error, and update the single caller (ntfs_inode_attach_all_extents) to check with IS_ERR() and propagate the actual error code with PTR_ERR(). Fixes: af0db57d4293 ("ntfs: update inode operations") Signed-off-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit de91dbfce9dd2116a19d1516b88f6cd51ba800c4 Author: Baolin Liu Date: Fri Sep 4 17:00:54 2026 +0800 ntfs: propagate the ntfs_attr_iget() error in update_reparse_data() [ Upstream commit acb8042c76cbbb8a8a54f4fa1e98aa4f569491c5 ] update_reparse_data() replaces the ntfs_attr_iget() error with -EINVAL, so an -ENOMEM from iget5_locked() or a read failure from ntfs_read_locked_attr_inode() is reported to userspace as EINVAL. The path is reached from __ntfs_create() via the three ntfs_reparse_set_*() helpers, so symlink() and mknod() are affected. Return PTR_ERR(rp_inode) instead. Fixes: fc053f05ca28 ("ntfs: add reparse and ea operations") Signed-off-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 918f33b5f50f2d56fa994b38164709827bd45f6a Author: Baolin Liu Date: Fri Sep 4 17:00:53 2026 +0800 ntfs: propagate the map_mft_record() error in ntfs_attrlist_entry_add() [ Upstream commit 2db4627c57d608df40647f553a3b5cad1691c1c6 ] ntfs_attrlist_entry_add() replaces the map_mft_record() error with -EIO, so an -ENOMEM allocation failure is reported as an I/O error. Both callers pass the value on to ntfs_attr_add(), which no longer collapses it since commit 8efe00b098b5 ("ntfs: preserve error code in ntfs_resident_attr_record_add()"). Return PTR_ERR(ni_mrec) instead. Also fix the debug message. Fixes: 495e90fa3348 ("ntfs: update attrib operations") Signed-off-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 1491b3429fbb4e9a771ba11e95774f0f50e857ec Author: Baolin Liu Date: Fri Sep 4 17:00:52 2026 +0800 ntfs: preserve the truncate error in ntfs_enlarge_attribute() [ Upstream commit 5cd6692db2725b111806a813014db864264ad8f9 ] ntfs_enlarge_attribute() discards the error from ntfs_attr_truncate() and returns -1, which reaches userspace as EPERM. The discarded codes are meaningful: -ENOSPC when the attribute cannot grow, -EACCES when it is encrypted, -EOPNOTSUPP when compressed, plus -EINVAL and -ENOMEM. Most callers of ntfs_inode_attr_pwrite() compare the result against the requested length and substitute -EIO, masking this. ntfs_ib_write() does not; it returns the value verbatim, which propagates through ntfs_index_add_filename() to __ntfs_create() and __ntfs_link(), so a full volume reports EPERM instead of ENOSPC from create(), mkdir() and link(). Fixes: af0db57d4293 ("ntfs: update inode operations") Signed-off-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 5594e147c48319695f0ee6492ba86124010e618e Author: Baolin Liu Date: Fri Sep 4 17:00:50 2026 +0800 ntfs: return -EINVAL from ntfs_collate_ntofs_ulongs() on bad length [ Upstream commit 41001a72daa35ead23d74ee7b6f2373f237c0d72 ] ntfs_collate_ntofs_ulongs() returns -1 when the key lengths differ or are not a multiple of 4. But -1 is also what cmp_int() returns for "collates before", so the error is indistinguishable from an ordinary result. ntfs_ie_lookup() acts on that difference: it maps -EINVAL to -ERANGE, but treats -1 as a tree-descent hint and breaks out of the loop. A malformed entry in $Reparse/$R or $ObjId/$O is therefore silently taken as a lookup miss. Return -EINVAL, as the sibling ntfs_collate_ntofs_ulong() already does. Well-formed keys are unaffected; both indexes use key sizes that are multiples of 4. Fixes: 5218cd102aec ("ntfs: update misc operations") Signed-off-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 316b89335f043e62b524ec6a797e771cf635188a Author: Xuewen Wang Date: Sun Sep 20 14:31:53 2026 +0800 ntfs: preserve the 64-bit FITRIM minimum length [ Upstream commit 406747e46dc8eb73b0976b1e459830927d6022b9 ] The minlen member of struct fstrim_range is a 64-bit byte count, but ntfs_ioctl_fitrim() uses max_t(u32, ...) to compare it with the device's discard granularity. This truncates the requested minimum length before passing it to ntfs_trim_fs(). For example, a minimum length of 4 GiB is reduced to the discard granularity, allowing smaller free extents to be discarded. The truncated minimum length is also copied back to userspace. Use max_t(u64, ...) to preserve the requested minimum length. The bitmap scan already compares the aligned extent length against range->minlen using 64-bit values. Fixes: 9c87959601e8 ("ntfs: update file operations") Signed-off-by: Xuewen Wang Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 9fd4a0af64f716017f1fb4d31ef09e0c199ff003 Author: Hyunchul Lee Date: Mon Sep 21 10:42:57 2026 +0900 ntfs: require page-aligned full-page attribute writes [ Upstream commit 2455958526f9458e2663c079a10e2216131c4438 ] __ntfs_inode_non_resident_attr_pwrite() treats count == PAGE_SIZE as proof that the request covers the complete folio. it allocates the folio without reading it and copies at offset zero. That proof is valid only when pos is page aligned. Fixes: af0db57d4293 ("ntfs: update inode operations") Signed-off-by: Hyunchul Lee Cc: Marek Wesołowski Reviewed-by: Baolin Liu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 8deccf95dfd9b197eb60190e7095bb7d281b5b5a Author: Hyunchul Lee Date: Mon Sep 21 10:41:15 2026 +0900 ntfs: fix FITRIM bitmap indexing for large pages [ Upstream commit 055a8d19788f16d27f07e6ac40155460e3d227b3 ] The LCN bitmap has one bit per cluster, so a bitmap page represents PAGE_SIZE * 8 clusters. ntfs_trim_fs() still used a 15-bit shift when selecting the page. On arm64 with 16 KiB pages this selects the wrong bitmap page and can test or discard the wrong clusters. Compute bitmap indices from buf_clusters, use the page cluster base as the bit-search origin, and keep the requested range as the clipping boundary. Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator") Signed-off-by: Hyunchul Lee Cc: Marek Wesołowski Reviewed-by: Baolin Liu Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 08d1c24d04e2432bc1363f3bd9c72903d03a3532 Author: Marek Wesołowski Date: Tue Sep 15 09:47:22 2026 +0200 ntfs: fix directory lookup on large-page systems [ Upstream commit 3581ef455875aead551f9b92fd1e82c8e6fe3fe1 ] ntfs_lookup_inode_by_name() copies PAGE_SIZE bytes from the index allocation mapping and applies MST fixups to that entire buffer before selecting the requested INDX block. When PAGE_SIZE is larger than the NTFS index block size, the USA count belongs to the smaller INDX block. post_read_mst_fixup() therefore treats the PAGE_SIZE call as not applicable and leaves the update sequence words in place. A directory entry crossing a sector boundary can then be returned by readdir but missed by lookup. Select the INDX block first, apply the fixup using its actual block size, and propagate fixup failures before validating the block. Report fixup failures through ntfs_error() so the configured errors= policy is applied. Return -EIO when post_read_mst_fixup() detects an incomplete multi sector transfer, since this indicates an on-disk metadata integrity error. Reproduced on arm64 with 16 KiB pages and 4 KiB NTFS index blocks. The affected entry was visible in readdir but stat returned ENOENT. Both exact and case-insensitive lookup succeed after this change. Fixes: 0a8ac0c1fa0b ("ntfs: update directory operations") Signed-off-by: Marek Wesołowski Reviewed-by: Baolin Liu Reviewed-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin commit 92425f2d5a838088e06cd6680ee18336359530e8 Author: Ivan Vecera Date: Wed Oct 14 14:14:12 2026 +0200 selftests: tc-testing: use $IP in hfsc test 8c39 setup [ Upstream commit b6ef0d965fe8ce0ee4b4dcb58b3511f83003e42d ] Test 8c39 brings up lo with a bare "ip" command. nsPlugin runs it as "$IP netns exec ip ...", and as tdc runs commands with an empty environment, "ip netns exec" searches only the default execvp() path (/bin:/usr/bin). On systems that install ip only in /sbin, like Fedora, the setup fails: # ./tdc.py -e 8c39 Test 8c39: HFSC classify walk still reaches leaf after lateral drift -----> prepare stage *** Could not execute: "ip link set lo up" -----> prepare stage *** Error message: "exec of "ip" failed: No such file or directory Use $IP like all other tdc tests do. Fixes: 1e24c4f2ee44 ("selftests: tc-testing: add a lateral-drift hfsc classify-walk test") Signed-off-by: Ivan Vecera Reviewed-by: Victor Nogueira Reviewed-by: Hangbin Liu Link: https://patch.msgid.link/20261014121414.2373985-1-ivecera@redhat.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 613cb47d7aabefb2d88b2afd4c290f2b778ccfc7 Author: Matthieu Baerts (NGI0) Date: Tue Oct 13 19:56:39 2026 +0200 mptcp: options: dss: avoid printing uninit csum [ Upstream commit 00e2690c9dad0e09cd2a4435b98de6d8efd5fbc2 ] When parsing the DSS suboption, this pr_debug() might read and print uninitialised checksum value. That's mostly harmless, but that's also confusing. Fixing that also avoids some tools to complain about accessing uninit data. So read this csum field only if it has been set. Note: this was initially reported by Clashiko as an existing issue. The code has been analysed by a human and confirmed. This is a non-urgent fix. Fixes: 390b95a5fb84 ("mptcp: receive checksum for DSS") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20261013-net-next-mptcp-misc-feat-7-4-part2-v1-2-1181e5d2fda4@kernel.org Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 0347c52c0059e6b3073bc231e51e1a71f1aa5c19 Author: Matthieu Baerts (NGI0) Date: Tue Oct 13 19:56:38 2026 +0200 mptcp: options: mpc: avoid printing uninit data [ Upstream commit a234ee8eb9a20d1a272f0d2ceabdb35165071778 ] When parsing the MP_CAPABLE suboption, this pr_debug() might read and print uninitialised values. That's mostly harmless, but that's also confusing. Fixing that also avoids some tools to complain about accessing uninit data. So read these fields only if they have been set. Note: this was initially reported by Clashiko as an existing issue. The code has been analysed by a human and confirmed. This is a non-urgent fix. Fixes: cc7972ea1932 ("mptcp: parse and emit MP_CAPABLE option according to v1 spec") Reviewed-by: Mat Martineau Signed-off-by: Matthieu Baerts (NGI0) Link: https://patch.msgid.link/20261013-net-next-mptcp-misc-feat-7-4-part2-v1-1-1181e5d2fda4@kernel.org Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 5dea1d236e744255903081c00511c95dd763cb19 Author: Pengfei Zhang Date: Tue Oct 13 10:47:47 2026 +0800 net: stmmac: xgmac: do not treat TBU as a TX event [ Upstream commit 305deb54c6c287e586bed92da2375ae1220e8dde ] Commit 8d07a7930434 ("net: stmmac: xgmac: Do not enable TBU interrupt") removed TBUE from the default DMA interrupt mask, but did not remove the TBU check from dwxgmac2_dma_interrupt(). TBU is set whenever a TX channel runs out of descriptors. Since TBUE is not enabled and only enabled bits are cleared, the TBU status bit is never cleared. As a result, TBU stays set on every idle TX channel, regardless of whether there is any TX traffic. With a shared interrupt, stmmac_dma_interrupt() checks all channels, so every interrupt from any source schedules TX NAPI on every idle TX channel. Only use TI to trigger TX processing. Fixes: 8d07a7930434 ("net: stmmac: xgmac: Do not enable TBU interrupt") Signed-off-by: Pengfei Zhang Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20261013024747.2688984-1-zhangfeionline@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 1659d8362cd29c6ae962628f7438a8eb3def2302 Author: Serhat Kumral Date: Sun Oct 18 17:49:07 2026 +0300 RDMA/mlx5: Validate priority in STEERING_ANCHOR_CREATE handler [ Upstream commit bb75e5580b15cd23ededf15683a5ad67d7b61aab ] In MLX5_IB_METHOD_STEERING_ANCHOR_CREATE, the user-supplied u16 priority is passed directly to _get_flow_table() without an upper bound check. This can lead to out-of-bounds array accesses on dev->flow_db priority tables. Check that priority does not exceed MLX5_IB_FLOW_LAST_PRIO before calling _get_flow_table(), matching the existing validation in raw_fs_rule_add() and mlx5_ib_create_flow(). Fixes: 0c6ab0ca9a66 ("RDMA/mlx5: Expose steering anchor to userspace") Signed-off-by: Serhat Kumral Link: https://patch.msgid.link/20261018144907.20123-1-serhatkumral1@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit dc7a80718b4ede6d54fa827846ee7e1a19dcbaa6 Author: Li RongQing Date: Mon Oct 19 13:05:03 2026 +0800 RDMA/mlx5: Fix CQ resize destination index mask [ Upstream commit 0fe31052d948a3a993bb2f58cd5886f7ec279ea7 ] In copy_resize_cqes, the destination CQE index is computed as (i + 1) & cq->resize_buf->nent, but resize_buf->nent is produced by roundup_pow_of_two(), so it is a power of two with exactly one bit set. Masking with a single-bit value can only yield 0 or nent itself. The buffer has nent entries, so valid indices are 0 .. nent - 1 and nent is one past the last slot; whenever the masked result is nent the following memcpy writes one entry out of bounds. Use (nent - 1) as the wrap mask instead. For a power-of-two nent, (i + 1) & (nent - 1) is the correct modulo-nent reduction, keeping the index within [0, nent - 1]. This matches get_sw_cqe(), which addresses the CQ buffer via n & cq->ibcq.cqe, where cq->ibcq.cqe == entries - 1 is exactly the nent - 1 wrap mask. Fixes: bde51583f49b ("IB/mlx5: Add support for resize CQ") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20261019050503.2313-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d6c2174294977869c8e8534a21d5667befd59cd8 Author: Jamal Hadi Salim Date: Mon Oct 12 14:09:25 2026 -0400 net/sched: act_api: reject duplicate actions in a batch [ Upstream commit f67b3ed1308d7a282e2d6202d61af052ab0da39e ] tca_action_gd() builds actions[] with one tcf_action_get_1() per nested TCA_ACT_TAB entry. Each successful lookup takes its own reference to the resolved action, so repeated TCA_ACT_INDEX entries in one request yield the same pointer in multiple slots. For RTM_DELACTION, tcf_action_delete() then consumes two references per slot: one in tcf_action_put() and one in tcf_idr_delete_index(). A duplicate therefore drives the refcount to zero mid-walk -- the delete frees the action and removes its IDR slot -- and the next slot calls tcf_action_put() on the freed action: refcount_t: underflow; use-after-free. WARNING: lib/refcount.c:87 at refcount_dec_not_one refcount_dec_and_mutex_lock __tcf_action_put tca_action_gd Three duplicate entries are enough. Reject a repeated action while a delete batch is built, dropping the reference the extra lookup took, and return -EINVAL. RTM_GETACTION balances its own references and keeps accepting duplicate entries. Conditions to recreate the bug: tc actions add action gact index 100 tc actions delete action gact index 100 action gact index 100 \ action gact index 100 Fixes: 16af6067392c ("net: sched: implement reference counted action release") Reported-by: Sashiko (gemini) Link: https://sashiko.dev/#/patchset/20260824153903.4143642-1-victor@mojatatu.com Signed-off-by: Jamal Hadi Salim Link: https://patch.msgid.link/QDISC-K1TH.v1.r3.20261012134653-1@mojatatu.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 68d5f712fd2bd3c507979c387d14fbdfe65a45cc Author: Fan Wu Date: Fri Oct 2 19:51:34 2026 -0700 ipe: fix enforcement audit [ Upstream commit 0e5f66bf052223aa5c8caeb8554a7577b54c302f ] ipe_audit_enforce() starts an audit buffer but writes the state change with audit_log(), which logs its own record. Ending the unused buffer then emits an extra empty AUDIT_MAC_STATUS record. Remove the unused buffer and log the state change with audit_log() alone. Fixes: a68916eaedcd ("ipe: add permissive toggle") Assisted-by: LLM Signed-off-by: Fan Wu Signed-off-by: Sasha Levin commit 1e1e25e0791c5674aad00805eb4f47334e3251b1 Author: Manuel Ebner Date: Wed Sep 2 17:29:10 2026 +0200 ipe: fix invalid sgid value in audit event documentation [ Upstream commit edf43c031902787117822b23324cf08ccc023bf6 ] The audit event example in the IPE documentation contains 'sgid=)', which is not a valid Set Group ID value. Fix it to use 'sgid=0'. Fixes: ac6731870ed9 ("documentation: add IPE documentation") Signed-off-by: Manuel Ebner Reviewed-by: Randy Dunlap Signed-off-by: Fan Wu Signed-off-by: Sasha Levin commit a9406fd55912882f56e603542cf10295d62dde3d Author: Emil Tsalapatis Date: Mon Oct 19 20:11:07 2026 +0000 bpf: Fix arena race between page free and alloc leading to incoherency [ Upstream commit 7244a2e58d2167292972f9380abb3a4d17a343e3 ] Existing arena kfunc code has an underlying race condition that can lead to writes being lost from the BPF program's point of view: a) A memory range gets freed by operation (1), and its range is added back to the arena range tree. b) A concurrent allocation (2) reallocates the range, and does writes to it. Writes from that CPU may follow the stale TLB entries into the pages that are about to be freed. c) (1) invalidates the TLB. The old pages, and any writes done to them, are now inaccessible. zap_pages() similarly removes the mappings for userspace threads. This can be triggered by particularly demanding BPF arena data structures that constantly allocate and deallocate memory, like hash table allocations. Solve this ABA problem by keeping the range allocated until TLB invalidation and unmapping are complete. Under the arena spinlock, claim any free pages in the range and clear its kernel PTEs. Then drop the spinlock, lock and unlock each cleared page to wait for faults that are still installing a user PTE, flush the kernel TLB and zap the user page tables. Finally, retake the spinlock to release the range. Frees serialize on zap_mutex, so an overlapping free cannot release the range early. Claiming the range only allocates a range tree node when the whole range is free, and then there is nothing to free. User faults on a range that is allocated without a page now raise SIGBUS instead of populating it. That covers a range reserved with bpf_arena_reserve_pages() and a range whose kernel PTEs a free has already cleared. Touching a page while a BPF program frees it is a user space bug, and in a BPF_F_SEGV_ON_FAULT arena it already raises SIGSEGV. Sleepable frees run synchronously and are deferred only when the arena spinlock cannot be taken. The deferred free worker retries such a free in place instead of requeueing itself, so the flush_work() in arena_map_free() waits for all of its work. Fixes: b8467290edab ("bpf: arena: make arena kfuncs any context safe") Reported-by: Mykola Lysenko Suggested-by: Alexei Starovoitov Signed-off-by: Emil Tsalapatis Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261019201108.4552-3-emil@etsalapatis.com Signed-off-by: Sasha Levin commit 6557d00d3ec224cbac727f7b1cdba1e50bd521b0 Author: Emil Tsalapatis Date: Mon Oct 19 20:11:06 2026 +0000 bpf: Revalidate faulted arena pages before installing user mappings [ Upstream commit 05bee0638bacf4e9298bbf0bfef749b6a8ff4478 ] A user fault on an arena pins the page that the kernel arena maps, drops the arena spinlock and returns the page to the core fault code, which then locks the folio and installs the user PTE. A concurrent free can clear the kernel mapping in that window. The page reference prevents a use-after-free, but the fault can still install a user PTE for a page the arena has already released. User space and BPF programs then see different memory at the same arena offset. Close the window from the fault side. Lock the page, recheck that the kernel mapping still points to it, and return it with VM_FAULT_LOCKED so that it stays locked until the core fault code has installed the user PTE. If a free removed the page, drop it and return VM_FAULT_NOPAGE so that the fault starts over. Return VM_FAULT_HWPOISON for a poisoned page. This change alone does not close the race, because the free path does not yet wait for the page lock. The following change makes frees wait for in-flight faults before zapping user mappings. Fixes: 317460317a02 ("bpf: Introduce bpf_arena.") Suggested-by: Alexei Starovoitov Signed-off-by: Emil Tsalapatis Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261019201108.4552-2-emil@etsalapatis.com Signed-off-by: Sasha Levin commit 8bf8cd407961e829e9f2f6c65086f67e9ac5878d Author: Sasha Levin Date: Mon Oct 19 17:10:06 2026 -0400 bpf: Fix ksock build with BPF_LSM=y and SECURITY_NETWORK=n [ Upstream commit a81bd9262cde4b002b95e652453ce5b815c79a62 ] bpf_ksock.c references bpf_lsm_socket_sendmsg() whenever CONFIG_BPF_LSM=y, but the socket LSM hooks, and with them the BPF LSM socket_sendmsg hook, only exist with CONFIG_SECURITY_NETWORK=y. Without it resolve_btfids warns: WARN: resolve_btfids: unresolved symbol bpf_lsm_socket_sendmsg and since commit 201a454df948 ("resolve_btfids: Fix the --fatal_warnings exit status") that fails the build with CONFIG_WERROR=y. Only reference the hook with CONFIG_SECURITY_NETWORK=y, and use BTF_ID_UNUSED otherwise. The ID stays zero, as it was when unresolved, so bpf_ksock_kfunc_filter() keeps allowing LSM programs: none can be attached to socket_sendmsg without CONFIG_SECURITY_NETWORK. Fixes: 7ae4eb14c5f9 ("bpf: Add ksock kfuncs") Signed-off-by: Sasha Levin Signed-off-by: Alexei Starovoitov Acked-by: Mahe Tardy Link: https://patch.msgid.link/20261019211006.2574350-4-sashal@kernel.org Signed-off-by: Sasha Levin commit 5ba729165a9ec590b0a3fde98c24cd063711b89a Author: Waiman Long Date: Mon Oct 19 14:10:16 2026 -0400 cgroup/cpuset: Properly disabling partition when partition state switching fails [ Upstream commit db27a748a399e24af715c54c12a7e928e32d15b0 ] Before commit 103b08709e8a ("cgroup/cpuset: Fail if isolated and nohz_full don't leave any housekeeping"), the partition state can be freely switched from "root" to "isolated" and vice versa. After that commit, the switch from "root" to "isolated" can fail if it exhausts all the housekeeping CPUs. Later on, the switch from "isolated" to "root" can also fail if some of the partition CPUs are boot-time isolated by "isolcpus". A local or remote partition is made invalid when the switch fails. However there are 2 problems with the existing invalidation code. 1) Both the subpartitions_cpus and isolated_cpus are not properly updated. 2) In the case of remote partition with remote_partition flag set, it is not cleared. Fix this by calling the proper partition disabling function in this case. On an x86 test system with boot option "isolcpus=10 cgroup_debug" set and more than 16 cores, the following commands were executed after boot. # cd /sys/fs/cgroup # echo +cpuset > cgroup.subtree_control # cat cpuset.cpus.isolated 10 # mkdir A # echo 10-12 > A/cpuset.cpus # echo isolated > A/cpuset.cpus.partition # cat A/cpuset.cpus.partition isolated Before the patch: # echo root > A/cpuset.cpus.partition # cat A/cpuset.cpus.partition root invalid (partition config conflicts with housekeeping setup) # cat cpuset.cpus.isolated .__DEBUG__.cpuset.cpus.subpartitions 10-12 10-12 After the patch: # echo root > A/cpuset.cpus.partition # cat A/cpuset.cpus.partition root invalid (partition config conflicts with housekeeping setup) # cat cpuset.cpus.isolated .__DEBUG__.cpuset.cpus.subpartitions 10 Reported-by: Tejun Heo Link: https://lore.kernel.org/lkml/7f4c57b26ad120ab30adf35653f1dd94@kernel.org/ Fixes: 4a74e418881f ("cgroup/cpuset: Check partition conflict with housekeeping setup") Fixes: 103b08709e8a ("cgroup/cpuset: Fail if isolated and nohz_full don't leave any housekeeping") Reviewed-by: Guopeng Zhang Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 414e4015da187048048ceeabadce6fe1318fa72e Author: Waiman Long Date: Mon Oct 19 14:10:15 2026 -0400 cgroup/cpuset: Do housekeeping check before converting invalid partition to valid [ Upstream commit 2c0a5742fc459cd8416607acff4a38a1abcb2e1b ] When a hotplug event happens or when update_cpumasks_hier() is called, an invalid partition may be converted back to valid. However check against housekeeping conflict isn't being done which can lead to a partition state that violates the housekeeping rules. Update the code to allow reviving an invalid partition only if it can pass the housekeeping check. Fixes: 4a74e418881f ("cgroup/cpuset: Check partition conflict with housekeeping setup") Reviewed-by: Guopeng Zhang Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 0272122140c2bdd33718f43797be2d41127de316 Author: Waiman Long Date: Mon Oct 19 14:10:14 2026 -0400 cgroup/cpuset: Consider all the exclusive CPUs when doing housekeeping check [ Upstream commit 9527ff78a413e2b4089e78953926af77b98fd43f ] When prstate_housekeeping_conflict() is called to perform housekeeping check with cpumask changes, the cpumask changes are passed in via add_cpus and del_cpus parameters. With this arrangement, the exclusive CPUs owned by the child partitions and not affected by the cpumask change, if any, are excluded in the analysis. The only places where there are separate add and delete masks are when the cpuset.cpus or cpuset.cpus.exclusive is being changed. In both cases, partition_cpus_change() is a good place to perform the housekeeping check. If we allow a root partition to be created under an isolated partition, it is possible the cpumask change will still leave active housekeeping CPUs but then no housekeeping CPUs will be left when the child partitions are disabled or invalidated. As a first step to protect against this possibility, all the exclusive CPUs of the cpuset should be considered to be owned by the current cpuset when doing housekeeping check. At the same time, we do want to know if some housekeeping CPUs are going to be removed from the isolated partition that there will be no danger of losing all the active housekeeping CPUs. So the current add_cpus paremeter is renamed as new_cpus to indicate that it includes the complete set of effective xcpus. With the new check in partition_cpus_change(), the housekeeping check in update_parent_effective_cpumask() with partcmd_update and newmask is now duplicative and can be removed. The housekeeping check in remote_cpus_update(), however, will still be useful as this function can be called directly from update_cpumasks_hier() without going through partition_cpus_change(). The update_parent_effective_cpumask() call from update_cpumasks_hier() is partcmd_update with no cpumask which still have the housekeeping check and so is covered. Fixes: 103b08709e8a ("cgroup/cpuset: Fail if isolated and nohz_full don't leave any housekeeping") Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit a9ae64cb5d2853a4c69df0b824e6319f5d6d05aa Author: Waiman Long Date: Mon Oct 19 14:10:13 2026 -0400 cgroup/cpuset: Consolidate isolated_cpus_can_update() into prstate_housekeeping_conflict() [ Upstream commit 53bbfb33b1f4fd669c5bffcb7670c4099ecbb225 ] The isolated_cpus_can_update() and prstate_housekeeping_conflict() are checking different aspects of upcoming cpumask changes that may conflict with the current setting of the housekeeping cpumasks. There are places where both are called together. There are also places where only one of them is called. That inconsistency can contribute to missing check where invalid cpumask changes may be allowed to move forward. Fix that by consolidating isolated_cpus_can_update() into prstate_housekeeping_conflict() and call prstate_housekeeping_conflict() in all the places where either one of them or both are called. The exception is the validate_partition() function where the prstate_housekeeping_conflict() call is removed. It is because validate_partition() is called only from partition_cpus_change() where prstate_housekeeping_conflict() will be called from either remote_cpus_update() or update_parent_effective_cpumask() with partcmd_update if not for partition invalidatation or disablement. Now prstate_housekeeping_conflict() will be called in the following locations: - when a partition is enabled in remote_partition_enable() or in update_parent_effective_cpumask() with partcmd_enable*. - when a cpumask is updated in remote_cpus_update() or in update_parent_effective_cpumask() with partcmd_update. - when a partition state changes from root to isolated or vice versa in update_prstate(). Fixes: 4a74e418881f ("cgroup/cpuset: Check partition conflict with housekeeping setup") Fixes: 103b08709e8a ("cgroup/cpuset: Fail if isolated and nohz_full don't leave any housekeeping") Reviewed-by: Guopeng Zhang Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 84b854a205091345e626426e98001faf37816196 Author: Waiman Long Date: Mon Oct 19 14:10:12 2026 -0400 cgroup/cpuset: Fix a missing isolated_cpus update in update_cpumasks_hier() [ Upstream commit 46b885416c27214072272b85adb898ed91801062 ] It is found that when a local isolated partition is being invalidated because its parent partition is no longer valid, the isolated_cpus cpumask may not be properly updated. Those isolated CPUs may or may not needed to be removed from isolated_cpus depending on if there is a local isolated partition ancestor that will now own those isolated CPUs instead. Fix that by calling a new ancestor_partition() helper to return the closeset valid partition root ancestor. If that ancestor is PRS_ROOT, the isolated CPUs will have to be removed from isolated_cpus. For a PRS_ISOLATED ancestor, the isolated CPUs are checked against the ancestor's ones to see if any of them should be removed as it is possible that the invalidation of the parent may be caused by change in the effective xcpus of that ancestor. If any of the isolated CPUs should be removed, isolated_cpus_update() will be called under callback_lock. An existing test case in test_cpuset_prs.sh is modifed and a new one added to test that. Fixes: 11e5f407b64a ("cgroup/cpuset: Keep track of CPUs in isolated partitions") Signed-off-by: Waiman Long Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 955fd229d61ea881d4ea13e8196da7040e6a37d4 Author: Gregory Price (Meta) Date: Mon Oct 19 12:21:38 2026 -0400 cgroup/cpuset: use mems_allowed_seq when checking a policy nodemask [ Upstream commit b0cec62d2867ab3ed27604d5c177b8960c43b17a ] A cpuset update changes the task's mems_allowed and rebinds its mempolicy in separate steps under mems_allowed_seq, but the check reads both without it. This can cause a spurious numa placement miss under some cpuset/mempolicy combinations. A reader that loads one mask before the update and the other after it can see a spurious empty intersection and drop the nodemask. For example, a task with cpuset.mems={0} and MPOL_BIND={0}. If the cpuset moves to mems={1,2}, the policy is rebound to {1}. The allocator can race and compare the old mems_allowed {0} against the new policy {1} - which will result in a dropped nodemask and a misplaced allocation on node 2. Simply retry the intersection until mems_allowed_seq is stable. This covers the task policy, which is rebound under mems_allowed_seq. VMA policies are rebound afterwards by mpol_rebind_mm(), outside mems_allowed_seq, and are not covered by this change. Fixes: cc9a6c877661 ("cpuset: mm: reduce large amounts of memory barrier related damage v3") Reviewed-by: Vlastimil Babka (SUSE) Reviewed-by: Waiman Long Signed-off-by: Gregory Price (Meta) Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit eb1567cd017554f366bcad9bb0aa8ce7b859eb99 Author: Kumar Kartikeya Dwivedi Date: Mon Oct 19 15:21:45 2026 +0200 libbpf: Keep the fd_array fill index out of bpf_program__clone() [ Upstream commit b1eaee8b9a95897a5df843c623aa55d9585cd9d8 ] bpf_program__clone() hands the kernel the fd_array of the object along with obj->fd_array_cnt when the caller supplies neither. That counter is not a count the kernel can use: it is the index of the next free slot of an array built for the sparse fd_array API, where module BTF fds start at slot 1 and slot 0 stays empty, since a kfunc insn with offset 0 names vmlinux BTF rather than a slot. A non-zero fd_array_cnt turns the array into a continuous one, which the kernel resolves slot by slot, and slot 0 holds 0. Cloning a program from an object that calls a module kfunc thus fails with "fd 0 is not pointing to valid bpf_map or btf", for every program of the object, which is what veristat runs into on such an object. bpf_object__load() passes the array without a count. Do the same in bpf_program__clone(), leaving the count to callers who pass an array of their own, and rename the counter to fd_array_used so that it no longer reads like the uapi field. Fixes: 970bd2dced35 ("libbpf: Introduce bpf_program__clone()") Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov Acked-by: Mykyta Yatsenko Link: https://patch.msgid.link/20261019132203.3034698-4-memxor@gmail.com Signed-off-by: Sasha Levin commit 285cdffc6f76d3fa20b2a54f39712b9afc865c62 Author: Li RongQing Date: Mon Oct 19 13:11:37 2026 +0800 block, bfq: initialize active lists for all actuators [ Upstream commit 00c2c34ead7e84d6594e20fa37a3c503823f5756 ] Commit 2d31c684a053 ("block, bfq: inject I/O to underutilized actuators") extended bfqd->active_list from a single list_head to an array indexed by actuator, but bfq_init_queue() still only initialized the first two entries: INIT_LIST_HEAD(&bfqd->active_list[0]); INIT_LIST_HEAD(&bfqd->active_list[1]); For devices with more than two independent access ranges, the remaining list heads stay zeroed by kzalloc() and are never set up as empty lists. When BFQ later adds a bfq_queue to one of those lists, list_add() writes through head->next, which is NULL, corrupting the list or crashing the kernel. Initialize every actuator's active list using bfqd->num_actuators, which is already set up earlier in bfq_init_queue(). Fixes: 2d31c684a053 ("block, bfq: inject I/O to underutilized actuators") Signed-off-by: Li RongQing Reviewed-by: Damien Le Moal Reviewed-by: Yu Kuai Link: https://patch.msgid.link/20261019051137.1715-1-lirongqing@baidu.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 1cd36f545a9195280662feb245b50f2f2bda9b76 Author: Cen Zhang Date: Mon Oct 19 17:06:13 2026 +0800 ALSA: aloop: Keep the timer source alive until card release [ Upstream commit 762ef425cf0ac9c4b9e9e61e0da0950e16e6fbea ] The timer_source string must remain valid while PCM opens can select and parse it. loopback_set_timer_source() allocates the string with parent-device devres, which can release it while the card is still registered. A successful nonempty proc replacement after snd_card_register() adds the string allocation after trigger_card_free. Unbinding the platform device while snd_aloop remains loaded releases devres in reverse order. An open for an unused cable can run after the string is freed and before the card-free action disconnects the card: Device unbind PCM open devres_release_all() free replacement string snd_pcm_open() snd_card_file_add() loopback_open() loopback_snd_timer_open() loopback_parse_timer_id() trigger_card_free() snd_card_free() snd_card_disconnect() The parser can then read freed memory. KASAN has reported a one-byte use-after-free read in strchr() from loopback_snd_timer_open(). The cable_lock mutex serializes explicit replacements with opens, but implicit devres release does not take it. The card and module references held by PCM open do not retain this separate devres allocation. Use kstrdup() and release the current string from card->private_free. PCM admission already retains the card until each file is removed, and card disconnect drains proc callbacks before final card release. This keeps the string alive across admitted PCM opens and preserves the cable_lock serialization of replacements. Install the callback before the initial allocation so probe failures also release the string. Fixes: b072e65aadd6 ("ALSA: aloop: Allocate resources with device-managed APIs") Signed-off-by: Cen Zhang Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-71a33a26d68356e3ade7-v1-108d86919c5c92fe1ea8@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 8a9c4702b52557f5ce1b98587df18bb0978bc36b Author: Cen Zhang Date: Mon Oct 19 17:05:21 2026 +0800 ALSA: aloop: Keep shared timer callbacks alive through close [ Upstream commit a7d4d780f34b9e43eefab6a7e6c9f4101f2c144e ] The shared sound-timer callback must finish using the selected PCM runtimes before a close can detach them. loopback_snd_timer_period_elapsed() saves the active substreams under cable->lock, then drops the lock before calling snd_pcm_period_elapsed() or snd_pcm_stop_xrun(). The sound-timer backend has no per-stream close drain, and free_cable() keeps the timer open when the paired endpoint remains attached. With both directions running on a shared sound timer, playback can be dropped and closed while a notification is pending. Capture keeps the timer alive, allowing this order: Timer callback Playback owner -------------- -------------- select playback under cable->lock unlock; delay notification DROP; HW_FREE -> OPEN close: snd_pcm_drop(); unlock free_cable(); peer stays alive snd_pcm_period_elapsed() lock stream; cache runtime snd_pcm_detach_substream() free runtime and its fasync read runtime->fasync The stream lock taken by snd_pcm_drop() cannot protect a notification that starts after it returns, and detach does not take it. The callback can therefore read runtime->fasync after the runtime has been freed, and an escaped notification can also reach a replacement runtime if the same substream slot is reopened before the notification resumes. Take the existing cable->stop_count reference under cable->lock when selecting the targets and release it after the PCM callbacks finish, including the XRUN path. free_cable() already removes the closing endpoint under that lock and waits for stop_count before returning, so runtime detach and slot reuse cannot overtake the notification. Fixes: 26c53379f98d ("ALSA: aloop: Support selection of snd_timer instead of jiffies") Signed-off-by: Cen Zhang Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-275c4399f517e09d7188-v2-2f64c1328529ef7a8fec@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit db521044a0fc4b4215ac160cf88e8f3c3d96a866 Author: Marek Vasut Date: Sun Oct 4 03:18:13 2026 +0200 PCI: rcar-gen4: Add missing PM ops [ Upstream commit 6b8c12d354dfa9c80d82eea8c0c45d331a28be11 ] The R-Car Gen4 PCIe controller is part of a power domain. On R-Car S4 and V4H, this is an always-on power domain which is not shut down in suspend. On R-Car V4M, this is a dedicated A2PCIPHY power domain, which is shut down during suspend, and the controller loses state, which prevents the PCIe from working after resume. Fix this by adding generic suspend/resume noirq ops for the controller, which tear the link down on suspend, and restart it on resume. Use the same PM ops on all of R-Car Gen4 to gracefully suspend and resume the PCIe link on V4H and S4 too. Test case which demonstrates the problem on R-Car V4M: $ hexdump -vC /sys/bus/pci/devices/0000:00:00.0/config > /tmp/pre $ echo s2idle > /sys/power/mem_sleep $ echo platform > /sys/power/pm_test $ echo mem > /sys/power/state $ hexdump -vC /sys/bus/pci/devices/0000:00:00.0/config > /tmp/post $ diff -Naru /tmp/pre /tmp/post ... -00000000 12 19 32 00 07 05 10 00 00 00 04 06 00 00 01 00 +00000000 12 19 32 00 07 05 10 00 00 00 00 ff 00 00 80 00 ^^^^^ Class 0604->00ff Fixes: 0270dbe4f891 ("arm64: dts: renesas: r8a779h0: Add PCIe Host and Endpoint nodes") Reported-by: Geert Uytterhoeven Signed-off-by: Marek Vasut Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Geert Uytterhoeven Tested-by: Koichiro Den Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20261004011851.866833-1-marek.vasut+renesas@mailbox.org Signed-off-by: Sasha Levin commit c50f364a2a534d00f72b997c58aa153c9ae70a60 Author: Jinpyo Lee Date: Mon Oct 12 20:27:10 2026 +0900 nfs/localio: pin UUIDs during global invalidation [ Upstream commit 62e14699c4dfc98c514a44bf780678cf8622fc08 ] nfs_localio_invalidate_clients() moves UUID nodes embedded in nfs_client objects to a private list, then walks that list without retaining the containing clients. Concurrent client teardown can free an entry that the iterator has already selected, causing a use-after-free. Take a reference to each selected UUID under the namespace list lock. Keep this reference count in nfs_common, independently of cl_count, and have nfs_free_client() drain temporary UUID users before freeing the client. Releasing a UUID reference wakes waiting probes and signals completion when the last reference is dropped. It neither calls into nfs.ko nor performs final NFS client teardown in the NFSD invalidation context. Keep the UUID on the namespace list until its files have been closed. When another thread is already disabling it, wait for that thread to finish unlinking it instead of repeatedly selecting the same head entry. The wait releases the UUID spinlock so file cleanup can make progress. Append registrations in sequence order and capture the last sequence under the namespace list lock at the start of invalidation. Stop at that boundary so new registrations cannot indefinitely extend the sweep, even if its original last entry is removed concurrently. Publish the LOCALIO association under the UUID and namespace list locks before making the entry visible to invalidation. A temporary UUID reference allows the handshake to drop the global lookup lock before taking the UUID lock in the documented order; recheck the lookup in case the probe was withdrawn. A new probe waits for temporary UUID users to drain, then rechecks the association before reusing the UUID. This keeps a transient invalidation reference from discarding the client's LOCALIO revalidation attempt. Withdraw pending probes before dropping the owner's UUID reference. A deterministic same-base KASAN reproducer triggered the reported use-after-free on the unpatched tree. With this patch, the same controlled invalidation and teardown race completed without the target KASAN report or another selected kernel diagnostic. A separate all-live run recorded disable events for all 16 unique clients. Test-only synchronization hooks verified that a second disabler waits for unlink after ->net is cleared and that client teardown waits for a temporary UUID reference to drain. NFSv4.2 and NFSv3 read, write, and unmount smoke tests, export-flush and I/O stress, NFSD restarts, network namespace lifecycle tests, and module unloads passed with KASAN and lockdep enabled. A full x86_64 kernel and modules build with GCC 13.3, CONFIG_WERROR=y, NFS_FS=m, NFSD=m, and LOCALIO enabled completed without diagnostics. Module metadata showed that nfs_localio.ko depends only on sunrpc, while nfs.ko depends on lockd, nfs_localio, and sunrpc. A separate NFS_FS=m, NFSD=y build also linked vmlinux successfully. The vulnerability research and validation were conducted by members of the Tobabz team as part of the Best of the Best 15th program. Fixes: 085804110aa1 ("nfs_common: track all open nfsd_files per LOCALIO nfs_client") Assisted-by: LLM Signed-off-by: Jinpyo Lee Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit c43eaf4df3bee6229bef3b7fcd1933ec16d18976 Author: Tigran Mkrtchyan Date: Sun Oct 11 00:18:38 2026 +0200 pNFS/flexfiles: make pg_init retry loops killable [ Upstream commit fde27289503beabe7e0856dac164a5ced4be0342 ] When a task is killed while the pNFS client connects to a data server, nfs4_pnfs_ds_connect() fails with -ERESTARTSYS. If the layout has FF_FLAGS_NO_IO_THRU_MDS set, ff_layout_pg_init_read() cannot fall back to the MDS and retries after an uninterruptible ssleep. As the fatal signal stays pending, every new connect attempt is aborted the same way and the task loops forever without returning to user space: # grep -E 'SigPnd|ShdPnd' /proc/156021/status SigPnd: 0000000000000100 ShdPnd: 0000000000000100 # cat /proc/156021/stack msleep+0x2e/0x50 ff_layout_pg_init_read+0x267/0x310 [nfs_layout_flexfiles] __nfs_pageio_add_request+0x1c1/0x480 [nfs] nfs_pageio_add_request+0x21d/0x2c0 [nfs] nfs_read_add_folio+0x143/0x200 [nfs] nfs_readahead+0x204/0x290 [nfs] read_pages+0x62/0x230 page_cache_ra_unbounded+0x136/0x180 filemap_get_pages+0xf2/0x350 filemap_read+0xd5/0x320 nfs_file_read+0x6d/0xc0 [nfs] vfs_read+0x24f/0x3a0 __x64_sys_pread64+0x90/0xc0 do_syscall_64+0x5f/0xe0 Previous attempt propagates the error from nfs4_ff_layout_prepare_ds(), but only ff_layout_{read,write}_pagelist() look at it. The pg_init functions test IS_ERR() and retry on any error. Check for a fatal signal or an exiting task before sleeping in ff_layout_pg_init_read() and ff_layout_pg_init_write() and fail the I/O instead of retrying. Fixes: f06bedfa62d5 ("pNFS/flexfiles: don't attempt pnfs on fatal DS errors") Signed-off-by: Tigran Mkrtchyan Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit fa3134b8eddac8db8c688219263938f5c44a94ee Author: Tigran Mkrtchyan Date: Fri Oct 9 17:58:02 2026 +0200 nfsv4/pnfs: use the MDS authflavor for data server connections [ Upstream commit 4b27670ea25b955b710021151471cb252240b1e0 ] When a pNFS client connects to an NFSv4.1 data server, the EXCHANGE_ID is always attempted with RPCSEC_GSS krb5i first, even if the auth flavor with the MDS is AUTH_SYS. On a host that runs rpc.gssd but has no usable machine credential, every first contact with a data server therefore upcalls to rpc.gssd before falling back to AUTH_SYS. As nfs4_discover_server_trunking is serialized by nfs_clid_init_mutex such an extra upcall creates a backlog of DS connections when many files accessed in parallel. Pass the authflavor of the MDS lease to nfs4_alloc_client() and skip the krb5i attempt if the MDS already ended up with AUTH_SYS. Nothing changes for the MDS itself, or for data servers of an MDS whose lease was established with krb5i. Fixes: 4edaa308888b ("NFS: Use "krb5i" to establish NFSv4 state whenever possible") Signed-off-by: Tigran Mkrtchyan Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 86485225ddfcec0f904e20383f33625ac2d5088e Author: Wenjie Qi Date: Fri Oct 16 13:44:06 2026 +0800 f2fs: refresh pinned allocation boundary after resize [ Upstream commit e4df12e37300d4e181ae76746ae0fd7f7b92aa36 ] Online shrink updates MAIN_SECS() but leaves resizable_tail_secno and pinned_area_max_secno unchanged. The pinned allocation limit can exceed the new main area when shrinking beyond the reserved tail. Consume the reserved tail by the number of removed sections, clamping it to zero, before refreshing the shared pinned allocation boundary. This preserves the boundary while shrinking within the reservation and limits it to the new main area otherwise, retaining the zoned limit. Save the old tail count and restore it before rolling back the geometry if the final checkpoint fails. Also bound pinned section allocation by the current MAIN_SECS(). Range evacuation temporarily reduces it before moving cursegs, while the cached pinned boundary still describes the old geometry. Otherwise, a pinned curseg can be reallocated into the range being removed. Fixes: c966d29e01bb ("f2fs: support resizable tail section and unify pinned allocation") Suggested-by: Daeho Jeong Signed-off-by: Wenjie Qi Reviewed-by: Daeho Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin commit 2762cb36378cf162521cb6fcd073d1c39b3ffecd Author: Cen Zhang Date: Mon Oct 19 18:29:33 2026 +0800 ALSA: pcm: Protect channel-map reads against runtime detach [ Upstream commit bb4834d5242c4829c0d8467ee68eb25a9bafc38d ] Channel-map controls remain accessible between PCM opens. In-tree HDA code publishes the generic controls through add_std_chmaps(), so a SNDRV_CTL_IOCTL_ELEM_READ can overlap the final close of the same PCM substream. pcm_chmap_ctl_get() checks substream->runtime and later reads its channel count. Final close clears and frees that runtime under pcm->open_mutex, while the control callback holds only controls_rwsem: Control GET Final PCM close ----------- --------------- snd_ctl_elem_read() down_read(controls_rwsem) pcm_chmap_ctl_get() check substream->runtime lock(pcm->open_mutex) snd_pcm_release_substream() snd_pcm_detach_substream() substream->runtime = NULL kfree(runtime) unlock(pcm->open_mutex) substream->runtime->channels NULL or freed-pointer access up_read(controls_rwsem) Reloading the cleared field can fault through NULL, while retaining the old pointer can access freed storage. controls_rwsem keeps the control alive, but does not serialize the matching PCM close. Copy the channel count under open_mutex and use that scalar for the map lookup. Use trylock with -EBUSY because snd_pcm_dev_disconnect() takes open_mutex before removing controls under controls_rwsem; blocking in the reverse order from GET could deadlock. Fixes: 2d3391ec0ecc ("ALSA: PCM: channel mapping API implementation") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-0b5d6bc7124d0b921f2c-v4-b9738bdeab8823999181@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 0528274253331530aff6a0f2df01226a0c4ad481 Author: Cen Zhang Date: Mon Oct 19 18:30:54 2026 +0800 ALSA: jack: Pin the module while debugfs files are open [ Upstream commit 8b479b265301e97bfbec0ef25de1c1f7eb4d2f74 ] With CONFIG_SND=m and CONFIG_SND_JACK_INJECTION_DEBUG enabled, an in-tree HDA jack creates these debugfs files through snd_jack_new() and snd_jack_add_debugfs(). Their file_operations live in snd, but none sets .owner. full_proxy_open_regular() therefore takes no snd module reference when it calls fops_get(real_fops). A debugfs descriptor can outlive removal of its HDA card. Once the card and dependent modules, including the OSS emulation modules, have been removed, snd can be unloaded while that descriptor is still open: Descriptor holder Card/module teardown ----------------- -------------------- open jack debugfs file full_proxy_open_regular() fops_get(real_fops) owner == NULL: no snd pin keep descriptor open remove HDA card snd_card_disconnect() snd_jack_dev_disconnect() remove debugfs nodes snd_jack_dev_free() unload dependent modules rmmod snd alsa_sound_exit() free_module(): unmap snd close descriptor full_proxy_release() read real_fops->release fops_put(real_fops) read real_fops->owner debugfs_remove() drains active operations, but does not wait for idle open descriptors. Release deliberately bypasses removal protection and reads the real table even when no release callback is installed. The last close can therefore access unloaded snd storage. Set .owner to THIS_MODULE in all six tables. The existing proxy fops_get()/fops_put() pair then keeps snd loaded through the final table access on close. Fixes: 2d670ea2bd53 ("ALSA: jack: implement software jack injection via debugfs") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-431ddb947e1a13b95d3a-v3-02d37dd7b4eb4774e100@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit e1fc6021ada9c6cb2334264908fd2ef75a1b753c Author: Takashi Iwai Date: Mon Oct 19 12:23:38 2026 +0200 ALSA: usb-audio: Avoid applying boot quirk for Behringer UMC204HD [ Upstream commit e88f4749c02fba11c62e880c29d35d254b7e69d0 ] There have been reports about a regression with the recent boot quirk for Behringer devices; it broke UMC204HD models(1397:0508 and 1397:0509). The quirk was to just run usb_get_descriptor(), so I expected it rather harmful, but in this case, it doesn't look so, resulting in an error like 'failed to read device descriptor: -110' that leads to a fatal probe error. As a quick workaround, skip the quirk for those UMC204HD models. Fixes: b5c4823cf3e4 ("ALSA: usb-audio: Apply boot quirk for Behringer models generically") Reported-by: Will Bush Closes: https://lore.kernel.org/45162613-2802-401c-84c9-742f9c8c68e6@app.fastmail.com Closes: https://bugzilla.suse.com/show_bug.cgi?id=1285896 Link: https://patch.msgid.link/20261019102347.2425406-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit da3978f32236816cdaed20079c9c7d9d088eeed8 Author: Cen Zhang Date: Mon Oct 19 18:01:46 2026 +0800 ALSA: pcm: Remove channel-map controls before freeing substreams [ Upstream commit d5dd05c1f72a95d8ab06828d7272a185ad2b9185 ] A late HDA codec bind on an already registered card builds new PCMs before registering them. add_std_chmaps() publishes generic channel-map controls during this BUILD stage. If an earlier chmap succeeds and a later allocation fails, probe cleanup frees the BUILD PCM while the card's control device remains accessible. These generic controls are added directly by snd_pcm_add_chmap_ctls(); snd_hda_ctls_clear() only removes codec-tracked mixer controls. BUILD devices also skip dev_disconnect. snd_pcm_free_stream() then frees the substreams before free_chmap() withdraws their generic control: Late HDA codec bind / rollback Control GET on the live card ------------------------------ ---------------------------- hda_codec_driver_probe() snd_hda_codec_build_pcms() PCM is BUILD snd_hda_codec_build_controls() add_std_chmaps() publish an earlier chmap later allocation: -ENOMEM snd_hda_codec_cleanup_for_unbind() snd_hda_ctls_clear() generic chmap remains codec_release_pcms() snd_device_free() BUILD: skip dev_disconnect snd_pcm_free_stream() kfree(substream) snd_ctl_elem_read() down_read(controls_rwsem) pcm_chmap_ctl_get() walk freed substream free_chmap() snd_ctl_remove() wait for GET up_read(controls_rwsem) The control read lock cannot protect a substream already freed before control removal starts. The failure above occurs before snd_card_register(), so the PCM has not transitioned out of BUILD. Move free_chmap() before the substream free loop. Its snd_ctl_remove() withdraws the control and drains readers under controls_rwsem before any substream is released. Normal registered-device disconnect already removes the control, so the later call remains harmless on that path. Fixes: 2d3391ec0ecc ("ALSA: PCM: channel mapping API implementation") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-4a207d9ef3a3597a74a4-v4-80b0113669b1a62fbbe9@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit ee65450f168eca7367672885825bb9bff6670c17 Author: Cen Zhang Date: Mon Oct 19 17:04:42 2026 +0800 ALSA: pcmtest: Pin the module while pattern files are open [ Upstream commit 069003afab42b5a9394faa6985a3d76bd4700e72 ] The fill_pattern_fops table must remain alive until the final release of each pattern debugfs file. It has no .owner, so the fops_get() call in full_proxy_open_regular() does not take a PCMTest module reference. With snd-pcmtest loaded as a module, a user with permission to open a fill_patternN file and unload the module can retain the descriptor across normal unload, provided no PCM file or other module reference prevents it. The following ordering is possible: Pattern file user Module unload ----------------- ------------- open(fill_patternN) full_proxy_open_regular() fops_get(fill_pattern_fops) owner == NULL: no module pin keep the descriptor open mod_exit() clear_debug_files() debugfs_remove_recursive() drain active operations return from mod_exit() free_module() free the module image close(fd) full_proxy_release() read real_fops->release -> UAF fops_put(real_fops) read real_fops->owner access freed module memory Even though the table has no release callback, reading those fields is a use-after-free and can fault. The retained dentry keeps the proxy's bookkeeping alive, but does not retain the module storage. Set .owner to THIS_MODULE so the existing fops_get()/fops_put() pair pins PCMTest until final release has finished accessing the table. Normal module unload is then blocked while any pattern file is open. Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Signed-off-by: Cen Zhang Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-1ce354e709dbab28e563-v2-6b2ea0aa16ec39442f6d@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 7723e8cc0376877b6ca6d04edcc6a41b46e8c82e Author: Thomas Weißschuh Date: Mon Oct 19 11:49:04 2026 +0200 nios2: ksyms: Declare __mulsi3 export [ Upstream commit 2180d11e06fb56fd13643ae59964f144896870be ] GCC may emit libcalls to __mulsi3(). As modpost is not aware that this function is provided through the linked in libgcc, it fails: ERROR: modpost: kernel/locking/test-ww_mutex.ko: symbol '__mulsi3' undefined! ERROR: modpost: kernel/time/test_udelay.ko: symbol '__mulsi3' undefined! ERROR: modpost: kernel/resource_kunit.ko: symbol '__mulsi3' undefined! ERROR: modpost: fs/fuse/virtiofs.ko: symbol '__mulsi3' undefined! etc. Make sure modpost can see the symbol from libgcc. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202610171933.J4bFOfL8-lkp@intel.com/ Fixes: 2fc8483fdcde ("nios2: Build infrastructure") Signed-off-by: Thomas Weißschuh Acked-by: Arnd Bergmann Signed-off-by: Dinh Nguyen Signed-off-by: Sasha Levin commit f6719930b2f552918578a1b7d7f72cb252b73446 Author: Len Brown Date: Mon May 4 15:38:34 2026 -0400 tools/power turbostat: pmt: Improve sscanf() hygiene [ Upstream commit e817a533bbc0aef5a9cb6255153941ed968d2fb1 ] Explicitly check sscanf() return values for number of matches, and handle EOF (-1). Defensive programming -- not an issue actively seen by users. Fixes: 4265a86582ea ("tools/power turbostat: Add PMT directory iterator helper") Assisted-by: Claude:claude-sonnet-4.6 Signed-off-by: Len Brown Signed-off-by: Sasha Levin commit e14e70235da78d3fd75f80a2b8b6366ca6085750 Author: Miklos Szeredi Date: Mon Oct 19 14:56:11 2026 +0200 dax: add fsdev_dax_from_file() [ Upstream commit c87dd99b6d0fe07e836c1593c03e8174029c66f4 ] If the file is a fsdev_dax open, take the dax_dev from the device inode's i_cdev. Return with a reference grabbed on the private dax inode. Make dax_dev_get() static again (internal to super.c for alloc_dax), export fsdev_dax_from_file() instead. This fix is in response to a Sashiko review, and some subsequent analysis. About the 'fixes' tag: this removes the export of dax_dev_get(), which was flawed, and replaces it with fsdev_dax_from_file(). It feels like the fixes tag makes sense for correcting an ABI error. Fixes: 2ae624d5a555d ("dax: export dax_dev_get()") Originally-by: John Groves Reviewed-by: Dave Jiang Reviewed-by: Gregory Price (Meta) Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin commit 769db199bff3eeeec0545ac722dc4f3d23f1cdb0 Author: Lorenzo Bianconi Date: Mon Oct 19 11:54:03 2026 +0200 netfilter: flowtable: reset transport header after nf_flow_encap_pop() [ Upstream commit 08f7882637f2db5b98f521498eeaf94770383a6e ] nf_flow_encap_pop() pulls vlan/pppoe or ip tunnel headers and resets the network header, but leaves the transport header pointing into the removed outer header. Reset the transport header to the inner L4 header, otherwise later consumers (e.g. GSO segmentation) parse a bogus header. Fixes: 4cd91f7c290f ("netfilter: flowtable: add vlan support") Signed-off-by: Lorenzo Bianconi Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 283f5b9c6b7ef942af22eb991aecd4c3844eba9d Author: Sung Byeongchan Date: Fri Oct 9 03:38:14 2026 +0900 netfilter: xt_dccp: handle reserved options as single-byte [ Upstream commit 2edda78aa4eb04cd8f112a81897510ee0cdd7099 ] The DCCP UAPI defines option numbers 3 through 31 as reserved. Like Padding and Mandatory, these options occupy one byte. dccp_find_option() only treats values below 2 as single-byte and interprets the byte after a reserved option as a TLV length. This can skip a later option and invert an XT_DCCP_OPTION rule result. A local production-hook fixture installed the same DROP rule for IPv4 and IPv6. In three fresh boots per kernel, a target-only packet was dropped 20/20 times, while adding reserved option 3 before the same target let 20/20 packets reach the protected receiver. The fixed kernel dropped all trigger packets in three fresh boots and preserved the normal controls. Treat every option up to DCCPO_MAX_RESERVED as single-byte, matching the protocol definition. Triggering requires CONFIG_NETFILTER_XTABLES_LEGACY, CONFIG_NETFILTER_XT_MATCH_DCCP, an option-based rule, and remote protocol-33 reachability. The touched source is unchanged at 0c2669a9f4a1d607e7591ae50ccf3c432a0aff08, where the patch applies and builds cleanly. Fixes: 1d3de414eb20 ("[NETFILTER]: New iptables DCCP protocol header match") Assisted-by: LLM Signed-off-by: Sung Byeongchan Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 9e650c0a9f9b9c876826c036b2ab609f159d6f79 Author: Pablo Neira Ayuso Date: Wed Oct 7 23:51:44 2026 +0200 netfilter: nft_set_rbtree: narrow down range completion to anonymous sets [ Upstream commit 86d47d4c84a1b8470ba3fc16df13ea2a220b74ff ] For anonymous sets, when adjacent ranges are found, the end element is not added to the set to pack the set representation. Use next start element to complete this interval. Jérémy Jean says: Consider two ranges in a netfilter verdict map: * keys 10-19 accept packets, and * keys 30-39 jump to chain 'victim'. Now, delete the end marker at 20. The lookup array now uses element 30 as the first range's end, so an INTERVAL_END query for key 15 returns element 30, including its jump verdict and chain pointer. This can make KASAN reports a UAF after the GC releases reference chain for 30 that has expired: BUG: KASAN: slab-use-after-free in nft_verdict_dump+0xdd/0x110 Read of size 8 at addr ff110000009dfb58 by task repro/50 ... Call Trace: ... nft_verdict_dump+0xdd/0x110 nft_data_dump+0x4d/0x80 nf_tables_fill_setelem+0x30b/0x8a0 ? __asan_memcpy+0x3c/0x60 nf_tables_fill_setelem_info+0x1b0/0x200 nft_get_set_elem+0x3fd/0x4b0 ... Freed by task 24: ... kfree+0x1a5/0x280 nf_tables_trans_destroy_work+0x2cb/0x520 Fixes: 2aa34191f06f ("netfilter: nft_set_rbtree: use binary search array in get command") Reported-by: Jérémy Jean Link: https://patch.msgid.link/netfilter-devel/20261005200404.3544062-2-Jeremy.Jean@oss.cyber.gouv.fr/ Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 1f459905579127dedc19919701174b29b529295d Author: Shuangfeng He Date: Fri Oct 2 16:42:53 2026 +0800 netfilter: flowtable: use the vlan id, not the full tci, in the tuple key [ Upstream commit c203ecf905745d979de5df28fa657121f2e9342d ] nf_flow_tuple_encap() stores the skb vlan tag in the encap tuple id using skb_vlan_tag_get(), which returns the unmasked TCI including the 3 PCP priority bits. The flowtable entry, however, is programmed by nf_dev_path_info() with vlan_dev_vlan_id(), a plain 12-bit VID. When a NIC delivers RX vlan offload skbs with a non-zero priority (an RTL9617C EPON ONU was observed handing over vid 818 skbs with tci 0x6332, PCP 3), the runtime lookup key never matches the programmed entry, so every packet misses the flow table and software flow offload is silently defeated. Mask both parse sites to the 12-bit VID so the lookup key matches for any priority. The in-header variant has the same problem for frames received with PCP != 0 on a non-offload path. The egress side is unaffected: nf_flow_encap_push() restores tags from the programmed tuple id, which never carried priority bits. Measured on an RTL9617C ONU (PPPoE over VLAN 818 WAN, NATed 6-flow download over a 1G EPON line), before -> after: download throughput 377 Mbps -> 936 Mbps CPU0 %soft at that rate 91.5% -> 70.9% Fixes: 4cd91f7c290f ("netfilter: flowtable: add vlan support") Signed-off-by: Shuangfeng He Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit c6a0a4ef677ad8d622ae87b1dabbd2a6f299d036 Author: Julian Anastasov Date: Mon Sep 7 21:34:53 2026 +0300 ipvs: fix more races around the overload flag [ Upstream commit 3ba20137287f4f34ddbf0afb53c5d1ba03b6a8c2 ] Sashiko warns that we still have races when the dest overload thresholds are updated. If we narrow the range between thresholds the lockless readers (ip_vs_bind_dest and ip_vs_unbind_dest) may use old threshold values and as result to skip the required flag change. To solve the problem ip_vs_bind_dest() and ip_vs_unbind_dest() will have the chance as before to change the overload state not only at the exact threshold positions but at any conn count below the lower and above the upper thresholds. To make it work without entering the locked region for every connection, we introduce l_threshold_val. Together with u_threshold_val we will switch between two states: 1. not overloaded: where l_threshold_val is set to 0 to close the door for more ip_vs_unbind_dest() calls to clear the overload state. 2. overloaded: where u_threshold_val is set to INT_MAX to close the door for more ip_vs_bind_dest() calls to set the overload state. If a race occurs, multiple CPUs can repeat the state change but this should be for short time window. With the introduction of l_threshold_val the IP_VS_DEST_F_OVERLOAD flag and the 'flags' field are not needed anymore. We will use the ip_vs_dest_is_overloaded() helper for all places that read the overload state. Do not check IP_VS_DEST_CF_AVAILABLE in ip_vs_dh.c because we do not hold reference to dest after it is removed and rely on RCU to access the available dests. To reduce the cacheline accesses while selecting destination, keep the mostly used fields (weight and l_threshold_val) at the first read-mostly cacheline together with the hash nodes. Fixes: 8f843441c4e7 ("ipvs: properly update the overload flag on dest edit") Link: https://sashiko.dev/#/patchset/20260810190621.894119-1-pablo%40netfilter.org Signed-off-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 2004d38294264f89495e09337cba1b1f5bd1db43 Author: Jérémy Jean Date: Sat Aug 22 21:40:13 2026 +0000 netfilter: nf_conntrack: avoid truncating IPv6 nexthdr offset [ Upstream commit 48d522b65fb0ce2bd54f8f5838d77b48afcf1f3e ] find_prev_fhdr() returns the offset of the Next Header field before an IPv6 Fragment header through an int pointer, but stores the offset in a u8 local. An extension header chain can put this field beyond byte 255, causing the offset to wrap before it is saved in the fragment queue. Reassembly later uses the wrapped value to update the preceding Next Header field. This overwrites another byte in the IPv6 header chain and can make conntrack parse a different transport tuple from the one used by IPv6 local delivery. A two-fragment packet can, for example, be recorded as UDP destination port 53 while its payload is delivered to UDP port 9999. Use int for the working offset, matching the output argument and the other offset variables in this path. Fixes: 9fb9cbb1082d ("[NETFILTER]: Add nf_conntrack subsystem.") Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 87395a15bb9104621974eb3026b9a0a0d7bfa208 Author: Karl Mehltretter Date: Sat Oct 10 22:39:06 2026 +0200 mm/slub: initialize the free pointer of the bootstrap kmem_cache_node [ Upstream commit d15d7703166daf7bd62c844a3cb1b3a6279adb4c ] With slub_debug=FZPU, validating kmem_cache_node reports BUG kmem_cache_node (Not tainted): Freepointer corrupt Object 0xffff888000140040 @offset=64 fp=0x5a5a5a5a5a5a5a5a and taints the kernel. Poisoning places the bootstrap object's free pointer outside the object, where check_object() checks it even while allocated. early_kmem_cache_node_alloc() previously took this object from a freelist with an initialized pointer. It now takes it from the slab iterator and builds the freelist only for the remaining objects, leaving its pointer filled with POISON_INUSE. Initialize the bootstrap object's free pointer to NULL. Fixes: dc795d4c0282 ("mm/slub: defer freelist construction until after bulk allocation from a new slab") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Harry Yoo (Meta) Link: https://patch.msgid.link/20261010203906.93156-1-kmehltretter@gmail.com Reviewed-by: Vlastimil Babka (SUSE) Reviewed-by: Shengming Hu Tested-by: David Rientjes Signed-off-by: Harry Yoo (Meta) Signed-off-by: Sasha Levin commit 0d33fcf062216b151577c8c3e177bb1ef5c1d65a Author: Alok Tiwari Date: Sun Oct 11 05:54:59 2026 -0700 octeontx2-af: Fix CQ enable state tracking after AQ writes [ Upstream commit 07bd391eb9572e74f073c49acef327611234f9bb ] Use the CQ context's ena field when updating the CQ enable bitmap. The current code reads rq.ena, which overlaps bit 0 of the CQ base address and can leave the bitmap out of sync with the hardware context. This can cause enabled CQs to be skipped during teardown. Use sq.ena for the SQ bitmap update as well, so each queue type reads its own context. Fixes: 557dd485eaeb ("octeontx2-af: Support for disabling NIX RQ/SQ/CQ contexts") Signed-off-by: Alok Tiwari Reviewed-by: Ratheesh Kannoth Reviewed-by: Sunil Goutham Link: https://patch.msgid.link/20261011125508.534618-1-alok.a.tiwari@oracle.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 59800843436438df4b422d6b4d1999490ca327a6 Author: Cen Zhang Date: Sun Oct 18 22:07:27 2026 +0800 ALSA: oss: Keep emulation modules loaded until object teardown [ Upstream commit f0780cfa6acf72576464dc3b40431db389f46ee8 ] OSS proc entries and notifier callbacks can remain in use without an open OSS device file. Normal snd-pcm-oss removal can therefore delete an existing PCM's OSS proc entry while late HDA codec binding repeats snd_card_register() on the same live card: OSS PCM module unload Card registration --------------------- ----------------- snd_info_free_entry(entry) proc_remove(entry->p) clear entry->p snd_info_card_register() republish linked entry unlink and free entry The new proc node retains a pointer to freed storage. Mixer OSS removal can likewise release an adapter while a card notification still uses it. Hold a snd-pcm-oss module reference for each PCM registered with its notifier and a snd-mixer-oss reference for each card adapter. Release them at final unregister or FREE, after proc and adapter cleanup. Normal module unload can no longer initiate removal while these objects exist. Track PCM OSS registration with a separate bool registered. Unlike oss.reg, this state also covers unmapped PCMs and remains set across DISCONNECT until final unregister. BUILD-state and creation-error cleanup must not drop a reference when registration never acquired one. The PCM notifier's register_mutex serialization keeps the final put ahead of notifier removal and module teardown until dispatch has finished. For mixer OSS, serialize callback publication, dispatch and withdrawal in the core so module exit waits for callbacks, including one dropping the last reference, to return. Keep card enumeration in the OSS module, with card references released after dispatch drops the mutex. Ignore duplicate REGISTER notifications so a delayed registration cannot replace an adapter retained across DISCONNECT and leak its module pin. Partial HDA codec teardown can still remove an individual PCM while the card remains registered; its object-lifetime handling is separate. Fixes: 2471b6c80a70 ("ALSA: info: Register proc entries recursively, too") Suggested-by: Takashi Iwai Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/pm-pmb-26d66390a25fec9fad6c-v6-5be251a3ac8832955a31-2@gmail.com Signed-off-by: Sasha Levin commit c4149fef114f2f88d31a903b67525cf9c07c5e22 Author: Cen Zhang Date: Sun Oct 18 22:07:26 2026 +0800 ALSA: pcm: Protect the unregister notifier traversal [ Upstream commit 680be9f82d4977d3410c513d3bfe912d100f64fc ] snd_pcm_free() traverses snd_pcm_notify_list and calls n_unregister without register_mutex, although snd_pcm_notify() takes that mutex to add and remove notifiers. PCM disconnect releases the mutex before the free callback runs, so it does not protect this later traversal. With no open OSS file, normal snd-pcm-oss removal can overlap PCM card teardown, for example when unbinding snd-dummy: PCM card teardown snd-pcm-oss unload ----------------- ------------------ snd_pcm_dev_disconnect() remove PCM under register_mutex unlock register_mutex snd_pcm_free() fetch notifier snd_pcm_notify(..., 1) unlink notifier under mutex free module storage read notifier->n_unregister invoke callback The free path can then read the notifier from released module storage or call its unloaded code. Hold register_mutex across the unregister traversal and its callbacks. Notifier removal must wait until both have finished. This also protects the traversal if a callback releases the last module reference: module exit cannot unlink its notifier until the free path releases the mutex. Drop the mutex before private_free and the remaining stream cleanup. Fixes: c461482c8072 ("[ALSA] Unregister device files at disconnection") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/pm-pmb-26d66390a25fec9fad6c-v6-5be251a3ac8832955a31-1@gmail.com Signed-off-by: Sasha Levin commit c40e3b040abe7ea66f58621eacab8dac276c17ec Author: Adrian Ambrozewicz Date: Mon Oct 12 16:49:45 2026 +0300 gpiolib: clear the event clock flags when a line is released [ Upstream commit d35f61581ee67f8d4d58c325bac813cea528b6b9 ] gpiod_free_commit() clears the flags that a request sets on a line, but not GPIOD_FLAG_EVENT_CLOCK_REALTIME and GPIOD_FLAG_EVENT_CLOCK_HTE, which gpio_v2_line_config_flags_to_desc_flags() sets from the uAPI v2 line config. Once a line requested with GPIO_V2_LINE_FLAG_EVENT_CLOCK_REALTIME or GPIO_V2_LINE_FLAG_EVENT_CLOCK_HTE is released, GPIO_V2_GET_LINEINFO_IOCTL and the line info changed events, the "released" one included, keep reporting that event clock for the free line: GPIO_V2_GET_LINE_IOCTL, line 1, input, event clock realtime: ok close() GPIO_V2_GET_LINEINFO_IOCTL, line 1: input, event clock realtime The flags are set before edge detection is set up, so a request that fails in hte_ts_get(), for instance because no HTE provider handles the line, leaves GPIOD_FLAG_EVENT_CLOCK_HTE behind as well. The next uAPI v2 request rewrites both flags, but requests through uAPI v1, sysfs exports and in-kernel consumers do not, and the line info then shows the event clock of an earlier user for them too. Clear both flags together with the other flags of the request. Reproduced under QEMU with a test GPIO chip: after a released request with the realtime event clock, and on a kernel with CONFIG_HTE=y but no HTE provider after a failed request with the HTE event clock, the line info of the free line still reports that event clock. With this change it reports none. Fixes: 26d060e47e25 ("gpiolib: cdev: allow edge event timestamps to be configured as REALTIME") Fixes: 2068339a6c35 ("gpiolib: cdev: Add hardware timestamp clock type") Signed-off-by: Adrian Ambrozewicz Link: https://patch.msgid.link/20261012-gpiolib-event-clock-v1-1-aambrozewicz@nvidia.com Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin commit d271dafede0f3ed47827c663feacd47da8234224 Author: Kent Gibson Date: Fri Oct 16 18:54:42 2026 +0800 gpiolib: fix memory leak in gpiod_set_array_value_complex() EPERM error path [ Upstream commit 138d7365c20efe47b4caa92c46f086ec39b81f78 ] A drive-by review by Sashiko reports that, where the line has not been configured as an output, gpiod_set_array_value_complex() can return without freeing potentially alloced bitmaps, thus leaking memory. Cleanup the bitmaps before returning. Fixes: 92ac7de3175e ("gpiolib: don't allow setting values on input lines") Reported-by: Sashiko Link: https://lore.kernel.org/linux-gpio/sashiko-outbox-168233@kernel.org/ Signed-off-by: Kent Gibson Link: https://patch.msgid.link/20261016105442.109836-1-warthog618@gmail.com Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin commit 523cd422517a0214c7d9006370159feff385553a Author: Qiliang Yuan Date: Fri Oct 9 09:49:32 2026 +0800 selftests/bpf: Run the cpumask map insert tests only for the test task [ Upstream commit e2c978ad415ce223e71f6ddaa92778225eca0bef ] verify_success() attaches each cpumask test program to task_newtask, forks a single child, and expects err to be 0 afterwards. Most programs return right away for other tasks than the test one. test_insert_leave and test_insert_remove_release don't, and insert a cpumask into the single entry of __cpumask_map for every task created in the system while they are attached. test_insert_leave leaves its cpumask in the map, so a second task created, for instance by a test running in parallel, fails to insert one and sets err to 3. Two tasks created at the same time can do the same to test_insert_remove_release. Return early for other tasks than the test one in both programs, as the other programs do. Fixes: 7b6abcfa15cd ("selftests/bpf: Add selftest suite for cpumask kfuncs") Signed-off-by: Qiliang Yuan Link: https://lore.kernel.org/bpf/20261009-selftests-bpf-cpumask-insert-filter-v1-1-3249218594d7@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit f067d4893d12532b2e76fc181891d908fb02124c Author: Masoud Aghasi Date: Thu Oct 8 13:07:33 2026 +0100 bpf: Fix incorrect handling of user flags by percpu hash map updates [ Upstream commit 4a9b25fe8d138f2e0e65b337ecf829ce7ce42d09 ] For BPF_MAP_TYPE_PERCPU_HASH and BPF_MAP_TYPE_LRU_PERCPU_HASH maps, htab_map_check_update_flags() and check_flags() are not considering the possibility of a combination of (BPF_NOEXIST, BPF_EXIST) flags with (BPF_F_CPU, BPF_F_ALL_CPUS) flags. This causes the (BPF_NOEXIST, BPF_EXIST) flags to lose their effect in some cases. For example, when using (BPF_F_CPU | BPF_EXIST) or (BPF_F_CPU | BPF_NOEXIST) flag combinations with bpf_map_update_elem() on a percpu hash map, the BPF_EXIST flag does not prevent new insertions as expected and BPF_NOEXIST flag does not prevent modification of existing entries as expected. This patch fixes the bug by adding proper flag validations and checks. Before this patch, htab_map_check_update_flags() rejected (BPF_F_ALL_CPUS | BPF_EXIST) and (BPF_F_ALL_CPUS | BPF_NOEXIST) with -EINVAL. After the patch those combinations are accepted. This patch also starts returning -EINVAL for (BPF_EXIST | BPF_NOEXIST), with or without BPF_F_CPU, which was previously accepted. Fixes: c6936161fd55 ("bpf: Add BPF_F_CPU and BPF_F_ALL_CPUS flags support for percpu_hash and lru_percpu_hash maps") Signed-off-by: Masoud Aghasi Signed-off-by: Alexei Starovoitov Acked-by: Leon Hwang Link: https://patch.msgid.link/20261008120734.1565972-3-maghasi@disroot.org Signed-off-by: Sasha Levin commit 3f6796683f043e39201dab7bb71d95f2eb752e55 Author: Masoud Aghasi Date: Thu Oct 8 13:07:32 2026 +0100 bpf: Fix incorrect handling of user flags in bpf_percpu_array_update [ Upstream commit a898ff0f3e9968b5f7c248d2af3cf1ddaf239e51 ] For BPF_MAP_TYPE_PERCPU_ARRAY map, bpf_percpu_array_update() is not considering the possibility of a combination of (BPF_NOEXIST, BPF_EXIST) flags with (BPF_F_CPU, BPF_F_ALL_CPUS) flags. This causes the (BPF_NOEXIST, BPF_EXIST) flags to lose their effect in some cases. For example, using the (BPF_F_ALL_CPUS | BPF_EXIST) flag combination with bpf_map_update_elem() results in an incorrect EINVAL error response, even though the flag combination is valid. This patch fixes the bug by adding proper flag validations and checks. Before this patch, bpf_percpu_array_update() rejected BPF_F_ALL_CPUS | BPF_EXIST and BPF_F_ALL_CPUS | BPF_NOEXIST with -EINVAL. Also the BPF_F_CPU | BPF_NOEXIST were accepted. After the patch BPF_F_ALL_CPUS | BPF_EXIST is accepted and BPF_F_ALL_CPUS | BPF_NOEXIST and BPF_F_CPU | BPF_NOEXIST result in -EEXIST. This patch also starts returning -EINVAL for (BPF_EXIST | BPF_NOEXIST), with or without BPF_F_CPU, which was previously accepted. Fixes: 8eb76cb03f0f ("bpf: Add BPF_F_CPU and BPF_F_ALL_CPUS flags support for percpu_array maps") Signed-off-by: Masoud Aghasi Signed-off-by: Alexei Starovoitov Acked-by: Leon Hwang Link: https://patch.msgid.link/20261008120734.1565972-2-maghasi@disroot.org Signed-off-by: Sasha Levin commit 1f69c98a0a3c75ca592120938b99d2524581dcdb Author: KaFai Wan Date: Sun Oct 18 08:53:48 2026 +0800 selftests/bpf: Use _exit() in uprobe_multi_test clone-ed child [ Upstream commit ce42271dc517baa880352d76548d301850e7385b ] child_func() terminates with exit(), but spawn_child_flag() also starts it via clone(CLONE_VM), which shares the parent's address space. That exit() then runs atexit handlers and static destructors against globals the parent is still using. LLVM commit `3c3ed59c6a2a ("[llvm] Add format check for MCSubtargetFeatures")` [1], included in the LLVM 23.1 releases, added Target::isValidFeatureListFormat() with a function-local static holding the compiled regex: static const llvm::Regex pattern("^([+-][^,]+)(,[+-][^,]+)*,?$"); return pattern.match(Features); The child exit destroys that static while its guard variable still marks it as initialized, so the regex is never rebuilt in the parent. From that point on, get_jited_program_text() gets NULL from LLVMCreateDisasmCPUFeatures(), so every jited program text check in the tests running after filter_clone_vm fails, e.g. "verifier_jit_convergence", "verifier_private_stack", "verifier_tailcall_jit" and "verifier_jit_inline". Use _exit(), which runs neither atexit handlers nor static destructors, as uprobe_syscall.c already does for its own CLONE_VM child. [1] https://github.com/llvm/llvm-project/pull/180943 Fixes: d2520bdb1932f ("selftests/bpf: Add uprobe multi pid filter test for clone-ed processes") Signed-off-by: KaFai Wan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261018005348.2195130-5-kafai.wan@linux.dev Signed-off-by: Sasha Levin commit 352de78d14325b2bf4531e550c62cce9e9a06ab6 Author: KaFai Wan Date: Sun Oct 18 08:53:47 2026 +0800 selftests/bpf: Fix stack arg pruning test JOIN log expectation [ Upstream commit 8342d47ad791d70a42ab9cf262bd477fb41fdff2 ] Commit f414d20879ae ("bpf: Save DFS postorder numbers for program instructions") changed bpf_compute_postorder() to use a real DFS, which changes the postorder of this test's instructions and thus the insn edge the arg track join at insn 10 is reported on: arg JOIN insn 8 -> 10 r1: _ + fp0-8 => fp0-8|fp0+0 arg JOIN insn 8 -> 10 sa0: _ + fp0-8 => fp0-8|fp0+0 Update the r1 and sa0 expectations to the new output. Fixes: f414d20879ae ("bpf: Save DFS postorder numbers for program instructions") Signed-off-by: KaFai Wan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261018005348.2195130-4-kafai.wan@linux.dev Signed-off-by: Sasha Levin commit 38f27be83fc7ca949bcfe153224bc90a04119ceb Author: Matt Turner Date: Sun Oct 18 10:22:01 2026 -0400 alpha: fix stale user_stack_pointer() [ Upstream commit bceba446fa2bc66a905ec0bbf6fd80e98701c1d1 ] PALcode keeps the user stack pointer in the PCB, not the trap frame, so pt_regs->usp is only valid where entry code stores it: entSys, do_entArith() and do_entIF(). Interrupts, page faults and unaligned traps leave it stale, and ptrace and /proc//syscall read it through user_stack_pointer(). A user-mode pt_regs is at the top of its task's stack, so find the thread_info from it and use rdusp() for current or pcb.usp otherwise, as KSTK_ESP() and the regset code already do. Fixes: 8a2857bc2b30 ("alpha: enable regset-based ptrace and core dumps") Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Magnus Lindholm Tested-by: Magnus Lindholm Acked-by: Ian Rogers Signed-off-by: Matt Turner Link: https://lore.kernel.org/r/20261018-alpha-perf-regs-v3-v3-1-52be85332c57@gmail.com Signed-off-by: Magnus Lindholm Signed-off-by: Sasha Levin commit 42f861e2d3cf9271d462e1ad8464a5f2addc21c7 Author: Troy Mitchell Date: Mon Sep 14 16:03:53 2026 +0800 dt-bindings: vendor-prefixes: Add Sensylink [ Upstream commit f4ba4f8cc8e8df45e57c1754955b3a6b9b089a97 ] Add the vendor prefix for Sensylink Microelectronics. Link: https://en.sensylink.com/ Acked-by: Krzysztof Kozlowski Signed-off-by: Troy Mitchell Link: https://patch.msgid.link/20260914-ctl2301-v5-1-b44b81cd2c3c@linux.dev Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin commit 85f8579916b99cdd31788b9dfd241d0e9752f5dc Author: Woojin Ji Date: Sun Oct 18 13:21:41 2026 +0900 bpf: Zero-extend the index in inlined bpf_get_func_arg() [ Upstream commit 1c1dda9ba9f3af9cd511a197dcc86de2465d8fe5 ] bpf_get_func_arg() takes a u32 index, but the inlined expansion compared only the low 32 bits of R2 with the argument count and then shifted the full 64-bit register to compute the context address. R2 is ARG_ANYTHING, so nothing guarantees that its upper bits are zero: an index of 1ULL << 32 passes the bounds check as index zero while the load is performed at ctx + (1ULL << 35). Shift the index as a 32-bit value. When the 32-bit bounds check passes, the low 32 bits of R2 are below R0, and R0 is at most 255: the trampoline arm masks the argument count with 0xFF and the raw_tp arm uses the BTF argument count minus one, which the verifier caps at MAX_BPF_FUNC_ARGS. The 3-bit shift therefore cannot overflow and it clears the upper bits of the register. Widening the comparison instead would reject indices whose low 32 bits are valid. The check itself is unchanged, so this cannot change which programs are accepted, only the address that is computed. Fixes: f92c1e183604 ("bpf: Add get_func_[arg|ret|arg_cnt] helpers") Signed-off-by: Woojin Ji Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261018-get-func-arg-v2-1-048848b3eddf@gmail.com Signed-off-by: Sasha Levin commit 3a7a5921c44cf5e816f126df1a4a1682290e9bc4 Author: Sasha Levin Date: Sun Oct 18 09:29:07 2026 -0400 locking/atomic: arc, hexagon, openrisc: Define arch_cmpxchg_local() [ Upstream commit 8cebaa3be829c88a59957900f8de98fed09daefe ] Commit ccb88db8dac8 ("bpf: Don't hand out a linked element as extra element") made alloc_htab_elem() take the per-cpu spare element with try_cmpxchg_local(), the first caller of cmpxchg_local() outside of architecture code. It doesn't build on arc, hexagon and openrisc: include/linux/atomic/atomic-arch-fallback.h:384:27: error: implicit declaration of function 'arch_cmpxchg_local'; did you mean 'raw_cmpxchg_local'? [-Werror=implicit-function-declaration] raw_cmpxchg_local() maps to arch_cmpxchg_local() unconditionally, but these three architectures don't define it, and unlike nios2 and microblaze they don't get it from asm-generic/cmpxchg.h either. cmpxchg_local() only has to be atomic with respect to the local CPU, so an architecture's own arch_cmpxchg() can serve for the sizes it supports. arc uses its relaxed LLOCK/SCOND variant when ARC_HAS_LLSC is set and its atomic_ops_lock() variant otherwise, and openrisc uses its LL/SC arch_cmpxchg(), the way arm64, riscv and s390 alias theirs. The hexagon arch_cmpxchg() only handles 32-bit words, so hexagon uses the generic version that disables interrupts, like sh, sparc32 and xtensa do. Linux has no NMIs on hexagon, so that is sufficient there. Fixes: ccb88db8dac8 ("bpf: Don't hand out a linked element as extra element") Reported-by: kernelci.org bot Reported-by: kernel test robot Signed-off-by: Sasha Levin Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261018132907.3823160-1-sashal@kernel.org Closes: https://d.kernelci.org/i/maestro:78b65519ee4561df1fbf1e72f1dec9da7e5b153e Closes: https://lore.kernel.org/oe-kbuild-all/202610181750.BoqAddaF-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202610182048.aEaiBP8W-lkp@intel.com/ Signed-off-by: Sasha Levin commit 7bc12ba4b3523faa9f1621a5e3a921604886930b Author: Serhat Kumral Date: Sat Oct 17 21:50:28 2026 +0300 RDMA/usnic: Bound buffer size to sizeof(buf) in flowinfo_read() [ Upstream commit 9dd8b9a337af844291edcd9139c927d0f7958dbe ] In flowinfo_read(), 'left' tracks the remaining space in the 512-byte stack buffer 'buf', but it is initialized to 'count'. Initialize 'left' to sizeof(buf) instead of 'count'. Fixes: 9f637f793602 ("IB/usnic: Expose flows via debugfs") Signed-off-by: Serhat Kumral Link: https://patch.msgid.link/20261017185028.1019445-1-serhatkumral1@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 2c2e0650b71be23998d7370fc439f7a5ec0eab80 Author: Zhiwei Zhang <202275009@qq.com> Date: Sat Oct 17 09:40:21 2026 +0800 RDMA/rxe: Clear pkt->qp before the early drop exits in rxe_rcv() [ Upstream commit 7d7214b39b14c9763c14445b139f63369063b65e ] rxe_rcv() puts pkt->qp at its drop label, but leaves pkt->qp uninitialized on the two paths that take an early goto: if (unlikely(skb->len < RXE_BTH_BYTES)) goto drop; if (rxe_chk_dgid(rxe, skb) < 0) goto drop; pkt->opcode = bth_opcode(pkt); pkt->psn = bth_psn(pkt); pkt->qp = NULL; <- too late for the gotos above ... drop: if (pkt->qp) rxe_put(pkt->qp); pkt points into skb->cb, which rxe does not own at this point: the network stack has used that space for its own state. For IPv6, ip6_rcv_core() memsets inet6_skb_parm and then writes IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr); at offset 14, so the qword at cb + 8, which is where pkt->qp lives, reads back as 0x0006000000000000 for every IPv6 packet. Any IPv6 datagram to port 4791 whose payload is shorter than the BTH takes the first goto and reaches the drop label with that value, so rxe_put() runs refcount_dec_and_test() on 0x0006000000000150 and the kernel faults, in softirq, on a non-canonical address: general protection fault, probably for non-canonical address 0x0006000000000150: 0000 [#1] PREEMPT SMP RIP: 0010:__rxe_put+0x.../... Call Trace: rxe_rcv+0x.../... [rdma_rxe] rxe_udp_encap_recv+0x.../... [rdma_rxe] udp_queue_rcv_one_skb ... Kernel panic - not syncing: Fatal exception in interrupt The fault happens in softirq, so it panics even with panic_on_oops=0, and with panic=0 the machine hangs until it is power cycled. A remote sender only needs to send an empty UDP datagram to port 4791; no RDMA connection, GID or other state is involved and the rxe socket is bound in init_net. IPv4 is not affected: ip_rcv_core() memsets the whole inet_skb_parm, so the pkt->qp slot is zero there. Fix by clearing pkt->qp before the first early exit. pkt->qp is only ever assigned a reference-owning value by hdr_check() and rxe_rcv_mcast_pkt(), both of which run after this point, so the put at the drop label stays balanced. The ordering has been unsafe since the driver was merged: the two early gotos have preceded pkt->qp = NULL in every version since 8700e3e7c485. Testing done: the driver was built and run on a 6.2 vendor tree that carries this code, where a single 0-byte IPv6 datagram to port 4791 reproduced the panic above (that tree does not pull the UDP header in rxe_udp_encap_recv(), so payloads of 0..3 bytes reach the first goto there, versus 0..11 on mainline). With this change, the same packets are dropped as intended and tracing the drop label shows pkt->qp is 0 on every path that reaches it. Not done: the mainline tree was not built in the environment used to prepare this, and the reproducer is left out of this message on purpose - both are available on request. Fixes: 8700e3e7c485 ("Soft RoCE driver") Reviewed-by: Zhu Yanjun Signed-off-by: Zhiwei Zhang <202275009@qq.com> Link: https://patch.msgid.link/tencent_FBB0EE9F592FD21FD4B0F3BFAD3336765209@qq.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 6695c6f77feea552ed4eb453f5ce7ccdd9a05f27 Author: HyeongJun An Date: Sun Oct 18 15:47:46 2026 +0900 ASoC: tlv320aic32x4: Fix definition of TAS2505 HP Driver Gain Volume control [ Upstream commit f28c09b7e62fb5ead65bdfab93012a86d64b6540 ] The TAS2505 HP volume is bits 6:0 of page 1 register 22, not of register 16, which holds the HP driver mute (bit 6) and gain (bits 5:0). Fixes: 2169d6a0f072 ("ASoC: tlv320aic32x4: Fix TAS2505 volume controls") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/e50b88689e8efd353ee597a6692ab4db30aa63e7.1792135145.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 59ad7f814bd54f67f297fab98b1deaba8d5181f4 Author: HyeongJun An Date: Sun Oct 18 15:47:45 2026 +0900 ASoC: codecs: sta350: Fix definition of limiter threshold controls [ Upstream commit 77623752c156763d7a80414afe5b769ba4532bd3 ] The limiter attack and release thresholds are the two 4-bit halves of one register, so their maximum is 15, not 16. With 16 the controls on bits 3:0 also write bit 4, which belongs to the other threshold. Fixes: 2439ea1f0f8f ("ASoC: sta350: Add codec driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/d65a21665a1e0d63dec174dd3691bd97764b8ae0.1792135145.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 904c711793183e61220f2170135036a208ee956d Author: HyeongJun An Date: Sun Oct 18 15:47:44 2026 +0900 ASoC: codecs: sta32x: Fix definition of limiter threshold controls [ Upstream commit e06bf60ee5bffa9eeacff0bf8b03d4572b04f67d ] The limiter attack and release thresholds are the two 4-bit halves of one register, so their maximum is 15, not 16. With 16 the controls on bits 3:0 also write bit 4, which belongs to the other threshold. Fixes: c034abf6e503 ("ASoC: add STA32X codec driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/179118fc7680b2b872d1f917b7fd21f54a73a6d8.1792135145.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 89ba9391efdfe5eb67f96e0fcd34e1ece559e3ae Author: Serhat Kumral Date: Sat Oct 17 00:15:09 2026 +0300 RDMA/srp: Avoid reading uninitialized has_port on srp_parse_in() failure [ Upstream commit 4b8f20dc8d25f575e8b8bb5abb09ab803a7e1a3f ] srp_parse_in() returns -ENOMEM without initializing *has_port if kstrdup() fails. Only check has_port when srp_parse_in() succeeds. Fixes: bcef5b721568 ("RDMA/srp: Accept again source addresses that do not have a port number") Signed-off-by: Serhat Kumral Link: https://patch.msgid.link/20261016211509.12973-1-serhatkumral1@gmail.com Reviewed-by: Bart Van Assche Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 76c881f063352c94d207d8a6726cef37c89e15e3 Author: Leon Romanovsky Date: Sun Oct 18 07:59:38 2026 -0400 RDMA/core: Reject LAG selection when source MAC lookup fails [ Upstream commit fdfd099222d9de9e2f1b8d69e94494c5489272cc ] GID deletion can clear the source device association after LAG lookup retains the bonding master. Ignoring the resulting L2 lookup failure copies uninitialized source MAC bytes into the synthetic hash packet. Read the source MAC before allocating the packet and propagate lookup errors to the caller, so failed lookups cannot influence slave selection. Fixes: bd3920eac133 ("RDMA/core: Add LAG functionality") Link: https://patch.msgid.link/20261015-ib-core-fixes-v1-3-60f6da3ddec3@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 61e027779481a5e47077e0ed678439430b9400d6 Author: Leon Romanovsky Date: Sun Oct 18 07:59:38 2026 -0400 RDMA/core: Free unpublished port statistics after initial-read failure [ Upstream commit d74bdcfa89fa45d3a506cddc37b3bf1b76cea0ce ] An initial port counter read can fail after allocating its statistics buffer and wrapper. Free these both allocations. Fixes: 467f432a521a ("RDMA/core: Split port and device counter sysfs attributes") Link: https://patch.msgid.link/20261015-ib-core-fixes-v1-2-60f6da3ddec3@nvidia.com Reviewed-by: Kalesh AP Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 894e965687f9ab55d681eda9110b7e6f6ddcd649 Author: Leon Romanovsky Date: Sun Oct 18 07:59:38 2026 -0400 RDMA/core: Preserve the selected source GID on failed AH modification [ Upstream commit d01ee4c84193196b6e4be4caf1ff8fdcc441ed96 ] When an address-handle modification fails, the core replaces its source-GID reference. The old address then loses the reference which keeps its source entry alive. Fixes: 1a1f460ff151 ("RDMA: Hold the sgid_attr inside the struct ib_ah/qp") Link: https://patch.msgid.link/20261015-ib-core-fixes-v1-1-60f6da3ddec3@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 5988e6bc2ea78e639c079128962b0f596f512391 Author: Igor Velkov Date: Sun Oct 18 03:57:53 2026 +0000 power: supply: gpio-charger: Report discharging without input power [ Upstream commit f0f400459bf6a037e70768de623fff3f8920b8bb ] The status property follows only the charge-status GPIO. Without input power a charger such as the BQ24133 releases its open-drain STAT pin, and depending on the board the GPIO then reads as charging. On Kobol Helios64 the board runs from its battery after a mains loss, and the charger reports online 0 with status "Charging". Report "Discharging" whenever the online GPIO is present and inactive. Fixes: df68c44c720a ("power: supply: gpio-charger: Add support for charger status.") Assisted-by: LLM Signed-off-by: Igor Velkov Link: https://patch.msgid.link/20261018-gpio-charger-offline-v2-1-482795f9e27c@iav.lv Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 684bed91db8b7a7a56a8b040c42a159ae3a0c96b Author: Aleksandr Nogikh Date: Wed Jul 29 12:25:27 2026 +0000 usb: gadget: dummy_hcd: prevent unbind via sysfs [ Upstream commit bdf12cde30830d46a8ef1ba93986356f1164b4f1 ] The dummy_hcd (Host Controller) and dummy_udc (Device Controller) are implemented as two separate platform drivers that share the same underlying state (struct dummy). They are designed to be created and destroyed together during the module's init and exit phases. If userspace forces the dummy_hcd driver to unbind from the device via sysfs, dummy_hcd_remove() cleans up the host controllers and sets the pointers to NULL (dum->hs_hcd = NULL). However, the dummy_udc driver is still bound to its device, meaning the USB gadget is still registered with the udc-core subsystem. If a new gadget driver is subsequently registered, it binds to the still-registered dummy_udc gadget, invoking the dummy_udc_start() callback. This callback attempts to retrieve the HCD state using gadget_to_dummy_hcd(), which returns NULL because of the unbind. This results in a null-pointer dereference: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] ... RIP: 0010:dummy_udc_start+0xd0/0x1f0 drivers/usb/gadget/udc/dummy_hcd.c:1022 ... Call Trace: usb_gadget_udc_start_locked drivers/usb/gadget/udc/core.c:1237 [inline] gadget_bind_driver+0x3a8/0x9e0 drivers/usb/gadget/udc/core.c:1667 call_driver_probe drivers/base/dd.c:-1 [inline] really_probe+0x254/0xae0 drivers/base/dd.c:706 __driver_probe_device+0x1e8/0x360 drivers/base/dd.c:868 driver_probe_device+0x4f/0x240 drivers/base/dd.c:898 __driver_attach+0x339/0x600 drivers/base/dd.c:1292 bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383 bus_add_driver+0x345/0x670 drivers/base/bus.c:763 driver_register+0x23a/0x320 drivers/base/driver.c:174 usb_gadget_register_driver_owner+0xf9/0x270 drivers/usb/gadget/udc/core.c:1752 raw_ioctl_run drivers/usb/gadget/legacy/raw_gadget.c:596 [inline] raw_ioctl+0x1541/0x41c0 drivers/usb/gadget/legacy/raw_gadget.c:1307 Adding NULL checks to the UDC callbacks is not a robust solution because there is no synchronization between dummy_hcd_remove() and the UDC callbacks, which would result in a use-after-free race condition if the HCD were unbound concurrently. Fix this by setting .suppress_bind_attrs = true in both driver definitions. This prevents userspace from unbinding these drivers dynamically, ensuring their lifecycles remain strictly synchronized with the module's load/unload process. Fixes: d9b762510c18 ("[PATCH] USB dummy_hcd: Use separate pdevs for HC and UDC") Assisted-by: Gemini:gemini-3.5-flash Gemini:gemini-3.1-pro-preview syzbot Reported-by: syzbot+d270af829aca04e783fc@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d270af829aca04e783fc Link: https://syzkaller.appspot.com/ai_job?id=7a763ada-c07c-458f-9fea-f7e913dc1f2f Signed-off-by: Aleksandr Nogikh Acked-by: Alan Stern Link: https://patch.msgid.link/18ec3122-7566-49e5-9964-1028857405b1@mail.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 0c04731d7177e075e565ae2a899b86d34ea5cf34 Author: Igor Skalkin Date: Wed Aug 12 10:19:09 2026 +0200 usb: gadget: dummy_hcd: fix SuperSpeed ep0 maxpacket [ Upstream commit e68f245bcb1f863aeb8eab617bd06878c078029a ] For USB_SPEED_SUPER, dummy_hcd sets ep0 maxpacket to 9. That is incorrect for SuperSpeed ep0 and breaks short packet handling in control transfer tests. Set ep0 maxpacket to 512 for SuperSpeed. Fixes: 1cd8fd2887e1 ("usb: gadget: dummy_hcd: add SuperSpeed support") Acked-by: Alan Stern Signed-off-by: Igor Skalkin Link: https://patch.msgid.link/20260812081910.6821-2-igor.skalkin@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit c0258bfd9bebaaae2d6e09f16aed27bb4e022688 Author: Alexei Starovoitov Date: Sat Oct 17 23:09:49 2026 +0000 bpf: Use memmove() to store bytes in an xdp_buff [ Upstream commit ab08863c58b1a96ff8378e373cb3d277cbe65b68 ] bpf_dynptr_write() to the dynptr of an xdp_buff ends in bpf_xdp_store_bytes(). The source can be a slice of the same xdp_buff which overlaps the destination, and the helper itself takes such a slice as well. memcpy() then reads bytes which it has overwritten already. On x86 with FSRM p = bpf_dynptr_slice_rdwr(&ptr, 0, NULL, 64); bpf_dynptr_write(&ptr, 8, p, 64, 0); repeats the first 8 bytes of the packet instead of moving 64. A write that crosses from the linear part into a fragment is copied piece by piece, where the first piece can overwrite what the second one has yet to read. That is not dealt with here. Fixes: 2012c867c800 ("bpf: verifier: Accept dynptr mem as mem in helpers") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-16-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit a708fc58a0823ed00f1aa2267222f98c689d1517 Author: Josef Bacik Date: Sat Oct 17 23:09:48 2026 +0000 bpf: Use memmove() to store bytes in an skb [ Upstream commit 1db084f42884c5af881fedf3df4777fe2095b20b ] Through bpf_dynptr_write() and bpf_dynptr_copy() the source of bpf_skb_store_bytes() can be a slice of the same skb which overlaps the destination. memcpy() then reads bytes which it has overwritten already. On x86 with FSRM it repeats the first bytes of the source instead of copying it. Local, ringbuf and skb metadata dynptrs are written with memmove() for that reason. Fixes: 2012c867c800 ("bpf: verifier: Accept dynptr mem as mem in helpers") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-15-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 6672e5657c306a7880723d0e4cfb88ec340cf570 Author: Josef Bacik Date: Sat Oct 17 23:09:47 2026 +0000 bpf: Follow the head if an skb is written from a slice [ Upstream commit 1c19f2b3b2f3b55c8017092257634cb8229b7d97 ] The source of bpf_dynptr_write() may be a slice of the skb which is written to, that is a pointer into its head. bpf_dynptr_copy() does it by itself for a copy inside of one skb, if the source is linear and the destination is not. __bpf_skb_store_bytes() and __bpf_skb_meta_store_bytes() make the skb writable first. If that reallocates the head, the source points to the old one, and freed memory is copied into the packet. The offsets in the head do not change when it is reallocated here. Move the source along with the head. Fixes: 2012c867c800 ("bpf: verifier: Accept dynptr mem as mem in helpers") Fixes: f38499ff45f5 ("bpf: Unclone skb head on bpf_dynptr_write to skb metadata") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-14-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 179e794854f0a72051e5d30c97e7ab85c6370ecc Author: Josef Bacik Date: Sat Oct 17 23:09:44 2026 +0000 bpf: Don't take a dynptr argument for a local dynptr [ Upstream commit b7f97db88948aa511bcd989978f181e1367e0e8b ] A global function is verified on its own. A dynptr which it gets as an argument is assumed to be of type BPF_DYNPTR_TYPE_LOCAL, but the callers may pass one of any type, that of an skb for example. The type decides whether a write through the dynptr invalidates packet pointers, and whether a slice of it is invalidated together with them. Inside of the function neither happens. It can take a packet pointer from its context argument, or a slice from the dynptr, write through the dynptr and go on using the pointer, although the write may have reallocated the head of the skb. Assume the type of an skb dynptr instead. Nothing becomes forbidden for the dynptr itself, and a clone inherits the caution. The dynptr which the callback of bpf_user_ringbuf_drain() gets is known to be local, and stays so. Fixes: a64bfe618665 ("bpf: add support for passing dynptr pointer to global subprog") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-11-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 61726cccceda5b8e36ae912eb1d2109ea122b49c Author: Josef Bacik Date: Sat Oct 17 23:09:43 2026 +0000 bpf: Let bpf_dynptr_write() mark a global function [ Upstream commit 589998616e0f9190ba6f6644a19532c5b2ba66d0 ] The caller of a global function loses its packet pointers if the function may change packet data. That is found out by a scan for calls of the helpers which bpf_helper_changes_pkt_data() lists. bpf_dynptr_write() is not on the list, because it depends on the type of the dynptr: check_helper_call() looks at it. The scan cannot do that, and so a global function which makes a dynptr from the skb, or gets one as an argument, and writes through it counts as harmless. The write can reallocate the head of the skb, and the caller goes on with pointers into the old one, which has been freed. Let every call of bpf_dynptr_write() mark the function, as a tail call does. The same mark decides whether a program may replace a function. Fixes: 51081a3f25c7 ("bpf: track changes_pkt_data property for global functions") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-10-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 0bb45ba23b0e03a68964fafb65b03b8e964a6069 Author: Josef Bacik Date: Sat Oct 17 23:09:41 2026 +0000 bpf, cpumap: Hold the device of frames in the queue [ Upstream commit f99351272933ba2e1221484a5e53b7a5d2c035f0 ] A frame that is redirected to another CPU waits in the queue of the cpumap entry with a plain pointer to the device it came from, and an skb from generic XDP with skb->dev. Nothing keeps that device. Closing and unregistering it waits for its NAPI and for RCU, but not for the kthread of the entry. If the kthread is late by more than that, since its CPU is busy with something of a higher priority, it builds skbs for a device that has been freed and hands them to the stack: BUG: KASAN: use-after-free in dev_gro_receive+0x1f51/0x2b30 Read of size 8 at addr ffff88800a7340b0 by task cpumap/1/map:1/54 Take a reference to the device for each entry of the queue. The kthread cannot drop it at the end of the batch, since its GRO node may keep the skb for longer. Let it note the devices and drop the references behind a full GRO flush, which it does whenever the queue is empty, and from now on also when it has noted about 2048 of them. A device whose frames are stuck in a queue is now unregistered only when the kthread has got to them. RTNL is not held meanwhile, but if the device goes with its network namespace, the cleanup of all namespaces waits. Fixes: 1c601d829ab0 ("bpf: cpumap xdp_buff to skb conversion and allocation") Fixes: 11941f8a8536 ("bpf: cpumap: Implement generic cpumap") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-8-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 8b71f8bf8e26e244e3a83d0822b3901f8e083353 Author: Josef Bacik Date: Sat Oct 17 23:09:40 2026 +0000 bpf: Use the socket of a sk_lookup test run under RCU [ Upstream commit 6aff0129f327b159c86a54e6bea64a027630ff6b ] bpf_sk_lookup_assign() accepts only sockets which are freed by RCU, and takes no reference. bpf_prog_test_run_sk_lookup() looks at sk_reuseport of the selected socket and generates its cookie, which is a write, behind bpf_test_timer_leave(), that is outside of the RCU read side critical section in which the program ran. If the socket is closed in the meantime it may be gone. Do both before the section ends. Fixes: 7c32e8f8bc33 ("bpf: Add PROG_TEST_RUN support for sk_lookup programs") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-7-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit b1c708a5d3811a67fc1b7a855b9237bb091e7193 Author: Josef Bacik Date: Sat Oct 17 23:09:39 2026 +0000 bpf: Keep the symbols of a program until it has ended [ Upstream commit 4eaf4d71b91a983489227336adcab33d8eae58a5 ] When the last reference to a program goes, __bpf_prog_put_noref() takes its symbols out of the kallsyms tree and frees its line info at once, and waits for the grace periods only with the rest. But the program may still be running: the link or the array it was called from is gone, the call is not over. search_bpf_extables() finds the exception table of a program by its symbol. A load that faults, and that the table is there to fix up, is fatal from then on: Oops: general protection fault, probably for non-canonical address 0xdead0000000006f8: 0000 [#1] SMP NOPTI RIP: 0010:0xffffffffc06008f6 It takes a program that is detached and closed on one CPU while it runs on another. Unwinders and bpf_prog_find_from_stack() do not know the program any more either, and the stack dump of a BPF stream reads the freed line info. Free the line info behind the grace periods the program needs, as it is done with the BTF that its text comes from. Remove the symbols in bpf_prog_free_deferred(), which runs behind them as well. The symbols are looked up under rcu_read_lock(), so the images and the program itself are freed one more grace period later. All that the program refers to is released when it was before. Fixes: 3dec541b2e63 ("bpf: Add support for BTF pointers to x86 JIT") Fixes: d7c431cafcb4 ("bpf: Add dump_stack() analogue to print to BPF stderr") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-6-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 9f3447b521a77c876b95b7d2edc6073a81d4c1f6 Author: Josef Bacik Date: Sat Oct 17 23:09:37 2026 +0000 bpf: Keep values of a dead owner for sleepable programs [ Upstream commit f693030a187b56a3946b36521bb90d785f906669 ] bpf_local_storage_destroy() frees the elements of an owner behind a plain RCU grace period, on the ground that no program can refer to an owner that goes away. But the pointer that bpf_task_storage_get() and its like return stays valid for the verifier after the program has released the owner, or has left the bpf_rcu_read_lock() section it had the owner from. A sleepable program is in no RCU read side critical section, so it can write to the value after the owner has died and the element was freed: BUG: KASAN: slab-use-after-free in _copy_from_user+0x42/0xa0 Write of size 8 at addr ffff8880074404a8 by task lsuaf/55 Free the element behind an RCU Tasks Trace grace period if sleepable code may use the map. A program that a map is bound to was loaded, and counted in map->sleepable_refcnt, before it got a value from the live owner, and stays counted until a grace period behind its last run. A program can also get at a storage map by a lookup in an outer map. Then only the outer map is counted, its programs can come after the inner map was put into it, and can hold on to the inner map after it was taken out. So note in a map that it has been an inner map, and treat it like one with sleepable users from then on. The same goes for what the special fields of the value hold. The page of a uptr has to stay pinned, and a kptr which the program stores after the owner has died has to be released. Leave the fields, and the smap that it takes to free them, to bpf_selem_free_trace_rcu(), as bpf_selem_unlink() does. bpf_local_storage_map_free() waits for that callback, and leaves smap alone if it comes across such an element. Elements of such maps now wait for sleepable programs that are running when their owner dies. Other maps are freed as before. Fixes: dcf456c9a095 ("bpf: Fix usage of trace RCU in local storage.") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-4-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit b02d4b00ebba5739d5c35b82206b53de18ebe464 Author: Alexei Starovoitov Date: Sat Oct 17 23:09:36 2026 +0000 bpf: Don't let an extension reach further into the context than its target [ Upstream commit fcbfa99aa657627528b75e7dc1023bcb0b84e558 ] How large the context of a raw tracepoint, tracepoint or syscall program is depends on what the program is attached to, or is run with. bpf_probe_register(), perf_event_set_bpf_prog() and the test runs compare that with max_ctx_offset of the program. An extension of the program, or of one of its global functions, gets the same context. How far it reaches is noted in its own max_ctx_offset, which nobody looks at. On a tracepoint with one argument it reads the stack behind the arguments, in a test run the memory behind the context, or from NULL if there is none: BUG: KASAN: stack-out-of-bounds in bpf_prog_954b5d2051843629_ts28_ext_far+0x7e/0x113 Read of size 8 at addr ffffc90000def7b8 by task ts28/104 BUG: KASAN: slab-out-of-bounds in bpf_prog_954b5d2051843629_ts28_ext_far+0x7e/0x113 Read of size 8 at addr ffff88810712c3e8 by task ts28/104 Refuse to attach an extension that reaches further than the program which it extends. A program that leaves the context to its extensions has to touch as much of it as they do. Fixes: be8704ff07d2 ("bpf: Introduce dynamic program extensions") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-3-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 85ffb0a65f29c90f77187b7173b32dc40c27a14e Author: Alexei Starovoitov Date: Sat Oct 17 23:09:35 2026 +0000 bpf: Don't take a program with a target program for an iterator [ Upstream commit b83bacf2161d0f8583e3f1e9c90402638992ad82 ] bpf_iter_prog_supported() goes by the name of the attach function. Commit 7cc639dc45c5 ("bpf: Don't take an extension for an iterator program") keeps out extensions, for which that is the name of a function of another program. A tracing program with BPF_TRACE_ITER that is loaded with attach_prog_fd gets there as well: unlike for BPF_TRACE_RAW_TP, bpf_check_attach_target() does not mind the target program. If the function is called like that of an iterator target, bpf_iter_bpf_map for example, its id in the BTF of the program is cached as the id of the target, even if the load fails later. Programs of that target which are loaded already cannot be attached any more. And the program itself can be attached as an iterator of that target, with a context that the verifier has taken from the prototype of that function: BUG: KASAN: stack-out-of-bounds in bpf_prog_66d4234e2e50f5b6_ts26_forged+0x12a/0x20b Read of size 8 at addr ffffc90000d9fc48 by task ts26/104 Refuse every program that has a target program. That covers extensions. Fixes: 15d83c4d7cef ("bpf: Allow loading of a bpf_iter program") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017230950.802052-2-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 1674ff3005c21a86520e329171d75f78898d0fd9 Author: Florian Westphal Date: Wed Oct 7 01:15:49 2026 +0200 netfilter: nft_compat: restrict raw table targets/matches [ Upstream commit ac364eb4d6d747b15df17e5fc9e442c318afaaac ] xt targets and matches declaring .table = "raw" (CT, NOTRACK) rely on only ever running in the legacy raw table's prerouting/output chains, ahead of conntrack. nft_compat_chain_validate_dependency() already enforces this kind of correspondence for "nat" by requiring the chain type to actually be NAT, but did nothing for "raw": a rule wrapping the CT target could be loaded into any hook and any priority via nft_compat, including after the real conntrack hook has already run. The CT target attaches a conntrack template to the skb when none is set yet. Require that a "raw" table dependency actually matches what xtables enforces via the implict/builtin table dependency. Fixes: 0ca743a55991 ("netfilter: nf_tables: add compatibility layer for x_tables") Assisted-by: LLM Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 1c7e736601bf7e6733be885b6a9bc6003c571496 Author: Florian Westphal Date: Wed Oct 7 01:04:59 2026 +0200 selftests: netfilter: fix return value in zone subtest [ Upstream commit a20a01ae89813ef493dc416d69f2b2ad17afb54c ] zone subtest prints FAIL, but did not set 'ret=1', so kselftest framework reports success. While at it, also fail when "nft -f" returns an error. Noticed thanks to a (broken) local patch that should have caused this selftest (resp. the kselftest framework) to report a failure. Fixes: 33b8aad21ac1 ("selftests: netfilter: add a vrf+conntrack testcase") Signed-off-by: Florian Westphal Reviewed-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit e71b7f7760d9d612d4a65c0080c219f20433f645 Author: Florian Westphal Date: Tue Sep 29 15:09:39 2026 +0200 netfilter: conntrack: fix unlikely UaF in gc worker [ Upstream commit 9836164821a46af07428bb2a5e14137bf0c7bd6e ] When early-drop scan is enabled, gc_worker() reads tmp->ct_net, resolves cnet with nf_ct_pernet(), and reads cnet->count with RCU read lock held but before acquiring a reference to tmp. Its unlikely but possible that the worker gets preempted before reading cnet->count while nf_conntrack_cleanup_net_list manages to unlink all conntracks and returns in the mean time. This allows for the pernet memory to get free'd. On resume, use after free would occur when the worker reads cnet->count. This can be solved either via another synchronize_rcu() in nf_conntrack_cleanup_net_list or via cheaper flush_work(). If work wasn't running no race can happen as next call cannot observe already-unlinked conntrack objects. This is an LLM finding with no reproducer, but it appears to be correct. Fixes: c6dd940b1f74 ("netfilter: allow early drop of assured conntracks") Reported-by: Vega Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 44c116bd7c1dc8cdf0bb10d132df1596a2263d66 Author: Bjorn Andersson Date: Thu Oct 8 11:14:57 2026 +0200 power: supply: qcom_battmgr: report full batteries [ Upstream commit 6c8098e04ee4d233399e40e7311715844910f8f8 ] The SC8280XP battery-status response has no explicit full state. When a battery reaches its full capacity on external power, neither the charging nor discharging bit is set. The driver consequently reports "Not charging", which can make userspace show the system as battery powered. Use the response's power-online bit and the reported capacity to identify a battery that is full while externally powered. Preserve "Not charging" for a battery whose charging is inhibited below its full capacity. Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply") Assisted-by: LLM Signed-off-by: Bjorn Andersson Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20261008-battmgr-full-v1-1-4f5485a9c421@oss.qualcomm.com [put variable definition in Reverse-Christmas-tree order] Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 9cf351ee561e63f1e5181a724dfd696c522d900e Author: Josef Bacik Date: Sat Oct 17 16:37:32 2026 +0000 bpf: Free what map_free() unlinks for sleepable readers [ Upstream commit 5bdd61e98da5468140aff5b5abc0e8544deaf2ee ] bpf_local_storage_map_free() takes the elements of the map off the lists of their owners, which are alive, and frees them, and the storage of an owner with its last element, behind a plain RCU grace period. Nobody uses the map any more, but the other maps of these owners are in use. A sleepable program calls the get and delete helpers under rcu_read_lock_trace() only. While it walks the list of an owner for its own map, or is about to lock the storage, the element it stands on, or the storage, can be freed under it. Whatever else takes an element off the list of a live owner frees it behind an RCU Tasks Trace grace period, which implies a plain one. Do so in bpf_local_storage_map_free() as well. It waits for these callbacks before it frees the map. This does not help a sleepable program that hands an owner to the helpers which nobody holds, and which may be gone by then. Fixes: dcf456c9a095 ("bpf: Fix usage of trace RCU in local storage.") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-31-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 189e329c62250c9cf7e16eaa5e9630d4a6440a9f Author: Alexei Starovoitov Date: Sat Oct 17 16:37:30 2026 +0000 bpf: Don't take an extension for a writable raw tracepoint program [ Upstream commit 7fe348f18b37b3f4c8beb981ef3f84564047380a ] bpf_probe_register() compares max_tp_access of the program that is attached with the size of the buffer that the tracepoint lets programs write to. An extension of that program, or of one of its global functions, gets the same context and the same pointer to the buffer. What it accesses is noted in its own max_tp_access, which nobody looks at. So it reads and writes behind the buffer, of a tracepoint that may have none: BUG: KASAN: stack-out-of-bounds in bpf_prog_5843f2b820eb4929_tr26_ext_far+0xf4/0x10c Write of size 4 at addr ffffc90000d8f894 by task wext/103 Refuse such extensions. Fixes: be8704ff07d2 ("bpf: Introduce dynamic program extensions") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-29-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 6c6b5ec860b71e17d38304a6def192ce49f2d159 Author: Josef Bacik Date: Sat Oct 17 16:37:29 2026 +0000 bpf: Assume no bounds for a writable tp with tail calls [ Upstream commit cd0490e671d70326d70c7d36e82388939fd9b071 ] A writable raw tracepoint hands a buffer to the program. The verifier notes how far the program reaches into it, and bpf_probe_register() refuses a program that reaches further than the tracepoint allows. A program that does not touch the buffer passes, and can tail-call one of its type that reads and writes behind it. Take a BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE program with a tail call to reach as far as can be, as for the stack, the packet and the buffers of iterators. It cannot be attached any more. Plain raw tracepoint programs, for which the limit is zero, cannot get at the buffer, and a tail call stays within one type: they are left alone. Fixes: 9df1c28bb752 ("bpf: add writable context for raw tracepoints") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-28-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit b741414a94a7196454456ea46e5e08798e98d252 Author: Josef Bacik Date: Sat Oct 17 16:37:28 2026 +0000 bpf: Don't take an extension for an iterator program [ Upstream commit 7cc639dc45c5d3b69acb2a2fc834e9eec51e0214 ] An extension inherits the expected_attach_type of the program it extends. If that is BPF_TRACE_ITER, check_attach_btf_id() hands the extension to bpf_iter_prog_supported(), which goes by the name of the attach function. For an extension that is the name of the subprogram it replaces, so the load fails with -EINVAL, unless that subprogram is called like the function of a target, bpf_iter_bpf_map_elem for example. Then the extension gets the context of that target. If the subprogram has as many arguments, it can use the key and the value as buffers, but how far it reaches is noted in the extension, where the test of the iterator link does not look: it reads and writes behind the elements of the map. And the id of the subprogram in the BTF of the program is cached as the id of the target, so that programs of that target which are loaded already cannot be attached. Refuse all extensions here. Fixes: 15d83c4d7cef ("bpf: Allow loading of a bpf_iter program") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-27-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 4a3b402d90231b4e0fe092cf7cc61268469c9357 Author: Josef Bacik Date: Sat Oct 17 16:37:27 2026 +0000 bpf: Assume no bounds for buffers behind a tail call [ Upstream commit 7fa323d77688e8b62b2f0bf6c3208a2c96d4a5e7 ] The bpf_map_elem, bpf_sk_storage_map and sockmap iterators hand the key and the value of an element to the program as buffers. The verifier notes how far a program reaches into them, and the iterator compares that with the map when the program is attached. A program that does not touch the buffers passes. It can tail-call another program of the same target, which gets the same context, and whose reach nobody compares with the map: BUG: KASAN: slab-out-of-bounds in ___bpf_prog_run+0xa46a/0xae80 The program array can be filled at any time, so there is nothing to look at when the link is made. For the same reason a program with a tail call is taken to use the whole stack and the whole packet. Take it to reach as far as can be into the buffers as well, so that these iterators refuse it with -EACCES. Fixes: d6c4503cc296 ("bpf: Implement bpf iterator for hash maps") Fixes: 5ce6e77c7edf ("bpf: Implement bpf iterator for sock local storage map") Fixes: 0365351524d7 ("net: Allow iterating sockmap and sockhash") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-26-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 9f13a653c21d5efb99c44b7adc3fa9005b20c442 Author: Josef Bacik Date: Sat Oct 17 16:37:26 2026 +0000 bpf: Check the maps that sleepable callbacks use [ Upstream commit 3e6d7522af2cd1b8bf135ee7df6ca962986f44d6 ] Sleepable programs can only use the kinds of map that do without an RCU read side critical section. check_map_prog_compatibility() sees to that when a map is bound to the program, and asks whether the program is sleepable. That misses the bpf_wq or bpf_task_work callback of a program that is not, which runs sleepable all the same, and it misses an inner map, which is not bound. The bpf_wq callback of a tc program that looks a key up in a sockhash gets as far as WARNING: net/core/sock_map.c:903 at __sock_hash_lookup_elem+0x18f/0x1e0 Ask the same question for the map that is handed to a helper in sleepable context, unless the RCU read lock is held: by bpf_rcu_read_lock(), or by the helper that runs the callback, as bpf_for_each_map_elem() does for a hash map. Programs that take the lock go on working. Disabled preemption or interrupts are not enough, since the maps ask for rcu_read_lock_held(). The other parts of the program may use such a map as before. A global function that is called with preemption or interrupts disabled is verified for the non-sleepable context, in which nothing is known of all that. Verify it for a context of its own: not sleepable, and without the RCU read lock. It differs in what maps can be used, and in nothing else. What is refused from now on runs into the warning above, or uses what the map frees behind a plain RCU grace period: an entry of a devmap, of a perf event array or of a cgroup array. A bloom filter does without RCU. Add it to the list, so that callbacks which use one go on loading. As a side effect sleepable programs can use bloom filters as well. A pointer to the value of a devmap which a program keeps beyond bpf_rcu_read_unlock() is not dealt with here. Fixes: 638e4b825d52 ("bpf: Allows per-cpu maps and map-in-map in sleepable programs") Fixes: 8e83da9732d9 ("bpf: add bpf_wq_start") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-25-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit dfe90eecac8eb29071dc66418f15f550d6ddff0e Author: Josef Bacik Date: Sat Oct 17 16:37:25 2026 +0000 bpf: Count sleepable callbacks as sleepable map users [ Upstream commit 927c9c985f3ef4d30c086884b7e0ecb933f742ef ] map->sleepable_refcnt tells bpf_map_fd_put_ptr() whether an inner map that is taken out of its outer map has to wait for an RCU Tasks Trace grace period as well. It counts the sleepable programs that use the outer map. The bpf_wq or bpf_task_work callback of a program that is not sleepable runs under rcu_read_lock_trace() only, and is not counted. Such a callback can look an inner map up and keep it while user space deletes it from the outer map. The inner map is freed behind a plain RCU grace period, under the callback: BUG: KASAN: slab-use-after-free in array_map_update_elem+0x6bc/0x7d0 Count a program with such a callback. The maps are bound before the verifier meets the callback, so raise the count of those that are bound when it does. Fixes: 8e83da9732d9 ("bpf: add bpf_wq_start") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-24-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 4717886c2169bb4af1b29f2dbdb80a9aa66ace97 Author: Josef Bacik Date: Sat Oct 17 16:37:24 2026 +0000 bpf: Keep a program until its bpf_wq callback has ended [ Upstream commit 1e28a5e52d32b7d3f4c9fb24898774f941166d2b ] bpf_wq_work() runs the callback under rcu_read_lock_trace() only, since the callback may sleep. The program it belongs to need not be sleepable, and such a program is freed behind a plain RCU grace period. The reference that the bpf_wq holds is dropped when the map element goes, or when another callback is set, no matter whether the work is running. If that was the last reference the program is freed under the running callback, and the worker goes on in the freed JIT image: Oops: int3: 0000 [#1] SMP NOPTI RIP: 0010:0xffffffffc0600947 All it takes is to close the map and the program while the callback runs. Note in the program that it has a callback that runs sleepable, and wait for an RCU Tasks Trace grace period, which implies a plain one, before such a program is freed. Let bpf_wq_work() enter its read side critical section before it reads callback_fn. bpf_task_work holds a reference to the program until the callback is done. Fixes: 8e83da9732d9 ("bpf: add bpf_wq_start") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-23-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 5566537a4070e8ead0bdae34455f1993d8b0ba3d Author: Josef Bacik Date: Sat Oct 17 16:37:23 2026 +0000 bpf: Don't bind a program to a netdev that goes away [ Upstream commit af929bc938e0d0ecd839e6fed9a2ce5eb5185e5c ] bpf_prog_dev_bound_init() looks the device up, takes bpf_devs_lock and registers the device for the program. The reference it holds does not keep the device registered. If bpf_dev_bound_netdev_unregister() has run by the time the lock is taken, nobody takes the program off the device any more: the bpf_offload_netdev and offload->netdev point to a net_device that is freed as soon as the reference is dropped. bpf_dev_bound_resolve_kfunc() dereferences it while the program is verified, and a new device at the same address finds the old entry. unregister_netdevice_many_notify() leaves NETREG_REGISTERED before it calls bpf_dev_bound_netdev_unregister(), which takes bpf_devs_lock. Look at reg_state under that lock, and treat a device that goes like one that is not there. Fixes: 2b3486bc2d23 ("bpf: Introduce device-bound XDP programs") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-22-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 80d3aaf751b9a2a1d204f3ee4e2ef3bb1207cbc9 Author: Josef Bacik Date: Sat Oct 17 16:37:22 2026 +0000 bpf: Fix stale offload->prog pointer after realloc [ Upstream commit 8e83d53596445fcf5b0385e5fbe8bcd971e06d06 ] bpf_prog_realloc() moves a program that the rewrites of the verifier make outgrow its pages. It updates aux->prog, but not the offload->prog of a device-bound program. When the device is unregistered, __bpf_offload_dev_netdev_unregister() hands the stale pointer to __bpf_prog_offload_destroy(), which faults on the freed program: BUG: unable to handle page fault for address: ffffc90000071050 RIP: 0010:__bpf_prog_offload_destroy+0x3f/0x310 It takes the right to load a device-bound XDP program, CAP_BPF and CAP_NET_ADMIN or a BPF token, and a device that can be removed. Commit a1aa9ef47c29 ("bpf: Fix stale offload->prog pointer after constant blinding") repaired the other place that replaces a program. Do the same here. Nothing keeps the device while a program is loaded, so it can also be unregistered at that very moment. That frees the offload, and it may have read offload->prog already when the old copy of the program is freed. In both places update the pointer under bpf_devs_lock, before the old copy goes. Fixes: ab3f0063c48c ("bpf: offload: add infrastructure for loading programs for a specific netdev") Fixes: 2b3486bc2d23 ("bpf: Introduce device-bound XDP programs") Fixes: a1aa9ef47c29 ("bpf: Fix stale offload->prog pointer after constant blinding") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-21-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 72ea9edd9eae351ba1b32ab98be5cedc0fe6cb75 Author: Josef Bacik Date: Sat Oct 17 16:37:20 2026 +0000 bpf: Bound the nesting that the BTF show code follows [ Upstream commit 13ac7c05bc45d3445b580da186548dd3487fae4e ] btf_struct_show() and btf_array_show() recurse for every nested struct and array. MAX_RESOLVE_DEPTH bounds one resolve walk when BTF is loaded, not the nesting: a member whose type is resolved already is not walked again, so BTF that defines its types from the inside out can nest them as deep as it has types. Whoever may load BTF, with CAP_BPF or a BPF token, can give such a type to the value of a map. Reading the file of that map in bpffs then overruns the kernel stack: with a few hundred levels the stack guard page is hit and the kernel panics. Stop at 32 levels. That is MAX_RESOLVE_DEPTH, and __btf_show_indent() has as many columns. Nothing is shown for a member that lies deeper, and the status becomes -E2BIG, which bpf_snprintf_btf() and bpf_seq_printf_btf() return. The types of an x86_64 defconfig kernel nest 14 deep. Fixes: b00b8daec828 ("bpf: btf: Add pretty print capability for data with BTF type info") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-19-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 32370eec7c35c3d03df48e42b2bd35834d1af604 Author: Josef Bacik Date: Sat Oct 17 16:37:19 2026 +0000 bpf: Hold the socket in the sk_storage map iterator [ Upstream commit 070a96b2a98f66087797d8a31d53126de7a5208f ] The iterator over a sk_storage map passes the owner of an element to its program as ctx->sk, without a reference. All that it holds is the RCU read lock, which keeps the element and the storage, not the socket. An element is unlinked by bpf_sk_storage_free(), which __sk_destruct() calls right before it frees the socket. That is no better for a socket with SOCK_RCU_FREE: the grace period comes in front of __sk_destruct(), so a reader which starts behind call_rcu() still finds the element. The program and the helpers it hands ctx->sk to, such as bpf_sk_storage_get() or bpf_sk_storage_delete(), use a socket which is being freed on another CPU. It takes nothing but reading the iterator while sockets with an element in the map are closed, by whomever. Take a reference for the time of the program, and skip the element if there is none to be had. To look at the owner at all, do what bpf_selem_unlink_nofail() does for bpf_local_storage_map_free(): as long as the element is linked under the lock of the storage, bpf_local_storage_destroy() has not got past it, unless it has given up on the lock, and then it waits for owner_refcnt. The last reference may now be dropped by the iterator. The end of a socket may want process context: rfcomm_sock_destruct() takes a mutex. So only drop the reference under RCU, and free a socket whose last one it was when the RCU read lock has been released, which is at the end of a bucket and of every read() at the latest. Fixes: c69d2ddb2072 ("bpf: Using rcu_read_lock for bpf_sk_storage_map iterator") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-18-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit d85ea0db86bc00d392be347799d7027090cc5929 Author: Alexei Starovoitov Date: Sat Oct 17 16:37:18 2026 +0000 bpf: Link the first element after its storage is published [ Upstream commit bd897919e4dc18bbfdfc58b696fb948b8bc2c79a ] bpf_local_storage_alloc() links the first element of a new storage to the bucket of its map, and then publishes the storage in the owner with cmpxchg(). If another cpu has been faster, the element is taken out of the bucket again and is freed together with the storage. In between the iterator over a sk_storage map can find the element. It stays linked to a storage that points to the socket, but the socket knows nothing of that storage: bpf_sk_storage_free() neither unlinks the element nor waits for anybody who uses the storage. So nothing tells the iterator that the socket has gone away. Three cpus that create the first storage of a new AF_UNIX socket at the same time, and a fourth that reads the iterator, are enough: in 20 seconds its program was shown some 4000 elements of storages that had lost. If the socket is closed in time, the program is handed a freed socket. Link the element once the storage is published. Both happens under the lock of the bucket, which holds off whoever finds the element through the owner and wants to unlink it. Fixes: c69d2ddb2072 ("bpf: Using rcu_read_lock for bpf_sk_storage_map iterator") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-17-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit cf71608b8ac11bca93da9f961d88c27c5f07d918 Author: Josef Bacik Date: Sat Oct 17 16:37:17 2026 +0000 bpf: Fix NULL deref in the sk_storage map iterator [ Upstream commit 6186c9711ac6fb984f6c2093c52bf4e827cc50b1 ] bpf_sk_storage_map_seq_find_next() hands out an element only if its local_storage pointer is set. __bpf_sk_storage_map_seq_show() then reads the pointer a second time and dereferences it without a test. Since bpf_local_storage_destroy() unlinks the elements with bpf_selem_unlink_nofail(), the pointer is reset to NULL when the socket which owns the element is destroyed, so it can change between the two reads. Reading the iterator while sockets with an element in the map are closed ends in a NULL pointer dereference. The sockets need not belong to the reader: where a program gives every new socket an element, an unprivileged user who opens and closes sockets is enough. Skip such an element, as the TCP and UDP iterators skip a socket which has been unhashed. Fixes: 0be08389c7f2 ("bpf: Switch to bpf_selem_unlink_nofail in bpf_local_storage_{map_free, destroy}") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-16-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit e43a39cdd14639bba5c7b66d1e99ea4948cec04c Author: Alexei Starovoitov Date: Sat Oct 17 16:37:16 2026 +0000 bpf: Clear sk_refcnt of a clone before its storage is linked [ Upstream commit 22f100bd013458836c3d0eaf8050b854d7534a66 ] sk_clone() sets sk_refcnt of the new socket some lines behind bpf_sk_storage_clone(). But the elements which that function copies are linked to their maps at once, and an element leads to its owner: the iterator over a sk_storage map hands the owner to its program. bpf_sk_storage_get() with BPF_SK_STORAGE_GET_F_CREATE and bpf_sk_storage_delete() rely on refcount_inc_not_zero() to tell whether they may touch the socket. sk_refcnt is in the part of struct sock which sock_copy() leaves out, and sk_prot_alloc() does not clear a clone unless init_on_alloc is on. It is zero in an object which has been a socket before, and anything in one which has not. If it is not zero, a helper gets a reference which refcount_set() wipes out, and the helper's sock_put() then drops one of the two references of the new socket, which is freed too early: IPv4: Attempt to release TCP socket in state 1 BUG: KASAN: slab-use-after-free in __raw_spin_lock_init+0x47/0x90 In the meantime the helper changes a storage which bpf_sk_storage_clone() fills without taking its lock. Nothing else can find the clone at this point. Say that it is not alive yet, before the first element is linked. Sockets whose parent has no storage are left alone. Fixes: a50a85e40c59 ("bpf: Expose bpf_sk_storage_* to iterator programs") Suggested-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-15-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit a802d0e97c0be45665d5cdf5f1e611d617fd5ae2 Author: Josef Bacik Date: Sat Oct 17 16:37:15 2026 +0000 bpf: Update the SRH state if End.B6 fails late [ Upstream commit 427e751a231aa781441d51c42e716905ee348099 ] For SEG6_LOCAL_ACTION_END_B6 and END_B6_ENCAP bpf_lwt_seg6_action() looks for the SRH again only if bpf_push_seg6_encap() has succeeded. That function pushes the new header, for which the head of the skb is reallocated if it has not got the room, and then looks up the route to the first segment. If there is none, it returns an error, and the pointer to the SRH in seg6_bpf_srh_states still points into the old head, which has been freed. The program goes on behind the error. bpf_lwt_seg6_store_bytes() and bpf_lwt_seg6_adjust_srh() read the SRH through that pointer. Look for the SRH whatever bpf_push_seg6_encap() says. Fixes: 486cdf21583e ("bpf: add End.DT6 action to bpf_lwt_seg6_action helper") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-14-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 3a9550b27e6bf4f07902e4fcea9c76f0eecf098c Author: Josef Bacik Date: Sat Oct 17 16:37:14 2026 +0000 bpf: Pull the inner header for End.DT6 in End.BPF [ Upstream commit 434324c611a98bc76dc850d45d67756dae5622cf ] bpf_lwt_seg6_action(SEG6_LOCAL_ACTION_END_DT6) pulls the outer headers off the packet and hands it to seg6_lookup_nexthop(), which reads the inner IPv6 header at skb->data. Nothing says that this header is in the head of the skb, or that there is one. If the head ends with the outer headers, the route is looked up for whatever lies behind the head, and the packet is dropped or leaves by the wrong route. If the program then pushes an SRH with SEG6_LOCAL_ACTION_END_B6, seg6_do_srh_inline() pulls an IPv6 header off a head which has none, and __skb_pull() hits its BUG(): the kernel panics on a packet from the network. GRO pulls the inner header of a plain IPv6 in IPv6 packet into the head. It takes a packet which GRO does not look into that far, one with a fragment header in front of the inner header for example, or a device without GRO, and a driver which leaves the inner header in a fragment. Make sure of the inner header together with the outer ones. The program goes on behind an error of the helper, so do it before the packet is changed. A pull which fails can still have moved the head, so look for the SRH again. Fixes: 486cdf21583e ("bpf: add End.DT6 action to bpf_lwt_seg6_action helper") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-13-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit b9138e8800eef3e131d62e811399182fc86b1653 Author: Josef Bacik Date: Sat Oct 17 16:37:13 2026 +0000 bpf: Validate the SRH which End.DT6 uncovers in End.BPF [ Upstream commit e8b084646b946cc6f7976365588035947a296184 ] input_action_end_bpf() validates the SRH of a packet and pulls it into the head before the program runs. If the program decapsulates the packet with bpf_lwt_seg6_action(SEG6_LOCAL_ACTION_END_DT6), bpf_update_srh_state() looks for a routing header in the inner packet and takes it for the new SRH as it is. Nobody has looked at that header, and whoever has sent the packet has written it. ipv6_find_hdr() finds it in a fragment of the skb as well, but hdrlen is then read at that offset from skb->data, past the end of the head. The header need not be an SRH, and its hdrlen need not fit into the packet, but it is marked as valid, and bpf_lwt_seg6_adjust_srh() and bpf_lwt_seg6_store_bytes() check their offsets against it. A program which then adds a TLV at the end of the SRH, where hdrlen has it, makes bpf_lwt_seg6_adjust_srh() move and write memory behind the head of the skb, as far as the sender likes within the 2 KB that hdrlen can say: BUG: KASAN: slab-out-of-bounds in bpf_skb_net_hdr_push+0x185/0x240 Read of size 2088 at addr ffff888107d6f09e by task srh/102 BUG: KASAN: slab-out-of-bounds in bpf_skb_net_hdr_push+0x1b5/0x240 Write of size 8 at addr ffff888107d6f8be by task srh/102 Use seg6_get_srh(), which pulls and validates the header. Without a valid SRH the state says that there is none, and the packet goes its way as before. The pull can move the head, so compute the data pointers behind it. Fixes: 486cdf21583e ("bpf: add End.DT6 action to bpf_lwt_seg6_action helper") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-12-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit f2c55a9b936da22525988d9040f528d6feb78359 Author: Josef Bacik Date: Sat Oct 17 16:37:12 2026 +0000 bpf: Don't saturate owner_refcnt on the last unpin [ Upstream commit 30a140c9d479974021f5c3eecb64415c96419c3f ] bpf_local_storage_map_free() pins the owner with refcount_inc_not_zero() while it uncharges an element. The pin counts when bpf_local_storage_destroy() could not get local_storage->lock: destroy() then goes on, drops the owner's reference and spins until the count is zero. So the pin is the last reference whenever it is needed, and refcount_dec() takes that for a bug: it warns "decrement hit 0; leaking memory" and saturates the count. Unless destroy() happens to read the count between the two stores it spins for ever, under rcu_read_lock(). Drop the pin with refcount_dec_and_test(). Fixes: 5d800f87d0a5 ("bpf: Support lockless unlink when freeing map or local storage") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-11-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit be367c0bf210854265cf6b6dcaf74c5ad632978c Author: Josef Bacik Date: Sat Oct 17 16:37:11 2026 +0000 bpf: Read the probe of a perf event under event_mutex [ Upstream commit 3ccd700543f16a2b2ab656f35dcaeb6bd7c45e22 ] For a perf event on a kprobe or uprobe event which was made in tracefs, bpf_get_kprobe_info() and bpf_get_uprobe_info() look the probe up by name in the list of dynamic events, and hand a pointer to its symbol or file name back to the caller. None of the callers holds event_mutex. The perf event keeps its trace event alive, nothing else. Other dynamic events are removed from the list and freed during the walk. And a probe which shares its event with other probes can be deleted while the event is in use, so even the probe which is found can be freed, together with the string, before the caller has measured and copied it. The result is a use-after-free in the walk, in strlen() and in the copy to user space, or a NULL pointer dereference. The readers are BPF_OBJ_GET_INFO_BY_FD and fdinfo of a perf link, for whoever holds a descriptor of the link, and BPF_TASK_FD_QUERY. The other side is anybody who may write to dynamic_events, kprobe_events or uprobe_events. Take event_mutex in bpf_get_perf_event_info() and give the caller a copy of the name, which it has to free. Fixes: 41bdc4b40ed6 ("bpf: introduce bpf subcommand BPF_TASK_FD_QUERY") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-10-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 2745c446f1b5d6effae5da90b12f18b60ee54f35 Author: Josef Bacik Date: Sat Oct 17 16:37:10 2026 +0000 bpf: Don't let bpf_skb_adjust_room() use up the MSS [ Upstream commit 12d07c38e1b0f79e48a37abd7103194212f2da8c ] When bpf_skb_adjust_room() grows a TCP GSO packet without BPF_F_ADJ_ROOM_FIXED_GSO, gso_size is lowered by the number of bytes added. Nothing looks at how large it is. gso_size is the size of the segments the peer has sent if the packet comes out of GRO, and what the sender has written into the virtio header if it comes from a tun device or a packet socket. If it equals len_diff the result is 0, and a packet of up to 64 KB is no GSO packet any more. If it is smaller, the 16 bit value wraps around. One less than len_diff gives GSO_BY_FRAGS. skb_segment() then takes the length of each segment from the frag_list. A packet with more than 64 KB of payload gets that far, and one from a tun device has no frag_list: BUG: KASAN: null-ptr-deref in skb_segment+0xcf1/0x1a90 BUG: kernel NULL pointer dereference, address: 0000000000000070 tcp_gso_segment+0x1be/0x9f0 inet_gso_segment+0x288/0x740 inet_gso_segment+0x288/0x740 skb_mac_gso_segment+0x179/0x2e0 What is left must not be less than TCP_MIN_GSO_SIZE either. The stack relies on that for the number of segments to fit into gso_segs, see commit c27c449d455a ("virtio-net: Ensure that TCP packets don't overflow gso_segs"). Refuse to grow a packet that would end up with less, with the error that other packets which cannot be adjusted get. Fixes: 2be7e212d541 ("bpf: add bpf_skb_adjust_room helper") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-9-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit a2c98b2a86b0f7011c9debf249208074bfb9c7f8 Author: Josef Bacik Date: Sat Oct 17 16:37:09 2026 +0000 bpf: Look at all 64 bits of a BPF_JSET mask on 32-bit [ Upstream commit ee4f44e0e3c8125eebe9ac967b6984bc9253d489 ] In the branch of a BPF_JSET which is taken, the verifier can learn something about the register only if the mask has a single bit: then this bit is set. regs_refine_cond_op() tests this with is_power_of_2(val) and then ORs val into var_off. val is a u64, but is_power_of_2() takes an unsigned long. On a 32-bit kernel it only sees the lower half of the mask. For if r1 & 0xffffffff80000000 goto l which is a BPF_JSET | BPF_K with an immediate of 0x80000000, the lower half is a power of two. So the verifier takes all 33 bits for set at l, while the branch is taken if any of them is. A mask of 0x100000001 from a register does the same for bit 0. The log of an i386 kernel, for r6 = bpf_get_prandom_u32() << 31: 3: (45) if r6 & 0x80000000 goto pc+2 from 3 to 6: R6=0xffffffff80000000 R10=fp0 6: (77) r6 >>= 63 ; R6=1 When the program runs, r6 >> 63 is 0. >From then on the verifier works with known bits which the register does not have at run time. It accepts, for example, an offset into a map value which it derives from these bits and believes to be constant, and the program can access memory outside of the map value. Count the bits of the whole value. Only 32-bit kernels are affected. On a 64-bit kernel unsigned long holds the whole mask, and this patch changes nothing. Fixes: 960ea056561a ("bpf: verifier: teach the verifier to reason about the BPF_JSET instruction") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-8-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 4bdfbb76fd2f0412d47333a0b1148110d0a8017a Author: Josef Bacik Date: Sat Oct 17 16:37:08 2026 +0000 bpf: Forbid sleeping in bpf_find_vma() callbacks [ Upstream commit c6dc0a288d4e787c578d7ab0464b9c943ad88ecc ] A sleepable program can call bpf_find_vma() and use a sleepable helper such as bpf_copy_from_user() or bpf_copy_from_user_task() in the callback. The verifier accepts this, but bpf_find_vma() runs the callback with the mmap_lock of the mm held for read. If the user copy faults on that mm, the fault handler has to take mmap_lock again. Lockdep reports recursive locking, and if a writer queued up in between, the fault blocks behind the writer, which waits for the read lock the helper already holds: sleepable prog other thread of the same mm bpf_find_vma(current, ...) mmap_read_trylock(mm) mmap_write_lock(mm) <- waits callback: copy_from_user() page fault mmap_read_lock(mm) <- queued behind the writer This is the same problem as with sleepable task_vma iterator programs. The verifier checks synchronous callbacks in the caller's context, so in_sleepable_context() is true in the callback of a sleepable program. Verify the callback like a hash map for_each callback, as running in an RCU read-side critical section where sleeping is not allowed, and actually hold rcu_read_lock() around it, so that global functions the callback calls, which are then verified for a non-sleepable context, see the RCU protection they are verified with. Non-sleepable programs already run the callback under RCU, nothing changes for them. A sleepable program whose bpf_find_vma() callback calls any helper, kfunc or global function that may sleep is now rejected by the verifier, including ones that would be harmless under mmap_lock as they don't touch user memory. Fixes: 7c7e3d31e785 ("bpf: Introduce helper bpf_find_vma") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-7-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit a6bf637ff9d78d20aa4955cfd58c72369dc8f9bd Author: Josef Bacik Date: Sat Oct 17 16:37:07 2026 +0000 bpf: Reject sleepable programs for task_vma iterator [ Upstream commit dfcd1765911223df60845e288ad392d5237f47a3 ] A sleepable "iter.s/task_vma" program can be attached, but its ->show() callback runs with the mmap_lock of the iterated mm held for read. As soon as the program runs, bpf_iter_run_prog() calls might_fault(), and any bpf_copy_from_user() or bpf_copy_from_user_task() it does may really fault or take mmap_lock again. With lockdep this is reported as recursive locking of mmap_lock. Without lockdep, a fault on the reader's own mm, or access_process_vm() on the iterated mm, has to take mmap_lock for read again. If a writer queued up in the meantime that blocks behind the writer, which in turn waits for the read lock the iterator already holds, and the read() hangs: reader (iter.s/task_vma) other thread of the same mm task_vma_seq_get_next() mmap_read_lock(mm) mmap_write_lock(mm) <- waits bpf prog: copy_from_user() page fault mmap_read_lock(mm) <- queued behind the writer The reader waits killable, so the hang lasts until it gets a fatal signal. bpf_iter_link_attach() allows sleepable programs for the targets that set BPF_ITER_RESCHED, and task_vma sets it because cond_resched() between VMAs is fine with mmap_lock held. Rescheduling between objects and running a sleepable program inside ->show() are different properties, though, and task_vma only has the first one. The open-coded task_vma iterator does not have this problem since it hands out a snapshot of the VMA and holds no lock when it returns to the program. The vma handed to the program is only stable under mmap_lock, so the lock can't be dropped around ->show(). Add a feature flag BPF_ITER_NOSLEEP for targets which can't run sleepable programs although they can reschedule, and set it for task_vma. The check at attach time is not enough. BPF_LINK_UPDATE replaces the program of a link, and bpf_iter_link_replace() only compares the type, the attach type and the BTF id of the two programs, which are the same for a sleepable and a non-sleepable one. Do the check there as well. That also closes this way around the existing rule: so far a sleepable program could be put on a link of a target that doesn't set BPF_ITER_RESCHED, like the hash map element iterator, which runs it under rcu_read_lock(). BPF_LINK_CREATE of a sleepable program for the task_vma target, and BPF_LINK_UPDATE to one, now fail with -EINVAL, also for programs that don't touch user memory and have been working since sleepable iterator programs exist. The programs can still be loaded. They have to be loaded as non-sleepable programs, or use the open-coded iterator. Fixes: b77fb25dcb34 ("bpf: Add support for bpf iterator programs to use sleepable helpers") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-6-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 103d8a81021b1d7dbec91c339d5b5b7a4184aa89 Author: Josef Bacik Date: Sat Oct 17 16:37:06 2026 +0000 bpf: Don't hand out a linked element as extra element [ Upstream commit ccb88db8dac8fabde58656d5d4a33711e89c480a ] When htab_map_update_elem() replaces an element of a preallocated map, alloc_htab_elem() takes the spare element of this cpu and puts the old element into the per-cpu slot right away, long before the old element is unlinked from its bucket. The bucket lock disables interrupts, but it does not keep out an NMI, or a tracing program on the return of alloc_htab_elem(). bpf_prog_active only helps if both programs are kprobe, tracepoint or perf_event programs. A program that updates an existing key in another bucket of the same map gets to use the slot: htab_map_update_elem(k1) tc, xdp, fentry, raw_tp, ... alloc_htab_elem() l_new = *pl_new *pl_new = l_old still linked in bucket 1 htab_map_update_elem(k2) perf_event program l_new = *pl_new the l_old of the outer update hlist_nulls_add_head_rcu(l_new, bucket 2) hlist_nulls_del_rcu(k2's old element) hlist_nulls_add_head_rcu(l_new, bucket 1) hlist_nulls_del_rcu(l_old) If l_old was the first element of bucket 1, the outer add points its pprev at l_new, and the delete takes it out of bucket 1 only. l_new->next now leads into bucket 2, where l_old stays with a poisoned pprev, on which a delete of k2 crashes. If it was not the first, the delete takes it out of bucket 2: k2 is gone from the map, and the chain of bucket 1 still contains l_old, whose next pointer leads into bucket 2. Either way a walk of bucket 1 ends on the nulls value of bucket 2. lookup_nulls_elem_raw() restarts whenever that happens, so every lookup in bucket 1 which does not find its key spins forever: rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: __htab_map_lookup_elem+0x354/0x4d0 BUG: KASAN: wild-memory-access in htab_map_delete_elem+0x30c/0x670 Write of size 8 at addr dead000000000122 by task extra/102 An NMI between the load and the store of the slot makes both updates use the same element, with much the same result. Empty the slot when the spare element is taken, in a way that is atomic on this cpu, and put the old element in only after it has been unlinked and its timers and the like have been cancelled. A nested update that finds the slot empty, which is the case that corrupted the map, fails with -EBUSY. Fixes: 8c290e60fa2a ("bpf: fix hashmap extra_elems logic") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-5-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit bcd2e35432a433b98d5ef9817b51657dd8ef1963 Author: Josef Bacik Date: Sat Oct 17 16:37:05 2026 +0000 bpf: Don't leak the inode when token creation fails [ Upstream commit f52b699c88634d0161c97247e0f791a840eb868d ] bpf_token_create() allocates a bpffs inode and hands it to alloc_file_pseudo(). The inode reference only moves to the new file when that call succeeds: alloc_file_pseudo() leaves the caller's reference alone on failure, and FD_PREPARE() does not even evaluate the file expression when it cannot get a descriptor. Before the conversion to FD_PREPARE() the error path did iput(inode). The conversion dropped it, so each BPF_TOKEN_CREATE that fails with -EMFILE, -ENFILE or -ENOMEM at this point leaks an inode. A task that is allowed to create tokens can hit this at will by lowering RLIMIT_NOFILE, and the leaked inodes make umount of that bpffs instance complain about busy inodes. Put the inode again if no file was created. Fixes: 981bec8f698b ("bpf: convert bpf_token_create() to FD_PREPARE()") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-4-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit b13b93f264ec9a700e22f91ada8313acc44ada2a Author: Josef Bacik Date: Sat Oct 17 16:37:04 2026 +0000 bpf: Forbid sleeping in hash map for_each callbacks [ Upstream commit 9bdd5e7f5d8313fa1f3a210621b4007bb5ad0ec6 ] A sleepable program (e.g. SEC("syscall"), lsm.s, fentry.s) can pass a callback to bpf_for_each_map_elem() on a hash map and call a sleepable helper or kfunc such as bpf_copy_from_user() from it. The verifier accepts this, but at run time the callback is invoked from inside an RCU read-side critical section: bpf_for_each_hash_elem() rcu_read_lock(); callback_fn(map, key, val, ctx, 0); bpf_copy_from_user() <- may fault and sleep rcu_read_unlock(); bpf_each_rhash_elem() does the same for BPF_MAP_TYPE_RHASH. Sleeping there triggers the "Voluntary context switch within RCU read-side critical section!" warning, delays grace periods, and with CONFIG_PREEMPT_RCU=n silently ends the read-side critical section that the bucket walk relies on. Synchronous callbacks are verified with the caller's state, so kernel/bpf/verifier.c:in_sleepable_context() only looks at the program's sleepability and the locks the program took itself, and does not know that the helper holds rcu_read_lock() around the callback. With a SEC("syscall") program whose callback reads a page that has to be read from disk first: BUG: sleeping function called from invalid context at include/linux/uaccess.h:169 RCU nest depth: 1, expected: 0 __might_fault+0x29/0x80 _copy_from_user+0x26/0x90 bpf_copy_from_user+0x23/0x60 bpf_prog_17d44fa39eebd6cc_cb+0x35/0x46 bpf_for_each_hash_elem+0xdb/0x280 Fix by marking the callback frame of hash map iteration as running under RCU and making in_sleepable_context() false while such a frame is on the call stack, so sleepable helpers, kfuncs and global functions are rejected there as inside bpf_rcu_read_lock(). The rules for trusting RCU protected pointers are left alone, which is conservative and keeps callbacks that verify today and do not sleep working. The flag is compared in func_states_equal() so that pruning never mixes the two contexts. Array map callbacks run without any lock and keep the caller's context. Fixes: 314ee05e2fc6 ("bpf: Add hashtab support for bpf_for_each_map_elem() helper") Fixes: 818e00848227 ("bpf: Implement iteration ops for resizable hashtab") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-3-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit e86347ee1ec5ab33aa07e1f499743cf9b0137561 Author: Kumar Kartikeya Dwivedi Date: Thu Sep 24 19:06:38 2026 +0200 bpf: Report non-sleepable kfunc programs accurately [ Upstream commit dac3b7a30d7e5384a61ee46f476dc2c45ceb9453 ] A sleepable kfunc call can fail either because the program is not sleepable or because an otherwise sleepable program has entered a non-sleepable critical section. check_kfunc_call() checks these conditions separately. The first check is only gated by in_sleepable(), so the shared diagnostic can blame an active RCU, preemption-disabled, IRQ-disabled, or locked region even though leaving that region would not make the program sleepable. Adding a second diagnostic entry point only to force the program context would duplicate the API. Reject the call once based on in_sleepable_context(). Teach the shared bpf_diag_ctx_forbidden() reporter and non_sleepable_context_description() to consider active RCU, preempt, IRQ, and lock regions only when the program is sleepable, and to fall back to the non-sleepable program otherwise. A non-sleepable program can still hold that context state, so relying on the existing no-context fallback alone would keep blaming the critical section. Select the suggestion at the kfunc, helper, and global-function sites according to that cause, and choose between the two existing kfunc verifier messages the same way, so a sleepable program is told to leave the critical section and a non-sleepable program is told to become sleepable. This avoids a diagnostic-only wrapper while retaining context history for sleepable programs that enter a forbidden region. Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov Acked-by: Eduard Zingerman Link: https://lore.kernel.org/bpf/2e42a1a2bf45f4d2aba7495bdc9f147558055740e2f3c8b9dae255f6c57fc13c@mail.kernel.org/ Link: https://patch.msgid.link/20260924170646.2366016-5-memxor@gmail.com Stable-dep-of: 9bdd5e7f5d83 ("bpf: Forbid sleeping in hash map for_each callbacks") Signed-off-by: Sasha Levin commit f014c65f9de79122e818a977af7261127ee0e98c Author: Josef Bacik Date: Sat Oct 17 16:37:03 2026 +0000 bpf: Use the frame mem type in devmap egress XDP [ Upstream commit b3ca872947ef322c475ceaa7a76a9ebb3356152e ] A devmap egress program that removes a whole fragment of a redirected xdp_frame with bpf_xdp_adjust_tail() or bpf_xdp_pull_data() frees it with page_frag_free() whatever the frame's memory type is. For a MEM_TYPE_PAGE_POOL frame from a page_pool based driver this drops the page reference owned by the pool while the pool still accounts the fragment ("page_pool leak" bad page, leaked pp reference). kernel/bpf/devmap.c:dev_map_bpf_prog_run() points xdp.rxq at an on-stack struct xdp_rxq_info rxq = { .dev = rx_dev }; whose mem.type is 0, i.e. MEM_TYPE_PAGE_SHARED, and net/core/filter.c:bpf_xdp_shrink_data() releases frags according to rxq->mem.type. cpumap, which runs programs on xdp_frames the same way, already copies xdpf->mem_type into its private rxq for each frame. With 9000 byte frames from virtio_net and an egress program that cuts the fragments off: BUG: Bad page state in process swapper/3 pfn:10660b page dumped because: page_pool leak bad_page+0xbd/0x190 __free_frozen_pages+0x5c7/0x900 bpf_xdp_adjust_tail+0x3be/0x480 bpf_prog_dad43f894a3faff7_egress+0x15c/0x1cd dev_map_bpf_prog_run+0x288/0x610 The pool waits for these pages for ever when its device is gone. That is the harmless case. A page of the pool can hold more than one fragment while its refcount is 1: the first page_frag_free() frees it under the fragment which is still in use, and the second one runs into page dumped because: VM_BUG_ON_PAGE(page_ref_count(page) == 0) kernel BUG at include/linux/mm.h:1846! veth is not affected. It takes references of its own on the pages and redirects the frame as MEM_TYPE_PAGE_SHARED. Fix by setting rxq.mem.type from each frame before running the devmap program, as cpu_map_bpf_prog_run_xdp() does. Fixes: ca9984c5f0ab ("bpf: devmap: provide rxq after redirect") Signed-off-by: Josef Bacik Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017163745.3341787-2-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 6e12a77bc3b7c1b6e01b86465e4135a9599774b3 Author: Joonhoe Kim <26rote@gmail.com> Date: Mon Oct 12 22:00:53 2026 +0900 power: supply: qcom_battmgr: report the USB type from USB_ADAP_TYPE [ Upstream commit a49f86cd1333c6e12fd37bc0b3234ace10072553 ] On SM8350 and SM8550 class firmware the USB power supply reads its usb_type from the USB_TYPE property. On a Kaanapali (SM8850) tablet that property is 1 (SDP) whatever is plugged in, while USB_ADAP_TYPE reports the adapter, using the same numbering as POWER_SUPPLY_USB_TYPE_*: PC port USB_TYPE 1 USB_ADAP_TYPE 1 (SDP) USB-C dock, 5 V PD USB_TYPE 1 USB_ADAP_TYPE 6 (PD) 65 W PPS charger USB_TYPE 1 USB_ADAP_TYPE 8 (PD_PPS) Qualcomm's downstream qti_battery_charger driver also maps USB_ADAP_TYPE to POWER_SUPPLY_PROP_USB_TYPE. Request USB_ADAP_TYPE for POWER_SUPPLY_PROP_USB_TYPE instead. Tested on a Lenovo Legion Tab Y700 gen 5 (qcom,kaanapali-pmic-glink, which uses the SM8550 path). Only tested on this device; the SM8350 variant shares the property map and was not tested. Fixes: 29e8142b5623 ("power: supply: Introduce Qualcomm PMIC GLINK power supply") Reviewed-by: Kamal Wadhwa Assisted-by: LLM Signed-off-by: Joonhoe Kim <26rote@gmail.com> Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20261012130053.442-1-26rote@gmail.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit e6171dcef8a8fbba1a671e64aed57a8807a42b30 Author: Jiayuan Chen Date: Sat Oct 17 22:38:12 2026 +0800 bpf: Fix verifier WARN on narrow read of bpf_tcp_sock u64 fields [ Upstream commit af873495cbcb066ab029f7f63b94410d4db47628 ] A BPF program can read the middle of a u64 field in struct bpf_tcp_sock: tp = bpf_tcp_sock(listener); /* +0x54 is in the middle of the u64 bytes_received */ unsigned hi = *(unsigned *)((char *)tp + 0x54); bpf_tcp_sock_is_valid_access() allows this 4-byte read (the default case only checks size == 4), but bpf_tcp_sock_convert_ctx_access() only knows the field starts and has no idea how to handle such an offset. It emits no instruction, cnt stays 0 and the fixup pass trips verifier_bug(): verifier bug: error during ctx access conversion (0) Just disallow the narrower access by matching the whole u64 range of the two fields, so it is turned down at check time: invalid tcp_sock access off=84 size=4 Fixes: 655a51e536c0 ("bpf: Add struct bpf_tcp_sock and BPF_FUNC_tcp_sock") Reported-by: Kaiyan Mei Reported-by: Yinhao Hu Reported-by: Dongliang Mu Signed-off-by: Jiayuan Chen Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261017143819.209510-1-jiayuan.chen@linux.dev Closes: https://lore.kernel.org/bpf/7a8ff335.1024c.1a14395f3e5.Coremail.kaiyanm@hust.edu.cn/ Signed-off-by: Sasha Levin commit 3f19f5603b1b8d597dc8f7899009588f4a73c4d9 Author: Tejun Heo Date: Fri Oct 16 19:37:17 2026 -1000 sched_ext: Fix a bypassed task stalling on a cpu its scheduler has no caps on [ Upstream commit 5809f749fbdbaf9c6b34ecbe6d2b413e56eec6e3 ] A bypassing sub-scheduler's tasks are run by its nearest ancestor that isn't bypassing. The ancestor puts them on the local DSQ under its own caps. Whether such a task may stay on the cpu and whether a cap revoke reenqueues it are still checked against the caps of the task's own scheduler. The bypass load balancer moves tasks between cpus without looking at caps, so a bypassed task can run on a cpu where its own scheduler holds none. Once its slice runs out, it can't stay. It goes to the ancestor's bypass DSQ without a kick, and the cpu can go idle with it queued until something else reschedules the cpu. Make both checks against the caps of the scheduler running the task. When bypass lifts, the running task keeps its slice without a cap check, so evict it then if it can't stay on the cpu. Fixes: 75a8c8202c91 ("sched_ext: Add reject DSQ for cap-rejected dispatches") Fixes: 46a85ae6fe5b ("sched_ext: Tie cpu occupancy to SCX_CAP_BASE through the task slice") Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Signed-off-by: Sasha Levin commit 4ba25300443dfc4140b8f110a6abf79457795bd1 Author: Tejun Heo Date: Fri Oct 16 19:37:16 2026 -1000 sched_ext: Fix the running task keeping its protection into bypass [ Upstream commit 30fb2b1e4d41a641a059f295a717ffa0e24307e7 ] Protection ends when the scheduler enters bypass, so that bypass scheduling can cut every task's slice. scx_bypass() clears it for the queued tasks by cycling them, and strips the running task's in the same walk over rq->scx.runnable_list. The running task is never on that list. set_next_task_scx() takes it off and put_prev_task_scx() puts it back, so the strip never runs. A protected running task then keeps its slice into bypass, where the tick's attempts to cut it are refused. Strip the running task's protection outside the walk. Fixes: 9cfc6ab34a31 ("sched_ext: Add SCX_TASK_PROTECTED") Signed-off-by: Tejun Heo Reviewed-by: Andrea Righi Signed-off-by: Sasha Levin commit cf9c82fca08589d1fa308af458306cdb2df60996 Author: Arnaldo Carvalho de Melo Date: Wed Oct 7 07:02:42 2026 -0300 perf evsel: Mark the event as supported when retrying an open [ Upstream commit cc956e0cd6a405fbc6ad3055cbbdb178562ef27d ] Opening a group with perf record on a machine with perf_event_paranoid > 1 and no CAP_PERFMON fails the first perf_event_open() with EACCES, after which evsel__open_cpu() clears evsel->supported; evsel__fallback() then adds exclude_kernel and record__open() retries, and the retry succeeds with supported left false. get_group_fd() treats unsupported events as ungroupable, so the retry opens the group members without their leader: sys_perf_event_open: pid 12345 cpu 0 group_fd -1 FAILED '.../test-record-group-sampling1' - group failure which fails the group subtests of "perf test 82", the Perf attribute expectations test, when it is run as a regular user, while it passes as root or with CAP_PERFMON, where the first open doesn't fail. commit 2cc7aa995ce9 ("perf stat: Refactor retry/skip/fatal error handling") dropped the pos->supported = true that record__open() did after a successful open and moved the resets into the stat code only, while saying "When an event is tried the supported is set to true again". Do that in evsel__open_cpu(), which every open entry point funnels through, so that a retry describes its own try instead of the previous failure. Fixes: 2cc7aa995ce9ecd8 ("perf stat: Refactor retry/skip/fatal error handling") Reviewed-by: Ian Rogers Tested-by: Ian Rogers Cc: Ian Rogers Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 2ff3e9db504a8a25414a91b970f3f326ed083e48 Author: Arnaldo Carvalho de Melo Date: Tue Oct 6 17:59:48 2026 +0200 perf test attr: Relax group checking for ungrouped expectations [ Upstream commit ac416cf3eff650ad4b6dabc3407c7174e1826db9 ] When matching the recorded events back against the expectations, attr.py requires every event opened in a group to match an expectation that declares the same group. The perf stat default metrics open the events of each metric in groups, but the test expectations only verify the event attributes, so test-stat-default fails with: FAILED '.../test-stat-default' - group failure Only enforce the group of a recorded event when the expectation it matches declares one. Expectations that ask for a group are still verified in both directions. Fixes: c7adeb0974f18da4 ("perf jevents: Add set of common metrics based on default ones") Fixes: 2dfc0cab3da4a205 ("perf stat: Add detail -d,-dd,-ddd metrics") Reviewed-by: Ian Rogers Tested-by: Ian Rogers Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 11dea84b0b6d10eb86cbee7a7efdb64023872216 Author: Arnaldo Carvalho de Melo Date: Tue Oct 6 17:43:08 2026 +0200 perf test attr: Fix default stat metrics expectations [ Upstream commit 8158b84e65ed01b80164413cc9cb0655b84fc470 ] Since commit c7adeb0974f1 ("perf jevents: Add set of common metrics based on default ones") and commit 2dfc0cab3da4 ("perf stat: Add detail -d,-dd,-ddd metrics") the perf stat default metrics open their events in groups, so group leaders and members have read_format=15 and members are enabled without enable_on_exec, while standalone events keep read_format=3 and are disabled until exec. Also, since commit b1c5efbfd92e ("perf parse-events: Remove hard coded legacy hardware and cache parsing") bare hardware events resolve to the core PMU sysfs/JSON events (type 4), so add the raw encodings the Intel and AMD core PMUs use for instructions, branch-misses, cpu-cycles and stalled-cycles-frontend/backend to test-stat-default and test-stat-detailed-1/2/3. Add base-stat-group, that accepts both the standalone and the group variants of read_format, disabled and enable_on_exec, and point the four default/detailed expectations at it. test-stat-basic, test-stat-C0 and test-stat-no-inherit keep base-stat, whose events aren't opened in a group: for those, a change that groups or enables them differently is still something to catch. test-stat-group1 does open its events in a group, but pins read_format, disabled and enable_on_exec itself, the very terms base-stat-group loosens, so it doesn't need it either. Fixes: b1c5efbfd92eb84d ("perf parse-events: Remove hard coded legacy hardware and cache parsing") Fixes: c7adeb0974f18da4 ("perf jevents: Add set of common metrics based on default ones") Fixes: 2dfc0cab3da4a205 ("perf stat: Add detail -d,-dd,-ddd metrics") Reviewed-by: Ian Rogers Tested-by: Ian Rogers Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 08f0aa63fe29ff408ede2af75302b51c4bec6a7b Author: Arnaldo Carvalho de Melo Date: Tue Oct 6 17:08:49 2026 +0200 perf test attr: Fix legacy event encodings in group tests [ Upstream commit 599311bca66459fc4a7e5acf970b14dee60f88a7 ] Since commit b1c5efbfd92e ("perf parse-events: Remove hard coded legacy hardware and cache parsing"), event names are resolved with sysfs/JSON priority over the legacy encodings, so bare cache-misses and instructions now become the core PMU sysfs/JSON events (on x86 type 4, configs 0x412e and 0xc0) rather than the legacy PERF_TYPE_HARDWARE/config=3 and config=1 events the tests expect, e.g.: expected config=3, got 0 expected disabled=0, got 1 expected mmap=0, got 1 expected comm=0, got 1 expected freq=0, got 1 expected enable_on_exec=0, got 1 expected task=0, got 1 FAILED '.../test-record-group-sampling1' - match failure The shown diff is against the cycles group leader, as no result event matches the expected cache-misses member anymore. Request the legacy encodings explicitly with the legacy-hardware-config term, added in commit 0012e0fa221bf9cc ("perf jevents: Add legacy-hardware and legacy-cache json"), keeping the original attribute expectations unchanged, in: test-record-group1 test-record-group2 test-record-group3 test-record-group-sampling test-record-group-sampling1 test-record-group-sampling2 test-stat-group1 This went unnoticed until tests/attr.sh stopped ignoring attr.py's return value. Fixes: b1c5efbfd92eb84d ("perf parse-events: Remove hard coded legacy hardware and cache parsing") Reviewed-by: Ian Rogers Tested-by: Ian Rogers Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit f69aea819d18b3046da7d23944063e7c3efa2ab7 Author: Arnaldo Carvalho de Melo Date: Tue Oct 6 16:43:56 2026 +0200 perf test attr: Fix record dwarf sample_type expectation [ Upstream commit 10e2992e5438c39d8404714aebf3261a391bc76d ] Since commit bdd051e24914 ("perf record: Split --data-mmap option"), record_opts__parse_callchain() sets record_data_mmap instead of record->sample_address for the DWARF unwind mode, so -d/--data and its implied PERF_SAMPLE_DATA_SRC are not enabled implicitly anymore. As a result, --call-graph dwarf no longer sets PERF_SAMPLE_ADDR and PERF_SAMPLE_DATA_SRC, making the test fail: expected sample_type=45359, got 12583 where 45359 (0xb12f) is: IP|TID|TIME|ADDR|CALLCHAIN|PERIOD|REGS_USER|STACK_USER|DATA_SRC and 12583 (0x3127) is: IP|TID|TIME|CALLCHAIN|PERIOD|REGS_USER|STACK_USER i.e. the values differ exactly by PERF_SAMPLE_ADDR (0x8) and PERF_SAMPLE_DATA_SRC (0x8000). The mmap_data=1 expectation is still correct as DWARF now enables record_data_mmap. This went unnoticed until tests/attr.sh stopped ignoring attr.py's return value. Fixes: bdd051e249141c79 ("perf record: Split --data-mmap option") Reviewed-by: Ian Rogers Tested-by: Ian Rogers Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 0cf8537c4b350a6d809712b43c84003c9f542e6d Author: Koichiro Den Date: Thu Oct 15 10:44:02 2026 +0900 PCI: endpoint: pci-epf-vntb: Honor MSI-X selection [ Upstream commit a5401ce3ab2356b7861f53d09205008b7a49d57e ] ntb_hw_epf tries MSI-X first and falls back to MSI. It reports the result in COMMAND_CONFIGURE_DOORBELL. pci-epf-vntb ignores MSIX_ENABLE, configures only MSI, and always raises peer interrupts with PCI_IRQ_MSI. When MSI-X is selected, the host does not program MSI, so raising it can issue a write to an invalid address. This was observed as IOMMU faults on the RC, with no doorbell interrupts delivered. Configure MSI-X when supported and use the selected type for peer doorbells and link events. Allocate the MSI-X Table and PBA in the config BAR and configure db_count entries. Use this EPF-owned layout even if the EPC has fixed, hardware-owned Table/PBA regions, as pci-epf-test and nvmet-pci-epf already do. Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Signed-off-by: Koichiro Den Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://patch.msgid.link/20261015014402.2976188-3-den@valinux.co.jp Signed-off-by: Sasha Levin commit 80804836a7e36c592580aa77422b80d675524029 Author: Koichiro Den Date: Thu Oct 15 10:44:01 2026 +0900 PCI: endpoint: pci-epf-vntb: Use a local epf pointer in interrupt setup [ Upstream commit 17c4115cbe99da4d147aee778c308da1d4bb000d ] Use a local epf pointer in epf_ntb_configure_interrupt() to shorten the repeated ntb->epf accesses. No functional changes. Signed-off-by: Koichiro Den Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://patch.msgid.link/20261015014402.2976188-2-den@valinux.co.jp Stable-dep-of: a5401ce3ab23 ("PCI: endpoint: pci-epf-vntb: Honor MSI-X selection") Signed-off-by: Sasha Levin commit 8c0f05570df41f7fe7cb8b9485647eaee8274343 Author: Cen Zhang Date: Sat Oct 17 15:00:58 2026 +0800 ALSA: jack: Protect the index scan against control removal [ Upstream commit ba8c3d5fc27ac3f86962641dd3b6600906234bab ] A control found during a jack-name index scan must remain alive until snd_ctl_find_id() finishes comparing its ID and count. However, get_available_index() calls it without holding card->controls_rwsem. With CONFIG_SND_CTL_FAST_LOOKUP enabled, the lookup loads a raw control pointer from ctl_hash and dereferences it in elem_id_matches() without any lock that excludes removal. This can happen when a jack is created while a different jack owner on the same card removes an existing control with the same name and index. For example, probe and unbind of different HDA codecs can reach these paths on a shared card if their generated jack names match. The codec device locks do not serialize operations on different codecs. The unbind path can free the control during the index scan: Codec A: probe Codec B: unbind -------------- --------------- get_available_index() snd_ctl_find_id() kctl = xa_load(...) hda_codec_driver_remove() snd_hda_codec_cleanup_for_unbind() snd_hda_jack_tbl_clear() snd_device_free() __snd_device_free() snd_jack_dev_free() snd_ctl_remove() snd_ctl_remove_locked() __snd_ctl_remove() snd_ctl_free_one() kfree(kctl) elem_id_matches(kctl, ...) read freed id/count -> UAF Hold controls_rwsem for read across the index scan so removal cannot free a control until the lookup has finished using it. Release the lock when get_available_index() returns, before the caller adds the new control under the write lock. Fixes: 38ea4c3dc306 ("ALSA: control: Optimize locking for look-up") Signed-off-by: Cen Zhang Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-f08c844bb1163c8d4fa1-v2-2f3c99e40f90134846ee@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 31ed1e69d12c8b0ec4cb3892a41555f974eaeda6 Author: Daniel Borkmann Date: Fri Oct 16 21:16:35 2026 +0200 bpf: Don't echo user-supplied map info fields back to userspace [ Upstream commit 458575e1f2ddea944d679fe778c92e370a9b61a4 ] Commit ea2e6467ac36 ("bpf: Return hashes of maps in BPF_OBJ_GET_INFO_BY_FD") started copying struct bpf_map_info in from userspace in order to read the new hash and hash_size input fields. Before that, the kernel ignored the contents of the user buffer and returned a zeroed structure with only the output fields filled in. Some output fields are only set for certain maps: btf_id, btf_key_type_id and btf_value_type_id when the map has BTF (and btf_vmlinux_id for struct_ops maps, ifindex, netns_dev and netns_ino when the map is offloaded). For all other maps, these fields now return whatever userspace passed in before. This breaks userspace which reuses one bpf_map_info for several queries. Restore the original behavior by zeroing the structure and copying in only hash and hash_size from userspace before the output fields are filled in. Fixes: ea2e6467ac36 ("bpf: Return hashes of maps in BPF_OBJ_GET_INFO_BY_FD") Reported-by: Quentin Monnet Reported-by: Tianyi Chen Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261016191635.662690-1-daniel@iogearbox.net Signed-off-by: Sasha Levin commit 0553db6c101bf0b4878bda00cb746aa5e16d1c6a Author: Brad Fitzpatrick Date: Sun Oct 11 01:41:27 2026 +0000 gre: keep the UDP tunnel GSO type when completing GRO [ Upstream commit 718f364a20ecee4f25986789c25550cf4da73b4c ] gre_gro_complete() assigns SKB_GSO_GRE to gso_type rather than OR-ing it in. When GRE is carried over UDP by FOU or GUE, udp_gro_complete() has already set SKB_GSO_UDP_TUNNEL{,_CSUM} before calling into the FOU or GUE gro_complete handler and then gre_gro_complete(), so that bit is lost. That has broken forwarding of such packets since FOU gained GRO: if a host with a FOU or GUE socket on the tunnel's port merges transit packets and then forwards them out a device that can't segment them itself, udp4_ufo_fragment() finds neither tunnel bit and fails, and the packets are dropped. Since commit 3d010c8031e3 ("udp: do not accept non-tunnel GSO skbs landing in a tunnel"), local receive is broken too: udp_unexpected_gso() considers the merged skb, which reaches the encapsulation socket without either UDP tunnel bit, unexpected and hands it to udp_rcv_segment(). Segmenting fails, so the packet is freed and counted in UdpInErrors. Either way, only packets GRO didn't merge get through, so TCP over FOU or GUE GRE tunnels slows to about one segment per round trip whenever the receiving device has GRO enabled. OR in SKB_GSO_GRE instead, as ipip_gro_complete() and sit_gro_complete() do for SKB_GSO_IPXIP4. For plain GRE, gso_type is still zero at this point unless the driver set it, so nothing changes there in the usual case. The assignment dates to commit bf5a755f5e91 ("net-gre-gro: Add GRE support to the GRO stack"), but nothing set gso_type before it until FOU GRO came along, so the Fixes tag points there. Tested under virtme-ng with bulk TCP over a GRE tunnel between two network namespaces joined by a veth, with GRO on the receiving veth and segmentation off on the sending one, so GRO sees wire-sized packets. 32 MiB took: before after FOU over IPv4 26.0s, 9658 UDP errors 0.28s, 0 errors GUE over IPv4 26.1s, 9686 UDP errors 0.39s, 0 errors FOU over IPv6 26.4s, 9860 UDP errors 0.16s, 0 errors plain GRE 0.17s 0.15s Forwarding the same FOU traffic through a third namespace with its own FOU socket on the port, GRO on its ingress and segmentation off on its egress, took 26.0s with 4826 egress drops before and 0.31s with none after. On v6.8, before 3d010c8031e3, local receive was fine but forwarding failed the same way (25.7s, 4764 drops). With GRO off on the receiver, all took under 0.2s both before and after. The gre_gso.sh and fou_mcast_encap.sh selftests give the same results before and after. Fixes: afe93325bc02 ("fou: Add GRO support") Signed-off-by: Brad Fitzpatrick Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20261011-bradfitz-gre-fou-gro-b4-v1-1-df713aad1531@tailscale.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 270990225e90ce5971004a2b4fb0b991dda35a97 Author: Vincent Jardin Date: Fri Oct 9 02:00:58 2026 +0200 ptp: qoriq: fix support for PTP_EXTTS_REQUEST2 ioctl [ Upstream commit d347ab5cf809365e7b3749dc91d77e89e4b7ec3f ] Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") moved the validation of the external timestamp request flags into the PTP core. A driver that does not set .supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl, but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP, since the core always adds PTP_STRICT_FLAGS to it. ptp_qoriq_init() programs TMR_CTRL with ETEP1 and ETEP2 cleared, so the timer timestamps the rising edge of its external trigger inputs. Declare that, with PTP_STRICT_FLAGS, so that a falling edge request is rejected instead of being timestamped on the rising edge. This also makes the legacy PTP_EXTTS_REQUEST ioctl strict: a request for the falling edge, or for both edges, now fails with -EOPNOTSUPP instead of being timestamped on the rising edge. That cannot be avoided: the core adds PTP_STRICT_FLAGS to every PTP_EXTTS_REQUEST2 request, so a driver has to declare it to accept them, and once declared it applies to both ioctls. Commit 3200fdd4021d ("broadcom: fix support for PTP_EXTTS_REQUEST2 ioctl") made the same change for bcm-phy-ptp. Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") Reviewed-by: Jacob Keller Reviewed-by: Kory Maincent Signed-off-by: Vincent Jardin Reviewed-by: Wei Fang Link: https://patch.msgid.link/20261009-for-upstream-qoriq-ptp-extts-flags-v2-3-0f4eeff2295d@free.fr Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d91efa60e95bd239e6c5756feb1ecaddabbb13da Author: Vincent Jardin Date: Fri Oct 9 02:00:57 2026 +0200 net: enetc: fix support for PTP_EXTTS_REQUEST2 ioctl [ Upstream commit 8e96c4d393168661704d850bcf818e46efb8ef24 ] Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") moved the validation of the external timestamp request flags into the PTP core. A driver that does not set .supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl, but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP. The ENETC timer is the QorIQ 1588 timer, set up by ptp_qoriq_init(), which programs TMR_CTRL with ETEP1 and ETEP2 cleared, so it timestamps the rising edge of its external trigger inputs. Declare that, with PTP_STRICT_FLAGS, so that a falling edge request is rejected instead of being timestamped on the rising edge. This also makes the legacy PTP_EXTTS_REQUEST ioctl strict: a request for the falling edge, or for both edges, now fails with -EOPNOTSUPP instead of being timestamped on the rising edge. That cannot be avoided: the core adds PTP_STRICT_FLAGS to every PTP_EXTTS_REQUEST2 request, so a driver has to declare it to accept them, and once declared it applies to both ioctls. Commit 3200fdd4021d ("broadcom: fix support for PTP_EXTTS_REQUEST2 ioctl") made the same change for bcm-phy-ptp. Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") Reviewed-by: Jacob Keller Reviewed-by: Kory Maincent Signed-off-by: Vincent Jardin Reviewed-by: Wei Fang Link: https://patch.msgid.link/20261009-for-upstream-qoriq-ptp-extts-flags-v2-2-0f4eeff2295d@free.fr Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 7b5bb9f10b940b72b4cd2a49c9ab16feae7277a8 Author: Vincent Jardin Date: Fri Oct 9 02:00:56 2026 +0200 dpaa2-ptp: fix support for PTP_EXTTS_REQUEST2 ioctl [ Upstream commit 86a30c4348497bcddcf2796258955bbaaf58c9a3 ] Commit 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") moved the validation of the external timestamp request flags into the PTP core. A driver that does not set .supported_extts_flags still accepts the legacy PTP_EXTTS_REQUEST ioctl, but every PTP_EXTTS_REQUEST2 request is rejected with -EOPNOTSUPP. On an LX2160A board, linuxptp ts2phc arms the external timestamp channel of the 1588 timer with PTP_EXTTS_REQUEST2, gets -EOPNOTSUPP and exits, so the PHC cannot be disciplined from an external 1PPS. ptp_qoriq_init() programs TMR_CTRL with ETEP1 and ETEP2 cleared, so the timer timestamps the rising edge of its external trigger inputs. Declare that, with PTP_STRICT_FLAGS, so that a falling edge request is rejected instead of being timestamped on the rising edge. This also makes the legacy PTP_EXTTS_REQUEST ioctl strict: a request for the falling edge, or for both edges, now fails with -EOPNOTSUPP instead of being timestamped on the rising edge. That cannot be avoided: the core adds PTP_STRICT_FLAGS to every PTP_EXTTS_REQUEST2 request, so a driver has to declare it to accept them, and once declared it applies to both ioctls. Commit 3200fdd4021d ("broadcom: fix support for PTP_EXTTS_REQUEST2 ioctl") made the same change for bcm-phy-ptp. Fixes: 7c571ac57d9d ("net: ptp: introduce .supported_extts_flags to ptp_clock_info") Reviewed-by: Jacob Keller Reviewed-by: Kory Maincent Signed-off-by: Vincent Jardin Link: https://patch.msgid.link/20261009-for-upstream-qoriq-ptp-extts-flags-v2-1-0f4eeff2295d@free.fr Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit bfbde6dca5373b54bd7642b029bf82f8a3df8808 Author: Ivan Vecera Date: Sun Oct 11 08:12:11 2026 +0200 dpll: zl3073x: notify sibling pin when shared output config changes [ Upstream commit 0748e473b65a8c8690e250cdf7cc4f5a93252493 ] The P-pin and N-pin of an output share the divisor, clock type, eSync and phase compensation registers (outside N-divided mode). Changing them through one pin changes the other pin too, but only the requested pin gets a change notification. Add zl3073x_dpll_output_pin_sibling_get() and notify the sibling from frequency_set(), esync_set() and phase_adjust_set(). The notification re-enters the pin get callbacks, so it has to be sent after zldpll->lock is released and the callbacks switch from guard(mutex) to explicit unlocking. To always find a registered sibling, add a pin to zldpll->pins before dpll_pin_register() and remove it only after dpll_pin_unregister(), both under zldpll->lock. A pin that is on the list but not registered gets no netlink notification, as dpll_pin_event_send() skips such pins, and the only in-tree DPLL notifier ignores DPLL_PIN_CHANGED. Found by code inspection, not triggered at runtime. Fixes: 634ca2cb06d2 ("dpll: zl3073x: Add support to get/set esync on pins") Fixes: ce26d7ca50a5 ("dpll: zl3073x: Add support to get/set frequency on pins") Fixes: 6287262f761e ("dpll: zl3073x: Add support to adjust phase") Reviewed-by: Petr Oros Signed-off-by: Ivan Vecera Link: https://patch.msgid.link/20261011061211.448373-6-ivecera@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 63f66c8d5ef0ca09fd0cc71cdc5a1977d92c1986 Author: Ivan Vecera Date: Sun Oct 11 08:12:10 2026 +0200 dpll: zl3073x: make embedded sync follow the output carrier frequency [ Upstream commit bf6f105f2cb6477e36a9312477d0aa32a43aa13d ] The eSync period and width are relative to the output carrier, but changing the output frequency did not update them, so eSync ran at a wrong frequency and duty cycle. For a 1 Hz carrier esync_get() returns -EOPNOTSUPP, so eSync left enabled could not be disabled. Factor out zl3073x_out_esync_{is_enabled,enable,disable}() helpers and use them in frequency_set() to recompute the eSync period and width for the new carrier, or to disable eSync for a 1 Hz carrier. Also compute the reported pulse width in 64 bits, as 50 * esync_n_width overflows u32 for low carrier frequencies. Hit during development, confirmed on an oscilloscope. Fixes: ce26d7ca50a5 ("dpll: zl3073x: Add support to get/set frequency on pins") Fixes: 634ca2cb06d2 ("dpll: zl3073x: Add support to get/set esync on pins") Reviewed-by: Petr Oros Signed-off-by: Ivan Vecera Link: https://patch.msgid.link/20261011061211.448373-5-ivecera@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 8c4a376abd79812821a88e0be4d0a924b386514d Author: Ivan Vecera Date: Sun Oct 11 08:12:09 2026 +0200 dpll: zl3073x: reject output frequencies with too small divisor [ Upstream commit 456027325c9cd2be94229687f2c412ae6f351bd8 ] The output divisor has to be at least 2: a divisor of 1 bypasses the divider and the hardware then ignores the pulse width and eSync registers. For the N-pin of an N-divided output the N divider (>= 2) applies on top, so its effective divisor has to be at least 4. zl3073x_pin_check_freq() only checked that the frequency divides the synth frequency. Require also the minimum divisor. For N-divided outputs this is necessary but not sufficient, the rest is checked by the frequency set callback. Hit during development: an N-pin frequency that needs an N divider of 1 was accepted, and with esync_n_period = 1 the N-pin produced no output on an oscilloscope. Fixes: a99a9f0ebdaa ("dpll: zl3073x: Read DPLL types and pin properties from system firmware") Reviewed-by: Petr Oros Signed-off-by: Ivan Vecera Link: https://patch.msgid.link/20261011061211.448373-4-ivecera@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit a6012ab27d7c75cd322f61fee7a779c67f826db0 Author: Ivan Vecera Date: Sun Oct 11 08:12:08 2026 +0200 dpll: zl3073x: reject inexact frequencies for N-divided outputs [ Upstream commit f8993627d3101de0833022ac88083ac0147aae7d ] For N-divided outputs the P-pin and N-pin share the output divisor and the N-pin frequency is synth_freq / (div * esync_n_period). The frequency set helper computed esync_n_period with a truncating division and only rejected a zero result, so a frequency that does not divide evenly was silently rounded. Setting the P-pin could then shift the N-pin frequency too (e.g. 600 MHz synth, div=60, period=10 gives P=10 MHz, N=1 MHz; setting P to 2.5 MHz moves N to 1.25 MHz). When setting the P-pin, the product esync_n_period * div used for the rescale was computed in 32 bits and could wrap, so a wrong N divider was stored for low N-pin frequencies. Require esync_n_period >= 2 so the N-pin frequency stays below the P-pin one, reject a P-pin frequency for which the esync_n_period keeping the N-pin frequency does not fit into 32 bits, and check the division remainder and reject the request if it is not exact. Found by code inspection, not triggered at runtime. Fixes: ce26d7ca50a5 ("dpll: zl3073x: Add support to get/set frequency on pins") Reviewed-by: Petr Oros Signed-off-by: Ivan Vecera Link: https://patch.msgid.link/20261011061211.448373-3-ivecera@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 9a247ad49dd20822f73052793e1b5b37c74870a5 Author: Ivan Vecera Date: Sun Oct 11 08:12:07 2026 +0200 dpll: zl3073x: do not offer 0 Hz as a supported pin frequency [ Upstream commit 23171065fb436195981ca32f9e49dcf852dbd018 ] zl3073x_pin_props_get() always adds the current pin frequency to the supported list without checking it. A sub-Hz frequency reads back as 0 Hz, so 0 Hz can then be requested and the output frequency set callback divides by zero. A 0 Hz entry in the firmware node is not rejected either: it is offered for an input pin, and for an output pin zl3073x_pin_check_freq() divides by it at probe time. Do not add a 0 Hz current frequency and reject 0 Hz in zl3073x_pin_check_freq(). If the list ends up empty, do not publish it at all, as the DPLL core rejects an empty non-NULL list. Found by code inspection, not triggered at runtime. Fixes: 85a9aaac4a38 ("dpll: zl3073x: Include current frequency in supported frequencies list") Reviewed-by: Petr Oros Signed-off-by: Ivan Vecera Fixes: a99a9f0ebdaa ("dpll: zl3073x: Read DPLL types and pin properties from system firmware") Link: https://patch.msgid.link/20261011061211.448373-2-ivecera@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 01f17e9c4a9f1e688f6605b83a597b98f39f8982 Author: Joas Antonio dos Santos Date: Thu Oct 8 12:28:12 2026 -0300 calipso: update payload_len when removing the CALIPSO option [ Upstream commit 00accbd9d5021b942a16078bd5717d7865f6971c ] calipso_skbuff_delattr() removes the CALIPSO option from the hop-by-hop extension header, or the whole extension header if CALIPSO is its only option, and pulls the skb by the removed length. It never updates ipv6hdr->payload_len, so after a successful removal the header still claims the original length. calipso_skbuff_setattr() already adjusts payload_len by the length it adds; the delete path was missed. This is reached on the forward path when a packet carrying CALIPSO is sent to a destination mapped to an unlabeled NetLabel domain. The forwarded packet then has a payload_len larger than its real payload by the removed length (8 to 264 bytes), and the receiver drops it as truncated. So removing the label on the forward path has been broken for every packet that is not resegmented later (SYN, UDP, ICMPv6...). Adjust payload_len after the header is moved. BIG TCP packets carry payload_len == 0 (see ipv6_set_payload_len()), and ipv6_payload_len() then falls back to skb->len, so leave them alone. Tested with client, router and server network namespaces on one kernel (arm64, QEMU): SELinux permissive with a minimal mdp-generated policy (network_peer_controls=1), "netlabelctl calipso add pass doi:16", the default NetLabel mapping left unlabeled, IPv6 forwarding on the router. The client sends 5 UDP datagrams with a CALIPSO hop-by-hop option (DOI 16, set through IPV6_HOPOPTS) to the server through the router: before: router Ip6OutForwDatagrams 5, server receives 0, server Ip6InTruncatedPkts 5 after: router Ip6OutForwDatagrams 5, server receives 5, server Ip6InTruncatedPkts 0 Fixes: 2917f57b6bc1 ("calipso: Allow the lsm to label the skbuff directly.") Signed-off-by: Joas Antonio dos Santos Link: https://patch.msgid.link/179147329205.58079.5847298721173675285@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 848a57752790e05b1ba505215720afaf8ce20b49 Author: HyeongJun An Date: Fri Oct 16 16:25:19 2026 +0900 ASoC: codecs: sta350: Fix definition of Ch2 and Ch3 Volume Bypass controls [ Upstream commit 7308ce7c8459e994a36a22607e974e3e132a9275 ] Each channel's master volume bypass (CxVBP) is in its own configuration register, C2CFG and C3CFG, not in C1CFG, which holds the channel 1 bit. Fixes: 2439ea1f0f8f ("ASoC: sta350: Add codec driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/1107a42a563459b26038bdff4d8f6e2423816d0a.1792135144.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit f4ab9afda924794e82b630545a4f2af7249bd07c Author: HyeongJun An Date: Fri Oct 16 16:25:18 2026 +0900 ASoC: codecs: sta32x: Fix definition of Ch2 and Ch3 Volume Bypass controls [ Upstream commit ea53ab9003d8655cf7e94428de3006e86fbd06a0 ] Each channel's master volume bypass (CxVBP) is in its own configuration register, C2CFG and C3CFG, not in C1CFG, which holds the channel 1 bit. Fixes: c034abf6e503 ("ASoC: add STA32X codec driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/8576f091aa0fe172ce43f28dacd6a1bf638258c6.1792135144.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e4b1d54f8969008a7723be216fe032644558adb7 Author: HyeongJun An Date: Fri Oct 16 16:25:17 2026 +0900 ASoC: codecs: tlv320adc3xxx: Fix definition of AGC Target Level control [ Upstream commit 0a9efcb663b5a4d468cbb90de29c6dd3794af124 ] The right channel AGC target level is in RIGHT_CHN_AGC_1, as on the left, not in RIGHT_CHN_AGC_2, which holds the right noise threshold and hysteresis. Fixes: e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/09cad9ec9bb382e44cad079a680bdf0f6163567e.1792135144.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e25c9dcf31b6c309340dbea1582038b7e8bae567 Author: HyeongJun An Date: Fri Oct 16 16:25:16 2026 +0900 ASoC: codecs: da732x: Fix definition of ADC2 EQ Overall Volume control [ Upstream commit ebef9212cb469706e28002a20f9d48307d1fd867 ] The ADC2 EQ overall volume is in DA732X_REG_ADC2_EQ5 (0x9F), not in DA732X_REG_ADC1_EQ5 (0x97), which holds the ADC1 one. Fixes: 48e278746070 ("ASoC: codecs: Add DA732x codec driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Link: https://patch.msgid.link/35bae3f84cdc3ceb6ca412153f44dee3647fdbd6.1792135144.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 189c4356a409de684686266924e841ec2f93992c Author: Yonghong Song Date: Fri Oct 16 11:30:44 2026 -0700 bpf, x86: Pass a trampoline's stack arguments by the calling convention [ Upstream commit 9f9c30435ca92cddb37e67cda46ec02e26dd0a07 ] A trampoline on a function of a program that can tail call keeps the tail call counter pointer by pushing rax after allocating its frame. When it calls the original function, for fexit, fmod_ret or fsession, the push sits between the stack arguments and the return address, which the x86-64 calling convention does not allow. For example, in run() -> call_stack() -> callee_stack(a, b, c, d, e, f, g, h) run() -> subprog_tail() -> bpf_tail_call() callee_stack() is not on the path to the tail call, so the verifier allows its stack arguments g and h. fexit on it builds, with T the trampoline's rbp: T-120 h save_args() T-128 g save_args(), RSP after sub rsp, 128 T-136 tail_call_cnt_ptr push rax, RSP at the call T-144 return address call orig_call and callee_stack() finds the counter pointer where g belongs, at 8(%rsp) on entry, and g where h belongs. Keep the pointer in a slot of the frame instead, so that the stack arguments sit right above the return address again: T-120 tail_call_cnt_ptr mov [rbp - 120], rax T-128 (pad to 16) T-136 h save_args() T-144 g save_args(), RSP at the call T-152 return address call orig_call Fixes: 324c3ca6eed6 ("bpf,x86: Implement JIT support for stack arguments") Signed-off-by: Yonghong Song Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261016183044.1132751-1-yonghong.song@linux.dev Signed-off-by: Sasha Levin commit 2c34c23342d3a8d4ea034d914bc3b528fa00fbf4 Author: Yuan Chen Date: Fri Oct 9 10:24:27 2026 +0800 bpf: Claim the per-CPU send_signal irq_work before filling it [ Upstream commit 2d1f101ee619435873ed8a23fcb3bd09204a5024 ] irq_work_is_busy() cannot see the per-CPU send_signal_work while it is being filled: the check only matches after irq_work_queue() has claimed the work. A concurrent caller therefore passes it, both callers race for the same irq_work, and the loser's signal is silently lost along with its task reference while the queued work runs with a mix of both callers' fields. kprobe, tracepoint and perf_event programs exclude each other on the same CPU through bpf_prog_active, so for two callers to meet, one of the programs has to be a raw tracepoint or an fentry one. And since commit 87c544108b61 ("bpf: Send signals asynchronously if !preemptible") this path runs with IRQs enabled too, so a hard IRQ can interrupt the fill as well, not only an NMI. Found by code inspection and reproduced with a perf_event NMI program racing an fentry one. Claim the work through work->task itself: cmpxchg() it from NULL to the target task before touching the other fields, and set it back to NULL once the callback has consumed them. A context finding the work claimed returns the documented -EBUSY. Fixes: 1bc7896e9ef4 ("bpf: Fix deadlock with rq_lock in bpf_send_signal()") Signed-off-by: Yuan Chen Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261009022427.968304-1-chenyuan@kylinos.cn Signed-off-by: Sasha Levin commit a2e5938dec7be6aa4407b53723f8df594c2330c5 Author: Sasha Levin Date: Thu Oct 15 11:40:44 2026 -0400 ARC: Strip libgcc debug information when generating BTF [ Upstream commit ca201ad6e92a1924138e83ff966f7a091e3bbe6e ] ARC links against the compiler's libgcc archive. The ARC GNU 2023.03 toolchain ships this library with debug information, including complex floating-point types in integer arithmetic helpers such as __udivdi3. These types reach vmlinux even though the kernel does not use complex floating-point arithmetic. When floating-point BTF encoding is enabled, pahole rejects those types: Complex, interval and imaginary float types are not supported Error while encoding BTF. FAILED: load BTF from .tmp_vmlinux1.BTF.1: No such file or directory KernelCI's upgrade to pahole 1.31 exposed this long-standing problem as failed ARC builds. As of 1.32, pahole still rejects these types, and older versions will stay in use, so the kernel build has to keep them out of vmlinux. Commit f122668ddcce ("ARC: Add eBPF JIT support") documented the same failure along with a workaround of disabling floating-point BTF encoding, but that also discards supported floating-point types from kernel BTF. For CONFIG_DEBUG_INFO_BTF, generate a debug-stripped copy of the selected libgcc archive in the output tree and link that copy. Preserve the archive structure so that only needed helpers are linked, and use the normal Kbuild objcopy rule to track input and command changes. The trade-off is that vmlinux in BTF-enabled builds no longer carries DWARF for the libgcc helpers. Debug information for kernel code, the installed toolchain and non-BTF builds stay unchanged. Reproduced and tested with ARC GCC 12.2.1 and pahole 1.31 and 1.32 using an ARCv2 tinyconfig with BPF_SYSCALL and DWARF4/BTF enabled. Before and after vmlinux.o files are identical after stripping debug information. Fixes: db16c1fe92d7 ("bpf: Generate BTF_KIND_FLOAT when linking vmlinux") Signed-off-by: Sasha Levin Signed-off-by: Alexei Starovoitov Acked-by: Alan Maguire (Oracle) Link: https://github.com/kernelci/kernelci-core/commit/e71b8c9f42253180596e734c18965a5aad80c8c5 Link: https://patch.msgid.link/20261015154044.4058618-1-sashal@kernel.org Signed-off-by: Sasha Levin commit b70c83b83cb651413f2215822c3e5def884d6b05 Author: Tal Zussman Date: Thu Oct 15 10:43:15 2026 -0400 btrfs: update the inode item when removing a free space inode [ Upstream commit 4e89aff9ad6fcbec555c38169807c4023f93450f ] btrfs_remove_free_space_inode() adds an orphan item for the free space inode and clears its link count in memory, but never writes the inode item. The item is only removed once the delayed iput evicts the inode, which happens in a later transaction, from the cleaner thread or a throttled transaction end. If we crash in between, or if evict can't reserve space for the truncation and leaves the orphan item for the next mount, the on-disk inode still has a link count of 1. btrfs_orphan_cleanup() then treats it as an inode with links and only deletes the orphan item. The free space header item is already gone at that point, so nothing ever finds the inode again, and its data extents are leaked. Write the zero link count to the inode item in the same transaction as the orphan item, so the orphan cleanup evicts the inode instead. Account for the extra tree root item update when removing a block group. Fixes: 455757c322cc ("Btrfs: delay iput when deleting a block group") Assisted-by: LLM Signed-off-by: Tal Zussman Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit a7dbe28d630cc912bc3a4029d03568010b9a0b58 Author: Tal Zussman Date: Thu Oct 15 10:43:14 2026 -0400 btrfs: drop the extent maps of the written part of a failed ordered extent [ Upstream commit bca2cf55a7331e6b0ff95ad47fc2a7e8ecc7dc74 ] If a truncated ordered extent fails to complete, the extent maps for the part that was written are kept while the extent itself is freed below. A later read can follow them to blocks that have been reallocated. Drop the maps for the whole range on error. Fixes: 77cef2ec5484 ("Btrfs: allow partial ordered extent completion") Assisted-by: LLM Signed-off-by: Tal Zussman Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 61d829d053def454fb0a69b6de905f7d6377ad65 Author: Piotr Gliźniewicz Date: Fri Oct 16 09:31:30 2026 +0200 ALSA: 6fire: take stream_mutex in the Digital Thru control [ Upstream commit d030561d53cb272bb55ba2dd11aaa609e8240b7e ] usb6fire_control_digital_thru_put() calls usb6fire_control_streaming_update(), which on an idle card with Digital Thru on selects altsetting 2 and writes the clock register for 96 kHz through usb6fire_control_set_rate(). usb6fire_pcm_prepare() calls both functions through usb6fire_pcm_set_rate() under rt->stream_mutex. The put does not take stream_mutex, so the two can run at the same time. 500 runs of a 0.2 s aplay at 48 kHz while a second loop toggled "Digital Thru Playback Route" with amixer (12693 on/off cycles, kernel 7.2.9): in 216 cases the two usb_set_interface() calls ran at the same time and the kernel logged "sysfs: cannot create duplicate filename '.../3-2:1.1/ep_82'" with a stack dump. 27 of the aplay runs failed, and for each of them the kernel logged "could not start pcm stream". Take stream_mutex in the put. The pcm runtime is created before the controls and freed with the card, so chip->pcm is valid whenever the put runs. The put waits for a running prepare, which makes synchronous USB transfers under stream_mutex; on a card that responds late the wait can reach about 12 s, or 24 s with Digital Thru on, and during the wait the other controls of the card can be neither read nor written, because snd_ctl_elem_write() holds controls_rwsem around the put. Before this patch the put already made transfers of the same kind under controls_rwsem. No code that holds stream_mutex takes controls_rwsem. The same test on kernel 7.2.10 with this patch (12863 cycles) gave no failed aplay run and no "duplicate filename" message. Fixes: 2475b0d40761 ("ALSA: 6fire - Add support of digital-thru mixer") Assisted-by: LLM Signed-off-by: Piotr Gliźniewicz Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261016073132.109288-2-p.glizniewicz@gmail.com Signed-off-by: Sasha Levin commit 9a75b98d49a82e3e49ca58bb70fc0d4747770ab8 Author: Myeonghun Pak Date: Thu Oct 15 21:39:18 2026 -0400 platform: cznic: turris-omnia-mcu: stop button emulation producers [ Upstream commit 0045cd6b8ab2319e9d8de46e5e329cdc35ce6d05 ] The legacy MCU IRQ thread can requeue button-release emulation work after its managed cleanup has canceled it. Since the IRQ is still active at that point, the newly queued work can outlive device teardown and access freed MCU state. Use disable_delayed_work_sync() to prevent further queueing and drain the worker before the IRQ action is released. Keep the parent IRQ active while the worker completes. devm_add_action_or_reset() also drains the work if action registration fails. This issue was identified as part of our ongoing research while reviewing kernel code. Fixes: dfa556e45ae9 ("platform: cznic: turris-omnia-mcu: Add support for MCU connected GPIOs") Assisted-by: LLM Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://lore.kernel.org/r/20261016013918.3492835-1-mhun512@gmail.com Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin commit 3da6b10b71c840e22ef08e60a897b839b564cf4a Author: Ömer Mete Kaya Date: Mon Oct 5 00:59:25 2026 +0300 usbnet: fix smp_processor_id() use in preemptible context [ Upstream commit 95a5c641fc7becab441bf244baa73b0b0f8b7dea ] tx_complete() calls this_cpu_ptr() before disabling preemption, which triggers a BUG when running with CONFIG_DEBUG_PREEMPT: BUG: using smp_processor_id() in preemptible code in tx_complete Fix by using get_cpu_ptr()/put_cpu_ptr() which disable preemption and return the per-CPU pointer atomically. The usbnet_skb_return() hunk is a hardening change: that path runs in softirq context so no warning fires there, but the same fix is applied for consistency. Fixes: ed194d136769 ("usb: core: remove local_irq_save() around ->complete() handler") Suggested-by: David Laight Reported-by: syzbot+04cd90bb99c6ef81a65d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=04cd90bb99c6ef81a65d Signed-off-by: Ömer Mete Kaya Link: https://patch.msgid.link/20261004215937.302247-1-omermetekaya0@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit e452336c84c5e844616a4a02ba14ea8ca91b49b1 Author: Yongzhao Chen Date: Fri Oct 2 23:04:08 2026 +0200 net: phy: qcom: at803x: Apply IPQ5018 analog settings at probe [ Upstream commit 17baf30a0e64cde0e8a30723b7c6d06417152514 ] ipq5018_probe() pulses the PHY reset, after which the IPQ5018 internal GE PHY starts autonegotiating with its reset-default analog settings. ipq5018_config_init() writes the analog settings only when the MAC attaches the PHY, usually when the interface is opened. On a board where the PHY connects to a QCA8337 PHY without a cable, 1000BASE-T does not come up in the meantime, SmartSpeed downshifts both PHYs, and only the IPQ5018 side restores its 1000BASE-T advertisement at attach, so the link stays down. Apply the analog settings in probe right after the reset and restart autonegotiation. Move the settings into a helper shared with config_init() and return MDIO errors from it instead of ignoring them. The values written do not change, only the time of the write. Fixes: d46502279a11 ("net: phy: qcom: at803x: Add Qualcomm IPQ5018 Internal PHY support") Signed-off-by: Yongzhao Chen Link: https://patch.msgid.link/20261002210408.730-1-yongzhao.derek@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 0f33ef07be4121c87df3d5b2fa05609d743a4570 Author: Fabrice Derepas Date: Wed Aug 12 16:18:40 2026 +0200 ima: reject a kexec buffer whose declared size exceeds the buffer [ Upstream commit ceb24c7052cc4649e3b52a51a7cca7dfe4896cec ] ima_restore_measurement_list() parses the measurement list persisted across kexec. It computes the parse end directly from the blob: bufendp = buf + khdr->buffer_size; khdr->buffer_size is a u64 read straight from the persisted buffer. The only length checks in the function are size >= sizeof(*khdr), version == 1 and count -- none relates buffer_size to size, the actual buffer size the caller (ima_load_kexec_buffer()) obtained from the ima-kexec-buffer region. ima_parse_buf() bounds every field read to bufendp, so a blob whose internal buffer_size exceeds the real size makes the parse loop read past the end of the buffer (CWE-125). The buffer's memory range is validated against addressable RAM by commit cbf9c4b9617b ("of: check previous kernel's ima-kexec-buffer against memory bounds") and commit c5489d04337b ("x86/kexec: add a sanity check on previous kernel's ima kexec buffer"), but the blob's own declared size is never clamped to it. Reject a buffer_size larger than size before the loop. This is on the boot-time kexec-restore path (__init) and the buffer comes from the previous kernel, so triggering it requires control of the persisted buffer; it is an out-of-bounds read only. Fixes: 94c3aac567a9 ("ima: on soft reboot, restore the measurement list") Assisted-by: copilot-cli:claude-opus-4-6 frama-c Signed-off-by: Fabrice Derepas Signed-off-by: Mimi Zohar Signed-off-by: Sasha Levin commit 9d23fa16640f84f07ef38ad5361d9a409af0b7d8 Author: Qiliang Yuan Date: Thu Oct 1 17:17:50 2026 +0800 blk-mq: share one tags_srcu instance across all tag sets [ Upstream commit e1c51edd6a575ba3b6fc5acb57ed2fec6951a910 ] Freed request pages and flush queues are handed to call_srcu() so that concurrent tag iterators never see them disappear. Each tag set embeds its own srcu_struct for this, which blk_mq_free_tag_set() has to drain with srcu_barrier() before cleanup_srcu_struct(). The barrier waits for a full SRCU grace period even when the callbacks are long done, adding 1-3 ms to every tag set teardown. Drivers that free tag sets under a lock make it worse: ublk does it under the global ublk_ctl_mutex, so deleting devices from many threads serializes on that grace period. The callbacks free memory that only blk-mq owns. They touch neither the tag set nor driver code, so they don't need a per-set domain. Replace the per-set srcu_struct with a single global one. Freeing a tag set no longer waits for a grace period, and each tag set no longer allocates per-CPU SRCU state. The read side is unchanged. The only cost is that a long-running iterator can now delay these frees for other tag sets too, which only postpones freeing memory. On 7.3-rc5 in a 16-vCPU VM, with 1 queue and depth 16 per ublk device, median of 3 runs (5 for the 16-thread null_blk case): before after ublk DEL_DEV p50, serial 3.45 ms 0.17 ms ublk delete 1000 devices, serial 19.5 s 14.9 s ublk delete 4000 devices, 16 thr 19.0 s 2.9 s null_blk destroy 500 devs, serial 9.97 s 9.25 s null_blk destroy 256 devs, 16 thr 5.15 s 4.30 s Fixes: ad0d05dbddc1 ("blk-mq: Defer freeing of tags page_list to SRCU callback") Signed-off-by: Qiliang Yuan Reviewed-by: Ming Lei Acked-by: Paul E. McKenney Link: https://patch.msgid.link/20261001-bug-blk-mq-global-tags-srcu-v1-1-e8415da10d1b@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 7c756d3518d1cb4d310f28df0705af59bf43bece Author: Tao Cui Date: Tue Sep 22 12:38:55 2026 +0800 blk-iocost: account zone append completions in latency stats [ Upstream commit c38975c427cc3d3f6eb66a36143893be5cdf4ebd ] ioc_rqos_done() only accounts READ and WRITE completions, so zone append completions are excluded from the latency window: the vrate feedback loop cannot see ZA-induced latency, leaving it unable to respond to device saturation caused by zone appends. Similarly, calc_size_vtime_cost_builtin() does not classify zone append as a write operation. Charging (the cost model) and feedback (the latency window) are separate mechanisms, so this is not covered by the previous patch that prices zone appends. Treat zone append as WRITE for both latency accounting and cost classification. Fixes: 0512a75b98f8 ("block: Introduce REQ_OP_ZONE_APPEND") Signed-off-by: Tao Cui Reviewed-by: Christoph Hellwig Acked-by: Tejun Heo Link: https://patch.msgid.link/20260922043856.2020116-4-cui.tao@linux.dev Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit b0c04119f5047750f4d974ae24d2d452ed1e80b7 Author: Tao Cui Date: Tue Sep 22 12:38:54 2026 +0800 blk-iocost: charge zone appends as writes [ Upstream commit febdbf5682fa7e8f325b07a2c115e7632c4252bd ] Zone append is a primary write operation for zoned devices; zoned xfs and btrfs use it for data writes. It is priced at zero, so the zone append portion of zoned workloads runs outside the controller: a 1%-weight cgroup issued 16000 appends at zero cost on a zoned null_blk. Treat REQ_OP_ZONE_APPEND the same as REQ_OP_WRITE so it goes through the existing seq/rand classification and charging. Fixes: 0512a75b98f8 ("block: Introduce REQ_OP_ZONE_APPEND") Signed-off-by: Tao Cui Acked-by: Tejun Heo Link: https://patch.msgid.link/20260922043856.2020116-3-cui.tao@linux.dev Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit fad38a414337e8940ab3b0590fc2cc223c486c2c Author: Viktor Menshin Date: Thu Oct 15 22:21:57 2026 +0900 ALSA: hda/realtek: Fix hiss/crackle on Lenovo Xiaoxin 14 GT (17aa:3912) [ Upstream commit 2fc28b1186d6fce8b046e6118072cf3ca32f2960 ] Commit 3a3e810e9108 ("ALSA: hda/realtek: Add quirk for Lenovo Xiaoxin 14 GT") added a quirk mapping SSID 17aa:3912 to ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, chosen by analogy with neighboring SSIDs (0x390d, 0x3911, 0x391a) without being verified on hardware, as noted in that commit's own message. I have since tested it on the actual hardware (Lenovo Xiaoxin Pro 14 ASP10, same 17aa:3912 SSID) and confirmed it does not fix the reported issue. ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN only repoints pin 0x17 and the preferred DAC pairs for the bass speaker; it does not touch the codec's vendor processing coefficients. The actual symptom - constant electrical hiss/crackle on both the headphone jack and the internal speakers, independent of volume - is unrelated to pin/DAC routing and is also present on stock Windows before the Realtek driver is installed, which points at those coefficients being left at their power-on default. To find the correct values, I passed the physical HD Audio controller through to a Windows 10 VM (VFIO, with QEMU patched to log CORB verb traffic) and captured the coefficient writes the vendor Realtek driver performs at init. Replaying a single one of them on Linux via hda-verb reproducibly eliminates the headphone jack noise: hda-verb /dev/snd/hwC#D0 0x20 SET_COEF_INDEX 0x36 hda-verb /dev/snd/hwC#D0 0x20 SET_PROC_COEF 0x77d7 This has held up across reboots and kernel updates for several weeks (applied via a small systemd oneshot unit while testing). Add a dedicated fixup that performs this coefficient write and chains it with the existing ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN (which may still be relevant for the bass speaker pin wiring on this board), and point the 17aa:3912 quirk entry at it instead. Honesty note: this fixes the headphone jack. The internal speakers still have noise under certain conditions (notably worse on AC power) that I have not been able to isolate via coefficient-table replay; that part remains open. Sending what is verified to work rather than holding this back. Link: https://bugzilla.kernel.org/show_bug.cgi?id=221203 Fixes: 3a3e810e9108 ("ALSA: hda/realtek: Add quirk for Lenovo Xiaoxin 14 GT") Signed-off-by: Viktor Menshin Link: https://patch.msgid.link/20261015132157.57198-1-ripeeerr@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 373c08f0cd60cba67d99ea861a23963f3ed45a6b Author: Val Packett Date: Fri Oct 16 02:13:35 2026 -0300 power: sequencing: pcie-m2: Add Foxconn WCN7850 subsystem PCI ID [ Upstream commit eadea156f11b2c9a780b60c1699c2da145c9d1f2 ] Add a new device match for the PCI subdev id found on the Dell Latitude 7455 laptop. Fixes: a39ac4651e3b ("power: sequencing: pcie-m2: Match WCN6855 and WCN7851 UART BT variants by subdevice ID") Signed-off-by: Val Packett Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20261016051745.577777-1-val@packett.cool Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin commit 5bd336b798750fb2ef5c4ed8645342662998baae Author: Colin Ian King Date: Mon Oct 12 22:23:34 2026 +0100 selftests/bpf: Fix spelling mistakes in descr literal strings [ Upstream commit 760c953525bab88f053e61f1c1a6b2a5f76911c0 ] There are spelling mistakes in the descr literal strings. Fix them. Fixes: 095ddb501b39 ("selftests/bpf: Add sockopt case to verify prog_type") Signed-off-by: Colin Ian King Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261012212334.183116-1-colin.i.king@gmail.com Signed-off-by: Sasha Levin commit 704adf8e0e0a7ab295c52d5c6a9a554962a0d6f5 Author: Yuan Chen Date: Fri Oct 16 09:50:57 2026 +0800 bpftool: Fix inverted tracefs validation when scanning /proc/mounts [ Upstream commit 21c755efaab1f40c2588ae5acbfa319a6d7d3638 ] The /proc/mounts fallback in get_tracefs_pipe() accepts only non-tracefs mount points, so a tracefs mounted outside the default locations is ignored: bpftool prog tracelog then mounts a second tracefs, or exits silently with --nomount. Negate the condition. Fixes: be3245e22d22 ("tools: bpftool: attempt to mount tracefs if required for tracelog cmd") Signed-off-by: Yuan Chen Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261016015057.127061-1-chenyuan_fl@163.com Signed-off-by: Sasha Levin commit c024586962d3ffceb0630189a3b0a7b1cd62da61 Author: Qiliang Yuan Date: Fri Oct 9 09:49:00 2026 +0800 selftests/bpf: Expect at least one kprobe miss in missed/perf_kprobe [ Upstream commit 34d527e513c9a3f3a00f1ddf03fe06f493da14d0 ] missed_kprobe attaches test1 to bpf_fentry_test1 and test2 to bpf_kfunc_common_test, which test1 calls. test_missed_perf_kprobe() expects the kprobe of test2 to miss exactly one run, the one test1 triggers, since kprobes don't nest. The test is not serial, and the kprobe on bpf_fentry_test1 is global. Any other test that does bpf_prog_test_run() on a fentry/fexit program calls bpf_fentry_test1() and thereby fires test1, which calls bpf_kfunc_common_test() from kprobe context. The kprobe of test2 then counts an extra miss, and the test reads 2 instead of 1. Expect at least one miss, as missed_kprobe_recursion does since commit 08a7078feacf ("selftests/bpf: Improve missed_kprobe_recursion test robustness"). Fixes: 01e4ae474e39 ("selftests/bpf: Add test for missed counts of perf event link kprobe") Signed-off-by: Qiliang Yuan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261009-selftests-bpf-missed-perf-kprobe-v1-1-c9d0f75f6f99@gmail.com Signed-off-by: Sasha Levin commit 60b667cd951049088c2303d842a04ac201b9a36a Author: Ju Nan Date: Thu Oct 15 00:09:17 2026 +0800 pinctrl: stm32: Fix the unit of the hwspinlock timeout [ Upstream commit 544b3f8042dd7c18baa48dcb1a393ff8b6742322 ] HWSPNLCK_TIMEOUT is passed to hwspin_lock_timeout_in_atomic(), whose timeout argument is in milliseconds, not microseconds: atomic_delay += HWSPINLOCK_RETRY_DELAY_US; if (atomic_delay > to * 1000) return -ETIMEDOUT; The hwspinlock core documents this explicitly: If the mode is HWLOCK_IN_ATOMIC (called from an atomic context) the timeout is handled with busy-waiting delays, hence shall not exceed few msecs. Fixes: 290a9f937e5a ("pinctrl: stm32: use the hwspin_lock_timeout_in_atomic() API") Signed-off-by: Ju Nan Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit 5594fb17b332b570ad8a845bf451274621f45539 Author: Boris Brezillon Date: Thu Sep 24 14:30:44 2026 +0200 drm/panthor: Fully disable the AS even if it's going to be re-assigned [ Upstream commit a431d4ec5d938893060f69a018a2c47651c282d9 ] We're trying to be smart by skipping the UPDATE(UNMAPPED) step, but it remains to be proven it adds any noticeable overhead. Moreover, it's breaking the assumption that, once the VM is unbound, no access can happen on it. For instance, say the panthor_mmu_as_enable() call in panthor_vm_active() fails after we've called panthor_vm_release_as_locked(), we're now in a state where the HW still points to the old page table, but SW slot points to the new VM, which is not truly HW-bound. If, after the as_slots lock is released, the evicted VM itself is released, the HW might have access to memory that has been returned to the system until the reset we scheduled (because of the faulty AS_COMMAND) is effective. Let's make this bullet-proof by doing a full bound -> unbound -> bound cycle on AS slot recycling. Fixes: 32e593d74c39 ("drm/panthor: Make sure caches are flushed/invalidated when an AS is recycled") Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patch.msgid.link/20260924-panthor-mmu-fixes-v1-2-e25f9b106466@collabora.com Signed-off-by: Sasha Levin commit 01bba955d58cab2344a9b1bf0da2b88094920dbb Author: Boris Brezillon Date: Thu Sep 24 14:30:43 2026 +0200 drm/panthor: Don't invalidate OTHER caches [ Upstream commit b1bbfb6c0245cd35ad197d290e26ee1cdee467ff ] Don't invalidate the OTHER caches (AKA L1 read-only caches) since this seems to trip out the flush-elimination logic on v13, and it's not needed in practice (can't leak other context data because of TLB invalidation or corrupt physical pages returned to the system because it's a RO cache). It's also worth noting that the downstream driver has been avoid OTHER caches invalidation from the start, and that we were doing the same until atomic page table update was introduced. Fixes: 6e2d3b3e8589 ("drm/panthor: Add support for atomic page table updates") Signed-off-by: Boris Brezillon Reviewed-by: Liviu Dudau [Update comment as suggested by sashiko] Signed-off-by: Liviu Dudau Link: https://patch.msgid.link/20260924-panthor-mmu-fixes-v1-1-e25f9b106466@collabora.com Signed-off-by: Sasha Levin commit f58e718c9d1d015443d9c3d8c51bb58f6439458f Author: Adam Azuddin Date: Sat Sep 26 21:18:11 2026 +0800 drm/appletbdrm: Fix incorrect error message on encoder attach failure [ Upstream commit fa6d4c16f7a0da6dce3eb36a3139bfe01d071f18 ] drm_connector_attach_encoder() replaced an earlier call to drm_simple_display_pipe_init() during review, but the error message logged on failure was not updated to match and still refers to the old call. Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs") Signed-off-by: Adam Azuddin Signed-off-by: Lukas Wunner Link: https://patch.msgid.link/20260926-fix-err-msg-appletbdrm-v1-1-bb578a7dbdda@gmail.com Signed-off-by: Sasha Levin commit 6a8856cb570db472e319682d981c054944f0ac18 Author: Hui Peng Date: Sat Sep 19 22:17:33 2026 +0000 fuse: validate folio state before pipe_buf_try_steal() in fuse_try_move_folio() [ Upstream commit 15c20483d91589f868fe7a72aec4b97dc68b931b ] In fuse_try_move_folio(), check that the pipe buffer's folio is not hugetlb, swap-backed, or already mapped/anon before attempting pipe_buf_try_steal() and inserting it into the FUSE inode's page cache, preventing VM_BUG_ON_FOLIO() and page cache state corruption. Fixes: 394244b24fdd ("fuse: support copying large folios") Assisted-by: LLM Signed-off-by: Hui Peng Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin commit 2b46c7eb15c5e8e8627e449bb88158f808ec37f4 Author: Miklos Szeredi Date: Thu Oct 15 16:07:01 2026 +0200 fuse: fix NULL pointer dereference in fuse_request_find [ Upstream commit f8cef5c74d8b5a982f49cc40d13cd5c3ea2eacf6 ] fuse_dev_install_with_pq() publishes fud->chan before it stores fud->pq.processing. The write/splice_write and read paths treat a non-NULL fud->chan as "installed" and then walk fpq->processing[] without taking fch->lock, so they can see the new chan while processing is still NULL and oops in fuse_request_find(). Fix by taking fpq->lock around the cmpxchg + fud->pq.processing assignment. This protects all call sites that dereference fpq->processing, since these have fpq->lock held. Fixes: 48649c0603bd ("fuse: alloc pqueue before installing fch in fuse_dev") Reported-by: Cen Zhang Closes: https://lore.kernel.org/fuse-devel/pm-fuse-full-objects-candidate-0002-v2-17d6013e5066de33396c@gmail.com/ Reported-by: 马云龙 Closes: https://lore.kernel.org/all/5ddc8efe.1e6d2.1a11fbec860.Coremail.yunlong_ma@buaa.edu.cn/ Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin commit c7420333023a3577f8541a0385155a256c8a3de9 Author: Matheus Alves de Almeida Date: Wed Sep 23 23:09:36 2026 -0300 HID: wacom: fix wacom_intuos_irq NULL pen_input deref [ Upstream commit 2f985de0afbe9366af9d322ea20589712c1dc8fe ] Currently, wacom_intuos_irq() passes the parent of wacom_wac's pen_input to the dev_dbg() in the unknown report path. However, pen_input can be NULL on interfaces without a pen, causing a NULL pointer dereference. Get the HID device from the enclosing struct wacom and use hid_dbg() instead. Fixes: eb71d1bb270e ("Input: wacom - use dev_xxx() instead of naked printk()s and dbg()s") Reported-by: syzbot+b5a7cd83622c747977de@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b5a7cd83622c747977de Signed-off-by: Matheus Alves de Almeida Reviewed-by: Jason Gerecke Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit 416b15ca5586a15d937952ea35fae53cae622825 Author: Dmitriy Geels Date: Mon Aug 24 19:37:18 2026 +0200 HID: logitech-hidpp: cancel reset_hi_res_work on probe failure [ Upstream commit 0be03caba6c002385e74d60be934b961aa5e88dc ] The probe error path cancels hidpp->work before freeing the HID++ device data, but does not cancel reset_hi_res_work. reset_hi_res_work can be scheduled while probing the device. If probe subsequently fails, the work can run after the driver data has been freed. Cancel reset_hi_res_work in the probe error path to prevent a potential use-after-free. Fixes: ed80cc4667ac ("HID: logitech-hidpp: Add HIDPP_QUIRK_RESET_HI_RES_SCROLL") Signed-off-by: Dmitriy Geels Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit c1eb5d7b0dc648f85219c1b9bb667a870289eb9b Author: Nehuen Lian Bova Date: Sat Oct 3 04:29:59 2026 -0300 HID: magicmouse: fix null pointer dereference in magicmouse_event() [ Upstream commit 5b66b65cfd6f697b1addb6159cbece53d20db2fc ] Add a guard clause to check if 'msc' and 'msc->input' is NULL before attempting to access its fields, preventing a general protection fault. Fixes: b8d56ef91cc3 ("HID: magicmouse: Apple Magic Mouse 2 USB-C support") Reported-by: syzbot+5ad4fc9c8360b68e353f@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5ad4fc9c8360b68e353f Signed-off-by: Nehuen Lian Bova Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit dbd52e2e25ab875fb25439f9439796d717d05eab Author: Denis Benato Date: Fri Oct 9 11:49:19 2026 +0000 HID: asus: document and harden the worker teardown [ Upstream commit 6f2204e35a164cb593929918112bb3f217f7ae84 ] asus_work() executes actions against the device: they send feature reports with hid_hw_raw_request() and, for the Fn+F5 fan key fallback, re-inject the raw report into the HID core with hid_report_raw_event(). For this reason the worker must be quiesced before hid_hw_stop(): after the low level driver has stopped, the transport is gone (usbhid_stop() frees the URBs and the I/O buffers) and re-injected reports would race against the input devices being unregistered by hid_disconnect(). Make so that the teardown cannot race to a use-after-free: every site queueing an action holds worker->lock across the .removed check, the list insertion and schedule_work(), and asus_worker_stop() sets .removed and drains the queue under that same lock before calling cancel_work_sync(). An action that passed the check is caught by the latter while any later attempt is discarded by asus_worker_schedule(). Closes: https://lore.kernel.org/all/20260908180032.34C2D1F00A3A@smtp.kernel.org/ Fixes: 47669bec44fe ("HID: asus: refactor the two workqueues and init sequence") Assisted-by: zcode:glm-5.3-flash Signed-off-by: Denis Benato Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit 42381a33cb0b887046eb07d61a6e138a406aa8f9 Author: Qiliang Yuan Date: Fri Oct 16 11:25:34 2026 +0800 selftests/bpf: Record only the test ICMP echo in tc8 of tc_netkit_scrub [ Upstream commit 17f6fc3ad257b0ad7a11f276a5c0f57e0bdf3f4a ] tc_netkit_scrub attaches tc8 to the primary netkit device, sends an ICMP echo with a mark and a priority through it, and checks the mark and the priority that tc8 saw against what the scrub mode lets through. tc8 records the mark and priority of every packet it sees, and the device also carries what the system sends on its own once the device is up, like IPv6 neighbor discovery or the mDNS of avahi-daemon. When such a packet goes out after the echo, it overwrites what tc8 recorded, and the test finds a mark and a priority of 0. Record only IPv4 ICMP packets in tc8. tc_netkit_scrub run 100 times on a bpf-next kernel with KASAN enabled, x86_64 VM with 32 vCPUs and avahi-daemon running, before and after this patch: before after outcome 2 of 100 failed (mark and priority 0) 0 of 100 failed Fixes: 716fa7dadf11 ("selftests/bpf: Extend netkit tests to validate skb meta data") Signed-off-by: Qiliang Yuan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261016-selftests-bpf-tc-netkit-scrub-v2-1-b484a7ce2a63@gmail.com Signed-off-by: Sasha Levin commit 2e797cd93185301b1f29c03b12b9943fda7a9b92 Author: Cen Zhang Date: Fri Oct 16 10:02:29 2026 +0800 ALSA: vmaster: Protect follower lookup and setup [ Upstream commit db2db2dec96e24d067cc5692ac5eec35830ee8d9 ] A control selected by snd_ctl_add_followers() must remain alive until _snd_ctl_add_follower() has copied it and installed its wrapper. The lookup returns a raw pointer without retaining the control, and neither the short-lived list lookup lock nor the fast lookup protects later use. If a kernel client adds followers to a live virtual master while another client removes or replaces a published follower, the following order is possible, with the card and master kept alive: Follower setup Control removal snd_ctl_add_followers() snd_ctl_find_id_mixer() return follower snd_ctl_remove() down_write(controls_rwsem) __snd_ctl_remove() unlink follower snd_ctl_free_one(follower) up_write(controls_rwsem) _snd_ctl_add_follower() read follower->count Removal completes after lookup returns and before setup reads the control. Since setup holds neither controls_rwsem nor a reference, the count read and subsequent control copies can access freed memory. Hold controls_rwsem for writing across the lookup and follower setup. This prevents removal or replacement from freeing the selected control until wrapper installation is complete. Write ownership also excludes control callbacks while setup changes the callback and private fields. KASAN report as below: BUG: KASAN: slab-use-after-free in _snd_ctl_add_follower+0x452/0x520 Read of size 4 at addr ffff888107957d50 by task loadmodule/491 CPU: 3 UID: 0 PID: 491 Comm: loadmodule Tainted: G O 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Tainted: [O]=OOT_MODULE Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? _snd_ctl_add_follower+0x452/0x520 ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? _snd_ctl_add_follower+0x452/0x520 kasan_report+0xe0/0x110 ? _snd_ctl_add_follower+0x452/0x520 _snd_ctl_add_follower+0x452/0x520 snd_ctl_add_followers+0x153/0x2b0 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_snd_ctl_add_followers+0x10/0x10 ? __might_fault+0x135/0x190 ? srso_alias_return_thunk+0x5/0xfbef5 ? __might_fault+0x14e/0x190 ? __pfx_fixture_write+0x10/0x10 [pmbd_vmaster_fixture] fixture_write+0x174/0x1f0 [pmbd_vmaster_fixture] ? __pfx_fixture_write+0x10/0x10 [pmbd_vmaster_fixture] ? __pfx___might_resched+0x10/0x10 proc_reg_write+0x1fb/0x2d0 vfs_write+0x25a/0x1010 ? __pfx_proc_reg_write+0x10/0x10 ? kmem_cache_free+0x242/0x580 ? __pfx_vfs_write+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? putname+0x93/0xe0 ? srso_alias_return_thunk+0x5/0xfbef5 ? do_sys_openat2+0x12a/0x1b0 ? __pfx_do_sys_openat2+0x10/0x10 ksys_write+0x111/0x200 ? __pfx_ksys_write+0x10/0x10 ? irqentry_exit+0xbe/0x820 ? srso_alias_return_thunk+0x5/0xfbef5 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f0b835a9687 Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffc82ea0360 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f0b83517780 RCX: 00007f0b835a9687 RDX: 0000000000000005 RSI: 0000564f8a21d074 RDI: 0000000000000003 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 00007ffc82ea04f0 R14: 00007f0b83755000 R15: 0000564f8a21ed78 Allocated by task 485: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_noprof+0x2d7/0x770 snd_ctl_new+0x51/0x190 snd_ctl_new1+0x13c/0x650 0xffffffffc04011b5 do_one_initcall+0xf3/0x4e0 do_init_module+0x281/0x8e0 load_module+0x658c/0x7cc0 init_module_from_file+0x15b/0x180 idempotent_init_module+0x22d/0x770 __x64_sys_finit_module+0xd2/0x160 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 492: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x307/0x580 __snd_ctl_remove+0x2ac/0x3d0 snd_ctl_remove+0x46/0x70 fixture_write+0x1ae/0x1f0 [pmbd_vmaster_fixture] proc_reg_write+0x1fb/0x2d0 vfs_write+0x25a/0x1010 ksys_write+0x111/0x200 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888107957d00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 80 bytes inside of freed 192-byte region [ffff888107957d00, ffff888107957dc0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107957 flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff8881000423c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888107957c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888107957c80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff888107957d00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888107957d80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888107957e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ================================================================== Fixes: ae07eb9bf23e ("ALSA: vmaster: Add snd_ctl_add_followers() helper") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-6c0b7e841529ddd0b21a-v2-b53dbcd593a7a4bd9582@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit d4e49ea7abdb7354faf1084f0273732bd9e0aabc Author: Vasilij Markin Date: Thu Oct 15 23:47:36 2026 +0200 drm/appletbdrm: Add suspend and resume support [ Upstream commit 6f6a6b9ae0b481b97dac141ae86becdf7bd0b471 ] The driver has no USB power management callbacks, so the USB core unbinds it before system suspend and binds it again on resume. The DRM device is unregistered and registered again on every suspend and resume cycle, userspace driving the Touch Bar through it (such as tiny-dfr) loses its device, and the Touch Bar stays dark after resume. Implement suspend and resume with drm_mode_config_helper_suspend() and drm_mode_config_helper_resume(), so the device stays registered and the last committed state is restored on resume. If the device was reset while suspended, repeat the probe-time handshake first. Fixes: 0670c2f56e45 ("drm/tiny: add driver for Apple Touch Bars in x86 Macs") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Vasilij Markin Signed-off-by: Lukas Wunner Link: https://patch.msgid.link/20261015-appletbdrm-pm-v3-1-47377176619a@tototo.si Signed-off-by: Sasha Levin commit 02ed9a0d654ae69fab48c857a97dea5dff382560 Author: Jemmy Wong Date: Tue Oct 13 16:43:38 2026 +0800 sched/cache: Avoid publishing partial LLC utilization [ Upstream commit fcceb7da94659695d6cba97190e18e87d9cce82c ] update_sg_lb_stats() sums utilization over the CPUs in both sched_group_span(group) and env->cpus, but takes capacity from group->sgc->capacity for the whole group. record_sg_llc_stats() publishes both. Rejecting an all-affinity-pinned source runqueue removes that CPU from env->cpus and retries group selection. The retry can publish the partial utilization with the full capacity. can_migrate_llc() then treats a busy preferred LLC as having spare capacity. More tasks can aggregate into it, migrations out can be blocked, and two busy LLCs may not fall back to generic balancing. This increases CPU contention and task latency. Found by inspection. Skip publication on affinity retries using LBF_ALL_PINNED, retaining the first-pass snapshots and avoiding repeated cpumask checks. On the first pass, publish either shared LLC statistic only when env->cpus covers the whole group. Load balancing still uses the affinity-filtered statistics. The same window exists during CPU hotplug. env->cpus drops a CPU at set_cpu_active(false), but the group span and sgc->capacity still include it until cpuset_cpu_inactive() rebuilds the domains. Keeping the previous snapshot avoids the mismatched publish. After the rebuild, the next periodic balance records both statistics again. Fixes: f025ef275388 ("sched/cache: Record per LLC utilization to guide cache aware scheduling decisions") Suggested-by: K Prateek Nayak Suggested-by: Tim Chen Signed-off-by: Jemmy Wong Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20261013084338.55100-1-jemmywong512@gmail.com Signed-off-by: Sasha Levin commit f099fe1a87106fa94e73875905981a0eed4c6ea3 Author: Stian Halseth Date: Wed Oct 7 16:29:50 2026 +0200 sched/cputime: Don't account idle time twice after dyntick-idle [ Upstream commit 96a494c9cfd8f4bb7b1a7a70275426db71cf98aa ] On idle exit the dyntick-idle accounting accounts the time up to now, then the tick is restarted on its old period. The first tick accounts a whole TICK_NSEC to whatever runs, although the part of that period before the idle exit has just been accounted as idle time, or with IRQ_TIME_ACCOUNTING as IRQ time. That is up to a full tick per idle exit, and /proc/stat reports more idle time than wall time. Record how much of the current tick period dyntick-idle has accounted, and leave it out of the tick that ends the period. Fixes: cf6444c3e1bb7 ("tick/sched: Unify idle cputime accounting") Signed-off-by: Stian Halseth Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/all/20261004142724.3896396-1-stian@itx.no/ Link: https://patch.msgid.link/20261007142950.547604-1-stian@itx.no Signed-off-by: Sasha Levin commit a15543248571146058370f137e19e15b958a51f5 Author: Qiliang Yuan Date: Fri Oct 9 10:04:38 2026 +0800 selftests/bpf: Unmount the bpffs that cgroup_hierarchical_stats mounted [ Upstream commit e0645cfd0e1b2ae7b8ad989bef00a30016b16b5f ] setup_bpffs() mounts a bpffs on /sys/fs/bpf and records in mounted_bpffs whether it did, so that cleanup_bpffs() unmounts only a bpffs that the test mounted itself. cleanup_bpffs() checks the flag the other way around. As mounting on /sys/fs/bpf succeeds even when a bpffs is already there, the test never unmounts the bpffs it mounted, and every run leaves another one stacked on /sys/fs/bpf of the mount namespace that the test_progs worker keeps running later tests in. Unmount the bpffs only when setup_bpffs() mounted it. Fixes: 88886309d2e8 ("selftests/bpf: add a selftest for cgroup hierarchical stats collection") Signed-off-by: Qiliang Yuan Signed-off-by: Alexei Starovoitov Reviewed-by: Yosry Ahmed Link: https://patch.msgid.link/20261009-selftests-bpf-cgroup-stats-bpffs-v2-2-f93a111da992@gmail.com Signed-off-by: Sasha Levin commit d38bc8ea16242fc2656aa1de2bb936a48c13a2aa Author: Qiliang Yuan Date: Fri Oct 9 10:04:37 2026 +0800 selftests/bpf: Keep the bpffs of cgroup_hierarchical_stats private [ Upstream commit 3c824dfd17e6e918e45a6a96bda0d020ddec8287 ] setup_hierarchy() mounts a bpffs on /sys/fs/bpf with setup_bpffs(), and then sets up the cgroups with setup_cgroups(), which moves the test into a private mount namespace. The bpffs thus lands in the mount namespace that test_progs shares with the tests running in parallel, on top of the bpffs already there, and hides what they pin. cleanup_bpffs() later runs in the private mount namespace and can't unmount it, so it stays there for good. bpftool_maps_access then fails to pin an iterator because /sys/fs/bpf/test_bpftool_map doesn't exist anymore, and bpftool_metadata can't find the program it pinned in /sys/fs/bpf/test_metadata. Set up the cgroups first, so that the bpffs is mounted in the private mount namespace. Fixes: 88886309d2e8 ("selftests/bpf: add a selftest for cgroup hierarchical stats collection") Signed-off-by: Qiliang Yuan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261009-selftests-bpf-cgroup-stats-bpffs-v2-1-f93a111da992@gmail.com Signed-off-by: Sasha Levin commit 4d1efdb3a75c2530bc0f6907db6ccdec6fe25fef Author: Eric Dumazet Date: Mon Oct 12 12:10:29 2026 +0200 tcp: use the echoed source route in cookie_v4_check() [ Upstream commit 54d574d4afd9de820c8a017665c8095f0f5fdbaa ] When the ACK carries a source route option, cookie_v4_check() routes the new socket to opt->faddr, where opt points to the options of the received packet. ip_options_compile() only fills faddr for options given by setsockopt() (when called without an skb), so on receive faddr is 0 and the lookup is done for daddr 0, which gives a local route. Use the options echoed by tcp_v4_save_options() instead, as inet_csk_route_req() and inet_csk_route_child_sock() do with ireq->ireq_opt. Read them after security_inet_conn_request(), since CIPSO can replace ireq->ireq_opt there. The route now goes to the first hop of the source route, so also refuse a strict source route through a gateway, as inet_csk_route_req() does. Found by sashiko while reviewing the sk_mc_loop() fix. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20261012101029.927296-3-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 946a4fb99e14ac6c6ac9372ae29d48b4895340fc Author: Theodor Arsenij Larionov Trichkine Date: Mon Oct 12 12:10:28 2026 +0200 net: use the full socket in sk_mc_loop() [ Upstream commit 31b564f70d8819a1c11d0fd504fe582fc0e0f0cf ] sk_mc_loop() is called from ip_mc_output() and ip6_finish_output2() with skb->sk, which is not always a full socket: - Since commit ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener"), a SYNACK is attached to its request socket. - Since commit 79636038d37e ("ipv4: tcp: give socket pointer to control skbs"), an ACK or RST sent by ip_send_unicast_reply() on behalf of a TIME_WAIT socket is attached to the timewait socket. When such a packet uses a multicast route, inet_test_bit(MC_LOOP, sk) reads inet_flags past the end of the request or timewait socket. This happens for instance when a SYN with a multicast source address reaches a listener, after being looped back with its dst attached, so that ip_rcv_finish_core() skips the martian source check. A raw IP_HDRINCL socket sending to a local address does this, as does re-injection by nft dup or the iptables TEE target. The destination can also come from a source route option, or from a route of type multicast covering a unicast prefix. BUG: KASAN: slab-out-of-bounds in sk_mc_loop+0x111/0x170 Read of size 8 at addr ffff88800f2b7f10 by task repro-raw/470 Call Trace: sk_mc_loop+0x111/0x170 ip_mc_output+0x355/0x930 ip_build_and_send_pkt+0xb87/0xc50 tcp_v4_send_synack+0x500/0x6f0 tcp_conn_request+0x2135/0x2d90 tcp_v4_conn_request+0xa5/0x210 tcp_rcv_state_process+0x136e/0x6920 tcp_v4_do_rcv+0x339/0xb10 tcp_v4_rcv+0x34ab/0x3ab0 ip_protocol_deliver_rcu+0x6e/0x3e0 ip_local_deliver_finish+0x34d/0x510 ip_local_deliver+0x1bc/0x310 ip_rcv+0x390/0x410 __netif_receive_skb_one_core+0x199/0x1e0 process_backlog+0x239/0x680 __napi_poll+0xb5/0x650 net_rx_action+0x980/0xd60 handle_softirqs+0x17f/0x590 do_softirq+0x3f/0x60 The buggy address belongs to the object at ffff88800f2b7d60 which belongs to the cache request_sock_TCP of size 312 The buggy address is located 120 bytes to the right of allocated 312-byte region [ffff88800f2b7d60, ffff88800f2b7e98) Use sk_const_to_full_sk(), which restores the behavior from before the two commits above: a request socket uses the setting of its listener, and a timewait socket gets the default (loop back), as the per-cpu control socket used before had. Fixes: ca6fb0651883 ("tcp: attach SYNACK messages to request sockets instead of listener") Fixes: 79636038d37e ("ipv4: tcp: give socket pointer to control skbs") Signed-off-by: Theodor Arsenij Larionov Trichkine [edumazet: rewrote the changelog, added the TIME_WAIT case] Signed-off-by: Eric Dumazet Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/20261012101029.927296-2-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 188ec7dfa015e9fa6ad809447589c950185762e9 Author: Eric Dumazet Date: Fri Oct 9 09:49:05 2026 +0200 ipv4: use RCU protection in inet_netconf_get_devconf() [ Upstream commit b2039a6dd36b5c89142bfb95bc0205be8abcc600 ] inet_netconf_get_devconf() runs without RTNL. It uses dev_get_by_index() and in_dev_get() to pin the device and its in_device while the reply is allocated and filled. in_dev_get() is not safe for a lockless caller. Since commit 9d40c84cf5bc ("net: devinet: Reduce refcount before grace period"), inetdev_destroy() drops the final reference before the RCU grace period. A reader can load dev->ip_ptr, then call refcount_inc() on a zero refcount after in_dev_free_rcu() has been queued, and keep using the in_device once it has been freed. None of these references are needed. An in_device is freed after an RCU grace period, ipv4_devconf is embedded in it, and inet_netconf_fill_devconf() does not sleep. Allocate the skb first, then perform the lookup and the fill under rcu_read_lock(), using dev_get_by_index_rcu() and __in_dev_get_rcu(), like inet_netconf_dump_devconf() already does. Fixes: bbcf91053bb6 ("inet: do not use RTNL in inet_netconf_get_devconf()") Reported-by: Baul Lee Closes: https://lore.kernel.org/netdev/20260815172032.79740-1-baul.lee@xbow.com/ Signed-off-by: Eric Dumazet Tested-by: Cen Zhang Reviewed-by: Ido Schimmel Reviewed-by: Kuniyuki Iwashima Link: https://patch.msgid.link/CAAVpQUA5FEMWV1R4vy2+uzQc+_iLDaz4m-D6kfKYngGf2sE0Eg@mail.gmail.com Link: https://patch.msgid.link/20261009074906.729877-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit cd9d8d5dcb81a330e4e499e764cecce4e7951304 Author: George Melikov Date: Fri Oct 9 20:30:18 2026 +0300 bnx2x: fix header length calculation for encapsulated TSO [ Upstream commit 4fc1d5bb448dfab391a96f949d02ad03ad8cda5c ] Commit 80bfab79b835 ("net: adopt skb_network_offset() and similar helpers") replaced the difference between the inner transport header and the outer network header with skb_inner_transport_offset(). The helper is relative to skb->data, so the new calculation incorrectly includes the outer Ethernet header in fw_ip_hdr_to_payload_w. On a BCM57810 transmitting TCP over VXLAN with an outer MTU of 1500, hardware segmentation emits packets declaring an outer IPv4 total length of 1514 while the actual IP packet is only 1500 bytes long. The receiver drops these malformed packets, severely degrading TCP connectivity. Subtract skb_network_offset() to restore the original calculation of the length from the outer network header to the inner TCP payload. Reproduced with plain kernel VXLAN and one TCP flow on kernel 7.0.0-31-generic: 50 of 200 captured packets had an invalid outer IP length with the original driver, versus none with this fix. Disabling TSO/GSO on the test VXLAN device also eliminated the error with the original driver. Fixes: 80bfab79b835 ("net: adopt skb_network_offset() and similar helpers") Signed-off-by: George Melikov Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261009-bnx2x-tso-fix-v1-1-1ebea422422d@gmelikov.ru Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 43a94271fbd0fa84b851ec4cb9e142a4bcba5f53 Author: Muchun Song Date: Thu Sep 24 10:50:34 2026 +0800 dax/bus: Return errors for invalid mapping targets [ Upstream commit df6cc0a24717c38ac81b5ba1e839c35e74e667dc ] After the DAX configuration locking was converted to rwsems, successful lock acquisition leaves rc set to zero in mapping_store(). Two error paths can return this stale value: an unbound region driver and a misaligned range size. The sysfs write therefore reports success without allocating the requested range. Return -ENXIO when the region driver is not bound and -EINVAL when the range size is misaligned. Fixes: c05ae9d85b47 ("dax/bus.c: replace driver-core lock usage by a local rwsem") Assisted-by: LLM Signed-off-by: Muchun Song Reviewed-by: Dave Jiang Reviewed-by: Jianyun Gao Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20260924025035.1265035-2-songmuchun@bytedance.com Signed-off-by: Alison Schofield Signed-off-by: Sasha Levin commit 9024b77d6d64002ec9408dc19afc5b24f30f545f Author: Stefano Munari Date: Sat Oct 10 23:32:48 2026 +0200 net: usb: lan78xx: reject invalid EEPROM write requests [ Upstream commit 9272297df14124fe603c81e40b52ff0c5dd88652 ] The runtime PM handling removed the -EINVAL return for invalid EEPROM/OTP write requests. These requests now return zero from a successful usb_autopm_get_interface() call, even though no data is written. Set ret to -EINVAL for invalid requests while preserving the runtime PM reference release. Fixes: 8a7ffeb795f8 ("lan78xx: Fix for eeprom read/write when device auto suspend") Signed-off-by: Stefano Munari Reviewed-by: Nicolai Buchwitz Tested-by: Nicolai Buchwitz # Raspberry Pi 3B+ (LAN7515) Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20261010213248.15938-1-stefanomunari.sm@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 504eaccdb56f267d7e087b653b1fb0e075f9b4c9 Author: Jérémy Jean Date: Thu Oct 8 08:06:26 2026 +0000 macsec: prevent AES-GCM nonce reuse after packet number wrap [ Upstream commit 94d51c59f0a872c57cb8daa1964ec033d77a79fb ] After allocating the last valid packet number, MACsec wraps next_pn to zero and deactivates the transmit SA. This happens for both 32- and 64-bit types of packet numbers (at values 0xffffffff and 0xffffffffffffffff, respectively). TX packets that were still getting processed during deactivation keep being processed and then receive packet numbers. The first gets 0 and is correctly dropped, but next_pn is incremented to 1, which makes the next packet take number 1. It then does not get dropped and may induce a reuse of the AES-GCM nonce corresponding to value 1. This race affects TX packets that have already passed the SA activity check: packets that observe the inactive SA are correctly dropped. Reactivating the SA after PN wrap without a packet number can also cause nonce reuse. Keep next_pn at 0 after wrap, even if the SA is reactivated, so further packet number allocations return 0 and the corresponding packets are dropped. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Jérémy Jean Link: https://patch.msgid.link/20261008080625.360063-2-Jeremy.Jean@oss.cyber.gouv.fr Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit a00b81c2b3b81d1dd67a4c20b40af322cacf99e2 Author: Yun Lu Date: Mon Oct 12 14:19:14 2026 +0800 bpf: Prevent task work context reuse while irq_work is busy [ Upstream commit a36d9afe8d923ca00dd2001409f420202ee672da ] A bpf_task_work context can return to STANDBY before its scheduling irq_work handler returns. Both callback completion and task_work_add() failure can publish STANDBY while the irq_work is still BUSY. A new round can then reinitialize and queue the same irq_work on another CPU while the old handler is still running. One concrete interleaving is: 1. CPU 0 successfully queues ctx->work with task_work_add() and pauses before its SCHEDULING-to-SCHEDULED cmpxchg. 2. The target task on CPU 1 completes the callback, resets ctx->task and publishes STANDBY. 3. CPU 2 starts a new round, changes STANDBY to PENDING and queues the same irq_work. The new handler changes PENDING to SCHEDULING, but task_work_add() returns -ESRCH because its target task has exited. The handler has not yet reset the context or rolled back the state. 4. CPU 0 resumes and changes the new round's SCHEDULING to SCHEDULED, even though no task work was queued for that round. 5. The new handler resets ctx->task, but its SCHEDULING-to-STANDBY cmpxchg fails. The context remains SCHEDULED with a NULL task, and subsequent attempts to acquire this context fail with -EBUSY. 6. Map-value deletion observes SCHEDULED and queues asynchronous cancellation, which passes the NULL ctx->task to task_work_cancel(). Overlapping invocations also share one BUSY bit. An invocation can clear that bit while the other invocation is still running. Initialize the scheduling irq_work when the context is created and stop reinitializing it for each round. After claiming the context with the STANDBY-to-PENDING cmpxchg, check BUSY and reject reuse with -EBUSY if a previous invocation is still in progress. Checking after the cmpxchg orders the BUSY read after the STANDBY publication. No irq_work has been queued for the attempted round at this point, so the rejection can roll PENDING back to STANDBY. Use cmpxchg for that rollback to preserve FREED if a concurrent deletion has published it. Once BUSY clears, scheduling can be retried. Fixes: 38aa7003e369 ("bpf: task work scheduling kfuncs") Signed-off-by: Yun Lu Signed-off-by: Alexei Starovoitov Acked-by: Mykyta Yatsenko Link: https://patch.msgid.link/20261012061915.231254-4-luyun_611@163.com Signed-off-by: Sasha Levin commit 2fd1c3f2128a59d118e6656dcbd065a588a5aac7 Author: Yun Lu Date: Mon Oct 12 14:19:12 2026 +0800 bpf: Fix NULL task dereference in task work cancellation [ Upstream commit c961f7b41a108313a4705baac7b27d2174cc8035 ] bpf_task_work_irq() publishes ctx->work with task_work_add() before changing the context from SCHEDULING to SCHEDULED. The target task can run the callback on another CPU before the handler reaches its final state transition. The handler then reloads ctx->task for cancellation if its final cmpxchg observes FREED. By that point the callback or context destruction may already have cleared ctx->task, causing task_work_cancel() to dereference a NULL task pointer. One concrete interleaving is: 1. CPU 0 changes PENDING to SCHEDULING and successfully queues ctx->work with task_work_add(), but has not attempted the final state cmpxchg. 2. The target task on CPU 1 runs the callback. It changes SCHEDULING to RUNNING, executes the BPF subprogram, resets ctx->task, publishes STANDBY and drops the callback's context reference. 3. CPU 2 deletes the map value. It changes STANDBY to FREED and drops the map's context reference without queuing asynchronous cancellation. 4. CPU 0 resumes. Its SCHEDULING-to-SCHEDULED cmpxchg observes FREED, and the cancellation attempt passes NULL to task_work_cancel(). If deletion publishes FREED before the callback claims RUNNING, the callback takes its FREED exit and drops its context reference. Context destruction can then clear ctx->task before CPU 0 attempts cancellation. A controlled reproducer with a delay before the final cmpxchg triggered the following fault on a v7.3-rc3 based x86-64 KVM guest: BUG: kernel NULL pointer dereference, address: 0000000000000890 RIP: 0010:task_work_cancel+0xd/0xa0 RDI: 0000000000000000 CR2: 0000000000000890 Call Trace: bpf_task_work_irq+0x95/0x100 irq_work_run_list+0x4f/0x90 irq_work_run+0x18/0x50 0x890 is the task_struct::task_works offset in that build, read through the NULL task argument. Capture ctx->task before task_work_add() publishes the callback and use that pointer for the handler's cancellation attempt. The round still holds its task reference when the pointer is captured. Releasing that reference uses bpf_task_release(), which calls put_task_struct_rcu_user(), so the handler's existing RCU read-side section keeps the captured task alive even if ctx->task is subsequently cleared. The asynchronous cancellation path reads ctx->task directly, which is safe there: queuing it requires deletion to observe SCHEDULED, and that xchg wins against the callback's transition to RUNNING, so the callback takes its FREED exit without resetting ctx->task, while the map reference transferred to the cancellation handler prevents context destruction until cancellation completes. The handler-tail and asynchronous cancellation attempts are mutually exclusive: asynchronous cancellation is queued only if deletion observes SCHEDULED after the scheduling handler's final cmpxchg has succeeded. If that cmpxchg instead observes FREED, the scheduling handler attempts cancellation with the captured pointer. Fixes: 38aa7003e369 ("bpf: task work scheduling kfuncs") Reported-by: Jackie Liu Suggested-by: Mykyta Yatsenko Signed-off-by: Yun Lu Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261012061915.231254-2-luyun_611@163.com Signed-off-by: Sasha Levin commit cfc94f546453b6cb2c554ede69223fca38bd2b5f Author: KaFai Wan Date: Mon Oct 12 22:02:00 2026 +0800 selftests/bpf: Skip expected_msgs subtests when stdout is not saved [ Upstream commit cc4b1c161d92992544cc571a2475baa5b072e120 ] stdio_hijack_init() does not set subtest_state->stdout_saved when running with -v in non-parallel mode, since output goes straight to stdout. In that case subtest_state->log_buf is left NULL, so the expected-messages subtests crash when inspecting it. Skip them when stdout was not saved. Fixes: 34c513be3dad ("selftests/bpf: __not_msg() tag for test_loader framework") Signed-off-by: KaFai Wan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261012140202.2754552-3-kafai.wan@linux.dev Signed-off-by: Sasha Levin commit eb6488bec69f35aa4e33bd347a72ea064d5435ba Author: KaFai Wan Date: Mon Oct 12 22:01:59 2026 +0800 selftests/bpf: Fix prog_tests framework subtest count checks [ Upstream commit c87652656a55e5e8cf994364314a75fa95fb2d69 ] The hardcoded expected skip_cnt/error_cnt in test_prog_tests_framework() mismatch the real count when the binary is run with -t or -n filters, since some subtests are not selected. Count the executed subtests and compare against that value instead. Fixes: 2324257dbd68 ("selftests/bpf: Refactor prog_tests logging and test execution") Signed-off-by: KaFai Wan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261012140202.2754552-2-kafai.wan@linux.dev Signed-off-by: Sasha Levin commit 829563900c2f734fe7853f7c8a357213227487bc Author: Li RongQing Date: Sun Oct 11 01:35:55 2026 -0500 ublk: use global index for reported zones [ Upstream commit 80897c7e5ae5c56f37a2eb004328edcb4da7cdd1 ] ublk_report_zones() may split a zone report into multiple requests when the number of zones exceeds the temporary buffer capacity. The index passed to disk_report_zone() must refer to the zone position in the whole report, rather than the position within the current request. Currently, the per-request loop index is used as the callback index, causing each chunk after the first one to restart from zero. This can make userspace callbacks receive duplicate zone indices and may result in blk_revalidate_disk_zones() updating incorrect entries in its zone state array. Use the number of zones already reported as the base index for each request so that zone indices remain continuous across all chunks. Fixes: 29802d7ca33b ("ublk: enable zoned storage support") Signed-off-by: Li RongQing Reviewed-by: Ming Lei Tested-by: Ming Lei Signed-off-by: Ming Lei Link: https://patch.msgid.link/20261011063555.1142277-13-tom.leiming@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit dc13a3396e50532bf5d452fdebb875e24f0e2d5f Author: Ming Lei Date: Sun Oct 11 01:35:49 2026 -0500 ublk: allow a NULL io->cmd in the cancel callback [ Upstream commit 4915dc0a1834457520ef0592bfd454b26901614f ] A cancel from the control path, like STOP_DEV's ublk_cancel_dev() after dropping ub->mutex, takes the command and clears io->cmd under cancel_lock, then completes it with io_uring_cmd_done(), which takes uring_lock to remove it from the cancelable list. The server's io_uring cancel runs ublk_uring_cmd_cancel_fn() under uring_lock in between: control path cancel io_uring cancel (uring_lock) io->cmd = NULL, CANCELED io_uring_cmd_done() waits for uring_lock cmd still on the list ublk_uring_cmd_cancel_fn(cmd) io->cmd == NULL: WARN ublk_cancel_cmd() then sees CANCELED and leaves the command alone, so nothing is wrong; only warn if io->cmd holds another command. Fixes: ab03a61c6614 ("ublk: have a per-io daemon instead of a per-queue daemon") Tested-by: Josef Bacik Signed-off-by: Ming Lei Link: https://patch.msgid.link/20261011063555.1142277-7-tom.leiming@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit fe4972f7cf1a4fdd101e9bdd42f8a26d332eb233 Author: Donggeun Yoo Date: Thu Sep 17 13:59:18 2026 +0900 tracing: Print a signed histogram key as signed [ Upstream commit d3e0dfc1ba49a0ab6aeddbb4bcde4bfc0e171a02 ] A histogram sorts its rows by the key named in sort=, and for a key over a signed event field it sorts them signed: create_tracing_map_fields() picks the comparison function with else cmp_fn = tracing_map_cmp_num(field->size, field->is_signed); hist_trigger_print_key() does not look at is_signed at all. Every numeric key is printed with %llu, so a sorted histogram over a signed field comes out looking unsorted. syscalls/sys_exit_lseek carries "long ret", which SYSCALL_FIELD() marks signed and which is negative on every error: # echo 'hist:keys=ret:sort=ret' > events/syscalls/sys_exit_lseek/trigger # echo 1 > events/syscalls/sys_exit_lseek/enable # (five lseek(2) calls returning -ESPIPE, -EINVAL, -EBADF, 0 and 100) # cat events/syscalls/sys_exit_lseek/hist { ret: 18446744073709551587 } hitcount: 1 { ret: 18446744073709551594 } hitcount: 1 { ret: 18446744073709551607 } hitcount: 1 { ret: 0 } hitcount: 1 { ret: 100 } hitcount: 1 The rows are in ascending order and the numbers are not, because the three leading ones are -29, -22 and -9 rendered as their two's complement. Take the rendering from the same place the sort order comes from: the event field when the key has one, and the hist_field itself when it does not. The same histogram then reads { ret: -29 } hitcount: 1 { ret: -22 } hitcount: 1 { ret: -9 } hitcount: 1 { ret: 0 } hitcount: 1 { ret: 100 } hitcount: 1 A ".buckets" key stays unsigned here, and not because it is right. hist_field_bucket() divides as unsigned, so the group holding S64_MAX also holds S64_MIN, reported at https://lore.kernel.org/all/20260914054614.82A9B1F000FF@smtp.kernel.org/ Printing that group signed would name a range that does not contain S64_MIN, so the grouping has to be fixed with it, in a patch of its own. Link: https://patch.msgid.link/20260917045918.370993-1-donggeunyoo.kernel@gmail.com Fixes: 7ef224d1d0e3 ("tracing: Add 'hist' event trigger command") Signed-off-by: Donggeun Yoo Signed-off-by: Steven Rostedt Signed-off-by: Sasha Levin commit 521c06e5d15386013de2196aa6917039ecf192ce Author: Atharva Vartak Date: Wed Oct 7 00:00:09 2026 -0400 net/smc: hold a reference on net_device returned by pnet_find_base_ndev() [ Upstream commit e6435b2cc5fdf008cdb67ad9a811a266e8ac9c1e ] pnet_find_base_ndev() resolves the base net_device for stacked devices under RTNL, then drops the lock and returns the raw pointer without taking a reference. All three callers dereference the pointer after RTNL has been released, creating a use-after-free window if the device is concurrently unregistered. Take a reference with netdev_hold() before dropping RTNL and add the matching netdev_put() in every return path of the three callers: - smc_pnet_add_eth() - smc_pnet_find_roce_by_pnetid() - smc_pnet_find_ism_by_pnetid() Found by code analysis, confirmed with a proof-of-concept that triggers a KASAN slab-use-after-free report. Fixes: 0afff91c6f5e ("net/smc: add pnetid support") Fixes: 1619f770589a ("net/smc: add pnetid support for SMC-D and ISM") Cc: "D. Wythe" Cc: Dust Li Cc: Sidraya Jayagond Cc: Mahanta Jambigi Cc: Tony Lu Cc: Wen Gu Cc: Willy Tarreau Signed-off-by: Atharva Vartak Link: https://patch.msgid.link/20261007040009.137568-1-atharva.a.vartak@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit a5164d94b838e464d0b02a6b73af7da41f7109c1 Author: Jianan Huang Date: Mon Oct 12 10:54:42 2026 +0800 f2fs: quota: fix quota flush failure during filesystem freeze [ Upstream commit f6f8f34480c78eade6542faea6386c47c9b4c6b3 ] Quota flush retries can be exhausted during filesystem freeze. freeze_super() and the quota checkpoint may race as below. freeze_super() f2fs_ckpt - down_write(&sb->s_umount) - sb->s_writers.frozen = SB_FREEZE_PAGEFAULT - sync_filesystem() - f2fs_sync_fs() - f2fs_issue_checkpoint() - queue CP_SYNC -----------------> - block_operations() - down_read_trylock(s_umount) : fails; freeze holds write lock - quota flush retries exhausted - set CP_QUOTA_NEED_FSCK_FLAG During the PAGEFAULT sync pass, freeze_super() holds s_umount for write, but umount_lock_holder is not set until f2fs_freeze(). Thus quota writeback tries to acquire s_umount again and can exhaust retries. With checkpoint merge enabled, f2fs_issue_checkpoint() may dispatch CP_SYNC to f2fs_ckpt. That thread also cannot acquire the freeze lock. Record current as umount_lock_holder around the VFS PAGEFAULT sync so checkpoint runs in the freeze caller and quota flush uses its existing s_umount write lock. Fixes: eb85c2410d6f ("f2fs: quota: fix to avoid warning in dquot_writeback_dquots()") Signed-off-by: Jianan Huang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin commit dc9a49c3e957a3a2cf3d63e960636cabb8a3046e Author: pengdonglin Date: Wed Sep 16 21:32:15 2026 +0800 tracing: Avoid BTF lookup in atomic context [ Upstream commit 42643ba35deb8ad1821acfc0577b445ee7ad7548 ] The function graph trace formatter can be called from ftrace_dump_one() with interrupts disabled. When ftrace_dump_on_oops is enabled, the trace panic notifier can reach ftrace_dump() from the panic path, including the nmi_panic() path used by the hard lockup detector. btf_find_func_proto() calls bpf_find_btf_id(), which may initialize vmlinux BTF under a mutex. Skip the BTF lookup when running in an atomic context or with interrupts disabled, and fall back to the existing return value formatting. Link: https://patch.msgid.link/20260916133218.1282590-2-dolinux.peng@gmail.com Fixes: ebeed8d4a555 ("tracing/probes: Move finding func-proto API and getting func-param API to trace_btf") Signed-off-by: pengdonglin Signed-off-by: Steven Rostedt Signed-off-by: Sasha Levin commit 7cc43ff21b129f8b8802958d962d85b2a86a54b7 Author: Donggeun Yoo Date: Mon Sep 14 22:23:46 2026 +0900 tracing: Clamp the printed end of a histogram bucket at U64_MAX [ Upstream commit 289e2a775de434ccab2d107076bc78362ce288bd ] A key with the ".buckets=N" modifier is stored as the start of its bucket, and hist_trigger_print_key() prints the range it covers as start to start + N - 1. That addition overflows once the start is within N of U64_MAX: # echo 'hist:keys=offset.buckets=10' >> \ events/syscalls/sys_enter_lseek/trigger # ./seeker 5 -1 # lseek(0, 5) and lseek(0, -1) # cat events/syscalls/sys_enter_lseek/hist ... { offset: ~ 18446744073709551610-3 } hitcount: 1 { offset: ~ 0-9 } hitcount: 1 ... 18446744073709551610 + 10 - 1 does not fit in 64 bits, so the range ends below where it starts. The bucket does end at U64_MAX: it holds every value hist_field_bucket() maps onto its start, and there is no value above U64_MAX. Clamp the printed end there. Printed honestly the group is shorter than the size asked for, which histogram.rst does not mention, so say it there. Link: https://patch.msgid.link/20260914132346.2234731-1-donggeunyoo.kernel@gmail.com Fixes: de9a48a360b7 ("tracing: Add linear buckets to histogram logic") Signed-off-by: Donggeun Yoo Assisted-by: Claude:claude-fable-5 Signed-off-by: Steven Rostedt Signed-off-by: Sasha Levin commit 1f2e6fa39839bd3fb4f4fd7e188d377d2f0c1094 Author: Donggeun Yoo Date: Mon Sep 14 14:34:42 2026 +0900 tracing: Only report the stacktrace modifier on a real field [ Upstream commit 18bb005845b78e0c0eb44b7f231c29d138552438 ] get_hist_field_flags() returns "stacktrace" for any field carrying HIST_FIELD_FL_STACKTRACE, including the common_stacktrace pseudo-field, which has no ftrace_event_field behind it. parse_field() no longer takes the modifier there: if (stack_modifier && (!field || field->filter_type != FILTER_STACKTRACE)) { hist_err(tr, HIST_ERR_BAD_FIELD_MODIFIER, errpos(field_str)); so expr_field_str() renders "common_stacktrace.stacktrace", a spelling that cannot be parsed back. Report the modifier only when there is a field to report it for. hist_field_print(), the other caller of get_hist_field_flags(), excludes HIST_FIELD_FL_STACKTRACE before it calls, so this is confined to expr_field_str(), whose only key renderer arrives in the next patch. Link: https://patch.msgid.link/20260914053443.981201-4-donggeunyoo.kernel@gmail.com Fixes: a5e70ba87ca8 ("tracing: Fix memory corruption from the histogram stacktrace modifier") Signed-off-by: Donggeun Yoo Assisted-by: Claude:claude-fable-5 Signed-off-by: Steven Rostedt Signed-off-by: Sasha Levin commit fb7eef16146c6f6713280739bc472e4d2a473e44 Author: Donggeun Yoo Date: Mon Sep 14 14:34:40 2026 +0900 tracing: Print the bucket size as unsigned [ Upstream commit 387945e8d2f29fa8a28d219af5416e6d3bedc314 ] A key's bucket size reads back negative once it exceeds LONG_MAX: # echo 'hist:keys=next_pid.buckets=18446744073709551615' > trigger # cat trigger hist:keys=next_pid.buckets=-1:vals=hitcount:... parse_field() takes the size with kstrtoul() and rejects only zero, so the whole unsigned long range is accepted and stored, but hist_field_print() renders it with %ld. Print it with %lu. Link: https://patch.msgid.link/20260914053443.981201-2-donggeunyoo.kernel@gmail.com Fixes: de9a48a360b7 ("tracing: Add linear buckets to histogram logic") Signed-off-by: Donggeun Yoo Assisted-by: Claude:claude-fable-5 Signed-off-by: Steven Rostedt Signed-off-by: Sasha Levin commit dc426e62e20ac9104b602ca4619fb0c89e1233e4 Author: bui duc phuc Date: Wed Oct 14 18:27:50 2026 +0700 ASoC: mediatek: mt8195: Fix ETDM probe error handling [ Upstream commit ca3ac9a7eec1884bfff2d2dd92caf30f86a9eea7 ] Use pm_runtime_resume_and_get() to properly handle runtime PM errors during ETDM probe. Propagate errors from MCLK configuration and enabling instead of ignoring them. Fixes: 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-16-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 456508c1c9b390fcf984b15bf78cf04c46eb8646 Author: bui duc phuc Date: Wed Oct 14 18:27:49 2026 +0700 ASoC: mediatek: mt8195: Fix HDMI TX startup error handling [ Upstream commit 1d6f1785d90334b66809a57ebfc40a5b1cfa80ec ] Check and propagate errors when enabling the clock gate and MCLK during HDMI TX/DP TX startup. If MCLK enabling fails, disable the clock gate that was already enabled before returning the error. Fixes: 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-15-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 71e19289fa9ea7f3cc02ec768af9fb240aecd7f7 Author: bui duc phuc Date: Wed Oct 14 18:27:48 2026 +0700 ASoC: mediatek: mt8195: Fix ETDM startup error handling [ Upstream commit 8e67c67f3fd2505b8b7a9dd38d8dabe47273490d ] Check and propagate errors when enabling the ETDM MCLK and clock gates during startup. If enabling a clock fails, disable the clocks that were already enabled to keep the clock state balanced. Fixes: 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver") Reviewed-by: Ajay Kumar Nandam Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-14-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 43af9a8641ad4b993e42c8abc5e2b159c74d6680 Author: bui duc phuc Date: Wed Oct 14 18:27:47 2026 +0700 ASoC: mediatek: mt8195: Fix ETDM MCLK error handling [ Upstream commit 91dce9c7eec25e95b5ca32e17e60e2c27333d411 ] Propagate errors from mt8195_afe_enable_clk() when enabling the ETDM MCLK instead of always returning success. This allows callers to properly handle failures when enabling the MCLK. Fixes: 1de9a54acafb ("ASoC: mediatek: mt8195: support etdm in platform driver") Reviewed-by: Ajay Kumar Nandam Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-13-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit ab550348af9d3c0615d4791dc2edd00d5a079dc5 Author: bui duc phuc Date: Wed Oct 14 18:27:46 2026 +0700 ASoC: mediatek: mt8195: Propagate IRQ lookup errors [ Upstream commit 9d5dedb285fb61a40e04f337d9e06fc59c065857 ] Propagate the error returned by platform_get_irq() instead of replacing it with -ENXIO. This preserves errors such as -EPROBE_DEFER for proper handling by the caller. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Reviewed-by: Ajay Kumar Nandam Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-12-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 7f031d2077ffe3165283c0c1f458be6065c45e73 Author: bui duc phuc Date: Wed Oct 14 18:27:44 2026 +0700 ASoC: mediatek: mt8195: Fix runtime resume error handling [ Upstream commit 933fbfb6648850e003a1fc47b7bcc08fe3687961 ] Check and propagate errors when enabling the register access and main clocks during runtime resume. If regcache_sync() or main clock enable fails, restore regmap cache-only mode and disable the register access clocks before returning the error. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-10-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 7dde31a14392d5b53044c8981ccf966a7940743b Author: bui duc phuc Date: Wed Oct 14 18:27:43 2026 +0700 ASoC: mediatek: mt8195: Check paired MEMIF clock enable in FE trigger [ Upstream commit a2ae972c75a18ecbdcbf331ddaab21e1a08333fb ] Check the return value of mt8195_afe_paired_memif_clk_enable() on START/RESUME. On failure, stop the MEMIF and disable the channel merge before returning the error. Also skip enabling the paired clock if mtk_afe_fe_trigger() fails. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-9-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9108788df4348b817f30b765a46564ab9eb848e1 Author: bui duc phuc Date: Wed Oct 14 18:27:42 2026 +0700 ASoC: mediatek: mt8195: Fix FE startup error handling [ Upstream commit b1db7408c8e0761d17b49b74f8f2d60c0c1929e8 ] Check and propagate errors from paired memif clock preparation and PCM hardware constraints during FE startup. Unprepare the paired memif clocks and shut down the FE when a later startup step fails to avoid leaving resources enabled on error. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-8-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit dee6114fa735268fd2dde3edc287dab12863b6ea Author: bui duc phuc Date: Wed Oct 14 18:27:41 2026 +0700 ASoC: mediatek: mt8195: Fix paired memif clock error handling [ Upstream commit c0ec135cf3fd7c7c7cdefd234111e5d4f069a7e6 ] Check and propagate errors when preparing and enabling the paired DL8/DL10 memif clocks. If enabling the second clock fails, undo the clock that was already prepared or enabled to keep the clock state balanced. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-7-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 112fa15371eece11c1e4104ca23824af10d4904b Author: bui duc phuc Date: Wed Oct 14 18:27:40 2026 +0700 ASoC: mediatek: mt8195: Fix main clock error handling [ Upstream commit 9f1b48c658ac38be81c04fbc29ed1522f89fb0c9 ] Check the return values of clock enable functions and propagate errors to the caller. Disable previously enabled clocks on failure to match the main clock disable sequence. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-6-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c5194888bc34cef31724c6f4292b17ff4e908967 Author: bui duc phuc Date: Wed Oct 14 18:27:39 2026 +0700 ASoC: mediatek: mt8195: Fix timing system clock error handling [ Upstream commit f18c0a8e528eb8844ee362324220ab8df3664afe ] Check the return value of mt8195_afe_enable_clk() when enabling the timing system clocks. If enabling a clock fails, disable the clocks that were already enabled and propagate the error to the caller. In mt8195_afe_enable_main_clock(), return the error instead of continuing with AFE clock enable. Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d463018819e2f21f5bbfa487dfbcb46d428611d5 Author: bui duc phuc Date: Wed Oct 14 18:27:38 2026 +0700 ASoC: mediatek: mt8195: Fix register access clock error handling [ Upstream commit c23390ecf5c068976f25d9c8bfa8e298fa12ea3d ] Check the return value of mt8195_afe_enable_clk() when enabling the register access clocks. If enabling a clock fails, disable the clocks that were already enabled and propagate the error to the caller Fixes: 6746cc858259 ("ASoC: mediatek: mt8195: add platform driver") Reviewed-by: Ajay Kumar Nandam Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 81ca54009597bc9e9b1568dda3e5ca64e4132fbd Author: bui duc phuc Date: Wed Oct 14 18:27:36 2026 +0700 ASoC: mediatek: mt8195: Fix tuner clock error handling [ Upstream commit 8e5a2eabb0d7cbd6db0b94f7f30e1ca2c0a8994f ] Check and propagate errors from mt8195_afe_enable_clk(). If enabling the tuner clock fails, disable the previously enabled APLL clock. Fixes: ff5a90173d98 ("ASoC: mediatek: mt8195: enable apll tuner") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261014112752.683032-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 7c600bd277d0aaced5664ed3955851d428d57c54 Author: Amadeusz Sławiński Date: Wed Oct 14 22:06:07 2026 +0200 ASoC: soc-component: Fix return type of snd_soc_pcm_component_pointer() [ Upstream commit 9df30adce80dd6b0646e58c12a4cf7c6c88d0778 ] Both caller and pointer callback expect the return value to be snd_pcm_uframes_t, however it was defined incorrectly leading to potential truncation of returned value. Fixes: 0035e2565b93 ("ASoC: soc-component: add snd_soc_pcm_component_pointer()") Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20261014200608.118770-8-amade@asmblr.net Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0bc68b267932d72841fcad0064c9792d45e4ac30 Author: Amadeusz Sławiński Date: Wed Oct 14 22:06:05 2026 +0200 ASoC: soc-ac97: Fix error handling in snd_soc_new_ac97_component() [ Upstream commit fc081cdfc6b370f6b6853cdeb4313f92561770d1 ] If call to snd_soc_ac97_init_gpio() fails, proper removal procedure should mirror snd_soc_free_ac97_component() behaviour and call device_del() before put_device(). Fixes: 9bf5c3d11f1f ("ASoC: ac97: add gpio chip") Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20261014200608.118770-6-amade@asmblr.net Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 2d48a3dc0e141434949468a781595b4a0826fb32 Author: Amadeusz Sławiński Date: Wed Oct 14 22:06:04 2026 +0200 ASoC: soc-card-test: Check return value of kunit_device_register() [ Upstream commit 77dfd98b1642b9bc6c2312bd8b805c321fb878b0 ] Call to kunit_device_register() can fail. Check return result of register call. While at it introduce helper variable so that if it fails put_device is called on properly initialized variable. Fixes: ef7784e41db7 ("ASoC: soc-card: Add KUnit test case for snd_soc_card_get_kcontrol") Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20261014200608.118770-5-amade@asmblr.net Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit bf84c1ecdd59ade0d602d4bedc4b121b24712aa5 Author: Amadeusz Sławiński Date: Wed Oct 14 22:06:03 2026 +0200 ASoC: soc-topology-test: Check return value of kunit_device_register() [ Upstream commit 1641c1ba27abcd3ea3bba1232d9d817092f1b757 ] Call to kunit_device_register() can fail. Check return result of register call. While at it introduce helper variable so that if it fails put_device is called on properly initialized variable. Fixes: e57cdff0ddc4 ("ASoC: topology: Replace fake root_device with kunit_device in tests") Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20261014200608.118770-4-amade@asmblr.net Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c30eb90fe16f9d6982b34bd8bdec5f64114c76c3 Author: Amadeusz Sławiński Date: Wed Oct 14 22:06:02 2026 +0200 ASoC: ops: Fix return value in snd_soc_limit_volume() [ Upstream commit 223ec2a93bec6c5ee859094c826fec78516a0bb3 ] As documented snd_soc_limit_volume() should return 0 on success, however at some point in time this promise was broken when snd_soc_clip_to_platform_max() was refactored, refactor it once again using __free() to automatically free struct snd_ctl_elem_value and return proper value. Fixes: 7e10d7242ea8 ("ASoC: ops: dynamically allocate struct snd_ctl_elem_value") Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20261014200608.118770-3-amade@asmblr.net Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 818655a4b948135027c273446cd8d49f25a5294b Author: Amadeusz Sławiński Date: Wed Oct 14 22:06:01 2026 +0200 ASoC: soc-link: Correct stream stop operations in snd_soc_link_trigger [ Upstream commit 7ef99fcfbbac20ebec10d21a37aeaf8321de7829 ] When snd_soc_link_trigger() is called to stop, pause push or suspend stream it should call soc_link_mark_pop() on proper target to reverse operation from trigger start, pause release or resume. Fixes: 6374f493d93b ("ASoC: soc-pcm: care trigger rollback") Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20261014200608.118770-2-amade@asmblr.net Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 116524e03a320583d7a420ea323fd4c46d3e578f Author: Abraham Zukor Date: Sat Oct 10 12:54:05 2026 -0700 spi: tegra114: initialize native chip selects inactive [ Upstream commit f8334fdfd858c27f090ce597806794e4a08c9f4f ] tegra_spi_probe() initializes SPI_COMMAND1 with only SPI_M_S, leaving CS_POL_INACTIVE clear for every chip select. This drives every native active-low chip select low until tegra_spi_setup() runs for that device. SPI children are registered and probed one at a time. A synchronous probe of an earlier child can therefore transfer while a later child's chip select is still asserted. On a Tegra234 system with active-low devices on CS0 and CS1, this caused both devices to be selected when the CS1 device probed first. Its initialization then intermittently failed. A logic analyzer showed CS0 remained low throughout the CS1 transfer and went high only after the CS1 probe failed. Walk the controller's device tree children before SPI_COMMAND1 is written and set CS_POL_INACTIVE for each valid chip select without spi-cs-high. That way the line is already deasserted when the first child transfers and does not change level when setup runs. Disabled children are walked too. The core only registers available children, so tegra_spi_setup() never runs for a disabled one and probe is the only chance to park its chip select at the level its hardware needs. If an enabled child shares a chip select with disabled ones, its polarity takes priority. If only disabled children use a chip select and they disagree, warn and leave the line inactive high. Fixes: f333a331adfa ("spi/tegra114: add spi driver") Assisted-by: Claude:Opus-5 Signed-off-by: Abraham Zukor Link: https://patch.msgid.link/20261010195503.623287-1-abe@maticrobots.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3bb5d3352f5082850cb6db82cb2295f42d4c7656 Author: Haotian Zhang Date: Fri Oct 9 02:14:59 2026 +0800 ASoC: rockchip: fix device node reference leak in rk3288_hdmi_analog [ Upstream commit f15b2df0b940cb2c01797f78791de3279d514086 ] snd_rk_mc_probe() acquires references to the codec and CPU device nodes with of_parse_phandle() and stores them in the static rk_dailink, but the driver never calls of_node_put() on them. All error paths and the success path simply return, and the driver has no remove callback, so the references are leaked for the whole lifetime of the card and each failed or repeated probe leaks another pair. The same pattern was fixed for the sibling rockchip_rt5645.c driver. Release the codec and CPU device nodes on every probe error path and in a new remove callback, and also drop the extra reference placed in args.np by of_parse_phandle_with_fixed_args(). Fixes: eaae2ea73593 ("ASoC: rockchip: Add machine driver for RK3288 boards that use analog/HDMI") Assisted-by: DeepSeek-V4.1-Flash Signed-off-by: Haotian Zhang Link: https://patch.msgid.link/20261008181459.2762862-1-vulab@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c536e65bc331080544350d576b1eff32e9b1bf5a Author: Paolo Bertinetti Date: Tue Sep 22 18:17:43 2026 +0000 ublk: hold RCU read lock in ublk_try_buf_match() [ Upstream commit aaf49023041bc1f887a028a164d3bac714b65508 ] syzbot reports a lockdep splat when I/O is dispatched to a ublk device with UBLK_F_SHMEM_ZC enabled: WARNING: suspicious RCU usage lib/maple_tree.c:720 suspicious rcu_dereference_check() usage! ... Call Trace: mas_root lib/maple_tree.c:720 [inline] mas_start+0x3cc/0x640 lib/maple_tree.c:1250 mas_state_walk lib/maple_tree.c:3006 [inline] mas_walk+0x1db/0x490 lib/maple_tree.c:4458 ublk_try_buf_match drivers/block/ublk_drv.c:5639 [inline] ublk_init_iod+0x5d2/0x1120 drivers/block/ublk_drv.c:521 ublk_dispatch_req+0x97/0x9c0 drivers/block/ublk_drv.c:1776 tctx_task_work_run+0x73d/0xa80 io_uring/tw.c:96 ublk_try_buf_match() calls mas_walk() on the buffer tree without holding the RCU read lock or the tree lock. Writers are already excluded because ublk_lock_buf_tree() freezes the queue, so there is no real race, but maple tree readers must still hold one of the two. Take the RCU read lock around the walk. Fixes: 4d4a512a1f87 ("ublk: add PFN-based buffer matching in I/O path") Reported-by: syzbot+b48868c46e62c1c4cb2c@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=b48868c46e62c1c4cb2c Assisted-by: LLM Signed-off-by: Paolo Bertinetti Reviewed-by: Ming Lei Link: https://patch.msgid.link/179010105967.8478.2344875677216734809@proton.me Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 3377676be8167f59e87a01ca778e936751388d4d Author: Sasha Levin Date: Wed Oct 14 16:01:09 2026 -0400 selftests: keep the build status from wrapping to success [ Upstream commit 907d138279ee3747efedc9f7403d8b0edb52aca2 ] The top-level all and install rules return failure only when every selected target fails, which commit cad6f32665cb ("selftests: Deescalate error reporting") deliberately kept as the default. They implement this by multiplying the exit statuses of the targets: ret=$$((ret * $$?)) A failing recursive make exits with status 2, so eight failing targets produce 256, and "exit 256" reports success. Building eight or more targets that all fail therefore succeeds, and install goes on to package an empty installation. Record a successful target instead of multiplying statuses. The rules still fail only when no target succeeds, and FORCE_TARGETS still stops at the first failure. Link: https://lore.kernel.org/r/20261014200115.1363363-2-sashal@kernel.org Fixes: 5f70bde26a48 ("selftests: fix build behaviour on targets' failures") Signed-off-by: Sasha Levin Reviewed-by: Mark Brown Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin commit fd3be2709788888a8d3ead61258efb8cf5346e13 Author: Michael Auer Date: Tue Oct 13 22:45:49 2026 +0200 ASoC: qcom: sdm845: Disable the quaternary MI2S bit clock on shutdown [ Upstream commit cef5d087d6813d4c15847d0b71ecbd6c47c5f1d4 ] sdm845_snd_startup() enables the quaternary MI2S bit clock in the ADSP, but sdm845_snd_shutdown() never disables it. After the first stream on this port the clock stays on. On the OnePlus 6 the speaker amplifier is on this port. After the first playback the ADSP no longer power collapses: it slept under 9 s in 5 hours. With this change it sleeps again when audio is idle (about 40 s of 45 s). Refcount the clock like the other MI2S and TDM ports and disable it when the last user is gone. Fixes: 5caf64c633a3 ("ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga") Assisted-by: LLM Signed-off-by: Michael Auer Link: https://patch.msgid.link/20261013204549.3115830-1-mick@yoxcu.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit dada72f660b69a79e72a992590d09b8e46b4be89 Author: Cezary Rojewski Date: Thu Oct 15 21:02:40 2026 +0200 ASoC: Intel: avs: Prevent module info underflow [ Upstream commit 05c2975b4267246219e7aead0467626107e204e9 ] Typically modules information is first initialized when loading the base AudioDSP base firmware and then expanded when loadable DSP modules are requested by platform-components, see avs_component_load_libraries(). While theoretically not possible in a production scenario, there is no reason to continue the IDAs preparation if an event caused the newly obtained module information to be smaller or equal than the existing information. Fixes: c1a427e8da93 ("ASoC: Intel: avs: Firmware resources management utilities") Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20261015190240.729793-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 4d5918f0ada391ea60c0c7fe97273efe2e01fb95 Author: Cezary Rojewski Date: Thu Oct 15 21:02:38 2026 +0200 ASoC: Intel: avs: Unprepare a stream when recovery occurs [ Upstream commit 85bc213f96ac03d74a3e531968c68861e5598281 ] Recovery on alsa-lib side is handled with either: 1) snd_pcm_prepare(state=XRUN) 2) snd_pcm_drop/drain() -> snd_pcm_prepare(state=SETUP) before starting the PCM anew. Relying solely on state=XRUN leaves 2) unaccounted for. sound/core/pcm_native.c ensures correctness of the state machine so plain state!=PREPARED check suffices. This is the BE equivalent of job done previously for FE side only with commit cfca1637bc2b ("ASoC: Intel: avs: Unprepare a stream when XRUN occurs") and its follow up titled: ("ASoC: Intel: avs: Reset the stream unless it is already prepared"). Link: https://lore.kernel.org/linux-sound/20261010103753.16969-1-stiraspo@gmail.com/T/ Fixes: d070002a20fc ("ASoC: Intel: avs: HDA PCM BE operations") Signed-off-by: Cezary Rojewski Link: https://patch.msgid.link/20261015190240.729793-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit a332814aa2075341247a0d8aae90edb0e17490c7 Author: Jacob Moroni Date: Thu Oct 15 16:17:55 2026 +0000 RDMA/irdma: Fix FRWR IRDMAQPSQ_PBLADDR field population [ Upstream commit 59df57262e6fa9e6f4aa76d6d324134777c702a0 ] Previously, the IRDMAQPSQ_PBLADDR FRWR WQE field was being populated using a mask that was right-shifted, whereas it should have been the address being right-shifted. This ended up working fine in many cases because the lowermost 12 bits are always zero (the addresses are page aligned) and the uppermost 12 bits are usually zero too, but it could break for DMA addresses that are wider than 52 bits. Fix this by right-shifting the address instead of the mask, similar to how it was done in the original i40iw driver. Tested with NFS over RDMA with some added debug logs to ensure it was hitting both the direct (single page) path as well as multi page (< 512). Fixes: 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs") Signed-off-by: Jacob Moroni Link: https://patch.msgid.link/20261015161756.3078300-1-jmoroni@google.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit acbd2099dca018d891315fe9fe9ddebc1d2acc66 Author: Serhat Kumral Date: Thu Oct 15 13:25:18 2026 +0300 IB/rdmavt: Fix error unwind path for qp_priv_init() in rvt_create_qp() [ Upstream commit dd36137b218ad6f18ed15e6279412d7fc160980c ] If driver_f.qp_priv_init() fails, execution jumps to bail_rq_wq, which bypasses bail_qpn. Because alloc_qpn() has already succeeded at this point, the allocated QP number is left unreleased. Jump to bail_qpn instead to ensure the QPN is properly freed via rvt_free_qpn(). Fixes: 5190f052a3654 ("IB/hfi1: Allow the driver to initialize QP priv struct") Signed-off-by: Serhat Kumral Link: https://patch.msgid.link/20261015102518.15780-1-serhatkumral1@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 0ea18da5db727aa0a1f251fcab9ef509c7d69338 Author: Sasha Levin Date: Wed Oct 14 16:01:40 2026 -0400 kselftest/arm64: signal: copy each test binary only once [ Upstream commit 7b3b147c4104f8211ad356a78cff9a2dcd966312 ] The signal tests are built in testcases/ and then copied to the output directory. The copy rule lists every generated program as a target and copies all of them in each recipe: $(TEST_GEN_PROGS): $(PROGS) cp $(PROGS) $(OUTPUT)/ In a parallel build make runs that recipe once for each program, so several cp processes write the same destination files at the same time. cp then fails with "cannot create regular file ...: File exists", which fails the arm64 build even though every test compiled. A cross build of the arm64 signal tests at -j8 hit this in all of 8 runs. Use a static pattern rule so that each output depends on, and copies, only its own binary. Fixes: f96bf4340316 ("kselftest: arm64: mangle_pstate_invalid_compat_toggle and common utils") Signed-off-by: Sasha Levin Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin commit d3beb022377dc7e4a071703d525f25776106edbb Author: Qiliang Yuan Date: Fri Oct 9 09:49:42 2026 +0800 selftests/bpf: Accept unnamed dma-bufs in the dmabuf_iter default test [ Upstream commit 653b8f14fdda385bd7c5b786f8dfdcc3e5599e27 ] The dmabuf_collector iterator prints the inode, size, name and exporter of every dma-buf in the system on separate lines, with an empty name for the buffers that have none. The default_iter subtest parses that output and looks for the two buffers it created. It requires a name for every buffer, and sscanf() finds none on the empty line of an unnamed one. On a system that has such a buffer, like one exported by udmabuf without a name, the subtest fails before it gets to its own buffers. Take an empty name for a buffer without one. Fixes: ae5d2c59ecd7 ("selftests/bpf: Add test for dmabuf_iter") Signed-off-by: Qiliang Yuan Signed-off-by: Daniel Borkmann Reviewed-by: T.J. Mercier Link: https://lore.kernel.org/bpf/20261009-selftests-bpf-dmabuf-iter-unnamed-v1-1-962ee94f7a5e@gmail.com Signed-off-by: Sasha Levin commit d0bc3a3ed07d87d84cd7955cba6c0414a0730134 Author: Yun Lu Date: Tue Oct 13 11:01:14 2026 +0800 selftests/bpf: Fix map fd leak in no-BTF wq test [ Upstream commit d3c9ecb8765d4befbc46ee325c8d76efd523eece ] bpf_map__reuse_fd() duplicates the supplied file descriptor instead of taking ownership of it. test_failure_map_no_btf() closes the original map_fd only when reuse fails, leaking it when reuse succeeds, including when the test passes. Destroying the skeleton closes its own descriptor but leaves the original descriptor and its map reference alive. Close map_fd immediately after bpf_map__reuse_fd(), before checking its return value, to release the original descriptor on both success and failure. The skeleton retains its own descriptor for the subsequent program load. Fixes: bca2b74ea9a8 ("selftests/bpf: Add more bpf_wq tests") Reported-by: Jackie Liu Signed-off-by: Yun Lu Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261013030114.292157-1-luyun_611@163.com Signed-off-by: Sasha Levin commit e457ae1fcecd197deb25c7840b7e926a91f20f60 Author: Takashi Iwai Date: Thu Oct 15 13:22:41 2026 +0200 ALSA: core: Serialize snd_refcount put and sync [ Upstream commit 6904743ab77e0684dff319f3806ef982e5eea6cf ] When a thread tries to sync-and-destroy the resource with snd_refcount_sync(), it might lead to a UAF in a very slight time window. Namely, snd_refount_put() calls wake_up() after atomic_dec_and_test(), but wait_event() in snd_refcount_sync() checks the condition via atomic_test() without serialization, hence the thread that called snd_refcount_sync() can continue immediately to release the resource before another thread calls wake_up(). For avoiding the race above, introduce the spinlock and take it at snd_refcount_put() and snd_refcount_sync() in order to serialize the operations. Fixes: dcca9b6064c3 ("ALSA: Add simple refcount helper functions") Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/20261015071838.31082-1-tiwai%40suse.de Reviewed-by: Cen Zhang Link: https://patch.msgid.link/20261015112256.3902-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 97d3e9810ef960d8383ba85bfe3686360c2a4615 Author: Qiliang Yuan Date: Fri Oct 9 09:48:44 2026 +0800 selftests/bpf: Create the vxlan devices of test_tunnel with their MAC [ Upstream commit 33cbc5c2cadfe3b43f024e89880dd8fe2efb3a2e ] The vxlan tests of test_tunnel create a tunnel device in the initial netns with "ip link add", and then give it the MAC address that the static neighbor entry at the other end points to with "ip link set". systemd-udevd assigns new devices of the initial netns a MAC address of its own, following its MACAddressPolicy, when it handles their uevent. When it gets to that after the test set the address, the replies sent to the configured MAC are dropped as meant for another host, and the ping of vxlan_tunnel fails after 10 seconds. Pass the address to "ip link add". udevd leaves alone the address of a device that was created with one. Fixes: 1ee7efd40abf ("selftests/bpf: Move vxlan tunnel testcases to test_progs") Signed-off-by: Qiliang Yuan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261009-selftests-bpf-tunnel-vxlan-mac-v1-1-624dd769c334@gmail.com Signed-off-by: Sasha Levin commit a66b4a19f3437fcba9a1fa21c052ff8183fb17b0 Author: Praveen Kumar Kannoju Date: Wed Oct 14 12:13:44 2026 +0000 IB/mlx4: Avoid requeueing executing CM timeout work [ Upstream commit 9bcf45bfcaf83aed81b5fb12f0edf4c16e73e02e ] id->scheduled_delete is set by schedule_delayed() itself. It is used in two cases after the RTU timeout support was added: * A new id_map_entry is created, and a 60-second RTU timeout is scheduled. * DREQ or REJ is received for an existing entry, and the normal 30-second teardown timeout is scheduled or adjusted. The following race is possible when the RTU timeout expires while a DREQ or REJ is handled: CPU 0: timeout work CPU 1: DREQ/REJ handler -------------------- ----------------------- RTU timer expires timeout callback starts waits for id_map_lock takes id_map_lock calls schedule_delayed() calls mod_delayed_work() drops id_map_lock takes id_map_lock removes mapping frees id_map_entry requeued timeout runs accesses freed id_map_entry mod_delayed_work() may requeue the work after the timeout callback has started. The original timeout callback then frees the id_map_entry, leaving the requeued work with a dangling delayed_work pointer. When a timeout is already scheduled, first cancel its pending work. A successful cancellation means the callback has not started and the timeout can safely be scheduled again. If cancellation fails, the callback is executing and will free the entry after id_map_lock is released; do not requeue it. cancel_delayed_work() is deliberately used instead of cancel_delayed_work_sync(), because the timeout callback may be waiting for id_map_lock, which is held by the caller. Fixes: fa09adf4231f ("IB/mlx4: Fix stale CM id_map entries when RTU is never received") Signed-off-by: Praveen Kumar Kannoju Link: https://patch.msgid.link/20261014121344.100048-1-praveen.kannoju@oracle.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 73b3ce9083800cbdf45c37cf3f539b5cc2a13e64 Author: Zhan Xusheng Date: Fri Oct 2 23:31:01 2026 +0800 vdso/vsyscall: Keep the CLOCK_AUX base scaled [ Upstream commit 8d17190fae2caab89cd5df19257ed9dac0739e3b ] The vDSO basetime of a clock is stored in the scaled nanoseconds of tkr_mono, so that the reader can floor the base and the cycle delta together in vdso_calc_ns(). vdso_time_update_aux() instead shifts the base down to nanoseconds, adds the offset, and shifts it back up, which zeroes the fractional nanoseconds of xtime_nsec. The reader then floors the base and the delta separately: ktime_get_aux(): base + ((delta * mult + xtime_nsec) >> shift) vdso: base + (xtime_nsec >> shift) + ((delta * mult) >> shift) Since floor(a) + floor(b) <= floor(a + b), the vDSO reports 0 or 1 ns below the syscall for the same clock. It is not a monotonicity problem: across an update the step is floor(a + d) - floor(a) - floor(d), which is 0 or 1, never negative. Add the offset in scaled nanoseconds as the other high resolution clocks do, and normalise with __iter_div64_u64_rem() so that the stored base stays below one second and the userspace fast-path does not iterate more in __iter_div_u64_rem(). Only the sub-second field changes. (a + (b << shift)) >> shift is exactly (a >> shift) + b, so the seconds carried out of the normalisation are the same as before; what the old form dropped was the low shift bits of the remainder. monotonic_to_aux.tv_nsec is a normalised timespec64 fraction, so it stays below NSEC_PER_SEC even for a negative offset, and the sum stays below 2 * (NSEC_PER_SEC << shift). The largest shift clocks_calc_mult_shift() can pick is 32, which makes that 8.6e18 against a u64 limit of 1.8e19. Fixes: 380b84e168e5 ("vdso/vsyscall: Update auxiliary clock data in the datapage") Signed-off-by: Zhan Xusheng Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Weißschuh Link: https://patch.msgid.link/20261002153104.1347978-4-zhanxusheng@xiaomi.com Signed-off-by: Sasha Levin commit 85b8eb35bef27eaf25bd95b3c3999fe934bea645 Author: Zhan Xusheng Date: Fri Oct 2 23:31:00 2026 +0800 vdso/math64: Add and use __iter_div64_u64_rem() [ Upstream commit dcd65074e2c593a06bed36178bba6d49d6b6883c ] The vDSO basetimes for CLOCK_MONOTONIC and CLOCK_BOOTTIME are stored in the scaled nanoseconds of tkr_mono, so normalising them requires a division by NSEC_PER_SEC << shift. That divisor does not fit the u32 parameter of __iter_div_u64_rem(), so update_vdso_time_data() open-codes the same iterative division twice. Repeated subtraction is the appropriate form at these two sites because the quotient never exceeds one. accumulate_nsecs_to_secs() keeps xtime_nsec below one scaled second, and the offset added to it is a normalised timespec64 fraction, so the dividend stays below twice the divisor. That bound holds on every architecture, which matters more here than the cost of a division on any particular one. Add __iter_div64_u64_rem(), the u64-divisor counterpart of __iter_div_u64_rem(), and use it at both sites. Return the quotient as a u32 for consistency with the u32-divisor variant; the bound above leaves no use for a wider type. Store the remainder directly into the basetime, as the coarse clocks already do. The CLOCK_BOOTTIME copy of the CLOCK_MONOTONIC values then takes both fields from the same place. Folding the two open-coded loops into one inlined helper removes 16 bytes of vsyscall.o text on x86-64 with gcc 13. No functional change. Suggested-by: David Laight Signed-off-by: Zhan Xusheng Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Weißschuh Link: https://patch.msgid.link/20261002153104.1347978-3-zhanxusheng@xiaomi.com Stable-dep-of: 8d17190fae2c ("vdso/vsyscall: Keep the CLOCK_AUX base scaled") Signed-off-by: Sasha Levin commit 442f5141309a86d05d9b9bb5ffe9db8fb4d14ac2 Author: Koichiro Den Date: Thu Oct 15 23:27:16 2026 +0900 PCI: endpoint: pci-epf-vntb: Track link state from both sides [ Upstream commit f9eabc48327fae33cf0a02a8f312c24505dc413b ] The control-region link status is currently updated only by COMMAND_LINK_UP and COMMAND_LINK_DOWN from the HOST. The virtual NTB link callbacks are empty. Consequently, the HOST can see the link as up before the VHOST has enabled it, and ntb_link_disable() on the VHOST leaves LINK_STATUS_UP set without notifying either NTB client. ntb_netdev can hide this device-level state bug because ntb_transport uses a separate per-QP LINK_DOWN_FLAG message. Use ntb_tool to observe the device link state directly: After bringing both sides up, start one waiter on each side: HOST# echo N > /sys/kernel/debug/ntb_tool//peer0/link_event VHOST# echo N > /sys/kernel/debug/ntb_tool//peer0/link_event While both waiters are blocked, disable the link on the VHOST: VHOST# echo N > /sys/kernel/debug/ntb_tool//link Without this patch, the link-disable command succeeds, but peer0/link remains Y on both sides and neither waiter returns. Track HOST and VHOST enablement separately and report the effective link as up only when both sides have enabled it, as pci-epf-ntb does for its two physical hosts. Both NTB clients observe this effective state, so notify both sides only when it changes, including the side whose request completes the transition. Serialize the two paths because HOST commands run from delayed work while the VHOST callbacks may run concurrently. With this patch, peer0/link changes to N on both sides and both waiters return. Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Signed-off-by: Koichiro Den Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://lore.kernel.org/r/20261014071448.2473208-1-den@valinux.co.jp/ Link: https://patch.msgid.link/20261015142716.3452900-1-den@valinux.co.jp Signed-off-by: Sasha Levin commit 441f25128ec954dfc001d665e09013d5ecd6165b Author: Jaewon Jung Date: Wed Oct 14 20:48:25 2026 +0900 selftests/ftrace: Avoid unlink error on first run [ Upstream commit 0abfa9ad5c6917cb9a509276f32009d944b3c269 ] On the first run, ftracetest tries to unlink a symlink that does not exist. Use rm -f to avoid the "No such file or directory" error. Link: https://lore.kernel.org/r/20261014114839.6258-1-jaewon8868@gmail.com Fixes: 7dc1e125f07a ("ftrace/selftests: Add softlink to latest log directory") Signed-off-by: Jaewon Jung Acked-by: Masami Hiramatsu (Google) Signed-off-by: Shuah Khan Signed-off-by: Sasha Levin commit 73c282c249edc67a19b01100539a56f76669805f Author: Myeonghun Pak Date: Wed Oct 14 22:51:10 2026 -0400 ASoC: rt5645: Shut down the button timer on removal [ Upstream commit f0ecc305442f20a6df2575943e9897825d80cc5d ] jack_detect_work can rearm btn_check_timer, and the timer callback can queue jack_detect_work. Deleting the timer before cancelling the work does not break this cycle: an already running worker can rearm the timer after timer_delete_sync() returns. The timer can then outlive removal. Use timer_shutdown_sync() before cancelling the delayed work so that subsequent attempts to rearm the timer are ignored. The IRQ producer has already been removed at this point. Keep the restartable timer deletion in the suspend path. This issue was identified as part of our ongoing research while reviewing kernel code. Fixes: 7ff6319e7da5 ("ASoC: rt5645: use polling to support HS button") Assisted-by: LLM Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://patch.msgid.link/179203261324.2681924.5002100194676410503.rt5645-button-timer@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0021f01b3636b0d8a5cc66c05c7d077a71b0717e Author: Zhang Yi Date: Fri Oct 9 18:30:06 2026 +0800 ext4: fix orig_mlen initialization in ext4_map_blocks() [ Upstream commit 3ec0eefc07cb9e2bb1193f1fa3d8157302a737f5 ] Save orig_mlen after clamping map->m_len to INT_MAX. Otherwise, the unclamped value may be passed below, bypassing its overflow protection. Fixes: 5bb12b1837c0 ("ext4: Add support for EXT4_GET_BLOCKS_QUERY_LEAF_BLOCKS") Signed-off-by: Zhang Yi Reviewed-by: Ojaswin Mujoo Tested-by: syzbot@syzkaller.appspotmail.com Link: https://patch.msgid.link/20261009103033.2920530-6-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o Signed-off-by: Sasha Levin commit cd5f6d65043c10d41ac29471210b873ca6eafa46 Author: Akash Goel Date: Tue Oct 13 13:54:32 2026 +0100 drm/panthor: Fix handling of NO_MMAP BOs [ Upstream commit 9a07b36a511fe998f46372331758ef355273bdfb ] The BOs created with DRM_PANTHOR_BO_NO_MMAP flag are not supposed to be mmappable by the Userspace. But after the rework to support shrinker, it became possible to mmap NO_MMAP BOs. Userspace could second guess the file offset range, allocated unconditionally at the BO creation time, and create a CPU mapping. There may not be any adverse effect of such a CPU mapping though. This commit adds a check in the mmap callback of Panthor driver to fail the mmap() attempts on BOs created with NO_MMAP flag. The check covers private BOs as well as the prime exported BOs that are mmapped using prime fd. v2: - Fix breakage of mmap() on exported BOs that didn't have BO_MMAP_OFFSET ioctl invoked for them. Fixes: 68cbf96b1e9b ("drm/panthor: Part ways with drm_gem_shmem_object") Suggested-by: Boris Brezillon Signed-off-by: Akash Goel Reviewed-by: Steven Price Reviewed-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patch.msgid.link/20261013125433.26432-1-akash.goel@arm.com Signed-off-by: Sasha Levin commit 4ff8efdd007cec66a46b1c05eff80148b26813d6 Author: Youngsung Ahn Date: Sat Oct 3 01:45:52 2026 +0900 RDMA/rxe: bound the WQE opcode before indexing rxe_wr_opcode_info[] [ Upstream commit c887e53e1c852b88bd5442d1bf4717ee3e7aadda ] wr_opcode_mask() indexes the global rxe_wr_opcode_info[] array with a caller-supplied opcode and no bounds check. For a user QP the WQE comes from an mmap'd SQ ring, so wqe->wr.opcode is an attacker-controlled __u32 read back by the requester (req_next_wqe() -> rxe_requester()); rxe_post_send() takes the qp->is_user branch and never runs validate_send_wr(), whose only opcode check is itself !wr_opcode_mask() (it indexes before it checks). rxe_wr_opcode_info[] has entries only up to IB_WR_REG_MR, so an out-of-range opcode reads out of bounds and the result is used as a mask and dereferenced; observed as a KASAN global-out-of-bounds "Read of size 4" and a wild-pointer oops. Return a zero mask for an out-of-range opcode, matching how validate_send_wr() already treats a zero mask (an invalid WR), so no path indexes the array out of bounds. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Youngsung Ahn Link: https://patch.msgid.link/20261002164552.294749-1-ays511.kr@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit b087321b0d3eb276c59b3c7a856aadb35b6f8a08 Author: Honggang LI Date: Fri Oct 2 22:22:50 2026 +0800 RDMA/rxe: Fix out-of-range unsigned-to-signed conversion for RDMA message in 2GiB size [ Upstream commit 56a27df6cedd4f3918969d61c7b9d3cc177b2d1b ] When RDMA READ request for 2GiB in single WR, res->read.resid is u32 0x80000000, which is INT_MIN (-2147483648). payload = min_t(int, res->read.resid, mtu); The `min_t` function will return -2147483648 for payload. The wrong size is propagated through call chain, `read_reply` -> `prepare_ack_packet` -> `rxe_init_packet` -> `alloc_skb` . `alloc_skb` failed because of invalid size. The passive side failed to emit response packet for RDMA READ request. After fixed it, the active side of RDMA READ failed with error code "IB_WC_LOC_PROT_ERR". When RDMA_READ_RESPONSE_FIRST packet recived by the active side, `do_read` call `copy_data`. dma->resid is u32 0x80000000. int resid = dma->resid; This conversion set resid to -2147483648. `copy_data` abort as length greater than resid. RDMA SEND and WRITE 2GiB message works too, after fixed these two bugs. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Honggang LI Link: https://patch.msgid.link/20261002142250.657151-1-honggangli@163.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 357bb10d3fdd35c7c8023796e5d96197b19b2cbf Author: xiongweimin Date: Thu Jul 16 13:52:55 2026 +0800 RDMA/rxe: Hold netdev reference for transmit skbs [ Upstream commit 19881618ffa454c63e6b6bf34acd7cac28c695dc ] rxe_init_packet() assigns skb->dev from an RCU-protected GID attribute without holding a netdev reference. If the netdev is unregistered before the skb is freed, subsequent accesses to skb->dev are unsafe. Hold a reference with dev_hold() when the skb is initialized and release it from the transmit destructor or via rxe_put_skb() on error paths that run before the destructor is installed. skb->dev can change on the TX path (VLAN/bond/tunnel, ip_finish_output2, etc.), so put must use the same netdev that was held. Stash that pointer in skb_shinfo()->destructor_arg: skb->cb is already used by rxe_pkt_info and is rewritten by IP control blocks. To avoid blocking netdev unregistration on held skbs, flush all QPs to the error state on NETDEV_GOING_DOWN and NETDEV_UNREGISTER so pending TX work is drained and references can be dropped. Signed-off-by: xiongweimin Link: https://patch.msgid.link/20260716055255.157674-1-xiongwm2026@163.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Stable-dep-of: 56a27df6cedd ("RDMA/rxe: Fix out-of-range unsigned-to-signed conversion for RDMA message in 2GiB size") Signed-off-by: Sasha Levin commit 1d77fd886b4757388246bb8ab2fb805b72ddaed0 Author: Youngsung Ahn Date: Fri Oct 2 00:24:33 2026 +0900 RDMA/rxe: validate inline sge_offset in finish_packet() before indexing inline_data[] [ Upstream commit 47a9c0338f2e0d4178d77b0d2f529fe1fde84642 ] For a user QP, rxe_post_send() takes the qp->is_user branch and never runs init_send_wqe(), so dma.length/resid/num_sge/cur_sge/sge_offset all come straight from the mmap'd SQ ring. In the inline send path finish_packet() uses sge_offset directly as an index: u8 *tmp = &wqe->dma.inline_data[wqe->dma.sge_offset]; memcpy(payload_addr(pkt), tmp, payload); inline_data is a flex array whose capacity is qp->sq.max_inline, but sge_offset is a u32 from user space, so the source pointer is displaced arbitrarily past the WQE and the memcpy reads out of bounds. commit 126c757e4cd4 ("RDMA/rxe: Validate num_sge/cur_sge before indexing wqe->dma.sge[]") added num_sge/cur_sge checks on the send path but not sge_offset, the third attacker-controlled index in the same struct. Read sge_offset once with READ_ONCE() and bound it (and the payload that follows it) by qp->sq.max_inline before indexing, so the value that is validated is the value that is used. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Youngsung Ahn Link: https://patch.msgid.link/20261001152433.3259573-1-ays511.kr@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 4780b472cc01e1e3eaaa1e39be20a8100b4d7464 Author: Youngsung Ahn Date: Mon Oct 5 00:32:46 2026 +0900 RDMA/rxe: bound the ODP page index against the umem in rxe_check_pagefault() [ Upstream commit 7797bbb0e86f0062fe58480a0116c86e4ec0d0d1 ] An ODP MR has a page array, map.pfn_list[]. Its size is computed from the umem start address. But rxe_check_pagefault() builds the index into that array from an iova that is relative to the same start, while the access itself was range-checked against the MR's iova (ibmr.iova). Those two bases do not have to match. reg_mr only requires that start and hca_va have the same page offset, so a user can register an MR with hca_va = start + N*PAGE. The difference then becomes an index skew of (hca_va - start) >> PAGE_SHIFT. Nothing compares the result with the size of pfn_list[], so the read goes past the end of the array. An unprivileged local user can reach this with a single RDMA operation on a self-connected rxe QP. KASAN reports a slab-out-of-bounds read. If the out-of-bounds qword happens to look like a writable HMM pfn, rxe then copies the payload into a page the user never registered. Reject an index that falls outside the umem and take the fault path instead. That path rejects the out-of-range access in ib_umem_odp_map_dma_and_lock(), which does check the umem range. The other users of pfn_list[], __rxe_odp_mr_copy() and the atomic helpers, run only after a successful map, so this single check covers them too. Fixes: 2fae67ab63db ("RDMA/rxe: Add support for Send/Recv/Write/Read with ODP") Signed-off-by: Youngsung Ahn Link: https://patch.msgid.link/20261004153246.2951263-1-ays511.kr@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 8ea50bd26a8b7629e2f946330317d7c2a8ca5b60 Author: Youngsung Ahn Date: Fri Oct 2 00:24:26 2026 +0900 RDMA/rxe: reject IB_WR_REG_MR from user QPs in rxe_reg_fast_mr() [ Upstream commit 33afe9909f213d8bb8e80f0b93382dde0f56e2c7 ] IB_WR_REG_MR is documented as kernel-only ("can not be issued by userspace"), but nothing enforces it. rxe_wr_opcode_info[IB_WR_REG_MR] sets WR_LOCAL_OP_MASK for IB_QPT_RC, a QP type userspace can create, so a user QP that writes opcode = IB_WR_REG_MR into its mmap'd SQ ring reaches rxe_do_local_ops() -> rxe_reg_fast_mr(). That function then trusts the ring-supplied fields: struct rxe_mr *mr = to_rmr(wqe->wr.wr.reg.mr); ... if (unlikely(mr->state != RXE_MR_STATE_FREE)) /* deref */ ... mr->access = access; /* write */ For a user QP wqe->wr.wr.reg.mr is a fully attacker-chosen pointer, so this is an arbitrary-kernel-address dereference (arbitrary read confirmed, oops). No existing check distinguishes a user QP on this path. Reject IB_WR_REG_MR for user QPs before dereferencing the supplied pointer. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Youngsung Ahn Link: https://patch.msgid.link/20261001152426.3259522-1-ays511.kr@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d6b13ad770812c1fe553a0c4f7b002cee87ba5ba Author: Youngsung Ahn Date: Thu Oct 1 03:22:23 2026 +0900 RDMA/rxe: refuse to destroy a QP with type 2 MWs still bound [ Upstream commit 9e61a2ac6590e9c42d2eeef687749781334b300f ] Binding a type 2 memory window takes a reference on the QP: rxe_do_bind_mw() does rxe_get(qp) and stores it in mw->qp. That reference is released only when the window is invalidated (rxe_do_invalidate_mw() on IB_WR_LOCAL_INV) or the window itself is destroyed (rxe_mw_cleanup()). rxe_qp_chk_destroy() does not account for those references -- it only refuses when qp->mcg_num is non-zero. So an unprivileged user can bind a type 2 MW to a QP and then destroy the QP while the binding is still live. __rxe_cleanup() cannot drop the QP refcount to zero (the MW still holds a reference), hits its -ETIMEDOUT path, and frees the QP anyway; mw->qp is left dangling. When the MW is later invalidated or deallocated, rxe_mw_cleanup()/rxe_do_invalidate_mw() do rxe_put(mw->qp) on the freed struct rxe_qp -- a use-after-free write (refcount_dec, and complete()/list work if it reaches zero) reachable from userspace. IB_WR_BIND_MW is a local operation, so no peer is required. Track the number of type 2 MWs bound to a QP and refuse to destroy the QP while that count is non-zero, returning -EBUSY exactly as the existing multicast-attachment check does. The window must be invalidated or deallocated, which drops the reference and the count, before the QP can be destroyed. Fixes: 8700e3e7c485 ("Soft RoCE driver") Signed-off-by: Youngsung Ahn Link: https://patch.msgid.link/20260930182223.2511145-1-ays511.kr@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 121e6311647d331f48e0baee5824293a7d1f53ba Author: Sahaj Chaudhari Date: Thu Oct 15 12:13:41 2026 +0530 spi: omap2-mcspi: handle DMA setup failures [ Upstream commit c126e07bde21c518f1356937ac240500d1bc81c0 ] The DMA paths ignore failures from dmaengine_slave_config(), descriptor preparation and dmaengine_submit(), and carry FIXME comments about falling back to PIO. A failed setup can leave a half-started transfer or wait for a completion that never arrives. Check each step and clean up with dmaengine_terminate_sync() on error. Prepare both descriptors before issuing either channel. Fall back to PIO only for host-mode transfers that have a TX buffer, when no DMA has been started and cleanup succeeded. RX-only and target-mode transfers return the error instead, since the bus may already be clocking. The FIFO is enabled before the DMA attempt, but the PIO path polls per-word TXS/RXS and does not expect FIFO mode. Disable the FIFO, with the channel off while its bits change, before falling back. Tested on an AM642 board with a TI 6.12.57 vendor kernel built with this patch and booted from RAM. On a McSPI bus using DMA, 200 iterations of 4096-byte TX and 1024-byte RX spidev transfers completed with no errors, timeouts or kernel warnings. With a temporary change that fails every DMA-sized TX setup, 60 spidev writes fell back to PIO with no errors or timeouts. That test used a bus with no device attached and did not show a difference with and without the FIFO disable, which is based on reading the code. Fixes: 53741ed8f0a3 ("spi: omap2-mcspi: add DMA engine support") Link: https://lore.kernel.org/r/20250914022132.319227-1-alex.t.tran@gmail.com Signed-off-by: Sahaj Chaudhari Link: https://patch.msgid.link/20261015064341.1100422-1-sahaj123.sc@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e41b25f9c8db03f31fdf2ab2e814dde3731e9023 Author: Julian Sun Date: Thu Oct 15 17:11:05 2026 +0800 block: take the inode lock for buffered write fallback [ Upstream commit 1b1be9ea4e34ccede1e7cf9ff2b6317328a5b6ad ] Commit c0e473a0d226 ("block: fix race between set_blocksize and read paths") added shared inode locking around ordinary buffered writes, but missed the direct-I/O fallback path. Move the lock into blkdev_buffered_write() so both paths serialize with set_blocksize(). Also correct the comment claiming that this path takes invalidate_lock; it only takes i_rwsem. Fixes: c0e473a0d226 ("block: fix race between set_blocksize and read paths") Signed-off-by: Julian Sun Link: https://patch.msgid.link/20261015091105.1315605-3-sunjunchao@bytedance.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 20a17e74a9d3416f320687ad86ac9e8a17f81d89 Author: Julian Sun Date: Thu Oct 15 17:11:04 2026 +0800 block: reject NOWAIT buffered write fallback [ Upstream commit a08bf4b9f87898628e70882430b8dd4260730dba ] blkdev_write_iter() rejects NOWAIT buffered writes, but does not enforce this restriction when direct I/O falls back to buffered I/O. Successful fallback waits for writeback, violating NOWAIT semantics. Reject NOWAIT requests in blkdev_buffered_write() with -EAGAIN. Fixes: c35fc7a5abae ("block_dev: support RFW_NOWAIT on block device nodes") Signed-off-by: Julian Sun Link: https://patch.msgid.link/20261015091105.1315605-2-sunjunchao@bytedance.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 4666ce1eb631aae6b436484e6dfd768d3e8b14cd Author: Ard Biesheuvel Date: Fri Oct 9 16:48:15 2026 +0200 efi/runtime-wrappers: Don't park the worker after a recovered firmware fault [ Upstream commit b49be1e7478afdb4ec96aedeb17f906253326c48 ] Commit 4b2c033b5bc9 ("efi/runtime-wrappers: retire the worker if a wedged call ever returns") parks the efi_rts_wq worker instead of completing the call if EFI runtime services have been disabled by the time the firmware returns. The assumption is that this only happens if __efi_queue_work() has given up waiting for the call. However, arm64 also disables EFI runtime services when it recovers from a synchronous exception taken by the firmware: efi_runtime_fixup_exception() clears EFI_RUNTIME_SERVICES and unwinds the call so that it returns EFI_ABORTED to efi_call_rts(), while the caller is still waiting for the completion. The worker now parks without signalling it, so the caller is stuck for the full EFI_RTS_TIMEOUT of 120 seconds, after which it reports that the firmware is wedged, which is misleading. x86 is not affected, as it signals the completion from its page fault handler before parking the worker. So record explicitly that the caller has given up on the call, and only park the worker in that case. Fixes: 4b2c033b5bc9 ("efi/runtime-wrappers: retire the worker if a wedged call ever returns") Cc: Breno Leitao Reviewed-by: Breno Leitao Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin commit d6efa9a12c92beb68cd49b47a29752b55a1f4ba0 Author: zhoumin Date: Thu Oct 15 17:41:02 2026 +0800 ata: ahci: preserve preset port masks [ Upstream commit 014c29a8e3bdcaad8c6fdfcf1af2fdbbab3fc323 ] ahci_get_port_mask() returns zero for absent or unmatched parameters, overwriting the mask set by the Marvell PATA quirk. Update the mask in place only when parsing a global value or a matching device entry. Leave the mask unchanged on parsing errors. Fixes: 70c1595c181c ("ata: ahci: Allow ignoring the external/hotplug capability of ports") Suggested-by: Niklas Cassel Signed-off-by: zhoumin Link: https://lore.kernel.org/r/tencent_26064A115A53E4C6D00433C89E1894E2D808@qq.com Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit bac6a5a3c96237c025086b885d31a3485a3204d9 Author: Takashi Iwai Date: Thu Oct 15 09:18:09 2026 +0200 ALSA: pcm: Add refcount for races between drain and unlink [ Upstream commit 91d0048a97e0fdc0a071caa0ba59e659bc6f84df ] We added a workaround for the case where a linked substream gets unlinked during the drain operation by another substream of the same linked group in the commit 9b1dbd69ba6f ("ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()"). There, we just cached the parameters of the draining substream for avoiding UAF. Then, we check the draining substream (to_check) again in the loop and remove it from the queue only when it's still present. It means, however, that the wait queue entry won't be removed if the substream went out of the link beforehand, hence a stale wq entry remains. Later on, this can be woken up, and this may hit a UAF, too. The problem surfaced more due to the recent change to call snd_pcm_unlink() earlier. For properly handling both cases above, in this patch, we introduce a refcount to the snd_pcm_runtime that indicates the substream is being accessed / used, then at snd_pcm_release_substream(), it's synced before the actual resource release via snd_refcount_sync(). This guarantees that the accessors are finished, and safe to release memories. Along with the introduction of a refcount, the comments and the code changes by the former fix were partially reverted as they don't fit with the updated code flow any longer. Last but not least, the setup of wait queue entry and prepare_to_wait() call are moved before the group unref. With this change, we can avoid the race between the enqueue and the wakeup, too. Fixes: 9b1dbd69ba6f ("ALSA: pcm: fix use-after-free on linked stream runtime in snd_pcm_drain()") Link: https://patch.msgid.link/20261015071838.31082-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 1fcf563c83c98029e1a3ab8b703653f0b14ad12f Author: Benoît Monin Date: Tue Sep 29 14:14:10 2026 +0200 irqchip/mips-gic: Transfer interrupt mask state across clusters [ Upstream commit a5f0dc656e89d0eb140547823a36212902cdf673 ] When an interrupt's affinity is moved to a CPU in another cluster, gic_set_affinity() updates the routing (GIC_SH_MAP_VP) and trigger type in the destination cluster, but never touched the interrupt's mask state. The interrupt mask is per-cluster. After such a move the interrupt may be left disabled in the destination cluster, so it never fires despite being correctly routed to its new VP. Move the mask state along with the interrupt: disable it in the old cluster while clearing the route so it is no longer delivered, then configure the trigger type in the new cluster and re-enable it there if it was enabled in the old cluster. Fixes: 322a90638768 ("irqchip/mips-gic: Multi-cluster support") Signed-off-by: Benoît Monin Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Bogendoerfer Link: https://patch.msgid.link/20260929-sync-gic-counters-v4-3-ec70c4b60434@bootlin.com Signed-off-by: Sasha Levin commit 980c2ec09368ca226feda42edf0b41376098c844 Author: Benoît Monin Date: Tue Sep 29 14:14:09 2026 +0200 irqchip/mips-gic: Fix recursive acquisition of gic_lock in gic_set_affinity() [ Upstream commit 1bae25dcc6beb8b874f23601d2efa142ac4f9f36 ] Commit 322a90638768 ("irqchip/mips-gic: Multi-cluster support") made gic_set_affinity() call gic_set_type() when an interrupt's affinity is moved between clusters. gic_set_type() takes gic_lock with raw_spin_lock_irqsave(), but gic_set_affinity() holds gic_lock at that point, so the same raw spinlock is acquired twice, triggering a deadlock. Split gic_set_type() into a gic_set_type_locked() helper that assumes gic_lock is already held. gic_set_type() takes gic_lock and calls the helper, and gic_set_affinity() calls gic_set_type_locked() directly, since it already holds gic_lock. Fixes: 322a90638768 ("irqchip/mips-gic: Multi-cluster support") Signed-off-by: Benoît Monin Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Bogendoerfer Link: https://patch.msgid.link/20260929-sync-gic-counters-v4-2-ec70c4b60434@bootlin.com Signed-off-by: Sasha Levin commit 4d3ece5ed27d0defaa48f74e2d16c6c4e8ecb29c Author: Benoît Monin Date: Tue Sep 29 14:14:08 2026 +0200 irqchip/mips-gic: Fix unbalanced cm_core_lock in for_each_online_cpu_gic() [ Upstream commit 03c4d26933d54556a89379db5923ae9e474569e8 ] Commit d9e2ed610a60 ("irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic()") added a gic_unlock_cluster() call to the macro's loop increment, which unconditionally invokes mips_cm_unlock_other() on multi-cluster systems. However nothing in the loop ever acquires the corresponding mips_cm_lock_other(), so on multi-cluster hardware every invocation of for_each_online_cpu_gic() releases an unheld per-CPU cm_core_lock. With CONFIG_PROVE_LOCKING this triggers a "bad unlock balance detected" warning at boot, e.g. from gic_irq_domain_map() while mapping local interrupts. Only the first occurrence is reported, since the first warning permanently disables lockdep (debug_locks = 0); the unbalanced release itself silently persists. Fix this by moving both the acquire and release into __gic_with_next_online_cpu() so they stay balanced. When advancing to a CPU in a remote cluster, lock the CM redirect block for that cluster via mips_cm_lock_other(); when leaving a remote cluster (or finishing the iteration) release it with mips_cm_unlock_other(). Local-cluster CPUs require no locking, so single-cluster systems are unaffected. This also makes the redirect region behave correctly when accessing local register blocks of CPUs in other clusters. Drop the now-unused gic_unlock_cluster() helper and its call from the for_each_online_cpu_gic() increment. Fixes: d9e2ed610a60 ("irqchip/mips-gic: Support multi-cluster in for_each_online_cpu_gic()") Signed-off-by: Benoît Monin Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Bogendoerfer Link: https://patch.msgid.link/20260929-sync-gic-counters-v4-1-ec70c4b60434@bootlin.com Signed-off-by: Sasha Levin commit d76318dbbfb8eae7d4b73e227cf082a74cc4bd2a Author: Zhu Ling Date: Tue Sep 29 11:10:50 2026 +0800 irqchip/gic: Fix UBSAN shift-out-of-bounds in GIC helpers [ Upstream commit 13ce14ca41a35f5ee90b77ffa57da91ce6048a2d ] When running with UBSAN enabled, enabling a GPIO controller that uses a GIC interrupt as its parent triggers several shift-out-of-bounds warnings: shift-out-of-bounds in drivers/irqchip/irq-gic-common.c:50:21 left shift of 2 by 30 places cannot be represented in type 'int' Similar reports are emitted from gic_poke_irq() and gic_peek_irq() in drivers/irqchip/irq-gic-v3.c. The corresponding GICv2 helpers use the same signed-shift pattern. These masks are generated by shifting signed integer constants, which invokes undefined behavior when bit 31 is selected. Use BIT() to generate the masks with an unsigned type and make their intent explicit. Fixes: f27ecacc54cc ("[ARM] Add support for ARM GIC") Fixes: 5c0c1f08abf0 ("ARM: 6150/1: gic: implement set_type") Fixes: 021f653791ad ("irqchip: gic-v3: Initial support for GICv3") Signed-off-by: Zhu Ling Signed-off-by: Thomas Gleixner Reviewed-by: Zenghui Yu (Huawei) Reviewed-by: Radu Rendec Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/2fJDwUUYdEf2_eaRa041L9xkT8RkSWFeo7euOnqMbbPhUatLlEaAvGfB6sOspDmXaxO87Eh7bQLV9UolyjbMtZBT1wB2UGypjPOo0Z-RC0Q=@proton.me Link: https://patch.msgid.link/20260929031050.16988-1-zhuling2709@phytium.com.cn Signed-off-by: Sasha Levin commit c86107e281a885bb1314fc09dde8bc0cb8f3931d Author: Fuad Tabba Date: Fri Sep 25 09:50:00 2026 +0100 irqchip/gic-v3: Don't register a redistributor that was never counted [ Upstream commit 6a21693b97ee5cb0a21d04bfd051a05dde5aa783 ] gic_acpi_match_gicc() counts only the enabled GICCs with a non-zero gicr_base_address, and that count sizes redist_regs[], but gic_acpi_parse_madt_gicc() registers every enabled one. On a MADT with no GICR entries, an enabled GICC with a zero GICR base therefore makes gic_acpi_register_redist() write a struct redist_region past the end of the array. Commit fa2dabe57220e ("irqchip/gic-v3: Don't return errors from gic_acpi_match_gicc()") removed the check that kept the two consistent. Its message says such entries are still caught by gic_populate_rdist(), but that runs from gic_cpu_init(), after the write. Skip the entry instead, and mark the CPU's redistributor broken as the online-capable path does, so that gic_check_rdist() rejects the CPU. gic_starting_cpu() runs past cpuhp's last failure point, so without the mark the CPU would come online with its redistributor and CPU interface unconfigured. With an ITS, its_cpu_init() would then dereference a NULL rd_base. Fixes: fa2dabe57220e ("irqchip/gic-v3: Don't return errors from gic_acpi_match_gicc()") Signed-off-by: Fuad Tabba Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://patch.msgid.link/20260925085000.753400-4-fuad.tabba@linux.dev Signed-off-by: Sasha Levin commit a28c0f43ed84ed994f5adf50ddc4f97dbe10900e Author: Fuad Tabba Date: Fri Sep 25 09:49:59 2026 +0100 irqchip/gic-v3-its: Don't free the tables of an enabled ITS [ Upstream commit d09b36d8e0e60f35bd1cd7d63aadc6dfad61700c ] its_probe_one() enables the ITS before its_init_domain(), the last step that can fail, and the unwind from there frees the tables and the command queue without disabling it. The kernel comes up with an enabled ITS pointing at freed pages. Enable the ITS last. Nothing reaches the new domain before then: this runs from init_IRQ(), and the ITS joins its_nodes only after the enable. Fixes: 4c21f3c26ecc2 ("irqchip: GICv3: ITS: DT probing and initialization") Signed-off-by: Fuad Tabba Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://patch.msgid.link/20260925085000.753400-3-fuad.tabba@linux.dev Signed-off-by: Sasha Levin commit a3527d3a7ef95ae236ddd3f5f3051c11c6203a28 Author: Fuad Tabba Date: Fri Sep 25 09:49:58 2026 +0100 irqchip/gic-v3-its: Don't free a vPE table shared with another ITS [ Upstream commit 32e056cc1d1582951f981113ca8b98914f29c32a ] On GICv4.1, its_alloc_tables() copies a sibling's vPE table baser rather than allocating one, but its_free_tables() frees it like the rest. A probe failure on the copying ITS then frees pages the enabled sibling still points GITS_BASER2 at, and the kernel comes up running on that sibling. Mark a shared table so its_free_tables() skips it. Fixes: 5e5168461c22c ("irqchip/gic-v4.1: VPE table (aka GICR_VPROPBASER) allocation") Signed-off-by: Fuad Tabba Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Link: https://patch.msgid.link/20260925085000.753400-2-fuad.tabba@linux.dev Signed-off-by: Sasha Levin commit 2b18becd99ebaeb846f258d6d651dc990bfc4f2a Author: Pengpeng Hou Date: Sun Sep 20 21:07:54 2026 +0800 irqchip/riscv-imsic: Reject overlapping group index fields [ Upstream commit 8caa8fcec8db5358437b9b7ca456bc3093d2a4d0 ] The IMSIC address layout places the group index above the page offset, guest index and HART index. imsic_parse_fwnode() checks the individual field widths and the upper end of the group field, but does not check that its lower end is above the other fields. Reject a nonzero group field whose shift overlaps the lower fields. Otherwise a firmware-supplied layout can assign the same address bit to different indices when MSI target addresses are constructed. Keep the existing upper-bound check unchanged. The new lower-bound check applies only when group index bits are present. The issue was found by our static-analysis tool. Fixes: 21a8f8a0eb35 ("irqchip: Add RISC-V incoming MSI controller early driver") Signed-off-by: Pengpeng Hou Signed-off-by: Thomas Gleixner Assisted-by: gpt 5 Reviewed-by: Anup Patel Link: https://patch.msgid.link/caplitmus-rv.v2.imsic.f2c0e5bdc627451c83deb0cf7eb8834a@163.com Signed-off-by: Sasha Levin commit dcb4761579898e286bb05ca939ae287d56708b3b Author: Pengpeng Hou Date: Sun Sep 20 21:06:53 2026 +0800 irqchip/sifive-plic: Avoid signed shift in interrupt enable mask [ Upstream commit 0f214e5bbee59d5952d3c061fd65ed9a1e175981 ] __plic_toggle() builds a 32-bit interrupt enable mask using a signed integer literal. A valid interrupt selecting bit 31 evaluates 1 << 31, which shifts a signed int into its sign bit. Use BIT(), matching the equivalent mask construction in plic_irq_eoi(). The resulting mask remains representable in u32 on both RV32 and RV64. The issue was found by our static-analysis tool. Fixes: 8237f8bc4f6e ("irqchip: add a SiFive PLIC driver") Signed-off-by: Pengpeng Hou Signed-off-by: Thomas Gleixner Assisted-by: gpt 5 Link: https://patch.msgid.link/caplitmus-rv.v2.plic.87a8fc444de44e109889ba28703c76f3@163.com Signed-off-by: Sasha Levin commit c36df37e25853397ecaf9778ccbf040027608f29 Author: Pengpeng Hou Date: Sun Sep 20 11:42:36 2026 +0800 irqchip/mst-intc: Validate the DT interrupt range [ Upstream commit 16f25d326e5d3b9fd51bc5e3916ecbffbca63e7b ] The driver takes an inclusive interrupt range from the device tree without checking its endpoints. A reversed range wraps the unsigned count calculation, and a range larger than MST_INTC_MAX_IRQS exceeds the controller capacity used by the driver. Reject these ranges before calculating nr_irqs or creating the domain. Check the difference after ordering the endpoints so the validation itself cannot wrap. The issue was found by our static-analysis tool. Fixes: ad4c938c92af ("irqchip/irq-mst: Add MStar interrupt controller support") Signed-off-by: Pengpeng Hou Signed-off-by: Thomas Gleixner Assisted-by: gpt 5 Reviewed-by: Radu Rendec Link: https://patch.msgid.link/20260920034236.16229-1-hppiscas@163.com Signed-off-by: Sasha Levin commit 691dc59bc82a2fa2b0b2517617e7b6784d7d6b8b Author: Arnd Bergmann Date: Tue Sep 15 21:59:27 2026 +0200 irqchip/qcom-pdc: Fix linking against QCOM_SCM firmware [ Upstream commit 8e6b8708f925b015e2af4d77757c2fbee7da6ec8 ] Build testing with SCM disabled or in a loadable module fails with a link error: s390-linux-ld: drivers/irqchip/qcom-pdc.o: in function `qcom_pdc_probe': qcom-pdc.c:(.text+0x18b8): undefined reference to `qcom_scm_is_available' qcom-pdc.c:(.text+0x18ce): undefined reference to `qcom_scm_io_writel' As QCOM_SCM can already be enabled for compile testing on non-qualcomm machines, but is always enabled on Qualcomm Arm kernels, use that as the Kconfig dependency and remove the ||COMPILE_TEST check. Fixes: 1b852de05f74 ("irqchip/qcom: Enable compile testing for QCOM_PDC and QCOM_MPM") Fixes: ad01c2b2f291 ("irqchip/qcom-pdc: Configure PDC to pass through mode") Signed-off-by: Arnd Bergmann Signed-off-by: Thomas Gleixner Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260915195948.3521662-1-arnd@kernel.org Signed-off-by: Sasha Levin commit 562212e0bb1d3aa2217257b483307cb2a705043f Author: Krzysztof Kozlowski Date: Mon Jul 27 22:01:20 2026 +0200 irqchip/qcom: Enable compile testing for QCOM_PDC and QCOM_MPM [ Upstream commit 1b852de05f74cfc96c58caad9df4cc1fa2dc7689 ] QCOM_PDC and QCOM_MPM do not reference any architecture code, thus should be compile-testable. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260727-irqchip-qcom-defaults-v2-1-466f3c407937@oss.qualcomm.com Stable-dep-of: 8e6b8708f925 ("irqchip/qcom-pdc: Fix linking against QCOM_SCM firmware") Signed-off-by: Sasha Levin commit cd5b8312ab2d3daac14957d6b167cd6242da8745 Author: Fuad Tabba Date: Tue Sep 8 15:26:32 2026 +0100 irqchip/gic-v3-its: Clear vpt_page after freeing the pending table [ Upstream commit 0d604b1e4617d18dbb5573290ba447d7369251d1 ] its_vpe_teardown() frees vpt_page without clearing it, so its vpt_page == NULL guard only holds the first time it runs on a vPE. struct its_vpe outlives a failed KVM_DEV_ARM_VGIC_CTRL_INIT, so a retry that fails again frees the pending table and the vPE ID a second time. Fixes: 325ff3e78c64c ("irqchip/gic-v3-its: Prevent leak in its_vpe_irq_domain_alloc()") Signed-off-by: Fuad Tabba Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Reviewed-by: Zenghui Yu (Huawei) Reviewed-by: Radu Rendec Link: https://patch.msgid.link/20260908142632.2795308-4-fuad.tabba@linux.dev Signed-off-by: Sasha Levin commit f5f360bdcbe214133a710e4be55df1fe76ed2c5a Author: Fuad Tabba Date: Tue Sep 8 15:26:30 2026 +0100 irqchip/gic-v3: Release the partition node in gic_irq_get_fwspec_info() [ Upstream commit 0773b76611e9c596c825076d422d372697da9940 ] gic_irq_get_fwspec_info() never puts the node it takes from of_find_node_by_phandle(), so every lookup from a four-cell PPI or EPPI specifier naming a partition leaks one. The node is only used for the comparison against gic_data.parts[], and the mask returned points into gic_data, so it can go out of scope with the lookup. Fixes: 68905ea65ceff ("irqchip/gic-v3: Add FW info retrieval support") Signed-off-by: Fuad Tabba Signed-off-by: Thomas Gleixner Reviewed-by: Marc Zyngier Reviewed-by: Zenghui Yu (Huawei) Reviewed-by: Radu Rendec Link: https://patch.msgid.link/20260908142632.2795308-2-fuad.tabba@linux.dev Signed-off-by: Sasha Levin commit 70c1628172bcbdfedeeb671929c7e64050a33ec2 Author: David Howells Date: Tue Oct 6 14:29:59 2026 +0100 rxrpc: Fix sendmsg length [ Upstream commit ef369cacbd524931199078427ae152c63a826189 ] rxrpc_send_data() is given two data lengths (len and msg->msg_iter.count) and is inconsistent about how it uses them. Fix this by using len in preference to msg->msg_iter.count. Also limit the amount copied to either len or msg->msg_iter.count, whichever is smaller. Note that, currently, all the callers have len and msg->msg_iter.count the same and so the problem won't occur. This is a prerequisite for another patch that fixes the handling of encryption errors. Fixes: 382d7974de31 ("RxRPC: Use iov_iter_count() in rxrpc_send_data() instead of the len argument") Signed-off-by: David Howells cc: Marc Dionne cc: Jeffrey Altman cc: Eric Dumazet cc: "David S. Miller" cc: Jakub Kicinski cc: Paolo Abeni cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20261006133011.531806-8-dhowells@redhat.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit c2ee65baacc28232edd42bf2d9acdad4b226065d Author: David Howells Date: Tue Oct 6 14:29:58 2026 +0100 rxrpc: Fix aborting in rxperf test server [ Upstream commit 7f15923909866e76608ea6474368570938e783fc ] Fix rxperf_process_call() to always abort if it gets a send error rather than only aborting on ENOMEM. Fixes: 75bfdbf2fca3 ("rxrpc: Implement an in-kernel rxperf server for testing purposes") Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260824091645.415423-1-dhowells%40redhat.com Signed-off-by: David Howells cc: Marc Dionne cc: Eric Dumazet cc: "David S. Miller" cc: Jakub Kicinski cc: Paolo Abeni cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20261006133011.531806-7-dhowells@redhat.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 59cd48358200f347f6d95d969458e2a5b373367d Author: David Howells Date: Tue Oct 6 14:29:54 2026 +0100 rxrpc: Fix rxperf test rxgk key kvno to be 0 [ Upstream commit a7c8c3ab072375fc667ee294b58bcb9071d6e3ca ] Fix the test rxgk keys in the rxperf test server to have kvno 0 to match other implementations. Fixes: aa2199088a39 ("rxrpc: rxperf: Add test RxGK server keys") Signed-off-by: David Howells cc: Marc Dionne cc: Jeffrey Altman cc: Eric Dumazet cc: "David S. Miller" cc: Jakub Kicinski cc: Paolo Abeni cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20261006133011.531806-3-dhowells@redhat.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 5a9800b280a4dcd30a5cfec1755cab84435363ce Author: David Howells Date: Tue Oct 6 14:29:53 2026 +0100 rxrpc: Revert "rxrpc: rxperf: Fix missing decoding of terminal magic cookie" [ Upstream commit 870143cfdac1cad166d1dc03fbef915fac0c229a ] Revert commit c34d999ca3145d9fe858258cc3342ec493f47d2e: The rxperf RPCs seem to have a magic cookie at the end of the request that was failing to be taken account of by the unmarshalling of the request. Fix the rxperf code to expect this. Actually, this isn't true; it's just that other Rx implementations ignore the extra data in the request and so my test programs are sending too much data without noticeable consequence. Fixes: c34d999ca314 ("rxrpc: rxperf: Fix missing decoding of terminal magic cookie") Signed-off-by: David Howells cc: Marc Dionne cc: Eric Dumazet cc: "David S. Miller" cc: Jakub Kicinski cc: Paolo Abeni cc: Simon Horman cc: linux-afs@lists.infradead.org Link: https://patch.msgid.link/20261006133011.531806-2-dhowells@redhat.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 8ec0959e9332b90b66af715ed43c1a7bf9f9046c Author: Carolina Jubran Date: Wed Oct 14 13:47:04 2026 +0300 IB/IPoIB: Cancel normal flush work on device stop [ Upstream commit 66196a559be5963b1ced18418c876caf9bfb76e6 ] ipoib_ib_dev_flush_normal() can race with ipoib_stop() because the normal flush work does not run under RTNL. Before commit a77a57a1a22a ("IPoIB: Fix deadlock on RTNL in ipoib_stop()"), ipoib_stop() flushed ipoib_workqueue after clearing IPOIB_FLAG_ADMIN_UP and before calling ipoib_ib_dev_down(). This ensured that any in-flight flush work completed before ipoib_ib_dev_down() performed the final clear of IPOIB_FLAG_OPER_UP. After that commit removed the workqueue flush to avoid a deadlock with workqueue tasks taking RTNL, a normal flush can continue running concurrently with ipoib_stop() after IPOIB_FLAG_ADMIN_UP has been cleared. The flush may observe IPOIB_FLAG_ADMIN_UP set and continue running while ipoib_stop() clears IPOIB_FLAG_ADMIN_UP and brings the device down. The flush can then call ipoib_ib_dev_up() and set IPOIB_FLAG_OPER_UP again after the device has already been stopped: flush_normal (ipoib_workqueue) ipoib_stop() (RTNL held) ------------------------------ ------------------------ test_bit(ADMIN_UP) == 1 clear_bit(ADMIN_UP) ipoib_ib_dev_down() clear_bit(OPER_UP) ipoib_ib_dev_up() set_bit(OPER_UP) This leaves the interface with ADMIN_UP clear and OPER_UP set. During device removal, ipoib_ndo_uninit() waits in destroy_workqueue() while holding RTNL, while ipoib_mcast_carrier_on_task() may keep retrying rtnl_trylock() as long as OPER_UP remains set, resulting in a deadlock. Cancel the normal flush work from ipoib_stop() after clearing IPOIB_FLAG_ADMIN_UP and before bringing the device down. A pending normal flush is canceled, while an already running flush is allowed to finish before ipoib_ib_dev_down() performs the final transition to OPER_UP clear. Only the normal flush needs this synchronization. The heavy flush is already serialized with ipoib_stop() by RTNL, while the light flush does not bring the device back up and therefore cannot recreate this race. Fixes: a77a57a1a22a ("IPoIB: Fix deadlock on RTNL in ipoib_stop()") Reported-by: John Popplewell Signed-off-by: Carolina Jubran Reviewed-by: Cosmin Ratiu Signed-off-by: Edward Srouji Link: https://patch.msgid.link/20261014-ipoib-cancel-work-v1-1-6c0faac016b8@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 8277f6db255e1d4f51225d3e517902a80fe6727a Author: Jiayuan Chen Date: Fri Oct 9 12:04:11 2026 +0800 veth: clear rx queue hint in veth_xmit [ Upstream commit 1b1c0e87cfe78d731bbab99c9c018655980b6790 ] With more tx queues on one end of a veth pair than rx queues on the other, and RPS or generic XDP enabled on the receiving end, we get: veth1 received packet on queue 2, but number of RX queues is 2 WARNING: net/core/dev.c:5212 at get_rps_cpu+0x560/0x1360 Call Trace: netif_rx_internal+0x1af/0x4c0 __netif_rx+0x99/0x350 veth_xmit+0x713/0xca0 dev_hard_start_xmit+0x166/0x5f0 __dev_queue_xmit+0x1797/0x42d0 ip_finish_output2+0xa34/0x1f40 __ip_finish_output+0x510/0x7e0 ip_finish_output+0x2f/0x320 ip_output+0x17a/0x3f0 ip_send_skb+0x1bc/0x220 ...... Easy to hit with "ethtool -L veth0 tx 4", "ethtool -L veth1 rx 2", rps_cpus set on veth1 and a few flows sent over the pair [1]. veth_xmit() uses skb->queue_mapping to pick the peer rq, but never clears it before veth_forward_skb(), so the rx side still sees the tx queue index. Everything on the rx side that goes through skb_get_rx_queue(), like get_rps_cpu() and netif_get_rxqueue() for generic XDP, takes it as a recorded rx queue and warns once it is out of range. Clear it before handing the skb to the peer: - It is the tx queue index of this device, it says nothing about the rx queue of the peer. - The two sides don't even agree on the encoding. The tx side stores the index as is, the rx side stores index + 1 so that 0 can mean "not recorded". So tx queue k is read back as rx queue k - 1, and tx queue 0 as "not recorded". - Commit 710ad98c363a ("veth: Do not record rx queue hint in veth_xmit") already decided that veth should not pass any queue hint to the peer. There is no tx->rx queue mapping to preserve, so nothing is lost by clearing it. On NETDEV_TX_BUSY the skb goes back to the qdisc, which looks up the txq from skb->queue_mapping to decide when to retry, so restore it there, next to the existing __skb_push(). [1]: https://lore.kernel.org/netdev/156834bb-8e40-496e-9443-9d515fa18eab@linux.dev/ Fixes: 76ff5cc91935 ("rtnl: allow to specify number of rx and tx queues on device creation") Signed-off-by: Jiayuan Chen Reviewed-by: Björn Töpel Reviewed-by: Toshiaki Makita Reviewed-by: Lorenzo Bianconi Link: https://patch.msgid.link/20261009040412.14571-1-jiayuan.chen@linux.dev Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 371d5bf6d851c066eff6b0e975eab83f6e048636 Author: Qiliang Yuan Date: Thu Oct 8 22:03:47 2026 +0800 selftests/bpf: Expect at least one tp_recursion miss in missed [ Upstream commit a5e144985d6855c84b56ea5443fd6333490ce8ec ] missed_tp_recursion attaches its tp programs to bpf_trace_printk and expects each of them to miss exactly one run, the one that its kprobe program on bpf_fentry_test1 triggers by calling bpf_printk(). The test is not serial, so tests running in parallel can add misses to the tp programs while they are attached: - The kprobe on bpf_fentry_test1 is global. Any other test that does bpf_prog_test_run() on a fentry/fexit program calls bpf_fentry_test1() and thereby fires the kprobe program, which calls bpf_printk() from kprobe context and makes the tp programs fail the bpf_prog_active check once more. - Any other program that runs under the bpf_prog_active check, such as a kprobe program or the perf event tracepoint program in legacy_printk, and calls bpf_printk() hits bpf_trace_printk the same way. Either way, test2_recursion_misses comes out as 2 instead of 1. Expect at least one miss, as missed_kprobe_recursion does since commit 08a7078feacf ("selftests/bpf: Improve missed_kprobe_recursion test robustness"). Fixes: 85981e0f9e9f ("selftests/bpf: Add test for recursion counts of perf event link tracepoint") Signed-off-by: Qiliang Yuan Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261008-selftests-bpf-missed-tp-recursion-v1-1-0dd60471d655@gmail.com Signed-off-by: Sasha Levin commit 7d624f27f755249c5c06a66ea188af88b2cc9b08 Author: Qiliang Yuan Date: Thu Oct 8 22:03:25 2026 +0800 selftests/bpf: Report a failure to register the session key in test_progs [ Upstream commit 66fd5eb9da12ef4ed089ed1974160d07ff034a19 ] test_progs adds the key that verifies signed programs to the session keyring before it runs any test, and exits when that fails. It exits with 255 without printing anything. pam_keyinit revokes the session keyring on logout, so a test_progs started in the background from an ssh session that has been closed since leaves nothing but an empty log behind, with no hint of what went wrong. Print the error before exiting. Fixes: b720903e2b14 ("selftests/bpf: Enable signature verification for some lskel tests") Signed-off-by: Qiliang Yuan Signed-off-by: Daniel Borkmann Acked-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20261008-selftests-bpf-test-progs-session-key-v1-1-ec48e793639b@gmail.com Signed-off-by: Sasha Levin commit c32d3dd6ed5ae646334d78111604fc607c72c7a8 Author: Qiliang Yuan Date: Thu Oct 8 22:02:39 2026 +0800 selftests/bpf: Use its own netns in flow_dissector_skb_less_direct_attach [ Upstream commit 76c1913f311f32971dc2c3e106e285bd63c1804d ] test_flow_dissector_skb_less_direct_attach() and test_flow_dissector_skb_less_indirect_attach() each create a netns to run in, and test_progs may run the two at the same time. Both name their netns flow_dissector_skb_less_indirect_attach_ns. When the two tests overlap, one of them fails to create or open the netns, or loses it to the cleanup of the other one. Name the netns of the direct attach test after that test. Fixes: 2b044dd186f0 ("selftests/bpf: re-split main function into dedicated tests") Signed-off-by: Qiliang Yuan Signed-off-by: Daniel Borkmann Reviewed-by: Alexis Lothoré (eBPF Foundation) Link: https://lore.kernel.org/bpf/20261008-selftests-bpf-flow-dissector-netns-v1-1-5d9889aaad84@gmail.com Signed-off-by: Sasha Levin commit 5164aa3acb6537be6bd278f1fc143070bc659415 Author: Niklas Cassel Date: Tue Oct 13 21:39:16 2026 +0200 ata: libata-core: Fix NO_FUA quirks shadowed by earlier quirk entries [ Upstream commit 4153718a215eeb5bab3df50417bbd9602e84658c ] ata_dev_quirks() uses the first entry in __ata_dev_quirks[] that matches the device and ignores all later entries. Commit 38d431229bfb ("ata: libata: exclude FUA support for known buggy drives") appended three ATA_QUIRK_NO_FUA entries to the end of the table, with model patterns meant to cover whole product lines. Earlier entries already match some or all of these drives, so NO_FUA is not always applied: - "INTEL*SSDSC2CT*" never takes effect. Every model it matches also matches the earlier "INTEL*SSD*" entry, so these drives only get ATA_QUIRK_ZERO_AFTER_TRIM. - "WDC*WD2500J*" does not take effect for "WDC WD2500JD-*" drives, which match the earlier ATA_QUIRK_WD_BROKEN_LPM entry. - "OCZ-VERTEX*" does not take effect for "OCZ-VERTEX" drives with firmware "1.30", which match the earlier ATA_QUIRK_BROKEN_HPA entry. Move the Intel entry in front of "INTEL*SSD*" and keep ATA_QUIRK_ZERO_AFTER_TRIM in it, so these drives stay on the ZERO_AFTER_TRIM whitelist. Add ATA_QUIRK_NO_FUA to the WD2500JD and OCZ Vertex 1.30 entries. The quirks of all other drives are unchanged. libata only uses FUA when it is enabled with libata.fua=1, so systems using the default setting are not affected. Fixes: 38d431229bfb ("ata: libata: exclude FUA support for known buggy drives") Assisted-by: LLM Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20261013193915.174460-2-cassel@kernel.org Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit c0266be66c208b9eb451793c41f24ebe00691faf Author: Sagi Maimon Date: Wed Oct 7 06:46:20 2026 +0300 net: axienet: free outstanding TX buffers in axienet_dma_bd_release() [ Upstream commit 0c20cb4cfb40cf270d6c4c2c2ff5e5d72322644a ] axienet_dma_bd_release() walks the RX ring to unmap and free every receive buffer before releasing it, but frees the TX descriptor ring with dma_free_coherent() alone. Any descriptor that axienet_free_tx_chain() had not yet reclaimed still holds its skb and its streaming DMA mapping, and both are lost. axienet_stop() disables TX NAPI and stops the DMA engine before calling it, so nothing reclaims those descriptors afterwards. Bringing the interface down while frames are in flight therefore leaks up to lp->tx_bd_num skbs and mappings each time. axienet_dma_err_handler() already walks the TX ring this way before it restarts the DMA engine: it unmaps every descriptor whose cntrl is still set - axienet_free_tx_chain() clears it on reclaim - frees any skb still attached, and clears the descriptor. Move that loop into a helper, axienet_free_tx_bufs(), and call it from axienet_dma_bd_release() too. This relies on axienet_stop() having stopped the DMA engine first, as the RX walk in the same function already does. The helper frees the skbs with dev_kfree_skb_any(), as drops: in the error handler, which runs from a workqueue, that frees them directly rather than deferring them to softirq as dev_kfree_skb_irq() did. The walk must not run on a ring that is not there. axienet_open() does not check the result of the reset that runs axienet_dma_bd_init(), so when that reset fails tx_bd_v is either still NULL or, after an earlier close, points at the ring that close freed. Clear tx_bd_v and rx_bd_v once their rings are freed, and skip the walk when tx_bd_v is NULL. That also ends the second dma_free_coherent() of a stale ring which the same path already did. On the axienet_dma_bd_init() error path the TX ring has just been allocated zeroed, so the walk does nothing. This was reported by the Sashiko AI review bot. Tested on the AXI Ethernet MAC of an ADVA TimeCard X2 (PCIe card, with the built-in AXI DMA): traffic passes, and after each of ten down/up cycles and five module reloads, all made with traffic running and each running axienet_dma_bd_release(), traffic resumes and nothing is logged. The leak itself was not measured, and neither the failed-reset paths nor axienet_dma_err_handler() were exercised. Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver") Reviewed-by: Joe Damato Assisted-by: LLM sparse Signed-off-by: Sagi Maimon Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261007034620.1360542-1-maimon.sagi@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 6cb1e1d8b2c08050194394149d79ca72b4e9c1e0 Author: Kyrylo Biryuk Date: Mon Oct 12 12:39:17 2026 +0200 ata: libahci: re-enable FBS after error handling on a port multiplier [ Upstream commit 23eab9e877497397a0e2394ee9174d576816209e ] ahci_do_softreset() disables FBS before resetting a device behind a port multiplier, as required by AHCI 1.2 section 9.3.9, and re-enables it only when that softreset succeeds. If it fails, for example because a hot-plugged drive is still spinning up ("softreset failed (device not ready)"), EH escalates to a hardreset of the PMP link, and nothing turns FBS back on: only ahci_pmp_attach() does, which runs at the next boot. The port keeps working with command-based switching until then. Seen on a Marvell 88SE9235 (1b4b:9235) with Marvell 88SM9705 port multipliers (1b4b:9705, in a Synology DX1222 expansion unit): after hot-plugging a drive, the kernel logged "FBS is disabled" followed by "softreset failed (device not ready)" and a PMP hardreset, and never "FBS is enabled" again (twice, on two different ports). At the end of ahci_error_handler(), re-enable FBS if a PMP is still attached and FBS is supported but disabled. Fixes: 89dafa20f3da ("ahci: disabled FBS prior to issuing software reset") Assisted-by: LLM Signed-off-by: Kyrylo Biryuk Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20261012103917.389-1-illofspeed@gmail.com Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit 51fa67dbb9ba53b22bceb023e4e2d74c48d8dda9 Author: Miguel Ojeda Date: Tue Oct 13 20:48:07 2026 +0200 rust: zerocopy: fix link to upstream `README.md` [ Upstream commit d61be5c960e4b89b2e6fa8cedc1d9aa64401ae13 ] Upstream moved the `zerocopy` crate into a `zerocopy/` subdirectory of their repository in v0.8.51 [1]. However, in our v0.8.52 update, the link was not updated. Fix it by adding the subdirectory. Fixes: 2808a3963988 ("rust: zerocopy: update to v0.8.52") Link: https://github.com/google/zerocopy/pull/3434 [1] Assisted-by: LLM Reviewed-by: Alice Ryhl Link: https://patch.msgid.link/20261013184809.35143-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin commit 97e18bf5c2128a0cca0b98e229c1efd3b819112c Author: Sasha Levin Date: Wed Oct 14 16:01:35 2026 -0400 selftests/exec: report the skipped binfmt_misc_bpf test on stderr [ Upstream commit b36b990c50b1f581b9a7f35ae256f5542415fa69 ] The exec Makefile announces that binfmt_misc_bpf is skipped with $(info), which writes to standard output whenever the Makefile is parsed. The selftests install target appends the standard output of "make -s emit_tests" to kselftest-list.txt, so on systems without the BPF toolchain the runlist gains a line that is not a test entry: exec selftests: skipping binfmt_misc_bpf, needs clang, bpftool, ... run_kselftest.sh and CI systems that parse the runlist then treat it as a malformed test entry. Use $(warning) so that the notice still appears in build logs but goes to standard error. Fixes: 277d787feb2e ("selftests/exec: add binfmt_misc bpf-backed handler test") Signed-off-by: Sasha Levin Link: https://patch.msgid.link/20261014200135.1364053-1-sashal@kernel.org Signed-off-by: Kees Cook Signed-off-by: Sasha Levin commit 7a30af08e6a41a5b28e94c428a782e1d6ea368a5 Author: Long Zhao Date: Wed Oct 14 01:46:00 2026 +0800 dt-bindings: vendor-prefixes: add Ambarella [ Upstream commit 5ef299ffb56531b3a4f2b311000da76beed403ee ] Document the Ambarella, Inc. vendor prefix so Ambarella DT bindings can be applied without waiting for the SoC series. Signed-off-by: Long Zhao Acked-by: Krzysztof Kozlowski Reviewed-by: Linus Walleij Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20261014-cv75-prefix-v1-1-fe95ed567880@ambarella.com Signed-off-by: Rob Herring (Arm) Signed-off-by: Sasha Levin commit 9ae851496e93daa4a70972a76ae5770bbf15982d Author: Wentao Liang Date: Thu Sep 17 15:50:37 2026 +0000 spmi: mtk-pmif: Fix clock reference leak in mtk_spmi_bus_probe() [ Upstream commit 636c4c026f47f0a7a009b1e39e310afca640a047 ] of_clk_get_by_name() returns a reference that must be released with clk_put(). If the lookup of a later clock fails, the function returns without releasing the clocks that were already obtained. Put those clocks before returning. Fixes: 078117963b2c ("spmi: mtk-pmif: Add multi-bus support for SPMI 2.0") Signed-off-by: Wentao Liang Reviewed-by: Abel Vesa Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin commit bf43da987f0428df4dd3eaf2e06791d295f97fee Author: AngeloGioacchino Del Regno Date: Wed Jul 1 14:19:08 2026 +0200 spmi: mtk-pmif: Add workaround for FSM lockup/error in read operation [ Upstream commit 84c72fc05f73df3473b3bfac89c0a7eae765513a ] The SPMI PMIF in some SoCs like MT8196 is affected by a hardware issue that makes the first read operation on each SID to fail as the FSM locks up after sending the read command, and this happens at least in the following conditions: - At boot, after bootloader handoff; and - At every suspend->resume cycle. This critical bug may produce unwanted issues in regulator drivers which may fail to set voltages, making the platform to end up in a undervoltage or, a bit more critically, an overvoltage condition, producing instability or ... worse. In order to work around this issue, add a retry mechanism into the pmif_spmi_read_cmd() callback which will resend the read command up to 3 times in the following conditions: - Software Interface returns an error; or - Software Interface never gets in WFVLDCLR state. As to avoid uselessly blocking for too much time, only during the read-retry loop, the maximum SWINF polling time for each trial is reduced to PMIF_TIMEOUT_US / 2: this was tested on multiple SoCs and seems to always be enough, as when any read succeeds it will always take less than 40ms. In any case, this is still allowing 1.5 times the previous maximum polling time, reaching a total maximum (for 3 retries) of 150ms. Worst case testing that I performed saw a third retry only 3 times out of ~100 reboots. Fixes: 1f5be2d7f743 ("spmi: mtk-pmif: Add support for MT8196 SPMI Controller") Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin commit 8708e502bfd8756732647d0dc3569b12f86943f9 Author: Fenglin Wu Date: Mon Jun 8 18:00:59 2026 -0700 spmi: pmic-arb: return 0 in spmi_pmic_arb_register_buses() on success [ Upstream commit 82f4c1948a4f951d7d501757a31c6a10eccd37ae ] The "ret" could be returned with an uninitialized value. Fix it. Fixes: 979987371739 ("spmi: pmic-arb: Add multi bus support") Signed-off-by: Fenglin Wu Reviewed-by: Konrad Dybcio Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin commit 463fe7e59dd58ea17a8a1b77e4de05cdc69a046e Author: Xingui Yang Date: Fri Oct 9 11:32:38 2026 +0800 scsi: hisi_sas: Fix spinup failure for SAS SSP devices in Active_Wait state [ Upstream commit 92821c2358c78345909889793918af8763808bd4 ] SAS HDDs powered up with RNOT=1 wait in Active_Wait state for a NOTIFY(ENABLE SPINUP) primitive and keep returning NOT_READY with ASC/ASCQ 0x04/0x11, causing endless mid-layer retries and spinup failure. Parse the sense data in the slot completion path and, when LU_NOT_READY_NOTIFY_REQUIRED is returned by a directly-attached SSP device, queue work that sends the primitive from process context (sl_notify_ssp() contains msleep()). The work takes a runtime PM reference with pm_runtime_get_if_active(), pairing with pm_runtime_put_sync() in the work, so the controller stays resumed until the primitive is sent. Fixes: 60b4a5ee9034 ("scsi: hisi_sas: add v3 cq interrupt handler") Signed-off-by: Xingui Yang Link: https://patch.msgid.link/20261009033238.1076098-5-yangxingui@huawei.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit d68d790f2cca186c5ab3e0d17d30bf5df0fe0f98 Author: Xingui Yang Date: Fri Oct 9 11:32:36 2026 +0800 scsi: hisi_sas: Fix incorrect delay values from magic-number cleanup [ Upstream commit 7307109c92f702434669bfcd29fb8058ccc07b45 ] Commit 4ca7fe99fc84 ("scsi: hisi_sas: Use macro instead of magic number") replaced several delay constants with a single macro of value 100. However, three sites originally used different values: - reset_hw_v3_hw: udelay(50) -> udelay(100) [doubled] - disable_phy_v3_hw: mdelay(50) -> mdelay(100) [doubled] - disable_host_v3_hw: mdelay(10) -> mdelay(100) [10x longer] The overly long delays on the PHY disable and host shutdown paths increase boot and shutdown time for all local PHYs. Add separate macros for each delay to restore the original values while still avoiding magic numbers. Fixes: 4ca7fe99fc84 ("scsi: hisi_sas: Use macro instead of magic number") Signed-off-by: Xingui Yang Link: https://patch.msgid.link/20261009033238.1076098-3-yangxingui@huawei.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit b4ca06b7610047d8f12419c75a5a6c50391dfb2f Author: Xingui Yang Date: Fri Oct 9 11:32:35 2026 +0800 scsi: libsas: Fix out-of-bounds memcpy() in sas_ssp_task_response() [ Upstream commit 4d7f9c3fdce773f6c69d17c1d4a05bd5e17f4b99 ] The min_t(int, ...) clamp of the device-provided sense_data_len turns negative for values >= 0x80000000 and is then used as the memcpy() length, reading and writing out of bounds. Compare as u32 instead. Well-formed responses are unaffected. Fixes: 366ca51f30de ("[SCSI] libsas: abstract STP task status into a function") Signed-off-by: Xingui Yang Link: https://patch.msgid.link/20261009033238.1076098-2-yangxingui@huawei.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 278b3f98d1f8490c195fc802d99dad517c97520c Author: Donggeun Yoo Date: Tue Sep 29 12:14:02 2026 +0900 iommufd: Keep reserved IOVA ranges when a replace within one IOAS fails [ Upstream commit 1e67cca28490f897788c128c650a6f2cbb565403 ] iommufd_device_do_replace() installs the group's reserved IOVA ranges in the new hwpt's IOAS only when it differs from the old hwpt's IOAS. If the replace fails in iommufd_device_do_replace() or iommufd_group_do_replace_reserved_iova(), the error paths remove the ranges from the new hwpt's IOAS whether or not the IOAS is shared between the old and new hwpt, which removes the ranges that the old hwpt still needs. For example, on x86 with intel-iommu, after a replace within a shared IOAS fails with -ENODEV, IOMMU_IOAS_IOVA_RANGES goes from 0x0-0xfedfffff 0xfef00000-0xffffffffffff to 0x0-0xffffffffffff and IOMMU_IOAS_MAP at 0xfee00000 succeeds. Remove the ranges on failure only when the replace installed them, and look up the old hwpt_paging before the replace so that the error path can compare the IOAS. Fixes: e88d4ec154a8 ("iommufd: Add iommufd_device_replace()") Assisted-by: LLM Signed-off-by: Donggeun Yoo Link: https://patch.msgid.link/20260929031402.1998253-1-donggeunyoo.kernel@gmail.com Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin commit 2fea91a1249707c3f94b6ffab7ef5da877173f56 Author: Petr Pavlu Date: Thu Oct 8 17:03:08 2026 +0200 resolve_btfids: Fix the --fatal_warnings exit status [ Upstream commit 201a454df948021916e051b0a84a674f4f0f9671 ] The resolve_btfids --fatal_warnings option is intended to make the tool exit with a non-zero status if any warnings are reported. main() initializes err to -1 and uses 'goto out' to return this status when a sub-operation fails. If no error occurs, 'if (!(fatal_warnings && warnings)) err = 0;' modifies the final status depending on whether any warnings have been reported. Commit 522397d05e7d ("resolve_btfids: Change in-place update with raw binary output") broke this logic by assigning the return values of newly added sub-operations to err. As a result, successful sub-operations overwrite the initial err value of -1 with 0, causing the tool to exit successfully even when --fatal_warnings is enabled and warnings have been reported. Fix the issue by setting the final value of err unconditionally, so the code doesn't depend on its previous value. Fixes: 522397d05e7d ("resolve_btfids: Change in-place update with raw binary output") Signed-off-by: Petr Pavlu Signed-off-by: Daniel Borkmann Acked-by: Ihor Solodrai Link: https://lore.kernel.org/bpf/20261008-resolve_btfids-warnings-v1-1-0d4e613ffa6e@suse.com Signed-off-by: Sasha Levin commit 1c8d266f78d043ab45680d78254da8947c81a3ef Author: Sasha Levin Date: Wed Oct 14 16:01:42 2026 -0400 selftests/nolibc: use the configured kernel header directory [ Upstream commit f9532b372e415e8198287ce010efa22f337857b5 ] The freestanding build hardcodes the source tree's usr/include even when selftests exports KHDR_INCLUDES for an output-directory build. Use the exported header location while preserving -nostdlib, -nostdinc and static linkage. GCC 14 and Clang 21 builds then find the generated UAPI headers. Fixes: eb1353110831 ("selftests/nolibc: integrate with kselftests") Signed-off-by: Sasha Levin Link: https://patch.msgid.link/20261014200142.1364761-1-sashal@kernel.org Signed-off-by: Thomas Weißschuh Signed-off-by: Sasha Levin commit b6f40d7e133dfd30b89aa6f6a5f889a26d443b1d Author: Semih Baskan Date: Tue Oct 13 17:04:21 2026 -0500 PCI: iproc: Use the EROM outbound window on BCMA [ Upstream commit 9850907ee1dd4376c09c4129e0adbe3b39d191b7 ] The PCIe outbound window base on Northstar depends on the PCIe Gen2 core revision. Revision 0x01 uses 0x08000000, 0x40000000 and 0x48000000 for controllers 0 to 2, while revision 0x07 (NS-B0) uses 0x08000000, 0x20000000 and 0x28000000. Broadcom's own driver branches on the core revision for exactly this reason. bcm-ns.dtsi is shared by every Northstar SoC, so it cannot carry a value that is correct on both. Commit 767012397976 ("ARM: dts: BCM5301X: Describe PCIe controllers fully") gave the controllers a ranges property. The commit shipped in v7.1. With that property present, two things go wrong with this driver: 1) devm_pci_alloc_host_bridge() parses those ranges and requests them, then this driver adds its own window and requests the whole list a second time, so every controller fails to probe with -EBUSY. 2) The DT window itself is only correct on core revision 0x07. On revision 0x01 it points at an address the hardware does not decode, and the first MMIO access to a BAR takes an imprecise external abort. The enumeration ROM reports the correct base for the revision actually present, and bcma already provides it as addr_s[0]. To solve 1), use pci_alloc_host_bridge() directly to avoid the request of all the DT resources done in pci_parse_request_of_pci_ranges(). Instead, request the memory window from the EROM. To solve 2), parse the memory resources from DT and emit a warning if it describes a window that doesn't match the window from the EROM. The mismatch means the devicetree describes a window the hardware does not decode, and that should be fixed in the dts rather than ignored silently. The driver is correct whether or not the DT describes a window. The same commit also added compatible = "brcm,iproc-pcie", so these nodes now match pcie-iproc-platform. With CONFIG_PCIE_IPROC_PLATFORM enabled, which is the default on ARCH_BCM_IPROC, that driver binds them first and this driver's probe fails inside devm_pci_alloc_host_bridge(). This commit fixes the configurations where the BCMA driver is the one in use; OpenWrt builds that way, with PCIE_IPROC_PLATFORM disabled. The platform path takes the DT window as-is and has the same wrong address on core revision 0x01, so that side needs a devicetree fix either way. Based on: https://patch.msgid.link/20260807160526.379-1-strst.gs@gmail.com https://patch.msgid.link/20260912043626.437-1-strst.gs@gmail.com Fixes: 767012397976 ("ARM: dts: BCM5301X: Describe PCIe controllers fully") Signed-off-by: Semih Baskan Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Tested-by: Semih Baskan Link: https://patch.msgid.link/20261013220421.1588051-3-bhelgaas@google.com Signed-off-by: Sasha Levin commit 51f25a7029822ef5051d3ac0471e2b496f079909 Author: Bjorn Helgaas Date: Tue Oct 13 17:04:20 2026 -0500 PCI: Expose devm_pci_alloc_host_bridge_release() [ Upstream commit 39d1c645bb99d8bd7e6f5b0183b192f30c88d917 ] devm_pci_alloc_host_bridge() allocates a struct pci_host_bridge and also parses device tree resources and claims them. There are drivers, e.g., pcie-iproc-bcma.c, that need to allocate a pci_host_bridge but do not need device tree resources. Expose devm_pci_alloc_host_bridge_release() so they can avoid the device tree parts by calling pci_alloc_host_bridge() directly and adding the devm release function manually. [bhelgaas: add EXPORT_SYMBOL] Signed-off-by: Bjorn Helgaas Signed-off-by: Manivannan Sadhasivam Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20261013220421.1588051-2-bhelgaas@google.com Signed-off-by: Sasha Levin commit 4d9174cbbf9e4adba869fea851b8ba8be3919ef6 Author: Nicolai Buchwitz Date: Wed Oct 7 20:29:24 2026 +0200 net/mlx5e: use skb_share_check() in the loopback selftest hook [ Upstream commit 16fb7aa6955a0af9f67ca42a61d9be58dfc9382a ] The loopback hook gets a shared skb when another ETH_P_IP handler is bound to the device. skb_linearize() on a non-linear frame then hits BUG_ON(skb_shared()). Call skb_share_check() before linearizing the skb. Fixes: 95b9606b15bb ("net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB") Signed-off-by: Nicolai Buchwitz Reviewed-by: Simon Horman Reviewed-by: Tariq Toukan Link: https://patch.msgid.link/20261007-nb-net-selftest-shared-net-v1-3-458369bfa1ba@tipi-net.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 19efa2f9a92d7a690f9e66d607e0603da1850284 Author: Nicolai Buchwitz Date: Wed Oct 7 20:29:23 2026 +0200 net: stmmac: selftests: use skb_share_check() in the loopback receive hook [ Upstream commit a7a89019bac0e8810bde7f1419f4adf9adc23d41 ] The loopback hook gets a shared skb when another ETH_P_IP handler is bound to the device. skb_unshare() does not unshare it, so skb_linearize() on a non-linear frame hits BUG_ON(skb_shared()). Use skb_share_check() instead. Fixes: 091810dbded9 ("net: stmmac: Introduce selftests support") Signed-off-by: Nicolai Buchwitz Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261007-nb-net-selftest-shared-net-v1-2-458369bfa1ba@tipi-net.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit fdc6ff38fa01006d99083eef94ef0aaf8225473c Author: Nicolai Buchwitz Date: Wed Oct 7 20:29:22 2026 +0200 net: selftests: use skb_share_check() in the loopback receive hook [ Upstream commit fbd3a301b1378423a5cfc23a42e3c0b04e26192c ] The loopback hook gets a shared skb when another ETH_P_IP handler is bound to the device. skb_unshare() does not unshare it, so skb_linearize() on a non-linear frame hits BUG_ON(skb_shared()). Use skb_share_check() instead. Fixes: 3e1e58d64c3d ("net: add generic selftest support") Signed-off-by: Nicolai Buchwitz Reviewed-by: Simon Horman Link: https://patch.msgid.link/20261007-nb-net-selftest-shared-net-v1-1-458369bfa1ba@tipi-net.de Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 4ad5a8a10717b824d8bf9bde20700b605bb25367 Author: Jiale Yao Date: Sat Oct 3 16:08:11 2026 +0800 clocksource/drivers/timer-ti-dm: Handle runtime resume failure [ Upstream commit c40b76c8cf580466d9e56223f7f74beecc165480 ] omap_dm_timer_write_counter() accesses timer registers and updates the saved counter value after requesting a runtime PM reference. If runtime resume fails, the timer remains inaccessible and no reference is acquired, but the function still writes the register, drops a reference, updates the cached value, and reports success. Check the return value and propagate an error before touching the timer state. Fixes: 0494fc345b37 ("clocksource/drivers/timer-ti-dm : Capture functionality for OMAP DM timer") Signed-off-by: Jiale Yao Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20261003080812.429386-1-yaojiale02@163.com Signed-off-by: Sasha Levin commit db917509f5c8bc4c402359e3a1262d6c3cc4ca50 Author: Kyle Pepper Date: Wed Oct 14 05:16:20 2026 +0000 Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs [ Upstream commit 397464709a204da9b8dc3b01d6ea42539d951cd2 ] Restore unfiltered scanning for pending IRK peers when the controller cannot resolve private addresses. Keep accept-list filtering while suspended and when forced by periodic advertising synchronization. Fixes: e209e5ccc5ac ("Bluetooth: MGMT: Mark LL Privacy as stable") Assisted-by: OpenCode:gpt-6.1-sol Signed-off-by: Kyle Pepper Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit a7a472aa371f2550c956cae2f5ec9bb69c90d927 Author: Luiz Augusto von Dentz Date: Tue Oct 13 09:58:32 2026 -0400 Bluetooth: Fix the LE Read Connection Interval response layout [ Upstream commit 5874f8d03268d34189c6c12c56586b64d26a8bcc ] The response to HCI_OP_LE_READ_CONN_INTERVAL carries a Minimum_Supported_Connection_Interval octet between the status and Num_Groups, which was missing from the structure. Without it the minimum interval was read as the number of groups, and every group after it from one octet off. Take the minimum interval used to clamp the default rate parameters from that field rather than the smallest group minimum, as the number of groups can be zero, which left it unset. Fixes: 2f8784cfe8a9 ("Bluetooth: Add support for Shorter Connection Interval (SCI) feature") Assisted-by: OpenCode:claude-opus-5.5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 9c6639a27196d3a6e32f9b4e701dddbb89392ea9 Author: Kevin Dewald Date: Tue Oct 13 00:16:15 2026 -0700 Bluetooth: hci_event: Fix LE link drop on remote features command status [ Upstream commit 91638f53ff2b8234195ff27ec913e068269a28e9 ] When the local controller supports peripheral-initiated features exchange, the LE Read Remote Features procedure also runs for incoming connections, and it fails with Unsupported Remote Feature (0x1a) if the central does not support that feature. hci_le_remote_feat_complete_evt() and hci_le_read_all_remote_features_evt() handle this and let the connection transition into connected state. A controller can also return that error in the Command Status event instead. An Intel controller does so for a central that does not support peripheral-initiated features exchange, presumably because it already has the features of the central. hci_cs_le_read_remote_features() and hci_cs_le_read_all_remote_features() then confirm the connection as failed while it is still in BT_CONFIG, and the hci_conn_drop() in le_read_features_complete() disconnects it right away: > HCI Event: LE Meta Event (0x3e) plen 31 LE Enhanced Connection Complete (0x0a) Status: Success (0x00) Role: Peripheral (0x01) < HCI Command: LE Read Remote Used Features (0x08|0x0016) plen 2 > HCI Event: Command Status (0x0f) plen 4 LE Read Remote Used Features (0x08|0x0016) ncmd 1 Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a) < HCI Command: Disconnect (0x01|0x0006) plen 3 Reason: Remote User Terminated Connection (0x13) Data the central sends afterwards is reported as: Bluetooth: hci0: ACL packet for unknown connection handle 3585 Handle Unsupported Remote Feature in the command status the same way as in the complete events. Fixes: 0fe29fd1cd77 ("Bluetooth: Read LE remote features during connection establishment") Fixes: a106e50be74b ("Bluetooth: HCI: Add support for LL Extended Feature Set") Assisted-by: Claude:claude-opus-5.5 Signed-off-by: Kevin Dewald Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit ecb8d7b6011a409750217e6045803c1413ee6822 Author: Cen Zhang Date: Mon Oct 12 10:48:06 2026 +0800 Bluetooth: MSFT: Serialize handle map cleanup with event processing [ Upstream commit 56e20c3d8ad340bbfc90221c4aae1c870485fb57 ] MSFT monitor handle mappings must remain valid while vendor events look up and use them under hdev->lock. msft_do_close() removes and frees the mappings without that lock. hci_dev_close_sync() clears HCI_UP and drains the RX workqueue before MSFT cleanup. However, a transport callback that already passed hci_recv_frame()'s state check can queue a vendor event after the drain returns, if no earlier shutdown callback has quiesced reception. The driver close callback runs after MSFT cleanup, so event processing can overlap the unlocked removal. msft_monitor_device_evt() can then traverse freed list entries or read handle_data->mgmt_handle after it is freed. Take hdev->lock while resetting monitor states and removing handle mappings in msft_do_close(), as normal monitor cancellation already does. An active event reader then finishes before its mapping is freed, and later lookups see an empty handle map. An instrumented kernel produced this KASAN report (timestamps removed and unrelated frames omitted): BUG: KASAN: slab-use-after-free in msft_vendor_evt+0x1906/0x1990 Read of size 2 at addr ffff888104df3602 by task kworker/u17:2/502 Workqueue: hci0 hci_rx_work Call Trace: [...] msft_vendor_evt+0x1906/0x1990 hci_vendor_evt+0x6f/0x90 hci_event_packet+0x894/0xc70 [...] hci_rx_work+0x3f8/0xfa0 [...] Allocated by task 499: [...] msft_add_monitor_sync+0x6a8/0x10a0 msft_add_monitor_pattern+0x7f/0xb0 hci_add_adv_monitor+0x1fa/0x2e0 [...] Freed by task 499: [...] kfree+0x307/0x580 msft_do_close+0x238/0x750 hci_dev_close_sync+0x546/0x1380 [...] The buggy address belongs to the object at ffff888104df3600 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 2 bytes inside of freed 32-byte region [ffff888104df3600, ffff888104df3620) [...] Fixes: 145373cb1b1f ("Bluetooth: Add framework for Microsoft vendor extension") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 2c93ccd352b4695d9087efee03492f0beff57275 Author: Luiz Augusto von Dentz Date: Mon Oct 12 11:26:59 2026 -0400 Bluetooth: MGMT: Allow connection rate request as peripheral [ Upstream commit 47493e62e8a8522a250537ed2ce026dd7d9163b1 ] Load Connection Subrate only issues the LE Connection Rate Request when connected as central, but either role can initiate the Connection Rate Update procedure, e.g. a HID device, which is the peripheral, does it once the HID host requests a HID SCI mode with the HID Control Point. Issue it regardless of the role. Fixes: 19129d7037be ("Bluetooth: Add MGMT Load Connection Subrate command") Assisted-by: OpenCode:claude-opus-5.5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit afe9605ff46ba5f5508199a93832b17cc816b94d Author: Kiran K Date: Thu Oct 8 19:36:01 2026 +0530 Bluetooth: btintel: Zero version data before parsing TLVs [ Upstream commit cf87709d7ff83b4de5d42b61e4a9806fe374cb9d ] Firmware may omit optional TLVs, leaving their corresponding fields unset in the caller-supplied struct intel_version_tlv. Since the structure is typically stack-allocated and not cleared beforehand, fields for which no TLV is received retain uninitialized stack memory. This stale data can be logged via btintel_version_info_tlv() and copied back to the caller, leaking kernel stack contents. Clear the structure in btintel_read_version_tlv() before parsing so that fields with no corresponding TLV are deterministically zero instead of containing garbage. Fixes: 57375beef71a ("Bluetooth: btintel: Add infrastructure to read controller information") Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 40441bea279abed2dca12f4876528ae4f0bd1196 Author: Cen Zhang Date: Thu Oct 8 12:18:50 2026 +0800 Bluetooth: hci_sync: Protect IRK identity reads with RCU [ Upstream commit 4b76fa362110cf1b74a0263c14406b71de99894c ] hci_le_set_privacy_mode_sync() needs the IRK returned by hci_find_irk_by_addr() to remain allocated until its identity address and type have been copied into the command. The finder drops its RCU read lock before returning this borrowed pointer, leaving the later field reads unprotected. When a privacy-capable controller has a pending peer with address resolution and device privacy enabled, accept-list programming can reach this helper while management reloads the IRKs. The request worker holds hdev->req_lock, whereas load_irks() takes hdev->lock, allowing the following ordering: Request worker Management / RCU reclaim hci_le_set_privacy_mode_sync() hci_find_irk_by_addr() rcu_read_lock() find matching IRK rcu_read_unlock() return borrowed IRK load_irks() hci_dev_lock(hdev) hci_smp_irks_clear() list_del_rcu() kfree_rcu() hci_dev_unlock(hdev) RCU grace period and IRK free read irk->addr_type copy irk->bdaddr The request then accesses a freed IRK. KASAN reports a one-byte use-after-free read of addr_type on this path. Keep an outer RCU read-side critical section across the lookup and both identity-field copies. The finder's nested unlock then leaves the IRK protected until the caller finishes copying it. Release RCU on a lookup miss and after copying the fields, before the synchronous HCI command can sleep. KASAN report as below: ================================================================== BUG: KASAN: slab-use-after-free in hci_le_add_accept_list_sync+0x90f/0x940 Read of size 1 at addr ffff88810aa6072c by task kworker/u17:0/493 Workqueue: hci0 hci_cmd_sync_work Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? hci_le_add_accept_list_sync+0x90f/0x940 ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? hci_le_add_accept_list_sync+0x90f/0x940 kasan_report+0xe0/0x110 ? hci_le_add_accept_list_sync+0x90f/0x940 hci_le_add_accept_list_sync+0x90f/0x940 ? __pfx_hci_le_add_accept_list_sync+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? conn_params_copy+0x3a0/0x650 hci_passive_scan_sync+0x8c9/0x1e80 ? __pfx_hci_passive_scan_sync+0x10/0x10 ? find_held_lock+0x2b/0x80 ? hci_lookup_le_connect+0x181/0x3c0 ? srso_alias_return_thunk+0x5/0xfbef5 ? find_held_lock+0x2b/0x80 ? hci_update_passive_scan_sync+0x437/0x950 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_release+0xc8/0x280 hci_update_passive_scan_sync+0x461/0x950 hci_cmd_sync_work+0x1b3/0x450 ? srso_alias_return_thunk+0x5/0xfbef5 process_one_work+0x908/0x19c0 ? __pfx_process_one_work+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_is_held_type+0x8f/0x100 ? srso_alias_return_thunk+0x5/0xfbef5 worker_thread+0x65c/0xe40 ? __pfx_worker_thread+0x10/0x10 kthread+0x34f/0x460 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x659/0x940 ? __pfx_ret_from_fork+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? __switch_to+0x74f/0xf80 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Allocated by task 507: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_cache_noprof+0x251/0x610 hci_add_irk+0xb6/0x220 load_irks+0x5ef/0x7e0 hci_sock_sendmsg+0x128b/0x22e0 __sys_sendto+0x425/0x470 __x64_sys_sendto+0xe5/0x1c0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 0: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 __rcu_free_sheaf_prepare+0x65/0x2a0 rcu_free_sheaf+0x1f/0xe0 rcu_core+0x661/0x1d10 handle_softirqs+0x201/0x930 __irq_exit_rcu+0x110/0x1e0 irq_exit_rcu+0xe/0x20 sysvec_apic_timer_interrupt+0x6c/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 The buggy address belongs to the object at ffff88810aa60700 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 44 bytes inside of freed 64-byte region [ffff88810aa60700, ffff88810aa60740) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10aa60 flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff8881000428c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88810aa60600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88810aa60680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff88810aa60700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff88810aa60780: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff88810aa60800: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== Disabling lock debugging due to kernel taint Fixes: adae20cb2d20 ("Bluetooth: Convert IRK list to RCU") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 5ec2ca44bf4925b48604aafa90ad153faf0ce45f Author: Eric Dumazet Date: Fri Oct 9 10:35:25 2026 +0200 Bluetooth: btmtk: fix skb double free on ISO padding failure [ Upstream commit 491d2212ea0f0f6a3abbd67729df0c6a3ec9c58a ] btmtk_isopkt_pad() uses skb_pad(), which frees the skb on failure. The error is propagated by alloc_mtk_intr_urb() and btusb_send_frame_mtk() up to hci_send_frame(), which frees the skb a second time: err = hdev->send(hdev, skb); if (err < 0) { bt_dev_err(hdev, "sending frame failed (%d)", err); kfree_skb(skb); return err; } Use __skb_put_padto(skb, MTK_ISO_THRESHOLD, false) so that the skb is left to the caller on error. This also replaces the open-coded skb_pad() + __skb_put() sequence. Fixes: ceac1cb0259d ("Bluetooth: btusb: mediatek: add ISO data transmission functions") Signed-off-by: Eric Dumazet Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 6c6341939a19a6834989ac0679b978f1cecd07e8 Author: Cen Zhang Date: Thu Oct 8 12:11:35 2026 +0800 Bluetooth: 6lowpan: Drain RCU readers on registration failure [ Upstream commit ebba800d140b580540ad55f670d943e4a7edaffd ] A lowpan_btle_dev is embedded in its net_device allocation and must remain alive until readers of bt_6lowpan_devices have left their RCU sections. setup_netdev() publishes it before registration, but its error path only unlinks it before calling free_netdev(). If a second controller's registration fails while multicast is sent on an existing 6LoWPAN interface, send_mcast_pkt() can already have selected the new entry. It reads entry->netdev before checking which interface owns it. An early failure, such as allocating the device's name node, leaves NETREG_UNINITIALIZED, so free_netdev() releases the storage immediately. The following ordering frees the selected entry before the reader loads its netdev field: Adapter creation (controller B) Multicast on controller A setup_netdev() list_add_rcu() rcu_read_lock() select B's entry lowpan_register_netdev() fails list_del_rcu() free_netdev() read entry->netdev rcu_read_unlock() Removing the list node does not wait for that reader, and devices_lock does not serialize the multicast reader. The subsequent field load is a use-after-free, reported by KASAN in bt_xmit(). Wait for an RCU grace period after dropping devices_lock and before free_netdev(). This keeps the failed adapter allocated until traversals that could have selected it complete. The callback is already sleepable, and the wait happens outside the list spinlock. KASAN report as below: ================================================================== BUG: KASAN: slab-use-after-free in bt_xmit+0x1d06/0x21e0 Read of size 8 at addr ffff88810ef45030 by task python3/556 Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? bt_xmit+0x1d06/0x21e0 ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? bt_xmit+0x1d06/0x21e0 kasan_report+0xe0/0x110 ? bt_xmit+0x1d06/0x21e0 bt_xmit+0x1d06/0x21e0 ? __pfx_bt_xmit+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_acquire+0x17b/0x2f0 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_is_held_type+0x8f/0x100 ? dev_hard_start_xmit+0x187/0x660 ? __pfx_bt_xmit+0x10/0x10 dev_hard_start_xmit+0x187/0x660 sch_direct_xmit+0x153/0x850 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_sch_direct_xmit+0x10/0x10 ? do_raw_spin_lock+0x130/0x270 ? __pfx_do_raw_spin_lock+0x10/0x10 ? lock_is_held_type+0x8f/0x100 __dev_queue_xmit+0x3111/0x3aa0 ? srso_alias_return_thunk+0x5/0xfbef5 ? look_up_lock_class+0x59/0x130 ? register_lock_class+0x41/0x790 ? __pfx___dev_queue_xmit+0x10/0x10 ? __lock_acquire+0x466/0x2260 ? find_held_lock+0x2b/0x80 ? ___neigh_create+0x1690/0x2540 ? __local_bh_enable_ip+0xa6/0x120 ? srso_alias_return_thunk+0x5/0xfbef5 ? lockdep_hardirqs_on_prepare+0xea/0x1a0 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_acquire+0x17b/0x2f0 ? srso_alias_return_thunk+0x5/0xfbef5 ? find_held_lock+0x2b/0x80 ? ip6_finish_output2+0x8be/0x1840 ? srso_alias_return_thunk+0x5/0xfbef5 ? neigh_connected_output+0x39f/0x4e0 ? srso_alias_return_thunk+0x5/0xfbef5 neigh_connected_output+0x33f/0x4e0 ip6_finish_output2+0x8be/0x1840 ip6_finish_output+0x424/0xd50 ip6_output+0x210/0x640 ? __pfx_ip6_mr_output+0x10/0x10 ip6_local_out+0x193/0x1c0 ip6_send_skb+0xfb/0x3e0 udp_v6_send_skb+0x6e1/0x1180 udpv6_sendmsg+0x1f9b/0x2a00 ? get_random_u32+0xaf/0x640 ? __pfx_udpv6_sendmsg+0x10/0x10 ? lock_release+0xc8/0x280 ? srso_alias_return_thunk+0x5/0xfbef5 ? lockdep_hardirqs_on_prepare+0xea/0x1a0 ? srso_alias_return_thunk+0x5/0xfbef5 ? trace_hardirqs_on+0x18/0x160 ? srso_alias_return_thunk+0x5/0xfbef5 ? __local_bh_enable_ip+0xa6/0x120 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_udpv6_sendmsg+0x10/0x10 ? inet6_sendmsg+0xff/0x140 inet6_sendmsg+0xff/0x140 __sys_sendto+0x320/0x470 ? __pfx___sys_sendto+0x10/0x10 ? exc_page_fault+0x5c/0xc0 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_release+0xc8/0x280 ? handle_mm_fault+0x12e/0x580 __x64_sys_sendto+0xe5/0x1c0 ? lockdep_hardirqs_on_prepare+0xea/0x1a0 ? srso_alias_return_thunk+0x5/0xfbef5 ? trace_hardirqs_on+0x18/0x160 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Allocated by task 502: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kvmalloc_node_noprof+0x353/0x930 alloc_netdev_mqs+0xa0/0x1250 chan_ready_cb+0x198/0x1110 l2cap_recv_frame+0x6dc0/0x8830 l2cap_recv_acldata+0xe9f/0x10e0 hci_rx_work+0x5a6/0xf00 process_one_work+0x908/0x19c0 worker_thread+0x65c/0xe40 kthread+0x34f/0x460 ret_from_fork+0x659/0x940 ret_from_fork_asm+0x1a/0x30 Freed by task 502: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x307/0x580 free_netdev+0x6ca/0x8f0 chan_ready_cb+0xd91/0x1110 l2cap_recv_frame+0x6dc0/0x8830 l2cap_recv_acldata+0xe9f/0x10e0 hci_rx_work+0x5a6/0xf00 process_one_work+0x908/0x19c0 worker_thread+0x65c/0xe40 kthread+0x34f/0x460 ret_from_fork+0x659/0x940 ret_from_fork_asm+0x1a/0x30 The buggy address belongs to the object at ffff88810ef44000 which belongs to the cache kmalloc-8k of size 8192 The buggy address is located 4144 bytes inside of freed 8192-byte region [ffff88810ef44000, ffff88810ef46000) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10ef40 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100043180 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 0200000000000040 ffff888100043180 dead000000000100 dead000000000122 head: 0000000000000000 0000000000020002 00000000f5000000 0000000000000000 head: 0200000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffff88810ef41a80 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88810ef44f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810ef44f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88810ef45000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88810ef45080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88810ef45100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Disabling lock debugging due to kernel taint Fixes: 5857d1dbae7d ("Bluetooth: 6lowpan: Fix possible race") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit bd28655ef601711fb541513b6ad809aa7d8ff2a6 Author: Cen Zhang Date: Tue Oct 6 22:41:57 2026 +0800 Bluetooth: msft: Lock failed probe cleanup against feature readers [ Upstream commit 21895f20fedc4504474bcb1022850b532ea4358e ] The MSFT data must remain allocated while msft_get_features() reads its features. read_adv_mon_features() protects that access with hdev->lock, but msft_do_open() clears hdev->msft_data and frees the object without that lock when read_supported_features() fails. After a successful probe, the data survives a normal close. A later open can fail the probe while a management feature request is running. hci_mgmt_cmd() permits requests during HCI_INIT, and the opener's hdev->req_lock does not serialize the management reader: Management feature request HCI open hold hdev->req_lock msft_do_open() hold hdev->lock msft_get_features(): save msft read_supported_features() fails hdev->msft_data = NULL kfree(msft) read msft->features release hdev->lock release hdev->req_lock The saved pointer then refers to freed memory, causing a use-after-free read. Advertisement reporting through mgmt_device_found() also reads the features with hdev->lock held. Take hdev->lock around clearing and freeing msft_data in the failure branch. An existing feature reader finishes before the free, while a reader starting after cleanup sees NULL. Keep the synchronous probe outside this critical section, following the existing req_lock to hdev->lock ordering. KASAN report as below: ================================================================== BUG: KASAN: slab-use-after-free in msft_monitor_supported+0xa9/0xb0 Read of size 8 at addr ffff88811573ee00 by task mgmt-read-adv-m/532 CPU: 2 UID: 0 PID: 532 Comm: mgmt-read-adv-m Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? msft_monitor_supported+0xa9/0xb0 ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? msft_monitor_supported+0xa9/0xb0 kasan_report+0xe0/0x110 ? msft_monitor_supported+0xa9/0xb0 msft_monitor_supported+0xa9/0xb0 read_adv_mon_features+0xdf/0x640 ? trace_hardirqs_on+0x18/0x160 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_read_adv_mon_features+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 ? do_raw_read_unlock+0x49/0xe0 ? srso_alias_return_thunk+0x5/0xfbef5 ? _raw_read_unlock+0x23/0x40 hci_sock_sendmsg+0x12b5/0x2270 ? __pfx_hci_sock_sendmsg+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? selinux_socket_sendmsg+0x160/0x280 __sys_sendto+0x425/0x470 ? __pfx_hci_sock_sendmsg+0x10/0x10 ? __pfx___sys_sendto+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 ? __sys_setsockopt+0x119/0x180 __x64_sys_sendto+0xe5/0x1c0 ? lockdep_hardirqs_on_prepare+0xea/0x1a0 ? srso_alias_return_thunk+0x5/0xfbef5 ? trace_hardirqs_on+0x18/0x160 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f9ceb04a687 Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffe6ab96a70 EFLAGS: 00000202 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 00007f9ceafb8780 RCX: 00007f9ceb04a687 RDX: 0000000000000006 RSI: 00007ffe6ab96aea RDI: 0000000000000003 RBP: 0000000000000002 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000003 R13: 00007ffe6ab96d50 R14: 00007f9ceb1f6000 R15: 00005625e427dd68 Allocated by task 506: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_cache_noprof+0x251/0x610 msft_register+0x54/0x260 hci_register_dev+0x6b7/0xc80 __vhci_create_device+0x330/0x840 vhci_write+0x287/0x440 vfs_write+0x637/0x1010 ksys_write+0x111/0x200 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 529: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x307/0x580 msft_do_open+0x604/0x9e0 hci_dev_open_sync+0x94a/0x2110 hci_dev_do_open+0x2f/0xb0 hci_dev_open+0x17d/0x300 hci_sock_ioctl+0x3c6/0x710 sock_do_ioctl+0x120/0x2b0 sock_ioctl+0x41b/0x670 __x64_sys_ioctl+0x163/0x1d0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88811573ee00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 0 bytes inside of freed 256-byte region [ffff88811573ee00, ffff88811573ef00) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11573e head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000040(head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000040 ffff888100042b40 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000040 ffff888100042b40 dead000000000100 dead000000000122 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 0200000000000001 ffffffffffffff81 00000000ffffffff 00000000ffffffff head: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88811573ed00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88811573ed80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88811573ee00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88811573ee80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88811573ef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Fixes: 5031ffcc79b8 ("Bluetooth: Keep MSFT ext info throughout a hci_dev's life cycle") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit dc3d003daef044bb2b40df7d69a7f84ab5e73e4d Author: Cen Zhang Date: Tue Oct 6 15:24:31 2026 +0800 Bluetooth: MGMT: Reject quality report requests during unregister [ Upstream commit 213e7a99bea19e2f29f394321b86c792eec73a24 ] A quality report request must not call a driver callback after its module text has been released. hci_mgmt_cmd() holds an hci_dev reference through set_exp_feature(), but that reference only preserves the device allocation. set_quality_report_func() takes req_lock and invokes hdev->set_quality_report without checking HCI_UNREGISTER. This is unsafe when a SET_EXP_FEATURE request for an Intel controller would change HCI_QUALITY_REPORT and is delayed before taking req_lock while the controller is removed. With btintel_pcie and btintel built as modules and no other btintel dependents, the following order is possible: Management request Removal and module unload ------------------ ------------------------- hci_mgmt_cmd(): retain hdev hci_unregister_dev(): set HCI_UNREGISTER remove hdev from lookup close under req_lock release req_lock btintel_pcie_remove(): return unload btintel_pcie, then btintel set_quality_report_func(): take req_lock call hdev->set_quality_report When the request resumes after btintel unload, the indirect call targets released module text and can cause an instruction-fetch page fault. The close operation serializes with a running callback but does not prevent a delayed management handler from invoking it afterwards. Check HCI_UNREGISTER immediately after acquiring the existing req_lock and return MGMT_STATUS_INVALID_INDEX via the common unlock path. If unregister passed its close section first, the request now rejects the removed controller before accessing the callback. If the request passes the check first, hci_dev_do_close() must wait for req_lock until the callback has returned, so unregister cannot finish before the use. Oops report as below: BUG: unable to handle page fault for address: ffffffffc0408e10 #PF: supervisor instruction fetch in kernel mode #PF: error_code(0x0010) - not-present page PGD 80a9067 P4D 80a9067 PUD 80ab067 PMD 0 Oops: Oops: 0010 [#1] SMP KASAN NOPTI CPU: 1 UID: 0 PID: 439 Comm: btmgmt Tainted: G O 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Tainted: [O]=OOT_MODULE Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:0xffffffffc0408e10 Code: Unable to access opcode bytes at 0xffffffffc0408de6. RSP: 0018:ffff888110927838 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 1ffff11022124f0c RCX: ffffffff85b1a1b6 RDX: ffff888117511d00 RSI: 0000000000000001 RDI: ffff888117598000 RBP: ffff888110927950 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff893d3057 R11: ffff888117511d00 R12: ffff888117598000 R13: 0000000000000001 R14: ffffffffc0408e10 R15: ffff888117599970 FS: 00007f15453f2040(0000) GS:ffff8881fd852000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffc0408de6 CR3: 000000010b832005 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: ? set_quality_report_func+0x232/0x660 ? __pfx_set_quality_report_func+0x10/0x10 ? pmbd_gate_maybe+0x47/0x60 ? srso_alias_return_thunk+0x5/0xfbef5 ? pmbd_probe_hit_cookie+0xe7/0x1c0 ? srso_alias_return_thunk+0x5/0xfbef5 ? pmbd_probe_hit_cookie+0xee/0x1c0 set_exp_feature+0xf7/0x260 ? set_exp_feature+0xf7/0x260 ? hci_sock_sendmsg+0x12b2/0x2400 ? __pfx_hci_sock_sendmsg+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? selinux_socket_sendmsg+0x160/0x280 ? sock_write_iter+0x4c0/0x550 ? __pfx_hci_sock_sendmsg+0x10/0x10 ? __pfx_sock_write_iter+0x10/0x10 ? __file_has_perm+0x25e/0x420 ? __pfx___file_has_perm+0x10/0x10 ? do_iter_readv_writev+0x59c/0x860 ? __pfx_do_iter_readv_writev+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? security_file_permission+0x26/0x80 ? vfs_writev+0x30e/0xc10 ? __pfx_vfs_writev+0x10/0x10 ? __pfx_do_epoll_wait+0x10/0x10 ? __pfx_do_epoll_ctl+0x10/0x10 ? do_writev+0x241/0x2f0 ? srso_alias_return_thunk+0x5/0xfbef5 ? do_writev+0x241/0x2f0 ? __pfx_do_writev+0x10/0x10 ? irqentry_exit+0xbe/0x820 ? do_syscall_64+0x115/0x6a0 ? entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: [last unloaded: btintel(O)] CR2: ffffffffc0408e10 ---[ end trace 0000000000000000 ]--- RIP: 0010:0xffffffffc0408e10 Code: Unable to access opcode bytes at 0xffffffffc0408de6. RSP: 0018:ffff888110927838 EFLAGS: 00010293 RAX: 0000000000000000 RBX: 1ffff11022124f0c RCX: ffffffff85b1a1b6 RDX: ffff888117511d00 RSI: 0000000000000001 RDI: ffff888117598000 RBP: ffff888110927950 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff893d3057 R11: ffff888117511d00 R12: ffff888117598000 R13: 0000000000000001 R14: ffffffffc0408e10 R15: ffff888117599970 FS: 00007f15453f2040(0000) GS:ffff8881fd852000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffffffffc0408de6 CR3: 000000010b832005 CR4: 0000000000770ef0 PKRU: 55555554 Kernel panic - not syncing: Fatal exception Kernel Offset: disabled Rebooting in 1 seconds.. Fixes: ae7d925b5c04 ("Bluetooth: Support the quality report events") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 2aac3d8f993b35c83f694ba2091db43081c11dcb Author: Cen Zhang Date: Tue Oct 6 22:45:53 2026 +0800 Bluetooth: ISO: Hold the listener during disconnect notification [ Upstream commit b4a00dedc5cc6f6f98c07ec1b54d24a817d9fc88 ] An ISO listener must remain alive until a queued child's disconnect notification completes. bt_accept_enqueue() retains only the child and stores a raw parent pointer; iso_conn_ready() drops its temporary listener reference after setup. iso_chan_del() saves that pointer, unlinks the child and then calls parent->sk_data_ready() without holding a listener reference. With an incoming CIS child still queued, disconnect and listener release can proceed in this order: HCI disconnect Listener release iso_conn_del(): lock child iso_chan_del(): save parent bt_accept_unlink(child) iso_sock_cleanup_listen(): drain empty accept queue iso_sock_release(): orphan and kill listener final sock_put(listener) parent->sk_data_ready(parent) After unlink, listener cleanup no longer has to take the child socket lock. The listener can therefore be freed before iso_chan_del() reads sk_data_ready, causing a use-after-free. Take a temporary parent reference before bt_accept_unlink() and drop it after the notification. The child lock excludes accept dequeue while the child is still queued, so listener cleanup cannot complete before sock_hold(). The reference then keeps the listener alive across unlink and through the callback without changing lock order. KASAN report as below: ================================================================== BUG: KASAN: slab-use-after-free in iso_chan_del+0x302/0x320 Read of size 8 at addr ffff888105ca2188 by task kworker/2:1/50 CPU: 2 UID: 0 PID: 50 Comm: kworker/2:1 Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: events iso_fixture_disconnect_work Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? iso_chan_del+0x302/0x320 ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? iso_chan_del+0x302/0x320 kasan_report+0xe0/0x110 ? iso_chan_del+0x302/0x320 iso_chan_del+0x302/0x320 iso_conn_del+0x19d/0x3c0 ? __pfx_iso_disconn_cfm+0x10/0x10 iso_disconn_cfm+0x78/0x120 hci_disconn_complete_evt+0x319/0xa30 ? find_held_lock+0x2b/0x80 hci_test_iso_disconn_event+0x85/0xb0 ? __pfx_hci_test_iso_disconn_event+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 ? _raw_read_unlock+0x23/0x40 ? srso_alias_return_thunk+0x5/0xfbef5 ? __hci_dev_get+0x15d/0x280 iso_fixture_disconnect_work+0x67/0x290 process_one_work+0x908/0x19c0 ? __pfx_process_one_work+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_is_held_type+0x8f/0x100 ? srso_alias_return_thunk+0x5/0xfbef5 worker_thread+0x65c/0xe40 ? srso_alias_return_thunk+0x5/0xfbef5 ? __kthread_parkme+0x175/0x220 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_worker_thread+0x10/0x10 kthread+0x34f/0x460 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x659/0x940 ? __pfx_ret_from_fork+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? __switch_to+0x74f/0xf80 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Allocated by task 521: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_noprof+0x2d7/0x770 sk_prot_alloc+0x13e/0x260 sk_alloc+0x37/0xb40 bt_sock_alloc+0x40/0x3b0 iso_sock_alloc.constprop.0+0x3a/0x360 iso_sock_create+0xc7/0x160 bt_sock_create+0x171/0x330 __sock_create+0x2c4/0x730 __sys_socket+0x141/0x210 __x64_sys_socket+0x77/0xc0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 521: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x307/0x580 __sk_destruct+0x64f/0x790 sk_destruct+0xb3/0xd0 __sk_free+0xdd/0x370 sk_free+0x51/0x80 iso_sock_release+0x46d/0x5b0 __sock_release+0xb8/0x270 sock_close+0x21/0x30 __fput+0x39f/0xa60 task_work_run+0x144/0x230 do_exit+0x834/0x2830 do_group_exit+0xc7/0x280 get_signal+0x20a9/0x2400 arch_do_signal_or_restart+0x94/0x6f0 exit_to_user_mode_loop+0xcf/0x570 do_syscall_64+0x4f0/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888105ca2000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 392 bytes inside of freed 2048-byte region [ffff888105ca2000, ffff888105ca2800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888105ca5000 pfn:0x105ca0 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0x200000000000240(workingset|head|node=0|zone=2) page_type: f5(slab) raw: 0200000000000240 ffff888100042f00 ffffea00042cd010 ffffea00042c9210 raw: ffff888105ca5000 0000000000080005 00000000f5000000 0000000000000000 head: 0200000000000240 ffff888100042f00 ffffea00042cd010 ffffea00042c9210 head: ffff888105ca5000 0000000000080005 00000000f5000000 0000000000000000 head: 0200000000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff head: ffff888105ca1000 0000000000000000 00000000ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888105ca2080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888105ca2100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888105ca2180: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888105ca2200: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888105ca2280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== Fixes: f764a6c2c1e4 ("Bluetooth: ISO: Add broadcast support") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 3973e025ed583096894a0c98c3d4cf28018b7cc2 Author: Cen Zhang Date: Tue Oct 6 22:39:21 2026 +0800 Bluetooth: hci_sync: Serialize devcoredump reset during device open [ Upstream commit 6d91353f6dbcc5c4fbb47bbd0c7f885453cfc939 ] An ACTIVE devcoredump's buffer cursors must remain valid from the packet handler's state check through its copy. hci_devcd_rx() holds hdev->lock across that interval, and hci_devcd_reset() requires the same lock. However, hci_dev_open_sync() invokes reset without taking it. A registered VHCI controller can collect a dump through its debugfs interface while the controller is down. If a successful open overlaps with handling a nonempty dump packet, reset can run after the receiver's ACTIVE check and before its copy: hci_devcd_rx() hci_dev_open_sync() dequeue nonempty skb hci_dev_lock(hdev) handler observes ACTIVE hdev->open(hdev) succeeds hci_devcd_reset(hdev) dump.tail = NULL dump.state = IDLE hci_devcd_copy() compare against old dump.end memcpy(NULL, ..., skb->len) hci_dev_unlock(hdev) Reset leaves dump.end pointing at the old buffer and purges only queued packets, so it cannot discard the skb already dequeued by the receiver. The bounds check can pass with a NULL tail, leading to a nonempty copy to address zero. KASAN reported a 24-byte NULL write in hci_devcd_rx(). Take hdev->lock around the open-time reset. The receiver then finishes its state check and copy using valid cursors before reset, or observes IDLE after reset and skips the copy. KASAN report as below: BUG: KASAN: null-ptr-deref in hci_devcd_rx+0x5d5/0x1a80 Write of size 24 at addr 0000000000000000 by task kworker/u17:0/496 CPU: 0 UID: 0 PID: 496 Comm: kworker/u17:0 Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: hci0 hci_devcd_rx Call Trace: dump_stack_lvl+0x93/0xd0 kasan_report+0xe0/0x110 ? hci_devcd_rx+0x5d5/0x1a80 kasan_check_range+0x105/0x1b0 __asan_memcpy+0x3c/0x60 hci_devcd_rx+0x5d5/0x1a80 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_hci_devcd_rx+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_release+0xc8/0x280 ? srso_alias_return_thunk+0x5/0xfbef5 process_one_work+0x908/0x19c0 ? __pfx_process_one_work+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? lock_is_held_type+0x8f/0x100 ? srso_alias_return_thunk+0x5/0xfbef5 worker_thread+0x65c/0xe40 ? __pfx_worker_thread+0x10/0x10 kthread+0x34f/0x460 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x659/0x940 ? __pfx_ret_from_fork+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? __switch_to+0x74f/0xf80 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 ================================================================== Disabling lock debugging due to kernel taint Fixes: 9695ef876fd1 ("Bluetooth: Add support for hci devcoredump") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 221fa7cb8df8a8352d342879986d43f9fb51feba Author: Cen Zhang Date: Tue Oct 6 15:38:38 2026 +0800 Bluetooth: hci_core: Keep RCU protection through LTK filtering [ Upstream commit 817cbcab91fe870e5b69c835cbd708242c9f8c8e ] The LTK selected by hci_find_ltk() must remain allocated while its value is checked against the blocked-key list. The finder releases RCU before passing k->val to hci_is_blocked_key(). The helper's own RCU section protects the blocked-key list, but the selected LTK may already have been reclaimed before that section starts. An LE ATT socket security request can reach smp_ltk_encrypt() without holding hdev->lock. With a matching stored LTK and an LTK-type blocked-key entry present, a concurrent MGMT_OP_LOAD_LONG_TERM_KEYS can remove the selected LTK in the following order: Socket security Management / RCU reclamation hci_find_ltk() rcu_read_lock() select k rcu_read_unlock() load_long_term_keys() hci_dev_lock(hdev) hci_smp_ltks_clear(hdev) list_del_rcu(&k->list) kfree_rcu(k, rcu) grace period ends; k is freed hci_is_blocked_key(..., k->val) memcmp(b->val, val, ...) The final comparison reads freed LTK bytes. Entering a new RCU section in hci_is_blocked_key() cannot protect a pointer obtained before the completed grace period. Keep the finder's RCU read-side section active through the blocked-key comparison and the warning that reads k->bdaddr. Release it before returning on either matched-key path. This delays reclamation until the finder has finished using the selected record, following the existing IRK lookup pattern. KFENCE report as below: ================================================================== BUG: KFENCE: use-after-free read in hci_is_blocked_key+0xdf/0x240 Use-after-free read at 0x00000000b9ee38e4 (in kfence-#249): hci_is_blocked_key+0xdf/0x240 blocked_key_wrapper+0xc5/0x140 [pmbd_ltk_probe] hci_find_ltk+0x1aa/0x3e0 smp_ltk_encrypt.isra.0+0xad/0x340 smp_conn_security+0x3b8/0x8c0 l2cap_sock_setsockopt+0x1c4b/0x2270 do_sock_setsockopt+0x1fb/0x430 __sys_setsockopt+0x106/0x180 __x64_sys_setsockopt+0xc2/0x160 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f kfence-#249: 0x00000000121f2ad9-0x000000005b5bfb3d, size=72, cache=kmalloc-96 allocated by task 495 on cpu 0 at 36.722380s (2.603973s ago): hci_add_ltk+0x1f5/0x3a0 load_long_term_keys+0x6d0/0x860 hci_sock_sendmsg+0x128b/0x22e0 __sys_sendto+0x425/0x470 __x64_sys_sendto+0xe5/0x1c0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f freed by task 533 on cpu 0 at 36.993097s (2.339769s ago): __rcu_free_sheaf_prepare+0x261/0x2a0 rcu_free_sheaf+0x1f/0xe0 rcu_core+0x661/0x1d10 handle_softirqs+0x201/0x930 __irq_exit_rcu+0x110/0x1e0 irq_exit_rcu+0xe/0x20 sysvec_apic_timer_interrupt+0x6c/0x80 asm_sysvec_apic_timer_interrupt+0x1a/0x20 srso_alias_return_thunk+0x0/0xfbef5 __asan_memcpy+0x23/0x60 create_monitor_ctrl_event+0x1a2/0x460 mgmt_cmd_complete+0x2da/0x580 load_long_term_keys+0x741/0x860 hci_sock_sendmsg+0x128b/0x22e0 __sys_sendto+0x425/0x470 __x64_sys_sendto+0xe5/0x1c0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f CPU: 1 UID: 0 PID: 495 Comm: python3 Tainted: G O 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Tainted: [O]=OOT_MODULE Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 ================================================================== Fixes: 600a87490ff9 ("Bluetooth: Implementation of MGMT_OP_SET_BLOCKED_KEYS.") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit a3704a39c874aaccfd6e21ae7c9e42ace6823f1d Author: Hitalo Souza Date: Tue Oct 6 17:21:42 2026 -0400 Bluetooth: Add missing newline to bt_dev_{err,warn}_ratelimited() [ Upstream commit f51ee3bb5fbe9c2019c31befe330bddd3aee39c2 ] bt_dev_err_ratelimited() and bt_dev_warn_ratelimited() pass the format string to bt_err_ratelimited()/bt_warn_ratelimited() without appending a newline, unlike bt_dev_err() and bt_dev_warn(), which go through BT_ERR()/BT_WARN() and add one. Only 2 of the 22 in-tree callers (both in virtio_bt) put the newline in their own format string. A printk record without a trailing newline is stored with prb_commit() instead of prb_final_commit(), and readers of the log buffer (/dev/kmsg, syslog) do not see it until it is finalized, which only happens when the next record is reserved. These messages therefore stay invisible until some unrelated message is printed, and journald, which timestamps a record when it reads it, logs them with the time of that later message. This was observed with a MediaTek MT7921 controller (USB 04ca:3802): when an eSCO link is closed, the host still receives a few SCO packets for the handle after Disconnection Complete, so hci_scodata_packet() logs "SCO packet for unknown connection handle". Comparing the record's kernel timestamp (_SOURCE_MONOTONIC_TIMESTAMP) with the time journald received it, over one capture: emitted logged delay 15:36:52.896 15:37:00.214 7.3 s 15:37:03.410 15:39:05.574 122.2 s 15:39:05.574 15:39:12.506 6.9 s 15:39:19.791 15:40:54.109 94.3 s 15:41:22.021 15:41:24.647 2.6 s Each message showed up together with the next kernel message; the 94 s one looked as if it had been logged in the middle of a later, healthy eSCO connection. bt_dev_err_ratelimited() lost its newline in commit 657cc646475b ("Bluetooth: Remove usage of BT_ERR_RATELIMITED macro"), which replaced BT_ERR_RATELIMITED(), the variant that appended "\n", with a direct call to bt_err_ratelimited(). bt_dev_warn_ratelimited() never had one. Append the newline in both macros, as BT_ERR() and BT_WARN() do, and drop it from the two virtio_bt format strings so that their messages do not gain an empty line. Fixes: 36278a5d4d35 ("Bluetooth: Adding a bt_dev_warn_ratelimited macro.") Fixes: 657cc646475b ("Bluetooth: Remove usage of BT_ERR_RATELIMITED macro") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Hitalo Souza Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 7da83a04109b6115f7ac1fe5c9bf0deeb6956319 Author: Cen Zhang Date: Tue Oct 6 15:35:23 2026 +0800 Bluetooth: 6LoWPAN: Use RCU-safe device list removal [ Upstream commit 8c27d7d06e21ba9455ddae4e14f364c57f095cba ] RCU readers of bt_6lowpan_devices must be able to follow an adapter's forward link until their read-side critical section ends. The entries are published with list_add_rcu(), but device_event() removes an entry on NETDEV_UNREGISTER with list_del(), poisoning that link. When an adapter is being unregistered and 6LoWPAN is enabled, a 6lowpan_control debugfs write with an existing LE L2CAP connection can enter lookup_peer() after unregister's first synchronize_net(). If the connection has no peer on that adapter, the reader must advance to the next list entry. Neither RTNL nor devices_lock excludes this RCU reader. The last peer's chan_close_cb() schedules delete_netdev(), which reaches unregister_netdevice_many_notify() through unregister_dev() and lowpan_unregister_netdev(). The following ordering is possible: Unregister worker Control writer ----------------- -------------- synchronize_net() returns lowpan_control_write() lookup_peer(): rcu_read_lock() reach adapter; no matching peer device_event(): devices_lock list_del(&entry->list) spin_unlock(&devices_lock) follow poisoned next link read invalid adapter address post-notifier synchronize_net() waits for the reader This invalid pointer access can fault in lookup_peer(). The first grace period drains existing readers but permits new ones to start, and the later grace period cannot prevent the intervening poisoned-link access. Use list_del_rcu() under the existing devices_lock to preserve the forward link for readers that already reached the adapter. The existing post-notifier synchronize_net() waits for those readers before netdevice teardown frees the private storage containing lowpan_btle_dev. KASAN report as below: [...] [ 45.867526] Oops: general protection fault, probably for non-canonical address 0xfbd59c0000000023: 0000 [#1] SMP KASAN NOPTI [ 45.869489] KASAN: maybe wild-memory-access in range [0xdead000000000118-0xdead00000000011f] [ 45.870981] CPU: 1 UID: 0 PID: 646 Comm: sh Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #4 PREEMPT(lazy) [ 45.872609] Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 45.874380] RIP: 0010:lookup_peer+0x1ba/0x320 [ 45.875067] Code: 48 89 d9 ba 04 00 00 00 4c 89 fe bf a0 06 00 00 e8 2b e8 ad fb e9 56 ff ff ff e8 01 1e c3 fb 49 8d 7f 18 48 89 f8 48 c1 e8 03 <80> 3c 28 00 0f 85 4a 01 00 00 4d 8b 47 18 4c 89 f1 ba 04 00 00 00 [ 45.878206] RSP: 0018:ffff888114d67b90 EFLAGS: 00010212 [ 45.879106] RAX: 1bd5a00000000023 RBX: 0000000000000000 RCX: ffffffff85c1d19f [ 45.880334] RDX: ffff88810dc35700 RSI: 0000000000000000 RDI: dead000000000118 [ 45.881455] RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000001 [ 45.882546] R10: ffffffff893d3057 R11: ffff88810dc35700 R12: ffff88810a690000 [ 45.883839] R13: ffff888115451038 R14: ffff88810a690000 R15: dead000000000100 [ 45.885186] FS: 00007fa889bac780(0000) GS:ffff8881fd852000(0000) knlGS:0000000000000000 [ 45.886539] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 45.887527] CR2: 00007ffe304f2f80 CR3: 0000000104f64005 CR4: 0000000000770ef0 [ 45.888687] PKRU: 55555554 [ 45.889183] Call Trace: [ 45.889666] [ 45.890061] lowpan_control_write+0x445/0x9e0 [ 45.890854] ? __pfx_lowpan_control_write+0x10/0x10 [ 45.891738] ? srso_alias_return_thunk+0x5/0xfbef5 [ 45.892603] ? srso_alias_return_thunk+0x5/0xfbef5 [ 45.893383] ? __debugfs_file_get+0x1bd/0x7f0 [ 45.894057] ? srso_alias_return_thunk+0x5/0xfbef5 [ 45.894902] ? lock_acquire+0x17b/0x2f0 [ 45.895593] ? ksys_write+0x111/0x200 [ 45.896290] full_proxy_write+0x11f/0x180 [ 45.896991] vfs_write+0x25a/0x1010 [ 45.897642] ? __pfx_full_proxy_write+0x10/0x10 [ 45.898440] ? __pfx_vfs_write+0x10/0x10 [ 45.899178] ? lock_release+0x11f/0x280 [ 45.899855] ksys_write+0x111/0x200 [ 45.900435] ? __pfx_ksys_write+0x10/0x10 [ 45.901074] ? irqentry_exit+0xbe/0x820 [ 45.901722] ? srso_alias_return_thunk+0x5/0xfbef5 [ 45.902489] do_syscall_64+0x115/0x6a0 [ 45.903064] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 45.903813] RIP: 0033:0x7fa889c3e687 [ 45.904359] Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff [ 45.906981] RSP: 002b:00007ffd7651b960 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 [ 45.908070] RAX: ffffffffffffffda RBX: 00007fa889bac780 RCX: 00007fa889c3e687 [ 45.909102] RDX: 000000000000001c RSI: 00005570f25e8d10 RDI: 0000000000000001 [ 45.910133] RBP: 00005570f25e8d10 R08: 0000000000000000 R09: 0000000000000000 [ 45.911162] R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000001 [ 45.912190] R13: 000000000000001c R14: 0000000000000000 R15: 00005570f25e8a78 [ 45.913208] [ 45.913530] Modules linked in: [ 45.914022] ---[ end trace 0000000000000000 ]--- [ 45.914709] RIP: 0010:lookup_peer+0x1ba/0x320 [ 45.915436] Code: 48 89 d9 ba 04 00 00 00 4c 89 fe bf a0 06 00 00 e8 2b e8 ad fb e9 56 ff ff ff e8 01 1e c3 fb 49 8d 7f 18 48 89 f8 48 c1 e8 03 <80> 3c 28 00 0f 85 4a 01 00 00 4d 8b 47 18 4c 89 f1 ba 04 00 00 00 [ 45.919191] RSP: 0018:ffff888114d67b90 EFLAGS: 00010212 [ 45.920046] RAX: 1bd5a00000000023 RBX: 0000000000000000 RCX: ffffffff85c1d19f [ 45.921129] RDX: ffff88810dc35700 RSI: 0000000000000000 RDI: dead000000000118 [ 45.922553] RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000001 [ 45.923653] R10: ffffffff893d3057 R11: ffff88810dc35700 R12: ffff88810a690000 [ 45.925119] R13: ffff888115451038 R14: ffff88810a690000 R15: dead000000000100 [ 45.926180] FS: 00007fa889bac780(0000) GS:ffff8881fd852000(0000) knlGS:0000000000000000 [ 45.927817] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 45.928726] CR2: 00007ffe304f2f80 CR3: 0000000104f64005 CR4: 0000000000770ef0 [ 45.930069] PKRU: 55555554 [ 45.930456] Kernel panic - not syncing: Fatal exception [ 45.931542] Kernel Offset: disabled [ 45.932040] Rebooting in 1 seconds.. Fixes: 90305829635d ("Bluetooth: 6lowpan: Converting rwlocks to use RCU") Assisted-by: LLM Signed-off-by: Cen Zhang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit a047b354e4a2e68258f70ee8a59c3714093a2e05 Author: Luiz Augusto von Dentz Date: Mon Oct 5 13:39:26 2026 -0400 Bluetooth: MGMT: Fix leaking instance on Add Extended Advertising Parameters [ Upstream commit f7f0d0a9eb6e4616c0b3a2a95498b5204c5543c9 ] If queueing the command fails the instance is never removed, despite it having already been added or modified by hci_add_adv_instance, so remove it as it is done by add_ext_adv_params_complete on failure, signaling it has been removed if it was previously added. Fixes: cba6b758711c ("Bluetooth: hci_sync: Make use of hci_cmd_sync_queue set 2") Assisted-by: OpenCode:claude-opus-5.5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 1e84917c0641646e646a013f0e927bc4f9c62d96 Author: Luiz Augusto von Dentz Date: Mon Oct 5 13:39:25 2026 -0400 Bluetooth: MGMT: Fix pending state of instances added without HCI traffic [ Upstream commit 5548fb51aa3cc24545029a286882d261a8e77d8a ] When Add Advertising completes without HCI communication, e.g. when the device is not powered or the instance is overridden by Global Advertising, the instance is left marked as pending, so a subsequent failure in add_adv_complete would remove it despite it having been successfully added. Fix this by clearing the pending state before completing the command. Fixes: fffd38bca51c ("Bluetooth: mgmt/hci_core: multi-adv for add_advertising*()") Assisted-by: OpenCode:claude-opus-5.5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit a0376fc49999bac6ad5028e0fc5fe5eb72947063 Author: Luiz Augusto von Dentz Date: Mon Oct 5 13:39:17 2026 -0400 Bluetooth: HCI: Fix tracking of instances sharing handle 0x00 [ Upstream commit 1bfecdbd031711e5205ae78f3b8c296e5a53bc55 ] When the controller supports a single advertising set, instance 1 uses handle 0x00 which is the same handle used by instance 0 (Global Advertising), but hci_cc_le_set_ext_adv_enable would lookup the instance using the handle as instance identifier, marking instance 0 as enabled/disabled instead of instance 1, leaving its state out of sync. Fix this by matching instances by handle and, for handle 0x00, using hdev->cur_adv_instance, now set when enabling an instance, to determine which instance owns the set. Also disable the instance sharing the advertising set of instance 0 before overriding it. Fixes: e77f43d531af ("Bluetooth: hci_core: Fix not handling hdev->le_num_of_adv_sets=1") Assisted-by: OpenCode:claude-opus-5.5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 2f47436c1c225436569e4ef8ca210a1867afbec5 Author: Luiz Augusto von Dentz Date: Mon Oct 5 11:15:02 2026 -0400 Bluetooth: MGMT: Fix advertising instances with Global Advertising [ Upstream commit 0ad48c88a2ed3b58164fa771977868503b0abac3 ] Global Advertising, enabled with MGMT_OP_SET_ADVERTISING, uses instance 0 and with extended advertising it has its own advertising set, but instances were still being treated as if they shared the same set: - Add Advertising and Add Extended Advertising Data would return success without ever enabling the instance. - Removing the last instance would disable all advertising sets, stopping Global Advertising while leaving its setting enabled. - Disabling Global Advertising would disable all sets, including active instances. Fix this by only overriding instances that share the advertising set of Global Advertising, and by tracking HCI_LE_ADV_0 rather than HCI_LE_ADV to determine the state of Global Advertising. Fixes: 0d92808024b4 ("Bluetooth: HCI: Fix tracking of advertisement set/instance 0x00") Assisted-by: OpenCode:claude-opus-5.5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 7157d534b3dd0c55fdef1c5f8be5b4e7fea4c154 Author: Pauli Virtanen Date: Mon Oct 5 21:13:54 2026 +0300 Bluetooth: hci_sync: fix mesh adv timeout units [ Upstream commit 8a8d51eeedebfa5aaaae7720f2fb2aa1a67b8587 ] Mesh adv instance timeout and duration are in milliseconds, see mesh_send_sync, hci_add_adv_instance. hci_schedule_adv_instance_sync() and hci_enable_ext_advertising_sync() ignore this, and scale the timeout wrong. Fix for mesh instances by using msecs_to_jiffies() in hci_schedule_adv_instance_sync and fixing the scaling in hci_enable_ext_advertising_sync. Fixes BlueZ "Mesh - Send cancel" test failures. Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh") Assisted-by: opencode:qwen3.8-flash-next sashiko Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 60c980242070ba0b43293ff401b301f12064a59e Author: Kiran K Date: Tue Sep 29 12:15:56 2026 +0530 Bluetooth: btusb: Preserve event and ACL packet ordering [ Upstream commit fa96916cfd05ceb1c26af0b2ea73daf5481cad2d ] When force_poll_sync is enabled, commit 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval") defers ACL delivery to the RX worker. The event path currently wakes that worker before delivering the event, so queued ACL data can reach HCI first. Deliver the event before waking the worker. This preserves the intended event-first ordering and the event callback's return value. Fixes: 800fe5ec302e ("Bluetooth: btusb: Add support for queuing during polling interval") Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 78fc92da8514518157908be8145d87c238a928c6 Author: Ravindra Date: Mon Sep 28 22:40:03 2026 +0530 Bluetooth: btintel_pcie: clear the GP0 cause with a W1C write [ Upstream commit f2cee6e2aa35a6a701ce3f4bedf20273c808361f ] MSIX_HW_INT_CAUSES is a write-one-to-clear register. Using a read-modify-write helper writes zero to GP0, leaving the cause uncleared, and can acknowledge unrelated pending causes through the read value. Write only the GP0 bit directly, matching the interrupt handler's W1C acknowledgment convention. Fixes: 88c6216a52ea ("Bluetooth: btintel_pcie: Suspend/Resume: Controller doorbell interrupt handling") Signed-off-by: Ravindra Tested-by: Sergey Lebedev Reviewed-by: Sergey Lebedev Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 0da4f05e1d7e2c7be19724380f01a02f8aeda76f Author: Sergey Lebedev Date: Mon Sep 28 22:40:02 2026 +0530 Bluetooth: btintel_pcie: verify and serialize D-state transitions [ Upstream commit 4f6ead67b93bcc4ba1fbbf97c7c8bc5a0c45b80b ] The gp0_received flag only reports that the GP0 handler ran. It does not contain proof that the handler completed the requested D-state transition: a matched case can leave the state unchanged. Refresh the boot-stage register before treating the transition as successful. When the controller is in D0 but the handler did not re-arm the interface, restore the alive context, reset the IA, restart RX, and complete the mailbox/alive handshake. Propagate RX setup failures to the PM caller. Likewise, when the controller is in D3 but the handler did not record it, restore the alive context so the next transition dispatches correctly. Serialize the alive-context claim between the GP0 handler and the set_dxstate() fallback with irq_lock. Only the path that claims the D0 transition resets the IA and rearms RX, avoiding concurrent updates to the shared ring state. Co-developed-by: Ravindra Signed-off-by: Ravindra Signed-off-by: Sergey Lebedev Fixes: 88c6216a52ea ("Bluetooth: btintel_pcie: Suspend/Resume: Controller doorbell interrupt handling") Tested-by: Sergey Lebedev Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit d4ef301aa32db5957cc7f43a1136d0f531ad0e9e Author: Kiran K Date: Wed Aug 19 20:02:18 2026 +0530 Bluetooth: btintel_pcie: sync mbox tlv parsing with GP0 alive interrupt [ Upstream commit d572ea4b621ce60279da5179a0c338660c8b7331 ] Performing a target access to read the mbox TLV table while the driver is concurrently posting RX buffers to the firmware causes the hardware to return 0 for the target address, resulting in an invalid/empty TLV parse. Add a synchronization handshake between the mbox TLV read operation performed by the mbox worker and the GP0 (alive) MSI-X interrupt (which signals completion of RX buffer posting). The worker now waits for the alive interrupt before initiating the target access, ensuring the hardware returns valid data. Assisted-by: Gemini:gemini-3.1-pro-preview Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz Stable-dep-of: 4f6ead67b93b ("Bluetooth: btintel_pcie: verify and serialize D-state transitions") Signed-off-by: Sasha Levin commit 63826240b0373bda54165553b4c434285d8b07e7 Author: Ravindra Date: Mon Sep 28 22:40:01 2026 +0530 Bluetooth: btintel_pcie: fix PM flow for S0ix, S3 and S4 [ Upstream commit 2926eb396711f1f843a0aafee6778822f50e9021 ] Fix two issues in the PM suspend/resume path: 1. S3 was handled the same as S0ix, keeping the controller on the D3hot-style path. That caused resume instability because S3 can remove power from the controller, unlike s2idle/S0ix. Use pm_suspend_target_state to distinguish them: D3_HOT for S0ix and D3_COLD for S3/S4. Add .restore to force FLR-based firmware recovery after S4 and S3 (PM_SUSPEND_MEM), as power is lost. S0ix resumes via a normal D0 transition. 2. During hibernation, .freeze() puts the controller into the D3cold state without any loss of power, and the flow normally continues to .poweroff(). If hibernation instead fails, .thaw() is called to bring the controller back up, and the old code routed it through btintel_pcie_resume(), which forced FLR-based firmware recovery whenever data->pm_sx_event was PM_EVENT_FREEZE. That check was incorrect: since the controller's power was never actually removed on this failed-hibernation path, FLR-based recovery is unnecessary. Remove pm_sx_event and route .thaw through a normal D0 transition instead; FLR-based recovery is retained only in .restore, where genuine S4 power loss requires it. Tested with: S0ix: sudo sh -c 'echo "+40" > /sys/class/rtc/rtc0/wakealarm' && \ echo freeze | sudo tee /sys/power/state S3: sudo rtcwake -m mem -s 60 S4: sudo rtcwake -m disk -s 60 Fixes: e57362f4911b ("Bluetooth: btintel_pcie: Add support for _suspend() / _resume()") Assisted-by: GitHub-Copilot:GPT5 Signed-off-by: Ravindra Tested-by: Sergey Lebedev Reviewed-by: Paul Menzel Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 921e38fb42f05213111b7a8a93e8d3344f85d1ec Author: Vladimir V. Kondratyev Date: Mon Sep 28 22:40:00 2026 +0530 Bluetooth: btintel_pcie: fix stale cache in set_dxstate fallback check [ Upstream commit 12997a385f7140c66f733128b76845fd906c270a ] btintel_pcie returns -16 (EBUSY) during suspend, causing the entire suspend operation to abort on Intel Lunar Lake hardware. The system immediately resumes after every suspend attempt: Bluetooth: hci0: Timeout (200 ms) on alive interrupt for D2 entry, retry count 0 Bluetooth: hci0: Timeout (200 ms) on alive interrupt for D2 entry, retry count 1 Bluetooth: hci0: Timeout (200 ms) on alive interrupt for D2 entry, retry count 2 btintel_pcie 0000:00:14.7: PM: pci_pm_suspend(): btintel_pcie_suspend [btintel_pcie] returns -16 btintel_pcie 0000:00:14.7: PM: dpm_run_callback(): pci_pm_suspend returns -16 btintel_pcie 0000:00:14.7: PM: failed to suspend async: error -16 PM: Some devices failed to suspend, or early wake event detected btintel_pcie_set_dxstate() falls back to checking the controller state via btintel_pcie_in_d3/d0() when the alive interrupt is missed. However, these helpers read boot_stage_cache, which is only updated by the interrupt handler. As such, if the interrupt was missed, the cache is stale and the fallback check always fails, exhausting all retries and returning -EBUSY, causing suspend to abort. The fix involves re-reading the hardware register before the fallback state check, consistent with btintel_pcie_resume(). Fixes: 88c6216a52ea ("Bluetooth: btintel_pcie: Suspend/Resume: Controller doorbell interrupt handling") Link: https://bugzilla.kernel.org/show_bug.cgi?id=221481 Link: https://lore.kernel.org/linux-bluetooth/20260830151550.44687-1-lsa.uz@pm.me/ Signed-off-by: Vladimir V. Kondratyev Tested-by: Sergey Lebedev Signed-off-by: Sergey Lebedev Signed-off-by: Ravindra Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 857bb01373d39c4c620ef51c0ceea1ff82e01ed7 Author: Chris Lu Date: Wed Sep 9 20:00:10 2026 +0800 Bluetooth: btmtk: Improve BT firmware logging [ Upstream commit 046fa20e9c7abbafb166b431fe446c49b71cb15a ] The firmware log line in btmtk_setup_firmware_79xx() never says which file was requested, which matters because btmtk_fw_get_filename() derives the name from the device id and firmware version at runtime. It reports the firmware's own hwver field as the HW version, when the device id the driver read from the chip is the more useful value and is already available as dev_id. And it prints datetime, a u8[16] with no guaranteed NUL terminator, with %s. Log the filename before the image is parsed, so a file that fails validation still says which file it was, report dev_id as the HW version, and bound datetime with %.16s. The datetime change is hardening rather than a fix, hence no Fixes: tag: every file in linux-firmware terminates the field, and provoking the over-read needs a malformed file in /lib/firmware. Log output on MT7922 after the change: [ 365.245951] Bluetooth: hci0: Loading BT firmware: mediatek/BT_RAM_CODE_MT7922_1_1_hdr.bin [ 365.245956] Bluetooth: hci0: BT HW ver: 0x7922, SW ver: 0x008a, Build Time: 20260605203811 Signed-off-by: Chris Lu Assisted-by: Claude:claude-opus-5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 08f342c1cfc5d901db83beff87dbf26d2bd298bc Author: Chris Lu Date: Wed Sep 9 20:00:09 2026 +0800 Bluetooth: btmtk: Validate the firmware layout before parsing it [ Upstream commit 760ac9d02dce001f2e20c17deb18e7bb63d8355e ] btmtk_setup_firmware_79xx() reads the section count out of the firmware's global descriptor, then walks a 64-byte section map per section and hands each section's file-supplied offset and length to the WMT download path. None of that is checked against fw->size, so a truncated or corrupted file makes the driver read past the end of request_firmware()'s buffer. On 32-bit the section count can also wrap the section map size calculation. Add btmtk_fw_validate_layout() to check that the header, global descriptor and section map array all fit, and btmtk_fw_validate_section() to check one section's offset and length, both written so the size arithmetic cannot wrap. A section count of zero is rejected as well: it passes every size check but leaves the download loop with nothing to do, so the function would report success on hardware it never programmed. They are helpers rather than open-coded because the MT7928 CBMCU download path added later needs the same arithmetic. This is hardening against a corrupted /lib/firmware rather than a bug an unprivileged user can trigger, hence bluetooth-next and no Fixes: tag. Well-formed firmware files are unaffected. Signed-off-by: Chris Lu Assisted-by: Claude:claude-opus-5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit b37418bde5da552ec63b656fe4611b08d0750aff Author: Chandrashekar Devegowda Date: Fri Sep 4 05:59:36 2026 +0530 Bluetooth: btintel_pcie: remove duplicate BTINTEL_PCIE_MAGIC_NUM definition [ Upstream commit 937363063afde2dce1f45d8f22514db99b9eba6b ] Two identical definitions of BTINTEL_PCIE_MAGIC_NUM were present in btintel_pcie.c, one indented with spaces and one with a tab. Remove the space-indented duplicate and the surrounding blank lines. Kernel coding style requires tabs for indentation, so keep the tab-indented copy. No functional change. Assisted-by: Copilot:claude-opus-4.7 sparse Fixes: 6ed83047389c ("Bluetooth: btintel_pcie: Setup buffers for firmware traces") Signed-off-by: Chandrashekar Devegowda Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 718f385e2c6a8e629fcffb752f1941e90fea7c8c Author: Chandrashekar Devegowda Date: Wed Aug 19 20:02:17 2026 +0530 Bluetooth: btintel_pcie: parse FW memory addresses via mailbox TLV [ Upstream commit a504dcdb0b574a2bb00cd09378b6dee6d551f4a4 ] Implement GP1 mailbox interrupt handling to receive memory region addresses from firmware via a TLV-based protocol. When firmware sends a BUILD_SPECIFIC_RESOURCES_MAPPING mailbox message, the driver reads a TLV table from device memory containing addresses and sizes of debug memory regions (exception dump, DCCM, SDS, ECL, SMEM). This enables the driver to dynamically discover dump region locations instead of using hardcoded addresses, supporting current and future Intel BT PCIe controller variants. Replace per-device hardcoded exception memory address and size constants in btintel_pcie_read_hwexp() with the dynamically populated values from dump_info, making exception dump handling consistent with other dump regions. Key changes: - Rewrite GP1 handler to parse mailbox registers and queue TLV work - Add btintel_parse_mbox_tlv() for parsing FW-provided TLV data - Add mbox_work workqueue for deferred TLV processing - Store parsed region addresses in btintel_pcie_dump_mem_info - Add cnvi_bt field to btintel_data for HW variant identification - Rename fw_git_sha1 to fw_sha for consistency - Remove hardcoded HWEXP address/size macros and use dump_info Assisted-by: GitHub-Copilot:claude-opus-4.7 Signed-off-by: Chandrashekar Devegowda Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz Stable-dep-of: 937363063afd ("Bluetooth: btintel_pcie: remove duplicate BTINTEL_PCIE_MAGIC_NUM definition") Signed-off-by: Sasha Levin commit 6b5ec0f50f5fa24edf25d038d0463be0241700ee Author: Pauli Virtanen Date: Sat Aug 29 17:20:06 2026 +0300 Bluetooth: L2CAP: hold chan in l2cap_ecred_conn_rsp() [ Upstream commit b508a2a2d846ccc4c8f691e4e3dfca6f97dfe85a ] l2cap_chan_del() calls l2cap_chan_put() to drop the conn->chan_l reference. If this was the last reference, UAF follows. l2cap_ecred_conn_rsp() iterates chan_l list and calls l2cap_chan_del() on some members, without holding chan reference. Fix by holding refcount while using chan after l2cap_chan_del(). Since orig is looked up by dcid provided by remote, it's also possible orig == chan, so reference needs to be held also after orig use. Fixes: 41c2713b204e ("Bluetooth: L2CAP: Fix possible crash on l2cap_ecred_conn_rsp") Assisted-by: deepseek-v4-flash Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 060e9a01535da64f0e60faa42a9fb62e1def2413 Author: Pauli Virtanen Date: Sat Aug 29 17:20:03 2026 +0300 Bluetooth: L2CAP: hold l2cap_conn::lock in l2cap_connect_cfm() [ Upstream commit 115e6a21c88a5f708b2b025f7567ab78a782a74f ] l2cap_new_connection() -> __l2cap_chan_add() modifies l2cap_conn::chan_l, which is guarded by l2cap_conn::lock. The lock is not held in l2cap_connect_cfm(). Fix by holding conn->lock in l2cap_connect_cfm() to make the locking systematic. Fixes: ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in hci_chan_del") Signed-off-by: Pauli Virtanen Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit bdcbed92b7b373060d5f864ecfb8c9ff197ebd88 Author: Chris Lu Date: Tue Aug 25 11:36:34 2026 +0800 Bluetooth: btmtksdio: Pass the hardware device id to mt79xx_setup() [ Upstream commit a2bb734c368766a2499ed00590ea838cac13c76e ] mt79xx_setup() passes a hardcoded 0 to btmtk_setup_firmware_79xx(), discarding the device id that btmtksdio_setup() has just read from register 0x70010200. That argument only gates the section filtering for MT6639, which has no SDIO interface, so this is a no-op on supported hardware and carries no Fixes: tag. Pass the value that has already been read, matching the USB path. Declare dev_id as u32 while at it, since that is what btmtksdio_mtk_reg_read() writes through the pointer. Signed-off-by: Chris Lu Assisted-by: Claude:claude-opus-5 Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin commit 5ded5ed32847c7ad810d44d4028df3f3e1821b7a Author: Chris Lu Date: Tue Aug 25 11:36:33 2026 +0800 Bluetooth: btmtksdio: Remove redundant firmware filename override [ Upstream commit 8c947cd1c27d6493ed7e6630e168222454f53edb ] btmtksdio_setup() derives the firmware filename with btmtk_fw_get_filename() and then overwrites it with an snprintf() that open-codes that helper's fallback format. Commit 7f935b21bee4 ("Bluetooth: btmtk: apply the common btmtk_fw_get_filename") added the helper call without removing the snprintf() it was meant to replace. None of the device ids the helper special-cases can appear here: 0x6639, 0x7925 and the flavored 0x7961 belong to parts with no SDIO interface, and btmtksdio_setup() passes a flavor of 0 accordingly. The helper always falls through to the snprintf()'s own format, so both produce the same string and removing it is a no-op. Remove it anyway, since it silently defeats the helper for any device id the helper special-cases. Signed-off-by: Chris Lu Assisted-by: Claude:claude-opus-5 Signed-off-by: Luiz Augusto von Dentz Stable-dep-of: a2bb734c3687 ("Bluetooth: btmtksdio: Pass the hardware device id to mt79xx_setup()") Signed-off-by: Sasha Levin commit d866a2d3c74981a347ebd2ded927f8415378689c Author: Mohamad Raizudeen Date: Thu Sep 3 22:16:15 2026 +0530 PCI: Fix out-of-bounds MMIO read in nvme_disable_and_flr() [ Upstream commit 6aaa3f42e3410ea8e26c857477260159f724cb1d ] In nvme_disable_and_flr(), the PCI bar is mapped using NVME_REG_CC + sizeof(cfg) which is (0x14 + 4 = 0x18 bytes) However, the function later reads the controller status from NVME_REG_CSTS - offset 0x1C, which is outside the mapped 0x18 byte boundary. This violates the API contract. Fix this by increasing the mapping size to include NVME_REG_CSTS. Also change sizeof(cfg) to sizeof(u32) to make the intent clearer. Fixes: ffb0863426eb9 ("PCI: Disable Samsung SM961/PM961 NVMe before FLR") Signed-off-by: Mohamad Raizudeen Signed-off-by: Bjorn Helgaas Reviewed-by: Alex Williamson Link: https://patch.msgid.link/20260903164615.5744-1-raizudeen.kerneldev@gmail.com Signed-off-by: Sasha Levin commit d1e6b44357faeab0e96bea4a8f10d8f87a77cba7 Author: Marek Szyprowski Date: Mon Sep 21 09:52:00 2026 +0100 ARM: 9519/1: dma-mapping: Fix wrong free function in __iommu_alloc_simple() error path [ Upstream commit 74f79365839720bdb0c6bb4fe85c5b2a929ff5d1 ] In __iommu_alloc_simple(), when IOMMU mapping creation fails, the error path unconditionally called __free_from_pool() regardless of the allocation path taken. For the COHERENT case, memory is allocated via __alloc_simple_buffer(), which does not use the atomic pool. Calling __free_from_pool() on such memory silently returns without freeing, causing a page memory leak. Fix this by matching the free function to the allocation path: - COHERENT: use __dma_free_buffer(virt_to_page(addr), size) - non-COHERENT: use __free_from_pool(addr, size) Fixes: 565068221b905 ("ARM: 8561/4: dma-mapping: Fix the coherent case when iommu is used") Signed-off-by: Li RongQing Reviewed-by: Marek Szyprowski Signed-off-by: Marek Szyprowski Signed-off-by: Russell King Signed-off-by: Sasha Levin commit 234327d3957c1e78c24f659a107ff408ab6ec842 Author: Karl Mehltretter Date: Sat Aug 15 02:41:10 2026 +0100 ARM: 9492/1: alignment: fix LSR #32 and ASR #32 offset decoding [ Upstream commit 9f878a6c2207f0c12f34a715a6a05cfc95f47460 ] The register-offset form of LDR/STR may apply a shift to Rm. Per DecodeImmShift() (ARM ARM DDI0406C section A8.4.3, "Pseudocode details of instruction-specified shifts and rotates"), an imm5 of 0 encodes a shift of 32 for LSR and ASR; only LSL treats 0 as "no shift", and ROR with 0 encodes RRX. do_alignment() special-cases RRX but not LSR or ASR, and IS_SHIFT() does not filter these encodings out, so the block is entered with shiftval == 0 and the offset becomes Rm instead of 0 (LSR #32) or the replicated sign of Rm (ASR #32). do_alignment_finish_ldst() applies the offset to the base-register writeback of the post-indexed form, so the emulated access itself uses the correct faulting address but Rn is left holding the wrong value. Reproduced on ARM926EJ-S (versatile_defconfig, CONFIG_ALIGNMENT_TRAP=y, gcc 13.3.0) with a misaligned base and Rm = 0x1000: ldr r0, [r1], r2, lsr #32 Rn advanced by 0x1000, must be unchanged ldr r0, [r1], r2, asr #32 Rn advanced by 0x1000, must be unchanged ldr r0, [r1], r2, asr #32 with Rm negative, Rn must decrease by 1 All three are correct with the patch applied, while a lsr #1 control case is emulated correctly both before and after. Assisted-by: Claude:claude-fable-5 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reviewed-by: Linus Walleij Signed-off-by: Karl Mehltretter Signed-off-by: Russell King Signed-off-by: Sasha Levin commit 4d59ef095661abbf4f5be90c610012486394bfe3 Author: Karl Mehltretter Date: Mon Aug 3 19:41:18 2026 +0100 ARM: 9486/1: set !LPAE MAX_PHYSMEM_BITS to 32 and remove supersection mappings [ Upstream commit 787a3446cafee59e31deaec662d74f86bff38999 ] An ARM randconfig with CONFIG_GET_FREE_REGION=y and CONFIG_WERROR=y fails to build: include/linux/minmax.h:86:37: error: conversion from 'long long unsigned int' to 'resource_size_t' {aka 'unsigned int'} changes value from '68719476735' to '4294967295' [-Werror=overflow] Commit 14b80582c43e ("resource: Introduce alloc_free_mem_region()") made kernel/resource.c clamp against (1ULL << MAX_PHYSMEM_BITS) - 1. resource_size_t is 32-bit without LPAE, but ARM's default MAX_PHYSMEM_BITS is 36. That default was added by commit db57f88e4ccb ("ARM: 8411/1: Add default SPARSEMEM settings") because several platforms needed at least 36 physical address bits. !LPAE could map addresses above 32 bits only through supersections. CONFIG_IO_36, added by commit 23bdf86aa06e ("[ARM] 3377/2: add support for intel xsc3 core"), enabled these for XSC3 I/O. IXP23xx placed static I/O mappings above 4GiB until its removal in 2012, and IOP13xx ioremap()ed its PCIe windows there until its removal in 2019. The only remaining XSC3 platform, PXA3xx, has nothing above 4GiB. Supersection address bits overlap the descriptor domain field, so IO_36 also renumbered the domains to make DOMAIN_IO zero. Remove IO_36, the alternate domain numbering, and ioremap()'s supersection path. Reject !LPAE ioremap ranges extending past 4GiB before phys_addr_t truncation, drop the now-unneeded high static-mapping exclusion, and reduce ioremap alignment from 16MiB to the 2MiB covered by a PMD's pair of sections. The other supersection user, create_36bit_mapping(), was added by commit 0b7cd62ecdc1 ("[ARM] 3017/1: Add support for 36-bit addresses to create_mapping()") for IXP2350 and carried IXP23xx's high static mappings. Before this change, its only remaining call path was efi_create_mapping() -> create_mapping_late(), for an EFI runtime region above 4GiB. No real-world user of this !LPAE path is known. AArch32 UEFI requires RAM described by its memory map to be identity-mapped during boot services, which a 32-bit virtual address space cannot provide above 4GiB. Systems needing wider physical addressing are expected to use LPAE. Remove create_36bit_mapping() and the supersection definitions. If firmware nevertheless advertises such a region on !LPAE, efi_create_mapping() rejects it before __pfn_to_phys() truncates its address to a low alias. EFI runtime services remain disabled, but the kernel continues to boot. LPAE kernels are unaffected. With no remaining !LPAE mappings above 4GiB, set MAX_PHYSMEM_BITS to 32 for !LPAE and retain 36 for LPAE, where phys_addr_t is 64-bit. Assisted-by: Claude:claude-fable-5 Link: https://lore.kernel.org/all/3c79d2dc-8fbd-40fc-8b2d-9d1b4f8ed34e@app.fastmail.com/ Link: https://lore.kernel.org/all/CAK8P3a2MCdUbN0QSb+M3g5_6HjPsaQwtKxFjADMZWomdry4-Ww@mail.gmail.com/ Fixes: 14b80582c43e ("resource: Introduce alloc_free_mem_region()") Signed-off-by: Karl Mehltretter Reviewed-by: Arnd Bergmann Signed-off-by: Russell King Signed-off-by: Sasha Levin commit 35ecb54916792d5f639353f8d24b9b7fda7812b1 Author: Atul Akella Date: Tue Oct 13 21:30:55 2026 +0530 rpmsg: virtio: fix error handling in TX buffer wait [ Upstream commit 7dd4cffdf4c2a496ccf783303a03d687a2127baf ] The TX buffer wait loop in rpmsg_send_offchannel_raw() ignores the possibility of wait_event_interruptible_timeout() returning a negative value, which happens when the wait is interrupted by a signal. In that case the loop spins back around and re-arms the wait instead of propagating the signal, which can stall a task that is trying to be killed. Separately, on a genuine timeout (return value 0) the function returns -ERESTARTSYS, which is reserved for signal-interrupted syscalls that the kernel may restart. A timeout is not a signal and should not be treated as restartable; return -ETIMEDOUT instead. Handle both cases explicitly: return err directly when negative, and return -ETIMEDOUT on timeout. Fixes: bcabbccabffe ("rpmsg: add virtio-based remote processor messaging bus") Signed-off-by: Atul Akella Link: https://lore.kernel.org/r/20261013160055.1362-1-atul.akella@gmail.com Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin commit 87fed7fb604ba5bae01fd43ce4ce057ef04634c9 Author: Avi Weiss Date: Tue Oct 13 10:47:44 2026 +0300 rpmsg: mtk: release channel OF node on device teardown [ Upstream commit 00e100cfbf7bc159e462df16832cddeaf2cab770 ] mtk_rpmsg_match_device_subnode() returns a referenced OF child node, which is stored in rpdev->dev.of_node. mtk_rpmsg_release_device() later frees the containing allocation without dropping that ref. Release the OF node when the RPMsg device is destroyed. Fixes: 7017996951fd ("rpmsg: add rpmsg support for mt8183 SCP.") Signed-off-by: Avi Weiss Link: https://lore.kernel.org/r/20261013074744.942560-1-thnkslprpt@gmail.com Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin commit 9a69ed8d17f1600f453890389b79a9fee940dbda Author: Le Qi Date: Wed Oct 14 14:53:21 2026 +0800 ASoC: codecs: da7213: Get MCLK in I2C probe [ Upstream commit 2923259d08b097bb3c39733f67e635a542ad8917 ] With deferrable card binding, a card that fails to bind is retried only when a new ASoC component is registered. da7213 requests its MCLK in the component probe callback, so if the clock provider registers late, the card bind defers and the provider's later registration never triggers a rebind, leaving the sound card unregistered. Request MCLK in the I2C probe instead, so a missing clock defers the codec driver probe through the driver core before the component is registered. Fixes: 42d99857d6f0 ("ASoC: core: Move all users to deferrable card binding") Signed-off-by: Le Qi Link: https://patch.msgid.link/20261014065321.740850-1-le.qi@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit ee9bf5f5accbf98a6f3ca8215abb0a1ffe2882de Author: HyeongJun An Date: Wed Oct 14 15:32:40 2026 +0900 ASoC: codecs: wm8510: Fix definition of ADC Inversion Switch control [ Upstream commit 22d50113078dfbeff0d005d64fd9cc680249831c ] ADC polarity is bit 0 of WM8510_ADC, not bit 0 of WM8510_COMP, which is the loopback enable. wm8974, which has the same register layout, already uses WM8974_ADC for this control. Fixes: 5d421516670e ("[ALSA] ASoC: Add WM8510 driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/6ada61df8c8fc97ffb1623e74f6742ca498032fa.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 12f4552d7da02c201606fcfebf5465201e17e47c Author: HyeongJun An Date: Wed Oct 14 15:32:39 2026 +0900 ASoC: codecs: wm8750: Fix definition of ALC Capture NG Type control [ Upstream commit 8c299077c787c151c5c88928467d8e8d85cebdb7 ] The noise gate type is wm8750_enum[7], bit 1 of WM8750_NGATE, not wm8750_enum[4], which is the 3D upper cut-off. Fixes: abadfc928a27 ("[ALSA] ASoC codecs: WM8750 support") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/ce530dfb932d9e8def75059ab9d669360adc76e8.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 703679a92321d803cd91e8f350b69b334cd4d669 Author: HyeongJun An Date: Wed Oct 14 15:32:38 2026 +0900 ASoC: codecs: wm5100: Fix definition of EQ3 Band 1 Volume control [ Upstream commit 96d30816a9a4fa6b3cc470f82d0f53e8a6425ab9 ] The EQ3 band 1 gain is in WM5100_EQ3_1, not in WM5100_EQ1_1, which holds the EQ1 band 1 gain. Fixes: 6d4baf084f4d ("ASoC: Add WM5100 driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/d7f690e391feda7a6d8f38d0b238b165bc1f4fe2.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 61b8263ec9f6cb54cb354ade5f030abdecf29840 Author: HyeongJun An Date: Wed Oct 14 15:32:37 2026 +0900 ASoC: codecs: wm8737: Fix definition of zero cross switches [ Upstream commit 121963197200ca89050f05a704f53c281702ec16 ] The mic (xMZC) and PGA (xPZC) zero cross bits are bits 3 and 2 of each channel's Audio Path register. SOC_DOUBLE takes one register and two shifts, so both controls only write the left register. Use SOC_DOUBLE_R, as the Mic Boost Switch next to them does. Fixes: 2a9ae13a2641 ("ASoC: Add initial WM8737 driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/36cab58287bd24955e73bfe3a6fb24cae8fad7b8.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d3d487e4a8ecb28eb0ee6f061f875d95bb92606f Author: HyeongJun An Date: Wed Oct 14 15:32:36 2026 +0900 ASoC: codecs: wm_hubs: Fix definition of MIXINR to MIXOUTR volume control [ Upstream commit 22bfcedd3febd6acc63ecf8bfd9638210e4b9a5e ] The Right Output Mixer Right Input Volume (MIXINR_MIXOUTR_VOL) is at bits 2:0 of Output Mixer6, not at bits 8:6, which hold the IN2LN volume (IN2LN_MIXOUTR_VOL). Fixes: 942c435ba79f ("ASoC: Add WM8993 CODEC driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/1ea1d115cea5b183dd51bba5cd9e38157b3482ee.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6c8f73e995ba7c0d1bf31a8db5d103582c8d10b9 Author: HyeongJun An Date: Wed Oct 14 15:32:35 2026 +0900 ASoC: codecs: wm8955: Fix definition of Treble Cutoff control [ Upstream commit 71911bf5bb3fe97da2124d17fc1dd3dbb9379e03 ] Treble cutoff (TC) is at bit 6 of Treble Control, not at bit 2, which is part of the treble volume (TRBL[3:0]). Fixes: 54db41c116c3 ("ASoC: wm8955: Use SOC_ENUM_SINGLE_DECL()") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/b398bc6dcf8dc2b93504608cdf952823ca238cd5.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 13393cbf3e90c5ce5e69c30fd8592cb9e60852a1 Author: HyeongJun An Date: Wed Oct 14 15:32:34 2026 +0900 ASoC: codecs: wm8994: Fix definition of WM8958 noise gate hold time controls [ Upstream commit 291d81d628f3453026b029507a26b856056e4fdc ] The noise gate hold time (NG_HLD) is at bits 6:5 of each WM8958 DAC noise gate register, not at bits 3:1, which hold the threshold (NG_THR). Fixes: 1ddc07d0f13a ("ASoC: Add WM8958 noise gate support") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/8acff0f7314eef9eb3d290ca7855a87052d7e706.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b4ef733e0886d7004931fc8053248a5b9ddca52f Author: HyeongJun An Date: Wed Oct 14 15:32:33 2026 +0900 ASoC: codecs: wm8985: Fix definition of ADC 128x Oversampling control [ Upstream commit a747ec6e12cf7a71e42567a479af18b930890d9d ] ADC 128x oversampling (ADCOSR128) is at bit 3 of ADC Control, not at bit 8, which is the high pass filter enable (HPFEN). Fixes: 6d6f8b832705 ("ASoC: WM8985: Initial driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/00ae032401aaad740b61d664c861b72d2e5ed520.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b69ac725177d3fa2452fb819df3f582ba93db46c Author: HyeongJun An Date: Wed Oct 14 15:32:32 2026 +0900 ASoC: codecs: wm8983: Fix definition of ADC 128x Oversampling control [ Upstream commit c1af9e2272f025ff75be76e03413074d5e7801c9 ] ADC 128x oversampling (ADCOSR128) is at bit 3 of ADC Control, not at bit 8, which is the high pass filter enable (HPFEN). Fixes: 6b3860b0a20a ("ASoC: WM8983: Initial driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/d6a5bbab35e1fd2bec5b13d30951546080d493a8.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b1a82e30bd1fa706bbdc7d7c9144e585372e2d50 Author: HyeongJun An Date: Wed Oct 14 15:32:31 2026 +0900 ASoC: codecs: wm8991: Fix definition of LOMIX AINLMUX Bypass Volume control [ Upstream commit fee722db39c2a1f18c944f747271fd1e131910a6 ] The LOMIX AINLMUX bypass volume (LLBLOVOL) is at bits 2:0 of Output Mixer5, not at bits 5:3, which hold the AINRMUX bypass volume (LRBLOVOL). Fixes: 203db220718c ("ASoC: WM8991: Add initial WM8991 driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/c6e230b0e7d7e3db2136cc751e0b563030dbc16d.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 1464a919a46154c229b5e59a6efdb77df3652dec Author: HyeongJun An Date: Wed Oct 14 15:32:30 2026 +0900 ASoC: codecs: wm8991: Fix definition of right input PGA controls [ Upstream commit 2dfecdc25d4937a36675c0c36ee0addc99e1e7f9 ] The right input PGA boost (R12MNBST, R34MNBST) and routing (R12MNB, R34MNB) bits are in Input Mixer4 (R42), not in Input Mixer3 (R41), where these controls write the left channel bits. Fixes: 203db220718c ("ASoC: WM8991: Add initial WM8991 driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/5c0196e45dff1769682d885fc26e613648e05436.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 1f37e81034fcc0214e1effcfc1fa80b41ac1d5ec Author: HyeongJun An Date: Wed Oct 14 15:32:29 2026 +0900 ASoC: codecs: wm8990: Fix definition of LOMIX AINLMUX Bypass Volume control [ Upstream commit 75e0b607e3456c9eb15dfb783984f814a89cbcaf ] The LOMIX AINLMUX bypass volume (LLBLOVOL) is at bits 2:0 of Output Mixer5, not at bits 5:3, which hold the AINRMUX bypass volume (LRBLOVOL). Fixes: f10485e79882 ("[ALSA] ASoC: Add WM8990 driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/87b3bfa7711b61d89c21044d02fb3242dd934385.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit bd34e66737eec3a8c8428839bd1b3177d7837a46 Author: HyeongJun An Date: Wed Oct 14 15:32:28 2026 +0900 ASoC: codecs: wm8990: Fix definition of right input PGA controls [ Upstream commit 5bd6d05197affaf5a2d7fae0e06e7373fd839b7c ] The right input PGA boost (R12MNBST, R34MNBST) and routing (R12MNB, R34MNB) bits are in Input Mixer4 (R42), not in Input Mixer3 (R41), where these controls write the left channel bits. Fixes: f10485e79882 ("[ALSA] ASoC: Add WM8990 driver") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: HyeongJun An Reviewed-by: Charles Keepax Link: https://patch.msgid.link/818cf8d7ae81fa46c67cd5b4d01291a63f44c9a1.1791959026.git.sammiee5311@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit aff2e23f6c6bcf1885f1549e2fe4159dfd114dae Author: Pengpeng Hou Date: Sun Sep 20 11:37:37 2026 +0800 PCI: eswin: Publish the platform driver OF alias [ Upstream commit e564a064a2d61641d6c5068d41e677e6180aa5b8 ] PCIE_ESWIN is tristate and eswin_pcie_driver uses an OF match table, but the table is not exported. The resulting module lacks the OF alias needed for automatic loading on an ESWIN PCIe host controller. Export the OF table. Keep builtin_platform_driver() and the intentional absence of an unregister path unchanged; module alias publication does not require making this interrupt-controller driver unloadable. The issue was found by our static-analysis tool. Assisted-by: LLM Fixes: b593c26d081a ("PCI: eswin: Add ESWIN PCIe Root Complex driver") Signed-off-by: Pengpeng Hou Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260920033737.13957-1-hppiscas@163.com Signed-off-by: Sasha Levin commit 0a0f7b9d4d952788b7bbe27af1ae773682a4857c Author: Tim Douglas Date: Mon Oct 12 21:35:41 2026 -0400 serial: pmac_zilog: report received breaks [ Upstream commit 8db79ea07a67b126c773da6efdc00066000daeb8 ] pmz_status_handle() sets PMACZILOG_FLAG_BREAK from RR0, and pmz_receive_chars() clears it on the null character that ends the break without marking that character, then tests BRK_ABRT in RR1, where the SCC does not set it in asynchronous mode. Breaks therefore arrive as plain NULs: brk is never counted and BRKINT, PARMRK and SysRq never see them. Set BRK_ABRT in r1 for that character, as sunzilog does. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Assisted-by: LLM Signed-off-by: Tim Douglas Link: https://patch.msgid.link/20261013013541.4535-3-me@timdoug.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit ea5509f66ed63f35f91b37bb3db7e047179dbd7f Author: Karl Mehltretter Date: Mon Oct 12 07:53:40 2026 +0200 serial: ma35d1: Do not force-enable an unselected console [ Upstream commit 171bb8a67cc1af7c88a65961adfb028430e0b783 ] When another console is selected and there is no matching ttyNVT console argument, the core accepts the MA35D1 console without calling its setup function because it has CON_ENABLED set before registration. Its index remains -1 and printk repeatedly reports an invalid port, flooding the console and preventing boot. Let the console core enable it after successful setup. Fixes: 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20261012055340.16719-1-kmehltretter@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 2b55817474f22aa72da12db2be490187d57b16d5 Author: Muhammad Bilal Date: Wed Oct 7 18:47:11 2026 +0500 platform/x86: hp-bioscfg: fix oops on short integer attribute buffer [ Upstream commit fd7545cd398adc09ec2f9b603d72671560ee6bf9 ] hp_populate_integer_elements_from_buffer() ignores the return value of hp_get_string_from_buffer(). When fewer than 2 bytes are left in the buffer, dst_size is 0, kcalloc() returns ZERO_SIZE_PTR and hp_get_string_from_buffer() fails without writing to it, so kstrtoint() faults on address 0x10. Return the error instead. Compile tested only. Fixes: 6f2c06d5a467 ("platform/x86: hp-bioscfg: int-attributes") Signed-off-by: Muhammad Bilal Link: https://lore.kernel.org/all/20261007134711.473857-1-meatuni001@gmail.com/ Link: https://patch.msgid.link/20261007134711.473857-10-meatuni001@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 3aa66f4d7401e3fcb6ac9e27848ef4b4ac6d7bc7 Author: Muhammad Bilal Date: Wed Oct 7 18:47:09 2026 +0500 platform/x86: hp-bioscfg: validate SPM state returned by firmware [ Upstream commit 35fb43f1576e1352077afc33a535007e0568480c ] status_show() indexes the 3-entry spm_state_types[] with the state byte returned by firmware. update_spm_state() stores the same byte, which key_mechanism_show() uses to index the 3-entry spm_mechanism_types[]. Neither is range checked, so a state above 2 makes the world-readable status and key_mechanism files print a string from a pointer read past the array. Return -EIO for an out of range state. Compile tested only. Fixes: b2715aa2e135 ("platform/x86: hp-bioscfg: spmobj-attributes") Signed-off-by: Muhammad Bilal Link: https://patch.msgid.link/20261007134711.473857-8-meatuni001@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 6650c354a3dbc9df4e2d808ab4c4a50c508f94c4 Author: Muhammad Bilal Date: Wed Oct 7 18:47:07 2026 +0500 platform/x86: hp-bioscfg: fix off-by-one in password length check [ Upstream commit 0c22178524864af85ea380be4b2d36078c0edc9c ] current_password and new_password hold MAX_PASSWD_SIZE bytes including the NUL, but validate_password_input() accepts a password of exactly MAX_PASSWD_SIZE characters when the firmware limits allow it. strscpy() then truncates it and fails with -E2BIG, which store_password_instance() ignores, so the write reports success with a truncated password stored. For example, with a max_password_length of 64 or more, writing 64 characters succeeds but only 63 are stored. Reject lengths of MAX_PASSWD_SIZE or more. Compile tested only. Fixes: 8646a3b5ee3a ("platform/x86: hp-bioscfg: passwdobj-attributes") Signed-off-by: Muhammad Bilal Link: https://lore.kernel.org/all/20261007134711.473857-1-meatuni001@gmail.com/ Link: https://patch.msgid.link/20261007134711.473857-6-meatuni001@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 945ef8b8df06f72850bfa21800d2c2cc7bb3ce78 Author: Leon Romanovsky Date: Tue Oct 13 14:44:09 2026 +0300 dma-debug: Skip cacheline tracking for MMIO mappings [ Upstream commit 4733f2966433b7f926f70c9dc461c33cd5c10835 ] Mapping one MMIO dma-buf for many RDMA importers overflows dma-debug's cacheline overlap counter and triggers a warning. DMA_ATTR_MMIO mappings must never be CPU-cacheable, so CPU cacheline overlap tracking does not apply to them. Skip MMIO entries in both cacheline insertion and removal. Keep them in the DMA entry hash so mapping and unmapping checks still run. The reported warning was: ------------[ cut here ]------------ DMA-API: exceeded 7 overlapping mappings of cacheline 0x000000e040000400 WARNING: kernel/dma/debug.c:465 at add_dma_entry+0x3b5/0x470, CPU#58: dtr/5264 Modules linked in: xt_conntrack xt_MASQUERADE ip6table_nat ip6table_filter ip6_tables iptable_nat nf_nat xt_addrtype rpcsec_gss_krb5 krb5 auth_rpcgss oid_registry overlay rpcrdma rdma_ucm ib_uverbs ib_iser libiscsi scsi_transport_iscsi ib_umad rdma_cm ib_ipoib iw_cm ib_cm nvidia(O) mlx5_fwctl nvidia_drm(O) mlx5_ib ib_uverbs_support ib_core zram zsmalloc fuse mlx5_core CPU: 58 UID: 0 PID: 5264 Comm: dtr Tainted: G O J 7.3.0-rc6_for_upstream_debug_2026_10_08_13_46 #1.fc40 PREEMPTLAZY Tainted: [O]=OOT_MODULE, [J]=FWCTL Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014 RIP: 0010:add_dma_entry+0x3bf/0x470 Code: ac e8 f5 89 6e 00 e9 47 fe ff ff 41 f7 c6 00 18 00 00 75 9f 83 fb 07 7e 9a 48 8d 3d eb 02 5f 04 be 07 00 00 00 48 8d 54 24 30 <67> 48 0f b9 3a eb 82 0f 0b 48 c7 c7 80 d3 2a 85 4c 89 e6 e8 a9 1f RSP: 0018:ff110001bcb7f230 EFLAGS: 00010002 RAX: 0000000000000006 RBX: 0000000000000008 RCX: 0000000000000000 RDX: ff110001bcb7f260 RSI: 0000000000000007 RDI: ffffffff85cfd070 RBP: 000000e040000400 R08: 0000000000000000 R09: ffe21c0044b8abf5 R10: ff11000225c55faf R11: 0000000000000000 R12: 0000000000000246 R13: 1fe220003796fe48 R14: 0000000000000400 R15: 00000000ffffffff FS: 00007fa8f91e6b80(0000) GS:ff11000eb81cc000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fa8f5ca80f0 CR3: 0000000164871004 CR4: 0000000000373eb0 Call Trace: ? check_sync+0x2070/0x2070 ? find_held_lock+0x2b/0x80 ? debug_dma_map_phys+0x588/0x840 debug_dma_map_phys+0x267/0x840 ? dma_debug_add_bus+0xd0/0xd0 ? __sg_alloc_table+0x2b7/0x4d0 dma_map_phys+0x10a/0x330 ? sg_miter_start+0x130/0x130 dma_buf_phys_vec_to_sgt+0x565/0xed0 uverbs_dmabuf_map+0x158/0x340 [ib_uverbs] ? uverbs_dmabuf_unpin+0x10/0x10 [ib_uverbs] dma_buf_map_attachment+0x138/0x690 ib_umem_dmabuf_map_pages+0x249/0xc90 [ib_core] pagefault_dmabuf_mr+0x172/0xf80 [mlx5_ib] ? do_raw_spin_unlock+0x54/0x210 mlx5_ib_init_dmabuf_mr+0x13e/0x200 [mlx5_ib] [... '?' frames and user-space registers omitted ...] reg_user_mr_dmabuf+0x3bf/0x760 [mlx5_ib] mlx5_ib_reg_user_mr_dmabuf+0x2dd/0x13b0 [mlx5_ib] ib_uverbs_handler_UVERBS_METHOD_REG_MR+0x76d/0xd90 [ib_uverbs] ib_uverbs_cmd_verbs+0x2337/0x31c0 [ib_uverbs] ib_uverbs_ioctl+0x1c7/0x350 [ib_uverbs] __x64_sys_ioctl+0x72c/0x11f0 do_syscall_64+0xa1/0x4f0 entry_SYSCALL_64_after_hwframe+0x4b/0x53 ---[ end trace 0000000000000000 ]--- Signed-off-by: Leon Romanovsky Reviewed-by: Robin Murphy Fixes: 3aa31a8bb11e ("dma-buf: provide phys_vec to scatter-gather mapping routine") Link: https://lore.kernel.org/r/20261013-dma-debug-fixes-v1-1-1ad1f471cc61@nvidia.com Signed-off-by: Marek Szyprowski Signed-off-by: Sasha Levin commit ac38ef8274d07329afe427aa5a9cdaa65a136293 Author: Cen Zhang Date: Wed Oct 14 18:52:15 2026 +0800 ALSA: pcm: Unlink substreams before releasing them [ Upstream commit d1e57f8fb7a6b6d32a4aaa31fd6fc4c77339608f ] A closing PCM substream can remain in its linked group after the driver close callback has freed its private data. With two configured dummy capture substreams on the same PCM device, linked with LINK, PREPARE on the surviving substream can still visit the closing member: Final close of A PREPARE on linked B ---------------- ------------------- snd_pcm_drop(): group -> SETUP do_hw_free(A) dummy_pcm_close(A): free dpcm Take snd_pcm_link_rwsem for reading Walk the group, including A dummy_pcm_prepare(A) Read freed timer_ops pcm_release_private(A) snd_pcm_unlink(A) Unlink at the start of final substream release, before dropping the stream or releasing driver resources. The link write lock waits for an existing group PREPARE, and unlink removes the closing member from later group actions. Keep the existing stop synchronization in do_hw_free() before the driver resources are freed. Make unlink independent of the pcm_release callback so OSS substreams are covered too. Remove the native-only unlink callback and its registration, while retaining the callback hook for OSS cleanup. The existing KASAN report below records the freed timer_ops read in dummy_pcm_prepare(). KASAN report as below: BUG: KASAN: slab-use-after-free in dummy_pcm_prepare+0xb7/0xc0 Read of size 8 at addr ffff888106b35f00 by task alsa_pcm_fixtur/491 Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? dummy_pcm_prepare+0xb7/0xc0 ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? dummy_pcm_prepare+0xb7/0xc0 kasan_report+0xe0/0x110 ? dummy_pcm_prepare+0xb7/0xc0 dummy_pcm_prepare+0xb7/0xc0 snd_pcm_do_prepare+0x71/0xb0 snd_pcm_action_group+0x505/0xb30 snd_pcm_action_nonatomic+0xab/0x150 snd_pcm_common_ioctl+0x1bf5/0x3a50 ? srso_alias_return_thunk+0x5/0xfbef5 ? do_vfs_ioctl+0x1f5/0x1280 ? __pfx_do_vfs_ioctl+0x10/0x10 ? ioctl_has_perm.constprop.0.isra.0+0x34f/0x500 ? __pfx_snd_pcm_common_ioctl+0x10/0x10 ? __fput+0x5ba/0xa60 ? srso_alias_return_thunk+0x5/0xfbef5 snd_pcm_ioctl+0x76/0xb0 ? __pfx_snd_pcm_ioctl+0x10/0x10 __x64_sys_ioctl+0x163/0x1d0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x41ee8d Code: 04 25 28 00 00 00 48 89 45 c8 31 c0 48 8d 45 10 c7 45 b0 10 00 00 00 48 89 45 b8 48 8d 45 d0 48 89 45 c0 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1a 48 8b 45 c8 64 48 2b 04 25 28 00 00 00 RSP: 002b:00007ffcfa72fb60 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 000000000041ee8d RDX: 0000000000000000 RSI: 0000000000004140 RDI: 0000000000000004 RBP: 00007ffcfa72fbb0 R08: 00007ffcfa72fb98 R09: 0000000000000110 R10: 0000000000000001 R11: 0000000000000246 R12: 00007ffcfa72fcd8 R13: 00007ffcfa72fcf0 R14: 00000000004a8f28 R15: 0000000000000001 Allocated by task 488: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_cache_noprof+0x251/0x610 dummy_hrtimer_create+0x4a/0x170 dummy_pcm_open+0xe7/0x730 snd_pcm_open_substream+0x926/0x1580 snd_pcm_open+0x28d/0x6d0 snd_pcm_capture_open+0x82/0xe0 snd_open+0x1ec/0x3e0 chrdev_open+0x21f/0x660 do_dentry_open+0x5c8/0x1300 vfs_open+0x87/0x390 path_openat+0x2460/0x3cd0 do_file_open+0x21e/0x470 do_sys_openat2+0xf4/0x1b0 __x64_sys_openat+0x136/0x1e0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 490: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x307/0x580 dummy_hrtimer_free+0x72/0xe0 dummy_pcm_close+0x9f/0xd0 snd_pcm_release_substream.part.0+0x104/0x310 snd_pcm_release+0x106/0x240 __fput+0x39f/0xa60 fput_close_sync+0xff/0x200 __x64_sys_close+0x8c/0xf0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f ================================================================== Fixes: 1576274d3028 ("[ALSA] Fix Oops of PCM OSS emulation") Suggested-by: Takashi Iwai Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-9c80f858ccc13b3de84d-v7-fcd8c7aa0e837bf0b036@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 375a029a5209da6b0dcd1ba4e5e756282bdcb866 Author: Kohei Enju Date: Wed Oct 14 11:43:23 2026 +0900 arm64: rsi: Correct type of realm_config::hash_algo [ Upstream commit c83237edf0adb8f8cbd9859841bbca5acc00fc11 ] The RMM specification (DEN0137, B5.5.10 and B5.5.19) defines RsiHashAlgorithm as an 8-bit enumeration, stored at offset 0x8 of RsiRealmConfig, with the unused bits of the structure being MBZ. However, realm_config::hash_algo is declared as unsigned long. For an RMM that zeroes the unused bits, the wider type gives the same value. An RMM that only writes the low byte (as TF-RMM currently does) leaves bytes 1-7 with whatever the guest buffer contained, so a comparison of the 64-bit field against RSI_HASH_SHA_* can fail. Nothing in mainline reads the field yet, but the proposed Realm measurement register support does. Declare the field as u8 so the guest only depends on the byte the specification defines. The struct size and the offsets of the other fields do not change. Link: https://lore.kernel.org/all/20260413084957.327661-4-sami.mujawar@arm.com/ Fixes: b880a80011f5 ("arm64: rsi: Add RSI definitions") Signed-off-by: Kohei Enju Reviewed-by: Suzuki K Poulose Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin commit 7485cb45d9c628c0387d9f7d5f18d8ae3955d499 Author: Johannes Berg Date: Tue Oct 13 15:12:58 2026 +0200 wifi: cfg80211: track SSID regardless of country data [ Upstream commit 577f690ce5dc641d9d8646d15bb8e99ff4a8280e ] If the country data cannot be found, the function exits and then doesn't track the SSID. Move the SSID tracking up to fix that. Fixes: c38c70185101 ("wifi: cfg80211: Set SSID if it is not already set") Link: https://patch.msgid.link/20261013151258.7fbca481c328.I7beb03fb4309698bdcfade57c6804573f96eeb18@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit b238f152ea3d23589cbe331b4fa11adaf1a552b1 Author: Shang En Sim Date: Wed Sep 30 22:10:11 2026 -0500 platform/x86: hp-wmi: Fix hwmon keep-alive teardown [ Upstream commit 574245e62cb09e159b4c37e1a9091c100448b5c3 ] hp_wmi_hwmon_init() initialises keep_alive_dwork with INIT_DELAYED_WORK() and relies on hp_wmi_bios_remove() to cancel it. Nothing cancels the work if probe fails after hp_wmi_hwmon_init() has run, so the devm-managed priv can be freed while the work is still pending. The ordering is also wrong on both ends. The work is initialised only after the hwmon device is registered, so a sysfs write to pwm1_enable can schedule an uninitialised work item. On removal, the work is cancelled in .remove(), before devres unregisters the hwmon device, so a sysfs write can requeue it after the cancel. Use devm_delayed_work_autocancel() and set it up before registering the hwmon device. devres then cancels the work on every teardown path, after the hwmon sysfs interface has been removed and before priv and its mutex are released. Drop the now-unneeded cancel in hp_wmi_bios_remove() and the platform drvdata that was only used for it. Fixes: c203c59fb5de ("platform/x86: hp-wmi: implement fan keep-alive") Suggested-by: Ilpo Järvinen Signed-off-by: Shang En Sim Link: https://patch.msgid.link/20261001031012.48473-2-sim@shangen.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit bb53343912435e7fa0bc9bbe4f7087690624420a Author: Julian Anastasov Date: Mon Sep 28 00:08:07 2026 +0200 ipvs: fix buffer overflow when sending sync messages [ Upstream commit 3e3fe49e8678c1a3d535ed02f32a9a6e80674263 ] Sashiko reports for possible heap buffer overflow when generating sync message for the v0 and v1 message formats. We should read the cp->flags only once because another CPU can concurrently set the SEQ_MASK between the two reads. Note that IPVS does not set the SEQ_MASK anymore for the ip_vs_ftp.c helper starting from commit 7f1c40757951 ("IPVS: make FTP work with full NAT support") (2.6.36+), so the problem should not be reproducible. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://sashiko.dev/#/patchset/20260903004149.1037028-1-pablo%40netfilter.org Link: https://sashiko.dev/#/patchset/20260909111338.44357-1-ja%40ssi.bg Signed-off-by: Julian Anastasov Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 13107a8c842e95a0d4d55fd7de4e9ff3d73355d7 Author: Endrik Einberg Date: Mon Oct 5 17:42:25 2026 +0300 wifi: iwlwifi: mld: include VI packets in low latency detection [ Upstream commit 3627924ed81fd7783394fb2555ea179c6606a231 ] iwl_mld_is_vo_vi_pkt() checks whether the mapped access category is less than IEEE80211_AC_VI. Since mac80211 defines IEEE80211_AC_VO as 0 and IEEE80211_AC_VI as 1, this only matches voice traffic and excludes video traffic. Synthetic video-priority UDP traffic does not automatically activate low-latency mode, whereas voice-priority traffic does Include IEEE80211_AC_VI as intended. Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver") Signed-off-by: Endrik Einberg Link: https://patch.msgid.link/20261005144225.170280-1-git@endrik.dev Signed-off-by: Miri Korenblit Signed-off-by: Sasha Levin commit a94f50d95ba3394699b66240056370dd225b0195 Author: Emmanuel Grumbach Date: Sun Oct 11 14:07:03 2026 +0300 wifi: iwlwifi: mvm: fix the VHT MCS sent to a v1 firmware [ Upstream commit a2f60db1c1514c7d083b5c0c8b9510b1adf0cc2c ] When converting a v3 rate to the v1 format, the MCS index was read from the mask of the NSS field and written into the mask of the MCS field. This is obviously wrong, we must not mix the NSS and the MCS. Fixes: 3592c0083fb2 ("wifi: iwlwifi: mvm: fix beacon template/fixed rate") Assisted-by: LLM Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20261011140453.dfca0c8b560a.I7a3e1f0e91f0d0c6f4c5f1e6a33dc7c0c5e9ad11@changeid Signed-off-by: Miri Korenblit Signed-off-by: Sasha Levin commit eb3af38c3ae90a038426a4b2bc67a9233b49638e Author: Binbin Deng <18983559317@163.com> Date: Sat Oct 10 16:03:56 2026 +0800 module: Fix uninitialized count read of unloaded taint tracking record [ Upstream commit 7a5c13cfdfcb1871050fdbe00ac223993f8925fa ] try_add_tainted_module() allocates the tracking record without zeroing it and initializes the fields in this order: mod_taint = kmalloc_obj(*mod_taint); strscpy(mod_taint->name, mod->name, MODULE_NAME_LEN); mod_taint->taints = mod->taints; list_add_rcu(&mod_taint->list, &unloaded_tainted_modules); mod_taint->count = 1; The record is published by list_add_rcu() before the count field is written. The readers, unloaded_tainted_modules_seq_show() (debugfs, under rcu_read_lock()) and print_unloaded_tainted_modules() (panic path, under guard(rcu)), traverse the list under RCU and read mod_taint->count. module_mutex, which the writer holds, does not exclude RCU readers. A reader that observes the new node between the list_add_rcu() and the count store reads an uninitialized u64 left over from previous slab use. This is a data race and leaks kernel heap residue through the debugfs file and the panic message. The race window is two adjacent instructions; it is reachable when a tainted module is unloaded (rmmod) concurrently with a read of /sys/kernel/debug/module/unloaded_tainted, or with the module list printout of an oops on another CPU. Fix this by initializing count before the record is published. Found during a static-analysis-assisted audit: candidate sites were surfaced by a Coccinelle rule, and the reader/writer paths were confirmed by LLM-assisted (GLM-5.3) code inspection. The issue was not observed at runtime; it is identified by code inspection only. Fixes: 99bd9956551b ("module: Introduce module unload taint tracking") Signed-off-by: Binbin Deng <18983559317@163.com> Signed-off-by: Petr Pavlu Signed-off-by: Sasha Levin commit a3df4a6f03b15800a0f3c5520b9a5c6ce66f9138 Author: Kees Cook Date: Tue Oct 13 22:23:42 2026 -0700 mm/slab: Mark the kmem_buckets_create() context as a Context: section [ Upstream commit 655668f0caf32a42fef10aaf31137e52f46a0260 ] kmem_buckets_create() had the same sentence about calling context as kmem_cache_create(), but lacked the "Context:" prefix, so kernel-doc rendered in the body instead of as a "context" section. Give it the missing prefix. Additionally fix the "a interrupt" typo __kmem_cache_create_args() had. Fixes: b32801d1255be ("mm/slab: Introduce kmem_buckets_create() and family") Reviewed-by: Harry Yoo (Meta) Acked-by: Pedro Falcato Reviewed-by: Hao Li Acked-by: Vlastimil Babka (SUSE) Signed-off-by: Kees Cook Link: https://patch.msgid.link/20261014052344.384723-1-kees@kernel.org Signed-off-by: Vlastimil Babka (SUSE) Signed-off-by: Sasha Levin commit 09cdeae1876e3beddfa1a852ecc3e360ebb27292 Author: Pengpeng Hou Date: Wed Oct 14 11:18:14 2026 +0800 thermal/drivers/rzg3e: Propagate reset assertion failure from suspend [ Upstream commit 2dc1f296b5754dd2441fc8b6613a362a47f6b98f ] rzg3e_thermal_suspend() powers off an active sensor and then ignores failure to assert its reset. System sleep can therefore continue without the clean reset state expected by resume. Return the reset error and, when the sensor had been active, try to restore power before failing suspend. This is best-effort recovery: reset assertion failure may leave partial hardware state, so restoring power is not guaranteed to succeed. Preserve the original reset error. The issue was found by our static-analysis tool and manually reviewed. Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Signed-off-by: Daniel Lezcano Reviewed-by: Claudiu Beznea Link: https://patch.msgid.link/20261014031814.7230-1-hppiscas@163.com Signed-off-by: Sasha Levin commit ccb0ff1a053b2c482aee31bfc9789133901a2519 Author: Karl Mehltretter Date: Sat Sep 12 08:22:52 2026 +0200 thermal: ti-soc-thermal: Fix the return value in ti_bandgap_get_sensor_data() kernel-doc [ Upstream commit 82bb005cd9cf5a9df4cfe4a52db90346ac5fd17a ] ti_bandgap_get_sensor_data() returns an ERR_PTR() if the bandgap instance or sensor ID is invalid. Otherwise it returns the stored sensor data, which can be NULL if no data has been set or the stored value has been cleared. This mismatch was already present in omap_bandgap_get_sensor_data() when the driver was introduced in staging. Document the validation errors while retaining NULL as a possible stored value. Fixes: 8feaf0ce1a04 ("staging: OMAP4+: thermal: introduce bandgap temperature sensor") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260912062252.42762-1-kmehltretter@gmail.com Signed-off-by: Sasha Levin commit 6d7c155bb336eaafff75d0b7950aafb13ea2ce78 Author: Ronald Claveau Date: Wed Sep 23 16:37:51 2026 +0200 thermal/drivers/amlogic: Switch to clk_bulk API to support multiple clocks [ Upstream commit 44b39b4fb0f069a3bbe6bfb21a34d2d3730f393a ] The t7-thermal variant now exposes two clocks (bus and core) in its devicetree binding, but the driver only knows how to get and manage a single struct clk. Using devm_clk_get() would silently ignore the second clock, so switch to devm_clk_bulk_get_all() and the matching clk_bulk_prepare_enable()/clk_bulk_disable_unprepare() calls. This lets the driver transparently handle however many clocks a given compatible declares, without needing per-variant clock-handling code, and keeps working for existing SoCs that only have one. Fixes: 18d65de8157c ("thermal/drivers/amlogic: Add support for secure monitor calibration readout") Signed-off-by: Ronald Claveau Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260923-fix-t7-thermal-clock-v2-2-bff7a09eb487@aliel.fr Signed-off-by: Sasha Levin commit e0a9bf4b8a0d83aeb5f865c80b230c49188f1972 Author: Ronald Claveau Date: Wed Sep 23 16:37:50 2026 +0200 dt-bindings: thermal: amlogic: describe bus clock for t7-thermal [ Upstream commit 8195b945794ca3a917131b8a5368bb61e687c927 ] The t7 thermal sensor needs a bus clock, in addition to the existing functional clock, to gate register access to the sensor. This bus clock is specific to each sensor, unlike the functional clock which is shared between sensors. The current binding only describes a single unnamed clock and therefore cannot represent this hardware requirement, so add a second clock entry and clock-names for clarity. Make the second clock mandatory for the t7-thermal compatible only, via an additional if/then/else, to avoid breaking other Amlogic SoCs that still use a single clock. Update the t7 example to match. Fixes: b1c8ccdbd4e9 ("dt-bindings: thermal: amlogic: Add support for T7") Signed-off-by: Ronald Claveau Signed-off-by: Daniel Lezcano Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260923-fix-t7-thermal-clock-v2-1-bff7a09eb487@aliel.fr Signed-off-by: Sasha Levin commit 47527fb7ceb0c539329a477343de7bc1c596583c Author: Florian Fainelli Date: Tue Sep 29 13:19:51 2026 -0700 tools/thermal/tmon: Fix string truncation warning in optarg copy [ Upstream commit 602da762f7a7c494a95cb204ac005965b214e556 ] GCC warns about possible string truncation with -Wstringop-truncation: tmon.c: In function ‘main’: tmon.c:233:25: warning: ‘__builtin_strncpy’ specified bound 20 equals destination size [-Wstringop-truncation] 233 | strncpy(ctrl_cdev, optarg, CDEV_NAME_SIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Replace strncpy() with snprintf() to guarantee NUL-termination and silence the compiler warning. Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal subsystem") Signed-off-by: Florian Fainelli Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260929201951.408456-1-florian.fainelli@broadcom.com Signed-off-by: Sasha Levin commit 289ce6e6c55cdab47f60c91d31af99b3d5a8b48d Author: Vitaliy Sochnev Date: Tue Sep 29 19:52:06 2026 +0300 thermal/drivers/airoha: Fix AN7583 ADC mux field mapping [ Upstream commit 4a0f3193c68eb41882ccf7c298f5cd0b17efb8ab ] On AN7583, bits 3:1 of 0x2e4 select the sensor (0 bandgap, 5 GbE, 6 CPU) and bits 3:2 of 0x2a0 select the diode (0 D0, 1 ZERO, 2 D1). The driver names them the other way round: MUX_TADC is 0x2e4, MUX_SENSOR is 0x2a0. v5 of the AN7583 series swapped the airoha_set_thermal_mux() arguments to match these names. The diode index now goes to the sensor selector, so the zone reads mux positions 1, 0 and 2 (PAD_AVS, bandgap, core voltage) instead of the bandgap diodes. On a Nokia XG-040G-MF the result crosses the critical trip and the board powers off during boot. Swap the field definitions. MUX_TADC then selects the diode, as on EN7581, and the existing call order is correct. Fixes: b20d9782756a ("thermal/drivers/airoha: Add support for AN7583 Thermal Sensor") Signed-off-by: Vitaliy Sochnev Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260929165209.69669-2-sochnev.v.74@gmail.com Signed-off-by: Sasha Levin commit 92d81fb62050a7da1c2bfb998ab6319aec1fdb3e Author: Weigang He Date: Sat Sep 26 14:27:57 2026 +1000 thermal/drivers/sprd: validate the sensor id from the device tree [ Upstream commit b17d799ce49bfaad68be5ff3df995b3bd021a9d7 ] sprd_thm_probe() reads each sensor child node's "reg" property into sen->id and uses it without validation: to compute the sensor's register offsets in sprd_thm_sensor_init(), as the thermal zone id, and finally as an index into thm->sensor[], which has SPRD_THM_MAX_SENSOR (8) entries: ret = of_property_read_u32(sen_child, "reg", &sen->id); ... thm->sensor[sen->id] = sen; Only the number of sensor nodes is checked against SPRD_THM_MAX_SENSOR. A "reg" value of 8 or more, or one that is negative once stored in the int sen->id, makes the register offsets point outside the sensor range and the final store land outside thm->sensor[], overwriting the fields that follow it in struct sprd_thermal_data or other memory. Reject an out-of-range id right after reading it, before it is used. This does not address sparse ids, such as a single sensor with id 7: they leave holes in thm->sensor[] that the later loops over 0..nr_sensors-1 dereference. That needs a separate fix. Found by static analysis tool CodeQL. Fixes: 554fdbaf19b1 ("thermal: sprd: Add Spreadtrum thermal driver support") Assisted-by: LLM codeql Signed-off-by: Weigang He Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260926042757.2109927-1-geoffreyhe2@gmail.com Signed-off-by: Sasha Levin commit 0ff4e0d78710ee752851fab6d792aaa59aa6a435 Author: Takashi Iwai Date: Wed Oct 14 08:14:05 2026 +0200 ALSA: usb-audio: Use fixed control index for us16x08 mixer elements [ Upstream commit a68a688ce220f1b359bec53fa38d1504314dc70f ] The callbacks for us16x08 mixer elements assume that id.index points to the channel to be operated, and the assumption is correct for now. However, since the kctls are added via snd_usb_mixer_add_control() and it looks for the empty slot if the same control name is already present, in theory, the index can become more than the channel numbers (if a conflicting name really happens). Since the mixer code in us16x08 doesn't need the search for an empty slot but requires the fixed index, this patch changes slightly how to assign the kcontrols. Now, a new argument is added to snd_usb_mixer_add_list() in order to disable the empty slot search, and use it in us16x08's add_new_ctl() helper function, instead. Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Reported-by: Sashiko Link: https://patch.msgid.link/20261014061406.162938-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 9069fdb9496afb91e8eeca51f19109cc4602e189 Author: Karl Mehltretter Date: Sat Oct 3 21:22:56 2026 +0200 wifi: nxpwifi: return timeout error from nxpwifi_sdio_poll_card_status() [ Upstream commit f86bc8a7421defdff701addfb66b286c13abf024 ] nxpwifi_sdio_poll_card_status() returns the result of the last register read when polling times out. If the final register read succeeds, the timeout is incorrectly reported as success. Return -ETIMEDOUT when polling runs out of retries. Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Jeff Chen Signed-off-by: Sasha Levin commit b6564204d6ee1430735ffad8d4028554033649de Author: Cen Zhang Date: Wed Oct 14 11:59:49 2026 +0800 ALSA: vmaster: Serialize hook registration with control callbacks [ Upstream commit 6215cf3ff5b0ff1ca5ab66b79021f9e28b02eae1 ] An HDA virtual-master hook must have its private argument initialized before a control callback can invoke it. snd_hda_add_vmaster_hook() installs the trampoline through snd_ctl_add_vmaster_hook(), which stores master->hook before master->hook_private_data without serialization. When a codec with a vmaster mute hook binds to an already registered card, snd_hda_gen_build_controls() publishes and initializes the Master Playback Switch before installing the hook. A native write that changes the switch can then run in the following order: 1. The codec bind path publishes and initializes the master control in __snd_hda_add_vmaster(), then calls snd_hda_add_vmaster_hook(). 2. The hook setter stores master->hook, but has not yet stored its private argument. 3. SNDRV_CTL_IOCTL_ELEM_WRITE takes controls_rwsem and calls master_put() while the setter remains between those stores. 4. master_put() sees the callback and invokes vmaster_hook() with a NULL argument. The trampoline dereferences it before the setter can complete publication. The write lock held by snd_ctl_elem_write() does not exclude the hook setter, so this can cause a NULL pointer dereference. Take the same controls_rwsem for writing inside snd_ctl_add_vmaster_hook() so the callback and its argument are installed together with respect to native control callbacks. Pass the card into the helper and update the HDA caller, keeping the lock in the ALSA core. Release it when registration returns, before the caller synchronizes the hook. KASAN report as below: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000001: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000008-0x000000000000000f] CPU: 1 UID: 0 PID: 499 Comm: alsa-vmaster-tr Not tainted 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:vmaster_hook+0x35/0xb0 Code: f5 53 48 89 fb 48 83 ec 08 e8 57 f0 9a fc eb 50 e8 50 f0 9a fc 48 8d 7b 08 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 <80> 3c 02 00 75 59 48 8d 7b 10 48 8b 43 08 48 ba 00 00 00 00 00 fc RSP: 0018:ffff888117647cd0 EFLAGS: 00010212 RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffffff84e9ff50 RDX: 0000000000000001 RSI: 0000000000000000 RDI: 0000000000000008 RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff89427457 R11: ffff888115ad1d00 R12: ffffffff84e9ff30 R13: ffff888114943ca0 R14: 0000000000000000 R15: 0000000000000001 FS: 00007fe8167b3780(0000) GS:ffff88826b7e3000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000557c8c2842a8 CR3: 000000011579f005 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: master_put+0x20e/0x2b0 snd_ctl_elem_write+0x37f/0x5e0 snd_ctl_ioctl+0x997/0xdd0 ? __pfx_snd_ctl_ioctl+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? selinux_file_ioctl+0xaa/0x280 ? __pfx_snd_ctl_ioctl+0x10/0x10 __x64_sys_ioctl+0x163/0x1d0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe8168c291b Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007fffab0cb150 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007fe8168c291b RDX: 00007fffab0cb310 RSI: 00000000c4c85513 RDI: 0000000000000003 RBP: 00007fffab0cb310 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007fffab0cb1c0 R14: 0000000000000001 R15: 0000557c4f71fd10 Modules linked in: ---[ end trace 0000000000000000 ]--- Fixes: ee52e56e7b12 ("ALSA: hda - Fix mute-LED fixed mode") Signed-off-by: Cen Zhang Assisted-by: LLM Link: https://patch.msgid.link/pm-pmb-c2667fb9cc42fbb7943c-v4-b7bc2fe90e950accb3f7@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit c78330413b12eee63de9ecb4db14f563fc0877ef Author: Takashi Iwai Date: Tue Oct 13 14:05:25 2026 +0200 ALSA: line6: Use kzalloc() for PCM buffer allocation [ Upstream commit 9ec633573c1d162bfc82cae52d14c220c875612f ] LINE6 driver allocates the PCM buffer via kmalloc(), and this might leave some bytes uninitialized that are out of the actual ring buffer size, while it's still exposed via mmap. For avoiding the leak of the uninitialized kernel memory, simply replace it with kzalloc(). Fixes: 705ececd1c60 ("Staging: add line6 usb driver") Reported-by: Sashiko Link: https://patch.msgid.link/20261013120528.52586-5-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit d2bc9861672c7b145c27efb0b1b1cf013a416422 Author: Takashi Iwai Date: Tue Oct 13 14:05:24 2026 +0200 ALSA: pcm: Protect delay DMA sync in forward and rewind, too [ Upstream commit d5096bb9beacb448091c1c9541432021dd5c1fcd ] Like the previous fix for snd_pcm_delay() (in the commit 50f413b83b31 "ALSA: pcm: Protect delay DMA sync against concurrent HW_FREE"), the snd_pcm_dma_buffer_sync() call in snd_pcm_forward() and snd_pcm_rewind() needs the similar protection against the concurrent hw_free action for avoiding potential UAFs. Fixes: a25684a95646 ("ALSA: memalloc: Support for non-contiguous page allocation") Reported-by: Sashiko Link: https://patch.msgid.link/20261013120528.52586-4-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 66ca1ee24a7ea1e666f91a4379f1b374cc4158c6 Author: Takashi Iwai Date: Tue Oct 13 14:05:22 2026 +0200 ALSA: jack: Fix kctl free at error in snd_jack_kctl_new() [ Upstream commit f421be924fec67f74bb0b6988ea8f0a3480df2a7 ] When an error happens in snd_jack_kctl_new(), it tries to free the new kcontrol element via snd_ctl_free_one(). But snd_ctl_free_one() releases only the memories, and the internal linked list and hash entries still remain, which may lead to bogus accesses to user. Replace with the correct destructor, snd_ctl_remove(), for clearing the whole resources of the given kcontrol, instead. Fixes: 9058cbe1eed2 ("ALSA: jack: implement kctl creating for jack devices") Reported-by: Sashiko Link: https://patch.msgid.link/20261013120528.52586-2-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit ab0801e5c86d0216bd3ea0ac8f09f6b4f3200faf Author: Amadeusz Sławiński Date: Tue Oct 13 18:42:56 2026 +0200 ALSA: pcm: Fix driver_tstamp value reporting [ Upstream commit 8ff1161ac5aa02f3261e00f07d6212be2b12384b ] In some cases (system32 and compat64) due to incorrect assignment wrong value is being reported. Fix it. Fixes: 3ddee7f88aaf ("ALSA: Avoid using timespec for struct snd_pcm_status") Signed-off-by: Amadeusz Sławiński Link: https://patch.msgid.link/20261013164256.4949-1-amade@asmblr.net Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit dcfe6721c6773d511865d1562d771eb5181c8577 Author: Bradley Morgan Date: Sat Oct 3 11:02:00 2026 +0000 watchdog/perf: one digit too short in the raw event config copy [ Upstream commit b682d597aa273cad6e99e665e0fd2a7eb8aa2cef ] Commit 6164be01f179 ("watchdog/perf: optimize bytes copied and remove manual NUL-termination") swapped strscpy(buf, str, sizeof(buf)) plus a manual buf[len] = 0 for strscpy(buf, str, len), and that count is one short. strscpy() keeps the last byte of the destination for the NUL, so the config loses its final digit, nmi_watchdog=r300,panic for example ends up with buf = "30" and arms the raw event with the wrong config. The empty case falls over too, strscpy() with a zero count writes nothing at all, so nmi_watchdog=r,1 leaves buf uninitialized and kstrtoull() reads whatever stack garbage is sitting there. The old code was safe on both by accident, it filled the whole buffer first and buf[len] = 0 then stomped the comma position, so the worst you got was a truncated parse failure. Pass len + 1 so the copy includes the character the NUL replaces, and reject len >= sizeof(buf) like it was before the optimization, which also turns an empty config back into a clean parse failure. Link: https://lore.kernel.org/20261003110200.3-brads@mainlining.org Fixes: 6164be01f179 ("watchdog/perf: optimize bytes copied and remove manual NUL-termination") Signed-off-by: Bradley Morgan Signed-off-by: Andrew Morton Reviewed-by: Douglas Anderson Cc: Thorsten Blum Cc: Thomas Gleixner Signed-off-by: Sasha Levin commit 20610c9af97d048ef5023a79fc122816d0380a6c Author: Karl Mehltretter Date: Fri Oct 2 20:13:57 2026 +0200 kcov: report spurious PCs in the interrupt selftest [ Upstream commit 5d9f31ed855fa89e533b222d0365da81ad3b10cc ] The KCOV interrupt selftest enables KCOV_MODE_TRACE_PC without a coverage area so that spurious coverage causes a fault. If the fault path is instrumented, the coverage callback faults recursively. Observed failure modes include a stack overflow on x86_64 and arm32 getting stuck in abort handling, neither of which identifies the original coverage event. The recursive failure is not new, but commit 9a79524d1420 ("kcov: use WRITE_ONCE() for selftest mode stores") made the selftest effective on configurations where the compiler had previously removed the mode store, exposing it more broadly. Replace the open-coded kcov_mode stores with kcov_start() and kcov_stop(), passing a 16-word buffer that records up to 15 spurious PCs, with the first word holding the count. Keep KCOV enabled for the original 300 ms window, then disable it, print all recorded PCs and panic if any were recorded. Once the buffer fills, further PCs are discarded by the existing coverage callback. This preserves the selftest's hard failure while avoiding the recursive fault path. Add decanonicalize_ip() as the inverse of canonicalize_ip(), which subtracts kaslr_offset() from recorded PCs. Restore that offset before printing the PCs with %pB, since KCOV records return addresses. Link: https://lore.kernel.org/20261002181357.14293-1-kmehltretter@gmail.com Fixes: 6cd0dd934b03 ("kcov: Add interrupt handling self test") Signed-off-by: Karl Mehltretter Signed-off-by: Andrew Morton Tested-by: Alexander Potapenko Reviewed-by: Alexander Potapenko Tested-by: Bradley Morgan # Power10 Reviewed-by: Bradley Morgan Assisted-by: LLM Cc: Andrey Konovalov Cc: Dmitry Vyukov Cc: Marco Elver Cc: Bradley Morgan Cc: Thomas Gleixner Signed-off-by: Sasha Levin commit 697c59dfd3cb66a68b8ffb60a6063ced43cdcc27 Author: Karl Mehltretter Date: Sat Sep 26 02:26:51 2026 +0200 resource, kunit: stop selecting GET_FREE_REGION [ Upstream commit 7c3f4d699f34535285d0ceb184927d71543d0064 ] RESOURCE_KUNIT_TEST selects GET_FREE_REGION even when no other option needs it. Remove the selection to follow the dependency rule in Documentation/dev-tools/kunit/style.rst. Skip resource_test_region_intersects() when GET_FREE_REGION is disabled. GET_FREE_REGION has no prompt, so configurations without a production consumer cannot enable it. Most configurations will therefore skip this case; this is intentional. The union and intersection tests remain available. Since kunit_skip() does not return, the compiler drops the reference to the unavailable alloc_free_mem_region(), as in the CONFIG_OF_ADDRESS check in drivers/of/of_test.c. Link: https://lore.kernel.org/20260926002651.87267-1-kmehltretter@gmail.com Fixes: 99185c10d5d9 ("resource, kunit: add test case for region_intersects()") Signed-off-by: Karl Mehltretter Signed-off-by: Andrew Morton Reviewed-by: Bradley Morgan Tested-by: Bradley Morgan # Power10 Assisted-by: LLM Cc: Ying Huang Cc: Geert Uytterhoeven Cc: Brendan Higgins Cc: David Gow Cc: Rae Moar Cc: Andy Shevchenko Signed-off-by: Sasha Levin commit 4bdc97eed8995a712b61a05a97bc258c90136600 Author: Danish Khateeb Date: Fri Sep 25 15:55:02 2026 -0500 kselftest/filelock: plan for the five ofdlocks tests [ Upstream commit d05de2360a3e25aa3ec24f460802755a95e8e6e9 ] ofdlocks reports five results but plans for four, so even when they all pass it ends with # Planned tests != run tests (4 != 5) and exits with KSFT_FAIL, which run_kselftest.sh reports as a failure. Link: https://lore.kernel.org/20260925205502.115327-1-danishkhateeb03@gmail.com Fixes: 33d5b13098fb ("kselftest/filelock: report each test in oftlocks separately") Signed-off-by: Danish Khateeb Signed-off-by: Andrew Morton Assisted-by: LLM Cc: Shuah Khan Cc: Mark Brown Cc: Jeff Layton Signed-off-by: Sasha Levin commit 285d5188187af8f91e7d866f3e524527cde7b181 Author: Nguyen Ngoc Thang Date: Sun Sep 20 21:07:10 2026 +0700 ocfs2: validate chunk and block counts of the local quota file [ Upstream commit b10ef5d2c2083ea4c40e963c10a73a154793c5d4 ] ocfs2_local_read_info() trusts dqi_chunks and dqi_blocks from the local quota file header. If dqi_blocks is too small, ocfs2_extend_local_quota_file() computes a bogus chunk length, extends the file, and maps logical block dqi_blocks, which is already in the inode's metadata cache (the header or a chunk header read at mount). sb_getblk() returns that cached buffer and ocfs2_set_new_buffer_uptodate() hits BUG_ON(ocfs2_buffer_cached()): kernel BUG at fs/ocfs2/uptodate.c:509! ocfs2_extend_local_quota_file+0x45c/0x1100 ocfs2_create_local_dquot+0x8ac/0xb50 ocfs2_acquire_dquot+0x614/0xae0 ocfs2_get_init_inode+0xe9/0x1b0 ocfs2_mkdir+0x174/0x430 ocfs2_local_quota_add_chunk() has the same exposure. Reject a header whose counts don't fit the chunk layout or exceed i_size. Reproduced with a crafted image (dqi_blocks = 1, chunk 0 dqc_free = 0); syzbot has no reproducer for this report. Link: https://lore.kernel.org/20260920140710.43938-1-ngocthang2710.1999@gmail.com Fixes: 9e33d69f553a ("ocfs2: Implementation of local and global quota file handling") Signed-off-by: Nguyen Ngoc Thang Signed-off-by: Andrew Morton Reported-by: syzbot+03aaa576f1daa1c1f2f0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=03aaa576f1daa1c1f2f0 Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Heming Zhao Signed-off-by: Sasha Levin commit cc044ce077f43a77fcb0d3bb8333c4e200aa50b8 Author: Joseph Qi Date: Tue Sep 22 17:34:37 2026 +0800 ocfs2: fix possible deadlock between nfs_sync_rwlock and fs_reclaim [ Upstream commit 169bc4d16a8efa7852b101fdaa4c028505cd6750 ] syzbot detected a circular locking dependency on &osb->nfs_sync_rwlock: CPU0 CPU1 ---- ---- lock(fs_reclaim); lock(&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]); lock(fs_reclaim); rlock(&osb->nfs_sync_rwlock); *** DEADLOCK *** Chain exists of: &osb->nfs_sync_rwlock --> &ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE] --> fs_reclaim CPU0 is kswapd. The dentry shrinker runs under fs_reclaim and reaches ocfs2_delete_inode() through ->evict_inode(): kswapd balance_pgdat shrink_node shrink_slab super_cache_scan prune_dcache_sb shrink_dentry_list dentry_kill ocfs2_dentry_iput evict ocfs2_evict_inode ocfs2_delete_inode ocfs2_nfs_sync_lock down_read(&osb->nfs_sync_rwlock) //C0: grabbing CPU1 is a task deleting an inode. It takes nfs_sync_rwlock first, then the orphan dir and inode alloc system inode i_rwsems, and allocates the metadata reservation with GFP_KERNEL while holding them: evict ocfs2_evict_inode ocfs2_delete_inode + ocfs2_nfs_sync_lock | down_read(&osb->nfs_sync_rwlock) //C1: hold + ocfs2_wipe_inode + inode_lock(orphan_dir_inode) //C1: hold + ocfs2_truncate_for_delete | ocfs2_commit_truncate | ocfs2_remove_btree_range | ocfs2_reserve_blocks_for_rec_trunc | ocfs2_reserve_new_metadata_blocks | kzalloc_obj() //C1: grabbing | // GFP_KERNEL -> might_alloc -> fs_reclaim_acquire + ocfs2_remove_inode inode_lock(inode_alloc_inode) jbd2 pins allocations to GFP_NOFS for the lifetime of a transaction handle, but these reservations are made before ocfs2_start_trans(), so fs_reclaim is acquired with ocfs2 locks still held and the cycle closes. The same cycle is reachable from ocfs2_get_dentry() and ocfs2_get_parent(), which hold nfs_sync_rwlock for write across ocfs2_test_inode_bit() and ocfs2_iget(). This is more than a lockdep artifact. A GFP_KERNEL allocation under the orphan dir i_rwsem enters direct reclaim, which runs the shrinkers, which can evict another ocfs2 inode and re-enter ocfs2_wipe_inode() on the same task; the second inode_lock() on the singleton orphan dir inode then self-deadlocks, since i_rwsem is not recursive. Establish a GFP_NOFS allocation context for the whole nfs_sync_rwlock critical section so that nothing holding it can recurse into filesystem reclaim. Do it in ocfs2_nfs_sync_lock()/ocfs2_nfs_sync_unlock() rather than at the call sites, so that future callers cannot forget it. Link: https://lore.kernel.org/20260922093437.954127-1-joseph.qi@linux.alibaba.com Fixes: 6ca497a83e59 ("ocfs2: fix rare stale inode errors when exporting via nfs") Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Reported-by: syzbot+a68ce48df87b8e36e915@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a68ce48df87b8e36e915 Cc: Heming Zhao Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Signed-off-by: Sasha Levin commit 314f6183f13fda459261a4723a453df67e15008b Author: Joseph Qi Date: Thu Sep 17 09:48:25 2026 +0800 ocfs2: retain all security xattrs during inode creation [ Upstream commit d637475617d8468c2740a3436428681bcc8d3572 ] When creating a new inode, ocfs2_init_security_get() stores the security xattr returned by the LSM framework in ocfs2_security_xattr_info so that it can be written later within the same transaction. But ocfs2_initxattrs() only ever looks at the first element of the xattr array, and it keeps the name as a bare pointer into memory owned by the security layer instead of copying it. The value, by contrast, is already duplicated with kmemdup(). With stacked LSMs, security_inode_init_security() provides one xattr per LSM, so all labels but the first are silently dropped and never written to disk, leaving newly created files without the security xattrs the other LSMs rely on. The borrowed name is not an outright bug with the LSMs in tree today: security_inode_init_security() frees only ->value once the callback returns, and documents ->name as the attribute name suffix, so the pointer stays valid for as long as ocfs2 uses it. It is fragile though, as an LSM that allocates the name together with the value would turn it into a use-after-free, so the rework below copies the names as well. Fix this by storing copies of all the security xattrs: allocate an array in ocfs2_initxattrs(), copy the names and values, account for all of them in the credit calculations, and write each one in ocfs2_init_security_set(). While at it, switch the allocations from GFP_KERNEL to GFP_NOFS. The callback runs in the inode creation path with the parent directory locked, and the security layer allocates the very same xattr array with GFP_NOFS, so direct reclaim must not be allowed to recurse into the filesystem from here. Link: https://lore.kernel.org/20260917014825.678947-1-joseph.qi@linux.alibaba.com Fixes: de3004c874e7 ("ocfs2: Switch to security_inode_init_security()") Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Cc: Daniel Borkmann Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Heming Zhao Signed-off-by: Sasha Levin commit 52ff0793f4e73fe7b197d8e5ccbabcf23e9bca34 Author: Zhiling Zou Date: Sat Sep 12 21:32:17 2026 +0800 lib: validate in-memory LZ4 chunk length [ Upstream commit 138a84817df01eda67bb23032ab49c23fe2ffc16 ] We found and validated an issue in lib/decompress_unlz4.c. The bug is reachable by a root user through kexec_file_load() with a crafted external initrd. unlz4() reads the compressed chunk length from an in-memory initrd and passes it to LZ4_decompress_safe(). It only checks the chunk length against the allocation size when the input is filled by a callback. Reject an in-memory chunk that extends past the remaining input before calling the LZ4 decoder. This prevents malformed initrds from making the decoder read past the mapped archive. Link: https://lore.kernel.org/59c6555c27aa7ba18ee227f9f02c78d15a37605f.1789219453.git.zhilinz@nebusec.ai Fixes: e76e1fdfa8f8 ("lib: add support for LZ4-compressed kernel") Signed-off-by: Zhiling Zou Signed-off-by: Andrew Morton Reported-by: VEGA Assisted-by: LLM Cc: Kyungsik Lee Signed-off-by: Sasha Levin commit 662f4d7e7da5abea384c96d3de86e336014fa5b5 Author: Bart Van Assche Date: Tue Oct 13 15:10:02 2026 -0700 scsi: scsi_debug: Fix a locking bug in resp_write_same() [ Upstream commit 2f50ca3d46b4d5916874ba19612498c0a9c1f5f9 ] If fetch_to_dev_buffer() fails in resp_write_same(), the function jumps to 'out' without releasing the data write lock acquired earlier via sdeb_data_write_lock(). Jump to 'unlock' instead so that sdeb_data_write_unlock() is called on the error path. This bug has been discovered by building the scsi_debug driver with Clang and modified lock context annotations. The modified lock context annotations are available in patch "scsi: scsi_debug: Improve lock context annotations". Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support") Reviewed-by: Christoph Hellwig Reviewed-by: John Garry Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/271ea11d3bc147d950a89419181f0c3f5a1ebf3b.1791924924.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 4978cf22bbce163a6209b60dc3c0955fb0c8db3b Author: Hongjian Dai Date: Thu Oct 8 20:47:04 2026 +0800 spi: meson-spicc: fix invalid DMA unmap on mapping failure [ Upstream commit 9d71f9fe5b5de916bded51343138b09b1eb103ed ] meson_spicc_dma_unmap() decided whether a buffer had to be unmapped by testing its DMA address for non-zero. On a mapping failure dma_map_single() returns DMA_MAPPING_ERROR (typically non-zero), so the error path in meson_spicc_transfer_one() passed that error value to dma_unmap_single(), unmapping an address which was never mapped. The same happened for t->rx_dma on TX mapping failure, which is not written at all. Initialize both addresses to DMA_MAPPING_ERROR before mapping and use dma_mapping_error() to decide, so only buffers which were actually mapped are unmapped. Fixes: 18197e98353d ("spi: meson-spicc: add DMA support") Signed-off-by: Hongjian Dai Link: https://patch.msgid.link/35143466F2F5166F+20261008124704.87708-1-daihongjian@kylinsec.com.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5283008b05f205c45c89d49ad83762dc3a47f11f Author: Runyu Xiao Date: Sun Oct 4 18:23:46 2026 +0800 ASoC: codecs: wcd937x: request watchdog IRQs without devm [ Upstream commit b3f17433a1eb9f89b79f8459d7661207abce0b9c ] The watchdog IRQs are requested from the codec component probe and released from its remove callback. Use the same non-devm lifetime for both operations. Use request_threaded_irq() and keep free_irq() in the component remove callback. Return errors from each request and unwind only IRQs that were successfully requested, including failures later in component probe. Fixes: 9be3ec196da4 ("ASoC: codecs: wcd937x: add wcd937x codec driver") Assisted-by: LLM Signed-off-by: Runyu Xiao Link: https://patch.msgid.link/20261004102346.1203410-1-runyu.xiao@seu.edu.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9984adceec93e2f3261bddd85c35006286e866fe Author: Priyanka Mani Date: Mon Oct 12 05:31:19 2026 +0000 ASoC: mediatek: mt8365: Fix out-of-bounds read in get_iir_coef() [ Upstream commit e913917febd31998e3d0b9e8c861e538a6185045 ] get_iir_coef() looks up a resampling coefficient set by reading an index "k" from iir_coef_tbl_matrix[][] and using it to index iir_coef_tbl_list[], which has 8 entries (valid indices 0..7). Before the lookup, "k" is only rejected when it is >= IIR_NO_NEED (11), or equal to IIR_RATIOVER (9) or IIR_INV_COEF (10). The value 8 is neither a sentinel nor a valid table index, so it falls through to the else branch and iir_coef_tbl_list[8] is read one element past the end of the array. The bogus coef pointer and count are then returned to mt8365_dai_set_config(), which dereferences coef. The current matrix never produces 8, so this cannot be triggered today, but the bounds check is wrong: it relies on the matrix contents instead of the size of the array it guards. Bound the lookup with the actual array size so only valid indices reach the table. This was found by Smatch: sound/soc/mediatek/mt8365/mt8365-dai-i2s.c:271 get_iir_coef() error: buffer overflow 'iir_coef_tbl_list' 8 <= 8 Fixes: 402bbb13a195 ("ASoC: mediatek: mt8365: Add I2S DAI support") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/67af3580-a907-403d-8bfd-76b5c304ab99@stanley.mountain/ Signed-off-by: Priyanka Mani Link: https://patch.msgid.link/403cc04bb103dff096edf72b99ae6868ee91f359.1791782072.git.priyankamani2100@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 75531dfb2806a0f11d5088fbd538595e67171494 Author: Shuvam Pandey Date: Sat May 23 13:17:33 2026 +0545 accel/qaic: Protect perf stats BO state with bo->lock [ Upstream commit 1c50c57717c013ca63363eecb4154049cc727767 ] qaic_perf_stats_bo_ioctl() validates each BO by checking bo->sliced and bo->dbc before returning its perf stats. These fields are changed by the detach paths while holding bo->lock, but the perf stats ioctl reads them without that lock. A concurrent detach can clear bo->dbc and mark the BO unsliced while the perf stats ioctl is validating the BO. Take bo->lock while checking the BO state and copying the per-BO stats into the temporary result buffer. Fixes: 4ddf4ddfceb4 ("accel/qaic: Ensure entry belongs to DBC in qaic_perf_stats_bo_ioctl()") Signed-off-by: Shuvam Pandey Reviewed-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patch.msgid.link/6a115824.a0bed9bd.3c0137.9edf@mx.google.com Signed-off-by: Sasha Levin commit 82171f5034c4cda4ec4edc1e11f0aea03142a120 Author: Jonathan Santos Date: Wed Oct 7 05:52:46 2026 -0300 spi: axi-spi-engine: fix stale SYNC IRQ pending in trigger_enable [ Upstream commit 18febc10a3538b9baa2f6e4481b434f20fdbd93c ] spi_engine_trigger_enable() sends SYNC(1) and polls SYNC_ID, it never clears the INT_PENDING[SYNC] bit afterward. This leaves a stale pending interrupt that can fire spuriously when INT_SYNC is later enabled. Simillarly to the fix on spi_engine_setup(), clear INT_PENDING[SYNC] after polling the SYNC_ID. Fixes: 8fc13b822c74 ("spi: axi-spi-engine: don't repeat mode config for offload") Reviewed-by: Nuno Sá Signed-off-by: Jonathan Santos Link: https://patch.msgid.link/8d3f421e07b6114aae55f964825dba6ac9151cf5.1791361360.git.Jonathan.Santos@analog.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 4aa253c9606afcd4eb4380436925b3d3d3c7cc13 Author: Jonathan Santos Date: Wed Oct 7 05:52:26 2026 -0300 spi: axi-spi-engine: fix stale SYNC IRQ pending [ Upstream commit ea29c686f96adcb505071ef228ba8047dc951fac ] spi_engine_setup() sends a SYNC(1) command and polls SYNC_ID to confirm it was parsed by the FPGA, but never clears the corresponding interrupt pending bit (INT_PENDING[SYNC]). When the first real SPI transfer starts and INT_SYNC is enabled, that stale pending bit fires immediately, causing the IRQ handler to see the leftover SYNC_ID from setup, match it against the current transfer's ID, and prematurely signal completion before the hardware finishes. This race manifests at low SPI clock frequencies (~2-3 MHz), where the FPGA takes long enough to execute the transfer that handler is parsed before it finishes. At higher SCLK rates the transfer completes fast enough that the issue is masked. Fix this by clearing INT_PENDING[SYNC] after the polled SYNC, ensuring no stale interrupt is left pending. Reported-by: Dennis Heinzel Closes: https://ez.analog.com/linux-software-drivers/f/q-a/604145/axi-spi-engine-stale-sync-pending-can-complete-first-transfer-early-at-low-spi-clock-2-3-mhz Fixes: 1d0ee0c9df31 ("spi: axi-spi-engine: wait for completion in setup") Reviewed-by: Nuno Sá Signed-off-by: Jonathan Santos Link: https://patch.msgid.link/d3033a01a695c915e4dc5952dfe0587b2f77d733.1791361360.git.Jonathan.Santos@analog.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 7bc6bca8185a1f345223755f1486d23ca4fe4eb9 Author: Namhyung Kim Date: Mon Oct 12 16:59:35 2026 -0700 perf symbol: Add missing symsrc__destroy() for libbfd [ Upstream commit 35477b351e6a697c85dc7d37e5081621889f8e40 ] When libbfd loaded symbols and there's a pending syms_ss, it'd be lost or overwrite existing symbols. Let's destroy it before breaking the loop so that it can safely return from the function. Closes: https://lore.kernel.org/r/sashiko-outbox-162540@kernel.org Fixes: eac9a4342e5447ca ("perf symbols: Try reading the symbol table with libbfd") Reported-by: Sashiko Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Remi Bernon Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 08a2379d0e5083814f2efdcc0dc946a57a6e26b5 Author: Namhyung Kim Date: Mon Oct 12 16:59:34 2026 -0700 perf symbol: Fix symbol loading from libbfd [ Upstream commit f814d9e6cdbef6413a72d6dd6d5e4e79e815cf44 ] The dso__load() should return a positive number (number of symbols loaded) when it succeded to load symbols. But dso__load_bfd_symbols() only returns 0 and it's hard to check if it actually loaded symbols or not. Let's return the value of dso__has_symbol() and check it in dso__load() so that it can return 1 for success. Closes: https://lore.kernel.org/r/sashiko-outbox-162540@kernel.org Fixes: eac9a4342e5447ca ("perf symbols: Try reading the symbol table with libbfd") Reported-by: Sashiko Reviewed-by: Ian Rogers Signed-off-by: Namhyung Kim Cc: Remi Bernon Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit cb6b0af1329e201d3ac2f181be48f007e76c7855 Author: Gabor Juhos Date: Mon Oct 5 19:18:50 2026 +0200 spi: spi-qpic-snand: skip BBM copy on regular raw reads [ Upstream commit 2da46f1e9b980a38bc6afd417322ca4963725e16 ] Trying to read the raw flash contents with nanddump, the second byte of the OOB area contains 0xff instead of the real data in the flash. This happens because the qcom_spi_read_last_cw() function unconditionally copies the bad block marker into the second byte of the output buffer. Add a new flag to the controller's private data structure, and set it when only the first two bytes of the OOB area being read in raw mode. Also change the bad block copying code to run only when the flag is set. This ensures that the SPI NAND framework still can read the BBM bytes, but on regular raw read, the output does not contain the duplicated marker byte. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20261005-qpic-snand-skip-bbm-copy-v1-1-04f6aeda4044@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 381eb867df981c5bdc60e8d5ed55450813dd004e Author: Karl Mehltretter Date: Sun Oct 4 20:46:44 2026 +0200 sh: sh7785lcr: Register the PCA9564 controller as I2C bus 0 [ Upstream commit 3b8386ffc0c33b6b5a6a8e64e1487c1adec57dc9 ] Before commit 44454baa7ca7 ("i2c: Dynamically assign adapter id if it wasn't explictly specified"), a negative ID was replaced by zero, and I2C bus zero was instantiated. Since that commit, a negative ID is passed verbatim, instantiating an I2C bus with a dynamic number. As SH boards still use i2c_register_board_info(0, ...) to register I2C devices, they rely on the I2C bus being bus zero. The SH7785LCR is the only SH board whose I2C adapter has a negative ID and its PCA9564 controller becomes i2c-1, causing registration of the R2025S/D RTC to fail and hwclock not detecting /dev/rtc0. Set the platform device ID to 0 so that the adapter is registered as bus zero again. Fixes: 44454baa7ca7 ("i2c: Dynamically assign adapter id if it wasn't explictly specified") Signed-off-by: Karl Mehltretter Assisted-by: LLM Tested-by: John Paul Adrian Glaubitz Reviewed-by: John Paul Adrian Glaubitz Reviewed-by: Geert Uytterhoeven Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: Sasha Levin commit c0a9809f08b5536f60603594fe4294b0e4a6fd4d Author: bui duc phuc Date: Tue Sep 29 13:11:21 2026 +0700 ASoC: mediatek: mt8196: propagate TDM clock errors [ Upstream commit d09412f79d70402c44bb92d19eff5b9aea3087e6 ] Propagate errors from BCK and MCK clock operations in the DAPM event callbacks instead of always returning success. Fixes: ede4d841111a ("ASoC: mediatek: mt8196: support TDM in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-11-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e58af16e540680ae796632785af18462b1975def Author: bui duc phuc Date: Tue Sep 29 13:11:20 2026 +0700 ASoC: mediatek: mt8196: propagate I2S clock errors [ Upstream commit 6c14a59bc503fc9aa599f1ebc50777460145e8b4 ] Propagate errors from APLL and MCK clock operations in the DAPM event callbacks instead of always returning success. Fixes: 65a195132669 ("ASoC: mediatek: mt8196: support I2S in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-10-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c723f683d71f5dd9a4fc79229939b5d192f5782e Author: bui duc phuc Date: Tue Sep 29 13:11:18 2026 +0700 ASoC: mediatek: mt8196: fix runtime resume error handling [ Upstream commit 3a9a93cafb376541fecac10c5bb734cd2f26bfc8 ] Propagate errors from regcache_sync() and main clock enable operations instead of ignoring them. On failure, restore cache-only mode, disable register access clocks, and clear the 26M clock request as needed to clean up the runtime resume state. Fixes: 7384ecab34eb ("ASoC: mediatek: mt8196: support audio clock control") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-8-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9c5bc96a84fffd27f653ffb8db3d6d9e0ac2718c Author: bui duc phuc Date: Tue Sep 29 13:11:16 2026 +0700 ASoC: mediatek: mt8196: propagate main clock errors [ Upstream commit c33bc2dd217d249de7b1ddffb80b8e4a0c597cf3 ] Propagate errors from the main clock enable and disable operations instead of always returning success. Fixes: 7384ecab34eb ("ASoC: mediatek: mt8196: support audio clock control") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-6-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e175b4d5368c805e655cf65625cbf6d5ffd80abd Author: bui duc phuc Date: Tue Sep 29 13:11:15 2026 +0700 ASoC: mediatek: mt8196: fix register access clock error handling [ Upstream commit 2844ba593741a9c9061b8c99790a47ffeed4114d ] Propagate errors from clock operations and disable previously enabled clocks when a later operation fails. This ensures that the register access clocks are properly cleaned up on the error path. Fixes: 7384ecab34eb ("ASoC: mediatek: mt8196: support audio clock control") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 41250c8e56638dffb3d5d36c3a95ba1245841359 Author: bui duc phuc Date: Tue Sep 29 13:11:14 2026 +0700 ASoC: mediatek: mt8196: fix MCK error handling [ Upstream commit bc0cd0eb030389a78885561dc92f087e7595458a ] Disable the clock if setting its rate fails after the clock has been enabled, preventing it from being left enabled on the error path. Fixes: 7384ecab34eb ("ASoC: mediatek: mt8196: support audio clock control") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit a2f1754199dfd7b2d30d6d5230cc3b29f31e27ee Author: bui duc phuc Date: Tue Sep 29 13:11:13 2026 +0700 ASoC: mediatek: mt8196: fix APLL enable error handling [ Upstream commit 23239cabb6d130c81d2c5389ed2dbdcfc239a939 ] Propagate errors from the APLL mux and clock enable operations instead of ignoring them or returning success on failure. Clean up previously enabled clocks and disable the APLL tuner when a later clock operation fails, restoring the APLL mux state before returning the error. Fixes: 7384ecab34eb ("ASoC: mediatek: mt8196: support audio clock control") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit bb5778006e31f12a59247c9d6781b91b3bba92d2 Author: bui duc phuc Date: Tue Sep 29 13:11:12 2026 +0700 ASoC: mediatek: mt8196: fix APLL mux error handling [ Upstream commit 5a0caca149f2938cd82b96b631c5a144329bd30e ] Propagate errors from clock operations in the enable path and clean up previously enabled clocks when a later operation fails. For the disable path, continue disabling all clocks even if a clock operation fails. Do not propagate the errors so that the disable path can perform as much cleanup as possible. Fixes: 7384ecab34eb ("ASoC: mediatek: mt8196: support audio clock control") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260929061121.124001-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 080c091371f8197fede6a27b7a56a61b54e8db0b Author: bui duc phuc Date: Fri Oct 2 11:38:54 2026 +0700 ASoC: atmel-i2s: use optional API for gclk [ Upstream commit b431a055fb7688c0d3725fa3c55aeef852991178 ] The gclk is an optional clock according to the device tree binding. Use devm_clk_get_optional() to handle the optional gclk directly. Unlike the existing code, errors other than -EPROBE_DEFER are now returned instead of being silently ignored. Fixes: 73ad0df57290 ("ASoC: atmel-i2s: Remove unnecessary audio PLL clock (aclk)") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261002043856.97295-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit ff32f1e8fcaad1de2dbbcc2d6c213cc3fae24786 Author: bui duc phuc Date: Fri Oct 2 11:38:53 2026 +0700 ASoC: atmel-i2s: use optional API for muxclk [ Upstream commit be952abd69c1f2c845e42e72147751e4c910cd81 ] The muxclk is an optional clock according to the device tree binding. Use devm_clk_get_optional() to handle the optional muxclk instead of handling the missing clock explicitly. When muxclk is not available, devm_clk_get_optional() returns NULL. clk_set_parent() returns 0 when passed NULL, preserving the existing behavior. Unlike the existing code, errors other than -EPROBE_DEFER are now returned instead of being silently ignored. Fixes: b543e467d1a9 ("ASoC: atmel-i2s: add driver for the new Atmel I2S controller") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261002043856.97295-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit bc7b4b870eae5a63a901b17a99f5ea0f029341fd Author: bui duc phuc Date: Fri Oct 2 11:38:52 2026 +0700 ASoC: atmel-i2s: fix MCK generator error handling [ Upstream commit 2e2da92de9bffd2cdbb9a2558fe60de7f1bb09e3 ] Disable the gclk and reset the MCK configuration when an error occurs while enabling the MCK generator. This prevents the gclk from remaining enabled after a failed clock configuration. Fixes: 73ad0df57290 ("ASoC: atmel-i2s: Remove unnecessary audio PLL clock (aclk)") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261002043856.97295-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c3c3caca5b52fccd750b9dfc1196f3e79b1c385a Author: bui duc phuc Date: Thu Oct 8 17:38:28 2026 +0700 ASoC: renesas: msiof: Fix msiof_close() being skipped on rollback [ Upstream commit b7c58a55fd9b71c0b11b0365fdf53f49702c39b5 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from msiof_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: c61caec22820 ("ASoC: renesas: add MSIOF sound support") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-22-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0cb1da051f5b0f91cbafd18706790f1231e5dd90 Author: bui duc phuc Date: Thu Oct 8 17:38:26 2026 +0700 ASoC: intel: atom: Fix .shutdown() being skipped on rollback [ Upstream commit e3bb575811042ca30ac9b7b4dacc74aab8efa512 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from sst_media_open(). ASoC only marks the DAI as started when .startup() returns 0, so .shutdown() can be skipped on rollback. Return 0 explicitly on success. Fixes: 4889a8a73f65 ("ASoC: intel: atom: Use __free(kfree) for stream pointer") Fixes: 6cc0f4e63994 ("ASoC: Intel: mfld_pcm: move stream handling to dai_ops") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-20-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c14f7aa4b467a9e1718404685a8a28bd60d12813 Author: bui duc phuc Date: Thu Oct 8 17:38:25 2026 +0700 ASoC: imx-pcm-rpmsg: Fix imx_rpmsg_pcm_close() being skipped on rollback [ Upstream commit 85e56c3bbb7e8ea4626f8653afaef0d79d9cb7ba ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from imx_rpmsg_pcm_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 3c00eceb2a53 ("ASoC: imx-pcm-rpmsg: Add platform driver for audio base on rpmsg") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-19-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 2c2b084f06591e1dbe7aecbcee033d6a1c531f12 Author: bui duc phuc Date: Thu Oct 8 17:38:16 2026 +0700 ASoC: atmel: atmel-pcm-pdc: Fix atmel_pcm_close() being skipped on rollback [ Upstream commit 50aaca643038774b6779c911c4f96bc7e0d607e9 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from atmel_pcm_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 92dfa6198623 ("ASoC: atmel-pcm: split into two file") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-10-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 84b731f1659c3b5c5052371b84c6e4ecae044550 Author: bui duc phuc Date: Thu Oct 8 17:38:14 2026 +0700 ASoC: amd: yc: Fix acp6x_pdm_dma_close() being skipped on rollback [ Upstream commit 06654a3ef5137719be880a6cd12bd453050eafc5 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp6x_pdm_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: ceb4fcc13ae5 ("ASoC: amd: add acp6x pdm driver dma ops") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-8-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6075e51ae39ebfeab83c366f3b44e640fcc8c570 Author: bui duc phuc Date: Thu Oct 8 17:38:13 2026 +0700 ASoC: amd: vangogh: Fix acp5x_dma_close() being skipped on rollback [ Upstream commit 38559fcd1c518a33055ef0a2cf7c04b57bfa9215 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp5x_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: cab396d8b22c ("ASoC: amd: add ACP5x pcm dma driver ops") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-7-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d57970bf65a793ce64fcf6d54b1b5db24e8a8e14 Author: bui duc phuc Date: Thu Oct 8 17:38:12 2026 +0700 ASoC: amd: renoir: Fix acp_pdm_dma_close() being skipped on rollback [ Upstream commit a92571113ef297840270e4d8d4263a842302c9c4 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp_pdm_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 4a767b1d039a ("ASoC: amd: add acp3x pdm driver dma ops") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-6-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c66697d5531b259c8cbd5d1e35f2f73e38956cf3 Author: bui duc phuc Date: Thu Oct 8 17:38:11 2026 +0700 ASoC: amd: raven: Fix acp3x_dma_close() being skipped on rollback [ Upstream commit 37ceef26df57c4a86a5e984b1951995aa96d4342 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp3x_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 703a6e22888b ("ASoC: amd: Enabling I2S instance in DMA and DAI") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b764a36f2347dd78e57767edc3c2bcfd86af6abc Author: bui duc phuc Date: Thu Oct 8 17:38:10 2026 +0700 ASoC: amd: ps: Fix acp63_sdw_dma_close() being skipped on rollback [ Upstream commit 45dd2b22ea8934ed69dd05e6ecbf3c66ac3baebf ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp63_sdw_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: f722917350ee ("ASoC: amd: ps: add SoundWire dma driver dma ops") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit acb66783ef3e4f0a8d56fabb1b608ba58c776351 Author: bui duc phuc Date: Thu Oct 8 17:38:09 2026 +0700 ASoC: amd: ps: Fix acp63_pdm_dma_close() being skipped on rollback [ Upstream commit 172888114dda96492d40e4a6e0ed16146cb76e2b ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp63_pdm_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 5137305662ef ("ASoC: amd: add acp6.2 pdm driver dma ops") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9883220ae9ffea7ac3cec2330da52e99a94ce8ed Author: bui duc phuc Date: Thu Oct 8 17:38:08 2026 +0700 ASoC: amd: acp: Fix .close() being skipped on rollback [ Upstream commit 2c3400aa9f397da48a6760f5e84438973e01a00c ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 623621a9f9e1 ("ASoC: amd: Add common framework to support I2S on ACP SOC") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20261008103831.542533-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d5957c1c5c31b7a95b40e030bdafbe28e495b91e Author: Mingxuan Guo Date: Tue Oct 13 18:23:58 2026 +0800 firmware: cs_dsp: clear dsp->running on the cs_dsp_run() error path [ Upstream commit ad6be54d13496a0b5c6d1edeea99504e438cdb7a ] cs_dsp_run() sets dsp->running = true once the core has been started, but the error path below it only stops and disables the core, leaving the flag set. The first thing that can fail after that point is the post_run client hook, and it is reachable in mainline: wm_adsp registers wm_adsp_event_post_run(), which can fail in wm_adsp_buffer_init(). The core is then stopped and disabled, but dsp->running still reads true, and that stale state is acted on elsewhere: cs_dsp_coeff_write_ctrl() and cs_dsp_coeff_read_ctrl() talk to the DSP when ctl->dsp->running is set, and client drivers use the flag to decide whether the firmware is up (cs35l41 checks cs_dsp.running before its early events and on hibernate/resume). The flag cannot simply be moved below the hook: post_run hooks such as wm_adsp_event_post_run() read controls while they run, and cs_dsp_coeff_read_ctrl() only goes to the DSP when the flag is set. Clear the flag on the error path, before the core is stopped - the order cs_dsp_stop() already uses. Fixes: f6bc909e7673 ("firmware: cs_dsp: add driver to support firmware loading on Cirrus Logic DSPs") Signed-off-by: Mingxuan Guo Reviewed-by: Richard Fitzgerald Link: https://patch.msgid.link/tencent_B839C5A92D762B5717B9637A5CFA0841C608@qq.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 2ee5a26ec6d3b3e2b3d6ed981b46d9bd59a1fd4d Author: Yao Sang Date: Tue Oct 13 15:53:24 2026 +0800 nvme: pass partition flags to passthrough checks [ Upstream commit 6908a702955929b0876baac9fdc57070780a76f0 ] nvme_user_cmd() handles NVME_IOCTL_IO_CMD on namespace block devices, including partitions. It receives flags identifying a partition, but passes 0 to nvme_cmd_allowed(), bypassing the partition guard and allowing unprivileged passthrough commands to access sectors outside the partition. Pass flags to the permission check, rejecting unprivileged commands on partitions. Fixes: 313c08c72ee7 ("nvme: don't allow unprivileged passthrough on partitions") Reviewed-by: Christoph Hellwig Signed-off-by: Yao Sang Reviewed-by: Kanchan Joshi Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit 1dd05c2f5c44cd73ec742443848b7c4f9a86acb3 Author: Sung Byeongchan Date: Fri Oct 9 03:38:10 2026 +0900 nvmet-auth: reject undersized AUTH_SEND payloads [ Upstream commit c9359401036e8294c007a10e8c8d8da7030fcc76 ] nvmet_execute_auth_send() allocates and copies the initiator-supplied transfer length, then reads auth_type and auth_id through a common DHCHAP message pointer. The existing zero and transfer-length checks do not ensure that both common-header bytes are present. An unauthenticated NVMe/TCP initiator can complete ICReq and admin CONNECT, then send AUTH_SEND with tl equal to one. KASAN reports a one-byte slab out-of-bounds read when auth_id is loaded. Reject payloads that do not cover the common auth_type/auth_id header before allocating or parsing them. The one-byte trigger and header-minus-one boundary were cleanly rejected in three fixed fresh-boot runs. Exact-header, valid DHCHAP, wrong-type, mismatch, and zero-length controls remained clean, and a following valid AUTH_SEND on the same connection received a response. The touched source is unchanged at 0c2669a9f4a1d607e7591ae50ccf3c432a0aff08, where the patch applies and builds cleanly. The demonstrated impact is unauthenticated pre-authentication target-kernel denial of service. No disclosure, controlled write, RCE, or LPE was demonstrated. The source reproducer and complete logs are available on request and are not included in this public report. OpenAI Codex assisted source inspection, test design, patch drafting, and evidence organization. Fixes: db1312dd9548 ("nvmet: implement basic In-Band Authentication") Assisted-by: LLM Reviewed-by: Christoph Hellwig Signed-off-by: Sung Byeongchan Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit c2cc01c130494e39e61775817d8053b31e471cb7 Author: Palla Raghunath Date: Thu Oct 8 20:18:48 2026 +0100 nvmet-fc: don't drop the last assoc reference in nvmet_fc_delete_ctrl() [ Upstream commit 165301b5e2fd765fa05ea1044bbca8ba79820197 ] syzbot hit a recursive locking report on subsys->lock when a subsystem is unlinked from an FC port. nvmet_port_del_ctrls() holds subsys->lock while it calls ->delete_ctrl() for each controller. nvmet_fc_delete_ctrl() grabs a reference on the association, queues del_work and then drops the reference. If del_work gets to run to completion before that put, ours is the last reference. Freeing the assoc tears down the queues, the last nvmet_cq_put() drops the last ctrl reference, and nvmet_ctrl_free() goes for subsys->lock again: WARNING: possible recursive locking detected ... nvmet_ctrl_free+0xa6/0x8e0 drivers/nvme/target/core.c:1766 nvmet_cq_put+0x158/0x200 drivers/nvme/target/core.c:848 nvmet_fc_target_assoc_free+0x418/0x2220 drivers/nvme/target/fc.c:1173 nvmet_fc_delete_ctrl+0x717/0x7e0 drivers/nvme/target/fc.c:1581 nvmet_port_del_ctrls+0xfb/0x150 drivers/nvme/target/core.c:311 nvmet_port_subsys_drop_link+0x1e8/0x310 drivers/nvme/target/configfs.c:1119 It's a real hang, not only a lockdep warning. I reproduced it with fcloop by putting an msleep() before the put: rm on the configfs link gets stuck in D state for good. I don't think we need that reference at all. del_work does list_del_rcu() and synchronize_rcu() before it drops the initial reference, so an assoc we find on assoc_list can't go away before rcu_read_unlock(). nvmet_fc_schedule_delete_assoc() doesn't sleep, so just call it inside the RCU section and get rid of the get/put. If the assoc is already being deleted, terminating is set and the call is a no-op, which matches what happened before when the get failed. With the same msleep() in place the patched kernel unlinks cleanly and the assoc is freed from the workqueue. Fixes: 4049dc96b8de ("nvmet-fc: defer cleanup using RCU properly") Reported-by: syzbot+da94a51633758d13bd63@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=da94a51633758d13bd63 Reviewed-by: Daniel Wagner Reviewed-by: Christoph Hellwig Signed-off-by: Palla Raghunath Signed-off-by: Keith Busch Signed-off-by: Sasha Levin commit d17567491fdf0d16eb92677ee4bb186f7c6b7741 Author: Longfang Liu Date: Tue Oct 13 15:19:29 2026 +0800 hisi_acc_vfio_pci: reject live migration on 64KB page with QM_HW_V3 hardware [ Upstream commit a80597900b8a0f1a9e87360164695f6a0a10556c ] On QM_HW_V3 (VF_CTRL mode) hardware with 64KB pages, the functional region and migration registers share one BAR2 physical page with no isolation, which leaks migration registers to the guest and causes guest kernel calltrace under the KVM emulated device scheme. The previous fix rejected the device in hisi_acc_vf_qm_init() during open_device, returning -EINVAL and breaking passthrough entirely. Move the drv_mode check into a helper called from probe() so that a VF_CTRL device on a 64KB page is bound to the generic ops, keeping passthrough working while disabling live migration. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Signed-off-by: Longfang Liu Link: https://lore.kernel.org/r/20261013071929.3988687-3-liulongfang@huawei.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit 210156f67547a141312f3b41ea6e5fe405dba713 Author: Simon Song Date: Mon Oct 5 11:42:36 2026 -0700 vfio/pci: Remove the core dependency on driver data [ Upstream commit 6a5f427bee12c82beaf13efbd133416da1541c39 ] vfio-pci-core currently has runtime functions that interpret pci driver_data as a pointer to vfio_pci_core_device, and enforce vfio variant drivers must set vfio_pci_core_device to their pci driver_data. This constrains variant drivers' private-data layout, including the typed driver data used by the Rust PCI infrastructure. Add VFIO_PCI_CORE_DEFINE_CALLBACKS macro to generate wrapper code for each vfio variant driver, update vfio variant drivers to store their private structures in driver_data and use generated wrapper to pass the vfio core device to helpers. Assisted-by: LLM Suggested-by: Jason Gunthorpe Suggested-by: Alex Williamson Suggested-by: Danilo Krummrich Link: https://lore.kernel.org/all/DLFD2ZDSK9YQ.3A4R66G8UJMD8@kernel.org/ Signed-off-by: Simon Song Reviewed-by: Jason Gunthorpe Reviewed-by: Danilo Krummrich Link: https://lore.kernel.org/r/20261005184236.1946167-2-xinmengs@nvidia.com [VGA chunks and commit log reference dropped with rebase to commit 93d41424caf7 ("PCI/VGA: pass a data pointer to be used in the decode callback (v2)")] Signed-off-by: Alex Williamson Stable-dep-of: a80597900b8a ("hisi_acc_vfio_pci: reject live migration on 64KB page with QM_HW_V3 hardware") Signed-off-by: Sasha Levin commit 8197c76ab20bc6040b1e136e823f164703482ac2 Author: Longfang Liu Date: Tue Oct 13 15:19:28 2026 +0800 hisi_acc_vfio_pci: fix NULL dereference in reset_prepare on PF passthrough [ Upstream commit e1d2d60b1f50296828d3f7ff26c45d1a90f142ef ] When a PF is bound to the driver via driver_override and passed through to a VM, its pf_qm stays NULL. The PCI error handler reset_prepare() runs during open_device through pci_try_reset_function(), before the mig_ops gate, and dereferences the NULL pf_qm for the timeout log, crashing the kernel. Move the mig_ops check to the entry of reset_prepare() and aer_reset_done() so non-migration devices skip the QM_RESETTING coordination. The dev local resolved &qm->pdev->dev before the gate, so open code it at the dev_err() call where qm is known valid. Also clear set_reset_flag together with QM_RESETTING in aer_reset_done(); the flag was never cleared before, so a later timed-out reset could release a foreign lock. Fixes: b0eed085903e ("hisi_acc_vfio_pci: Add support for VFIO live migration") Fixes: a22099ed7936f ("hisi_acc_vfio_pci: fix VF reset timeout issue") Signed-off-by: Longfang Liu Link: https://lore.kernel.org/r/20261013071929.3988687-2-liulongfang@huawei.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit c1ed6580a96291e8ae72759ca7c01cb4f3c2d9cc Author: Selvin Xavier Date: Tue Oct 13 07:04:27 2026 -0700 RDMA/bnxt_re: Unpublish QP table before freeing it [ Upstream commit 978361dd2ccff357d4fe6aac6ce057d1bfae8312 ] bnxt_re_dev_uninit() frees the QP table before the RCFW channel is disabled, so the CREQ tasklet can still look up rcfw->qp_tbl while it is being freed. Clear rcfw->qp_tbl under tbl_lock before freeing it, and have the QP error notification handler bail out if the table is gone. Fixes: 82f1f575aa13 ("RDMA/bnxt_re: Fix allocation of QP table") Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/20261013140427.256612-3-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit de9ada358d795b5ad7f280d10f5d34264802d696 Author: Abhishek Mohapatra Date: Tue Oct 13 07:04:26 2026 -0700 RDMA/bnxt_re: Use kvzalloc for QP table allocation [ Upstream commit 724a39b36af94787d32094da87729f24a28888b7 ] The QP table size depends on the firmware reported max_qp, so it can be large and a physically contiguous kzalloc may fail. Use kvzalloc_objs() and free it with kvfree(). Fixes: 82f1f575aa13 ("RDMA/bnxt_re: Fix allocation of QP table") Signed-off-by: Abhishek Mohapatra Signed-off-by: Selvin Xavier Link: https://patch.msgid.link/20261013140427.256612-2-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d866ff175ca7637085a7f11eeacfa74444ee6c95 Author: Heiko Carstens Date: Mon Oct 12 13:42:46 2026 +0200 s390/percpu: Use asm_inline for arch_this_cpu_add() [ Upstream commit 10f9cf286ec3e6f99569e5ce3e99afbeb77b962f ] When converting to preemptible percpu operations the arch_this_cpu_add() inline assemblies were not converted to use asm_inline instead of a plain asm statement. With all the macro usage the inline assemblies grow significantly, and the compiler may decide to not inline even small functions. This can be observed with gcc16 and a defconfig build where many calls to __srcu_read_lock_fast() are not inlined anymore, even though it is basically only a this_cpu_inc(). Use asm_inline to address this. Fixes: 18ec6c5d7ec6 ("s390/percpu: Use new percpu code section for arch_this_cpu_add()") Acked-by: Alexander Gordeev Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin commit 3ea858efb516dcd311d95f85eeb895ce48d902b4 Author: Heiko Carstens Date: Mon Sep 21 17:58:05 2026 +0200 s390/percpu: Rework to simplify percpu_entry() and percpu_exit() [ Upstream commit 7849fb83e4cf814710003e4c83e161f97cf7ab1c ] The percpu code section functionality uses a rather complex method to figure out if the register, which contains the address of the current cpu's percpu variable, needs to be adjusted. If an interrupt happens within a percpu code section (indicated by a lowcore field), the instruction at the interrupted location is checked. If it is not a specific AG instruction, the register needs to be updated. This mechanism needs to take kprobes into account, and enforces a specific instruction ordering. Mark Rutland provided a different solution for arm64 [1] which comes without such limitations, but requires to use one more instruction, and two more registers. Given that this simplifies percpu_entry() and percpu_exit() it seems to be worth to go that route. Change s390 to implement a similar approach. This requires to encode three register numbers into the "percpu_register" field, which is used to indicate if a percpu code section is executed. The used mviy instruction can write only one byte, which allows to encode only two register numbers. Use a register pair for the inline assemblies, and only encode the even register number of the register pair to work around this. The generated code changes like this for e.g. a simple this_cpu_inc(): Old: c0 20 00 00 00 00 larl %r2,c6 <-- load address of percpu var b9 04 00 32 lgr %r3,%r2 <-- pointless copy of address eb 03 03 c0 00 52 mviy 960,3 <-- start of percpu code section - gpr 3 contains percpu var address e3 30 03 b8 00 08 ag %r3,952 <-- add percpu offset eb 01 30 00 00 7a agsi 0(%r3),1 <-- atomic inc eb 00 03 c0 00 52 mviy 960,0 <-- end of percpu code section New: c0 10 00 00 00 00 larl %r1,c6 <-- load address of percpu var eb 21 03 c0 00 52 mviy 960,33 <-- start of percpu code section 33 == 0x21: - gpr 1 contains percpu var address - gpr 2 used for percpu offset - gpr 2+1 == 3 used for current cpu's percpu var address e3 20 03 b8 00 04 lg %r2,952 <-- load percpu offset 41 32 10 00 la %r3,0(%r2,%r1) <-- generate current cpu's percpu var address eb 01 30 00 00 7a agsi 0(%r3),1 <-- atomic inc eb 00 03 c0 00 52 mviy 960,0 <-- end of percpu code section In the above "new" code example 33 (0x21) is used as indicator value to mark that a percpu code section is executed. This value implies that registers 2 and 3 will (only) hold the percpu offset and the current cpu's percpu var address. Those registers will be updated by percpu_exit() if the process was migrated to a different cpu to contain the percpu offset and percpu var address of the new cpu. Note that because of the pointless lgr instruction in the "old" code example the two code sequences have identical size, and it looks like only one more register is used. However this is because of suboptimal gcc code generation. [1] https://lore.kernel.org/all/20260908151741.394589-1-mark.rutland@arm.com/ Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit c45beb3491f2eabda5a65ee29bc2878ad6f7c86b Author: Heiko Carstens Date: Mon Sep 21 17:58:04 2026 +0200 s390/percpu: Use percpu code section for this_cpu_cmpxchg() [ Upstream commit 45b0097302d87a42189abe0b33d69fe18f6c7cb0 ] Convert this_cpu_cmpxchg() to make use of percpu code section functionality in order to get rid of preempt_disable() and preempt_enable() calls. Consider only four and eight byte usages, since there are no compare and swap instructions for one and two bytes available. For one and two bytes use the previous simple implementation. Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit 6a602251b5fda336c688b7f7b824c65b47ceccaf Author: Heiko Carstens Date: Mon Sep 21 17:58:03 2026 +0200 s390/percpu: Use percpu code section for this_cpu_xchg() [ Upstream commit d83b5cf355ca762ef19aa3a424af44e3e275ff52 ] Convert this_cpu_xchg() to make use of percpu code section functionality in order to get rid of preempt_disable() and preempt_enable() calls. Consider only four and eight byte usages, since there are no compare and swap instructions for one and two bytes available. For one and two byte use the previous simple implementation. Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit d4b979301bd25944b38be8c7076a1ae69343cc64 Author: Heiko Carstens Date: Mon Sep 21 17:58:02 2026 +0200 s390/percpu: Use percpu code section for this_cpu_cmpxchg128() [ Upstream commit e8b55c9982df6dc5f28c427e4debabb4da3a5e64 ] Convert this_cpu_cmpxchg128() to make use of percpu code section functionality. This is just for the sake of completeness, since currently there is no in-kernel user of this_cpu_cmpxchg128(). Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit 447006925d399b819f1e3d03c50ab9537060e5a4 Author: Heiko Carstens Date: Mon Sep 21 17:58:01 2026 +0200 s390/percpu: Use __PCPU_BEGIN() and __PCPU_END() for inline assemblies [ Upstream commit da9af84e66c3ace4f1a95421c1152f9df4e6abc5 ] Replace the use of MVIY_PERCPU(), AG_ALT(), and MVIY_ALT() within all percpu inline assemblies with __PCPU_BEGIN() and __PCPU_END(), since the begin and end of each inline assembly is the same. Also use consistent names: e.g. __PCPU_MVIY() and __PCPU_AG() instead of the previous MVIY_PERCPU() and AG_ALT(). Furthermore extract DEFINE_GR_NUM and UNDEF_GR_NUM which are used to convert register strings to register numbers. All of this should make the code more readable. No functional change. Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit d74cba0806b8fa2ef9f7d56e6d998038e13ec886 Author: Heiko Carstens Date: Mon Sep 21 17:58:00 2026 +0200 s390/percpu: Rename inline assembly symbolic names [ Upstream commit 02a8ff0f894f6960d5d5fb47169140a1ae5c024d ] Rename percpu inline assembly symbolic names so they match (more) what is specified with input operands. A trivial change which is supposed to make the code a bit more readable. Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit ce2e73c1d4a2a5a100449f922ec7c83fe3ced348 Author: Heiko Carstens Date: Mon Sep 21 17:57:59 2026 +0200 s390/percpu/lowcore: Add and use LC_PERCPU lowcore offset defines [ Upstream commit 301e3a0776511ed60cca1f7d4b14b6b44827c6f4 ] Define LC_PERCPU_OFFSET and LC_PERCPU_REGISTER offset defines and use them in percpu code. This shortens the percpu inline assemblies and makes them a bit more readable. Note that because of header dependencies it is not possible to use asm-offsets. However to avoid adding more dependencies to asm-offsets it seems to be preferable to use the current approach in any way. Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit 4696827cb3dfbbbd742706350ba661a2a37f5c02 Author: Heiko Carstens Date: Mon Sep 21 17:57:58 2026 +0200 s390/percpu: Let MVIY_PERCPU() calculate alternative displacement [ Upstream commit d6fe39764bd690949ae640c49164cca07b99d7c9 ] Let MVIY_PERCPU() calculate the alternative lowcore displacement instead of passing the same value(s) again and again in all percpu inline assemblies. This shortens the inline assemblies and makes them a bit more readable. Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit e992122bd2882ca9a58d49539d268c1a5ee172c2 Author: Heiko Carstens Date: Mon Sep 21 17:57:56 2026 +0200 s390/percpu: Add sanity check to GEN_MVIY macro [ Upstream commit 965869bd2a4f2df44c84fc44f2d2038d14b45978 ] Emit an error if the GEN_MVIY macro fails to parse the passed register string. This will make it more obvious if something similar which was fixed with [1] happens again. [1] commit 101782f8945a ("s390/percpu: Fix MVIY_PERCPU() with older binutils") Acked-by: Alexander Gordeev Tested-by: Mete Durlu Signed-off-by: Heiko Carstens Stable-dep-of: 10f9cf286ec3 ("s390/percpu: Use asm_inline for arch_this_cpu_add()") Signed-off-by: Sasha Levin commit 4ed3ecd584c596913a43ce128897d25f927aee0d Author: Heiko Carstens Date: Thu Oct 1 12:32:17 2026 +0200 s390/early: Fix early warning handling [ Upstream commit 646dc01d634bc182529d7cd5f5346869aa7d58ee ] When adding support for __WARN_printf() the early program check handler was not taken into account. Add the missing support to the early program check handler. This avoids that the kernel crashes instead of printing a warning. Fixes: 04dabb4261c3 ("s390/bug: Implement __WARN_printf()") Fixes: 79996065cfa2 ("s390/bug: Skip __WARN_trap() in call traces") Reviewed-by: Ilya Leoshkevich Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin commit edc60cef472c5702f812da2678ac63d4af782e84 Author: Heiko Carstens Date: Fri Oct 9 15:26:04 2026 +0200 s390/uprobes: Fix off-by-one bug in emulated PER handling [ Upstream commit 2ba01cf7b2598571486425a0605f1434909b532d ] The uprobes code emulates some instructions, and with that also PER storage-alteration handling, in case a debugger is attached. The PER storage-alteration handling contains an off-by-one bug, which may lead to PER traps which should not happen. Adjust the comparison in sim_stor_event() to fix that. Fixes: 8d1a2427d8fc ("s390/uprobes: fix user space PER events") Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin commit c578177982be983e32230736795bcfa2746af8c6 Author: Heiko Carstens Date: Fri Oct 9 17:21:31 2026 +0200 s390/ptrace: Preserve ILC when updating system call number [ Upstream commit 946b9dcff33bd4669464674ae1c00683b875be55 ] When an attached debugger changes gpr2 via PTRACE_POKEUSR while the traced process has PIF_SYSCALL set, the int_code in pt_regs is also updated. In case of an svc it contains the instruction length code (ILC), as well as the system call number. The ptrace code sets the ILC unconditionally to a value which matches the svc instruction. However the svc instruction also may have been executed via the execute or execute relative long instruction, which have a different length. Therefore preserve the ILC and only change the system call number using syscall_set_nr(). This makes sure that in case of a PSW rewind the instruction address points to the correct instruction. Fixes: 56e62a737028 ("s390: convert to generic entry") Reviewed-by: Sven Schnelle Signed-off-by: Heiko Carstens Signed-off-by: Sasha Levin commit 74ab376345a5221cbe5c6ada6cad20e46638bca1 Author: Qu Wenruo Date: Wed Aug 5 07:29:51 2026 +0930 iomap: follow the alignment requirement for iomap_dio_hole_iter() [ Upstream commit 4025185cf953e3f52ab63cf5fec50c1485ee7bb7 ] [BUG] On the latest development branch, btrfs with 8K block size on 4K page sized systems will fail all test cases that run fsstress. One very short example would be: # $fsstress -n 4 -d $mnt -s 1785675805 -v 0/0: dwrite - no filename 0/1: creat f0 x:0 0 0 0/1: creat add id=0,parent=-1 0/2: write dontcache f0[259 1 0 0 0 0] [816411,3620] 0 0/3: dread - xfsctl(XFS_IOC_DIOINFO) f0[259 1 0 0 32 820031] return 25, fallback to stat() 0/3: dread f0[259 1 0 0 32 820031] [483328,81920] 0 Which triggered the following ASSERT(): assertion failed: IS_ALIGNED(state->start, blocksize) && IS_ALIGNED(state->end + 1, blocksize), in fs/btrfs/extent-io-tree.c:346 (unaligned extent state, blocksize=8192 start=487424 end=565247 state=0x0) ------------[ cut here ]------------ kernel BUG at fs/btrfs/extent-io-tree.c:346! Oops: invalid opcode: 0000 [#1] SMP CPU: 4 UID: 0 PID: 648 Comm: fsstress Tainted: G E 7.2.0-rc5-custom+ #431 PREEMPT(full) 7c507bd40d65e4d871e698b22d80f1306bbec543 Tainted: [E]=UNSIGNED_MODULE Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS unknown 02/02/2022 RIP: 0010:validate_extent_state.part.0.isra.0.cold+0x24/0x26 [btrfs] Call Trace: insert_state+0x34/0x1a0 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8] set_extent_bit+0x440/0x8d0 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8] btrfs_lock_extent_bits+0x58/0x380 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8] btrfs_dio_iomap_begin+0x319/0xb70 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8] iomap_iter+0x1a2/0x370 __iomap_dio_rw+0x236/0x8d0 iomap_dio_rw+0x12/0x30 btrfs_direct_read+0x15f/0x290 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8] btrfs_file_read_iter+0x42/0x90 [btrfs 6924944583e4bc91a7c5183a1e7908e745a9b0c8] vfs_read+0x25e/0x380 ksys_read+0x73/0xe0 do_syscall_64+0xe1/0x790 entry_SYSCALL_64_after_hwframe+0x4b/0x53 RIP: 0033:0x7fc3f129318e [CAUSE] iomap_dio_hole_iter() is responsible for zeroing out the buffer for a hole, which calls iov_iter_zero() to zero the range. However btrfs disables page fault during its __iomap_dio_rw() call, so iov_iter_zero() can fail at any page boundary. When the fs block size is larger than page size, iov_iter_zero() may only have zeroed one page, which is not aligned to the fs block size. Such one page long range is passed back to btrfs, which triggers the above ASSERT(). [FIX] For iomap_dio_hole_iter() round down the copied length, and revert any excessive range that is beyond the aligned copied length. Also use @aligned_copied for the size increment and iter advancement. This should only affect btrfs, which is the only fs utilizing iomap dio with page fault disabled. Fixes: 001397f5ef49 ("iomap: add IOMAP_DIO_FSBLOCK_ALIGNED flag") Signed-off-by: Qu Wenruo Link: https://patch.msgid.link/73bd4d9b39e821453028ca8e567eaad2ebe0fc18.1785880740.git.wqu@suse.com Reviewed-by: Christoph Hellwig Reviewed-by: Pankaj Raghav Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 5d96a1239052d1bb21ddf60d5b3aa63bfe0d72b8 Author: Jagadeesh Kona Date: Sat Aug 1 01:15:07 2026 +0530 clk: qcom: Fix camera rivian PLL configuration settings [ Upstream commit 6666c03f2348886774d6441350fbe0e7a782f471 ] clk_alpha_pll_write_config() in the PLL configure function skips writes to PLL registers when the configured value is 0. However, hardware requires USER_CTL_U and CONFIG_CTL_U2 to be explicitly programmed to 0 for a few rivian PLLs. Add a clk_regs_configure() callback to ensure these rivian PLL registers are correctly initialized on Glymur, SM8750, and Kaanapali platforms. Fixes: 97255eedd690 ("clk: qcom: camcc-glymur: Add camera clock controller driver") Fixes: f9580bafd39c ("clk: qcom: camcc: Add camera clock controller driver for SM8750 SoC") Fixes: 92aae35f667c ("clk: qcom: camcc: Add support for camera clock controller for Kaanapali") Signed-off-by: Jagadeesh Kona Reviewed-by: Taniya Das Link: https://patch.msgid.link/20260801-cam-rivian-pll-config-fix-v1-1-6918d58cd823@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 455e990e7c397ad2f670ba042d1b69918d845141 Author: Konrad Dybcio Date: Thu Sep 17 11:06:55 2026 +0200 clk: qcom: rcg2: Clear force enable after rate failure [ Upstream commit d4e8c6b9aef42d06cf5755543ad10097b2217990 ] Shared RCG rate changes assert force-enable before programming the new configuration. If programming fails, the function returns without clearing force-enable, leaving the root running while CCF can release temporary parent and resource references. Attempt to clear force-enable on the configuration error path before returning the original programming error. This restores the same cleanup performed after a successful configuration while preserving the primary failure for callers. Fixes: 7ef6f11887bd ("clk: qcom: Configure the RCGs to a safe source as needed") Assisted-by: LLM Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260917-topic-qc_clk_fixes-v1-3-5531cb00514b@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 7d9723f97f1073702297c16cce1ede9f99e2451e Author: Konrad Dybcio Date: Thu Sep 17 11:06:54 2026 +0200 clk: qcom: rcg2: Propagate force-enable status errors [ Upstream commit 8c0f93e10fa9e34009817bd37bb75c1b5a691fa2 ] clk_rcg2_is_enabled() returns either a hardware status or a negative regmap error. The force-enable polling loop treats every nonzero return as an enabled clock, so a failed status read is incorrectly reported as success and clock reconfiguration can continue with unknown hardware state. Check for negative returns before testing the enabled status and propagate the read error to the caller. Fixes: 7ef6f11887bd ("clk: qcom: Configure the RCGs to a safe source as needed") Assisted-by: LLM Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260917-topic-qc_clk_fixes-v1-2-5531cb00514b@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit b34c2506e5f9568c72861c39b2ed13191f4135d8 Author: Konrad Dybcio Date: Thu Sep 17 11:06:53 2026 +0200 clk: qcom: rcg2: Initialize shared floor clock state [ Upstream commit 72f34d429f6e51b0ef8c43ab7667c4fb4099dd46 ] Shared floor RCGs use the cached parked_cfg whenever CCF considers the clock disabled. Unlike the other shared RCG variants, their ops do not initialize that cache, leaving it zeroed until the first disable or rate change. This can make registration report an undivided XO configuration instead of the boot-programmed parent and divider. Initialize parked_cfg from CFG_REG without parking or otherwise changing the hardware. Propagate read failures so a clock with unknown initial state is not registered. Fixes: aec8c0e28ce4 ("clk: qcom: rcg2: add clk_rcg2_shared_floor_ops") Assisted-by: LLM Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260917-topic-qc_clk_fixes-v1-1-5531cb00514b@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit c1e06f13705ad14f4e6bc416c27fe2f5d0f64f57 Author: Abel Vesa Date: Wed Sep 16 15:04:41 2026 +0300 clk: qcom: mmcc-msm8960: Configure PLL15 only on APQ8064 [ Upstream commit 342db3b6cf7bad2a53ccd5e2d844faf260953d9d ] PLL15 is specific to APQ8064, but the shared probe function configures it unconditionally, including on MSM8960. Its configuration registers at offsets 0x33c through 0x348 exceed the MSM8960 regmap maximum of 0x334, so regmap rejects these accesses. The PLL configuration helper ignores the errors and probe continues. Only configure PLL15 when the selected descriptor is for APQ8064, matching the existing variant check for the GFX3D clock adjustments. Fixes: e216ce60a9e0 ("clk: qcom: Add support for APQ8064 multimedia clocks") Assisted-by: LLM Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260916-clk-qcom-mmcc-msm8960-fix-pll15-config-v1-1-11fae0be111d@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 61e1cf36fb6eb3625194fa4eb0d624a7c9166af4 Author: Abel Vesa Date: Wed Sep 16 14:55:46 2026 +0300 clk: qcom: mmcc-sdm660: Fix MDSS AHB clock HWCG register offset [ Upstream commit c5f338329a2d0d60f7874aa7a1addaa0e4e75a3b ] The MDSS AHB clock HWCG bit resides in the same register as the branch enable and halt status bits, at offset 0x2308. The current HWCG register offset of 0x8a004 exceeds the regmap maximum of 0x40000, so regmap rejects the read in clk_branch_in_hwcg_mode(). Since the read error is ignored, the helper uses an uninitialized value to decide whether to skip the halt status check. Correct the HWCG register offset so the helper reads the actual hardware clock gating state. Fixes: 5db3ae8b33de ("clk: qcom: Add SDM660 Multimedia Clock Controller (MMCC) driver") Assisted-by: LLM Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260916-clk-qcom-mmcc-sdm660-fix-mdss-ahb-hwcg-offset-v1-1-30dcf09d907c@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 22f20341e4cda7e76c811da3a4472e9944ab19b9 Author: Abel Vesa Date: Wed Sep 16 14:45:53 2026 +0300 clk: qcom: mmcc-msm8996: Fix FD AHB clock register offset [ Upstream commit 7cb2d65286b817d8d7e26f454a9c374d65e87072 ] The FD AHB clock branch register is at offset 0x3b74, not 0x3ba74. The incorrect offset exceeds the regmap maximum of 0xb008, so regmap rejects accesses to it and the clock cannot be enabled. Correct both the enable and halt register offsets so the driver can enable the branch and check its status. Assisted-by: LLM Fixes: c252659770db ("clk: qcom: Add MSM8996 Multimedia Clock Controller (MMCC) driver") Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260916-clk-qcom-mmcc-msm8996-fix-fd-ahb-offset-v1-1-a575e1b9112c@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit a5d104831115aaa9d5f81dacee69c759699280c6 Author: Abel Vesa Date: Wed Sep 16 14:29:30 2026 +0300 clk: qcom: gcc-ipq5424: Fix TME reset register offsets [ Upstream commit 3732dccb8d75b2cddc8857f3944cb7482ef4b46a ] The GCC_TME_BCR and GCC_TME_SEC_BUS_BCR offsets exceed the regmap maximum of 0x3f024. Regmap therefore rejects accesses to both registers, leaving the resets ineffective while the reset operations report success. The offsets appear to contain typographical errors. Use 0x10000 for GCC_TME_BCR, matching the offset used on IPQ9574 and the surrounding register layout. Use 0x1a030 for GCC_TME_SEC_BUS_BCR, placing it in the same register block as GCC_SEC_CTRL_BCR at 0x1a000. Fixes: 21b5d5a4a311 ("clk: qcom: add Global Clock controller (GCC) driver for IPQ5424 SoC") Assisted-by: LLM Signed-off-by: Abel Vesa Reviewed-by: Kathiravan Thirumoorthy Link: https://patch.msgid.link/20260916-clk-qcom-gcc-ipq5424-fix-tme-bcrs-offsets-v1-1-0fa10674908a@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 4854a8010a2fbe9a628c898053444d081685f301 Author: Konrad Dybcio Date: Tue Sep 15 21:18:15 2026 +0200 clk: qcom: gcc-x1e80100: Don't poll the status bit of GCC_USB4_n_SYS_CLK [ Upstream commit d42e0c55e6db7b8282e8dc63f7e70595da0f72f5 ] These clocks are PHY-sourced and their halt bits seem not to update reliably. Ignore it to prevent spurious warnings. Fixes: 161b7c401f4b ("clk: qcom: Add Global Clock controller (GCC) driver for X1E80100") Signed-off-by: Konrad Dybcio Reviewed-by: Taniya Das Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260915-topic-hamoa_clk_usb4-v1-1-5d8d5225b598@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit a329cb163c583418c34724a5a9345ad70a4075e5 Author: Jagadeesh Kona Date: Tue Sep 15 17:37:32 2026 +0530 clk: qcom: gcc-glymur: Use clk_regmap_phy_mux_ops for GCC UFS muxes [ Upstream commit 20b77a88fc6e410b69bc98d3d61c035a8618fb90 ] Use clk_regmap_phy_mux_ops for GCC UFS muxes so these muxes are automatically switched to UFS external symbol clocks during enable and safely parked at XO clk during disable. Fixes: efe504300a17 ("clk: qcom: gcc: Add support for Global Clock Controller") Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Signed-off-by: Jagadeesh Kona Reviewed-by: Taniya Das Link: https://patch.msgid.link/20260915-glymur-ufs-clk-changes-v2-2-d0aa1c60c269@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 2c10129be80d357910ecc712eadbf17c5ea6dd12 Author: Jagadeesh Kona Date: Tue Sep 15 17:37:31 2026 +0530 clk: qcom: rpmhcc: Add LNBB clocks support for Glymur [ Upstream commit 1ebab545ee3acbbee22adecb858d5d1d001de0af ] Add support for rpmh LN_BB_CLK2 and LN_BB_CLK3 clocks on Qualcomm Glymur platform. Fixes: ebcb9db98bda ("clk: qcom: rpmh: Add support for Glymur rpmh clocks") Signed-off-by: Jagadeesh Kona Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Reviewed-by: Taniya Das Link: https://patch.msgid.link/20260915-glymur-ufs-clk-changes-v2-1-d0aa1c60c269@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit b70cbe1d59faf7a41a108cb72c706872c0c65261 Author: Taniya Das Date: Thu Sep 24 15:09:56 2026 +0530 clk: qcom: gcc: Fix GPLL enable register offset for Nord SoC [ Upstream commit e297cf5b7601b7a41693eba2d9bc8f036e417bf7 ] The GPLLs in the North-East, North-West and South-East global clock controllers on the Qualcomm Nord SoC were registered with a placeholder enable register offset of 0x0. As a result the shared PLL voting register was never programmed, leaving the PLLs' enable state uncontrolled. Point each GPLL at its actual GPLL_ENABLE register (0x57010 for the North-East and South-East controllers, 0x76008 for the North-West controller). Each PLL continues to select its own vote bit through enable_mask. Fixes: a4f780cd5c7a ("clk: qcom: gcc: Add multiple global clock controller driver for Nord SoC") Signed-off-by: Taniya Das Reviewed-by: Shawn Guo Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260924-nord_gcc_offset_fix-v1-1-230ffad2dae9@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit bfb112c6c869f78d83348dcc22751b050ecff953 Author: Abel Vesa Date: Thu Sep 24 13:39:31 2026 +0300 clk: qcom: gcc-kaanapali: Tie the CX power domain to controller [ Upstream commit b080163dce8ce06167fa7c88eaefd4282955f616 ] Enable runtime PM for the controller, allowing CX to be powered down once all GCC consumers have released their clocks and GDSCs. Fixes: d1919c375f21 ("clk: qcom: Add support for Global clock controller on Kaanapali") Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260924-qcom-tie-cx-to-gcc-v5-15-38732033e5b5@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 0cc335c905821a841004d4caf3d6042b3b56bc9b Author: Abel Vesa Date: Thu Sep 24 13:39:30 2026 +0300 clk: qcom: gcc-eliza: Tie the CX power domain to controller [ Upstream commit e8d919bc9a4cb27793d2aae12bb81f432c3f71a0 ] Enable runtime PM for the controller, allowing CX to be powered down once all GCC consumers have released their clocks and GDSCs. Fixes: 3d356ab4a1ec ("clk: qcom: Add support for Global clock controller on Eliza") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260924-qcom-tie-cx-to-gcc-v5-14-38732033e5b5@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 0e642bfcfa8a305e2bc63f81229869b061f8a4f4 Author: Guangshuo Li Date: Wed Oct 7 20:17:43 2026 +0800 soc: mpfs: use kref cleanup on probe failure [ Upstream commit 6f77194e1147d85c10b4964edee7091c701a25c2 ] After kref_init(), the device_get_match_data() failure path frees the mailbox channel and sys_controller directly, bypassing the matching kref_put() for the initial reference. Use mpfs_sys_controller_put() on this path so that the initial reference established by kref_init() is released through the existing kref release callback. Rename the error label to reflect that cleanup is now performed through the kref helper. This issue was found by manual code inspection. Fixes: 75ef23397558 ("soc: microchip: mpfs-sys-controller: fix resource leak on probe error") Signed-off-by: Guangshuo Li Signed-off-by: Conor Dooley Signed-off-by: Sasha Levin commit 45dccd64383db32a8166d5f4990d2ff0a56afdab Author: Yuho Choi Date: Wed Sep 23 12:40:55 2026 -0400 bus: arm-cci: Drop cci-control-port node reference in __cci_ace_get_port() [ Upstream commit 810ccc792193909ba9bbb4246e0eb0de14dad724 ] __cci_ace_get_port() looks up the device's "cci-control-port" node with of_parse_phandle(), which returns the node with its reference count raised, and only compares the pointer against the probed ports. Neither the match nor the no-match return releases it. Drop the reference on both paths once the comparison is done. Fixes: ed69bdd8fd9b ("drivers: bus: add ARM CCI support") Signed-off-by: Yuho Choi Link: https://lore.kernel.org/r/20260923164122.596910-1-oss.patchbox@gmail.com Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin commit 340b776ff00b6ac48bcd37e9c4e4da27ab038c0f Author: Yuho Choi Date: Wed Sep 23 12:35:15 2026 -0400 bus: arm-cci: Drop CPU node reference in cci_ace_init_ports() [ Upstream commit 41d6c0fcd4d75bf78c304c6660d60fcf757885ce ] cci_ace_init_ports() looks up each possible CPU's node with of_get_cpu_node(), which returns the node with its reference count raised, but never releases it: neither when the CPU has no ACE port nor after the port has been recorded. Before the commit below the loop used for_each_child_of_node(), which manages the references itself. The node is only needed for the port lookup, so drop the reference right after __cci_ace_get_port(). Fixes: 78b4d6e0fd26 ("drivers/bus: arm-cci: avoid parsing DT for cpu device nodes") Signed-off-by: Yuho Choi Link: https://lore.kernel.org/r/20260923163536.596107-1-oss.patchbox@gmail.com Signed-off-by: Arnd Bergmann Signed-off-by: Sasha Levin commit 8f378dc1d6fe86ec54874678a07206e1d7b098d9 Author: Linkai Gong Date: Mon Aug 3 09:54:50 2026 +0800 char: scx200_gpio: check cdev_add() return value [ Upstream commit fe26c195c265c033e474d015061a0183c7a02193 ] cdev_add() can fail. The driver currently ignores the return value and reports probe success even when the cdev was not registered, leaving a chrdev region allocated with no working file operations. Check the return value, emit an error, and unwind the chrdev region and platform device on failure. Fixes: 635adb6cd25c ("[PATCH] scx200_gpio: use 1 cdev for N minors, not N for N") Signed-off-by: Linkai Gong Link: https://patch.msgid.link/20260803015450.2050900-1-gonglinkai@kylinos.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 1d5c3db0cf3079d77ac507d5db0292bad8d09886 Author: Sasha Levin Date: Sun Oct 11 18:33:40 2026 -0400 tools: hv: remove unused rte_smp_mb() [ Upstream commit b67eeae485e22893b678229169024a73b87cf113 ] rte_smp_mb() has never been used, and its "static inline __always_inline" declares inline twice, so clang warns: vmbus_bufring.c:61:15: warning: duplicate 'inline' declaration specifier [-Wduplicate-decl-specifier] vmbus_bufring.c:62:1: warning: unused function 'rte_smp_mb' [-Wunused-function] Remove it. Fixes: 45bab4d746510 ("tools: hv: Add vmbus_bufring") Assisted-by: LLM Signed-off-by: Sasha Levin Reviewed-by: Hamza Mahfooz Acked-by: Saurabh Sengar Link: https://patch.msgid.link/20261011223358.2327625-12-sashal@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 9d8d1431ca2bf32658a7494770f6bfb2e478ee98 Author: Weigang He Date: Sat Sep 26 22:49:31 2026 +1000 thermal/drivers/ti-soc-thermal: Cancel pending alert work on remove [ Upstream commit aaa6c8dec49339710f9fd2a2af5646cf4111dbd4 ] On a threshold crossing, the talert IRQ handler calls ti_thermal_report_sensor_temperature(), which queues the work embedded in the sensor's ti_thermal_data on the system workqueue. Nothing ever cancels or flushes that work. ti_bandgap_remove() frees the talert IRQ last. free_irq() waits for a running handler, but not for the work the handler has queued. When remove returns, devres unregisters and frees the thermal zones and then frees the devm-allocated ti_thermal_data, so a work item that is still pending runs ti_thermal_work() on freed memory: ti_thermal_work() data = container_of(work, struct ti_thermal_data, thermal_wq); thermal_zone_device_update(data->ti_thermal, ...); Free the talert IRQ before removing the sensors, so that no new work can be queued, and cancel the work in ti_thermal_remove_sensor(). This needs an OMAP4460/4470 or OMAP5 SoC (DRA7 has TALERT but no ->report_temperature, so it never queues the work), a threshold crossing just before the driver is unbound or unloaded, and the work still pending when devres frees the data. Found by static analysis tool CodeQL. Fixes: 445eaf871bf9 ("staging: omap-thermal: common code to expose driver to thermal framework") Assisted-by: LLM codeql Signed-off-by: Weigang He Signed-off-by: Daniel Lezcano Acked-by: Keerthy Link: https://patch.msgid.link/20260926124931.3599746-1-geoffreyhe2@gmail.com Signed-off-by: Sasha Levin commit e5f18210c8e8ce233a23c59def1bf92ae142e8c8 Author: Georgi Djakov Date: Mon Sep 28 16:28:23 2026 +0300 thermal/drivers/qcom-spmi-temp-alarm: Fix temp_map indexing [ Upstream commit 51c262cf2aa9dfd97591e570d4e82af493ad1689 ] Fix the following issue noticed when booting on the db845c-dragonboard: BUG: KASAN: global-out-of-bounds in qpnp_tm_sync_thresholds+0x11c/0x180 [qcom_spmi_temp_alarm] Read of size 24 at addr ffffdd2495f01200 by task (udev-worker)/371 CPU: 3 UID: 0 PID: 371 Comm: (udev-worker) Not tainted 7.3.0-rc3 #116 PREEMPT Hardware name: Thundercomm Dragonboard 845c (DT) Call trace: show_stack+0x18/0x24 (C) dump_stack_lvl+0xa4/0xf4 print_report+0x1f4/0x5ac kasan_report+0x84/0xcc kasan_check_range+0xf0/0x1a4 memcpy+0x3c/0xa4 qpnp_tm_sync_thresholds+0x11c/0x180 [qcom_spmi_temp_alarm] qpnp_tm_probe+0x3dc/0xae8 [qcom_spmi_temp_alarm] platform_probe+0xc4/0x18c really_probe+0x17c/0x4fc ... The buggy address belongs to the variable: temp_map_gen1+0x60/0xc4 [qcom_spmi_temp_alarm] It looks like temp_map is a pointer to the complete temperature map. Indexing it directly advances the entire map, rather than selecting a threshold row. Fix this by dereferencing the temp_map before indexing it to select the requested threshold row. Fixes: 703f13285a6c ("thermal/drivers/qcom-spmi-temp-alarm: Add temp alarm data struct based on HW subtype") Fixes: 1f835c6a4c84 ("thermal/drivers/qcom-spmi-temp-alarm: Prepare to support additional Temp Alarm subtypes") Signed-off-by: Georgi Djakov Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260928132823.1426513-1-djakov@kernel.org Signed-off-by: Sasha Levin commit ba25ba6391fae8a6c1b0ab364086deff03aca448 Author: Arnaldo Carvalho de Melo Date: Wed Oct 7 06:17:42 2026 -0300 perf test attr: Source setup_python.sh instead of calling python [ Upstream commit 3b05843302202598a6d25f3e2543c8182e6a930c ] The "Perf attribute expectations test" (perf test 82) fails on machines that don't ship a bare 'python' binary, i.e. distributions that provide only python3 unless python-is-python3 or an equivalent is installed. Namhyung Kim hit this and posted the fix applied here in : /home/namhyung/project/linux/tools/perf/tests/shell/attr.sh: line 20: python: command not found ---- end(-1) ---- 82: Perf attribute expectations test : FAILED! attr.sh is the only shell test that still invokes python directly; do what the others do: source lib/setup_python.sh, which prefers python3, falls back to python and skips the test when no interpreter is found, then run $PYTHON. Fixes: 8519e4f44c2af722 ("perf test: Add a shell wrapper for "Setup struct perf_event_attr"") Reported-by: Namhyung Kim Suggested-by: Namhyung Kim Reviewed-by: Ian Rogers Link: https://lore.kernel.org/linux-perf-users/asWLmvF-3YtoKJ7j@google.com/ Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 565a33552d3b2b2b203d0c4d2b01200dcf07854d Author: Yogesh Gaur Date: Wed Sep 9 16:18:47 2026 +0530 comedi: pcmuio: validate the IRQs supplied by userspace [ Upstream commit 9c325b21bba99e597771137fc11b9427c86618d8 ] comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so it->options[1] is a number chosen by userspace. pcmuio passes it to request_irq() without checking it first, which lets an interrupt owned by another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be claimed for this board. When the owner of that interrupt is later released the descriptor is freed while this driver's handler is still installed on it. Every interrupt this board can assert is a legacy ISA one, so the ISA range is the right bound; it is also sufficient, because mp_chip_data->isa_irq is set only by alloc_isa_irq_from_domain() and mp_unmap_irq() returns early when it is set. Bound the value before requesting it, as das16m1.c already does. An out-of-range value is ignored rather than rejected, so the board still attaches without interrupt support, exactly as it does today when request_irq() fails. This board takes two interrupts, one per ASIC, so options[1] and options[2] both need the check. The existing options[2] == dev->irq case is left alone: it covers both ASICs sharing one interrupt and neither having one, and by then options[1] has already been validated. Fixes: 6baef150380d ("Staging: comedi: add pcmmio and pcmuio drivers") Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260909104848.1763-7-yogeshgaur.83@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 308443d693d19cde3fa39f51a2cccd2b9975509b Author: Yogesh Gaur Date: Wed Sep 9 16:18:46 2026 +0530 comedi: pcmmio: validate the IRQ supplied by userspace [ Upstream commit 23c6fc62e754f8bc412ceb5c0d9aaa14f2c9ff31 ] comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so it->options[1] is a number chosen by userspace. pcmmio passes it to request_irq() without checking it first, which lets an interrupt owned by another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be claimed for this board. When the owner of that interrupt is later released the descriptor is freed while this driver's handler is still installed on it. The board's interrupt is routed in software rather than jumpered, and the driver notes that "any IRQ from 1-15 is OK", so the ISA range is exactly the right bound. Bound the value before requesting it, as das16m1.c already does. An out-of-range value is ignored rather than rejected, so the board still attaches without interrupt support, exactly as it does today when request_irq() fails. Fixes: 6baef150380d ("Staging: comedi: add pcmmio and pcmuio drivers") Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260909104848.1763-6-yogeshgaur.83@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 4a2f698fdc630fabb9ba970804b1c0353d1bb8d3 Author: Yogesh Gaur Date: Wed Sep 9 16:18:45 2026 +0530 comedi: dmm32at: validate the IRQ supplied by userspace [ Upstream commit 797d56d7f90864e67424f8e82639a9b3aedf37e0 ] comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so it->options[1] is a number chosen by userspace. dmm32at passes it to request_irq() without checking it first, which lets an interrupt owned by another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be claimed for this board. When the owner of that interrupt is later released the descriptor is freed while this driver's handler is still installed on it. Every interrupt this board can assert is a legacy ISA one, so the ISA range is the right bound; it is also sufficient, because mp_chip_data->isa_irq is set only by alloc_isa_irq_from_domain() and mp_unmap_irq() returns early when it is set. Bound the value before requesting it, as das16m1.c already does. An out-of-range value is ignored rather than rejected, so the board still attaches without interrupt support, exactly as it does today when request_irq() fails. Fixes: 3c501880ac44 ("Staging: comedi: add dmm32at driver") Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260909104848.1763-5-yogeshgaur.83@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 875a674b7a12271dcb66eeb63d5c01714f2c0320 Author: Yogesh Gaur Date: Wed Sep 9 16:18:44 2026 +0530 comedi: dt2814: validate the IRQ supplied by userspace [ Upstream commit 81026c2b3f9096cdfdfa02918f94865629fb7f90 ] comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so it->options[1] is a number chosen by userspace. dt2814 passes it to request_irq() without checking it first, which lets an interrupt owned by another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be claimed for this board. When the owner of that interrupt is later released the descriptor is freed while this driver's handler is still installed on it. Every interrupt this board can assert is a legacy ISA one, so the ISA range is the right bound; it is also sufficient, because mp_chip_data->isa_irq is set only by alloc_isa_irq_from_domain() and mp_unmap_irq() returns early when it is set. Bound the value before requesting it, as das16m1.c already does. An out-of-range value is ignored rather than rejected, so the board still attaches without interrupt support, exactly as it does today when request_irq() fails. Fixes: a211ea977a41 ("Staging: comedi: add dt2814 driver") Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260909104848.1763-4-yogeshgaur.83@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 5f672f6dd52081b23d3d5355eb3b1045ad0a64bb Author: Yogesh Gaur Date: Wed Sep 9 16:18:43 2026 +0530 comedi: ni_atmio16d: validate the IRQ supplied by userspace [ Upstream commit 71424db0ebb5f484fa3f386910f8ce9da95b8b2e ] comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so it->options[1] is a number chosen by userspace. ni_atmio16d passes it to request_irq() without checking it first, which lets an interrupt owned by another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be claimed for this board. When the owner of that interrupt is later released the descriptor is freed while this driver's handler is still installed on it. The driver already documents which interrupts the board can assert -- "0 == no irq; or 3,4,5,6,7,9,10,11,12,14,15" -- so use exactly that set rather than the whole ISA range. Bound the value before requesting it, as das16m1.c already does. An out-of-range value is ignored rather than rejected, so the board still attaches without interrupt support, exactly as it does today when request_irq() fails. Fixes: 2323b276308a ("Staging: comedi: add ni_at_atmio16d driver") Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260909104848.1763-3-yogeshgaur.83@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 6052d2536dfdf628d0e4e4fca607cc16420c9eca Author: Yogesh Gaur Date: Wed Sep 9 16:18:42 2026 +0530 comedi: comedi_parport: validate the IRQ supplied by userspace [ Upstream commit 790ea6844593bcd03b0379986fc821d8c511746e ] comedi boards are configured through the COMEDI_DEVCONFIG ioctl, so it->options[1] is a number chosen by userspace. comedi_parport passes it to request_irq() without checking it first, which lets an interrupt owned by another irqdomain -- a PCI device's IO-APIC GSI, for instance -- be claimed for this board. When the owner of that interrupt is later released the descriptor is freed while this driver's handler is still installed on it. A parallel port asserts a legacy ISA interrupt, so the ISA range is the right bound; it is also sufficient, because mp_chip_data->isa_irq is set only by alloc_isa_irq_from_domain() and mp_unmap_irq() returns early when it is set. syzbot hit this one: remove_proc_entry: removing non-empty directory 'irq/20', leaking at least 'comedi_parport' WARNING: fs/proc/generic.c:747 at remove_proc_entry+0x4e7/0x610 fs/proc/generic.c:747 Call Trace: unregister_irq_proc+0x206/0x2a0 kernel/irq/proc.c:406 free_desc+0x89/0x330 kernel/irq/irqdesc.c:482 irq_free_descs+0x84/0xc0 kernel/irq/irqdesc.c:865 irq_domain_free_irqs+0x46a/0x5c0 kernel/irq/irqdomain.c:1917 mp_unmap_irq+0xf8/0x130 arch/x86/kernel/apic/io_apic.c:1061 acpi_unregister_gsi_ioapic+0x40/0x60 arch/x86/kernel/acpi/boot.c:722 acpi_pci_irq_disable+0x275/0x360 drivers/acpi/pci_irq.c:517 pci_disable_device+0x130/0x270 drivers/pci/pci.c:2206 pci_device_remove+0xb2/0x1d0 drivers/pci/pci-driver.c:512 device_release_driver_internal+0x44e/0x620 drivers/base/dd.c:1372 unbind_store+0xf8/0x110 drivers/base/bus.c:244 The leaked /proc entry the warning names is the mild part. mp_chip_data->count tracks GSI mappings rather than request_irq() users, and __setup_irq() takes no reference on the descriptor, so the irq_desc is freed with the comedi irqaction still attached to it. Bound the value before requesting it, as das16m1.c already does. An out-of-range value is ignored rather than rejected, so the board still attaches without interrupt support, exactly as it does today when request_irq() fails. Fixes: 241ab6ad7108 ("Staging: comedi: add comedi_parport driver") Reported-by: syzbot+690d666eb12fca6e1e61@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=690d666eb12fca6e1e61 Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260909104848.1763-2-yogeshgaur.83@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 6edf7316de02659d5689b0d8e3e882f955484874 Author: Thomas Fourier Date: Tue Oct 6 16:09:09 2026 +0200 net: alacritech: fix dma_free_coherent() in error path [ Upstream commit 05b5019b01fb9443b09ae4ed34af1135a80a84c8 ] In slic_init_stat_queue(), a series of coherent buffers is allocated with the length size. The size is then stored in stq->mem_size for normal deallocation. However, in the error path, stq->mem_size is also used but is not initialized. This error may leave the freed buffers mapped, leaking a resource and allowing the device to access freed memory. Change the length in error path to size. Fixes: 60c140df15db ("net: ethernet: slicoss: add slicoss gigabit ethernet driver") Signed-off-by: Thomas Fourier Reviewed-by: Daniel Machon Link: https://patch.msgid.link/20261006140912.50828-2-fourier.thomas@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 69c86ec04303d4b9b128d6149073ac959a667853 Author: Weiming Shi Date: Sun Jul 12 06:34:26 2026 -0700 fs/ntfs3: do not mark frame pages uptodate on read error [ Upstream commit 80218408836fa6fc91a9c26a9c014f81abf9e41f ] ni_read_frame() ends with a loop that marks every page of a compressed frame uptodate regardless of whether the read succeeded: out: for (i = 0; i < pages_per_frame; i++) { pg = pages[i]; SetPageUptodate(pg); } Non-critical frame pages come from __filemap_get_folio(FGP_CREAT) and are not zeroed. On an error path that reaches out: before frame_mem is written, these pages keep uninitialized page-allocator contents but are still marked uptodate. A later read() is then served from the page cache and returns that stale kernel memory to user space. For an unprivileged user mounting a crafted NTFS image this is a repeatable kernel memory disclosure. Mark the pages uptodate only on success; on error leave them !uptodate so the read path re-reads them or reports the error. Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Reported-by: Xiang Mei Signed-off-by: Weiming Shi Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit f8a6e94fe95c6037c6fcd9ccf93358c81eb81cf3 Author: liyouhong Date: Wed Jul 29 14:49:32 2026 +0800 fs/ntfs3: fix ntfs_fnd leak when compare function is missing [ Upstream commit 86ba91170c03e02eee767d82a9a7f2048e51a5e4 ] indx_insert_entry(), indx_delete_entry() and indx_update_dup() take a finder via fnd_get() before calling get_cmp_func(). If no compare function is available they return -EINVAL and never release the finder. Jump to the existing out path so fnd_put() still runs. Fixes: 3a2141b2f1c3 ("fs/ntfs3: resolve compare function in public index APIs") Signed-off-by: liyouhong Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit dfd5322aaf22227555ded0603d00a020f8d6e179 Author: Tapio Reijonen Date: Thu Oct 8 09:48:32 2026 +0000 serial: max310x: don't transmit while an RS485 reconfigure is pending [ Upstream commit ae588038e31c9dbd6836cb12bbdd82af0271c373 ] TIOCSRS485 applies its register changes asynchronously: rs485_config() stores the new configuration and schedules rs_work, which programs HDPIXDELAY, MODE1.TRNSCVCTRL and the RTS path. A write() issued right after the ioctl therefore transmits against the old, half-switched state. On a single core the ordering is even deterministic: start_tx() picks the stale path first, then rs_work reprograms the chip, then tx_work pumps the data - with the transceiver already released. A TIOCSRS485 switching from the hardware to the software RTS path followed immediately by a write puts the whole transfer on the wire with the transceiver disabled: nothing reaches the bus and no error is reported anywhere. The inverse direction is as old as the asynchronous reconfigure itself: enabling RS485 and writing immediately shifts the first bytes out before rs_work has enabled the chip's auto-RTS. Defer instead: rs485_config() marks the reconfigure pending under port->lock, start_tx() leaves the data in the kfifo while the mark is set, and rs_work restarts the transmission itself once the new configuration is fully applied. The rs485-disable path's direct tx_work kick is replaced by the same mechanism, which also orders that flush after the reconfigure instead of before it. The restart kick also checks port->x_char: uart_send_xchar() reaches start_tx() too, and a lone x_char deferred by the pending gate leaves the kfifo empty, so the kick would otherwise skip it and nothing else would ever send it - an idle chip FIFO raises no TXEMPTY interrupt. And start_tx() re-checks the pending mark after the hrtimer_try_to_cancel(-1) path retakes the dropped lock, mirroring the tx_teardown re-check there: a TIOCSRS485 posted inside that window would otherwise let the transmission proceed on the stale path. rs_work takes port->lock for that restart through uart_port_lock_irqsave(): start_tx() may drop and retake the lock through the uart_port API on its hrtimer_try_to_cancel(-1) path, and a raw spinlock guard around the call would unbalance the nbcon console handling underneath. The restart also rewinds a send state adopted for the deferred write itself: set_rts_ctl_params() cannot tell data the pending gate deferred apart from an in-flight transfer's refill by the xmit buffer alone, and a deferred write pumped in the adopted send phase would skip the configured before-send delay. With the chip FIFO empty the adopted state can only be the deferred write: rewind it and let the restart run the full envelope. The chip-FIFO check for that rewind is deliberately lock-free, so a TX-empty refill can land between the read and the lock and the rewind can hit a live envelope. The consequence is bounded: the rewind runs under port->lock in a state the RTS worker reads as asserted, so the envelope pauses one before-send delay with the transceiver held - the same pause the unconditional rewind produced before patch 8's guard. Fixes: 5bdb48b501e8 ("serial: max310x: Fix RS485 handling") Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-9-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 23e38fc12dabcbbddddc70856f9c5bf8a1616a57 Author: Tapio Reijonen Date: Thu Oct 8 09:48:31 2026 +0000 serial: max310x: drive RTS in software when hardware delays are too short [ Upstream commit 33632215e1bbc6109173b761e0c9bc5c4fcdbeee ] The chip's auto-RTS path can express at most 15 bit-times of RTS setup and hold delay - a fraction of a millisecond at typical baud rates - while the uapi expresses the delays in milliseconds up to the UART core's RS485_MAX_RTS_DELAY. Requests beyond the field were rejected with -ERANGE, which makes the core silently wipe port->rs485 and disable RS485; a device tree asking for a 20 ms setup delay ends up with no RS485 at all and an unusable bus. Add a software-driven RTS path that takes over whenever the hardware cannot represent the requested timing, and clamp the delays to RS485_MAX_RTS_DELAY instead of rejecting them. max310x_set_rts_ctl_params() picks the path: software if either delay exceeds what 15 bit-times encode at the current baud rate, or if the requested RTS polarity combination cannot be produced by the auto-RTS engine; hardware otherwise, as before. On the software path the RTS envelope is driven by a single hrtimer, re-used for the before- and after-send phases (tracked in tx_state), plus a single rts_work that toggles RTS. start_tx() begins the envelope; rts_work asserts RTS and only then arms the before-send timer, so data is never shifted before RTS is on the wire. The timer expiry kicks tx_work; once the chip FIFO drains, the same timer is re-armed for one character (the byte still in the shift register) plus the after-send delay, after which rts_work releases RTS. One timer and one work keep the phases mutually exclusive and the RTS toggles ordered. A start_tx() landing while the envelope is already in its send phase only pumps the new data: rewinding it to the before-send phase would insert a spurious setup delay mid-stream. Teardown is interlocked: shutdown() and an RS485-disabling TIOCSRS485 set tx_teardown under port->lock before cancelling the timer and works, and start_tx() checks it on entry and again after the hrtimer_try_to_cancel(-1) path retakes the dropped lock - otherwise a write racing the teardown could re-arm the timer or queue rts_work against a port being shut down, leaving the transceiver driving the bus after close. The rs485-disable path additionally kicks tx_work afterwards, since a racing write may have queued data with no envelope left to pump it, and shutdown() now also cancels tx_work, which was previously cancelled only in remove(). The interlock also fences the adoption path below, so a reconfigure racing a teardown cannot re-enable the cancelled timer, and an RS485 disable flushes a queued rts_work before the pin is settled: one already past its tx_state read would re-assert RTS after the settle. set_rts_ctl_params() publishes sw_rts_during_tx with a single store and settles the RTS idle level only while tx_state is off, because serial_core calls set_termios() without port->lock and rs485_config() schedules a reconfigure on every TIOCSRS485 - either could otherwise release the transceiver mid-envelope. The settle also re-checks tx_state after its write and requeues rts_work if an envelope started meanwhile: the state read and the register write are not atomic, and rts_work re-derives the level from tx_state, so this converges without locking. shutdown() gates first - the interlock is set and the interrupts are masked before any wait, so nothing can start a new envelope or requeue tx_work behind the cancels - then honours a running after-send hold, bounded by the after-send delay plus two character times (the transmitter is already stopped by this point), and cancels the timer and works unconditionally: a TIOCSRS485 can clear sw_rts_during_tx while an envelope is still in flight, and neither may outlive the port. A hold that did not complete within the bound is settled by the final release below regardless. break_ctl() on the software path applies the configured RTS polarity itself. A reconfigure can also move the port off the hardware path while the chip's auto-RTS still owns a transmission in flight - a termios change or TIOCSRS485 pushing a delay above what the hardware can time at the new rate. Such transfers are invisible to tx_state, so the idle settle would release RTS and the MODE1 write would disable auto-RTS mid-transfer, shifting the rest of the data out with the transceiver released and no error reported anywhere. Adopt the transfer instead when the chip TX FIFO or the xmit buffer is not empty: enter MAX310X_TX_SEND and drive RTS manually before auto-RTS is disabled, so the pin is never released across the handover, and the normal drain path arms the after-send hold - or the adoption arms it directly if the FIFO drained while this raced the TX-empty worker. A transfer whose last character has already left the FIFO for the transmit shift register is still invisible and keeps the old behavior: at most one character of early release. The reverse move strands state instead: a reconfigure onto the hardware path mid-envelope left tx_state set, because nothing reset it in that direction and the TX-empty hold arming only ran while the software path was selected. A later reconfigure back off the hardware path then trusted the stale tx_state, skipped both the adoption and the idle settle, and disabled auto-RTS with the RTS register released - the rest of the transfer in flight shifted out with the transceiver off, again with no error reported (hit twice in 79 in-flight reconfigures under a multi-process stress test). The TX-empty unwind now runs regardless of the selected path - it is a no-op outside an envelope - and the reconfigure asserts RTS for any transfer it believes exists, stale or live, before auto-RTS is disabled. The hold is armed only once no transmittable data remains, so that assert cannot cut a burst short when it lands in a FIFO refill window; output that is stopped still releases through the hold. rts_work also derives the level from tx_break: a break can begin while the previous envelope's after-send hold is still armed - TIOCSBRK waits for the output to drain, which lands the break exactly there - and the expiring hold would otherwise release the transceiver mid-break. With break ownership in the derivation the hold expiry becomes an idempotent re-assert, and break-off restores the idle state as it already does. shutdown() gives its final RTS release one bit time, and at least 100 us, to reach the pin before powering the port down. The power-off stops the UART channel clock, and the RTS output stage is clocked by it: a release written immediately before the clock stops reaches the register but never moves the pin, which stays asserted until the next startup restarts the clock - a close racing the after-send hold expiry left the transceiver driving the bus, with the register reading released and the pin high. The measured propagation is about one tick of the 16x oversampling clock - below 50 us at 1200 baud - so one bit time keeps a 16x margin and scales with the clock the output stage runs on; the floor covers rates where a bit is shorter than the measured bound. Handing the pin to the chip's auto-RTS engine instead was tried and rejected on the wire: the pin level is RTSINVERT xor the selected source, so for an active-low RTS every single-register step of that handover drives the pin to the asserted level, and the same clock stop can freeze it there. Fixes: 55367c620aed ("serial: max310x: Add support for RS-485 mode") Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-8-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 2e262db92a00a50dd0934799d7ce30b856f0620e Author: Tapio Reijonen Date: Thu Oct 8 09:48:29 2026 +0000 serial: max310x: support active-low RTS on the hardware path [ Upstream commit 7b07356e820e9543cb5b64d009c345303aad0c65 ] The chip's auto-RTS engine asserts the RTS_ pin high while data is shifting out, so a transceiver with an active-low driver-enable could not use the hardware RS485 path at all: SER_RS485_RTS_AFTER_SEND is not in the supported flags and the core normalizes it away with "invalid RTS setting, using RTS_ON_SEND instead". The output stage is invertible: program IRDA.RTSINVERT when the requested polarity is active-low and advertise SER_RS485_RTS_AFTER_SEND in rs485_supported. A break already drives break_state onto the RTS bit unadjusted, which remains correct because RTSINVERT inverts the output stage itself, not the register value. Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-6-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Stable-dep-of: 33632215e1bb ("serial: max310x: drive RTS in software when hardware delays are too short") Signed-off-by: Sasha Levin commit ff7bdc2d2c1b4b57b9d3704565ecbc0cc09a5f28 Author: Tapio Reijonen Date: Thu Oct 8 09:48:28 2026 +0000 serial: max310x: don't power down the port mid-transmission on close [ Upstream commit c3ad42ccd303113a08bd0b441fb5b3380f29c5bf ] max310x_shutdown() powers the port down regardless of what the transmitter is doing. The power-off stops the UART clock mid-character, truncating the final frame, and on the auto-RTS path it freezes the RTS output at its current level: a close() with data still queued leaves the RS485 transceiver asserted until the next open, which also emits the interrupted character corrupted. Waiting for the data to drain is no better: the tty layer's wait-until-sent is bounded by closing_wait, configurable to none, and a hangup arrives with no wait at all, so draining a full FIFO blocks close() in uninterruptible sleep for seconds at low baud rates - and forever when CTS flow control blocks the FIFO. Instead, set MODE1 TxDisabl: the character in flight completes and the transmitter ceases with TX_ at idle. Give that character one character time (the chip has no transmitter-idle status), then reset the FIFOs so the auto-RTS engine sees the transmitter empty and releases RTS within the configured after-send hold; wait that hold plus one bit time before powering off. Abandoned data was explicitly not waited for, and startup() resets the FIFOs and TxDisabl on open anyway. Measured on a MAX14830: a truncating close() at 50 baud takes 0.23 s, RTS releases one character plus the hold after the last stop bit on both polarities, and the reopen corruption is gone. Fixes: f65444187a66 ("serial: New serial driver MAX310X") Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-5-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 2793e8d139aa2dd24f6ef6732434774fa50e195e Author: Tapio Reijonen Date: Thu Oct 8 09:48:27 2026 +0000 serial: max310x: fix RS485 delays being programmed as bit-times [ Upstream commit 7784d6aee59a142505072b3fbea97932b2fd1fa0 ] The HDPIXDELAY register counts the RTS setup and hold delays in bit-times, four bits per direction, but the driver has been writing the struct serial_rs485 delay_rts_before_send/delay_rts_after_send values into it unconverted - and the uapi expresses those in milliseconds. A requested 9 ms setup delay is programmed as 9 bit-times, which at 9600 baud is 0.94 ms, roughly a tenth of what userspace asked for; the error grows with the baud rate. Cache the baud rate in set_termios() and convert the delays to bit-times at the current rate, rounding up so the delay on the wire is never shorter than requested, and capping at the 15 bit-times the 4-bit field can hold. The conversion lives in max310x_set_rts_ctl_params(); set_termios() now calls it as well, since the conversion depends on the baud rate. The delays a 4-bit bit-time field can represent still fall well short of the milliseconds the uapi can express; requests beyond 15 bit-times are capped, and the -ERANGE rejection of values above 15 ms remains in place for now. Fixes: 55367c620aed ("serial: max310x: Add support for RS-485 mode") Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-4-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 6438b3ebe6db0485256433422b93e9caf041afb9 Author: Tapio Reijonen Date: Thu Oct 8 09:48:26 2026 +0000 serial: max310x: centralize the RS485 transceiver programming [ Upstream commit 56051740bf9720335a1a56e87a99e3491c33ce54 ] The HDPIXDELAY RTS delays and the MODE1 auto-transceiver enable are programmed in three places - the rs485-config worker, startup() and break_ctl()'s break-off restore - each with its own copy of the register sequence. Move the sequence into a helper, max310x_set_rts_ctl_params(), together with the tx_break guard that keeps the MODE1 write away from a break in progress; the break-off restore reapplies the current configuration through the same helper. No functional change intended. The copies differed only in that startup() clamped the delays to the 4-bit field while the worker wrote them unclamped; the helper clamps, and the difference is unreachable while rs485_config() still rejects delays above 15 ms with -ERANGE. Break-off additionally rewrites HDPIXDELAY with the values it already holds, a no-op on the wire. Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-3-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Stable-dep-of: 7784d6aee59a ("serial: max310x: fix RS485 delays being programmed as bit-times") Signed-off-by: Sasha Levin commit 8b8ef09b1340a43315807f3731c456c084400f3d Author: Tapio Reijonen Date: Thu Oct 8 09:48:25 2026 +0000 serial: max310x: fix breaks not reaching the wire in RS485 mode [ Upstream commit 4efacb600bf98b13e0659f05afa4549795277e35 ] The chip's auto-RTS (MODE1.TRNSCVCTRL) asserts the RS485 transceiver only while FIFO data is shifting out, and a break is not FIFO data: on an RS485 port a requested break sets the TX break bit but the transceiver is never enabled, so the break never reaches the wire. Break-led protocols cannot work at all. Disable auto-RTS for the break duration and drive RTS manually via the LCR RTS bit, then restore auto-RTS when the break ends. Track the break in tx_break and leave MODE1 alone in the rs485-config worker while it is set - a TIOCSRS485 arriving mid-break would otherwise re-enable auto-RTS on top of the manual RTS and release the transceiver before the break ends; break_ctl() restores auto-RTS from the then-current configuration when the break completes. The worker runs under port->mutex - break_ctl() and set_termios() already do - so the tx_break test and the MODE1 write cannot straddle a break starting or ending, and startup() clears tx_break alongside the latched TXBREAK bit, since a port can be closed with a break still asserted. Only the break assertion is gated on RS485 being enabled; the restore at break end runs unconditionally and derives MODE1 from the current configuration. Returning early for a port whose RS485 was disabled mid-break - that reconfigure is deferred like any other - would leak the manually driven RTS and leave the transceiver holding the bus indefinitely after the break ends. On a non-RS485 port the restore is a no-op: nothing else writes the LCR RTS bit. Fixes: 55367c620aed ("serial: max310x: Add support for RS-485 mode") Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-2-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 1046a9847f0869e34bdda12de03de0842682dbb7 Author: Tapio Reijonen Date: Thu Oct 8 09:48:24 2026 +0000 serial: max310x: don't clobber the TX break bit in set_termios [ Upstream commit 3b2de448ec0332c1cb8c38b4c5ff0c8e860befbc ] A TX break asserted with TIOCSBRK ends early, with no error reported, as soon as any termios change lands on the port: a break is a state that must hold until TIOCCBRK, but max310x_set_termios() overwrites the whole LCR register, and LCR also carries the TX break bit that break_ctl() drives. No concurrency is required - a baud or parity change from the same process ends the break just as well, and break-led protocols lose their break with nothing in the logs. Update only the LCR bits that are derived from termios and leave the TX break and RTS pin control bits untouched. Since nothing clears a break when a port is closed with the break still asserted - the tty core sends no break-off on release, and the unconditional write here was the accidental recovery - clear TXBREAK in startup(), the same way 8250 does. Fixes: f65444187a66 ("serial: New serial driver MAX310X") Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-1-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit bb93d60c150c2ceef4f3d941210dd7994b204534 Author: Jiayuan Chen Date: Thu Oct 8 17:26:36 2026 +0800 tcp_cubic: fix divide by zero and endless loop on bad module params [ Upstream commit 7d52b5d16afc1cf8484ae321658e217a80e3ff4d ] beta_scale and cube_factor are computed once at module init, and beta == 1024 or bic_scale == 0 is a divide by zero right there. Other out of range values give garbage: negative beta can make beta_scale 0, and bic_scale * 10 can overflow. Reject them. Read beta once, as it can be written through sysfs before the init function runs. A small beta also gives a small beta_scale, and (cwnd * beta_scale) >> 3 truncates to 0 for a tiny cwnd, so the TCP friendliness loop never ends. Rather than testing delta on every ACK, make sure beta_scale is at least 8 at init, so delta is >= 1 within the cwnd < 1 million packets limit this code is designed for. This slows the TCP friendly estimate for beta < 512, a backoff harder than Reno's 0.5, which is not a setting anyone should use. Fixes: df3271f3361b ("[TCP] BIC: CUBIC window growth (2.0)") Suggested-by: Eric Dumazet Reviewed-by: Eric Dumazet Signed-off-by: Jiayuan Chen Link: https://patch.msgid.link/20261008092641.140777-4-jiayuan.chen@linux.dev Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 3f3b5fcc24a2077f1e1d1367551fdb5eee652b5d Author: Jiayuan Chen Date: Thu Oct 8 17:26:35 2026 +0800 tcp_hybla: fix divide by zero on rtt0 == 0 [ Upstream commit f09eb97322b16a6f709a47599c95b62f786905f9 ] rtt0 is the reference RTT in ms, so 0 makes no sense, and hybla_recalc_param() divides by it right from hybla_init(). Reject values below 1 when the parameter is written. Also cap it at U32_MAX / USEC_PER_MSEC, since rtt0 * USEC_PER_MSEC can wrap to 0 on 32-bit. An rtt0 above that (about 71 minutes) makes no sense anyway. Fixes: 835b3f0c0d7e ("[TCP]: Add TCP Hybla congestion control module.") Fixes: 740b0f1841f6 ("tcp: switch rtt estimations to usec resolution") Reported-by: VEGA Signed-off-by: Jiayuan Chen Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20261008092641.140777-3-jiayuan.chen@linux.dev Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 10d581056d9129d4e28e710e6ec75633a15dc59e Author: Jiayuan Chen Date: Thu Oct 8 17:26:34 2026 +0800 tcp_bic: fix divide by zero on max_increment == 0 [ Upstream commit 8edbf6c23363563e508a61f3f26f4e4b6eec9dd5 ] max_increment is how many packets cwnd can grow per RTT, so 0 makes no sense, and bictcp_update() divides by it. Reject values below 1 when the parameter is written. Fixes: 83803034f423 ("[TCP]: Add TCP BIC congestion control module.") Reported-by: VEGA Signed-off-by: Jiayuan Chen Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20261008092641.140777-2-jiayuan.chen@linux.dev Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 449a9336073a8ff774dbd0af5371a8852bd17b74 Author: David Heidelberg Date: Fri Sep 18 00:14:11 2026 +0200 serial: qcom-geni: power the console back up on system resume [ Upstream commit e95442c31ae65b57ddffdfa609531c549055f308 ] The console holds a runtime PM reference on its port, which keeps the port powered while the tty is closed. On system suspend pm_runtime_force_suspend() powers the port down regardless, but a single reference makes pm_runtime_need_not_resume() report the port as not in use, so it is marked runtime suspended instead of being flagged for pm_runtime_force_resume(). On system resume the port therefore stays powered down while uart_resume_port() goes on to program the termios settings and re-enable the console. If the tty has been opened before, uart_resume_port() ends up in startup(), whose runtime PM reference powers the port up again, and only the register writes made before that are lost. If the tty has never been opened (no getty on the port, /dev/console backed by another console), nothing powers the port back up and the console stays dead after the first suspend. Resume the port explicitly before uart_resume_port() when the console was force suspended. Assisted-by: LLM Fixes: aee1f94dab13 ("serial: qcom-geni: remove .pm callback, use runtime PM in startup/shutdown") Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20260918-qcom-geni-pm-v1-1-cb587e215607@ixit.cz Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 0b1b52851e30160d86c826439d60bf2ec63e8148 Author: Jeff Chen Date: Mon Oct 12 20:36:23 2026 +0800 wifi: mwifiex: append hotfix number to firmware version string [ Upstream commit 958f20d5aa0aa645068454fdb62ebc625ac9a115 ] mwifiex_ret_get_hw_spec() parses and logs the FW_HOTFIX_VER_ID TLV, but the hotfix value is not stored in the adapter structure. As a result, the hotfix number never appears in the firmware version string returned by mwifiex_drv_get_driver_version(). Store the hotfix version from FW_HOTFIX_VER_ID and append it to the firmware version string. Assisted-by: LLM sparse Fixes: 7715d79553de ("wifi: mwifiex: Support firmware hotfix version in GET_HW_SPEC responses") Signed-off-by: Jeff Chen Link: https://patch.msgid.link/20261012123624.3147417-2-jeff.chen_1@oss.nxp.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit fc913e89bd49c717dbf45dc83e3ec58f080dac0c Author: Chien Wong Date: Mon Oct 12 22:07:37 2026 +0800 wifi: mac80211: reserve MME tailroom for protected beacons [ Upstream commit 48002331da85c7c962cfbc09c8bd84d219a6fe1c ] Beacon protection appends an MME to beacons, but the skb allocation does not reserve tailroom for it. If the available tailroom is too small, the crypto path drops the beacon. Two factors often mask this: the 256-byte TIM reservation is rarely fully used, and dev_alloc_skb() may round up the allocation, leaving extra tailroom. Neither guarantees enough room for the MME. Reserve enough room for the largest MME. Fixes: 0a3a84360b37 ("mac80211: Beacon protection using the new BIGTK (AP)") Signed-off-by: Chien Wong Link: https://patch.msgid.link/20261012140738.70178-3-m@xv97.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 856d1fee3d1fa8101f58ff83b1fabcd76529a70e Author: Chien Wong Date: Mon Oct 12 22:07:36 2026 +0800 wifi: mac80211: fix encryption tailroom [ Upstream commit c49f54fd2abff08964677db8fdc1674c713ab42c ] BIP-CMAC-256 and BIP-GMAC append a 26-byte MME but mac80211 currently reserves only 18 bytes of encryption tailroom. Generating 26-byte MME may happen to work because the actual skb tailroom can exceed the requested amount. For example, dev_alloc_skb() rounds the allocation to kmalloc size buckets or alignment boundaries, and the extra space may cover the 8-byte shortfall. Reserve enough tailroom for the 26-byte MME. Fixes: 56c52da2d554 ("mac80111: Add BIP-CMAC-256 cipher") Signed-off-by: Chien Wong Link: https://patch.msgid.link/20261012140738.70178-2-m@xv97.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit de7e6e39e305c30e37bd5969ffa35682309017e9 Author: Yonatan Nachum Date: Mon Oct 12 16:51:13 2026 +0000 RDMA/efa: Fix race between admin command timeout and completion [ Upstream commit 466612f8a8020c6b3af6377c730775a4c630f12c ] An admin command that times out can race with the interrupt handler processing its completion, in two ways. The timeout path releases the completion context without synchronizing against the handler. A handler that has already seen the command as submitted then copies the CQE into the caller's response buffer after the waiter returned and that buffer went out of scope. The waiter can also observe the command as completed before the CQE was copied, since the status is published first. It decodes its own uninitialized response buffer, returns success with garbage contents and leaks stack data to the caller. Both wait paths read the status without the CQ lock. Add a timed-out state and publish it under the CQ lock in both wait paths before returning, so the handler, which only completes commands in submitted state, cannot act on an abandoned context. In the interrupt wait path test the return value of the wait instead of the status: the handler signals the completion after copying the CQE, so a successful wait implies a valid response. Read the status in the polling wait path inside the critical section that drains the CQ, which also lets a completion arriving on the last iteration be honored instead of reported as a timeout. Fixes: 0420e542569b ("RDMA/efa: Implement functions that submit and complete admin commands") Reviewed-by: Michael Margolin Reviewed-by: Tom Sela Signed-off-by: Yonatan Nachum Link: https://patch.msgid.link/20261012165113.576899-1-ynachum@amazon.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 176a278074403f7e1594f4d25809f9d5fa7bca67 Author: Haitam Lazaar Date: Sun Oct 11 11:55:57 2026 +0000 RDMA/siw: Enforce IB_ACCESS_REMOTE_READ for read responses [ Upstream commit f74eac4fc6c56274fb96c2c44ffad8f01c325f17 ] When generating an RDMA READ response (SIW_OP_READ_RESPONSE), siw_check_sgl_tx() unconditionally passes 0 as the required permission mask: /* Reference memory to be tx'd w/o checking access for LOCAL_READ */ rv = siw_check_sgl_tx(qp->pd, wqe, 0); Because perms is 0, siw_check_mem()'s authorization test: if ((mem->perms & perms) < perms) evaluates to (mem->perms & 0) < 0, which is always false. Consequently, an untrusted remote peer can issue an RDMA Read targeting any valid STag in the Protection Domain, even if the memory was registered strictly as write-only (IB_ACCESS_REMOTE_WRITE) without IB_ACCESS_REMOTE_READ. Enforce that the target memory region was granted IB_ACCESS_REMOTE_READ when answering SIW_OP_READ_RESPONSE work queue entries, while preserving perms = 0 for standard local sends. Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Signed-off-by: Haitam Lazaar Link: https://patch.msgid.link/1a12ad1d83f.19cd98924357428.7073029566232810804@lazaarsec.com Acked-by: Bernard Metzler Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 8f50c5962cdc8db8505ee6559123dbea51924bf6 Author: Luca Leonardo Scorcia Date: Fri Oct 2 09:19:26 2026 +0200 clocksource/drivers/timer-mediatek: Fix random crash at boot [ Upstream commit 8496a1d234e8cf9cb15c4282cb3a11c6550bd242 ] MediaTek bootloaders generally enable APXGPT timers at boot. This means that a timer IRQ can sometimes happen between the IRQ line request and the configuration of the clock event handler. This leads to a hard crash with an instruction abort, branch to pc 0x0 in mtk_gpt_interrupt handler as clkevt is null. To avoid this issue request the IRQ with IRQF_NO_AUTOEN and enable it explicitly after the clock event is configured. Issue was reported and fix tested on the Lenovo Tab E7 (TB-7104F, mt8167). Fixes: a0858f937960 ("clocksource/drivers/timer-mediatek: Convert the driver to timer-of") Signed-off-by: Luca Leonardo Scorcia Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20261002072115.169250-2-l.scorcia@gmail.com Signed-off-by: Sasha Levin commit 79b63475006423361a12135ba062004da0ccfa6b Author: Joas Antonio dos Santos Date: Wed Oct 7 12:25:00 2026 -0300 calipso: hash the cache key, not the option start, in calipso_cache_add() [ Upstream commit d538cc3ec0bc4cb7b40981b3213a6c6671959ed5 ] calipso_cache_add() stores calipso_ptr + 2 as the cache key, but computes entry->hash over calipso_ptr, i.e. starting two bytes earlier at the option type and length. calipso_opt_getattr() looks entries up with calipso_cache_check(calipso + 2, calipso[1], ...), which hashes the key itself. The two hashes only match on a jhash collision, so the CALIPSO label cache never hits and every labelled packet takes the full DOI lookup and category conversion path. The memcmp() on the key keeps lookups correct, so this is a performance bug only. Hash the stored key, as cipso_v4_cache_add() does for CIPSO. Fixes: 4fee5242bf41 ("calipso: Add a label cache.") Signed-off-by: Joas Antonio dos Santos Assisted-by: Claude:claude-opus-5-5 Reviewed-by: Daniel Machon Link: https://patch.msgid.link/179138670045.80227.16155454353416856947@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit a7fde3572d5f3153802a569ab9b970ce55fad7eb Author: Manivannan Sadhasivam Date: Mon Sep 7 16:33:49 2026 +0200 PCI: qcom: Honor IOMMU provider's #iommu-cells in qcom_pcie_config_sid_1_9_0() [ Upstream commit 5121d76cb9dde74662962cd5678a64abeaf3b3e4 ] qcom_pcie_config_sid_1_9_0() reads the "iommu-map" property as an array of fixed four-word {rid-base, phandle, sid, rid-len} entries to program the BDF to SID translation table. But that layout only holds for an IOMMU with '#iommu-cells = <1>'. The PCIe SMMUs on these SoCs use '#iommu-cells = <2>' (SID and mask), so per the pci-iommu binding each entry is really five cells long. This used to work only because the DTs were themselves broken. They described iommu-map with four-cell entries that omitted the SID mask, which of_map_id() tolerated via its of_check_bad_map() fallback, and the four-word parsing coincidentally matched that malformed shape. Since commit ccb2fd725d41 ("of: Respect #{iommu,msi}-cells in maps") the OF core parses such maps correctly, so the device trees were converted to proper five-cell entries, e.g. commit c41749e9554d ("arm64: dts: qcom: sm8250: Fix the PCIe iommu-map entries"). With five-cell entries the fixed four-word stride slips by one cell for each entry after the first, so qcom_pcie_config_sid_1_9_0() reads the endpoint mapping's RID from the preceding entry's length cell and its SID from the phandle cell. As the RID is the hash key, the endpoint's real RID is never programmed into the BDF to SID table. Its DMA then hashes to an unprogrammed slot, gets tagged with SID 0 and the SMMU faults like below on QCS8300: arm-smmu 15200000.iommu: Unhandled context fault: fsr=0x402, iova=0xffa00000, cbfrsynra=0x0, cb=1 To fix this, walk the map with a stride of 3 + '#iommu-cells' of the referenced IOMMU and take the SID from the first specifier cell, which is all the BDF to SID table needs. Validate the layout instead of trusting the array size. Also, preserve the legacy behavior of the old DTs by detecting the same pattern that of_check_bad_map() recognizes and falling back to a stride of four. Fixes: 4c9398822106 ("PCI: qcom: Add support for configuring BDF to SID mapping for SM8250") Reported-by: Loic Poulain Signed-off-by: Manivannan Sadhasivam Tested-by: Loic Poulain Tested-by: Neil Armstrong # on SM8650-HDK Link: https://patch.msgid.link/20260907143349.317495-1-mani@kernel.org Signed-off-by: Sasha Levin commit 75936dcf33fe7d95d6b7278c5f7b326ca07ff5ba Author: Vikas Gupta Date: Tue Oct 6 19:49:28 2026 +0530 bnge: skip dev_addr when building the VNIC unicast list [ Upstream commit 0b3fc7fe6f3f68569b9f9139893491b61a4b45b9 ] The default VNIC programs the device's MAC as L2 filter 0 in bnge_init_chip() via bnge_hwrm_set_vnic_filter(bn, 0, 0, dev_addr). bnge_cfg_rx_mode() then walks dev->uc and programs each unicast address as a further L2 filter, without excluding dev_addr. Skip dev_addr when building uc_list, since it is already installed as filter 0. As dev_addr now takes neither a uc_list slot nor an l2_filters[] slot, count only the non-dev_addr entries for the uc_list overflow check too, otherwise an input such as {dev_addr, A, B, C} would needlessly fall back to promiscuous mode even though A, B and C fit in exact-match filters. bnge_uc_list_updated() applies the same skip and count so the change detection stays consistent and does not loop. This issue was caught by Sashiko (nipa). Tested on Thor Ultra device. Fixes: 9afad4a17174 ("bng_en: Configure default VNIC") Signed-off-by: Vikas Gupta Reviewed-by: Dharmender Garg Link: https://patch.msgid.link/20261006141928.1432927-1-vikas.gupta@broadcom.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit f27800a99e825cb642f32d9690c3772830e47a4d Author: Cen Zhang Date: Tue Oct 13 16:01:06 2026 +0800 ALSA: pcm: Protect delay DMA sync against concurrent HW_FREE [ Upstream commit 50f413b83b31ea8d8ee4276165ab95ed5ab0e10f ] A PCM DMA buffer must remain allocated until explicit DMA synchronization finishes. snd_pcm_delay() calls snd_pcm_dma_buffer_sync() after dropping the stream lock, without participating in the buffer-access exclusion used by HW_FREE. With a managed NONCONTIG buffer requiring explicit sync, HW_PARAMS can allocate a separate runtime descriptor when the requested ring exceeds the preallocation. In PREPARED state with mmap_count zero, concurrent HWSYNC and HW_FREE calls on the same open PCM file can interleave: 1. HWSYNC checks the state in snd_pcm_delay() under the stream lock and releases that lock. 2. The sync helper fetches runtime->dma_buffer_p and enters snd_dma_noncontig_sync() with that descriptor. 3. HW_FREE takes the negative buffer-access count, checks PREPARED under the stream lock, releases the lock, and frees the DMA allocation and dynamic descriptor through snd_pcm_lib_free_pages(). 4. The sync callback resumes and reads the freed descriptor. The stream lock does not cover the allocation's release, and the sync operation has no positive buffer-access count to prevent it. The stale read causes a use-after-free in snd_dma_noncontig_sync(). DELAY uses the same snd_pcm_delay() path. Take a positive buffer-access count before checking the state and keep it until the DMA sync finishes, as the transfer and mmap paths already do. HW_FREE then returns -EBUSY while this access is active. If a buffer writer has already entered, snd_pcm_delay() returns -EBUSY before using the buffer. Keep the sync outside the stream lock and balance the count on the state-error path as well. KASAN report as below: BUG: KASAN: slab-use-after-free in snd_dma_noncontig_sync+0x295/0x310 [snd_pcm] Read of size 4 at addr ffff888108f58584 by task pcm-uaf-fixture/487 CPU: 1 UID: 0 PID: 487 Comm: pcm-uaf-fixture Not tainted 7.2.0-rc6-pmb-alsa-functional-v2+ #1 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? snd_dma_noncontig_sync+0x295/0x310 [snd_pcm] ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? snd_dma_noncontig_sync+0x295/0x310 [snd_pcm] kasan_report+0xe0/0x110 ? snd_dma_noncontig_sync+0x295/0x310 [snd_pcm] ? __pfx_snd_dma_noncontig_sync+0x10/0x10 [snd_pcm] snd_dma_noncontig_sync+0x295/0x310 [snd_pcm] ? __pfx_snd_dma_noncontig_sync+0x10/0x10 [snd_pcm] snd_dma_buffer_sync+0xc9/0x110 [snd_pcm] snd_pcm_delay+0x3bd/0x550 [snd_pcm] snd_pcm_common_ioctl+0x1e7/0x3aa0 [snd_pcm] ? srso_alias_return_thunk+0x5/0xfbef5 ? do_vfs_ioctl+0x1f5/0x1280 ? __pfx_do_vfs_ioctl+0x10/0x10 ? ioctl_has_perm.constprop.0.isra.0+0x34f/0x500 ? __pfx_snd_pcm_common_ioctl+0x10/0x10 [snd_pcm] ? srso_alias_return_thunk+0x5/0xfbef5 snd_pcm_ioctl+0x76/0xb0 [snd_pcm] ? __pfx_snd_pcm_ioctl+0x10/0x10 [snd_pcm] __x64_sys_ioctl+0x163/0x1d0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1cae7ab91b Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007ffe12d544f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f1cae7ab91b RDX: 0000000000000000 RSI: 0000000000004122 RDI: 0000000000000003 RBP: 00000000000001ee R08: 0000000000000073 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000001 R14: 00005584f32b1398 R15: 00005584f32b2ce8 Allocated by task 487: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_cache_noprof+0x251/0x610 snd_pcm_lib_malloc_pages+0x27c/0x9f0 [snd_pcm] snd_pcm_hw_params+0x171c/0x1d10 [snd_pcm] snd_pcm_common_ioctl+0x1f62/0x3aa0 [snd_pcm] snd_pcm_ioctl+0x76/0xb0 [snd_pcm] __x64_sys_ioctl+0x163/0x1d0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 499: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x307/0x580 snd_pcm_lib_free_pages+0x1c9/0x420 [snd_pcm] snd_pcm_common_ioctl+0x2bd3/0x3aa0 [snd_pcm] snd_pcm_ioctl+0x76/0xb0 [snd_pcm] __x64_sys_ioctl+0x163/0x1d0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff888108f58580 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 4 bytes inside of freed 64-byte region [ffff888108f58580, ffff888108f585c0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x108f58 flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff8881000428c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888108f58480: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888108f58500: 00 00 00 00 00 06 fc fc fc fc fc fc fc fc fc fc >ffff888108f58580: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff888108f58600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff888108f58680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== Disabling lock debugging due to kernel taint ------------[ cut here ]------------ kernel BUG at kernel/dma/mapping.c:417! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI CPU: 1 UID: 0 PID: 487 Comm: pcm-uaf-fixture Tainted: G B 7.2.0-rc6-pmb-alsa-functional-v2+ #1 PREEMPT(lazy) Tainted: [B]=BAD_PAGE Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:__dma_sync_sg_for_cpu+0x230/0x360 Code: df 48 c1 e8 03 80 3c 10 00 0f 85 fa 00 00 00 4c 8b 35 d4 6b 7a 09 e8 7f e2 17 00 83 fd 02 0f 86 39 fe ff ff e8 71 e2 17 00 90 <0f> 0b e8 69 e2 17 00 be 08 00 00 00 4c 89 ff e8 bc 5f 77 00 4c 89 RSP: 0018:ffff888111f3fc50 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffffffffc0250d10 RCX: ffffffff816d395f RDX: ffff88810836ba00 RSI: ffff888108f58580 RDI: ffffffffc02510d8 RBP: 00000000ffff8881 R08: 0000000000000000 R09: fffffbfff804a239 R10: ffffffffc02511cf R11: 6e696c6261736944 R12: ffff888108f58580 R13: 0000000002ce00e5 R14: ffffffffc0258720 R15: 0000000000000000 FS: 00007f1cae69c780(0000) GS:ffff8881fd861000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055d1affa2480 CR3: 0000000108fc0003 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: snd_dma_noncontig_sync+0x15a/0x310 [snd_pcm] ? __pfx_snd_dma_noncontig_sync+0x10/0x10 [snd_pcm] snd_dma_buffer_sync+0xc9/0x110 [snd_pcm] snd_pcm_delay+0x3bd/0x550 [snd_pcm] snd_pcm_common_ioctl+0x1e7/0x3aa0 [snd_pcm] ? srso_alias_return_thunk+0x5/0xfbef5 ? do_vfs_ioctl+0x1f5/0x1280 ? __pfx_do_vfs_ioctl+0x10/0x10 ? ioctl_has_perm.constprop.0.isra.0+0x34f/0x500 ? __pfx_snd_pcm_common_ioctl+0x10/0x10 [snd_pcm] ? srso_alias_return_thunk+0x5/0xfbef5 snd_pcm_ioctl+0x76/0xb0 [snd_pcm] ? __pfx_snd_pcm_ioctl+0x10/0x10 [snd_pcm] __x64_sys_ioctl+0x163/0x1d0 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1cae7ab91b Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 1c 48 8b 44 24 18 64 48 2b 04 25 28 00 00 RSP: 002b:00007ffe12d544f0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 0000000000000004 RCX: 00007f1cae7ab91b RDX: 0000000000000000 RSI: 0000000000004122 RDI: 0000000000000003 RBP: 00000000000001ee R08: 0000000000000073 R09: 00000000ffffffff R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000003 R13: 0000000000000001 R14: 00005584f32b1398 R15: 00005584f32b2ce8 Modules linked in: snd_pcmtest snd_pcm ---[ end trace 0000000000000000 ]--- RIP: 0010:__dma_sync_sg_for_cpu+0x230/0x360 Code: df 48 c1 e8 03 80 3c 10 00 0f 85 fa 00 00 00 4c 8b 35 d4 6b 7a 09 e8 7f e2 17 00 83 fd 02 0f 86 39 fe ff ff e8 71 e2 17 00 90 <0f> 0b e8 69 e2 17 00 be 08 00 00 00 4c 89 ff e8 bc 5f 77 00 4c 89 RSP: 0018:ffff888111f3fc50 EFLAGS: 00010293 RAX: 0000000000000000 RBX: ffffffffc0250d10 RCX: ffffffff816d395f RDX: ffff88810836ba00 RSI: ffff888108f58580 RDI: ffffffffc02510d8 RBP: 00000000ffff8881 R08: 0000000000000000 R09: fffffbfff804a239 R10: ffffffffc02511cf R11: 6e696c6261736944 R12: ffff888108f58580 R13: 0000000002ce00e5 R14: ffffffffc0258720 R15: 0000000000000000 FS: 00007f1cae69c780(0000) GS:ffff8881fd861000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055d1affa2480 CR3: 0000000108fc0003 CR4: 0000000000770ef0 PKRU: 55555554 Kernel panic - not syncing: Fatal exception Kernel Offset: disabled Rebooting in 1 seconds.. Fixes: a25684a95646 ("ALSA: memalloc: Support for non-contiguous page allocation") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-d74585d187e0b1810c08-v2-25432d0951f67fdaa1a9@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit b8824d0fb9e515d9b0d5be78b4acc99f02981151 Author: Cen Zhang Date: Tue Oct 13 15:54:35 2026 +0800 ALSA: rawmidi: Drain input work before freeing the runtime [ Upstream commit 8c3529f0a8faaac7d73333486f69da1617ecc579 ] The input runtime embeds event_work, so the work must be drained before close_substream() frees the runtime. The cancellation in snd_rawmidi_input_trigger() runs before close clears substream->opened, leaving a window for snd_rawmidi_receive() to enqueue more work. With a sequencer subscription to a USB MIDI input port, an in-flight completion can overlap the last subscription's midisynth_unsubscribe(): 1. snd_usbmidi_input_data() observes input_triggered and is delayed before calling snd_rawmidi_receive(). 2. Unsubscribe enters close_substream(), clears input_triggered through the provider trigger callback and returns from cancel_work_sync(). The substream is still opened. 3. The completion resumes. snd_rawmidi_receive() takes substream->lock, sees opened set and queues runtime->event_work before dropping the lock. 4. Close clears opened under that lock, closes the provider and frees the runtime. Stopping USB URBs does not drain the raw-MIDI work. 5. The queued work runs and snd_rawmidi_input_event_work() reads event or substream from the freed runtime, causing a use-after-free. Cancel input event_work again after clearing opened, before closing the provider or releasing the runtime's private data. Receive holds substream->lock through its opened check and work enqueue, so once close has cleared opened under that lock, no further receive can queue work. The final cancellation therefore drains any late work before the runtime is freed. Keep it outside the spinlock so a running callback can finish. Fixes: b3c705aa9e91 ("ALSA: rawmidi - Use workq for event handling") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-98489078ab56528d8e4a-v2-9408ce8c8f3c70b5c10d@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 5599351f2d08fa4c26365371273d43e1e67a1d32 Author: Helge Deller Date: Tue Sep 29 08:06:20 2026 +0200 fbdev: atafb: avoid cast when assigning buffer address pointer [ Upstream commit 111a4137edd2c4caad413efa5ebb8a37067c172c ] The sparse tool complains that the "cast removes the address space '__iomem' of expression". Avoid the cast by using the screen_buffer pointer instead of the screen_base pointer from the union. Fixes: d463633d63e6 ("fbdev: atafb: Add support for SuperVidel's SuperBlitter") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202609261313.kgFtkz2t-lkp@intel.com/ Cc: Miro Kropáček Signed-off-by: Helge Deller Signed-off-by: Sasha Levin commit 103ca9d011ea7ad25f897e829491029cae36119d Author: Helge Deller Date: Sat Sep 26 08:12:26 2026 +0200 fbdev: atafb: fix sparse warnings [ Upstream commit ec4eb034cf8f38fe1ee1e9df07850953c0c2ec0e ] Fix two sparse warnings: - atafb.c:1092: sparse: Using plain integer as NULL pointer Use NULL instead of 0 when assigning a pointer. - atafb.c:2824: sparse: switch with no cases FBCMD_GET_CURRENTPAR and and FBCMD_SET_CURRENTPAR seem to be historic defines, which are not any longer in the kernel, and as such the code isn't built any longer and may be dropped. Fixes: d463633d63e6 ("fbdev: atafb: Add support for SuperVidel's SuperBlitter") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202609261313.kgFtkz2t-lkp@intel.com/ Cc: Miro Kropacek Signed-off-by: Helge Deller Reviewed-by: Geert Uytterhoeven Reviewed-by: Michael Schmitz Signed-off-by: Sasha Levin commit d2c836b1c8e46b2fde9405aca3dd4d5761dcea71 Author: Myeonghun Pak Date: Mon Sep 14 20:38:34 2026 -0400 fbdev: gxt4500: Release WC setup on probe failure [ Upstream commit b71e0bb7ad40c005b167e9b48be3af5a3fa51974 ] gxt4500_probe() adds a write-combining range before allocating the cmap and registering the framebuffer. If a later step fails, the range is not released. Add the missing cleanup before unmapping the framebuffer, matching the successful remove path. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 38fc4d45fae5 ("gxt4500: Use arch_phys_wc_* for framebuffer") Assisted-by: LLM Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Signed-off-by: Helge Deller Signed-off-by: Sasha Levin commit 2418a4c5ffe985a16eeb410d8ec39a4abbd612bd Author: Abel Vesa Date: Thu Oct 1 10:46:36 2026 +0300 platform: arm64: qcom-hamoa-ec: Disable the SCI IRQ during suspend [ Upstream commit d21c5d267ec0ccae7e629286d3ef51224494267c ] EC SCI events require I2C transfers to retrieve the event information. During system resume, an SCI interrupt can be delivered before the I2C controller is ready to handle transfers, resulting in failed event reads: geni_i2c a84000.i2c: error turning SE resources:-13 qcom-hamoa-ec 3-0076: Failed to read EC SCI Event: -13 Keep SCI interrupt handling disabled across system sleep so that EC events are processed only while the I2C controller is available. This prevents event reads from racing with the controller's suspend and resume transitions. Fixes: 5c44f48e91de ("platform: arm64: Add driver for EC found on Qualcomm reference devices") Reviewed-by: Anvesh Jain P Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20261001-qcom-hamoa-ec-suspend-irq-v2-1-ec71a7cdec79@oss.qualcomm.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit d7d78fc750c15b23864848c0f06b038e825c5584 Author: Shyam Sundar S K Date: Tue Sep 29 21:26:09 2026 +0530 platform/x86/amd/pmc: clear devm-managed pointers on remove to prevent stale reuse [ Upstream commit c9ba86f5411730ebd333d94b9e1aa8f652dc743f ] The driver stores its state in a single file-scope static struct amd_pmc_dev, which is reused on every bind. Its regbase, smu_virt_addr, stb_virt_addr and fch_virt_addr members are MMIO mappings created with devm_ioremap(). On unbind the driver core unmaps these mappings, but it does not clear the pointers in the static struct. Since the struct is not freed, the members keep pointing at the now-unmapped addresses. On the next bind, the probe path re-maps a region only when its pointer is still NULL, so the stale pointer is reused and the following memcpy_fromio()/ioread32() touches freed MMIO, causing use-after-unmap crash. Clear these pointers in amd_pmc_remove() so the next probe re-maps them instead of reusing stale ones. Signed-off-by: Shyam Sundar S K Reviewed-by: Mario Limonciello (AMD) Fixes: 156ec4731cb22b ("platform/x86: amd-pmc: Add AMD platform support for S2Idle") Link: https://patch.msgid.link/20260929155609.1712638-1-Shyam-sundar.S-k@amd.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 17fca155b29cf1be1005591cbf2f11b1cae315d0 Author: Patryk Pilichowski Date: Fri Sep 25 23:33:33 2026 +0200 platform/x86: msi-wmi: Fix hotkeys dropped with vendor backlight [ Upstream commit 3e0193dc381468589e597c9e5144eb050d36f016 ] Commit dee82409a883 ("platform/x86: msi-wmi: Reformat msi_wmi_notify()") turned the condition for reporting a hotkey into an early return, but only negated the brightness key comparisons, not the backlight check. As a result, when the driver registers its own backlight device, all WMI hotkeys are now dropped, instead of all of them being reported as before. Restore the original behavior: only drop the brightness keys, and only when brightness is handled by the ACPI video driver. This was found by code inspection. It is not tested on hardware that uses the vendor backlight; on an MSI Katana 15 B13VFK (no vendor backlight) hotkey handling is unchanged. Fixes: dee82409a883 ("platform/x86: msi-wmi: Reformat msi_wmi_notify()") Signed-off-by: Patryk Pilichowski Link: https://patch.msgid.link/20260925213333.198058-1-pat.pilichowski@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 323ef933d931c6ef4d7e3be6763da1779f6d3cb1 Author: Jiale Yao Date: Sat Sep 26 20:12:48 2026 +0800 platform/olpc: Reserve space for a string terminator [ Upstream commit 1fe88b1741ff655bb59e4fd78178fe2c557b9185 ] ec_dbgfs_cmd_write() copies user input into a zero-initialized stack buffer and passes it to sscanf(). A write that overwrites the entire buffer leaves no terminator, so the subsequent parsing can read beyond the buffer. Limit the copy to leave room for the trailing NUL. Fixes: 6cca83d498bd ("Platform: OLPC: move debugfs support from x86 EC driver") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260926121250.3258285-2-yaojiale02@163.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 1a0484d4e2a5271b9e2a7b311c4ef9d19327997d Author: Aleksandrova Alyona Date: Thu Sep 17 14:08:12 2026 +0300 platform/x86: intel_telemetry: initialize default trace verbosity [ Upstream commit 1b55ec81926eb7f6e4fad692fa4040a569e9daf7 ] telemetry_def_get_trace_verbosity() returns success without initializing the output verbosity value. The default telemetry operations are installed when the core driver is initialized and again by telemetry_clear_pltdata() when the platform driver is removed. The telemetry debugfs files can remain available after the platform driver removal. A subsequent read of pss_trace_verbosity or ioss_trace_verbosity calls telemetry_get_trace_verbosity(), which may use the default callback and return success without setting verbosity. The uninitialized value is then passed to seq_printf(). Validate the output pointer and initialize the default verbosity to zero so callers never use an uninitialized value after a successful call. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 378f956e3f93 ("platform/x86: Add Intel Telemetry Core Driver") Signed-off-by: Aleksandrova Alyona Link: https://patch.msgid.link/20260917110812.2831-1-aga@itb.spb.ru Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit dac5e1ae5ea88dae3f0bfca9bd5a24a02bcb25d0 Author: Kristen Carlson Accardi Date: Thu Sep 24 12:36:24 2026 -0700 platform/x86/intel: power-domains: Handle failed init in tpmi_get_linux_die_id() [ Upstream commit e7aa0a21a38afd3063fd9b4bf31025a882537d95 ] tpmi_init() returns early with -ENODEV on CPU models that are not in tpmi_cpu_ids, before domain_die_map is allocated. When the driver is built in, tpmi_get_linux_die_id() remains callable after the failed init and dereferences the NULL domain_die_map. This is reachable from user space: uncore-frequency-tpmi calls tpmi_get_linux_die_id() from the show function of the world-readable die_id sysfs attribute. The attribute is created on multi-die packages for clusters with the core agent type, so reading it on such a CPU that is missing from tpmi_cpu_ids oopses. Likewise, if cpuhp_setup_state() fails, the error path frees domain_die_map but leaves the pointer set, so a later call would read freed memory. Return -ENODEV when the map was not allocated, and clear the pointer wherever it is freed. tpmi_get_linux_cpu_number(), tpmi_get_punit_core_number() and tpmi_get_power_domain_id() read only the static per-CPU data and hash table, so they are safe after a failed init. tpmi_get_power_domain_mask() has the same problem as this helper but no callers, so it is handled separately. Fixes: e37be5d85c60 ("platform/x86/intel: power-domains: Add interface to get Linux die ID") Assisted-by: LLM Signed-off-by: Kristen Carlson Accardi Acked-by: Srinivas Pandruvada Link: https://patch.msgid.link/20260924193625.1830526-2-kristen.c.accardi@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 082745c54e43bb23df8111f1fb783f58e15ed64a Author: Xi Pardee Date: Fri Sep 18 22:18:28 2026 -0700 platform/x86/intel/pmc: Fix stale NVL PCD-S S0ix_LPM telemetry constants [ Upstream commit 2ac40383e9b70bae67ff4cdbb2108c006bf1b5e5 ] The Nova Lake PCD-S S0ix_LPM telemetry layout changed. The PCD-S telemetry GUID was changed to reflect the layout change, per the client GUID revision rule. nvl_pcds_d3_status_1_map[] was correctly updated, but two companion constants were never updated to match: 1. NVL_PCDS_NUM_S0IX_BLOCKER (core.h) is 71 instead of the actual number of blk == 1 entries across nvl_pcds_blk_maps. 2. PCDS_LPM_REQ_GUID (nvl.c) is still 0x01091102. It was never bumped to 0x01091103 to reflect the S0ix_LPM telemetry metadata layout change. Both constants describe the same S0ix_LPM/blocker telemetry region for PCD-S, so fix them together in one change. Fixes: 41354f4c8a79 ("platform/x86/intel/pmc: Add Nova Lake support to intel_pmc_core driver") Signed-off-by: Xi Pardee Link: https://patch.msgid.link/20260919051830.565240-1-xi.pardee@linux.intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit a2b02a7870a044e5c76a2a27d358fb7f8df475a6 Author: Mario Limonciello Date: Fri Sep 18 12:02:16 2026 -0500 platform/x86/amd: pmc: Drop scratch_reg from amd_1ah_m80_cpu_info [ Upstream commit c84f2e1518d052f8699031330f1cc90cbf68740a ] This platform does no longer populate this register. Fixes: 2726b5758f80a ("platform/x86: amd-pmc: Use correct IP block table for AMD 1Ah M80H SoC") Signed-off-by: Mario Limonciello Link: https://patch.msgid.link/20260918170302.352054-3-mario.limonciello@amd.com Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit df9025ae128113e799a361c960f93aa319df42f6 Author: Daasaradhi Mannava Date: Wed Sep 16 17:48:12 2026 +0000 platform/x86: msi-ec: Report valid charge thresholds when unset [ Upstream commit a102207eaf4a18c60c2ffbdc421ad3d30bfed591 ] The charge thresholds are computed by subtracting a fixed offset from the raw EC value. When no charge limit has been set, the EC can hold a value below range_min (0x80 on an MSI GL65 Leopard 9SCXK), and reading the sysfs attributes returns nonsense: charge_control_start_threshold: -10 charge_control_end_threshold: 0 Both attributes are documented to be within 0 - 100, and an end threshold of 0 wrongly suggests that charging is disabled. The store path already rejects values outside range_min..range_max. Apply the same range to the show path and report the maximum threshold for any value outside of it. Tested on an MSI GL65 Leopard 9SCXK (EC firmware 16U8EMS2.100) with the EC holding 0x80: the attributes now read 90 and 100. Fixes: 392cacf2aa10 ("platform/x86: Add new msi-ec driver") Assisted-by: LLM Signed-off-by: Daasaradhi Mannava Link: https://patch.msgid.link/20260916174812.11496-1-daasaradhimannava@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit db61b85a893fd20ca8c68ff400da261137eba2a6 Author: Ahmed Yaseen Date: Mon Aug 31 18:48:08 2026 +0000 platform/x86: asus-wmi: validate custom fan curves on enable [ Upstream commit bcbdfe03566ad0d01c6af3b5476e8cadffe4d3df ] Custom fan curves reach firmware unchecked, so a curve whose temperature or PWM decreases from one point to the next is accepted. The firmware does not respect such a curve: a first point of 100% followed by 50% leaves every point running at 100%. The kernel keeps reporting the points that were written, so sysfs stops describing what the fans are actually doing. Check the curve when enabling and reject it if it is invalid. Validation is done on enable rather than on write because fan curves are written one point at a time and are inconsistent mid-write. Fixes: 0f0ac158d28f ("platform/x86: asus-wmi: Add support for custom fan curves") Reported-by: Nir Yehoshua Signed-off-by: Ahmed Yaseen Link: https://patch.msgid.link/20260831-fan-curve-validation-v2-1-7274ca16c8fe@ghoul.dev Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit f599eae255a218ffd6cdec56b8022e2462fa2402 Author: Dale Whinham Date: Fri Sep 18 18:49:30 2026 +0100 platform/surface: aggregator_registry: Fix tablet-mode detection on Surface Pro 11 [ Upstream commit ee2e7315dedcdd934139237f820582f9b6ce7842 ] Replace ssam_node_kip_tablet_switch with ssam_node_pos_tablet_switch, as Surface Pro 11 reports tablet-mode via the POS ('posture') subsystem and not the KIP subsystem. The KIP-based driver would remain stuck in a 'folded-back' state after suspend/resume, whereas the POS-based device reports its state correctly even after suspend/resume. This fixes the type cover keyboard/mouse being ignored by desktop environments after resume from sleep due to the erroneous 'folded-back' state. Fixes: c4a069095395 ("platform/surface: aggregator_registry: Add Surface Pro 11 (QCOM)") Signed-off-by: Dale Whinham Link: https://patch.msgid.link/20260918-surface-pro-11-aggregator-registry-fixes-v2-2-c4ed9335814a@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit e21ef74d28e2f6238f0fe95d5900040d80477877 Author: Dale Whinham Date: Fri Sep 18 18:49:29 2026 +0100 platform/surface: aggregator_registry: Remove sensors device for Surface Pro 11 [ Upstream commit f1db1b80190b6a9f96e1171e2d7eac51ed4e28ca ] Remove ssam_node_hid_sam_sensors as this device is not present on Surface Pro 11. This fixes a probe failure in dmesg: surface_hid 01:15:01:06:00: unexpected descriptor length: got 0, expected 9 surface_hid 01:15:01:06:00: probe with driver surface_hid failed with error -71 Fixes: c4a069095395 ("platform/surface: aggregator_registry: Add Surface Pro 11 (QCOM)") Signed-off-by: Dale Whinham Link: https://patch.msgid.link/20260918-surface-pro-11-aggregator-registry-fixes-v2-1-c4ed9335814a@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit a0a14309596c222741a8d67e789935fbca02320e Author: Arnd Bergmann Date: Tue Sep 15 22:25:20 2026 +0200 platform/x86/amd/pmf: fix compat ioctl handling [ Upstream commit 655d731c391ec3912503b91ecf6269883b13e0c2 ] Build testing with -Wpadded shows a structure that is incompatible between 32-bit and 64-bit x86 userspace: ./usr/include/linux/amd-pmf.h:202:1: error: padding struct size to alignment boundary with 4 bytes [-Werror=padded] Use the 64-bit padded on all architectures here to avoid both the warning and allow compat ioctl handling. Fixes: 98432eec3180 ("platform/x86/amd/pmf: Add util layer and userspace character device interface") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20260915202535.3689880-1-arnd@kernel.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 57eae0ebf5d5510a25a0e20c7ad9425783b9012c Author: Ali Ahmet Memiş Date: Mon Oct 12 19:28:16 2026 +0300 ALSA: hda: intel: Don't free card in the probe work [ Upstream commit fbaccb1b19c79e79220e3bcc5bb18ca54ffb017b ] If the delayed probe fails, azx_probe_work() frees the card and clears the drvdata. azx_remove() reads the card before it waits for the probe work with cancel_delayed_work_sync() so when the device is removed while the probe work is running, it frees the card again after the work has already freed it. Only disconnect the card in the work so that its slot is released right away and leave freeing it to azx_remove(). Fixes: 39173303c838 ("ALSA: hda: Free card instance properly at probe errors") Reported-by: syzbot+40b06a86af225236fdb4@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=40b06a86af225236fdb4 Signed-off-by: Ali Ahmet Memiş Link: https://patch.msgid.link/20261012162841.1879278-1-aliamemis@disroot.org Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit ee9e1364fc84f9f967eaae147a385eb1b857f9b0 Author: Cen Zhang Date: Sun Oct 11 23:55:56 2026 +0800 ALSA: jack: Remove debugfs before freeing unregistered jacks [ Upstream commit d3b59d50e1ff206aa519ed5c13bf6907f97dd6a6 ] Jack debugfs files store a raw snd_jack_kctl pointer, so their callbacks must be drained before the attachment is freed. snd_jack_dev_free() unlinks and frees the attachments before calling snd_jack_dev_disconnect(). Its late snd_jack_remove_debugfs() call then has no entries left to traverse. With CONFIG_SND_JACK_INJECTION_DEBUG and input support enabled, an HDA codec rebind on a live card can publish a non-phantom jack's type file while its component is still in SNDRV_DEV_BUILD. A later jack-control allocation failure permits the following order: 1. hda_codec_driver_probe() creates a jack and publishes its debugfs files before reaching snd_card_register(). 2. A later control-build failure calls snd_hda_codec_cleanup_for_unbind(), then snd_hda_jack_tbl_clear() and snd_device_free(). __snd_device_disconnect() skips BUILD components. snd_jack_dev_free() frees the attachment before its late disconnect, leaving the debugfs files published. 3. After cleanup, a reader opens the surviving type file and jack_type_read() dereferences the freed attachment's jack pointer. The card's debugfs root remains live throughout this sequence. The result is a use-after-free even without an overlapping read. An already admitted callback is also not drained by this cleanup. Call snd_jack_remove_debugfs() before unlinking any controls in the free callback. The existing debugfs_remove() rundown blocks new accesses and waits for active callbacks while the attachment, control and jack remain valid. Roots cleared by an earlier disconnect are NULL, so repeating the removal is harmless. KASAN report as below: ================================================================== BUG: KASAN: slab-use-after-free in jack_type_read+0x1da/0x1f0 Read of size 8 at addr ffff8881085f9da0 by task python3/429 CPU: 2 UID: 0 PID: 429 Comm: python3 Not tainted 7.2.0-rc6-pmb-alsa-functional-v2+ #1 PREEMPT(lazy) Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Call Trace: dump_stack_lvl+0x93/0xd0 print_report+0xce/0x630 ? jack_type_read+0x1da/0x1f0 ? srso_alias_return_thunk+0x5/0xfbef5 ? __virt_addr_valid+0x20d/0x410 ? jack_type_read+0x1da/0x1f0 kasan_report+0xe0/0x110 ? jack_type_read+0x1da/0x1f0 jack_type_read+0x1da/0x1f0 ? __pfx_jack_type_read+0x10/0x10 ? __pfx___debugfs_file_get+0x10/0x10 ? __pfx_cp_new_stat+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? srso_alias_return_thunk+0x5/0xfbef5 ? selinux_file_permission+0x122/0x570 full_proxy_read+0x11f/0x180 ? __pfx_full_proxy_read+0x10/0x10 vfs_read+0x1a0/0xc20 ? __pfx_vfs_read+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? __do_sys_newfstat+0xa6/0x100 ? find_held_lock+0x2b/0x80 ? __pfx___do_sys_newfstat+0x10/0x10 ksys_read+0x111/0x200 ? __pfx_ksys_read+0x10/0x10 ? full_proxy_llseek+0x11e/0x170 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7e392e7687 Code: 48 89 fa 4c 89 df e8 58 b3 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007fff5f7b9180 EFLAGS: 00000202 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 00007f7e39253780 RCX: 00007f7e392e7687 RDX: 0000000000002000 RSI: 000000003d2e9b00 RDI: 0000000000000003 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007f7e39253700 R13: 0000000000002000 R14: 00007f7e38d7e2c0 R15: 0000000000a55b98 Allocated by task 425: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_kmalloc+0xaa/0xb0 __kmalloc_cache_noprof+0x251/0x610 snd_jack_kctl_new+0x80/0x180 snd_jack_new+0x4b/0x490 snd_hda_jack_add_kctl_mst+0x19b/0x610 add_jack_kctl+0x204/0x320 snd_hda_jack_add_kctls+0x212/0x910 snd_hda_gen_build_controls+0x233/0x600 snd_hda_codec_build_controls+0x2e4/0x9f0 hda_codec_driver_probe+0x26e/0x590 really_probe+0x21f/0xa90 __driver_probe_device+0x1ec/0x490 device_driver_attach+0xdc/0x210 bind_store+0xec/0x180 drv_attr_store+0x79/0xb0 sysfs_kf_write+0xed/0x140 kernfs_fop_write_iter+0x34b/0x500 vfs_write+0x637/0x1010 ksys_write+0x111/0x200 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Freed by task 425: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 kasan_save_free_info+0x3b/0x60 __kasan_slab_free+0x5f/0x80 kfree+0x307/0x580 snd_jack_kctl_private_free+0x153/0x200 __snd_ctl_remove+0x29f/0x3b0 snd_ctl_remove+0x46/0x70 snd_jack_dev_free+0x1b1/0x370 __snd_device_free+0x193/0x3f0 snd_device_free+0xcf/0x190 snd_hda_jack_tbl_clear+0x159/0x2e0 snd_hda_codec_cleanup_for_unbind+0x37e/0x9c0 hda_codec_driver_probe+0x3ae/0x590 really_probe+0x21f/0xa90 __driver_probe_device+0x1ec/0x490 device_driver_attach+0xdc/0x210 bind_store+0xec/0x180 drv_attr_store+0x79/0xb0 sysfs_kf_write+0xed/0x140 kernfs_fop_write_iter+0x34b/0x500 vfs_write+0x637/0x1010 ksys_write+0x111/0x200 do_syscall_64+0x115/0x6a0 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff8881085f9d80 which belongs to the cache kmalloc-64 of size 64 The buggy address is located 32 bytes inside of freed 64-byte region [ffff8881085f9d80, ffff8881085f9dc0) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1085f9 flags: 0x200000000000000(node=0|zone=2) page_type: f5(slab) raw: 0200000000000000 ffff8881000428c0 dead000000000100 dead000000000122 raw: 0000000000000000 0000000000200020 00000000f5000000 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8881085f9c80: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc ffff8881085f9d00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8881085f9d80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ^ ffff8881085f9e00: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881085f9e80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ================================================================== Fixes: 495000a38634 ("ALSA: core: Remove debugfs at disconnection") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-e1e7490bbe7ba1b3c44a-v2-3e3b6315a18c02ced60d@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 830ff3ce0d93d6bf3ee4a1c3bce0c75aac5b708a Author: Dan Carpenter Date: Tue Sep 15 19:37:27 2026 +0300 mm/hmm/test: reject overflowing page counts [ Upstream commit b59925301211ccc351d98d70b11f6d1b2c63150f ] The number of pages comes directly from userspace. Shifting a value larger than ULONG_MAX >> PAGE_SHIFT discards its high bits before the existing end-address check. A request for a huge number of pages can therefore be accepted and processed as a much smaller request. Reject page counts that cannot be represented as a byte size before performing the shift. So far as ChatGPT and I can tell this doesn't cause an issue in practice but preventing this integer overflow is the correct thing to do. Link: https://lore.kernel.org/6f0d39089e938d4f53dc72632eb84aca34de7015.1789457465.git.error27@gmail.com Fixes: b2ef9f5a5cb3 ("mm/hmm/test: add selftest driver for HMM") Signed-off-by: Dan Carpenter Signed-off-by: Andrew Morton Reviewed-by: Alistair Popple Assisted-by: ChatGPT:gpt-5 Cc: Jason Gunthorpe Cc: Jerome Glisse Cc: Leon Romanovsky Cc: Ralph Campbell Cc: Wei Yongjun Signed-off-by: Sasha Levin commit f3f5e616795bb04605c73e178a4ca40c672486bf Author: Harry Yoo (Meta) Date: Mon Sep 14 21:36:39 2026 +0100 selftests/cgroup: ignore memory.reclaim -EAGAIN for zswap writeback test [ Upstream commit adbb0adb434d55bd02b18c8de6356f954a077c79 ] The zswap_writeback_enabled test fails when a write to memory.reclaim returns -EAGAIN, which means less than the requested amount was reclaimed. attempt_writeback() propagates the -EAGAIN to the caller, and the test case is marked as failed even when zswap writeback did happen. This heavily depends on the performance of the backing swap device. Reclaim does not wait for writeback (on cgroup v2), does not count pages that are under writeback as reclaimed, and memory.reclaim gives up after MAX_RECLAIM_RETRIES passes without making progress. On a slow device where reclaim does not make any progress before writeback completes, a write to memory.reclaim fails. On a VM with zswap enabled, where IO delay was injected via dm-delay, the success rate of the zswap writeback test drops dramatically once the delay reaches 11 ms: 7% failures at 10 ms and 79% failures at 11 ms, n = 100. When zswap writeback is enabled, ignore -EAGAIN from memory.reclaim and determine pass/fail based on the zswpwb counter because that is what zswap_writeback_enabled actually wants to test. With this change, the test reliably passes even on a slow swap device (tested up to 1000 ms delay). This makes the test resilient against the performance of the swap device. Link: https://lore.kernel.org/20260914-test-zswap-wb-ignore-eagain-v1-1-6fb715c22cd8@kernel.org Fixes: 158863e5d7cc ("selftests: cgroup: add tests to verify the zswap writeback path") Signed-off-by: Harry Yoo (Meta) Signed-off-by: Andrew Morton Reviewed-by: SJ Park Acked-by: Nhat Pham Assisted-by: LLM Cc: Chengming Zhou Cc: Johannes Weiner Cc: Joshua Hahn Cc: Kiryl Shutsemau Cc: Michal Koutný Cc: Shuah Khan Cc: Tejun Heo Cc: Usama Arif Signed-off-by: Sasha Levin commit 256e3f63ee333bf7fb414bd8fe7a742b4bcc2fe5 Author: Zenghui Yu (Huawei) Date: Mon Sep 14 07:19:46 2026 -0700 selftests/damon: stop kdamond on error exits of no-op commit test [ Upstream commit 65c7e923ed1afa7329f8b910327ebf6ae10a5fb6 ] Patch series "mm/damon: misc improvements in tests and documents". Add various improvements to DAMON tests and documents. Patch 1 and 2 from Zenghui Yu (Huawei) let DAMON selftest to clean up its state and output after running the tests. Patch 3 from Eva Kurchatova makes a few selftest be able to run with Python's safe path mode. Patch 4 from Kunwu Chan improves coverage of DAMON kunit tests. Finally, patches 5 and 6 from Liew Rui Yan clarify and fix typos on documents for DAMOS quota behaviors. Below are notes that can be removed in the final commit message. This is a batched repost of DAMON patches that were individually posted. Please refer to each patch for changelog. This patch (of 6): The sysfs_no_op_commit_break test starts a kdamond via sysfs, but its error paths (e.g., drgn not installed) exit without stopping it. The leaked kdamond then makes subsequent tests, e.g. lru_sort.sh and reclaim.sh, skip with "Another kdamond is running". Wrap the post-start logic in try-finally so that kdamonds.stop() is executed on every exit path. Link: https://lore.kernel.org/20260914141952.91465-1-sj@kernel.org Link: https://lore.kernel.org/20260914141952.91465-2-sj@kernel.org Fixes: 10725cd2b09a ("selftests/damon: test no-op commit broke DAMON status") Signed-off-by: Zenghui Yu (Huawei) Reviewed-by: SJ Park Signed-off-by: SJ Park Signed-off-by: Andrew Morton Assisted-by: GLM-5.3 OpenCode Cc: Brendan Higgins Cc: David Gow Cc: David Hildenbrand Cc: Jonathan Corbet Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Mike Rapoport Cc: Randy Dunlap Cc: Shuah Khan Cc: Suren Baghdasaryan Cc: Vlastimil Babka Cc: Eva Kurchatova Cc: Kunwu Chan Cc: Lian Wang Cc: Liew Rui Yan Signed-off-by: Sasha Levin commit dee4074e487bc58c0f6e68dbae62619b59585072 Author: Paulo Alcantara Date: Sun Oct 11 17:39:11 2026 -0300 smb: client: log the selected security type on session setup failure [ Upstream commit a4111beeade900346726acb2746f22a6313aeaf0 ] When mounting without an explicit sec= option, ses->sectype stays Unspecified while the real mechanism is chosen later through ->select_sectype(), so a failed session setup logs a useless name: CIFS: VFS: \\server failed to create a new SMB session with Unknown: -13 Resolve the mechanism through ->select_sectype() before formatting it, as cifs_debug.c already does, so the message names the actual security type. Fixes: a8fce7c807b1 ("smb: client: improve error message when creating SMB session") Signed-off-by: Paulo Alcantara Reviewed-by: David Howells Cc: Namjae Jeon Cc: Ronnie Sahlberg Cc: Shyam Prasad N Cc: Tom Talpey Cc: Bharath SM Signed-off-by: Sasha Levin commit afeeced83707b8067508135f0280043a1b0aee14 Author: Jiale Yao Date: Sat Oct 3 17:21:02 2026 +0800 wifi: ath12k: avoid IDR mutation during vif mgmt TX cleanup [ Upstream commit 4aa45334eb23d40bf31c43405daea9b73469f2a6 ] ath12k_mac_vdev_delete() walks txmgmt_idr with idr_for_each(), and its callback removes each entry belonging to the interface. Removing the current entry can invalidate the radix-tree iterator retained by idr_for_each(). Move the walk into a helper that uses idr_for_each_entry(). It performs a fresh lookup for every iteration, so each matching entry can be removed through the locked removal helper without retaining iterator state across the removal. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Jiale Yao Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20261003092104.520135-6-yaojiale02@163.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 2d6acb04562ddddab7c89b431df128dd351ed2fd Author: Jiale Yao Date: Sat Oct 3 17:21:01 2026 +0800 wifi: ath12k: avoid IDR mutation during pending mgmt TX cleanup [ Upstream commit 94c7b50351fd30e1dfe1b4051197a1445d8547e1 ] The pending management TX cleanup walks txmgmt_idr with idr_for_each(), and its callback removes the current entry. This can invalidate the radix-tree iterator retained by idr_for_each(). Use idr_for_each_entry() so every iteration starts with a fresh lookup. Continue to remove each entry under txmgmt_idr_lock before freeing its skb, preventing concurrent TX completion from finding a stale skb pointer. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Jiale Yao Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20261003092104.520135-5-yaojiale02@163.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 8596585e1be0b49ad275dae51a381a603b4ab2d5 Author: Jiale Yao Date: Sat Oct 3 17:21:00 2026 +0800 wifi: ath11k: avoid IDR mutation during vif mgmt TX cleanup [ Upstream commit dc29226dada34a6d19af77b4b51e90f8a3a8de34 ] ath11k_mac_op_remove_interface() walks txmgmt_idr with idr_for_each(), and its callback removes each entry belonging to the interface. Removing the current entry can invalidate the radix-tree iterator retained by idr_for_each(). Move the walk into a helper that uses idr_for_each_entry(). It performs a fresh lookup for every iteration, so each matching entry can be removed through the locked removal helper without retaining iterator state across the removal. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Jiale Yao Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20261003092104.520135-4-yaojiale02@163.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 13dff047af364b9646ef92fb2137564cee39c363 Author: Jiale Yao Date: Sat Oct 3 17:20:59 2026 +0800 wifi: ath11k: avoid IDR mutation during pending mgmt TX cleanup [ Upstream commit 3e7f5d362b2b3a21b3adb4b860aad14b69a896ad ] The pending management TX cleanup walks txmgmt_idr with idr_for_each(), and its callback removes the current entry. This can invalidate the radix-tree iterator retained by idr_for_each(). Use idr_for_each_entry() so every iteration starts with a fresh lookup. Continue to remove each entry under txmgmt_idr_lock before freeing its skb, preventing concurrent TX completion from finding a stale skb pointer. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Jiale Yao Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20261003092104.520135-3-yaojiale02@163.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 782ca6965e8459bc6a00b11bc210df39231dfedf Author: Jiale Yao Date: Sat Oct 3 17:20:58 2026 +0800 wifi: ath10k: avoid IDR mutation during TX cleanup [ Upstream commit 1c1a208e65a08191901cfded3bbccc4a54e4a75c ] ath10k_htt_flush_tx_queue() walks pending_tx with idr_for_each(). Its callback calls ath10k_txrx_tx_unref(), which removes the current entry from pending_tx through ath10k_htt_tx_free_msdu_id(). idr_for_each() keeps radix-tree iterator state across the callback. Removing the current entry can therefore invalidate that state and make the remaining walk unsafe. Use idr_for_each_entry(), which starts a fresh lookup after each callback. The current entry can then be removed safely, while the following idr_destroy() continues to release the IDR itself. Fixes: 89d6d83565e9 ("ath10k: use idr api for msdu_ids") Signed-off-by: Jiale Yao Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20261003092104.520135-2-yaojiale02@163.com [changed ath10k_htt_tx_clean_up_pending() signature] Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 066c952c0d126f5e4798bda50a58f2f7c578a12b Author: Aaradhana Sahu Date: Thu Oct 1 10:24:23 2026 +0530 wifi: ath12k: Fix NAPI resource leaks in AHB external IRQ paths [ Upstream commit ebc938ba1d5ff33652013b99c7b9a74f05690336 ] Currently, NAPI instances and their associated netdevs allocated for AHB external IRQ groups are not released when external IRQ configuration fails. They are also not freed when arch_init() fails after ath12k_ahb_config_irq() succeeds during probe, or when the driver is unloaded. Fix this by adding a common cleanup helper to release the NAPI instances and associated netdevs. Call it from the external IRQ configuration error path, probe error path, and driver cleanup path. Tested-on: IPQ5332 hw1.0 AHB WLAN.WBE.1.6-01275-QCAHKSWPL_SILICONZ-1 Fixes: 6cee30f0da75 ("wifi: ath12k: add AHB driver support for IPQ5332") Fixes: 614c23e24ee8 ("wifi: ath12k: Support arch-specific DP device allocation") Signed-off-by: Aaradhana Sahu Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20261001045423.493121-1-aaradhana.sahu@oss.qualcomm.com [renamed label err_free_irq] Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 0e6ce7a8c50ba22aa14a237df3a0a6c640fa6eba Author: Kunwu Chan Date: Thu Aug 20 17:42:28 2026 +0800 rcutorture: Fix divide-by-zero with fwd_progress_div=1 [ Upstream commit 5b748d8aa6833f2dec3f545311be69a2064bc6d1 ] When fwd_progress_div=1, the forward-progress test computes: sd4 = (sd + div - 1) / div = sd dur = sd4 + torture_random(&trs) % (sd - sd4) = sd4 + % 0 The modulo operation with a zero divisor triggers an integer division by zero (undefined behavior at the C level, #DE trap on x86), causing a kernel Oops and panic. On x86_64, this manifests as: rcu_torture_fwd_prog_nr: Starting forward-progress test 0 Oops: divide error: 0000 [#1] SMP PTI RIP: 0010:rcu_torture_fwd_prog+0x90b/0x1160 R12: 0000000000000000 The existing guard only handles non-positive values. However, fwd_progress_div=1 also makes the random range empty because sd4 == sd. Change the guard to reject values below 2. The forward-progress test only reaches this calculation when stall_dur() is positive, so sd = stall_dur() + 1 >= 2. For fwd_progress_div >= 2, sd4 < sd, ensuring that sd - sd4 is at least 1. Keep the existing fallback to the default value of 4 for invalid values. Verified with QEMU/KVM: a 138-second run with fwd_progress_div=1 completed 81 forward-progress test cycles without a crash. Fixes: 1b27291b1ea4f ("rcutorture: Add forward-progress tests for RCU grace periods") Signed-off-by: Kunwu Chan Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin commit 21a2c033bd00648cd714499865986fa3afae3173 Author: Sebastian Andrzej Siewior Date: Fri Aug 21 20:38:09 2026 +0200 srcu: Use IRQ_WORK_INIT_HARD for srcu's irq_work [ Upstream commit f8d95888093348be1235815946359f9cbc2f7012 ] The irq_work in srcu is used to schedule a delayed work. The work item is not scheduled directly because it is not always possible wake a thread directly. On PREEMPT_RT the default irq_work is initialized with IRQ_WORK_LAZY and is delayed to the irq_work thread. A system booted with the command line "trace_event=…" will freeze during boot because the irq_work thread is not yet deployed (and tracing uses synchronize_srcu() in tp_rcu_cond_sync()). The irq_work performs just a wakeup a thread, there is nothing wrong with doing this from hardirq context on PREEMPT_RT. Use IRQ_WORK_INIT_HARD for srcu's irq_work. Fixes: 7c405fb3279b3 ("rcu: Use an intermediate irq_work to start process_srcu()") Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin commit b3807acee21d9bd4974eac023cec99974485f806 Author: Joonhoe Kim <26rote@gmail.com> Date: Wed Oct 7 21:39:54 2026 +0900 ASoC: codecs: wcd939x: read the SoundWire port switches per channel [ Upstream commit e7860dc5d8d45f6a0e98bfe542c7b776c5ede2a4 ] The "HPHL/HPHR", "ADCn" and "DMICn" switches are channels of shared SoundWire ports (ADC1-4 are channels 0-3 of the ADC_1_4 port), but wcd939x_get_swr_port() reports a per-port flag. Once one channel of a port is switched on, every switch on that port reads back as on: amixer cset name='ADC1 Switch' on -> ADC1..ADC4 Switch all read "on" Setting one of the others then looks like a no-op to userspace, and "alsactl store" saves all of them as on, so a later "alsactl restore" really enables the unused channels of the port. Read the channel's own bit in the port's channel mask instead, drop the now unused port_enable[] and return 0 from the put handler when the switch does not change, as ALSA expects. Fixes: 10f514bd172a ("ASoC: codecs: Add WCD939x Codec driver") Link: https://lore.kernel.org/all/20251124064850.15419-6-jonathan@marek.ca/ Assisted-by: LLM Signed-off-by: Joonhoe Kim <26rote@gmail.com> Link: https://patch.msgid.link/20261007123954.1709-1-26rote@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 75adb5124b249156850d6f04a634fc9ce1b8fec7 Author: bui duc phuc Date: Fri Oct 9 18:22:04 2026 +0700 ASoC: codecs: rt5659: propagate GPIO errors [ Upstream commit c1e321bd5ce6ae3702db65837cfe0c792634d603 ] devm_gpiod_get_optional() may return an error pointer, including -EPROBE_DEFER, but rt5659_i2c_probe() does not handle these errors for the ldo1-en GPIO and does not check for errors for the reset GPIO. Check the return values and propagate GPIO lookup errors. Fixes: d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Signed-off-by: bui duc phuc Reviewed-by: Alvin Šipraga Link: https://patch.msgid.link/20261009112204.33199-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 793f1e063d6819d310fa73ca801c92ab75ff6734 Author: Niklas Cassel Date: Mon Oct 5 14:41:55 2026 +0200 PCI: Update saved Max Payload Size in pcie_set_mps() [ Upstream commit 581cf67cb6f66eabc6bcd7f61dd64b2559270507 ] pcie_set_mps() changes the Max Payload Size (MPS) in the Device Control register but leaves the copy saved by pci_save_state() alone, so the next pci_restore_state() puts back the old value. The PCI core does change the MPS of devices whose state has already been saved: pci_configure_mps() reduces a Root Port's MPS when a device with a smaller MPS Supported is hot-added directly below it (commit 9f0e89359775 ("PCI: Match Root Port's MPS to endpoint's MPSS as necessary")), and with "pci=pcie_bus_safe", pcie_bus_configure_settings() can do the same when pciehp calls it after a hot-add. The Root Port's state was saved when it was added and again when portdrv probed it. Since commit 3fc686d550f6 ("PCI/ERR: Add support for resetting the Root Ports in a platform-specific way"), pcibios_reset_secondary_bus() restores that saved state, without saving it first, after host->reset_root_port() has reset the Root Port, e.g. during AER recovery or on Link Down with the qcom and Rockchip DWC drivers. The Root Port then goes back to the old, larger MPS while the device below it is restored to the smaller one, so the Root Port may send TLPs that the device treats as Malformed. Update the saved copy of Device Control when pcie_set_mps() changes the MPS, like commit 909f7bf9b080 ("PCI: Update saved_config_space upon resource assignment") does for BARs. Fixes: 3fc686d550f6 ("PCI/ERR: Add support for resetting the Root Ports in a platform-specific way") Assisted-by: LLM Signed-off-by: Niklas Cassel Signed-off-by: Bjorn Helgaas Reviewed-by: Shawn Lin Reviewed-by: Keith Busch Link: https://patch.msgid.link/20261005124154.2190628-2-cassel@kernel.org Signed-off-by: Sasha Levin commit 67d59fad73e580d0f427cbca217077562bc19fcf Author: Sidong Yang Date: Mon Oct 5 01:47:25 2026 +0900 accel/rocket: Don't tear down the scheduler when drm_sched_init() fails [ Upstream commit a6709a58a01c8fc357e316bee31f369c2ea56235 ] drm_sched_init() cleans up after itself when it fails, but rocket_job_init() then calls drm_sched_fini() on the same scheduler. That wakes a wait queue that was never initialised, dereferencing a NULL pointer, and can destroy the submit workqueue a second time. Only destroy the reset workqueue on this path. Fixes: 0810d5ad88a1 ("accel/rocket: Add job submission IOCTL") Reported-by: Sashiko Closes: https://lore.kernel.org/all/20260912114524.7A6131F00893@smtp.kernel.org/ Signed-off-by: Sidong Yang Reviewed-by: Jeff Hugo Signed-off-by: Heiko Stuebner Link: https://patch.msgid.link/20261004164727.466164-2-sidong.yang@furiosa.ai Signed-off-by: Sasha Levin commit fe2872f048c3f6321d04f2eadef207a3ba606d53 Author: Roberto Bergantinos Corpas Date: Tue Apr 21 12:00:46 2026 +0200 nfs: set gencount on protocol-specific remove [ Upstream commit 8c955dacf45f8964b98f26910ffecb5e26c02e31 ] commit bd4928ec799b ("NFS: Avoid changing nlink when file removes and attribute updates race") avoids races on attribute cache with any inflight RPC that may modify inode attributes (and gencount) during i.e. REMOVE. However it does not take into account that REMOVE may trigger a delegation return which also advances gencount (via the attribute refresh during delegation return), and in that case the gencount mismatch is not due to an inflight RPC that already reflected the removal. Push the setting of gencount under each version-specific layer, reordering correctly for nfsv4 case after the delegation returns. This fixes LTP/inotify04 failure after bd4928ec799b. Fixes: bd4928ec799b ("NFS: Avoid changing nlink when file removes and attribute updates race") Signed-off-by: Roberto Bergantinos Corpas Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 72cffa12e5a85cf7022659e526a03a35474fe9c8 Author: Haotian Zhang Date: Fri Oct 9 14:06:10 2026 +0800 mtd: rawnand: pl353: fix clk reference leak in pl35x_nfc_setup_interface() [ Upstream commit 1ce45f0e74d60e8279ed380c97047e6c351aee1b ] pl35x_nfc_setup_interface() obtains a reference to the SMC "memclk" with of_clk_get_by_name() and only uses it to read the clock rate. The reference is never released: the function has many early return paths and no clk_put() call anywhere, so the clock reference is leaked. The hook is invoked repeatedly by the NAND core (nand_reset(), nand_setup_interface() and the NAND_DATA_IFACE_CHECK_ONLY mode probing loops), so the reference count keeps growing. Release the clock reference with clk_put() as soon as its rate has been read. Fixes: 08d8c62164a3 ("mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller") Assisted-by: DeepSeek-V4.1-Flash Signed-off-by: Haotian Zhang Signed-off-by: Miquel Raynal Signed-off-by: Sasha Levin commit 0fec695cf181b31bf064ddcdcd395796867a8b06 Author: bui duc phuc Date: Fri Oct 9 18:24:29 2026 +0700 power: supply: generic-adc-battery: Propagate charged GPIO errors [ Upstream commit 36b0abe904ac9cbdce6161d9c7c0bcac963bb3fe ] devm_gpiod_get_optional() may return an error pointer such as -EPROBE_DEFER, but gab_probe() only checks for NULL. The error pointer is then passed to gpiod_to_irq() and the original error, including -EPROBE_DEFER, is lost. Check the return value and propagate errors from the charged GPIO lookup. Fixes: b0327ffb133f ("power: supply: generic-adc-battery: Use GPIO descriptors") Signed-off-by: bui duc phuc Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20261009112429.33318-1-phucduc.bui@gmail.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 5aafa33294ae825e587f10aca1959e17ccc68c5e Author: Filipe Manana Date: Wed Oct 7 16:08:50 2026 +0100 btrfs: defrag: fix check to see if next extent can be defragged too [ Upstream commit eb55bc2bfe204e6bfccfe179226d7fb5024cb010 ] We want to check if the next extent is at maximum capacity but we are passing the current extent map to get_extent_max_capacity() and not the next extent map. For example if the current extent is compressed (its maximum capacity is 128K) and the next extent is uncompressed (its maximum capacity is 128M), then we can bail out and not defrag the next extent too - when for example the next extent as a size of 128K, is uncompressed, and the extent threshold is >= 256K. Fixes: 979b25c300db ("btrfs: defrag: don't defrag extents which are already at max capacity") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 2efc6bf370d9eea053528af1c51d898964d3bc84 Author: Filipe Manana Date: Mon Oct 5 12:47:09 2026 +0100 btrfs: fix lost error return value in btrfs_alloc_logged_file_extent() [ Upstream commit 784cd5a83476c6c720521f21350fb823928555ff ] If we fail to allocate a reserved file extent we then call btrfs_record_squota_delta() and assign its return value to 'ret', discarding the error from the failed allocation attempt and allowing log replay to proceed as if no errors happened, resulting in some replayed file extent item to point to an unallocated extent. At the moment btrfs_record_squota_delta() always returns 0 (success). Fixes: cecbb533b5fc ("btrfs: record simple quota deltas in delayed refs") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit fbf5826ca9ccd8ee6764e893be38c1388590d7e6 Author: Filipe Manana Date: Thu Oct 1 17:21:22 2026 +0100 btrfs: qgroup: fix swapped blocks existence check when tracing after COW [ Upstream commit 0388b5bd3a6eb8bcb20208c3b6dbee96fd30bbe0 ] In btrfs_qgroup_trace_subtree_after_cow(), after we erase the swapped block, iterate over all possible tree levels to check if we sill have other swapped blocks. However the check is wrong, it considers that there are other swapped blocks if any rbtree for any level is empty, instead of not empty. As a consequence we set blocks->swapped to true basically every time since we always find an empty rbtree at least at level 7, since in practice it's nearly impossible to find such a huge btree. This makes every future call to btrfs_qgroup_trace_subtree_after_cow() do an unnecessary rbtree search instead of returning immediately. Fix this by updating the condition to set swapped to true if we find an rbtree that is not empty. Fixes: f616f5cd9da7 ("btrfs: qgroup: Use delayed subtree rescan for balance") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit eda6dba2125b1fd114a2ed2e47204fc0146e6eee Author: Qu Wenruo Date: Thu Oct 1 14:46:15 2026 +0930 btrfs: qgroup: do not treat "ret > 0" as error when deleting a qgroup [ Upstream commit dd906477cc2c33c82ec17e6301bd4be4ea588565 ] [BUG] There is a bug report that when removing a child qgroup, if removing the qgroup requires a rescan, it will delete the on-disk relation and qgroup items but not the in-memory qgroup rb entry. This makes all later qgroup rescan to fail. [CAUSE] The call chain looks like the following: btrfs_remove_qgroup() |- __del_qgroup_relation() | |- quick_update_accounting() | Which returns 1, showing this operation will require | a qgroup rescan |- if (ret) goto out; Which skips the del_qgroup_rb() call, leaving the in-memory qgroup rb entry still intact. Then later qgroup rescan/update will always fail and mark qgroup inconsistent: btrfs_run_qgroups() |- update_qgroup_info_item() | |- btrfs_search_slot() | Which returns -ENOENT, as the qgroup info item is already | deleted. |- qgroup_mark_inconsistent() |- return -ENOENT; [FIX] Do not treat "ret > 0" as an error. Reported-by: c.f.a@posteo.de Link: https://lore.kernel.org/linux-btrfs/14846642-85d3-4afb-ad99-1b74b22f5f90@posteo.de/ Fixes: 9c8b35b1ba21 ("btrfs: quota: Automatically update related qgroups or mark INCONSISTENT flags when assigning/deleting a qgroup relations.") Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 826468e2d9aed7965947ae72e166617c072fc034 Author: Filipe Manana Date: Wed Sep 30 15:37:00 2026 +0100 btrfs: fix off-by-one end offset check in report_setget_bounds() [ Upstream commit 08f750d9f8930e4ca053913b5ca3fd49fd9268c9 ] The addressable range with an extent buffer goes from byte 0 to byte eb->len - 1, so if a byte address matches eb->len, it's already beyond the addressable range and we should log that it's bad start address and not end address. Fixes: 234fdd2815ce ("btrfs: remove redundant check in up check_setget_bounds") Reviewed-by: Qu Wenruo Reviewed-by: Daniel Vacek Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit abb72b95aba1945a3c44dc081b27025c20d030cc Author: Filipe Manana Date: Wed Sep 30 11:52:32 2026 +0100 btrfs: fix duplicated code in fs state string in logged messages [ Upstream commit 3edda5249553b708c378a0d766018976315c63ad ] We are using the code 'E' when the fs is in an error state (transaction aborted) and when it's in the emergency shutdown state, which is confusing and not intentional. Fix this by using an unused code such as 'H' for the emergency shutdown state and add a comment over the fs_state_chars array to warn to not use 'E' as its use is not defined in the array but instead in the function btrfs_state_to_string(), since the fs state error is not defined as a bit but as an error code in fs_info->fs_error. Fixes: 9b2839451dfc ("btrfs: introduce a new shutdown state") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 8166850c96bf5e82c91de1a76260ac128493709e Author: Filipe Manana Date: Tue Sep 29 15:58:34 2026 +0100 btrfs: fix incomplete iteration over fs state when logging messages [ Upstream commit d1d74665ab9a8971d42177ca865cfbe2897c1fc7 ] In btrfs_state_to_string() we iterate over all the bits set in fs_info->fs_state using for_each_set_bit(), which requires its third argument to match the number of bits, but we pass it the number of bytes of the type used by fs_info->fs_state, an unsigned long, which is 8 on 64 bits platforms and 4 on 32 bits platforms. This means we are not iterating over bits in the ranges [8, 63] or [4, 31]. Fix this by passing BTRFS_FS_STATE_COUNT instead of sizeof(fs_state). Note that we could pass BITS_PER_TYPE(fs_state), but since BTRFS_FS_STATE_COUNT is 11 and we have no bits beyond that, it would cause pointless iterations over fs_state. This also makes pointless the checks for the bit being inside the limit of BTRFS_FS_STATE_COUNT inside the loop. Fixes: c067da878156 ("btrfs: add filesystems state details to error messages") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 3e362e65193310629b972719dc7f35c61663ce3a Author: Johannes Thumshirn Date: Tue Sep 29 16:02:19 2026 +0200 btrfs: zoned: fix double list add in btrfs_load_block_group_zone_info [ Upstream commit 9bdef63e2b5d4a88810329a1cab3642d6378a895 ] For DUP and RAID profiles with zones in a mismatching active state, i.e. due to one of the zones of the block-group being on a conventional zone, btrfs_zone_activate() has already put the block group on the list. This leads to a double list add and refcounting problems. Fixes: 265f7237dd25 ("btrfs: zoned: allow DUP on meta-data block groups") Fixes: 568220fa9657 ("btrfs: zoned: support RAID0/1/10 on top of raid stripe tree") Reviewed-by: Daniel Vacek Signed-off-by: Johannes Thumshirn Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit f5111f6f16696983595fb25b3e62fce06f6feb02 Author: Filipe Manana Date: Fri Sep 18 17:41:28 2026 +0100 btrfs: fix dangling nodes in tree-mod-log after error in btrfs_tree_mod_log_insert_root() [ Upstream commit 057e3c350a9185df598c88b4081168ed047c9247 ] If in btrfs_tree_mod_log_insert_root() there is an error in the call to tree_mod_log_insert() (the only possible error is -EEXIST, which means we have a bug or some memory corruption maybe) we free all the nodes in the 'tm_list' array but we don't remove them from the tree-mod-log rbtree, which can result in use-after-free bugs later. So make sure we remove the nodes from the rbtree before freeing them after an error. Fixes: 5de865eebb83 ("Btrfs: fix tree mod logging") Assisted-by: LLM (found the bug) Reviewed-by: Boris Burkov Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit c783c231f99fa0dc7d689649de64a73c7437b749 Author: Filipe Manana Date: Thu Sep 17 11:38:04 2026 +0100 btrfs: fix off by one super block end offset calculation when writing super blocks [ Upstream commit 7884a8f3279c28ff990e2eacd5c2479bb1c930d0 ] We are skipping the write of a super block mirror if its end offset matches exactly the device's end offset. This happens because we are using a greater than or equals comparison instead of just a greater than comparison. Fixes: 935e5cc935bc ("Btrfs: fix wrong disk size when writing super blocks") Reviewed-by: Qu Wenruo Signed-off-by: Filipe Manana Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 474361b0ee085e206e3fccaca2b6463571c43891 Author: Qu Wenruo Date: Mon Aug 17 17:00:43 2026 +0930 btrfs: refactor read_key_bytes() to remove the dest_folio parameter [ Upstream commit fdf56b9d03d475881d73b75afbdbe4058db04ffc ] The function read_key_bytes() have 3 call sites: - For BTRFS_VERITY_DESC_ITEM_KEY offset 0 inside btrfs_get_verity_descriptor() - For BTRFS_VERITY_DESC_ITEM_KEY offset 1 inside btrfs_get_verity_descriptor() Those are to read the description items, which are pretty small with fixed item size. Those call sites do not utilize the @dest_folio parameter. - For btrfs_read_merkle_tree_page() This is to read the BTRFS_VERITY_MERKLE_ITEM_KEY, which can be pretty large and split into multiple items. This is the only call site utilizing the @dest_folio parameter. Just for the only btrfs_read_merkle_tree_page() call site, we have a complex scheme for @dest and @dest_folio parameters. Since @dest can be NULL, it means if we pass @dest as NULL, then no matter if @dest_folio is provided, the merkle data will not be loaded into that @dest_folio. This can lead to a bug where a highmem folio is not mapped, then we pass folio_address(folio), which is NULL, into read_key_bytes(), causing no data to be written into @dest_folio. To address the complex scheme between @dest and @dest_folio, remove the @dest_folio parameter completely, and let the only caller to map the folio and pass the mapped kernel address into read_key_bytes() instead. This not only reduces the parameter list, but also make it much clear on the @dest parameter handling. The only downside is a longer duration of locally mapped page, but this should still be fine, as kmap_local_folio() can survive context switch. Reported-by: Hongling Zeng Link: https://lore.kernel.org/linux-btrfs/20260817022012.19658-1-zenghongling@kylinos.cn/ Fixes: 146054090b08 ("btrfs: initial fsverity support") Reviewed-by: David Sterba Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 98b03534b8f98ecac03dda2f366b70f8a845844a Author: Guanghui Yang <3497809730@qq.com> Date: Tue Aug 11 09:02:27 2026 +0930 btrfs: roll back sprout setup after device add failure [ Upstream commit f5166f53b60b4d1ee9957c0baccd3b09735001d4 ] btrfs_init_new_device() calls btrfs_setup_sprout() before creating the first writable chunks for a seed filesystem. That moves the seed devices out of fs_info->fs_devices, clears the seeding state and installs a new fsid for the sprout filesystem. If a later step fails, the error path removes the new device but leaves fs_info->fs_devices in the partially initialized sprout state. The mounted filesystem can then be left with no open devices after the failed device add. Add the inverse of btrfs_setup_sprout() and use it from the error path so the mounted seed filesystem is restored before the temporary seed_devices copy is released. Fixes: 2b82032c34ec ("Btrfs: Seed device support") Assisted-by: Codex:gpt-5 Reviewed-by: Qu Wenruo Signed-off-by: Guanghui Yang <3497809730@qq.com> [ Fix a conflict with per-profile available space, revert sprout before updating per-profile available space estimation. ] Signed-off-by: Qu Wenruo Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit f4af46dd8a38d464b3e688f2bf932f7cc4a076de Author: Lorenzo Bianconi Date: Tue Oct 6 12:46:26 2026 +0200 net: stmmac: align real_num_tx_queues to mqprio configuration [ Upstream commit ac1ca0c3e139a2ebef2fc6c570af6647329726f1 ] stmmac_hw_setup() unconditionally sets the number of real TX queues to plat->tx_queues_to_use on every device open. When a tc-mqprio qdisc is offloaded the driver reduces netif_set_real_num_tx_queues() to the number of queues enabled by the offload, but the next device open reverts it to plat->tx_queues_to_use while the netdev TC map is still the one programmed by the qdisc, leaving the two inconsistent. Track the number of TX queues enabled by the current qdisc configuration in the per-qdisc state (priv->xmit_qdisc.num_tx_queues) and use it in stmmac_hw_setup(). The field defaults to plat->tx_queues_to_use at probe time and when the mqprio qdisc is destroyed, meaning no offload is active and the number of real TX queues must match the number of queues the driver allocated, and it is updated to the offloaded queue count on a successful mqprio setup. mqprio only validates the requested queue ranges against dev->real_num_tx_queues, which can be larger than plat->tx_queues_to_use while the interface has not been opened yet. Reject a qopt whose highest referenced queue (offset + count) exceeds plat->tx_queues_to_use, so xmit_qdisc.num_tx_queues can never be larger than the number of TX queues the driver provisions. Otherwise stmmac_hw_setup() would expose TX queues without an allocated DMA ring. Refuse to lower the number of TX queues below the count required by the active mqprio offload in stmmac_reinit_queues(), otherwise netif_set_real_num_tx_queues() would leave real_num_tx_queues inconsistent with the netdev TC map. The issue has been reported by sashiko and the patch has been tested on a Qualcomm RB3-Gen2 board. Fixes: 195e4f409a40 ("net: stmmac: support fp parameter of tc-mqprio") Tested-by: Maxime Chevallier Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20261006-stmmac-mqprio-prio-offload-v5-2-d7da93419784@oss.qualcomm.com Tested-by: Daniel Thompson Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 1ca68386eec974fa2ace989e60c2ad6629ff392d Author: Lorenzo Bianconi Date: Tue Oct 6 12:46:25 2026 +0200 net: stmmac: set real_num_tx_queues to max(offset + count) [ Upstream commit d128212667593c548a3c67d30031063ed46c29b7 ] tc_setup_dwmac510_mqprio() computes the number of real TX queues as the sum of the per-TC queue counts. mqprio_validate_queue_counts() only rejects out-of-bounds or overlapping ranges, so layouts with gaps or a non-zero first offset are accepted, and in those cases the sum is smaller than the highest queue referenced by the netdev TC map. netif_set_real_num_tx_queues() then passes this too-small count to netif_setup_tc(). However stmmac_set_ndev_tcs() has already zeroed dev->prio_tc_map() through netdev_reset_tc(), so when netif_setup_tc() runs every priority maps to TC0 and only the TC0 range is checked. A layout whose TC0 range fits but where a later TC references a queue beyond the new real_num_tx_queues is left with num_tc set and its TC map pointing at queues that are no longer real, without any warning; only when TC0 itself is out of range is the mapping disabled. The real prio_tc_map is programmed later by the qdisc, after this call, so the driver cannot rely on netif_setup_tc() to catch those cases. Compute num_tx_queues as the maximum of offset[i] + count[i] instead of the sum of the counts, so real_num_tx_queues always covers the highest queue referenced by the TC map. This is a no-op for the contiguous channel-mode layouts where offset[i] == i and count[i] == 1. The issue has been reported by sashiko and the patch has been tested on Qualcomm RB3-Gen2 board. Fixes: 195e4f409a40 ("net: stmmac: support fp parameter of tc-mqprio") Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20261006-stmmac-mqprio-prio-offload-v5-1-d7da93419784@oss.qualcomm.com Tested-by: Daniel Thompson Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit a837ade9bec1861a0491346fd2d463385e18df65 Author: David Zhang Date: Thu Oct 8 16:24:16 2026 -0700 accel/amdxdna: Reject device heap BO when dev_mem_size is not set [ Upstream commit 3e32932d3626d0279f9b3531bd648f8c0a16cb08 ] NPU3 devices do not set dev_mem_size, since they do not use a device heap. Creating an AMDXDNA_BO_DEV_HEAP BO on such a device hits the WARN_ON(!is_power_of_2(dev_mem_size)) check, which any user with access to the device node can trigger. Return -EOPNOTSUPP when dev_mem_size is 0. Fixes: d76856beb4a4 ("accel/amdxdna: Refactor GEM BO handling and add helper APIs for address retrieval") Signed-off-by: David Zhang Reviewed-by: Lizhi Hou Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20261008232416.2646054-1-yidong.zhang@amd.com Signed-off-by: Sasha Levin commit 2bfdba4243ac5483619d871fee9a2b821f5c7231 Author: Tal Zussman Date: Fri Oct 9 12:50:16 2026 -0400 block: unpin all pages of a bvec in bio_iov_iter_align_down() [ Upstream commit b91a661514f3a3ce5add42fc1f2eb17b61eacaca ] bio_iov_iter_align_down() drops trailing bvecs with unpin_user_page(), but a bvec built by iov_iter_extract_bvecs() can span several pages of one folio, each with its own pin. All but the first pin leak. The partially trimmed bvec has the same problem. Shrinking bv_len does not release the pins for the pages cut off by the trim, and __bio_release_pages() only unpins the pages bv_len still covers at completion. Both issues occur only with a logical block size above PAGE_SIZE and a large folio backing the user buffer. On a device with a 64K logical block size, an O_DIRECT pwritev() from a hugetlb mapping that ends 16K past a block boundary leaks one huge page per call, whether the remainder is its own bvec or the tail of a larger one. Unpin all pages of a dropped bvec with bvec_unpin(), and unpin the pages trimmed off the last bvec as well. Move bvec_unpin() up and split its page count into a helper so both sites share it. Fixes: 20a0e6276edb ("block: align the bio after building it") Assisted-by: Claude:claude-fable-5 Reviewed-by: Hannes Reinecke Tested-by: Shin'ichiro Kawasaki Reviewed-by: Christoph Hellwig Signed-off-by: Tal Zussman Link: https://patch.msgid.link/20261009-blkdev-fixes-v6-8-307939c387df@columbia.edu Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit cba19325d4be283e4273ff5420e3c8cc066be087 Author: Tal Zussman Date: Fri Oct 9 12:50:14 2026 -0400 block: don't fall back to buffered I/O for atomic writes [ Upstream commit 9fd1afea19fa7c4ba438a1d162739e0832073a4c ] blkdev_direct_write() turns an -EBUSY from page cache invalidation into a 0 return, so an IOCB_ATOMIC write is retried in full through blkdev_buffered_write(), with no atomicity guarantee. Skip the buffered fallback in blkdev_write_iter() for IOCB_ATOMIC, as it already does for IOCB_NOWAIT, so the -EBUSY case returns -EAGAIN and the caller retries, matching __iomap_dio_rw(). ext4 has the same fallback and only warns in it. For block devices the fallback can be skipped before any I/O is submitted, so fail early instead. Fixes: caf336f81b3a ("block: Add fops atomic write support") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260802-blkdev-fixes-v1-0-a82fc549fd74%40columbia.edu?part=2 Assisted-by: Claude:claude-fable-5 Reviewed-by: Hannes Reinecke Reviewed-by: John Garry Signed-off-by: Tal Zussman Link: https://patch.msgid.link/20261009-blkdev-fixes-v6-6-307939c387df@columbia.edu Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit b9a15df84ca0f830b39c45a957a8d4ce7f4fdf50 Author: Tal Zussman Date: Fri Oct 9 12:50:12 2026 -0400 block: honor IOCB_NOWAIT in the block device buffered read path [ Upstream commit d16519a561f4ccc2cebbf52831435833cac1fec6 ] blkdev_read_iter() takes inode_lock_shared() unconditionally around filemap_read(). Unlike blkdev_write_iter(), it does not reject IOCB_NOWAIT for buffered I/O, so a non-blocking read, or the buffered tail of a short IOCB_NOWAIT direct read, blocks behind set_blocksize() holding i_rwsem across sync_blockdev(). A preadv2(RWF_NOWAIT) issued while another thread changes the block size with a dirty page cache blocks for as long as sync_blockdev() takes, 4 to 6 seconds on a scsi_debug device with delay=5. Use inode_trylock_shared() for IOCB_NOWAIT and return the bytes the direct path already read, or -EAGAIN if none, when the lock is contended, preserving NOWAIT semantics. Fixes: c0e473a0d226 ("block: fix race between set_blocksize and read paths") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260802-blkdev-fixes-v1-0-a82fc549fd74%40columbia.edu?part=2 Assisted-by: Claude:claude-fable-5 Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Signed-off-by: Tal Zussman Link: https://patch.msgid.link/20261009-blkdev-fixes-v6-4-307939c387df@columbia.edu Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit c597b73f53b303c716ca54c71bd810ffc7aec163 Author: Tal Zussman Date: Fri Oct 9 12:50:11 2026 -0400 block: take i_rwsem for the splice read path [ Upstream commit 5574b81c642e83d962732e86399020517f5f15af ] def_blk_fops wires ->splice_read directly to filemap_splice_read(), which allocates folios based on mapping_min_folio_order() without any lock against set_blocksize(). A splice from a block device can race set_blocksize() raising the minimum folio order and insert a folio that is too small for the mapping. blkdev_read_iter() wraps filemap_read() in inode_lock_shared() for this reason, but the splice path was missed. Splicing from a block device while toggling the block size between 512 bytes and 64K with BLKBSZSET hits this within seconds on a CONFIG_DEBUG_VM kernel: page dumped because: VM_BUG_ON_FOLIO(folio_order(folio) < mapping_min_folio_order(mapping)) kernel BUG at mm/filemap.c:858! Oops: invalid opcode: 0000 [#1] SMP NOPTI RIP: 0010:__filemap_add_folio+0x51c/0x570 Call Trace: filemap_add_folio+0x64/0x140 page_cache_ra_order+0x1dd/0x3d0 filemap_get_pages+0x153/0x760 filemap_splice_read+0x13f/0x300 splice_file_to_pipe+0xc0/0xd0 do_splice+0x6a8/0x890 __do_splice+0xb0/0x210 __x64_sys_splice+0x80/0x100 do_syscall_64+0x10e/0x520 entry_SYSCALL_64_after_hwframe+0x77/0x7f Take inode_lock_shared() around filemap_splice_read(), like the read path does. Fixes: 3c20917120ce ("block/bdev: enable large folio support for large logical block sizes") Assisted-by: Claude:claude-fable-5 Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Tested-by: Shin'ichiro Kawasaki Signed-off-by: Tal Zussman Link: https://patch.msgid.link/20261009-blkdev-fixes-v6-3-307939c387df@columbia.edu Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit ba3c9856f9851931388c38d3b57c6b95feefa062 Author: Tal Zussman Date: Fri Oct 9 12:50:10 2026 -0400 block: take i_rwsem for the direct I/O write fallback [ Upstream commit 2fec4fd97cc3ce32283aac03b6882d3d36cbd4bb ] Commit c0e473a0d226 ("block: fix race between set_blocksize and read paths") closed a race between set_blocksize() and block device I/O: with large sector size support, set_blocksize() can change i_blkbits and the mapping's minimum folio order while a concurrent reader still holds a folio of the old, smaller order, leading to crashes. In particular, it made blkdev_write_iter() wrap buffered writes in inode_lock_shared(). However, the direct I/O fallback path was missed in that conversion. blkdev_write_iter() passes blkdev_buffered_write() as an argument to direct_write_fallback() with no lock held. A direct write that completes only partially then finishes as a buffered write with no protection. This can cause a BUG by racing partial direct writes against ioctl(BLKBSZSET). Writer threads issue O_DIRECT pwritev() with a two-segment iovec whose second segment is an unreadable PROT_NONE mapping. The direct path then writes the first segment, fails to pin the second, and returns short, entering the fallback. A second thread keeps toggling the second segment's protection so that some fallbacks get past fault_in_iov_iter_readable() and reach the page cache, a third thread populates the page cache with folios of the current block size via pread() and readahead(), and a fourth thread toggles the block size between 512 bytes and 64K with BLKBSZSET. The minimum folio order only moves with block sizes above PAGE_SIZE, i.e. with CONFIG_TRANSPARENT_HUGEPAGE raising BLK_MAX_BLOCK_SIZE to 64K. On a CONFIG_DEBUG_VM kernel this yields the following BUG: page dumped because: VM_BUG_ON_FOLIO(folio_order(folio) < mapping_min_folio_order(mapping)) kernel BUG at mm/filemap.c:858! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI RIP: 0010:__filemap_add_folio+0x860/0x8d0 Call Trace: filemap_add_folio+0xc9/0x1f0 __filemap_get_folio_mpol+0x240/0x660 iomap_write_begin+0xa87/0xd70 iomap_file_buffered_write+0x304/0x6a0 blkdev_write_iter+0x255/0x510 do_iter_readv_writev+0x23d/0x3c0 vfs_writev+0x211/0x7d0 do_pwritev+0x121/0x190 do_syscall_64+0x121/0x630 entry_SYSCALL_64_after_hwframe+0x77/0x7f The same workload also trips WARN_ON_ONCE(pos >= folio_pos(folio) + fsize) in iomap_trim_folio_range(). Fix this by calling blkdev_buffered_write() in the fallback path under inode_lock_shared(), matching the plain buffered-write branch. With the fix the same workload runs clean. A short IOCB_NOWAIT direct write reaches the same fallback. Taking i_rwsem there can now block behind set_blocksize(), and the fallback already blocks on writeback of the data it copied in direct_write_fallback(). blkdev_write_iter() already rejects a purely buffered IOCB_NOWAIT write with -EOPNOTSUPP, so do not enter the fallback for IOCB_NOWAIT at all: return the bytes the direct path already wrote, or -EAGAIN if none, and let the caller retry. The reproducer used was written by an LLM, and is available at [1]. [1] https://gist.github.com/tzussman/69d06bc57d42a42989eb038b1b5aeb74 Fixes: 3c20917120ce ("block/bdev: enable large folio support for large logical block sizes") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260730-blk-dontcache-v7-0-3e8e6850068d%40columbia.edu?part=5 Assisted-by: Claude:claude-fable-5 Reviewed-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Tested-by: Shin'ichiro Kawasaki Signed-off-by: Tal Zussman Link: https://patch.msgid.link/20261009-blkdev-fixes-v6-2-307939c387df@columbia.edu Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 401c32cce7991bd164c5c950c35fbe7a73f06c22 Author: Zhenxian Ma Date: Sat Aug 15 20:02:15 2026 +0800 block: only use REQ_FUA for direct writes if the device supports it [ Upstream commit 0d492f40c4ad7af7b1625fd81dd58a7978ab97f6 ] When a block device does not support FUA natively, the block layer emulates it by adding a cache flush to every write bio. An O_DSYNC direct write that spans N bios then costs N flushes, rather than the single generic_write_sync() issued after the write completes. Introduce blkdev_dio_fua() to decide when REQ_FUA is set. A synchronous write can rely on generic_write_sync() when the device lacks FUA, so it sets REQ_FUA only when bdev_fua() is true. An asynchronous write completes in blkdev_bio_end_io() and cannot call the blocking generic_write_sync(), so it keeps REQ_FUA (emulated when needed) to stay durable. Suggested-by: Christoph Hellwig Signed-off-by: Zhenxian Ma Signed-off-by: Zhenxian Ma Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/tencent_A41247F29AC0971AE96B52964BE4491B440A@qq.com Signed-off-by: Jens Axboe Stable-dep-of: 2fec4fd97cc3 ("block: take i_rwsem for the direct I/O write fallback") Signed-off-by: Sasha Levin commit c087b8865ef03dac587c4ec8c882ecb9082640af Author: Zhenxian Ma Date: Sat Aug 15 17:06:52 2026 +0800 block: skip redundant flush for O_DSYNC direct writes [ Upstream commit bec7d36a6514153ded6ffe1323ab14912ced42df ] For an O_DIRECT | O_DSYNC write, dio_bio_write_op() adds REQ_FUA to the bio, so the data is durable once the direct I/O returns. The unconditional generic_write_sync() in blkdev_write_iter() then issues a REQ_PREFLUSH that is redundant. Skip it when the direct path already provided durability via FUA. A need_sync flag, clear by default, is set only for buffered writes and for the buffered fallback after a partial direct write. Measured on a Seagate ST20000NM007D (20 TB, 7200 rpm, fua=1, write_cache=write back), Linux v7.2.0-rc7, single-threaded pwrite() loop opening the raw block device with O_WRONLY | O_DIRECT | O_DSYNC, 4 KiB writes for 60 s: Sequential 4 KiB writes: baseline patched IOPS 119.7 7497.0 avg latency (us) 8357 133 p50 latency (us) 8346 127 p99 latency (us) 8368 395 p99.9 latency (us) 8728 569 Random 4 KiB writes (100 GiB span): baseline patched IOPS 156.1 666.4 avg latency (us) 6405 1500 p50 latency (us) 6186 1450 p99 latency (us) 16133 2285 p99.9 latency (us) 17250 9916 Signed-off-by: Zhenxian Ma Signed-off-by: Zhenxian Ma Reviewed-by: Christoph Hellwig Link: https://patch.msgid.link/f847707d772a9225460406b5aecba030d7209b05.1786782832.git.mzx199711@gmail.com Signed-off-by: Jens Axboe Stable-dep-of: 2fec4fd97cc3 ("block: take i_rwsem for the direct I/O write fallback") Signed-off-by: Sasha Levin commit 2c163c18e8e2adf2f9ed865275ddcf50773e388a Author: Tal Zussman Date: Fri Oct 9 12:50:09 2026 -0400 block: use iomap_dirty_folio for block devices [ Upstream commit be1e33eda3e6699e57ed3fe6e34078f115b4a1ec ] With CONFIG_BUFFER_HEAD=n, block devices are written back through iomap, but def_blk_aops uses filemap_dirty_folio, which only sets PG_dirty. It does not set the per-block dirty bits in the folio's iomap_folio_state, so iomap_writeback_folio() finds no dirty range, submits no I/O and clears PG_dirty, resulting in data loss. Other iomap users set .dirty_folio to iomap_dirty_folio, which marks the folio's blocks dirty before calling filemap_dirty_folio(). This is only observable with block size < folio size. With a single block there is no iomap_folio_state to get out of sync and iomap_writeback_folio() marks the whole folio dirty itself. For a page-aligned device, this may require using the BLKBSZSET ioctl to set the block size, which requires CAP_SYS_ADMIN. A device whose size is not page aligned already gets a sub-page block size from set_init_blocksize(), so no ioctl and no privilege is needed. To reproduce, on a device with a sub-page block size, write a known pattern with O_DIRECT, mmap the same range, store to it, msync() and fsync(), then read it back with O_DIRECT. A reproducer is available at [1]. [1] https://gist.github.com/tzussman/18ab05cba4b3fdc79cce0a69d1fd05b4 Fixes: 925c86a19bac ("fs: add CONFIG_BUFFER_HEAD") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260730-blk-dontcache-v7-0-3e8e6850068d%40columbia.edu?part=5 Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Tal Zussman Link: https://patch.msgid.link/20261009-blkdev-fixes-v6-1-307939c387df@columbia.edu Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 164a752cd545e166cbc0cb11080527f98207df2e Author: Cristian Ciocaltea Date: Mon Oct 5 03:38:09 2026 +0300 drm/rockchip: dw_hdmi_qp: Add missing newlines in dev_err_probe() messages [ Upstream commit 7554a1cb23148a3ab0b74c7edd47356c26b40ead ] Add the missing trailing newlines to a couple of dev_err_probe() calls in dw_hdmi_qp_rockchip_bind(). Fixes: b6736a4ea3fa ("drm/rockchip: dw_hdmi_qp: Improve error handling with dev_err_probe()") Fixes: e1f7b7cbd74c ("drm/rockchip: dw_hdmi_qp: Switch to drmm_encoder_init()") Tested-by: Maud Spierings Tested-by: Diederik de Haas # NanoPC-T6 LTS, Rock 5B Tested-by: Robin Räber Tested-by: Igor Paunovic # RK3588 Orange Pi 5 Plus, dual HDMI Signed-off-by: Cristian Ciocaltea Signed-off-by: Heiko Stuebner Link: https://patch.msgid.link/20261005-dw-hdmi-qp-scramb-v12-8-195157ba0b40@collabora.com Signed-off-by: Sasha Levin commit f9465dd05f70871300d1f1eba3d9dda0c7ab6e5c Author: Cristian Ciocaltea Date: Mon Oct 5 03:38:08 2026 +0300 drm/rockchip: dw_hdmi_qp: Cancel pending HPD work on suspend [ Upstream commit 5d0aa771a5308f6a6c83eeaa89351a472ae580c3 ] The HPD threaded handler debounces hotplug events by delaying hdmi->hpd_work for 150 ms. Nothing discards that work when the system goes to sleep: drm_kms_helper_poll_disable() only disables the HPD IRQ line via the bridge .hpd_disable() op, and disable_irq() merely waits for the threaded handler, which has already returned after arming the timer. If the debounce expires during suspend, its non-freezable work may probe the connector and read the EDID over DDC. Since genpd powers off the HDMI controller's power domain in ->suspend_noirq(), this access may hit unpowered hardware and hang the system. Cancel the work in the suspend callback. The DRM device is registered as a consumer of the HDMI device, so it always suspends first and the HPD IRQ is already disabled by that point, meaning nothing can re-arm the work behind our back. No counterpart is needed on resume, as the work gets scheduled again on the next hotplug interrupt. Fixes: 128a9bf8ace2 ("drm/rockchip: Add basic RK3588 HDMI output support") Reported-by: Sashiko Closes: https://lore.kernel.org/all/20260723015909.7F79A1F000E9@smtp.kernel.org/ Tested-by: Robin Räber Tested-by: Igor Paunovic # RK3588 Orange Pi 5 Plus, dual HDMI Signed-off-by: Cristian Ciocaltea Signed-off-by: Heiko Stuebner Link: https://patch.msgid.link/20261005-dw-hdmi-qp-scramb-v12-7-195157ba0b40@collabora.com Signed-off-by: Sasha Levin commit 3557e9c2b0047ef18841c19d4ea2cbc7699af834 Author: Cristian Ciocaltea Date: Mon Oct 5 03:38:07 2026 +0300 drm/rockchip: dw_hdmi_qp: Fix invalid drvdata access in PM ops [ Upstream commit b6e19848c9db535d81d6db85c7cc1324e6611791 ] The system-sleep PM callbacks fetch the driver state via dev_get_drvdata() and dereference it unconditionally. However, the platform device is bound by ->probe(), which merely registers a component, hence the callbacks may well run when no valid state is available: - Before the aggregate driver calls ->bind(), e.g. when the system suspends while probing is still deferred waiting for the VOP, dev_get_drvdata() returns NULL. - After ->unbind(), or when ->bind() fails past platform_set_drvdata(), drvdata is left pointing to memory obtained via drmm_kzalloc(), which is released together with the DRM device, while this platform device remains bound and PM-capable. Publish the driver data only after ->bind() completes successfully, and clear it in ->unbind(). This ensures that a non-NULL drvdata always represents live state, allowing each PM callback to rely on a single NULL check. Fixes: 128a9bf8ace2 ("drm/rockchip: Add basic RK3588 HDMI output support") Reported-by: Sashiko Closes: https://lore.kernel.org/all/20260702151550.8E14D1F000E9@smtp.kernel.org/ Closes: https://lore.kernel.org/all/20260723014811.1F9F01F000E9@smtp.kernel.org/ Tested-by: Robin Räber Tested-by: Igor Paunovic # RK3588 Orange Pi 5 Plus, dual HDMI Signed-off-by: Cristian Ciocaltea Signed-off-by: Heiko Stuebner Link: https://patch.msgid.link/20261005-dw-hdmi-qp-scramb-v12-6-195157ba0b40@collabora.com Signed-off-by: Sasha Levin commit 7ac76e1c546fa933cd42761c084c382c9ae4fd2d Author: Jiale Yao Date: Fri Sep 25 23:58:46 2026 +0800 ACPI: PCI: pci_link: clear driver_data before free [ Upstream commit 691c33289b4d7a50b6fe1e03918bfbc21d4641c5 ] acpi_pci_link_remove() frees the link object without clearing the ACPI device's driver_data pointer. The ACPI device survives hot-removal and can later be retrieved by acpi_fetch_acpi_dev(), leaving callers with a dangling pointer. Clear driver_data before freeing the link. Fixes: db89b4f0dbab ("ACPI: catch calls of acpi_driver_data on pointer of wrong type") Signed-off-by: Jiale Yao [ rjw: Subject tweak ] Link: https://patch.msgid.link/20260925155846.2381956-1-yaojiale02@163.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit f2fe0b5523f5f55328d78edb97a2cc149556de73 Author: Adrián Larumbe Date: Mon Oct 12 15:48:07 2026 +0100 drm/panfrost: Fix races between perfcnt and reset sequence [ Upstream commit 9944dd07f3cf7b6c19d65c2585147887ca06677c ] Formerly, the reset sequence would race with panfrost_mmu_as_put() when tearing down a perfcnt session. On top of that, poking GPU registers to program a perfcnt session or obtaining a dump might lead to undefined behaviour when done at the same time a reset was ongoing. Use the reset r/w semaphore when disabling and re-enabling perfcnt configuration, and also in the sections inside the 'enable'and 'dump' ioctls where device registers are being accessed. On top of that, expand the DRM uAPI for the perfcnt DUMP operation so that user space can be made aware of a reset having happened, whether it succeeded or failed to restore the original configuration. UM needs to know about this condition because counter data is inaccurate after a reset, so the best approach might be simply to try again. Finally, update driver uAPI documentation to explain the meaning of the new perfcnt dump ioctl's state flags, and bump DRM driver minor number to reflect the new DUMP IOCTL req field. Reviewed-by: Boris Brezillon Fixes: 73e467f60acd ("drm/panfrost: Consolidate reset handling") Fixes: 7786fd108777 ("drm/panfrost: Expose performance counters through unstable ioctls") Reviewed-by: Steven Price Link: https://patch.msgid.link/20261012-claude-fixes-v15-15-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Signed-off-by: Sasha Levin commit de2d61d5b5b22455dc1a51bde6f107bc760bc224 Author: Adrián Larumbe Date: Mon Oct 12 15:48:06 2026 +0100 drm/panfrost: Introduce a reset lock [ Upstream commit 38fb4f01d7ee3a4dd7f8936ff2cb9dc0d0529f1a ] In order to avoid accessing HW register while a reset is ongoing, a read/write semaphore that envelopes the reset sequence will help driver entry points avoid racing with it. For now, the only such racy entry point is the ioctl that returns the current GPU timestamp. Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patch.msgid.link/20261012-claude-fixes-v15-14-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Stable-dep-of: 9944dd07f3cf ("drm/panfrost: Fix races between perfcnt and reset sequence") Signed-off-by: Sasha Levin commit 7d1e2cf0c4c75cd230bbde83939f3f03785b5db2 Author: Adrián Larumbe Date: Mon Oct 12 15:48:04 2026 +0100 drm/panfrost: Skip cache flush/invalidate when enabling perfcnt [ Upstream commit 711a34a56d64d235ff74dbe53ba488ecd54e5570 ] The GPU cache flush/invalidate operation is unnecessary. In the usual case, before a perfcnt dump is requested, there will be no stale lines in GPU caches for the sample BO's physmem pages, since their memory had not recently been addressed by the GPU. However, in the off-chance that the sample BO reuses memory that the GPU had recently addressed and for which it contains stale lines in its caches, there already was a FLUSH_PT command being issued as part of the buffer GPU mapping procedure, so by the time panfrost_gem_open() comes back at perfcnt session enable, stale GPU cache lines should've already been evicted. In either case, forcing a GPU cache clean when enabling a new session makes no difference, and removing it simplifies handling of the error path. Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patch.msgid.link/20261012-claude-fixes-v15-12-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Stable-dep-of: 9944dd07f3cf ("drm/panfrost: Fix races between perfcnt and reset sequence") Signed-off-by: Sasha Levin commit 521bbd96ae670258a380fd4d137e92153be7f80b Author: Adrián Larumbe Date: Mon Oct 12 15:48:03 2026 +0100 drm/panfrost: Move perfcnt GPU disable sequence into a helper [ Upstream commit a2858e0f33eaba1c4a1976ba0ddebb1d83e21545 ] Just for the sake of avoiding repetition. Reviewed-by: Steven Price Reviewed-by: Boris Brezillon Link: https://patch.msgid.link/20261012-claude-fixes-v15-11-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Stable-dep-of: 9944dd07f3cf ("drm/panfrost: Fix races between perfcnt and reset sequence") Signed-off-by: Sasha Levin commit 6ef8ef16e0e4fecaf119a50861d2f58917d9a3c7 Author: Adrián Larumbe Date: Mon Oct 12 15:47:54 2026 +0100 drm/panfrost: Move lock and modparam initialisations into their subsystems [ Upstream commit ab2867234fa392f471ba27a6e1099260bce3d344 ] The device init function feels a bit cluttered with things that should be done in the specific subsystems where those locks and lists are being used. Same goes for module parameters, it's best to limit them to the subsystems where they're relevant. Then we can also discard panfrost_drv.h since the transparent_huge_page doesn't need to be accessed elsewhere. We can also simplify the creation of a mount point, because drm_gem_get_huge_mnt() would never return NULL if drm_gem_huge_mnt_create() returns 0 when kernel is built with support for transparent huge pages. Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patch.msgid.link/20261012-claude-fixes-v15-2-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Stable-dep-of: 9944dd07f3cf ("drm/panfrost: Fix races between perfcnt and reset sequence") Signed-off-by: Sasha Levin commit f265bce32cbbbcb40daad721d23fc3c1c98d7c8e Author: Adrián Larumbe Date: Mon Oct 12 15:47:59 2026 +0100 drm/panfrost: Explicitly enable MMU interrupts at device init [ Upstream commit 8a597d099b8b2f25df655cbe8e30765013784fed ] Because the device must be in a position to accept jobs between the time drm_dev_register() is called and autosuspend first kicks in, there's a very narrow window inbetween during which jobs targeting the tiler buffer object would time out, since the device's PM status is 'Active', but no MMU interrupts were enabled at device initialisation time. Reviewed-by: Boris Brezillon Fixes: 73e467f60acd ("drm/panfrost: Consolidate reset handling") Reviewed-by: Steven Price Link: https://patch.msgid.link/20261012-claude-fixes-v15-7-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Signed-off-by: Sasha Levin commit a6050d892486da258468d31203d22fb5aaf74e45 Author: Adrián Larumbe Date: Mon Oct 12 15:47:58 2026 +0100 drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove [ Upstream commit e9672bf9382ff80be21d586f88e50339b85f5766 ] During device probe(), failure to do a PM get() will leave the usage_count set to 0, which is the value assigned at device creation time. That means when the autosuspend delay expires, runtime suspend callback won't be invoked, so the device will remain powered on forever. On top of that, failure to call PM put() during device unplug means Panfrost device's PM usage_count increases monotonically for every new module reload. The outcome of both of the above meant that: - Devfreq OPP transition notifications would be printed all the time, even when no jobs are being submitted. This quickly fills the kernel ring buffer with junk. - Because MMU interrupts are only enabled when the device is reset, the very first job targeting the tiler heap BO after device probe() would always time out, since the driver's PM runtime resume callback would not be invoked. To fix the above: - Manually adjust the PM refcnt at device probe and removal time. - Ensure pm_runtime_dont_use_autosuspend is called in the wind-down path. - Call pm_runtime_put_autosuspend() when device is ready to accept jobs Fixes: 635430797d3f ("drm/panfrost: Rework runtime PM initialization") Fixes: 876b15d2c88d ("drm/panfrost: Fix module unload") Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patch.msgid.link/20261012-claude-fixes-v15-6-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Signed-off-by: Sasha Levin commit 4bf1597a1231c0e6a792c7fae72ec87ba67fc637 Author: Adrián Larumbe Date: Mon Oct 12 15:47:53 2026 +0100 drm/panfrost: Move shrinker initialization and unplug one level down [ Upstream commit 80c4ff19d938a170bf487a11a1d7291c493ba22a ] Since the moment we call drm_dev_register() the device should be in a position to accept jobs, so it's best if the shrinker is already initialized by then. On top of that, make shrinker functions take an panfrost_device pointer like other functions in the same sequence and rename them accordingly. Essentially mimic the init/fini behaviour in Panthor. Reviewed-by: Boris Brezillon Reviewed-by: Steven Price Link: https://patch.msgid.link/20261012-claude-fixes-v15-1-bc0a6c498553@collabora.com Signed-off-by: Adrián Larumbe Stable-dep-of: e9672bf9382f ("drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove") Signed-off-by: Sasha Levin commit be872c62298583595baa91506100af4a03013f8d Author: Ali Ahmet Memiş Date: Sun Oct 11 21:06:17 2026 +0300 ALSA: control_led: Fix deadlock between sysfs writes and card disconnect [ Upstream commit 682d6bb5f783adea7fa2a5b05166bff01b338081 ] snd_ctl_led_disconnect() removes the ctl-led sysfs files while holding card->controls_rwsem. device_unregister() waits for running sysfs callbacks which can deadlock when a concurrent write causes the attach or detach callback to wait for controls_rwsem. Break kernfs active protection in the attach, detach and list callbacks and hold a module reference instead. Fixes: a135dfb5de15 ("ALSA: led control - add sysfs kcontrol LED marking layer") Signed-off-by: Ali Ahmet Memiş Link: https://patch.msgid.link/20261011180627.1594051-1-aliamemis@disroot.org Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 7e3406ebfebe91956b94f113712287157323ee35 Author: Kaifeng Wang Date: Mon Oct 12 15:54:20 2026 +0200 net: devmem: check uid and netns in net_devmem_get_binding() [ Upstream commit 3a82195416fd71fdd6cb4ff80f611ec28073be16 ] NETDEV_CMD_BIND_TX is unprivileged, and dmabuf binding IDs are allocated from a single global xarray. Currently net_devmem_get_binding() looks up the binding by ID without checking whether the sending socket belongs to the same user or network namespace that created the binding. Record the creating netlink socket's network namespace and UID on the binding, and verify both in net_devmem_get_binding() before checking the route destination device. Return -EINVAL on mismatch so callers cannot distinguish non-existent IDs from bindings owned by other users. Fixes: bd61848900bf ("net: devmem: Implement TX path") Signed-off-by: Kaifeng Wang Acked-by: Stanislav Fomichev Reviewed-by: Bobby Eshleman Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 19dbc722f323ed9b820721944199a9fa7f965d6c Author: Stanislav Fomichev Date: Thu Sep 17 11:11:15 2026 -0700 net: devmem: embed net_iov_area in binding [ Upstream commit 13648ba787223c88086b383beead242427e5747a ] After replacing the gen_pool with a binding-level freelist, devmem no longer needs a separate chunk owner object. There is only one net_iov_area for the binding, so store it directly in struct net_devmem_dmabuf_binding. Derive the binding from net_iov_owner() with container_of(), matching the pattern used by io_uring zcrx. This removes the leftover dmabuf_genpool_chunk_owner wrapper and its allocation/free path. Reviewed-by: Mina Almasry Signed-off-by: Stanislav Fomichev Link: https://patch.msgid.link/20260917181116.3319017-3-sdf@fomichev.me Signed-off-by: Jakub Kicinski Stable-dep-of: 3a82195416fd ("net: devmem: check uid and netns in net_devmem_get_binding()") Signed-off-by: Sasha Levin commit 4cf84c38e66947cf708219548d8cfb68df6510a0 Author: Stanislav Fomichev Date: Thu Sep 17 11:11:14 2026 -0700 net: devmem: replace gen_pool with freelist [ Upstream commit 083e64a3af7717363d1918baede5757235f94a87 ] devmem only needs fixed-size net_iov allocations for each dma-buf binding. The gen_pool tracks the same free set indirectly through DMA addresses, which makes devmem depend on the generic allocator even though the users are fixed-size net_iov chunks. Mirror the io_uring zcrx model more closely by keeping a binding-level freelist protected by spin_lock_bh(). Use a single net_iov_area owner for the binding, populate each net_iov's DMA address while walking the SG table, and check at teardown that all net_iovs have returned to the freelist. Validate the DMA-BUF size against the net_iov size up front and derive the RX and TX entry count from it, avoiding a separate SG-table pass. Drop the NET_DEVMEM select of GENERIC_ALLOCATOR now that devmem no longer calls gen_pool APIs. Signed-off-by: Stanislav Fomichev Link: https://patch.msgid.link/20260917181116.3319017-2-sdf@fomichev.me Signed-off-by: Jakub Kicinski Stable-dep-of: 3a82195416fd ("net: devmem: check uid and netns in net_devmem_get_binding()") Signed-off-by: Sasha Levin commit 798d04f76514c7ea02f388dc5479c5158463f83a Author: Mikulas Patocka Date: Fri Oct 9 18:16:02 2026 +0200 dm-snapshot: make the chunk list sorted by the chunk number [ Upstream commit bbd6f974d0386036e560af332b6b8cdd17010a72 ] Commit 8581b19eb2c5 ("dm-snapshot: fix 'scheduling while atomic' on real-time kernels") replaced hlist_bl_for_each_entry with hlist_for_each_entry, but the two iteration macros differ after the loop ends: hlist_bl_for_each_entry leaves "e" pointing at the last element, while hlist_for_each_entry() sets it to NULL. The result is that the list is no longer sorted by chunk number as it was intended to be. This bug doesn't cause data corruption because dm_lookup_exception walks the full list. Restore the invariant by tracking the list tail in the "prev" variable and appending after it with hlist_add_behind. Signed-off-by: Mikulas Patocka Fixes: 8581b19eb2c5 ("dm-snapshot: fix 'scheduling while atomic' on real-time kernels") Assisted-by: Claude:claude-opus-5 Signed-off-by: Sasha Levin commit c10699a7f7589d856faf0930a6c1701d198424e2 Author: Yuan Chen Date: Sat Oct 10 15:44:35 2026 +0800 bpftool: Fix out-of-bounds read in kprobe_multi link info dump [ Upstream commit 0d5e3fc78a6f2522e6339743b8e5ecc02351a9dd ] show_kprobe_multi_{plain,json}() walk the sorted kallsyms array against the sorted addr/cookie array with j as a cursor into the latter. The loop terminating condition is checked after the cursor has already been used to access the array: if (j++ == info->kprobe_multi.count) break; After all count entries have been printed, j has been bumped to count, but the loop keeps running and dereferences data[count] -- one element past the end of the calloc(count, sizeof(*data)) allocation -- while comparing every remaining kallsyms symbol. If the out-of-bounds value happens to match a symbol address, a bogus entry with a garbage addr/cookie pair is printed to boot. Fix the off-by-one by advancing the cursor before the comparison, so the loop terminates as soon as the last entry has been printed. Verified with an ASAN build of bpftool against a live kprobe_multi link of 3 symbols: before: ERROR: AddressSanitizer: heap-buffer-overflow READ of size 8 at link.c:860 (show_kprobe_multi_plain) and link.c:352 (show_kprobe_multi_json), 0 bytes after the 48-byte get_addr_cookie_array() allocation after: clean output, no ASAN report Fixes: edd7f49bb884 ("bpftool: Show kprobe_multi link info") Signed-off-by: Yuan Chen Acked-by: Yafang Shao Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20261010074435.1415234-1-chenyuan_fl@163.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 7377f585014dd82e4395c9011dabb91b72e2f387 Author: Ricardo B. Marlière (SUSE) Date: Thu Oct 1 09:21:56 2026 -0300 selftests/namespaces: Wait for thread exit via pidfd in active-ref tests [ Upstream commit 123dcfe87d5f8c9a2ff489545e85c0345de9e21c ] pthread_join() returns once exit_mm() wakes the CLEARTID futex, but the exiting thread drops its namespace reference later, in exit_nsproxy_namespaces(). The joining thread can therefore still see the namespace as active, making the final open_by_handle_at() check in thread_ns_inactive_after_exit and thread_ns_fd_keeps_active fail intermittently. Have the thread open a PIDFD_THREAD pidfd on itself and poll it before pthread_join(). A pidfd becomes readable from exit_notify(), which runs after exit_nsproxy_namespaces(). Fixes: 29f083c49982 ("selftests/namespace: first threaded active reference count test") Fixes: ee861032381b ("selftests/namespace: second threaded active reference count test") Signed-off-by: Ricardo B. Marlière (SUSE) Link: https://patch.msgid.link/20261001-selftests-namespaces-nsid_race-v1-1-25f542cf0b9c@marliere.net Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 6573d2f1de8a72bc2311ecf3a679d4c15e94748b Author: Alexei Starovoitov Date: Sun Oct 11 16:48:35 2026 +0000 bpf: Reject BTF ids with the same address in tracing_multi link [ Upstream commit 87bfa22937000db29a9a09ec826ab7227eaf9e8c ] check_dup_ids() rejects equal BTF ids, but different ids can resolve to the same address. Aliases: ffffffff8161b6b0 t __do_sys_munlockall ffffffff8161b6b0 T __ia32_sys_munlockall ffffffff8161b6b0 T __x64_sys_munlockall or several BTF_KIND_FUNC with the same name that vmlinux BTF has when CONFIG_DEBUG_INFO_BTF_INLINE is set. Each id gets its own trampoline and register_fentry_multi() adds them to data->reg with the same ip. update_ftrace_direct_add() checks that new entries are not in direct_functions, but doesn't compare them with each other, so the attach succeeds. At detach update_ftrace_direct_del() sees that 'direct' of one of the entries doesn't match and returns -EINVAL: WARNING: kernel/bpf/trampoline.c:1845 at bpf_trampoline_multi_detach+0x24c/0x280 Call Trace: bpf_link_free+0x51/0x110 bpf_link_release+0x18/0x20 __fput+0x103/0x2d0 __x64_sys_close+0x3d/0x80 The images are freed anyway, while ftrace still calls them: Oops: int3: 0000 [#1] SMP NOPTI RIP: 0010:0xffffffffc042b201 Call Trace: ? __audit_syscall_exit+0x9/0x100 ? do_syscall_64+0x5ab/0x5e0 entry_SYSCALL_64_after_hwframe+0x77/0x7f Kernel panic - not syncing: Fatal exception in interrupt Return -EINVAL from register_fentry_multi() when ip is already in data->reg. When such ids are attached via different links the second attach already fails with -EINVAL in update_ftrace_direct_add(). Move the declaration of ftrace_lookup_ip() to include/linux/ftrace.h. The lookup adds 60 msec to the attach of 64480 functions in tracing_multi_bench_attach: 1.34 -> 1.40 sec. Fixes: aef4dfa790b2 ("bpf: Add bpf_trampoline_multi_attach/detach functions")a Signed-off-by: Alexei Starovoitov Acked-by: Leon Hwang Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20261011164836.2233874-2-alexei.starovoitov@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 15be41287b4658b653a6f9e9695e9f3822556283 Author: Prathamesh Deshpande Date: Thu Oct 8 15:12:02 2026 +0100 RDMA/mlx5: Cancel software CQ notifications before teardown [ Upstream commit a0ab2bb269e7fd8523f87950b91a42a36c7f8f2a ] GSI completions queue notify_work to invoke the CQ completion handler. CQ destruction drains hardware events and core polling, but does not cancel this software notifier. Fixes: 25361e02c448 ("IB/mlx5: Generate completions in software") Signed-off-by: Prathamesh Deshpande Link: https://patch.msgid.link/20261008141209.6923-1-prathameshdeshpande7@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 3069c6ebb7b0abe8cb91ecc262ceccb1bd526b09 Author: Prathamesh Deshpande Date: Thu Oct 8 00:42:11 2026 +0100 RDMA/mlx5: Cancel deferred page-fault EQ work before teardown [ Upstream commit aea64024ac37d29e99b82b315a56a9145dc0bc23 ] Page-fault EQ work can remain queued after the notifier is disabled. Destroying the EQ before cancelling that work can let the worker access freed EQ memory. Cancel the deferred work before destroying the EQ. Fixes: d5d284b829a6 ("{net,IB}/mlx5: Move Page fault EQ and ODP logic to RDMA") Signed-off-by: Prathamesh Deshpande Link: https://patch.msgid.link/20261007234216.2765-1-prathameshdeshpande7@gmail.com Reviewed-by: Chenguang Zhao Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 6951e4e63569dd0e85218c02ab36e9eb23f3f881 Author: Ting-Han Hou Date: Sun Oct 11 20:54:26 2026 +0800 ALSA: virtio: reset I/O message fill level on prepare [ Upstream commit f0e9db0f84249b65a72b5fba43e91212281ad378 ] Since commit fe981e67568c ("ALSA: virtio: use ack callback"), an I/O message is only queued to the device once the application has filled the whole period: virtsnd_pcm_msg_send() accumulates the transferred bytes in msg->length and queues the message when it reaches period_bytes. msg->length is reset to 0 only when the device completes the message. If the substream is stopped (e.g. snd_pcm_drop()) while a period is only partially filled, the corresponding message is never queued and keeps its partial length. virtsnd_pcm_prepare() resets msg_count, hw_ptr and the indirect PCM state, but not msg->length. After the next start, the stale length is added to the new data, the sum never equals period_bytes, and the message is never sent again. Playback then stalls once hw_ptr reaches that period: writes fail with -EIO ("DMA or IRQ trouble") and drain fails with -EIO. Capture is affected the same way after a partial read. Clear the fill level of all messages in prepare. Outside of the resume path, virtsnd_pcm_prepare() already refuses to run while I/O messages are pending, so no message is owned by the device at this point and the reset does not race with message completion. Reproduced in QEMU (virtio-sound-pci, wav audiodev): prepare, write 1.5 periods, drop, prepare, write 16 full periods, drain. Without this patch WRITEI returns -EIO after 14 periods and DRAIN fails; with it all 16 periods are played and DRAIN succeeds. Period-aligned prefill works in both cases. The same sequence on capture (read 1.5 periods, drop, prepare, read 16 periods) fails with -EIO after 10 periods without this patch and reads all 16 with it. Found by code inspection, confirmed with the reproducer above. Fixes: fe981e67568c ("ALSA: virtio: use ack callback") Assisted-by: LLM Signed-off-by: Ting-Han Hou Link: https://patch.msgid.link/20261011125426.35745-1-ue081723@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit c18c8a83b95435cc32d87f3b91fed1c18f785313 Author: Cen Zhang Date: Mon Oct 12 00:02:50 2026 +0800 ALSA: timer: Pin the module for userspace timer controllers [ Upstream commit f9e882ac8257bc55a8c99399e504e434d9e72eb9 ] The static snd_utimer_ids IDA must remain live until a userspace timer controller has returned its ID. However, snd_utimer_fops has no owner, so anon_inode_getfd() does not take a reference to snd-timer for the controller file. With CONFIG_SND_TIMER=m and CONFIG_SND_UTIMER=y, userspace can create a controller with SNDRV_TIMER_IOCTL_CREATE and close the native timer file. If no timer instances or dependent modules retain snd-timer, ordinary module unload can then overlap the controller's final release: Controller final release Module unload snd_utimer_release() snd_utimer_free() snd_timer_free(): unlink provider snd_utimer_put_id() enter ida_free() delete_module() alsa_timer_exit() free_module(): free MOD_DATA access snd_utimer_ids.xa The provider is already absent from snd_timer_free_all() when unload runs. Neither register_mutex nor the IDA's lock keeps module storage resident through the remaining IDA access. That access can therefore use freed module data and fault while acquiring the XArray lock, as shown in the Oops below. Set snd_utimer_fops.owner to THIS_MODULE so anonymous-file creation takes the existing module reference. The VFS drops it only after snd_utimer_release() returns, keeping the IDA resident through ida_free() and preventing ordinary unload during that interval. Oops report as below: BUG: unable to handle page fault for address: fffffbfff80480af #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 1a7ff6067 P4D 1a7ff6067 PUD 1a7ff2067 PMD 100ad6067 PTE 0 Oops: Oops: 0000 [#1] SMP KASAN NOPTI CPU: 0 UID: 0 PID: 485 Comm: alsa-utimer-fix Tainted: G O 7.2.0-rc6-pmb-bt-functional-v1+ #1 PREEMPT(lazy) Tainted: [O]=OOT_MODULE Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 RIP: 0010:kasan_byte_accessible+0x15/0x30 Code: 00 00 0f 1f 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 40 d6 48 b8 00 00 00 00 00 fc ff df 48 c1 ef 03 48 01 c7 <0f> b6 07 3c 07 0f 96 c0 e9 69 f1 2b ff 66 66 2e 0f 1f 84 00 00 00 RSP: 0018:ffff88811a457c48 EFLAGS: 00010086 RAX: dffffc0000000000 RBX: ffffffffc0240578 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff861f111c RDI: fffffbfff80480af RBP: ffffffffc0240578 R08: 0000000000000001 R09: 0000000000000000 R10: ffffffff891cc057 R11: ffff88811531ba00 R12: ffffffff861f111c R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007ff190ff7780(0000) GS:ffff8881fda2a000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff80480af CR3: 0000000116890003 CR4: 0000000000770ef0 PKRU: 55555554 Call Trace: __kasan_check_byte+0x13/0x50 lock_acquire+0x113/0x2f0 ? __pfx_pmbd_probe_hit_cookie+0x10/0x10 ? lock_release+0xc8/0x280 ? srso_alias_return_thunk+0x5/0xfbef5 _raw_spin_lock_irqsave+0x3c/0x60 ? ida_free+0xd4/0x2b0 ida_free+0xd4/0x2b0 ? __pfx_ida_free+0x10/0x10 ? srso_alias_return_thunk+0x5/0xfbef5 ? __pfx_locks_remove_file+0x10/0x10 ? __fput+0x39f/0xa60 ? fput_close_sync+0xff/0x200 ? __pfx_fput_close_sync+0x10/0x10 ? dnotify_flush+0x22/0x4b0 ? __x64_sys_close+0x8c/0xf0 ? do_syscall_64+0x115/0x6a0 ? entry_SYSCALL_64_after_hwframe+0x77/0x7f Modules linked in: snd(O) [last unloaded: snd_timer(O)] CR2: fffffbfff80480af ---[ end trace 0000000000000000 ]--- Fixes: 37745918e0e7 ("ALSA: timer: Introduce virtual userspace-driven timers") Assisted-by: LLM Signed-off-by: Cen Zhang Link: https://patch.msgid.link/pm-pmb-98fb8f747fc7b8499fd4-v2-1c531f149a6d6c084f48@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 86e1cd894399e178376fcbeb3c9c9d2afb959d43 Author: Kees Cook Date: Mon Oct 5 08:56:52 2026 -0700 seq_buf: Do not pop from an overflowed seq_buf [ Upstream commit b7e688b5635a0888613f4d620eeb7440e2f23a7e ] When a seq_buf has overflowed, its len is size + 1, so seq_buf_pop() decrements len to size and reads buffer[size], one byte past the end of the buffer. It also leaves len equal to size, which no longer counts as overflowed, so a truncated seq_buf then looks like a complete, full one. An overflowed seq_buf logically has no last character to pop: the length of what was written has been lost, and the last byte of the buffer may be the NUL written by vsnprintf() or bytes that were never committed. Return -1 for an overflowed seq_buf, as for an empty one, and leave it overflowed, as the rest of the seq_buf API does until seq_buf_clear() or seq_buf_init(). The current callers do not reach this, e.g. trace_syscalls only calls trace_seq_pop() when the trace_seq it pops from has not overflowed, and kernel/bpf/diagnostics.c sets the length from strnlen() before popping. Add tests for the pop corner cases. Tests passed under qemu on ARCH=x86_64 with GCC 16.2.0 and CONFIG_KASAN=y, and on big-endian ARCH=s390 with GCC s390x-linux-gnu 16.1.0. Fixes: 32e0f607ac6a2 ("tracing: Add trace_seq_pop() and seq_buf_pop()") Assisted-by: LLM Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20261005155708.1471260-2-kees@kernel.org Signed-off-by: Kees Cook Signed-off-by: Sasha Levin commit f9d22e4d32a0e269de4ca2efd54321bfbe1cb1bf Author: Kees Cook Date: Mon Oct 5 08:56:51 2026 -0700 seq_buf: Do not print an empty line from an overflowed seq_buf_do_printk() [ Upstream commit a09fb764832dd7dbb9ccc38a9830f7294889c8ae ] seq_buf_do_printk() prints a buffer line by line, then prints whatever follows the last newline. When a string has overflowed at exactly a newline, an empty line is printed since the pointer hasn't reached the overflow mark of the seq_buf. Switch to just check if the string is already empty and only print if not. The only caller is the memory cgroup OOM report, so this could only ever add a blank line to a report whose statistics already did not fit. Add a test that registers a console to count the records that seq_buf_do_printk() emits. It counts the records carrying the test's marker, and the records holding nothing but a line feed that arrive after one, so that unrelated kernel messages do not disturb it. Both states that reach the flaw are covered: exactly full, and overflowed. Tests passed under qemu on ARCH=x86_64 with GCC 16.2.0 and CONFIG_KASAN=y, and on big-endian ARCH=s390 with GCC s390x-linux-gnu 16.2.0. Fixes: 96928d9032a7c ("seq_buf: Add seq_buf_do_printk() helper") Assisted-by: LLM Link: https://patch.msgid.link/20261005155708.1471260-1-kees@kernel.org Signed-off-by: Kees Cook Signed-off-by: Sasha Levin commit f7a5a5a15e409ca137eb0da6368a131eba1cb16d Author: Mukesh Kumar Chaurasiya (IBM) Date: Sat Oct 3 15:10:06 2026 +0530 powerpc/kasan: fix r2 corruption in mem*() on GENERIC_ENTRY with old compilers [ Upstream commit de5a7fedf5061bdf6823eb509353bd7c128e34b5 ] commit bee25f97ad24 ("powerpc: Enable GENERIC_ENTRY feature") introduced a bug that, when CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX is not set, expand to two consecutive ELFv2 global entry points for the same function body: _GLOBAL_TOC_KASAN(memcpy) expands to: _GLOBAL_TOC(memcpy); _GLOBAL_TOC(__memcpy) On powerpc64le this produces: memcpy: addis r2,r12,(.TOC.-0b)@ha <- global entry, sets up r2 addi r2,r2,(.TOC.-0b)@l .localentry memcpy,.-memcpy <- local entry at memcpy+8 __memcpy: addis r2,r12,(.TOC.-0b)@ha <- memcpy+8: __memcpy global entry addi r2,r2,(.TOC.-0b)@l .localentry __memcpy,.-__memcpy The assembler sets memcpy's st_other field so its local entry offset is 8 bytes past the global entry point. The linker resolves same-TOC calls to the local entry, so every same-TOC caller of memcpy() lands at memcpy+8 — which is the beginning of the __memcpy global-entry TOC prologue. That prologue uses r12 as the base to recompute r2, but r12 holds whatever the caller left in it (not the address of memcpy+8). The result is r2 pointing at garbage on return. Same-TOC callers do not reload r2 after the call, so the first TOC-relative access after returning from memcpy() or memmove() crashes or silently corrupts data. With GENERIC_ENTRY selected, mm/kasan/shadow.c no longer provides its own memcpy()/memmove()/memset() wrappers, so on a toolchain without -mllvm -asan-kernel-mem-intrinsic-prefix=1 (e.g. GCC 9) every instrumented file resolves mem*() directly to the assembly symbols and hits this corrupt-r2 path. This manifests as an early boot hang unique to powerpc with GCC 9 and CONFIG_KASAN=y. Fix this by removing the dual-entry macros entirely. The assembly files in mem_64.S, memcpy_64.S and copy_32.S now use plain _GLOBAL()/_GLOBAL_TOC() for memset/memcpy/memmove, emitting a single correct ELFv2 entry point. The __mem* aliases required by mm/kasan (used in mm/kasan/shadow.c and mm/kasan/generic.c as raw backends to bypass KASAN checking) are provided entirely through the #define redirections in asm/string.h, which already handles both the CC_HAS_KASAN_MEMINTRINSIC_PREFIX and non-prefix cases in C. As a consequence the _GLOBAL_KASAN(), _GLOBAL_TOC_KASAN() and EXPORT_SYMBOL_KASAN() macros have no remaining users and are removed from asm/kasan.h. The has_renamed_memintrinsics() branch in prom_init_check.sh, which conditionally whitelisted __memcpy/__memset when CONFIG_CC_HAS_KASAN_MEMINTRINSIC_PREFIX was absent, is dead code after this change and is removed; the whitelist now unconditionally lists memcpy and memset. Fixes: bee25f97ad24 ("powerpc: Enable GENERIC_ENTRY feature") Reported-by: Venkat Rao Bagalkote Closes: https://lore.kernel.org/all/96dae110-f79b-4e54-8a9b-514369019b5d@linux.ibm.com Tested-by: Venkat Rao Bagalkote Signed-off-by: Mukesh Kumar Chaurasiya (IBM) [Maddy: Fixed commit message to avoid checkpatch error] Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20261003094006.3404731-1-mkchauras@gmail.com Signed-off-by: Sasha Levin commit 94bf70c51f3766222d83b86f911f04dd49897e61 Author: Mukesh Kumar Chaurasiya (IBM) Date: Sat Oct 3 15:15:09 2026 +0530 powerpc: fix NMI exit ordering: restore soft masks after irqentry_nmi_exit() [ Upstream commit 8fa763bc3ee9bd215476ab91ee480c649eaa4b29 ] When running with CONFIG_PPC_IRQ_SOFT_MASK_DEBUG=y and LOCKDEP=y, an Oops is triggered during NMI exit: [ 202.258332] Oops: Exception in kernel mode, sig: 4 [#1] NIP [000000000003e178] 0x3e178 LR [c00000000003e174] arch_local_irq_restore+0x2a4/0x328 TRAP: 0700 MSR: 0000000000081000 The faulting instruction at NIP is a 'trap' (0fe00000) inside the rfi_flush_fallback trampoline at a userspace-looking low address, reached after a bad rfid caused by an incorrect SRR0 value. Root cause: DEFINE_INTERRUPT_HANDLER_NMI used to call arch_interrupt_nmi_exit_prepare() *before* irqentry_nmi_exit(), giving this sequence: arch_interrupt_nmi_enter_prepare() // saves irq_soft_mask, irq_happened irqentry_nmi_enter() // __nmi_enter() -> nmi_count++, in_nmi()=true ____func(regs) // NMI handler body arch_interrupt_nmi_exit_prepare() // RESTORES irq_soft_mask=0 (IRQS_ENABLED) // RESTORES irq_happened with pending bits irqentry_nmi_exit() // instrumentation block runs here... trace_hardirqs_on_prepare() // ...with in_nmi()==true still lockdep_hardirqs_on_prepare() // ...and irq_soft_mask already restored to 0 -> arch_local_irq_restore(0) // mask=0 -> enable path entered WARN_ON_ONCE(in_nmi()) // FIRES: __nmi_exit() hasn't run yet __nmi_exit() // nmi_count-- (too late) arch_interrupt_nmi_exit_prepare() restores irq_soft_mask to whatever the interrupted thread had (IRQS_ENABLED / 0) and restores irq_happened with any pending deferred-interrupt bits that were present when the NMI fired. This is correct and necessary before rfid back to the interrupted context, but it must not happen until irqentry_nmi_exit() has fully completed. With irq_soft_mask=0 and pending bits in irq_happened, the trace_hardirqs_on_prepare() call inside irqentry_nmi_exit()'s instrumentation block reaches lockdep_hardirqs_on_prepare() which calls __trace_hardirqs_on_caller(), which eventually calls arch_local_irq_restore(0) (the IRQS_ENABLED / enable path). arch_local_irq_restore() with mask=0 hits the CONFIG_PPC_IRQ_SOFT_MASK_DEBUG guards at irq_64.c:217: WARN_ON_ONCE(in_nmi()); // TRUE: __nmi_exit() not yet called The WARN_ON_ONCE fires a 'trap' instruction (tw 31,0,0 / 0fe00000) in kernel mode with MSR_PR=0, MSR_IR=0 (real-mode). The program check handler (TRAP 0700) takes the sig:4 (SIGILL) path via do_program_check() and calls die(), producing the Oops. The RESTART_TABLE mechanism in arch_local_irq_restore then causes the bad rfid that lands at the userspace-looking address visible in the NIP. The bug is invisible with LOCKDEP=n because trace_hardirqs_on_prepare() is a no-op when CONFIG_TRACE_IRQFLAGS is not set (TRACE_IRQFLAGS is selected by PROVE_LOCKING which selects LOCKDEP). Fix: Move arch_interrupt_nmi_exit_prepare() to after the irqentry_nmi_exit() block, so that: irqentry_nmi_exit() // __nmi_exit() -> nmi_count--, in_nmi()=false arch_interrupt_nmi_exit_prepare() // now safe to restore soft mask state The instrumentation inside irqentry_nmi_exit() now executes while in_nmi() is still true (nmi_count not yet decremented), but irq_soft_mask is still IRQS_ALL_DISABLED (NMI-entry value), so arch_local_irq_restore() is never called with mask=0 from that path. After __nmi_exit() returns, arch_interrupt_nmi_exit_prepare() restores the pre-NMI soft mask and irq_happened, which is the correct state for the rfid back to the interrupted context. Reviewed-by: Shrikanth Hegde Tested-by: Venkat Rao Bagalkote Reported-by: Venkat Rao Bagalkote Closes: https://lore.kernel.org/all/d4cccba9-ce5c-424b-864c-2248fb0d99e6@linux.ibm.com/ Fixes: bee25f97ad24 ("powerpc: Enable GENERIC_ENTRY feature") Signed-off-by: Mukesh Kumar Chaurasiya (IBM) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20261003094509.3408190-1-mkchauras@gmail.com Signed-off-by: Sasha Levin commit d52c3a9413dc5a1c5587c7a428e1c5db0c2c0656 Author: Anup Vishwakarma Date: Wed Sep 16 13:01:36 2026 +0530 mailbox: qcom-ipcc: remove stray disable_irq_wake() call [ Upstream commit 134ef0278d4e48bcc325a7699250dfe861c11953 ] Commit afaf2ba5b430 ("mailbox: qcom-ipcc: Support interrupt wake up from suspend") replaced enable_irq_wake() with IRQF_NO_SUSPEND on the IRQ request, but left the paired disable_irq_wake() in remove() behind. disable_irq_wake() decrements the IRQ's wake_depth. With no matching enable_irq_wake() left to increment it, wake_depth stays at 0 and irq_set_irq_wake() reports: WARN(1, "Unbalanced IRQ %d wake disable\n", irq) on every unbind. Since there is no enable_irq_wake() to pair it with, remove the stray disable_irq_wake() call; IRQF_NO_SUSPEND already provides the intended wake behaviour. Fixes: afaf2ba5b430 ("mailbox: qcom-ipcc: Support interrupt wake up from suspend") Signed-off-by: Anup Vishwakarma Reviewed-by: Konrad Dybcio Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit 891dc020c20bb94af387b787378b13a8d35269f1 Author: Linkai Gong Date: Wed Sep 2 17:25:45 2026 +0800 mailbox: arm_mhuv2: time out if the receiver never comes up [ Upstream commit 86976f7cc324aac254136a352f74ac17f21e574c ] mhuv2_tx_init() waits forever for access_ready. Fail probe after 1s instead of hanging boot. Fixes: 5a6338cce9f4 ("mailbox: arm_mhuv2: Add driver") Signed-off-by: Linkai Gong Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit 3a443fe1b981431c2b384aa05b15c93010bebc78 Author: Beleswar Padhi Date: Thu Oct 1 01:31:58 2026 +0530 mailbox: ti-msgmgr: Read exact number of trailing message bytes [ Upstream commit 645ae2edd5597501b4af3837a644877fbe194227 ] ti_msgmgr_send_data() copies the message to the data registers in u32 units. This has been harmless so far because the clients (TI-SCI) always passed its preallocated message buffer, which is sized to the maximum message size (60 or 64 bytes, a multiple of 4), so the extra bytes read were still within the buffer. But, with a later TI-SCI update, the message size can be varying now and not guaranteed to be a multiple of 4, which would trigger KASAN out-of-bounds reports. Therefore, memcpy() only the trailing bytes into a zeroed u32 before writing it to the register. This is at most 3 bytes, so the overhead is negligible. Fixes: aace66b170ce ("mailbox: Introduce TI message manager driver") Signed-off-by: Beleswar Padhi Acked-by: Andrew Davis Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit 40616cecd77c9b3342b00ece71fb63c0170aaf33 Author: Anup Vishwakarma Date: Tue Oct 6 16:29:14 2026 +0530 mailbox: arm_mhu_db: Remove redundant mbox_controller_unregister() on probe failure [ Upstream commit 8228ed61b6cbd6e79531c9ebfcad233c35eae562 ] mhu_db_probe() registers the mailbox controller via devm_mbox_controller_register(), which automatically calls mbox_controller_unregister() through devres when the device is removed or probe fails. If devm_request_threaded_irq() subsequently fails in the channel setup loop, the error path also manually calls mbox_controller_unregister(), resulting in a double call that corrupts the global mailbox controller list and causes a kernel panic. Remove the redundant manual call and rely on devres for cleanup. Fixes: 7002ca237b21 ("mailbox: arm_mhu: Add ARM MHU doorbell driver") Signed-off-by: Anup Vishwakarma Reviewed-by: Mukesh Ojha Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit f60dfab8cc07df667277144723b56726b95bb58d Author: Anup Vishwakarma Date: Tue Oct 6 16:29:13 2026 +0530 mailbox: qcom-ipcc: Remove redundant mbox_controller_unregister() on probe failure [ Upstream commit da988ac6afe152f802140ccaa0ad5e8f675b8814 ] qcom_ipcc_probe() registers the mailbox controller via devm_mbox_controller_register(), which automatically calls mbox_controller_unregister() through devres when the device is removed or probe fails. If devm_request_irq() subsequently fails, the err_req_irq: label also manually calls mbox_controller_unregister(), resulting in a double call that corrupts the global mailbox controller list and causes a kernel panic. Remove the redundant manual call and rely on devres for cleanup. Fixes: e9d50e4b4d04 ("mailbox: qcom-ipcc: Dynamic alloc for channel arrangement") Signed-off-by: Anup Vishwakarma Reviewed-by: Mukesh Ojha Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit 8825d6836bfc56ef8651829cc2eb1255c7b33f1a Author: Breno Leitao Date: Thu Sep 3 12:13:27 2026 +0100 mailbox: pcc: Free the channel before unmapping the shared memory [ Upstream commit 4ac21f3fac3e8584fd395c59044a8e99ac618572 ] I am seeing a crash on PCC that is related to a an shared memory being unmapped before the IRQ is disabled, and the IRQ kicks in and hits the unmapped (NULL) address. This is a summary of what I see on my box: scmi_protocol scmi_dev.1: Message for 1 type 0 is not expected! Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004 __handle_irq_event_percpu+0x1c4/0x9e0 handle_irq_event+0x98/0x218 handle_fasteoi_irq+0x230/0x750 generic_handle_domain_irq+0xac/0x138 gic_handle_irq+0x344/0x740 call_on_irq_stack+0x30/0x48 The trapping store is iowrite32(SCMI_SHMEM_FLAG_INTR_ENABLED, &shmem->header.flags), a write of 1 at offset 4 of a NULL base. But, back to the problem, pcc_mbox_free_channel() unmaps the shared memory and clears pchan->chan.shmem *before* freeing the IRQ (aka calling mbox_free_channel()). The interrupt is still live when the mapping goes away. Free the channel first, before the memory unmap. mbox_free_channel() calls pcc_shutdown(), which frees the platform interrupt, and then unmap shared memory. Fixes: 7f9e19f207be ("mailbox: pcc: Check before sending MCTP PCC response ACK") Reviewed-by: Sudeep Holla Signed-off-by: Breno Leitao Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit 9174c98d0b923b4f97d738c7ff1128e55b206d09 Author: Swark Yang Date: Thu Sep 3 00:17:53 2026 -0700 mailbox: axiado: fix debugfs name truncation warning [ Upstream commit 5cefa9bc518f187106c6bba4600e5c6dd61de91f ] kernel test robot reported a format-truncation warning for the snprintf() that builds each channel's debugfs entry name: drivers/mailbox/axiado-mailbox.c:325:39: warning: '-errors' directive output may be truncated writing 7 bytes into a region of size between 2 and 11 [-Wformat-truncation=] AX3005 exposes 16 mailbox channels, so the longest name generated at runtime is "chan15-errors" and already fits in the original buffer. However, the compiler cannot infer that bound from drv_data->num_chans and therefore assumes the unsigned channel index may require up to 10 decimal digits. Widen the buffer to 32 bytes, which removes the -Wformat-truncation warning with no functional change. Fixes: 14af7a96afa3 ("mailbox: add Axiado AX3005 mailbox driver") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202608250447.gGkRwNAl-lkp@intel.com/ Signed-off-by: Swark Yang Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit 1757d3a84be58281fda195603533d72d1ef00201 Author: Swark Yang Date: Thu Sep 3 00:17:52 2026 -0700 mailbox: axiado: fix RX frame draining and error handling [ Upstream commit fe43cf02f416417f2cdf59524abb84356d36d496 ] Two RX-path bugs found during bring-up: 1. axiado_rx_thread() previously consumed only one frame per invocation. Multiple frames can accumulate in the FIFO while the threaded handler is running. Split the single-frame handling into axiado_mbox_receive_one_frame() and drain all currently queued frames before returning from the handler. A cond_resched() in the drain loop prevents a continuously-fed channel from monopolizing the CPU. 2. readl_poll_timeout() waiting for the remainder of a frame can return success either because the required FIFO level was reached or because a FIFO error appeared -- it does not distinguish the two. The old code did not check for that case and could therefore enter the read loop without enough words actually being present. Explicitly inspect the error status after the poll: if an error occurs while waiting for the remainder of an already-started frame, treat that frame as unusable and flush the FIFO to resynchronize, rather than risk delivering incomplete or garbage data to the client. While here: - Track whether the handler actually serviced a hardware condition, such as clearing a FIFO error or consuming frame data. Return IRQ_HANDLED whenever something was serviced, even if the FIFO is empty afterward, instead of reporting IRQ_NONE after handling a hardware condition. - Use readsl() for the RX FIFO payload. The destination is the driver-owned rx_buffer allocated by devm_kzalloc(), so it has suitable alignment for the stream accessor. readsl() is appropriate for copying a sequence of words from the FIFO into that buffer. The TX path intentionally stays on get_unaligned_le32()/writel(): its buffer is supplied by an external mailbox client, the mailbox API gives no guarantee that buffer is naturally aligned, and the TX path also explicitly handles a partial final word. mbox_free_channel() invokes ->shutdown() before chan->cl is cleared, and axiado_mbox_shutdown() calls disable_irq(), which waits for the in-flight threaded handler to complete, so no functional change is needed for that path. Verified: builds clean with the aarch64 cross-compiler, passes checkpatch.pl, and was regression-tested with live mailbox traffic on AX3005. Fixes: 14af7a96afa3 ("mailbox: add Axiado AX3005 mailbox driver") Signed-off-by: Swark Yang Signed-off-by: Jassi Brar Signed-off-by: Sasha Levin commit 5ed5c1da38d5b9ac55f3f19161a272405413dfd7 Author: Linus Walleij Date: Sat Oct 10 00:58:53 2026 +0200 dmaengine: ste_dma40: Preserve the LCPA I/O address space [ Upstream commit 42c31fec1ca76b8b5f7759def122d418dff2cd4b ] The LCPA area is mapped with devm_ioremap(), but lcpa_base and the per-channel lcpa pointer lack __iomem annotations. This loses the I/O address space and makes sparse warn when d40_current_addr() assigns LCPA register addresses to its __iomem pointers. Annotate both pointers and the LCPA argument of d40_log_lli_lcpa_write() to preserve the I/O address space from the mapping to the register accessors. This also fixes the existing LCPA read and write warnings without changing the generated code. Fixes: c80edceff29e ("dmaengine: ste_dma40: Fix cyclic transfer residue") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202610090216.pjMRxhRL-lkp@intel.com/ Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20261010-dma40-smatch-fix-v1-1-26ca10043957@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 575b718df8d6475bb0cb94cf7f5f1599c23c2235 Author: Sang-Hoon Choi Date: Fri Oct 9 18:16:18 2026 +0300 xhci: dbc: lock the minor IDR on registration failure [ Upstream commit 47f4e983b5de7616fb11d5f537fc9a605387d136 ] dbc_tty_minors is protected by dbc_tty_minors_lock when entries are allocated and during normal device removal. The registration error path removes an entry without taking that lock. Different DbC instances have separate event work items, so this removal can race with an IDR update for another instance. Take the same mutex around the error-path removal. Fixes: e1ec140f273e ("xhci: dbgtty: use IDR to support several dbc instances.") Reported-by: Changyul Lee Assisted-by: LLM Signed-off-by: Sang-Hoon Choi Signed-off-by: Mathias Nyman Link: https://patch.msgid.link/20261009151624.618967-6-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 2c0739022e29779cb03b47da26db450e41380847 Author: Kumar Kartikeya Dwivedi Date: Wed Sep 30 08:35:19 2026 +0000 bpf, riscv: Fix stack-passed arguments for indirect trampolines [ Upstream commit b4a1ecae94ae803fcd75fb16a7653ff86b64ed8b ] store_args() reads stack-passed arguments relative to FP assuming the trampoline was entered through the fentry call from a traced function. In that path, the trampoline pushes the parent frame before establishing its final FP, so the incoming stack arguments start at FP + 16. An indirect trampoline for a struct_ops callback is called through a function pointer. Its prologue allocates only the trampoline frame and sets FP to the incoming SP. The RISC-V ABI places the first stack argument at that incoming SP, so the arguments start at FP, not FP + 16. Every stack-passed argument of a callback with more than eight argument slots is therefore read two slots late. Pass the prologue-dependent offset to store_args(), using zero for a direct struct_ops trampoline and 16 for the fentry path. Fixes: 6801b0aef79d ("riscv, bpf: Add 12-argument support for RV64 bpf trampoline") Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Pu Lehui Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260930083522.1914145-2-pulehui@huaweicloud.com Signed-off-by: Sasha Levin commit a6f4d3fc198f8ba5fbffb3421b98c889968db7bc Author: Jacob Moroni Date: Tue Oct 6 15:29:08 2026 +0000 RDMA/core: Clear driver_udata before destroying objects in rdma_core [ Upstream commit d37e98844afea39a9614cac0de837701263c90f7 ] When uobject creation fails while copying user output data (i.e., after the HW object has been created), it calls rdma_alloc_abort_uobject() with hw_obj_valid=true which then invokes the object's destroy callback, but passes the uverbs_attr_bundle from the original creation command. The issue is that drivers are expected to validate the udata and return an error if there's unexpected content, and data from the wrong command counts as "unexpected content", so this ends up causing the driver's destroy call to fail. A similar issue exists in the rereg_mr path when a new MR is created and the old one is destroyed. Fix this by clearing driver_udata before invoking the driver's destroy method. Fixes: 6e0954b11c05 ("RDMA/uverbs: Allow drivers to create a new HW object during rereg_mr") Fixes: 0ac8903cbbe6 ("RDMA/core: Allow the ioctl layer to abort a fully created uobject") Signed-off-by: Jacob Moroni Link: https://patch.msgid.link/20261006152908.888059-1-jmoroni@google.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d74fa007d9aa8d0aeb8063230d370364f3bd5f5e Author: Quanye Yang Date: Mon Oct 5 02:01:15 2026 -0700 RDMA/rtrs-clt: Fix recv repost to satisfy ib_drain_rq [ Upstream commit 3255d6b83491574b115806ec958d8f6ca090fa9c ] On disconnect the client error recovery path calls ib_drain_qp(), which requires one free RQ slot and that no recv WQEs are posted while the queue is being drained. When the server is loaded with always_invalidate=N, the path does not advertise RTRS_MSG_NEW_RKEY_F. A client-requested invalidation is then a standalone SEND_WITH_INV. The recv completion path did not repost that WQE; it posted two empty recv WQEs later, when the RDMA-with-IMM response carried RTRS_IO_RSP_W_INV_IMM. If the invalidate receive never arrived, each such response increased RQ occupancy by one until ib_post_recv() started returning -ENOMEM and __ib_drain_rq() failed with: failed to drain recv queue: -12 Repost one empty recv WQE for every receive completion, including SEND_WITH_INV completions on the always_invalidate=N path, and only while the path is still connected so CQ polling cannot race with ib_drain_qp(). Size IO connection RQs to 2 * queue_depth + 1 to match the posted recv count and leave the drain slot. Tested with a synthetic RTRS client flooding unpaired RTRS_IO_RSP_W_INV_IMM messages; error recovery no longer triggers __ib_drain_rq() warnings. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Signed-off-by: Quanye Yang Link: https://lore.kernel.org/linux-rdma/CA+0ovCihE2_pxLimjmmR8NMz4g-ie8dvvq1jmAj-Om33y3Vzfg@mail.gmail.com Link: https://patch.msgid.link/20261005-rtrs-fix-ib-drain-rq-v2-1-35535a3ed115@proton.me Tested-by: Quanye Yang Reported-by: Farhad Alemi Acked-by: Jack Wang Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 8eb707581c179dbcbceef704c6a46e54645eea2a Author: Maksim Krasutski Date: Sat Oct 10 20:53:35 2026 +0200 ALSA: hda/realtek: Fix mute LEDs on HP ENVY 17-cr1xxx [ Upstream commit dd83323e4d5e22bd04f7506a9ec33533465c8393 ] The HP ENVY Laptop 17-cr1xxx with subsystem ID 103c:8be8 uses an ALC245 codec and two CS35L41 I2C speaker amplifiers. Its existing quirk configures the amplifiers but does not enable the speaker and microphone mute LED handlers. Select ALC287_FIXUP_CS35L41_I2C_2_HP_MUTE_LEDS to retain the amplifier setup and enable both mute indicators. The equivalent change was tested on an HP ENVY 17-cr1xxx running Kubuntu 26.04.1 with kernel 7.0.0-38-generic. Both keyboard mute indicators were confirmed working. Fixes: aa8e3ef4fe53 ("ALSA: hda/realtek: Add quirks for various HP ENVY models") Assisted-by: LLM Signed-off-by: Maksim Krasutski Link: https://patch.msgid.link/20261010185335.30949-1-krasutskimaksim@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 95ab3754b3f1f76bd359d4ff13ac864dac387958 Author: Ali Ahmet Memiş Date: Sun Oct 11 01:25:40 2026 +0300 ALSA: seq: Wait for one RCU grace period when deleting all ports [ Upstream commit 7ca1731b8a129cafe258c578fa87b7c414c6d004 ] Since the port list was converted to RCU, snd_seq_delete_all_ports() calls synchronize_rcu() once per port under register_mutex. Closing a client with 254 ports now takes about 1.6s and every other client open or close waits for it. Unlink all ports first, wait for a single grace period and then free them. Fixes: 4c252fbc06d6 ("ALSA: seq: Use RCU for the client port list") Signed-off-by: Ali Ahmet Memiş Link: https://patch.msgid.link/20261010222543.1470723-1-aliamemis@disroot.org Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 18e0eba1eee89274b5e2e2f85de41420a6cbfa5f Author: Kees Cook Date: Sat Oct 10 01:19:11 2026 -0700 kbuild: Mark the initcall ordering recipe as recursive [ Upstream commit ae5f6044c4cdffe2b3361b15c1d6fc67b339f2a4 ] generate_initcall_order.pl, which orders initcalls for Clang LTO, forks a child per input file, up to the job count scripts/jobserver-exec passes it in PARALLELISM. It used to run from link-vmlinux.sh, which the top-level Makefile invokes as a recursive recipe, but commit 5d45950dfbb15 ("kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o") moved it into a recipe without "+". GNU Make passes the jobserver pipe only to recipes it treats as recursive, and the make 4.3 in CentOS Stream 9 also hides it in sub-makes (a backport of the fix for GNU Make bug 58232), so jobserver-exec cannot open it and prints: WARNING: Unable to reopen jobserver read-side pipe: FileNotFoundError(2, 'No such file or directory') PARALLELISM is then left unset, and the script caps its children at the number of online CPUs instead of the free job slots. Mark the recipe as recursive again (this makes "make -n" runs the script again too, as it did from link-vmlinux.sh). Masahiro posted the same change and withdrew it because the script was given only vmlinux.a, and so never ran more than one child [1]. But on arm64, LoongArch, and RISC-V with CONFIG_EFI_STUB, KBUILD_VMLINUX_LIBS also gives it the EFI stub's lib.a. Either way, the warning is silenced. Tested ARCH=x86_64 defconfig with CONFIG_LTO_CLANG_THIN=y, LLVM=1 (Clang 24.0.0git), and GNU Make 4.3 plus CentOS Stream 9's make-4.3-cloexec.patch. Fixes: 5d45950dfbb15 ("kbuild: move vmlinux.o link to scripts/Makefile.vmlinux_o") Link: https://lore.kernel.org/all/CAK7LNARCM=rUm8mA8GRQ7ufeyfneGf4OEvHmESKt=zuxs2KrHw@mail.gmail.com/ [1] Assisted-by: LLM Reviewed-by: Nicolas Schier Signed-off-by: Kees Cook Tested-by: Paul E. McKenney Link: https://patch.msgid.link/20261010081914.540611-2-kees@kernel.org Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 2307764c285c37c732b75123f06dc0c437f0d3ec Author: Rahul Pon Date: Thu Oct 1 00:08:39 2026 +0530 drm/msm/a8xx: report the GMEM size of the active slices [ Upstream commit efbda69d92e6a4822c5f2d09910f547872a9498d ] A8xx GPUs split GMEM evenly between their slices, and parts can have slices fused off: a8xx_gpu_get_slice_info() reads the active slice mask and folds the slice count into the chip ID. The GMEM size reported to userspace (MSM_PARAM_GMEM_SIZE) is still the catalog value for all slices, so on a part with fused-off slices userspace would size its tiles and place its CCU caches past the end of the GMEM that exists. Qualcomm's downstream driver reports GMEM for the active slices: gen8_get_gmem_size() in KGSL divides the GMEM size by the number of physical slices and multiplies it by the number of active ones. Do the same when reading the slice mask. The GMEM protection and UCHE setup still cover the full range, as in KGSL. Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support") Signed-off-by: Rahul Pon Patchwork: https://patchwork.freedesktop.org/patch/757560/ Message-ID: <20260930183840.1171-1-theflyingrahul@gmail.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit 92bc0e5851fb7d575765b5100b0bab6b57357c75 Author: Binglei Wang Date: Thu Oct 1 14:01:31 2026 +0800 erofs: fix xattrs handling when metadata compression is used [ Upstream commit 6b722cefbf83558af07586ca94cdb4b370d5a82d ] erofs_bread() reuses a cached folio on page index match without checking folio->mapping. xattr.c calls erofs_init_metabuf() twice on the same buffer without erofs_put_metabuf(); the two in_metabox sources differ, so buf->mapping can switch while buf->page still belongs to the old address_space. The next erofs_bread() then reads the wrong mapping, dropping shared xattrs with METABOX. We require folio->mapping == buf->mapping in the reuse check; otherwise drop the cached folio and re-read via the slow path. Fixes: 414091322c63 ("erofs: implement metadata compression") Cc: Bo Liu (OpenAnolis) Signed-off-by: Binglei Wang Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Signed-off-by: Gao Xiang Signed-off-by: Sasha Levin commit cac68ace7b7c6bd695f31d614c2cd980d9287a2f Author: Matthew Wood Date: Fri Oct 9 10:37:59 2026 -0700 bpf, arm64: Fix racy plt target update in bpf_arch_text_poke() [ Upstream commit 6335e6719fd323c345427b7cf2d5d17c28fdbc41 ] When a long-jump trampoline is attached to or detached from a bpf prog, bpf_arch_text_poke() updates the plt target at the end of the prog by temporarily making the page writable: set_memory_rw(page); WRITE_ONCE(plt->target, plt_target); set_memory_ro(page); Since commit 1dad391daef1 ("bpf, arm64: use bpf_prog_pack for memory management"), bpf progs are allocated from the bpf prog pack, so unrelated progs and their plts commonly share a page. The sequence above is not serialized against other pokers, it runs before text_mutex is taken and callers only hold the lock of the trampoline being updated. Two CPUs attaching to or detaching from different target progs in the same page can therefore race: CPU A CPU B set_memory_rw(page) set_memory_rw(page) WRITE_ONCE(plt_B->target, ...) set_memory_ro(page) WRITE_ONCE(plt_A->target, ...) <- permission fault This was hit on an arm64 server with 64K pages while attaching fentry programs to bpf progs: Unable to handle kernel write to read-only memory at virtual address ffff80008f46d5f8 ESR = 0x000000009600004f FSC = 0x0f: level 3 permission fault pte=00c00200ea5a0783 Internal error: Oops: 000000009600004f [#1] SMP pc : bpf_arch_text_poke+0x214/0x238 lr : bpf_arch_text_poke+0x200/0x238 Call trace: bpf_arch_text_poke+0x214/0x238 (P) __bpf_trampoline_link_prog+0x1c8/0x470 bpf_trampoline_link_prog+0x64/0x90 bpf_tracing_prog_attach+0x318/0x4a8 bpf_raw_tp_link_attach+0x104/0x258 bpf_raw_tracepoint_open+0x6c/0x90 __sys_bpf+0x134c/0x3e10 Rather than serializing the permission changes, stop changing page permissions altogether and write the plt target with aarch64_insn_write_literal_u64(). It writes through the text patching fixmap under patch_lock, the same way the rest of the prog pack is written, and performs a single-copy atomic 64-bit store. The plt target is naturally aligned (see build_plt()), so CPUs concurrently executing the plt still observe either the old or the new target. This is the same helper ftrace and static calls use to update 64-bit literals that are loaded concurrently. Fixes: 1dad391daef1 ("bpf, arm64: use bpf_prog_pack for memory management") Signed-off-by: Matthew Wood Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261009173802.1248441-1-thepacketgeek@gmail.com Signed-off-by: Sasha Levin commit 80a72fea12e77f902862b559d69752c6a5d83503 Author: Maxim Skokov Date: Fri Oct 9 20:47:47 2026 +0300 bpf: test_run: Fix false -EBADMSG after skb leaves CHECKSUM_COMPLETE [ Upstream commit 36edb1c7738dade8ed83ec4e0aef000e538b2095 ] With BPF_F_TEST_SKB_CHECKSUM_COMPLETE, bpf_prog_test_run_skb() computes skb->csum over the packet from the network header to the end and marks the skb CHECKSUM_COMPLETE. After the program has run, it recomputes the checksum and returns -EBADMSG if it does not match skb->csum. bpf_skb_change_tail() resizes the skb with __skb_trim_rcsum() and __skb_grow_rcsum(), which move a CHECKSUM_COMPLETE skb to CHECKSUM_NONE and leave skb->csum as it is. The post-run check still compares against that stale value, so a correct program fails with -EBADMSG. After a trim, skb->csum still covers the removed bytes. After a grow, later writes cannot update skb->csum, even with BPF_F_RECOMPUTE_CSUM, because skb->csum is only adjusted for CHECKSUM_COMPLETE skbs. skb->csum only holds the packet checksum while ip_summed is CHECKSUM_COMPLETE. With CHECKSUM_NONE the stack does not rely on it and validates the packet in software, so there is nothing to compare. Only do the check if the skb is still CHECKSUM_COMPLETE after the run. A program that keeps the skb CHECKSUM_COMPLETE but leaves skb->csum stale still gets -EBADMSG. Dropping the checksum offload is documented behaviour of bpf_skb_change_tail() ("implicitly linearizes, unclones and drops offloads"), and the stack does the same in other places, for example skb_forward_csum(). The test harness has to accept CHECKSUM_NONE either way, whether or not the helper is later taught to keep CHECKSUM_COMPLETE. Fixes: a3cfe84cca28 ("bpf: Add CHECKSUM_COMPLETE to bpf test progs") Signed-off-by: Maxim Skokov Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261009174755.22026-2-skokovmaksimevg@gmail.com Signed-off-by: Sasha Levin commit caf242ac6baa068b95e36bdd0e5a278d480d9dc3 Author: Chukun Pan Date: Sat Oct 10 18:00:00 2026 +0800 arm64: dts: rockchip: remove FRL GPIO for 100ASK DshanPi A1 [ Upstream commit 99feb764fa6c3b260e03903f5d30e15428fedc08 ] According to the schematic [1], the 100ASK DshanPi A1 board does not have an hdmi_tx_on_h pin, so removed the non-existent FRL GPIO. [1] https://dl.100ask.net/Hardware/MPU/RK3576-DshanPi-A1/DshanPi-A1-RK3576-SCH_V1.1.pdf Fixes: 2cd97880fbc4 ("arm64: dts: rockchip: Add frl-enable-gpios to rk3576 boards") Signed-off-by: Chukun Pan Link: https://patch.msgid.link/20261010100000.2236931-1-amadeus@jmu.edu.cn Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit a74e097b78b886b1f9e3441fcfc55e4b0420f124 Author: Takashi Iwai Date: Fri Oct 9 15:33:39 2026 +0200 ALSA: hda: Add NULL check for the driver pointer at unsol event work [ Upstream commit 8cbf75d115e97b7f5ba7859d30d0ce74d1af6c19 ] snd_hdac_bus_process_unsol_events() assumes that the codec driver is always set when it's accessible from the codec table. It's true in general, but in a sheer timing, it might have been already NULLified at the driver unbinding. Although the codec removal should have been done properly by the previous fixes, just for more safety, let's add a NULL check before dereferencing and calling the driver's unsol_event callback. Fixes: e7255c00b10e ("ALSA: hda: Skip event processing for unregistered codecs") Link: https://patch.msgid.link/20261009133341.440917-6-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 4709c30bf793797de0b4d8317e99e79698e98574 Author: Takashi Iwai Date: Fri Oct 9 15:33:38 2026 +0200 ALSA: hda: Stop unsol event and jack polling at hda-ext device removal, too [ Upstream commit 66530fbe5252eef5e5386a894804c62e10ecfdea ] In the recent commit f3607b6952ca ("ALSA: hda: Stop unsol events and jack polling before codec unbind"), we applied the workaround to stop pending works at the hda codec driver removal, but it was applied after the bypass for hda-ext ops hdev_detach. Basically the same issue is seen for hda-ext stuff, so it's safer to apply the workaround at the beginning of hda_codec_driver_remove(). Along with it, the clearance of unsol_disabled flag is moved to the beginning of hda_codec_driver_probe(), too; otherwise hda-ext hdev_attach() might miss the unsol event handling when the code gets re-bound. Fixes: f3607b6952ca ("ALSA: hda: Stop unsol events and jack polling before codec unbind") Link: https://patch.msgid.link/20261009133341.440917-5-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit f0c4e3f2a25b4a856f688b366b5964bc19d87ece Author: Takashi Iwai Date: Fri Oct 9 15:33:36 2026 +0200 ALSA: hda: Disable unsol event handling at error and shutdown paths [ Upstream commit 7a78c18bffc6e09016720681d791b799feb61783 ] When the HD-audio controller driver probe fails, it still leaves the unsolicited event handling and jackpoll work active, hence if they are pending, they might fire up later after the resource gets released, which may lead to a UAF. A similar problem may be seen at shutdown, too. Add the recently added helper to disable unsol events and the cancel of jackpoll_work at the appropriate places. We need the workaround in the error path before driver->ops->remove, too. As unsol events and jack polling may have been already enabled during the probe callback, the driver->ops->remove call is done (more) conditionally now. Fixes: c3ec8ac82105 ("ASoC: hdac_hda: fix memleak on module unload") Reported-by: Sashiko Link: https://patch.msgid.link/20261009133341.440917-3-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit e651c7dea72ba4b2c90769022eaf9694d784739d Author: Takashi Iwai Date: Wed Oct 7 23:56:46 2026 +0200 ALSA: hda: Stop unsol events and jack polling before codec unbind [ Upstream commit f3607b6952ca9a5638eeef4f301daa7933ce24b1 ] At unbinding a codec driver, hda_codec_driver_remove() calls the codec's remove callback that releases the driver resources, followed by snd_hda_codec_cleanup_for_unbind(). Meanwhile, the unsolicited events are processed asynchronously in bus->unsol_work, and snd_hdac_bus_process_unsol_events() checks only codec->registered flag before calling the driver's unsol_event callback without the lock. Since codec->registered is cleared only in snd_hda_codec_cleanup_for_unbind(), and there is no flush of the unsol work at unbinding, the unsol event handler may run concurrently during the running remove callback, which may lead to a UAF. The same problem applies to the jack polling work, which is canceled only after the remove callback. For addressing those races, introduce a new flag unsol_disabled to hdac_device, to be checked it in the unsol event worker, while a new helper snd_hdac_device_disable_unsol() sets this flag and flushes the pending unsol work. The helper is called at hda_codec_driver_remove() together with the cancel of jackpoll_work to assure that no asynchronous jack handling can run. The flag is cleared again at probing the codec driver, while the events are still blocked by the registered flag until the codec gets registered. Reported-by: Sashiko Assisted-by: LLM Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007215650.159871-2-tiwai@suse.de Stable-dep-of: 7a78c18bffc6 ("ALSA: hda: Disable unsol event handling at error and shutdown paths") Signed-off-by: Sasha Levin commit 9c0aeae576cd22f31c12c22e78a81fa29c505c66 Author: Tony Luck Date: Fri Oct 9 12:39:23 2026 -0700 fs/resctrl: Ensure default group reports tasks on monitor-only systems [ Upstream commit 2c10b3fa5bdf61e344bc522e6c2e00d870ce7ab8 ] resctrl can be mounted on a system that supports monitoring but not allocation. On such a system reading the "tasks" file in the default group reports no tasks, even when there are tasks assigned to the default group. This problem occurs because the check for whether a task belongs to a CTRL_MON group is gated by a check for whether the system supports allocation. The resctrl_arch_alloc_capable() check in is_closid_match() breaks task reporting for the default group on monitor-only systems so remove this check. On systems that support allocation the check is redundant. Fixes: e6b2fac36fcc ("x86/resctrl: Use is_closid_match() in more places") Closes: https://sashiko.dev/#/patchset/20260831174421.13921-1-tony.luck%40intel.com?part=9 Reported-by: Sashiko Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://patch.msgid.link/20261009193923.15498-1-tony.luck@intel.com Signed-off-by: Sasha Levin commit 6d5c028544d32032d244378cc4ccceec09961553 Author: Guixin Liu Date: Thu Oct 8 11:46:14 2026 +0800 cxl/pci: Update only the Port GPF timeout fields [ Upstream commit b5d14009bdb1973d54a6ea111a660b3dae115be5 ] update_gpf_port_dvsec() rebuilds the phase control register from just the timeout base and scale, so the rest of the register is cleared by the write. The other bits are reserved today and nothing is lost, but the full-register rewrite would clobber any field the spec defines there later. Read-modify-write the register and change only the two timeout fields. Fixes: a52b6a2c1c99 ("cxl/pci: Support Global Persistent Flush (GPF)") Assisted-by: LLM Signed-off-by: Guixin Liu Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20261008034619.28059-4-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 75a9f9da262c73a2d22bccbe13671aa6d2affa0c Author: Dave Jiang Date: Thu Oct 1 08:47:44 2026 -0700 cxl/port: Attach endpoints to a dport under the lock that pins it [ Upstream commit bcda00c78d075340fe30cb6c980507fac711e7d1 ] devm_cxl_enumerate_ports() and add_port_attach_ep() look up or create a dport under its port's device lock, drop the lock, then pass the dport to cxl_add_ep(). add_ep() reads dport->port before taking the lock, and cxl_gpf_port_setup() reads and writes the dport with no lock held. A concurrent cxl_detach_ep() for another memdev below the same port can free the dport in that window: it calls del_dports() under the port lock when the last endpoint leaves. The enumerating memdev then dereferences freed memory. Attach the endpoint and set up GPF while the port lock from the lookup is still held. Make add_ep() assert that lock instead of taking it. Under the lock, a dport found in port->dports is still live, since removal erases it from the xarray before freeing it. [ dj: Added kdoc update from Alison. ] Fixes: de516b40116e ("cxl/port: Record dport in endpoint references") Reported-by: Li Ming Closes: https://lore.kernel.org/linux-cxl/0c68324c-cfc7-46b2-9344-24ae40e88923@zohomail.com/ Assisted-by: LLM Reviewed-by: Li Ming Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20261001154744.1095902-4-dave.jiang@intel.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 5224ef91eaf0f84cc323e7701d24a1e7748d106c Author: Dave Jiang Date: Thu Oct 1 08:47:43 2026 -0700 cxl/core: Hold the dport host lock across dport lookup and use [ Upstream commit b72a03ebd9586d59992ecaa6ceed11ea96835734 ] Callers of cxl_pci_find_port() and cxl_mem_find_port() can be handed a 'struct cxl_dport' that is already freed, and all four dereference it without the lock that would prevent that. A dport is kzalloc()'d into a devres group on its host device, so it dies when that host unbinds. The host is &port->dev for a switch port and port->uport_dev for the root port. Both helpers return the dport through an output parameter. The caller's port reference pins struct cxl_port, not the dport allocation, and the lookup itself is a bare xa_load() under no lock. Add cxl_port_dport_host() to name the device that pins a dport, and cxl_pci_find_dport() / cxl_mem_find_dport() to look one up with that device's lock held and asserted. Convert the four callers to use them and bail if the dport is gone. cxl_port_add_dport() already follows this rule. cxl_mem_probe() chose its endpoint devm host from dport->rch, which meant dereferencing the dport before taking any lock. Use cxl_port_dport_host(): rch dports only ever land on the root port, so it selects the same device without needing the dport. With every caller converted, the dport output parameter of cxl_pci_find_port() and cxl_mem_find_port() is unused. Drop it. Fixes: 733b57f262b0 ("cxl/pci: Early setup RCH dport component registers from RCRB") Assisted-by: LLM Reviewed-by: Li Ming Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20261001154744.1095902-3-dave.jiang@intel.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 2591892f8189f98f92a0ad745caf6c3db67545f7 Author: Ting-Han Hou Date: Tue Oct 6 08:19:54 2026 -0700 scripts/make_fit: Ignore schema checks when decomposing DTBs [ Upstream commit 3bf2237f59af842e546fa4b2c146198db95d1519 ] With CHECK_DTBS enabled, Kbuild appends a schema validation command to the fdtoverlay command saved in a composite DTB's .cmd file. When DTB decomposition is requested, process_dtb() treats every word after -i as an input file, including the semicolon and the validator arguments. FIT generation then fails with FileNotFoundError while opening or checking the size of those words as files. Limit the input list to the fdtoverlay command before extracting its arguments. This preserves the base DTB and overlay order and ignores the subsequent schema validation command. Fixes: 17c31aded9a1 ("scripts/make_fit: Support decomposing DTBs") Assisted-by: LLM Signed-off-by: Ting-Han Hou Reviewed-by: Simon Glass Link: https://patch.msgid.link/CA+NtrhQBK8uW32qO3dXxVxO1GSN-0EJfyJ16tnyx0o52T17WtQ@mail.gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit d2392499c820d8d0c53ed7dde8097f4ed92e4801 Author: Ting-Han Hou Date: Sat Oct 10 01:58:32 2026 +0800 clang-tools: Import os for broken pipe handling [ Upstream commit d26ab84593e63bc5395ed9b518502830fda3367c ] The BrokenPipeError handler in run-clang-tools.py calls os.open() and os.dup2() without importing os. If this handler is reached, it raises NameError instead of redirecting stdout and exiting with status 1. Import os so the handler can work as intended. Fixes: 87c7ee67deb7 ("scripts: handle BrokenPipeError for python scripts") Assisted-by: LLM Signed-off-by: Ting-Han Hou Link: https://patch.msgid.link/20261009175836.2277-1-ue081723@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 95b605661bcdfadb125ab1539143c91411320248 Author: Leizhen Zhang Date: Thu Oct 8 11:45:21 2026 -0500 kconfig: fix infinite loop in conf_choice() when no choice value is visible [ Upstream commit 52f26261e27dbdb7c6dea75d8f1a92ea805b2c58 ] If a choice is visible but none of its choice values is, conf_choice() counts cnt == 0 visible values and finds no default. When the choice has to be asked, e.g. because a new symbol was added to the same menu (oldconfig, syncconfig) or because stdin is at EOF (oldaskconfig), the loop that maps the answer to a menu entry never finds one and the while (1) loop repeats forever, printing "choice[1-0?]: 0" each time. This happens in the tree for s390 when the compiler supports none of the -march=z* options (e.g. a non-s390 host compiler), so that all values of the "Processor type" choice are invisible: $ make ARCH=s390 defconfig $ sed -i '/^CONFIG_NR_CPUS=/d' .config $ make ARCH=s390 oldconfig # hangs Before the removal of tristate choice support, conf_choice() returned early in this case. Do the same when there is no visible choice value. Found by fuzzing Kconfig input with ASan/UBSan. Fixes: fde192511bdb ("kconfig: remove tristate choice support") Assisted-by: Claude:claude-opus-5-5 libFuzzer Signed-off-by: Leizhen Zhang Reviewed-by: Julian Braha Tested-by: Julian Braha Link: https://patch.msgid.link/20261008164521.3684735-1-lzsx618@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit c76356ccbd9058b17e44806f135728d443f031f5 Author: Eduard Zingerman Date: Fri Oct 9 03:47:39 2026 -0700 bpf: Save DFS postorder numbers for program instructions [ Upstream commit f414d20879ae1bac413619b8352701a7da2a1c0e ] Dominator intersections and SCEV worklist scheduling need to compare instructions by their DFS postorder rank. Save per-instruction postorder numbers alongside the existing postorder sequence. This commit modifies bpf_compute_postorder() to actually do the DFS traversal, instead of scheduling traversal of all siblings at once. Consider a graph: A -> B A -> C C -> B Old result: C, B, A DFS result: B, C, A Fixes: efcda22aa541 ("bpf: compute instructions postorder per subprogram") Signed-off-by: Eduard Zingerman Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261009-scev-minimal-rebase-v3-21-bcba9bc53ac9@gmail.com Signed-off-by: Sasha Levin commit 8a13ded782dd40f15fea22b74c3fc5a4cc200503 Author: Eduard Zingerman Date: Fri Oct 9 03:47:27 2026 -0700 bpf: Fix arg_track_xfer() for atomic stack spills and fills [ Upstream commit 13cffb88318085117c988106d4f5e439646f3ba6 ] Track spilled stack pointers through 64-bit atomic accesses: - BPF_STORE_REL spills the source register. - BPF_LOAD_ACQ restores the spilled value into dst_reg. - BPF_XCHG and BPF_{ADD,AND,OR,XOR} | BPF_FETCH restore it into src_reg. - BPF_CMPXCHG restores it into R0. This prevents missing stack accesses through pointers recovered by these instructions, matching the main verifier's spill/fill behavior. Fixes: bf0c571f7feb ("bpf: introduce forward arg-tracking dataflow analysis") Signed-off-by: Eduard Zingerman Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261009-scev-minimal-rebase-v3-9-bcba9bc53ac9@gmail.com Signed-off-by: Sasha Levin commit 7ebe937d0a3751e90a98e69a82d4006b644a93ae Author: Kumar Kartikeya Dwivedi Date: Thu Sep 24 18:57:08 2026 +0200 bpf: Size liveness stack masks by the stack each frame uses [ Upstream commit 481ceda77aeb180022a3ab1e17a9929bcad353c9 ] Stack liveness tracks three masks of 4-byte stack slots - may_read, must_write and live_before - for every instruction of every frame of every function instance. Each mask used to be a fixed 128-bit spis_t, wide enough for the deepest frame MAX_BPF_STACK allows, so an instruction paid 48 bytes per frame no matter how little stack the frame actually touched. These per instruction arrays are the largest liveness allocation: a 40k instruction program spends ~2 MiB on each frame array. Sizing them for a larger stack budget would multiply that cost for every program, while most frames use a fraction of the budget. Replace the fixed masks with a variable width bitmap array per (instance, frame). struct frame_masks holds the width shared by all of its masks in @words plus a flat unsigned long array, where mask @kind of the instruction at relative index @i lives at &bits[(i * FM_MASK_CNT + kind) * words]. An array starts at the width the first recorded half-slot needs (minimum one word, that is 256 bytes of stack with 64-bit words) and is reallocated into a wider stride once a deeper half-slot shows up. Only the marking functions widen an array, and they all run during the static analysis before do_check(), so no verification time path can move one. The marking API now takes an inclusive half-slot range, which is what record_stack_access_off() computed anyway, and clamps the upper end to the deepest half-slot a frame can have. An access below the stack bound is rejected by the main verifier pass later; liveness only has to stay inside the masks. A range that covers no whole half-slot, as a byte store at fp-1 produces, marks nothing. A "read everything" mark, used for calls that are neither helpers nor kfuncs and for pointers whose offset or frame identity was lost, widens the array to the maximum width and sets every bit: recorded at a narrower width it would lose the half-slots a later widening adds, and no write can cancel it as no write covers the whole frame. A half-slot past the width of the masks was never read by the frame and is never live. merge_instances() may see a different width on each side, so it widens dst to cover src and counts a word only dst has as zero on the src side, which unions into may_read as a no-op and intersects must_write to empty, never claiming a write that did not happen. The rest is mechanical: update_insn() propagates live_before word by word over the array's width (all instructions of one array share it, hence so do an instruction's successors), is_live_before() answers false past the width, and the use:/def: log printing iterates up to the width. Liveness results are unchanged. A half-slot only ever gets a bit from a recorded access and recording one widens the array to cover it, so every bit the fixed masks could hold still fits. Frames whose deepest recorded half-slot fits in a single word now cost 24 bytes per instruction per frame instead of 48. The spill tracker that feeds the analysis had the same limit built in: it followed 64 slots, fp-8 to fp-512, per subprog, and a fill from a deeper slot returned an imprecise pointer, so every later access through it counted as a read of the whole stack of every frame. Let it follow the deepest 8-byte access a subprog makes directly through R10 when that reaches past those 64 slots, which is how spills and fills are compiled, and keep the count with the per-callsite snapshot a callee uses to fill from its caller's frame. Programs within 512 bytes are tracked exactly as before; a program spilling deeper stays precise. Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924165740.2146806-8-memxor@gmail.com Stable-dep-of: 13cffb883180 ("bpf: Fix arg_track_xfer() for atomic stack spills and fills") Signed-off-by: Sasha Levin commit 316cf5ff48280102bc29f40fcc7bdd70b36ae2cb Author: Kumar Kartikeya Dwivedi Date: Thu Sep 24 18:57:03 2026 +0200 bpf: Widen the stack slot index in the jump history [ Upstream commit a9082d8a54c6b68ea4bc3417eda5b22138ac06c0 ] Jump history entries record the stack slot touched by a spill or fill in a 6-bit field, which only fits the 64 slots of a 512-byte frame and is pinned to that size by a static_assert on MAX_BPF_STACK. Move the flags into the first word and give the slot index 12 bits of the second word instead, so the entry stays 16 bytes while frames of up to 32 KiB can be recorded. Introduce MAX_BPF_STACK_SLOTS for the number of 8-byte slots a frame can have and use it for the static_assert and for BPF_ID_MAP_SIZE, so the verifier expresses per-frame capacity through one constant. No functional change. Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924165740.2146806-3-memxor@gmail.com Stable-dep-of: 13cffb883180 ("bpf: Fix arg_track_xfer() for atomic stack spills and fills") Signed-off-by: Sasha Levin commit e3fe5c4a1becfb7b285a91a86cd690958a695111 Author: Jiale Yao Date: Sat Oct 3 17:38:06 2026 +0800 vfio/pci: Drain eventfd RCU callbacks on module exit [ Upstream commit 3b2e9b05011ee74543b6d17401bb02f1df3b93ff ] vfio_pci_eventfd_replace_locked() defers freeing replaced eventfds to vfio_pci_eventfd_rcu_free(). A callback can remain queued after close_device() returns and the device driver module reference is dropped. Once the dependent driver is removed, vfio-pci-core can be unloaded while the callback still points into its module text. Wait for outstanding RCU callbacks before vfio-pci-core exits. Fixes: 98693e0897f7 ("vfio/pci: Use RCU for error/request triggers to avoid circular locking") Signed-off-by: Jiale Yao Link: https://lore.kernel.org/r/20261003093806.544631-1-yaojiale02@163.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit a77870df1b59b2b3a70cd3dc4d76e0b697c40473 Author: Leon Romanovsky Date: Sun Aug 30 14:16:23 2026 +0300 PCI/P2PDMA: Gate the host bridge whitelist warning on verbose [ Upstream commit 36038f0e8377ef316b723d0d85b1510bc64069ab ] calc_map_type_and_dist() prints every other diagnostic under its verbose argument, but reaches the "Host bridge not in P2PDMA whitelist" warning through host_bridge_whitelist(), which it hands acs_redirects instead. A caller that asked for a silent answer still gets the warning whenever any port on the path has an ACS redirect bit set, the CPU is not whitelisted by cpu_supports_p2pdma(), and the host bridge is not in pci_p2pdma_whitelist[]. pci_p2pmem_find_many() is such a caller. It sweeps every device with published p2pmem and asks for the distance to each client with verbose=false, and pci_p2pdma_distance_many() recomputes rather than consulting the map_types cache, so the warning repeats on every sweep. The argument was never meant to say "ACS redirects were found". When commit cf201bfe8cdc ("PCI/P2PDMA: Warn if host bridge not in whitelist") added it, acs_redirects was a bool pointer that the quiet entry point passed as NULL: if (verbose) map = calc_map_type_and_dist_warn(provider, pci_client, &distance); else map = calc_map_type_and_dist(provider, pci_client, &distance, NULL, NULL); so the argument was true on exactly the path that commit describes. Folding the two entry points into one verbose flag turned the pointer into a value and left the call site alone, silently narrowing the warning to paths that carry an ACS redirect. Pass verbose. This also restores the warning for a verbose caller that takes the host bridge route with no ACS redirect on the path, which until now was told it could not use peer-to-peer DMA without being told which vendor and device would have to be added to the whitelist. Fixes: d1b8dc09dd71 ("PCI/P2PDMA: Simplify distance calculation") Signed-off-by: Leon Romanovsky Signed-off-by: Bjorn Helgaas Tested-by: Tushar Dave Reviewed-by: Jason Gunthorpe Reviewed-by: Logan Gunthorpe Link: https://patch.msgid.link/20260830-batch-p2p-fixes-v1-5-5044e8dfbe2e@nvidia.com Signed-off-by: Sasha Levin commit 885b16494808190ae725530e7f5cb8822c142736 Author: Leon Romanovsky Date: Sun Aug 30 14:16:22 2026 +0300 PCI/P2PDMA: Safely terminate ACS redirect lists [ Upstream commit fa291d6429ebc1efb7fab011f643b842ae5f23f1 ] seq_buf marks an overflow by setting len to size + 1. The ACS diagnostic path unconditionally writes a terminator to buffer[len - 1], so a path with enough ACS ports to fill the 128-byte buffer writes one byte beyond the buffer when verbose diagnostics are requested. Use seq_buf_str() to terminate truncated output safely and remove the final semicolon only when the buffer did not overflow. Fixes: 52916982af48 ("PCI/P2PDMA: Support peer-to-peer memory") Signed-off-by: Leon Romanovsky Signed-off-by: Bjorn Helgaas Tested-by: Tushar Dave Reviewed-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Link: https://patch.msgid.link/20260830-batch-p2p-fixes-v1-4-5044e8dfbe2e@nvidia.com Signed-off-by: Sasha Levin commit 210b39b5963cab9b6d78f1311f999a8de508df60 Author: Leon Romanovsky Date: Sun Aug 30 14:16:20 2026 +0300 PCI/P2PDMA: Wait for RCU readers before freeing state [ Upstream commit 1b82c6657e957f598b6e19e045e0bbd5cb370083 ] pci_p2pmem_find_many() scans all PCI devices without locking or protection against driver unbind, including devices with poolless P2PDMA state. pci_has_p2pmem() may observe pdev->p2pdma just before driver unbind clears it, while pci_p2pdma_release() skips the grace period when no pool is present. This allows devres to free the object while it is still in use. Clear the pointer with RCU_INIT_POINTER() and always wait for pre-existing RCU readers before returning. The same grace period continues to protect gen_pool users for pool-backed providers. Fixes: 372d6d1b8ae3 ("PCI/P2PDMA: Refactor to separate core P2P functionality from memory allocation") Signed-off-by: Leon Romanovsky Signed-off-by: Bjorn Helgaas Tested-by: Tushar Dave Reviewed-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Cc: Alex Williamson Cc: Matt Evans Link: https://patch.msgid.link/20260830-batch-p2p-fixes-v1-2-5044e8dfbe2e@nvidia.com Signed-off-by: Sasha Levin commit 29a3a087228b372b9e7ebaf363550e4a1c95ba61 Author: Leon Romanovsky Date: Sun Aug 30 14:16:19 2026 +0300 PCI/P2PDMA: Do not tear down the allocate attribute on registration failure [ Upstream commit 7c4d6505a1f8a1ebe8019b7f988ed494b696653b ] pci_p2pdma_add_resource() installs pci_p2pdma_unmap_mappings() as a devres action with the devres allocated p2p_pgmap as its data, and only then adds the range to the pool: error = devm_add_action_or_reset(&pdev->dev, pci_p2pdma_unmap_mappings, p2p_pgmap); if (error) goto pages_free; p2pdma = rcu_dereference_protected(pdev->p2pdma, 1); error = gen_pool_add_owner(p2pdma->pool, ...); if (error) goto pages_free; The action removes the allocate attribute for the whole device, which tears down existing userspace mappings of every BAR already registered on it. Both failures here get that wrong, in opposite ways. devm_add_action_or_reset() runs the action when it cannot allocate its devres node, so an -ENOMEM while registering a second BAR unmaps the first one. Use devm_add_action() and let the error path unwind only what this call created. gen_pool_add_owner() allocates a chunk and can also fail with -ENOMEM. There the action is registered, and the error path frees p2p_pgmap with devm_kfree() while leaving the action pointing at it. On unbind devres runs the action and pci_p2pdma_unmap_mappings() dereferences p2p_pgmap->mem->owner->kobj, which is freed memory. Give that failure its own label and drop the action with devm_remove_action(), which removes it without running it. Fixes: 7e9c7ef83d78 ("PCI/P2PDMA: Allow userspace VMA allocations through sysfs") Fixes: f58ef9d1d135 ("PCI/P2PDMA: Separate the mmap() support from the core logic") Signed-off-by: Leon Romanovsky Signed-off-by: Bjorn Helgaas Tested-by: Tushar Dave Reviewed-by: Logan Gunthorpe Reviewed-by: Jason Gunthorpe Link: https://patch.msgid.link/20260830-batch-p2p-fixes-v1-1-5044e8dfbe2e@nvidia.com Signed-off-by: Sasha Levin commit 8cd4e521b74cad199c668e1fae0ef459b316c7c4 Author: Marek Szyprowski Date: Wed Sep 30 15:57:32 2026 +0200 dma-direct: Restore arch_dma_alloc() for the DMA_ATTR_NO_KERNEL_MAPPING case [ Upstream commit 5e3bc6b44c8853bcc7782eac122c5baf2d02f399 ] Commit 849facea92fa ("dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling") moved the DMA_ATTR_NO_KERNEL_MAPPING shortcut in dma_direct_alloc() in front of the arch_dma_alloc() call. Architectures providing their own DMA coherent allocator (CONFIG_ARCH_HAS_DMA_ALLOC) therefore no longer see such requests. ARM 32bit is one of such. Lack of the call to arch_dma_alloc() results in the lack of proper cache management on HighMem pages. Take the dma-direct shortcut only for coherent devices or when the architecture doesn't provide arch_dma_alloc(). While touching this, move that check into separate function to avoid duplication in alloc and free paths. Fixes: 849facea92fa ("dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling") Reported-by: Aneesh Kumar K.V Closes: https://lore.kernel.org/all/yq5ams2akznl.fsf@kernel.org/ Assisted-by: Claude Opus 5.5 Link: https://lore.kernel.org/r/20260930135734.1013905-1-m.szyprowski@samsung.com Signed-off-by: Marek Szyprowski Signed-off-by: Sasha Levin commit 18b9c3e923ec963d5dbe8be99372fee53d7501fa Author: Antoni Pokusinski Date: Wed Sep 16 22:51:33 2026 +0200 rtc: abx80x: properly handle shared IRQs [ Upstream commit 632916c7bde35495f2f6776d8e335c3ec6e306ec ] The abx80x RTC driver registers its interrupt handler with IRQF_SHARED, but the handler always returned IRQ_HANDLED and cleared the status register even when no interrupt source from the RTC was active. This could cause the driver to claim interrupts belonging to other devices sharing the same IRQ line and could also clear unrelated status bits in the RTC status register. Only handle the interrupt when the alarm or watchdog flags are set, and clear only those interrupt status bits that were handled. Return IRQ_NONE when the interrupt was not generated by the RTC. Fixes: 718a820a303c ("rtc: abx80x: add alarm support") Signed-off-by: Antoni Pokusinski Link: https://patch.msgid.link/20260916205138.16771-5-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 5c83eeef9344e5538a315edb1f618b99d48b0800 Author: Antoni Pokusinski Date: Wed Sep 16 22:51:32 2026 +0200 rtc: abx80x: add mutex protection for register writes [ Upstream commit 74bff654a4ced9f5fc6bac9931a5d251f7795db4 ] The ABX80X RTC driver performs multi-step register operations such as NVMEM transfers or register writes preceded by a configuration key write. Add a mutex to serialize all the register writes to protect these sequences against race conditions. Signed-off-by: Antoni Pokusinski Link: https://patch.msgid.link/20260916205138.16771-4-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 862735e4fec475f5cda712db6b14972468572cea Author: Antoni Pokusinski Date: Wed Sep 16 22:51:31 2026 +0200 rtc: abx80x: fix error check after i2c_smbus_read in read_alarm() [ Upstream commit 07c57022afb3afc0d7c20efef45a4d3c7389b1c0 ] i2c_smbus_read_i2c_block_data() returns the number of bytes read on success and a negative error code on failure. The existing code treated any non-zero return value as an error. Fix the error handling by checking only for negative return values. Fixes: 718a820a303c ("rtc: abx80x: add alarm support") Signed-off-by: Antoni Pokusinski Link: https://patch.msgid.link/20260916205138.16771-3-apokusinski01@gmail.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 7a17f15df333edae5c8c573bb25f1f2c34e8f794 Author: Qiliang Yuan Date: Thu Oct 8 22:45:40 2026 +0800 selftests: ublk: make the fault_inject delay a pure timeout [ Upstream commit 69ae59173a5668d015ab2733c8628ed542f00ccc ] ublk_fault_inject_queue_io() queues the delay of each I/O as an IORING_OP_TIMEOUT with a completion count of 1. Such a timeout also completes as soon as any other CQE is posted on the ring. With more than one I/O in flight, the completion of one I/O ends the delay of the others, and ublk_fault_inject_tgt_io_done() reports every early completion as "unexpected cqe res 0". Pass a count of 0 so that only the expiry of the timer completes the timeout. fio 4k random reads for 10 s at queue depth 4 on a fault_inject device with --delay_us 1000000: before after expected I/Os 2263170 40 40 mean latency 16.3 us 1.000 s 1 s "unexpected cqe res 0" 2263169 0 0 Fixes: 81586652bb1f ("selftests: ublk: add generic_06 for covering fault inject") Signed-off-by: Qiliang Yuan Reviewed-by: Ming Lei Link: https://patch.msgid.link/20261008-bug-ublk-selftest-fault-inject-delay-v1-2-a96af7ead06e@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit cc7484e81b9c55f015da49d7feb46033d7084b9f Author: Qiliang Yuan Date: Thu Oct 8 22:45:39 2026 +0800 selftests: ublk: don't keep the fault_inject timespec on the stack [ Upstream commit 955cba87d9ed334fbe0b669b35b4abcddd7f9929 ] The fault_inject target delays each I/O with an IORING_OP_TIMEOUT, and generic_06 relies on the delay to kill the server while an I/O is still outstanding. The timespec of the timeout is a local variable of ublk_fault_inject_queue_io(). The SQE only records its address, and io_uring reads it when the SQE is submitted, after the function has returned. The timeout gets whatever the stack holds by then and expires almost at once, so --delay_us has no effect, and generic_06 fails because dd completes before the server is killed. Store the timespec in the per-device fi_opts, and split the delay into seconds and nanoseconds so that delays of a second or more give a valid timespec. fio 4k random reads for 10 s at queue depth 1 on a fault_inject device with --delay_us 1000000: before after expected I/Os 446927 10 10 mean latency 18.3 us 1.000 s 1 s Fixes: 81586652bb1f ("selftests: ublk: add generic_06 for covering fault inject") Signed-off-by: Qiliang Yuan Reviewed-by: Ming Lei Link: https://patch.msgid.link/20261008-bug-ublk-selftest-fault-inject-delay-v1-1-a96af7ead06e@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit c76a12af5b9b88b74d12feffdb070f98f6ad81e4 Author: Leo Cheng Date: Fri Oct 2 11:13:28 2026 +0100 nvmem: layouts: onie-tlv: fix device_node reference leak in error path [ Upstream commit 9d44e80151dd360fad6155f36b6bfa57efb0f2f5 ] onie_tlv_add_cells() takes a reference on the child node via of_get_child_by_name() for each parsed TLV and passes it to nvmem_add_one_cell() as cell.np. On success the created cell entry adopts that reference and releases it later via of_node_put(); on failure nvmem_add_one_cell() does not consume it, so the caller still owns it, but the error path only puts layout before returning, leaking the child node reference. Put cell.np on the error path as well. of_node_put(NULL) is a no-op, so this is safe even when of_get_child_by_name() returned NULL. Fixes: d3c0d12f6474 ("nvmem: layouts: onie-tlv: Add new layout driver") Signed-off-by: Leo Cheng Reviewed-by: Michael Walle Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20261002101329.1084348-4-srini@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 6ccc423a68b3386f7fa3b26ab2d41a4778691071 Author: Leo Cheng Date: Fri Oct 2 11:13:27 2026 +0100 nvmem: layouts: sl28vpd: fix device_node reference leak in error path [ Upstream commit 73bd84aa58ad1fd775d6af2e8445a9456659c445 ] sl28vpd_add_cells() takes a reference on the child node via of_get_child_by_name() for each entry and passes it to nvmem_add_one_cell() as info.np. On success the created cell entry adopts that reference and releases it later via of_node_put() when the entry is torn down; nvmem_add_one_cell() does not take its own reference. On failure it does not consume the reference either, so the caller still owns it, but the error path only puts layout_np before returning, leaking the child node reference. Put info.np on the error path as well. of_node_put(NULL) is a no-op, so this is safe even when of_get_child_by_name() returned NULL. Fixes: d9fae023fe86 ("nvmem: layouts: sl28vpd: Add new layout driver") Signed-off-by: Leo Cheng Reviewed-by: Michael Walle Reviewed-by: Miquel Raynal Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20261002101329.1084348-3-srini@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 26ecca35d1e6115481bcf2c177e72aa18c77d82b Author: Felix Fietkau Date: Wed Oct 7 12:52:49 2026 +0200 wifi: mac80211: use link address as TA for non-MLO 4-addr station on MLD AP [ Upstream commit 07b3eb8b9048976b585d29f1a1df9a435423c473 ] A 4-address AP_VLAN always sets A2 to sdata->vif.addr, which on an MLD AP is the AP MLD address. For a non-MLO station, A2 must be the link address it associated to. Use the link address for a non-MLO station in the 4-address case as well, like the AP case already does in ieee80211_build_hdr() and ieee80211_check_fast_xmit(). Share the address selection between both cases and both TX paths. Fixes: 3e0278b717b0 ("wifi: mac80211: select link when transmitting to non-MLO stations") Signed-off-by: Felix Fietkau Link: https://patch.msgid.link/20261007105249.1234601-1-nbd@nbd.name [use guard] Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 9863f60feffbcc450e6d239ce590deb7ef8c9c15 Author: Johannes Berg Date: Tue Oct 6 12:03:59 2026 +0200 wifi: cfg80211: reg: protect regdb pointer with RCU [ Upstream commit 298618f28bd3d1da677828354b504c12e2f375e4 ] reg_query_regdb_wmm() is only used by iwlwifi, but even when it was introduced was already broken, as it reads the global db without any locking (drivers can't really guarantee any). Certainly iwlwifi doesn't since it calls it for FW messages. Therefore, it can race against regdb updates. The function uses a local pointer, but doesn't help. Use RCU to protect the regdb pointer to fix that, and update the documentation to mention this (and do some cleanups). Fixes: 19d3577e35e0 ("cfg80211: Add API to allow querying regdb for wmm_rule") Link: https://patch.msgid.link/20261006120655.7c261d237cae.If21cf0af3b0d7e8c62c45ece5dc654b30c9d7757@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 0ceb4ca9378a153f11f45399fcfcd51b4bb52345 Author: Johannes Berg Date: Mon Oct 5 22:47:59 2026 +0200 wifi: mac80211: fix mbssid/rnr allocation in beacon data [ Upstream commit baf0d4feed2f0fed8e045f948534a4bd43ae464e ] These structs are placed after the tail, but that can make them unaligned. Change the order so the structs are after one another, and then followed by the head/tail/elements. Assisted-by: LLM Fixes: 2b3171c6fe0a ("mac80211: MBSSID beacon handling in AP mode") Link: https://patch.msgid.link/20261005224950.2f554b2c7c10.Ie961eb6b1435f956446e052936258758b966c67f@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 37a3924e0c5b597c5888e726a980139d7968ec83 Author: Aloka Dixit Date: Fri Oct 2 12:10:57 2026 -0700 wifi: mac80211: remove redundant null check in ieee80211_assign_beacon() [ Upstream commit 229cf0621950919c38a271ab3c07dfd41dd301d0 ] The else-if branch condition 'old && old->mbssid_ies' already guarantees 'old' is non-NULL. The inner 'old &&' in 'if (old && old->rnr_ies)' is therefore redundant; remove it. Signed-off-by: Aloka Dixit Link: https://patch.msgid.link/20261002-csa_cca_fix-v1-2-b83a998aeb44@oss.qualcomm.com Signed-off-by: Johannes Berg Stable-dep-of: baf0d4feed2f ("wifi: mac80211: fix mbssid/rnr allocation in beacon data") Signed-off-by: Sasha Levin commit 4755b3876cba5ed62899daeec0320e2d787518eb Author: Johannes Berg Date: Mon Oct 5 22:47:57 2026 +0200 wifi: mac80211: limit injected HT/VHT MCSes [ Upstream commit 22d8e38161c722fe6e7ffb2a4c7fadab0f111271 ] With radiotap injection the HT/VHT MCSes can be just about anything, but that can later get problematic. Limit them to the rates the device reports, which is presumably going to be a subset of what mac80211 can do, except for HT MCS 32 which some devices report as supported, but then TX status can't deal with it. If it's not supported just ignore the config. Assisted-by: LLM Fixes: dfdfc2beb0dd ("mac80211: Parse legacy and HT rate in injected frames") Fixes: 646e76bb5daf ("mac80211: parse VHT info in injected frames") Link: https://patch.msgid.link/20261005224950.68e210b8487a.I2ee0e4664c54cf31002eb9e4f5190fd05ff4130f@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit a9da56f46b23d1a152c8b9347db09a9d835b5b5a Author: Johannes Berg Date: Mon Oct 5 22:47:56 2026 +0200 wifi: mac80211: init radiotap iter after length checks [ Upstream commit e3cf8da7e0c560db67ac5ee8c9197514bb298ea7 ] The radiotap iterator initialization will already parse the presence bitmaps, so it accesses a good part of the header. This might not be present in the linear part of the SKB, we haven't checked it at this point. Check the lengths first. Assisted-by: LLM Fixes: cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") Link: https://patch.msgid.link/20261005224950.b5c2c31790d2.I091422db411b595bde4dba2de69334cd2aeb33b0@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit cd2c3dd228d4ed3e434ce8b60ccf6b002b71194b Author: Johannes Berg Date: Mon Oct 5 22:47:55 2026 +0200 wifi: nl80211: reject zero RNR/MBSSID elements [ Upstream commit c767e1173aeab7825a8dfb197041d3996db84e39 ] That's a nonsensical configuration, and we get errors reported further down in mac80211 for it; hostapd has code that only adds the nested element if it'll not be an empty list. Remove an unnecessary NULL check while at it. Fixes: dbbb27e183b1 ("cfg80211: support RNR for EMA AP") Assisted-by: LLM Link: https://patch.msgid.link/20261005224950.97db49d9d104.I5765a3310528b3d1cb1673dc90ad5ab5fc3ea571@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 2116636b256c3b4b7c28fc32c21609a1bfc12ce6 Author: Johannes Berg Date: Mon Oct 5 22:47:54 2026 +0200 wifi: mac80211: kill wake_txqs_tasklet on unregistration [ Upstream commit 8ea4f50c3426aaaf3f4c118ee2c2876326ca5db5 ] We never kill the wake_txqs_tasklet so it could be running while the hardware is being freed. Kill it, late enough to never be able to restart afterwards. Assisted-by: LLM Fixes: 21a5d4c3a45c ("mac80211: add stop/start logic for software TXQs") Link: https://patch.msgid.link/20261005224950.3fdb8d0ff377.I851e79ac625c4926e211642ee7a7e458728b0ad3@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit b143cc08a3a3d63ff32fcd56141f776ae421abda Author: Johannes Berg Date: Mon Oct 5 22:47:53 2026 +0200 wifi: mac80211: mesh: use hlist_add_head_rcu() [ Upstream commit 2ce8b78102e91c9d6536630cdef96491121c84d3 ] The mesh paths walk list used under RCU, so we must use hlist_add_head_rcu() to publish an entry. Fix one place that didn't do that. Assisted-by: LLM Fixes: b4c3fbe63601 ("mac80211: Use linked list instead of rhashtable walk for mesh tables") Link: https://patch.msgid.link/20261005224950.e0db543145e1.Ieaf30d3546e8ff63ccf400f6fb26e027c218721f@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit b0410f93b2e7fa49c7289db93a32efad003b8d02 Author: Johannes Berg Date: Mon Oct 5 22:47:52 2026 +0200 wifi: mac80211: clear fragment cache entry 'is_protected' [ Upstream commit f3d29dc9224b0881d10d34664456adf113bc4777 ] In practice, we probably shouldn't end up with a fragmented frame that's protected, filled into the cache, finished or dropped and then the next frame is unprotected, since only unicast data frames can be fragmented. However, tools complain and it's more correct to be able to do this (e.g. an unencrypted fragmented EAPOL _could_, at least in theory, happen), so clear the flag when the entry is reused. Assisted-by: LLM Fixes: 7e44a0b597f0 ("mac80211: prevent attacks on TKIP/WEP as well") Link: https://patch.msgid.link/20261005224950.c3e4106f34d5.I866c0862db031c3a810d2333acdd22e2733d2b8c@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit c641c34d407d175969a7746831d57a2c74d4ab35 Author: Johannes Berg Date: Thu Oct 8 16:56:45 2026 +0200 wifi: ath6kl: don't take RTNL in del_virtual_intf [ Upstream commit 97aab70a03df478ffefcf890ed4be258c0240bcb ] cfg80211 already holds the RTNL here, so this will just deadlock. Remove the extra RTNL acquisition. Oddly enough this was all true even back when the locking here was added, so this is just a revert of a broken ~13 year old commit. Fixes: bc52aab380c7 ("ath6kl: Protect ath6kl_cfg80211_vif_cleanup using rtnl_locks") Signed-off-by: Johannes Berg Link: https://patch.msgid.link/20261008165646.48866f0521af.I1c166be830384473f67677eeb187afa7e54106ea@changeid Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 15cc1495f15f0a12b0df1ca5f17ae5ac49525689 Author: Takashi Iwai Date: Thu Oct 8 21:25:41 2026 +0200 ALSA: hda: intel: Cancel delayed work at shutdown, too [ Upstream commit b83b78df0e53d9dd872d24e49a99658815b12770 ] The shutdown procedure needs to cancel the delayed probe work in case where the probe work stalls or is slow but still possible to reactivated. Fixes: c0f1886de7e1 ("ALSA: hda: intel: Allow repeatedly probing on codec configuration errors") Reported-by: Sashiko Link: https://patch.msgid.link/20261008192553.300025-2-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit d45f342a6ab3fea173718e48d9ce00aef821b81d Author: Takashi Iwai Date: Thu Oct 8 21:25:48 2026 +0200 ASoC: fsl_asrc_m2m: Fix bogus compress task pointer assignments [ Upstream commit 360e688f6d24ccd3e9485f57ad451ec1cecfb94c ] When a creation of input or output compress-offload task fails in fsl-asrc driver, the task->input or task->output pointer is left with ERR_PTR(), which is non-NULL. Then it's handled in the compress offload core and it tries to release via dma_buf_put(), resulting in an access to a wrong address. Clear the bogus pointers properly before returning an error. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Reported-by: Sashiko Link: https://patch.msgid.link/20261008192553.300025-9-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit bfd741d059e156da3334467402662f42db01aef0 Author: Takashi Iwai Date: Thu Oct 8 21:25:50 2026 +0200 ALSA: line6: Fix potential OOB write in line6_capture_copy() [ Upstream commit d69798357b5d562bcda1af488cda3ead4d039f8f ] line6_capture_copy() copies the data for the original byte size, but the buffer overwrap is checked against the frame size. Because of it, when the data size isn't aligned in frames, the remaining bytes might be still copied above the buffer size. For avoiding the potential OOB write, correct the copied data size in line6_capture_copy() to be aligned with frames. Fixes: 1027f476f507 ("staging: line6: sync with upstream") Reported-by: Sashiko Link: https://patch.msgid.link/20261008192553.300025-11-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 4b343362d2a88ef23df9ab55d31375d88bcf43f0 Author: Takashi Iwai Date: Thu Oct 8 21:25:49 2026 +0200 ALSA: line6: Reject too small max packet sizes [ Upstream commit e2ef553dfe923959632e580bcad8583d922868ac ] Although the LINE6 driver has a sanity check for the given max packet sizes, it still has an implicit requirement of the minimal size being bytes-per-frame; e.g. the impulse test signal assuming the fixed size, and when a too small size is specified by a malformed USB descriptor, this may lead to an OOB access. Change the sanity check conditions to reject too small max packet sizes for avoiding the scenario above. Fixes: 3450121997ce ("ALSA: line6: Fix write on zero-sized buffer") Reported-by: Sashiko Link: https://patch.msgid.link/20261008192553.300025-10-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 7b83c0addd3ff7bed755a94faa4db2ccd9034514 Author: Takashi Iwai Date: Thu Oct 8 21:25:47 2026 +0200 ALSA: usb: us16x08: Fix racy accesses of mixer elements [ Upstream commit 589fccbe1e9dd8aaf075cc073a7489c0c015ee49 ] All get and put callbacks for us16x08 mixer have no proper protection, hence the concurrent accesses to multiple elements may face data races, resulting in unexpected values. Put the new mixer->lock mutex for protecting the concurrent accesses. Fixes: d2bb390a2081 ("ALSA: usb-audio: Tascam US-16x08 DSP mixer quirk") Reported-by: Sashiko Link: https://patch.msgid.link/20261008192553.300025-8-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 4412eb24dc93418a53165df02772e16089161430 Author: Takashi Iwai Date: Wed Oct 7 19:20:41 2026 +0200 ALSA: usb-audio: Fix data race at mixer_ctl_feature_info() [ Upstream commit f701f6738de2d11e206a74d2a81465051dbf1ba3 ] The info callback for USB-audio mixer controls for feature unit has a dynamic initialization of the contents with the check of cval->initialized flag. But, since the info callback may be concurrently called, this may lead to a data race, giving back an inconsistent state. Similarly, get and put callbacks may have concurrent accesses and can get bogus states. For avoiding the data race, introduce a mutex locking for the controls and protect against concurrent info callback calls. Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172051.13240-6-tiwai@suse.de Stable-dep-of: 589fccbe1e9d ("ALSA: usb: us16x08: Fix racy accesses of mixer elements") Signed-off-by: Sasha Levin commit cfb03afbb711b9a0e68c7c483120e043870da664 Author: Takashi Iwai Date: Thu Oct 8 21:25:46 2026 +0200 ALSA: caiaq: Fix races at MIDI URB and trigger accesses [ Upstream commit 52b1213e2a086f2828500ab9c8bac45b213429bb ] URB completion and rawmidi trigger callbacks can race with each other, which may put the state inconsistent, causing double submissions, etc. Guard both with a new spinlock for avoiding the races. Fixes: f3f80a9205da ("ALSA: caiaq - Fix Oops with MIDI") Reported-by: Sashiko Link: https://patch.msgid.link/20261008192553.300025-7-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 1dc148c5d3043e2ae1c4170df9ffeb6f27e7cd3d Author: Karl Mehltretter Date: Mon Sep 7 03:21:25 2026 +0200 gpu: buddy: Drop the stale @p line from the gpu_buddy_print() kernel-doc [ Upstream commit b7027ff72c2fd4f7697a00b854c882445e9150b5 ] gpu_buddy_print() takes only the allocator since commit ba110db8e1bc ("gpu: Move DRM buddy allocator one level up (part two)"), but the kernel-doc still describes a printer argument and kernel-doc warns about the excess parameter on every docs build. Drop the line. Fixes: ba110db8e1bc ("gpu: Move DRM buddy allocator one level up (part two)") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Arunpravin Paneer Selvam Signed-off-by: Arunpravin Paneer Selvam Link: https://patch.msgid.link/20260907012125.21209-1-kmehltretter@gmail.com Signed-off-by: Sasha Levin commit 80908861ff6d06c3bd6b7c5866a225c19e545d5b Author: Jan Beulich Date: Thu Oct 8 11:48:35 2026 +0200 x86/PVH: don't truncate initrd address/size [ Upstream commit fcc43d1d6bf5fbd41e1e308b17187f9b759df56a ] Consuming merely the lower halves of the provided values isn't very useful. (While generally loaders try to place it below 4G, especially when it's huge it may not fit there.) Fixes: 7243b93345f7 ("xen/pvh: Bootstrap PVH guest") Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross Message-ID: <9698d810-6664-4a9d-a847-18ad124261e0@suse.com> Signed-off-by: Sasha Levin commit 4c0c28e7b50fe8a6863b5a9277d593bcc5f58206 Author: Gui-Dong Han Date: Thu Jul 30 16:40:00 2026 +0800 xen/blkback: Prevent missed completion when draining I/O [ Upstream commit 9b4df0baa2aa03d22310e59846ca628f7afd4115 ] xen_blk_drain_io() sets drain before checking inflight. xen_blkbk_unmap_and_respond_callback() decrements inflight with atomic_dec_and_test() before checking drain. The pre-wait condition check was added to avoid missing a completion, but atomic_set() is unordered. With one I/O in flight, the drain path can set drain to 1 and read inflight as 1 before the completion decrement. The completion path then decrements inflight to 0 but can still read drain as 0. It skips complete(), so the drain path waits until the timeout despite no I/O remaining. Add a full barrier between setting drain and reading inflight. atomic_dec_and_test() already provides full ordering on the completion side. Fixes: 6927d92091df ("xen/blkback: Fix two races in the handling of barrier requests.") Signed-off-by: Gui-Dong Han Acked-by: Roger Pau Monné Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross Message-ID: <20260730084000.3305702-1-hanguidong02@gmail.com> Signed-off-by: Sasha Levin commit b5e8b50de08664b8aab56fc38d28cece24807f59 Author: Ruoyu Wang Date: Thu Aug 20 21:56:03 2026 +0800 xen/pcifront: Fix PCI device reference leak in AER handling [ Upstream commit 5d12c51bd98cdb5a32cbfb606963b05740ec42f2 ] pci_get_domain_bus_and_slot() increments the reference count of the returned PCI device. pcifront_common_process() drops that reference only when the device or its driver is missing. All paths for a bound device either return directly after invoking an error recovery callback or fall through without calling pci_dev_put(). Consequently, each AER request for a bound device leaks a reference and can keep the device allocated after removal. Declare the looked-up device with __free(pci_dev_put), so every return path releases the reference after callback dispatch. This keeps the device alive while its callback runs and balances the lookup without restructuring the callback returns. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 956a9202cd12 ("xen-pcifront: Xen PCI frontend driver.") Suggested-by: Lukas Wunner Signed-off-by: Ruoyu Wang Reviewed-by: Lukas Wunner Link: https://lore.kernel.org/r/20260813153138.3953222-1-ruoyuw560@gmail.com/ Signed-off-by: Juergen Gross Message-ID: <20260820135603.3901798-1-ruoyuw560@gmail.com> Signed-off-by: Sasha Levin commit a6e6bf3ec72974544aec2b43c9c9a95ddb0a7f25 Author: Yury Norov Date: Fri Sep 11 11:52:43 2026 -0400 lib: fix lock initialization in region allocation benchmark [ Upstream commit 718de76e2d3dc38a30026f23909842ad26010b6e ] The Maple Tree benchmark uses MTREE_INIT() for a stack-allocated tree. Its static spinlock initializer leaves lockdep to use the lock address as the class key. Since the address is on the stack, the first allocation triggers "INFO: trying to register non-static key" and disables lockdep. The IDA benchmark has the same problem through IDA_INIT(), but runs after Maple Tree and therefore encounters an already disabled lockdep. Use mt_init_flags() and ida_init() to initialize the locks with persistent lock-class keys. Keep initialization outside the timed allocation paths. Link: https://lore.kernel.org/20260911155244.1406122-1-ynorov@nvidia.com Fixes: f4806cc63cc6 ("lib: test bitmap vs IDA vs Maple Tree performance for region allocations") Signed-off-by: Yury Norov Signed-off-by: Andrew Morton Closes: https://lore.kernel.org/oe-lkp/202609101106.771b567e-lkp@intel.com Acked-by: Liam R. Howlett (Oracle) Cc: Alice Ryhl Cc: Andrew Ballance Cc: Matthew Wilcox (Oracle) Cc: Rasmus Villemoes Signed-off-by: Sasha Levin commit 7799ce3de00674147dedbd73fb5e704f2c8a93e6 Author: Haotian Zhang Date: Fri Oct 9 01:24:42 2026 +0800 cpufreq: qcom-cpufreq-hw: fix device node refcount leak in phandle parsing [ Upstream commit 6fa50b1988b8dfd2e92a9cecba073fe4347a5e23 ] of_parse_phandle_with_args() transfers a reference to the provider node in out_args->np, which the caller is responsible for releasing with of_node_put(). Neither qcom_get_related_cpus() nor qcom_cpufreq_hw_cpu_init() ever puts args.np: they only put cpu_np, which is a different node obtained from of_cpu_device_node_get(). The reference is therefore leaked on every successful call, and qcom_get_related_cpus() leaks one per present CPU. Release args.np after the parsed index has been read in both call sites. Fixes: 2849dd8bc72b ("cpufreq: qcom-hw: Add support for QCOM cpufreq HW driver") Assisted-by: DeepSeek-V4.1-Flash Signed-off-by: Haotian Zhang Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin commit bde2b554381668d0b08a53e76d4a55260ef3f5f0 Author: Vineeth Karumanchi Date: Mon Oct 5 16:38:55 2026 +0530 net: macb: configure ENST registers for all queues [ Upstream commit 04a943067baa670fef3c1424ea616a2ed87d3d19 ] When a taprio config only covered a subset of queues, the driver programmed the ENST registers only for the queues named in the config and left the remaining queues holding stale register values. This produced an inconsistent hardware setup that affected the scheduling of the configured queues. This was observed on a GEM instance with four hardware queues, all enabled: Initial configuration: - All four queues are enabled. - enst_on_time_qX registers are left at their reset value (0x0001FFFF). - Only q0 and q1 are configured with valid, non-overlapping ENST schedules (T0 and T1 respectively). - Traffic streams p0 and p1 are bound to q0 and q1. - ENST is enabled only on q0 and q1. Observed behavior: - During T0 on-time, both p0 and p1 packets are transmitted. - During T1 on-time, both p0 and p1 packets are transmitted. With the unused queues (q2 and q3) explicitly programmed with enst_on_time = 0x0: - During T0 on-time, only p0 packets are transmitted. - During T1 on-time, only p1 packets are transmitted. Leaving the ENST on-time registers of unused queues at their reset value (0x0001FFFF) disrupts the scheduling of the configured queues, whereas programming them with 0x0 yields the expected ENST operation. Program the ENST registers for every queue unconditionally. The per-queue configuration array is now allocated for bp->num_queues and indexed directly by queue_id; unconfigured queues are left zero-initialized by kzalloc_objs(), so their registers are cleared. Indexing the array by queue_id also makes the queue_id field in struct macb_queue_enst_config redundant, so drop it. Fixes: 89934dbf169e ("net: macb: Add TAPRIO traffic scheduling support") Reviewed-by: Théo Lebrun Signed-off-by: Vineeth Karumanchi Reviewed-by: Jacob Keller Link: https://patch.msgid.link/20261005110855.1669249-1-vineeth.karumanchi@amd.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b06498e826889f109dfbe681122e8b993ff4a6c2 Author: Eric Dumazet Date: Wed Oct 7 09:56:49 2026 +0200 bng_en: pad short frames before sampling nr_frags [ Upstream commit 056d046bf530d44bff5ce13a0addbc50c14ac95f ] bnge_start_xmit() samples skb_shinfo(skb)->nr_frags into last_frag, and stores it in tx_buf->nr_frags, before calling eth_skb_pad(). If a nonlinear skb is shorter than ETH_ZLEN, __skb_pad() calls skb_linearize(), which pulls the frags into the linear part, releases the frag pages and sets nr_frags to zero. bnge_start_xmit() then uses the stale last_frag to fill TX_BD_CNT() and to walk skb_shinfo(skb)->frags[], DMA-mapping pages the skb no longer holds a reference on, and sending their content twice. Fix this by calling eth_skb_pad() before nr_frags is sampled. Found by Sashiko while reviewing the similar bnxt_en fix. Fixes: bd5ad9c052c8 ("bng_en: Add TX support") Link: https://lore.kernel.org/netdev/179134695789.434549.53526916334276884@kernel.org/ Signed-off-by: Eric Dumazet Reviewed-by: Vikas Gupta Link: https://patch.msgid.link/20261007075649.468033-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 1c68f5db93328fb956ae77df5bc9deb219f0186d Author: Jake Labelle Date: Thu Oct 8 20:52:47 2026 +0900 nilfs2: reject non-regular inodes in dsync recovery [ Upstream commit ef2ccb1554df254eb4066171ce93e6d5fb1af2e3 ] During roll-forward recovery, nilfs_recover_dsync_blocks() obtains the inode designated by fi_ino of a dsync log without checking its type. If a corrupted image designates a special inode (e.g. a device node) there, the inode's embedded bmap was never initialized: __nilfs_read_inode() calls nilfs_bmap_read() only for regular files, directories and symlinks. The subsequent nilfs_get_block() then dereferences the uninitialized bmap->b_ops and jumps through it, crashing the kernel or worse. Regular files, directories, and symlinks are the only inode types with data blocks to recover; reject anything else before touching its block mapping. [ryusuke: conformed AI tag to guidelines] Fixes: 0f3e1c7f23f8 ("nilfs2: recovery functions") Assisted-by: Claude:claude-mythos-5 Signed-off-by: Jake Labelle Signed-off-by: Ryusuke Konishi Signed-off-by: Viacheslav Dubeyko Signed-off-by: Sasha Levin commit 63de7c147a1fd38f097315c8b7f7a8b30806e30d Author: Michał Kopeć Date: Sat Oct 3 21:45:00 2026 +0200 ASoC: mediatek: mt8188: Constrain UL8 FE to its back end's capabilities [ Upstream commit 76775717c4adc283d5e7aed469468c8fa1ada4a7 ] UL8 advertises up to 24 channels, but its only back end, ETDM1_IN, supports at most 16, and its bit clock is limited to 24.576 MHz. Without merged constraints, userspace can open UL8 with 48 kHz, 24 channels and 32-bit slots, which then fails in hw_params: mtk_dai_etdm_configure bck rate 36864000 not support ASoC error (-22): at snd_soc_dai_hw_params() on ETDM1_IN Set dpcm_merged_chan/rate/format, as the DL front ends already do, so the FE only offers configurations the back end can accept. Fixes: 96035d46d4b4 ("ASoC: mediatek: mt8188: add machine driver with mt6359") Signed-off-by: Michał Kopeć Link: https://patch.msgid.link/20261003194501.832558-4-michal@nozomi.space Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit bf389db13cf825a50767cc1110034d15e55ec061 Author: Michał Kopeć Date: Sat Oct 3 21:44:59 2026 +0200 ASoC: mediatek: Don't keep a freed topology name in the static card [ Upstream commit 50c5d7f3a9b4d2a2baca40657e46a3508cdac2d1 ] The machine drivers pass a static snd_soc_card, which outlives any one probe. With SOF, mtk_soundcard_common_probe() calls snd_soc_card_set_topology_name(), which devm-allocates "sof-", stores it in card->topology_shortname and points card->name at it. If the probe then fails or defers, devm frees the string, but the static card keeps both pointers. The next probe does not allocate a new name, because topology_shortname is already set, so the card registers with whatever now occupies that memory: input: \xc0cr\xc2 DP Jack as /devices/platform/sound/sound/card0/input10 UCM matches profiles by card name, so userspace then finds no profile and the card is unusable until the next boot. Save the original name before setting the topology name, and restore it from a devm action that runs before the string is freed. Fixes: ec4489c43efe ("ASoC: soc-card: add snd_soc_card_set_topology_name()") Signed-off-by: Michał Kopeć Link: https://patch.msgid.link/20261003194501.832558-3-michal@nozomi.space Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0bba01d40e43086eab8b07bbaf2734b95351601f Author: Michał Kopeć Date: Sat Oct 3 21:44:58 2026 +0200 ASoC: mediatek: common: Keep codec references until the card is bound [ Upstream commit 6cb1f09e1f699d0c7f748057bc50d84a1e9e77fc ] mtk_soundcard_common_probe() drops the codec references parsed from the devicetree right after devm_snd_soc_register_card() returns. When a component is still missing, snd_soc_bind_card() queues the card for a later rebind and registration still returns success, so the card is not instantiated yet. The rebind reuses the same dai_link array, but with the codec references released both the codec name and of_node are unset, so it fails the dai link sanity check and the sound card never appears. Release the references right away only when the card was instantiated or registration failed. Otherwise keep them for the rebind and release them when the device is unbound. Fixes: bce93a162505 ("ASoC: mediatek: Add common machine soundcard driver probe mechanism") Signed-off-by: Michał Kopeć Link: https://patch.msgid.link/20261003194501.832558-2-michal@nozomi.space Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 2b3fd00e067324bf0ba40f84ce81b0bb3cd4813f Author: Rosen Penev Date: Sun Oct 4 14:50:42 2026 -0700 crypto: talitos - init tasklets before requesting IRQs [ Upstream commit 666d66df25253070cb297cb920b0bcfcfe5eb871 ] The talitos interrupt handlers schedule priv->done_task[] via tasklet_schedule(). Since the second IRQ support, probe has requested the IRQs before calling tasklet_init(), so an interrupt already pending when a line is requested, e.g. engine state left by the bootloader or a kexec'd kernel, would schedule a tasklet with a NULL callback. Look up the IRQ numbers and map the registers up front, so that -EPROBE_DEFER returns before anything is allocated and the done_task[] selection and reset_device() can see the secondary IRQ. Only request the IRQs once the channel fifos are allocated and init_device() has reset the engine. This matches remove(), which frees the IRQs before killing the tasklets. remove() frees every IRQ number that is > 0, so make sure that only requested lines are set when it runs from the probe error path: clear both numbers when probe fails before the request, and clear any line talitos_probe_irq() did not request. Previously a failed primary request in the two-IRQ case freed the never-requested secondary line. Fixes: c3e337f88a5b ("crypto: talitos - support for channel remap and 2nd IRQ") Assisted-by: LLM Signed-off-by: Rosen Penev Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 76fbbb1541322301ad3ef2d5fdc29943f38143a3 Author: George Abraham P Date: Tue Sep 29 14:08:37 2026 +0530 crypto: qat - force an edge when re-enabling all VF2PF interrupts [ Upstream commit 2b91570f72670054ddae5b11b8c70a79c340014a ] VF2PF interrupts are edge-triggered: a source only fires on a masked -> unmasked transition of VM2PF_MSK, not by being unmasked. adf_enable_all_vf2pf_interrupts() does a plain read-modify-write unmask, assuming VM2PF_MSK still holds the all-masked value left by adf_disable_all_vf2pf_interrupts(). That breaks across a device reset: adf_dev_autoreset() (and AER recovery) FLR the PF while VFs stay alive, so a VF can latch a source in VM2PF_SOU with no vectors set up to deliver it. The FLR then resets VM2PF_MSK to its power-on default of 0 (unmasked) without a software write, so the following RMW unmask writes 0 over an already-0 register: no edge occurs and the latched VF2PF message is never delivered. Fix by having adf_enable_all_vf2pf_interrupts() mask all sources immediately before unmasking them, mirroring the idiom already used in adf_gen4_disable_pending_vf2pf_interrupts(), forcing the required edge regardless of the prior state of VM2PF_MSK. Fixes: 575185000539 ("crypto: qat - keep VFs enabled during reset") Signed-off-by: George Abraham P Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit e8752a2eb736342313b49d4e759a2bdc00fc3a6c Author: Vincent Jardin Date: Mon Sep 28 16:09:16 2026 +0200 crypto: caam/qi,qi2 - set plain_keylen for skcipher descriptors [ Upstream commit b566ebd52eeb661337ef5f52a000528af59479df ] Since the commit 66b9a095f7f9 ("crypto: caam - Add support of paes algorithm") The shared descriptor then loads a zero-length key and the SEC decodes the inlined key bytes as commands. Test: with CONFIG_CRYPTO_SELFTESTS on LX2160A every skcipher but xts fails: dpaa2_caam dpseci.0: 40000307: DECO: desc idx 3: Invalid LOAD Command alg: skcipher: ctr-aes-caam-qi2 encryption failed on test vector 0; expected_error=0, actual_error=-22, cfg="in-place (one sglist)" caamalg_qi.c is compile-tested only. Fixes: 66b9a095f7f9 ("crypto: caam - Add support of paes algorithm") Signed-off-by: Vincent Jardin Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 9634a8b99b2651b9708f3137820d1c7beb3edba1 Author: Takashi Iwai Date: Thu Oct 8 00:34:46 2026 +0200 ALSA: hda: Don't free card at probe error in vga_switcheroo handler [ Upstream commit 7e1ad3c55baa80399f1727dfd2303fa4d1558d9a ] The vga_switcheroo handler azx_vs_set_state() calls azx_probe_contine() for enabling the audio, and if an error happens during the probe, azx_probe_continue() releases its associated sound card object at the error path. The card release procedure includes the call of vga_switcheroo_unregister_client(), and this triggers the vgasr_mutex lock again that had been already held by the caller (vga_switcheroo_process_delayed_switch()) -- leading to a deadlock. (Moreover, the card release will cause a potential UAF at the error message in azx_vs_set_state() since the card object is already gone; this was the original report by Sashiko.) For avoiding the unneeded crash, it's better to avoid the card release in this error path, so we make azx_probe_continue() behaving conditionally. In return, set hda->init_failed flag, so that any further (re-)attempts will be filtered after that point. The check of hda->init_failed is dropped from azx_vs_can_switch(). It's because otherwise vga_switcheroo can't be switched to turn off GPU once when a probe error happens at the audio side. Fixes: 39173303c838 ("ALSA: hda: Free card instance properly at probe errors") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20261007213728.155092-1-tiwai%40suse.de Link: https://patch.msgid.link/20261007223448.172443-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 095cb548f30d5b3e5654d3f0513f6f7f8eb66ee0 Author: Takashi Iwai Date: Wed Oct 7 19:12:29 2026 +0200 ALSA: hda: Avoid non-operational GPU warning at regular device removal [ Upstream commit 3af4ed9f927c469f23d03a76e3b438ed09715bd3 ] When a hda-intel driver is removed manually and it has a GPU with switcheroo, it always gives a warning like "GPU sound probed, but not operational:..." no matter whether GPU has been actually operational or not. This warning was originally put for machines that really suffer from the non-operational GPU HDMI audio, but it's seen at the common path a normal device removal also goes over. For avoiding a confusing warning, move the check and the warning at the error path of azx_probe_continue() that is the point where the non-functional GPU gets detected and given up. Fixes: 2b360ba9a493 ("ALSA: hda: intel: Fix Optimus when GPU has no sound") Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007171231.8147-1-tiwai@suse.de Signed-off-by: Sasha Levin commit f9b97ececb0b5e1b40215a8d9759e5d2cced7ec9 Author: Takashi Iwai Date: Wed Oct 7 19:10:54 2026 +0200 ALSA: hda: Use linked list for jack table [ Upstream commit 5676e013f16ac4b616d433af24647d0ce4b067aa ] So far we've used snd_array infrastructure for managing the hda_jack_tbl elements, but it turned out that this may lead to a UAF when a different order of destruction procedure is applied; namely, each hda_jack_tbl object creates a snd_jack object and sets the private_data pointing to the hda_jack_tbl, and private_free to release it. It looks harmless, but since snd_array may reallocate the whole table at growing, the formerly referred jack pointer may become stale. Fortunately, currently there is no call pattern that triggers this issue, so it's only hypothetical, but we should address it in anyway. There are several ways to address this, and at this time, we rather redesign the hda_jack_tbl allocations: instead of snd_array(), do a normal kmalloc() + linked list. There will be more kmalloc calls than the original code, but as the number of jacks are usually at most handful, it must not be a problem. This change allows us the persistent jack pointer, so no stale pointer access can happen any longer. This also fixes another reported issue about the stale jack pointer reference in snd_hda_jack_tbl_new(), too. Fixes: 31ef22579302 ("ALSA: hda - Integrate input-jack stuff into kctl-jack") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007171057.7462-1-tiwai@suse.de Signed-off-by: Sasha Levin commit d578f48a121674a035b9d805386fed1f6fa1498b Author: Takashi Iwai Date: Wed Oct 7 19:25:24 2026 +0200 ALSA: core: Fix leaks at snd_card_init() error paths [ Upstream commit 344e74ac50aff89674a1bea153f008bfb31ed952 ] When the snd_card object is initialized internally in snd_card_init(), the error path of card->value_buf allocation returns straightly as an error without invoking the destructor, which would leak resources. Also, the other error paths in snd_card_init() release the card object only via put_device(), and this misses the cleanups that are done in snd_card_disconnect(); namely, the reserved slot bit in snd_cards_lock is never cleared, so the card index remains occupied, and the debugfs directory created for the card is left over. Fix them by calling snd_card_free() at the error path, which performs both the disconnection and the release properly. As snd_card_free() calls snd_device_free_all() internally, the explicit call is dropped, and the error labels are unified. Fixes: 84446536f63d ("ALSA: control: Verify put() result when in debug mode") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172533.14667-7-tiwai@suse.de Signed-off-by: Sasha Levin commit 6e5eb2c618f317dfd70921755cf934d1910bb610 Author: Takashi Iwai Date: Wed Oct 7 19:25:23 2026 +0200 ALSA: aloop: Avoid a bad mixure of guard() and goto [ Upstream commit f7faf5d9b5668919cae84a6247f8f7b4e2c0227c ] The rewrite of aloop driver code using guard() leaded to a mixture of guard() and some goto; although it currently works, it isn't really a good match. For avoiding the bad match, just move the code using goto into a function and wrap it with guard(). Fixes: ebd9b6c91d4e ("ALSA: aloop: Use guard() for mutex locks") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172533.14667-6-tiwai@suse.de Signed-off-by: Sasha Levin commit 94b93c64b5ef07af6aca8efac7ada1a94cfcad5c Author: Takashi Iwai Date: Wed Oct 7 19:25:22 2026 +0200 ALSA: info: Fix memory leak at card removal [ Upstream commit a3e8eec7692eac706ba0934fa18453e46acd1a08 ] The fix for potential deadlock at disconnection by the commit c7a606519533 ("ALSA: info: Fix potential deadlock at disconnection") clears card->proc_root pointer at snd_info_card_disconnect(), in order just to be sure. But this leads to a memory leak of card->proc_root content that should have been released at a later call of snd_info_card_free(). For addressing the memory leak, simply drop the card->proc_root clearance at snd_info_card_disconnect(). Since card->proc_root might be still looked at in snd_info_card_id_change() that may be running concurrently during the connection procedure, add a sanity check there, too. Fixes: c7a606519533 ("ALSA: info: Fix potential deadlock at disconnection") Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/20261006174002.703431-1-tiwai%40suse.de Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172533.14667-5-tiwai@suse.de Signed-off-by: Sasha Levin commit 67285ef936623c16b8d876c35f840e55f26bb323 Author: Takashi Iwai Date: Wed Oct 7 19:25:20 2026 +0200 ALSA: pcmtest: Fix leak at probe error [ Upstream commit d0f2ca62e89f3c666d0ec203eaa23b8d965e5443 ] When an error happens at probe of pcmtest driver before snd_card_register() succeeds, we have to release the card explicitly, but it's not done, leading to a potential memory leak. Also, pcmtest driver manages struct pcmtst object unnecessarily complicatedly by a dynamic allocation and release. This patch fixes and cleans up the resource management: - Use card's private_data allocation for struct sndpcmtst at the card creation, which is released automatically together with the card - Since the allocation of pcmtest is gone, snd_pcmtst_create() is rather pointless, so just directly calling snd_pcmtst_new_pcm() - Use the new auto-clean mechanism to handle the error case at probe. - Many release handlers became superfluous and dropped In the end we got a good amount of code reduction. Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172533.14667-3-tiwai@suse.de Signed-off-by: Sasha Levin commit 1c1967f098cf754d91e512a84df099bdd9da047a Author: Takashi Iwai Date: Wed Oct 7 19:25:19 2026 +0200 ALSA: seq: Fix missing direction and ump_group handling in 32bit compat ioctl [ Upstream commit 9d3e19c192b97b4c4c0abcafdbf1edb1e56cee88 ] I forgot to cover the two new fields, direction and ump_group, in struct snd_seq_port_info for the 32bit compat ioctls of SNDRV_SEQ_IOCTL_GET_PORT_INFO & co, which ended up with the garbage copies in those fields. Add the handling of those two fields in the compat layer. Also, avoid over-copying the 64bit snd_seq_port_info but only the first part (before the field kernel); this avoids the copy of kernel-space garbage value in the reserved field. Fixes: ff166a9d19fa ("ALSA: seq: Add port direction to snd_seq_port_info") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172533.14667-2-tiwai@suse.de Signed-off-by: Sasha Levin commit 08f87d507bbc59e099ac3620c4c73109b9e2b0dc Author: Takashi Iwai Date: Wed Oct 7 19:20:44 2026 +0200 ALSA: core: Add missing barriers for power_ref vs card->shutdown [ Upstream commit a6913835735469751f56473f5212eb291a4805e7 ] snd_power_ref_and_wait() increments card->power_ref and then reads card->shutdown (and the power state) locklessly, while snd_card_disconnect() sets card->shutdown and then waits for power_ref to drop to zero via snd_power_sync_ref(). Due to the missing barrier on both sides, the caller proceeds with shutdown still seen as false, while the disconnect side sees a zero refcount and continues tearing down incorrectly. For addressing the potential race, add smp_mb__after_atomic() after the refcount increment and smp_mb() before snd_power_sync_ref() in snd_card_disconnect(). Fixes: e94fdbd7b25d ("ALSA: control: Track in-flight control read/write/tlv accesses") Reported-by: Sashiko Assisted-by: LLM Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172051.13240-9-tiwai@suse.de Signed-off-by: Sasha Levin commit 2722b5eef8d235d132597d30a49acad0626f1702 Author: Takashi Iwai Date: Wed Oct 7 19:20:43 2026 +0200 ALSA: usb-audio: Fix mixer bitmap cache over 32 channels [ Upstream commit f224bd39d2bf95ebe5f81e710293cabac3d22636 ] USB-audio driver keeps the bitmap for the cached mixer channels, but since a 32bit integer is used, it's currently broken for over 32 channels. As the driver is supposed to support up to 64 channels, this patch extends the bitmap properly -- now to be more flexible, use the standard bitmap instead of the manual bit shifts. Some checks for master channels are replaced in a slightly different manner (checking the channel index 0) instead of the full cval->cached check, so that it fits better in the bitmap helper usage. Fixes: 16ee07bfa935 ("ALSA: usb-audio: Extend max number of channels to 64") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172051.13240-8-tiwai@suse.de Signed-off-by: Sasha Levin commit f0cf164ab856adb49611476558866058dec579e0 Author: Takashi Iwai Date: Wed Oct 7 19:20:42 2026 +0200 ALSA: pcmtest: Fix a bogus pointer read in snd_pcmtst_pcm_pointer() [ Upstream commit 905a07c711baf184d01aebd3cf9028a89bcd8b7f ] Sashiko reported a potential bogus value for a pcmtest driver when a concurrent call to PCM pointer is invoked while the pcmtest's timer callback is running: since the position is updated in the timer callback without locking, the following wrapping in inc_buf_pos() might be screwed up: if (v_iter->buf_pos >= bytes) v_iter->buf_pos %= bytes; Although it was reported as an OOB, the actual return is corrected inside buffer_size, so no corruption is expected in this scenario, but an error message could show a bogus value. Also, the whole state is read and modified locklessly in the timer callback, which can be racy against the pause operation, too. For avoiding those races, simply put the PCM stream lock in the timer callback (while the snd_pcm_period_elapsed() must be changed to its *_under_stream_lock() variant for avoiding the deadlock). Reported-by: Sashiko Fixes: 315a3d57c64c ("ALSA: Implement the new Virtual PCM Test Driver") Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172051.13240-7-tiwai@suse.de Signed-off-by: Sasha Levin commit 987af0e02a1d0d594a812d2fa91daad1d0a16243 Author: Takashi Iwai Date: Wed Oct 7 19:20:40 2026 +0200 ALSA: usb-audio: Fix invalid UAC2/3 mixer unit matrix evaluation [ Upstream commit c01fb2ed90c0770560ea9cc1644f205956b26a70 ] The bitmap matrix in the mixer unit descriptor for UAC2 and UAC3 has rather the size of input-pins x output-pins, while the current USB-audio driver code wrongly assumes the UAC1 bitmap matrix size, which is input-channels x output-pins. That is, when input pins have multiple channels, the column size differs and it leads to the accesses at a wrong position. This patch corrects the access of the bitmap matrix for UAC2/UAC3. For making the code cleaner, split the parser to UAC1 and UAC2/3, too. Reported-by: Sashiko Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0") Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172051.13240-5-tiwai@suse.de Signed-off-by: Sasha Levin commit 8b8bd4eef28bf54c01e4519eddf03b0c1a46c55a Author: Takashi Iwai Date: Wed Sep 30 17:53:50 2026 +0200 ALSA: usb-audio: Check mixer matrix size for UAC2/3 at parsing [ Upstream commit 22185ffd7b31885d03fdeb20055a8707779a70f9 ] The matrix of input/output channels specified in a UAC2/3 mixer unit must fit to the upper limit 256. Add a sanity check and returns an error if an invalid size is detected. Link: https://lore.kernel.org/d46fcac6-bd7e-4fc4-95e1-4e8d39f92ad3@zipdox.net Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260930155356.348608-2-tiwai@suse.de Stable-dep-of: c01fb2ed90c0 ("ALSA: usb-audio: Fix invalid UAC2/3 mixer unit matrix evaluation") Signed-off-by: Sasha Levin commit ef68bd82e1aa9820ade5a897bd78b569483cbfd5 Author: Takashi Iwai Date: Wed Oct 7 19:20:39 2026 +0200 ALSA: hda: Fix potential UAF for gating jack [ Upstream commit 27cee4141c8de82cf051104ca830c3a209816033 ] snd_hda_jack_set_gating_jack() assigns gated and gating variables from the succeeding calls of snd_hda_jack_tbl_get(). This works normally, but the second call might kick off the reallocation of the jack table, hence the first pointer might become invalid, which leads to a UAF. For avoiding that pitfall, this patch changes the code to two phases: the first to only create two entries, and the second phase to get the pointers from the table, so that no relocation can happen any longer. Fixes: 0619ba8c17b1 ("ALSA: hda - Allow jack state to depend on another jack") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172051.13240-4-tiwai@suse.de Signed-off-by: Sasha Levin commit c2c2489fb5dc408f227655f14476d3c50c0b3431 Author: Takashi Iwai Date: Wed Oct 7 19:20:37 2026 +0200 ALSA: seq: Drop the bogus RCU guard from clientptr() [ Upstream commit 8bd561f8a6051f4e287dd0d076f17a1af5bff009 ] In the recent refactoring with RCU, clientptr() takes guard(rcu)() around the client table lookup, but the RCU read-side section ends as soon as the function returns, so the returned pointer isn't protected at all. This gives a false impression as if that the callers were safe, and confuse reviewers including Sashiko. Actually, the callers (snd_seq_delete_kernel_client(), snd_seq_kernel_client_ctl() and snd_seq_kernel_client_write_poll()) never relied on any lock; the caller is the owner of the client (a kernel client passing its own id, or a user client via its opened file), hence the client can't be released concurrently by others. So just drop the confusing and useless RCU guard, read the table via rcu_dereference_protected(), and document the lifetime rule. Along with it, fold __clientptr() into its only user client_use_ptr(); the id range is already checked there, and it's never called with clients_lock held, so a plain rcu_dereference() suffices. Fixes: 7a287e4615d6 ("ALSA: seq: Use RCU for the client table") Reported-by: Sashiko Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20261007172051.13240-2-tiwai@suse.de Signed-off-by: Sasha Levin commit 5c49e11f78162dc04abcaf802a65ccf310b98656 Author: Marek Maslanka Date: Wed Oct 7 05:38:37 2026 +0200 platform/chrome: cros_ec_typec: Poll for role swap completion [ Upstream commit 2d3ee0bdb321ad84d9cf18d4bfd2b839293a695d ] Depending on the EC USB-C stack (TCPMv2 vs PDC), EC_CMD_USB_PD_CONTROL with a role swap request may either block until the swap completes or queue the request asynchronously for the EC PD task and return the current (pre-swap) role in the immediate response. On platforms where the EC handles the swap asynchronously, checking resp.role right after issuing the swap command sees the old role and fails with -EIO before the USB PD handshake completes. If the immediate response does not yet reflect the target role, poll EC_CMD_USB_PD_CONTROL with USB_PD_CTRL_SWAP_NONE until the target role is reached while connected, or until ROLE_SWAP_TIMEOUT_MS expires. The timeout mirrors PD_ROLE_SWAP_TIMEOUT used by the TCPM port manager, since a PR_Swap may legitimately take seconds when the partner answers with Wait and the initiator retries. While at it, report the failure modes the same way tcpm.c does, so that userspace can tell a rejected swap from a disconnect: -ETIMEDOUT when the partner never completes the swap, and -ENOTCONN when the port goes away while waiting. Decoding of the swapped role is factored out into cros_typec_resp_to_role() instead of being open coded for each swap type, which also keeps an unhandled swap type from being misread as a power role swap. Fixes: ab229c2b72c3 ("platform/chrome: cros_ec_typec: Add role swap ops") Signed-off-by: Marek Maslanka Link: https://lore.kernel.org/r/20261007033837.708119-1-mmaslanka@google.com Signed-off-by: Tzung-Bi Shih Signed-off-by: Sasha Levin commit 06b34435833f99b32ca251ef28929a55dc7bf2c6 Author: Chen-Yu Yeh Date: Mon Oct 5 17:37:49 2026 +0800 riscv: dts: sophgo: cv180x: Fix internal ephy node name [ Upstream commit 673f8e66d5edf424eaf599c8051e0f6962605861 ] The internal EPHY node is named "phy@0" while its reg property is <1>. The unit-address should match the first entry of the reg property, but this is not checked by dtc for MDIO buses. The kernel confirms the PHY is indeed at address 1: eth0: PHY [mdio_mux-0.0:01] driver [Generic PHY] Rename the node to ethernet-phy@1, which also follows the common naming convention for ethernet PHY nodes. Fixes: ba1abacc57cb ("riscv: dts: sophgo: Add mdio multiplexer device for cv18xx") Reviewed-by: Inochi Amaoto Reviewed-by: Hiago De Franco Signed-off-by: Chen-Yu Yeh Link: https://patch.msgid.link/20261005093749.645014-3-chenyou910331@gmail.com Signed-off-by: Inochi Amaoto Signed-off-by: Chen Wang Signed-off-by: Sasha Levin commit 40bd161aa1544c6273fa46dc00271caf237e6141 Author: Felix Hoffmann Date: Wed Oct 7 11:30:21 2026 +0200 wifi: mm81x: validate YAPS receive framing [ Upstream commit 7e6689cbbf9e6040e4ce38656a126459aa994f68 ] The receive byte count comes from device-controlled status registers, but the packet splitter unconditionally consumes a four-byte delimiter. A count of one to three bytes therefore makes bytes_remaining negative. If the reused receive buffer contains a valid delimiter, the negative value is passed to memcpy() and converted to a near-SIZE_MAX length, corrupting kernel memory. YAPS streams are word aligned, so reject byte counts that cannot contain complete delimiters. Also reject delimiter sizes which do not leave any packet data after removing the reserved metadata page. Assisted-by: LLM Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Felix Hoffmann Link: https://patch.msgid.link/20261007093021.17132-1-f3lix.dev@gmx.de [remove Suggested-by and fix Assisted-by] Signed-off-by: Lachlan Hodges Signed-off-by: Sasha Levin commit c41e18d2d7576294985f526b366fab6dad7f4660 Author: Lorenzo Bianconi Date: Thu Oct 1 11:26:12 2026 +0200 net: stmmac: fix TX coalesce race and div-by-zero in XDP/legacy path [ Upstream commit 237782c3d416b392a12642f32959e9d3c94e0c26 ] tx_coal_frames[] is written by ethtool (stmmac_set_coalesce) and read locklessly from the TX fast path (stmmac_xmit, stmmac_tso_xmit, stmmac_xdp_xmit_zc and stmmac_xdp_xmit_xdpf), so pair every access with READ_ONCE()/WRITE_ONCE() to mark the intentional data race and read a consistent value into a local variable. Moreover, ethtool allows disabling TX coalescing by setting tx_max_coalesced_frames to 0: guard the modulo operation in stmmac_xdp_xmit_xdpf() against a zero tx_coal_frames[queue] to avoid a division by zero. Both issues were found by code inspection while extending the XDP TX path with multi-buff support, and neither has ever been triggered, so they are only theoretical. Tested on the Qualcomm RB3-gen2 board. Fixes: db2f2842e6f5 ("net: stmmac: add per-queue TX & RX coalesce ethtool support") Fixes: be8b38a722e6 ("net: stmmac: Add support for XDP_TX action") Signed-off-by: Lorenzo Bianconi Link: https://patch.msgid.link/20261001-b4-stmmac-xmit-mb-v4-1-664e0c3eb289@oss.qualcomm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 349bca68c6070e17dc16bdff59e2318a5d37509a Author: Dmitry Morgun Date: Sun Jul 12 15:15:49 2026 +0000 fs/ntfs3: check return values in indx_delete_entry() [ Upstream commit 131f7d7abf0f10edc6ea6b032f8a3908bdb13ce8 ] When the index tree collapses down to an empty root, indx_delete_entry() calls attr_set_size() and ni_remove_attr() for both ATTR_ALLOC and ATTR_BITMAP, but their return values are overwritten by the following call without being checked. In most other call sites of these functions the return value is checked, so add the same checks here in case an error at this point is meaningful. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Signed-off-by: Dmitry Morgun Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit 261f2027a643bebc15c0b64d6eb87988e8dd4e5d Author: Krzysztof Wilczyński Date: Fri Aug 14 07:05:21 2026 +0000 PCI/sysfs: Handle a malformed _DSM result in acpi_attr_is_visible() [ Upstream commit 1832dc1579aa7cc7cd41843770767e7a3ffa8364 ] Currently, the "label" and "acpi_index" attributes are created whenever the _DSM function 0 bitmap advertises the Device Name function, without evaluating that function. The documented ABI states that each attribute is created only if the firmware has given a name or an instance number to the PCI device. The bitmap says nothing about the object the function returns. Firmware that advertises the function but returns an object that cannot be parsed therefore produces attributes that exist and fail every read, as in the report below. Evaluate the Device Name _DSM when deciding attribute visibility and create each attribute only when the element it exports has a type the read path accepts, mirroring the checks performed at read time. The SMBIOS attribute group already follows this pattern by performing the DMI lookup in its is_visible() callback. The read side checks remain in place since the two evaluations happen at different times. This restores the behaviour from before commit 2fc59fe2ecdc ("PCI / pci-label: treat PCI label with index 0 as valid label"), which switched visibility from evaluating the function to checking only the function 0 bitmap. The check is now made for each attribute, not once for both. Fixes: 2fc59fe2ecdc ("PCI / pci-label: treat PCI label with index 0 as valid label") Closes: https://github.com/pciutils/pciutils/issues/175 Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260814070522.2327975-4-kwilczynski@kernel.org Signed-off-by: Sasha Levin commit be41eb0e6be74b6d8099ca30a883ca0561a564ca Author: Krzysztof Wilczyński Date: Fri Aug 14 07:05:19 2026 +0000 PCI/sysfs: Stop reporting _DSM failures as -EPERM [ Upstream commit 36f9bd09920ed71c1b79db397170412b2de22319 ] Currently, dsm_get_label() returns the literal -1 on every failure path. The sysfs read path passes that value to userspace as -EPERM. Reading the "label" or "acpi_index" attribute on a platform where the Device Name _DSM returns a malformed result then fails with: $ cat /sys/bus/pci/devices/0000:00:08.3/label cat: /sys/bus/pci/devices/0000:00:08.3/label: Operation not permitted Nothing in that path performs a permission check, and the read fails the same way for a privileged reader. The error code points at a cause that does not exist, and tools such as lspci report it on every invocation. Return -ENODEV when the device has no ACPI companion, and -EIO when the _DSM evaluation fails or returns an object that cannot be parsed. Other _DSM users in the tree report such failures the same way. The set of reads that succeed, and the bytes they return, stay the same. Only the error code of reads that already fail differs. Fixes: 6058989bad05 ("PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs") Link: https://github.com/pciutils/pciutils/issues/175 Signed-off-by: Krzysztof Wilczyński Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260814070522.2327975-2-kwilczynski@kernel.org Signed-off-by: Sasha Levin commit e0c7c544b01389edbc6e0abe2da0322bd8a4731c Author: bui duc phuc Date: Wed Oct 7 18:08:58 2026 +0700 ASoC: mediatek: mt8365: Handle constraint return value in FE startup [ Upstream commit 8de3f4e8e81148dd4cdd19e622d4be1fe07a7f52 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from mt8365_afe_fe_startup(). ASoC only treats 0 as success when marking the DAI as started, so .shutdown() can be skipped on rollback. Return 0 explicitly on success. Fixes: e1991d102bc2 ("ASoC: mediatek: mt8365: Add the AFE driver support") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20261007110858.509341-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6ecf4a537e67c4a80de79f47cf2efeff3efc438b Author: bui duc phuc Date: Wed Oct 7 18:08:57 2026 +0700 ASoC: mediatek: mt8189: Handle constraint return value in FE startup [ Upstream commit 1f234d33e42e7c38f3ea6012ca93ff579c43ed58 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from mt8189_fe_startup(). ASoC only treats 0 as success when marking the DAI as started, so .shutdown() can be skipped on rollback. Return 0 explicitly on success. Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20261007110858.509341-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5b4eda0d377a92598b24250b2e8121389f341047 Author: bui duc phuc Date: Wed Oct 7 18:08:56 2026 +0700 ASoC: mediatek: mt8188: Handle constraint return value in FE startup [ Upstream commit 71253751586b8ce37570b8e15cfbc74f0dd06c3d ] snd_pcm_hw_constraint_minmax() may return 1, which is then returned from mt8188_afe_fe_startup(). ASoC only treats 0 as success when marking the DAI as started, so .shutdown() can be skipped on rollback. Return 0 explicitly on success. Fixes: bf106bf09376 ("ASoC: mediatek: mt8188: add platform driver") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20261007110858.509341-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 28594a702ef1e8460f3bf1cfd9e068f5c663d43e Author: bui duc phuc Date: Wed Oct 7 18:08:55 2026 +0700 ASoC: mediatek: common: Handle constraint return value in FE startup [ Upstream commit 5fcdb40a4776cc6f8d3179aa9cf9663fc18c7861 ] snd_pcm_hw_constraint_integer() may return 1, which is then returned from mtk_afe_fe_startup(). ASoC only treats 0 as success when marking the DAI as started, so .shutdown() can be skipped on rollback. Return 0 explicitly on success. Fixes: 283b612429a2 ("ASoC: mediatek: implement mediatek common structure") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20261007110858.509341-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d00815d576eca10d8c683f9885ee1c18141d1a92 Author: Melissa Wen Date: Thu Sep 24 23:10:11 2026 +0200 drm/amd/display: copy function name into dcn_optc_lock_unlock_state trace event [ Upstream commit 624a5a158c2a49f07edba7f8653eeecca114921f ] Userspace trace tools that use libtraceevent to read binary buffer only see a kernel address when printing const char *. Use string macros in dcn_optc_lock_unlock_state to copy the function name into the trace event. Fixes: f1943a51f0f9 ("drm/amd/display: Add events log to trace OPTC lock and unlock") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Melissa Wen Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit ddcf39c69cb5ec02bd2a08c8ee4ce3f63749ead7 Author: Melissa Wen Date: Thu Sep 24 23:10:10 2026 +0200 drm/amd/display: copy function name into dcn_fpu trace event [ Upstream commit b4d41522012d91cd875cebdfd1a3bbb04eb863dd ] Userspace trace tools that use libtraceevent to read binary buffer only see a kernel address when printing const char *. Use string macros in dcn_fpu to copy the function name into the trace event. Fixes: 96ee63730fa3 ("drm/amd/display: Add control mechanism for FPU") Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Melissa Wen Reviewed-by: Tvrtko Ursulin Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit f12b138a44e1a0e51eac7b3b0936b921dc2022d7 Author: Melissa Wen Date: Thu Sep 24 23:10:08 2026 +0200 drm/amd/display: use right type for amdgpu_dc_performance event entries [ Upstream commit 99858eda764364bae733448c7eb79145d3d043ec ] Some amdgpu_dc_performance trace event params are passed as unsigned long but stored as uint32_t, cutting them off on 64-bit. Use the right type on entry fields and on printk use unsigned format accordingly. Fixes: 0cf5eb76e2b4 ("drm/amd/display: Add tracing to dc") Signed-off-by: Melissa Wen Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 1e065418bf47d950c4e80ca5d00a461dd47616ca Author: Melissa Wen Date: Thu Sep 24 23:10:07 2026 +0200 drm/amd/display: declare amdgpu_dm_atomic_state_template as an event class [ Upstream commit 6c4f8c5cc00326f6c709bff0d640d504c90862ca ] Don't create an amdgpu_dm_atomic_state_template event since this is just a template. Declare the template as an event class that will be used by actual event tracers. Fixes: e8a982355f96 ("drm/amd/display: Add tracepoint for amdgpu_dm") Signed-off-by: Melissa Wen Reviewed-by: Tvrtko Ursulin Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit bb17c7c0d27a44265be2bced4472ff3be7c0891f Author: Melissa Wen Date: Thu Sep 24 23:10:06 2026 +0200 drm/amd/display: fix vready offset assignment in dcn_optc_lock_unlock_state [ Upstream commit 3ad7f4ca58efd6c1216632c50873dfffdefbe3ff ] vready_offset is captured by optc_state, but the trace point entry is wrongly assigned to vupdate_offset. Fix vready_offset tracepoint field in dcn_optc_lock_unloack_state to record optc_state->vready_offset. Fixes: f1943a51f0f9 ("drm/amd/display: Add events log to trace OPTC lock and unlock") Signed-off-by: Melissa Wen Reviewed-by: Tvrtko Ursulin Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 346c7b70f5e4c0107ad945e78720d50cc4a34d92 Author: Melissa Wen Date: Thu Sep 24 23:10:05 2026 +0200 drm/amd/display: remove duplicated prev_p_state_change_support assignment [ Upstream commit 11e8f72b09a6a3c0950b9558abd37559dd098698 ] The prev_p_state_change_support trace entry is assigned and printed twice, remove the unnecessary duplicates. Fixes: 13b5ca42ca9c ("drm/amd/display: Add tracepoint for capturing clocks state") Signed-off-by: Melissa Wen Reviewed-by: Tvrtko Ursulin Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit e41a5a6eb14e555f8646cf79ab741003641d548d Author: Melissa Wen Date: Thu Sep 24 23:10:04 2026 +0200 drm/amd/display: assign missing trace entry in amdgpu_dm_dc_clocks_state [ Upstream commit ec167063dbf9fc66dc1364b6f9dd220c6742edeb ] disp_dpp_voltage_level_khz is declared and printed, but never assigned. So when using clock tracepoint the value of this clock is just garbage. Assign clk->disp_dpp_voltage_level_khz since this is stored in dc_clocks as other entries. Fixes: 13b5ca42ca9c ("drm/amd/display: Add tracepoint for capturing clocks state") Signed-off-by: Melissa Wen Reviewed-by: Tvrtko Ursulin Tested-by: Dan Wheeler Reviewed-by: Roman Li Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 9a40511a61a102bf6ddd045a9287d446cca3a528 Author: Shenghao Ding Date: Fri Oct 2 10:52:30 2026 +0800 ASoC: tas2781: Fix TAS2781/TAS5825 PPC version logic conflict [ Upstream commit 3a05cc2d739486fa3c63aa32e6653ce55dae4819 ] Fix cross-team code conflict in shared PPC version check path, ensure TAS2781 and TAS5825 apply their respective correct firmware parsing routines, eliminate version matching misbehavior between the two models. Fixes: f4ee43ae6ea8 ("ALSA: hda: Add TAS5825 support") Signed-off-by: Shenghao Ding Link: https://patch.msgid.link/20261002025230.1959-1-shenghao-ding@ti.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 51247a8f6a26cac8999c0b59e6cd69218a487584 Author: Wentao Liang Date: Tue Sep 15 05:45:52 2026 +0000 clocksource/drivers/timer-econet-en751221: Fix clock reference leak [ Upstream commit 36790ef57803400339d8ea4081d85483264dbd6c ] timer_init() obtains the timer clock with of_clk_get() and only reads its frequency with clk_get_rate(); the clock is never prepared nor enabled. All four return paths after the acquisition (of_iomap() failure, clocksource_mmio_init() failure, cevt_init() failure and success) return without clk_put(), leaking the consumer reference. Drop the reference with clk_put() right after the frequency has been read. The clock enable state is untouched. Fixes: 3b4c33ac87d0 ("clocksource/drivers: Add EcoNet Timer HPT driver") Signed-off-by: Wentao Liang Signed-off-by: Daniel Lezcano Tested-by: Caleb James DeLisle Link: https://patch.msgid.link/20260915054552.1729612-1-vulab@iscas.ac.cn Signed-off-by: Sasha Levin commit 43c36609cf3a1f2ed36e528da7ffc073d61cf789 Author: Ting-Han Hou Date: Wed Oct 7 03:44:13 2026 -0500 checkkconfigsymbols.py: Parse Git status output line by line [ Upstream commit 72a61a7fef954152abd9df9def4f94816eb344ca ] tree_is_dirty() iterates over the string returned by execute() one character at a time. Its status check therefore examines filenames as well as the two status columns. An otherwise clean tree containing an untracked README is reported as dirty because its name contains letters matched by [URMADC]. This prevents --commit and --diff from running, whereas an untracked notes.txt does not trigger the check. Split the output into lines before examining the two status columns so that filenames do not affect the dirty-tree check. Fixes: b1a3f243485f ("checkkconfigsymbols.py: make it Git aware") Assisted-by: LLM Signed-off-by: Ting-Han Hou Link: https://patch.msgid.link/CA+NtrhQqXgjT+4eg6W4P94Hc=DqdV3gQXz3EKKCxWvdWzfND6A@mail.gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 096e2e2964b519420b0c93f67c7e603f8635f8cc Author: Felix Fietkau Date: Wed Oct 7 13:24:19 2026 +0200 wifi: mt76: keep beacons from queueing the scan work during an abort [ Upstream commit 49701802948aadc573d84840853e04c9f1cf6777 ] mt76_abort_scan() clears beacon_wait and then cancels the scan work. A scan work that runs at that time can set beacon_wait again when it moves to a NO_IR or radar channel. After the cancel, a beacon on that channel makes mt76_scan_rx_beacon() queue the work again. The work then runs without dev->mutex while mt76_scan_phy_complete() removes the scan link, so mt76_scan_send_probe() can use the removed link. Reachable via mac80211 cancel_hw_scan, chanctx changes, interface removal and the mt7996 reset work. Disable the scan works instead of cancelling them, so that no beacon can queue them until the abort completes the scan. Enable them again with dev->mutex held, so that a scan that mt76_hw_scan() starts after the abort can always queue its work. Fixes: 360552c8592d ("wifi: mt76: support upgrading passive scans to active") Link: https://patch.msgid.link/20261007112419.1277594-9-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 7f58f0739fc37122b9d5899339249924c542ba8b Author: John Crispin Date: Wed Oct 7 13:24:17 2026 +0200 wifi: mt76: scan all radios of a request at the same time [ Upstream commit 3049a7f210adaa633e834a7e9e0fd3c6cf8600b4 ] A device with several radios on one wiphy has one scan state for the whole device, and mt76_hw_scan() picks the radio from the band of the first channel. A scan therefore covers one radio, and mac80211 visits the bands one after another. Run the scan on every radio that has a channel in the request, and let each radio visit only its own channels. Report the scan as complete once all radios are done, and as aborted if any of them aborted. Build the probe request from the IEs of the band of the channel and the common IEs, because a request can now hold the IEs of several bands. A driver can now set SINGLE_SCAN_ON_ALL_BANDS to scan all of its radios in parallel with one request. Signed-off-by: John Crispin Link: https://patch.msgid.link/20261007112419.1277594-7-nbd@nbd.name Signed-off-by: Felix Fietkau Stable-dep-of: 49701802948a ("wifi: mt76: keep beacons from queueing the scan work during an abort") Signed-off-by: Sasha Levin commit c2062e4a546b6db9867b42aadafa5adb11da8561 Author: Felix Fietkau Date: Wed Oct 7 13:24:14 2026 +0200 wifi: mt76: mt792x: compute the assoc RSSI from the chain signals [ Upstream commit 2d12f56631ef307e58651b560ccda1f324a059f9 ] mt792x_mac_rssi_iter() adds status->signal of auth and assoc response frames to the BSS RSSI average, which mt7921_mcu_sta_update() and mt7925_mcu_sta_update() send to the firmware as the station RCPI. mt7925 never sets status->signal, since mt76_rx_convert() computes it from the chain values later. The average is thus fed 0 dBm on mt7925. Compute the signal from the chain values, as mt76_rx_convert() and mt76_check_sta() do, and skip a frame without a valid chain signal. On mt7921, the average now follows the combined value instead of the strongest chain. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Link: https://patch.msgid.link/20261007112419.1277594-4-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 9b564ed8a7168bfe34deae7b6f6edbf4789b47c7 Author: Felix Fietkau Date: Wed Oct 7 13:24:13 2026 +0200 wifi: mt76: mt7921: fix of_node reference leaks in regd update [ Upstream commit 2f209a8dca88507bc094de370e582adefc55723e ] mt7921_regd_channel_update() and __mt7921_mcu_set_clc() never release the nodes returned by mt76_find_power_limits_node(), of_get_child_by_name() and mt76_find_channel_node(). Each regulatory domain change and each CLC update on a device with DT power limits leaks these references. Release every node after use. This relies on mt76_find_power_limits_node() also returning a reference for the fallback node, which it does since commit 3a62c9f7ec3d ("wifi: mt76: Fix of_node reference leak in mt76_get_rate_power_limits()"). Fixes: 09382d8f8641 ("wifi: mt76: mt7921: update the channel usage when the regd domain changed") Link: https://patch.msgid.link/20261007112419.1277594-3-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 812abb725c04d6355c7aaa9495a0a25e2ba6a980 Author: Felix Fietkau Date: Wed Oct 7 13:24:12 2026 +0200 wifi: mt76: report an aborted scan or ROC to mac80211 during a reset [ Upstream commit a45aea434cd7e0b4c3cea5a0ca4ebc54a6388a1c ] mt7996_mac_full_reset() and the L1 SER branch of mt7996_mac_reset_work() abort a running scan and remain on channel. mt76_scan_complete() and mt76_roc_complete() then skip ieee80211_scan_completed() and ieee80211_remain_on_channel_expired() while MT76_MCU_RESET is set. mac80211 clears a hardware scan only from the completion. After an L1 SER recovery, which does not restart the hardware, every later scan on the wiphy is then refused, and a remain on channel stays pending until userspace cancels it. After a full reset, ieee80211_restart_work() warns: WARN(test_bit(SCAN_HW_SCANNING, &local->scanning), "%s called with hardware scan in progress\n", __func__); Report an aborted scan to mac80211 in a reset as well, and an aborted remain on channel unless a hardware restart follows. On a restart, ieee80211_reconfig_roc() restarts a remain on channel that had not begun and ends one that had. Since the scan is reported as aborted, mac80211 does not continue it on the next band during the reset. Fixes: b36d55610215 ("wifi: mt76: abort scan/roc on hw restart") Link: https://patch.msgid.link/20261007112419.1277594-2-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 4968d64f25b00ae85ff5037088dfa8c8a1c38664 Author: Felix Fietkau Date: Wed Oct 7 13:24:11 2026 +0200 wifi: mt76: mt7996: refuse scan and ROC until the hardware restart is done [ Upstream commit 3807d0bfeef650d2b3b567e36d218b4cb3e31d4b ] mt7996_mac_restart() clears MT76_MCU_RESET before it loads the firmware again, and mac80211 adds the interfaces back only later, in ieee80211_reconfig() after ieee80211_restart_hw(). A scan or remain on channel that reaches mt76_hw_scan() or mt76_remain_on_channel() in between, for example a request that waited for dev->mutex during the reset, runs on a device that has no interfaces configured. Mark a full reset with MT76_RESTART and refuse a scan or remain on channel while it is set. Clear the flag in .start: ieee80211_reconfig() adds the interfaces back before it releases the wiphy lock, so no request runs in between. .reconfig_complete is not suitable, because mac80211 skips it when no interface is open, and the flag would then stay set. Fixes: c56d6edebc1f ("wifi: mt76: mt7996: use emulated hardware scan support") Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Link: https://patch.msgid.link/20261007112419.1277594-1-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit e03de909b152dea768343e9216f1f2d11c035eb3 Author: Karl Mehltretter Date: Sat Sep 12 00:20:29 2026 +0200 kobject: Fix the kobj_set_name reference in kset_register() kernel-doc [ Upstream commit 3aac49b236c137fa77b97968d25338a28c49f0f8 ] The kernel-doc comment of kset_register() refers to kobj_set_name, which does not exist. The name is kobject_set_name. Say kobject_set_name. Fixes: 1662cea4623f ("kset: fix memory leak when kset_register() returns error") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Randy Dunlap Link: https://patch.msgid.link/20260911222029.7267-1-kmehltretter@gmail.com [ Also drop the misplaced braces in "allocated by()". - Danilo ] Signed-off-by: Danilo Krummrich Signed-off-by: Sasha Levin commit ac66b72e053ffe6dcdd4197a6ef099f0470df3eb Author: bui duc phuc Date: Thu Sep 3 18:27:39 2026 +0700 ASoC: rockchip: rockchip_i2s: Handle runtime PM resume failures in set_fmt [ Upstream commit e9eb1854d16136006c6fe94c927b54b2b264b429 ] rockchip_i2s_set_fmt() calls pm_runtime_get_sync() before accessing hardware registers, but ignores its return value. If the runtime resume fails, the function continues to perform register accesses while the device state is undefined. Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() and return early on failure to avoid unpowered register accesses. Fixes: 53ca9b9777b9 ("ASoC: rockchip: i2s: Fix regmap_ops hang") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903112739.373621-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9d610a8ebfba4be86d08775d368b248f27dac2f7 Author: bui duc phuc Date: Thu Sep 3 18:27:38 2026 +0700 ASoC: rockchip: rockchip_sai: Handle runtime PM resume failures in set_fmt [ Upstream commit 39205bb7ed4fe74f0b5df58d9b6529ac2690303f ] rockchip_sai_set_fmt() calls pm_runtime_get_sync() before accessing hardware registers, but ignores its return value. If the runtime resume fails, the function continues to perform register accesses while the device state is undefined. Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() and return early on failure to avoid unpowered register accesses. Fixes: cc78d1eaabad ("ASoC: rockchip: add Serial Audio Interface (SAI) driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903112739.373621-1-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit f70275b7e45de9cf21e4de87e8405057ed6bcca9 Author: John Crispin Date: Tue Oct 6 22:59:36 2026 +0200 wifi: mt76: mt7996: disable the RX NAPIs before the DMA cleanup [ Upstream commit 7a5a3843178c61d99d939b231318692d08fff79b ] mt7996_unregister_device() leaves the RX NAPIs enabled, so mt76_dma_cleanup() deletes enabled NAPIs and destroys page pools that are still bound to them. On rmmod, the kernel warns in __netif_napi_del_locked() for every RX queue and in page_pool_disable_direct_recycling(). Until the IRQ tasklet is disabled, an interrupt can still schedule a NAPI that was already deleted. Disable every RX NAPI that was added before the MCU exit and the DMA cleanup. This includes the host RRO queues: mt76_dma_init() skips them, but mt7996_dma_rro_start() adds their NAPIs later when WED is not active, so a check for mt76_queue_is_wed_rro() would miss them. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: John Crispin Link: https://patch.msgid.link/20261006205936.669125-27-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 18ea70184f324414f673002c0dbbe39fcda7b702 Author: Felix Fietkau Date: Tue Oct 6 22:59:35 2026 +0200 wifi: mt76: mt7996: fix the hw-queues debugfs queue requests [ Upstream commit ef28298ab88bd7ba8d805fb8dfaaacd9246d5fbf ] The hw-queues debugfs file builds its own queue requests, and these do not match the register map of the MediaTek vendor driver: - The port ID goes to bits 11:10 of the PLE queue control register, but the field is at bits 17:16. Bits 11:10 are part of the WLAN index, so each request reads port 0 and, for a station, the WLAN index with bit 11 set. - The head and tail frame IDs, the packet count and the page counters are read as 12-bit fields, but they have 13 bits. - The PSE queues are read from the PLE empty and queue control registers, with bit positions that do not match the PSE queue map. - The station queues of MT7992 and MT7990 with a WLAN index from 512 to 543 are read from register 16, but these chips keep that group in the extension register at index 32. - The file iterates the stations of the same ieee80211_hw once for each band, so it shows each station queue up to three times. - mt7996_hw_queue_read() takes the private data of the file as a struct mt7996_phy, but it is a struct mt7996_dev. The dev member of the phy then aliases mt76.phy.dev of the device, which points back to the device, so the file works by chance. A queue request also writes the queue control register 0 and then reads the result from the queue control registers 2 and 3, without a lock. When the global and a per-station hw-queues file are read at the same time, one reader can get the result of the request of the other. Describe the PLE and PSE queues in tables with the field layout of the vendor register map, and send all queue requests through one helper, which holds a spinlock from the write of the request to the read of its result. A spinlock is needed because the station requests are sent from ieee80211_iterate_stations_atomic(). Iterate the stations once. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Link: https://patch.msgid.link/20261006205936.669125-26-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit f444270fffb284865edc7420f7333462e61dfe2c Author: Felix Fietkau Date: Tue Oct 6 22:59:34 2026 +0200 wifi: mt76: mt7996: fix PLE free page and AC queue register offsets [ Upstream commit c33af2e4622baafc56c565a13823f6b89d3f50db ] The PLE register map in the MediaTek vendor driver places the free page counter, the free page head and tail, and the HIF group page status at 0x3a0, 0x3a4 and 0x3a8. The driver reads them at 0x380, 0x384 and 0x388, and the vendor map has the band 1 TXCMD queue empty status at 0x388. The same map has 0x100 bytes per AC for the station queue empty bitmaps, with the MT7992 extension register at offset 0x80. The driver uses 0x80, which cannot hold the 34 registers per AC of MT7996, so the hw-queues file reads AC1 to AC3 of a station from the wrong register. Use the offsets of the vendor register map. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Link: https://patch.msgid.link/20261006205936.669125-25-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 2f942a18952f6aec10d9207ce045cdddea7f8764 Author: Howard Hsu Date: Tue Oct 6 22:59:27 2026 +0200 wifi: mt76: mt7996: do not add a station link in disconnected state [ Upstream commit ad8e618e4474dda22936a52757838ff990e6cda1 ] Since the driver uses the .sta_state op, mt7996_mac_sta_init_link() sends a STA_REC with CONN_STATE_DISCONNECT when a station link is set up. Before that change, the first STA_REC for a station was the one that connects it. MediaTek reports that DL OFDMA fails after a station reconnects. Only send a STA_REC for a station link when it connects. Until then the firmware has no STA_REC for the link, so track whether a link is connected, and skip rate control updates and the 4-address and decap updates for a link that is not. wcid.sta cannot be used for this, since it is set when the link is set up. Fixes: 13e2e9c6b348 ("wifi: mt76: mt7996: use mac80211 .sta_state op") Signed-off-by: Howard Hsu Link: https://patch.msgid.link/20261006205936.669125-18-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit ac3d1ee45e0ae3f60019192570b9ba32647af925 Author: Felix Fietkau Date: Tue Oct 6 22:59:26 2026 +0200 wifi: mt76: mt7996: keep 4-address and decap state per station [ Upstream commit 72f050d4b04e40f450573ffb95cb4717c8bbfefb ] mac80211 reports 4-address mode and decap offload once per station, through sta_set_4addr and sta_set_decap_offload. mt7996_sta_set_4addr() and mt7996_sta_set_decap_offload() set MT_WCID_FLAG_4ADDR and MT_WCID_FLAG_HDR_TRANS only on the links that exist at that moment, but the hardware keeps header translation per link. A link that is added later starts without the flags, and a link that is removed at that time keeps its old flags when it comes back, so the firmware gets the wrong to_ds/from_ds pair for that link. Keep both states in the station, and apply them to a link when the callbacks run, when the link is set up and when it comes back. Fixes: f520eceacd24 ("wifi: mt76: mt7996: Add mt7996_mac_sta_change_links callback") Fixes: e8c819df0243 ("wifi: mt76: mt7996: Destroy active sta links in mt7996_mac_sta_remove()") Link: https://patch.msgid.link/20261006205936.669125-17-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 76216f2a4299b177f497a0f7265abf926fc64787 Author: Felix Fietkau Date: Tue Oct 6 22:59:25 2026 +0200 wifi: mt76: mt7996: add the station BMC entry as new once per BSSID [ Upstream commit 854c8d4358272ad1204e9436996dec264fe334b1 ] A station link sends its broadcast STA_REC with EXTRA_INFO_NEW on every BSS_CHANGED_BSSID. Commit 8e3e7567b8c1 ("mt76: mt7915: add sta_rec with EXTRA_INFO_NEW for the first time only") notes that the firmware may remove an entry that is added as new twice. Since a removed vif link keeps its firmware entry, this happens on a link that is deactivated and activated again: _ieee80211_set_active_links() reports BSS_CHANGED_BSSID with the same BSSID, after ieee80211_key_switch_links() has installed the group keys of the link, and nothing in the driver installs them again after the entry is added as new. Record the BSSID the entry was added with, and add it as new only for a different BSSID. A BSSID that goes to zero on disconnection clears the record, so that the next association adds the entry as new again. A link that is set up clears the record as well, since the firmware has no entry for it then. Fixes: 08813703ac41 ("wifi: mt76: mt7996: Destroy vif active links in mt7996_remove_interface()") Link: https://patch.msgid.link/20261006205936.669125-16-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 1001d260e2773ce7ce4d148d8aac34070fe4ef7c Author: Felix Fietkau Date: Tue Oct 6 22:59:24 2026 +0200 wifi: mt76: mt7996: keep a returning link when adding station links fails [ Upstream commit 6541956cadc484eeed719e7a8e9e7d27e5900289 ] mt7996_mac_sta_add_links() removes all links that it was asked to add, with flush set, when one of them fails. A link that comes back after a removal kept its msta_link and may still have a firmware entry. The flush frees its msta_link and returns its WTBL index to wcid_mask, so a later station can be given an index whose entry still belongs to this station. Flush only the links that this call created, and remove a returning link again without flush. Fixes: e8c819df0243 ("wifi: mt76: mt7996: Destroy active sta links in mt7996_mac_sta_remove()") Link: https://patch.msgid.link/20261006205936.669125-15-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit c60af436ffb7b77226cfaa7cdb38282c2895ea03 Author: Felix Fietkau Date: Tue Oct 6 22:59:23 2026 +0200 wifi: mt76: mt7996: do not reuse the deflink of a removed station link [ Upstream commit 51773d5196a0b85884ad245aa788370c4c8ac58d ] mt7996_mac_sta_init_link() puts a new link in msta->deflink whenever the station has no primary link. A removed link keeps its msta_link until the station is removed, and the station has no primary link after one mt7996_mac_sta_change_links() call removes all of its links and adds others. If the removed primary link was in msta->deflink, the new link then overwrites it: both link slots point to the same msta_link, and the WTBL index of the removed link is lost, so mt7996_mac_sta_remove() never returns it to wcid_mask. Use msta->deflink only if no link slot of the station points to it, and allocate the msta_link otherwise. Choose the primary link as before. Fixes: e8c819df0243 ("wifi: mt76: mt7996: Destroy active sta links in mt7996_mac_sta_remove()") Link: https://patch.msgid.link/20261006205936.669125-14-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 8cdf7e5bfd741ac622cf966b513f56aece583925 Author: Felix Fietkau Date: Tue Oct 6 22:59:22 2026 +0200 wifi: mt76: mt7996: make a returning link primary if a station has none [ Upstream commit db6282754bcfa8b6ba9c4e1c02dff076247a96b9 ] mt7996_mac_sta_remove_link() clears deflink_id when it removes the primary link and no secondary link is left to take its place. If the removed link then comes back, mt7996_mac_sta_add_links() finds its existing msta_link and only marks it valid again. deflink_id stays IEEE80211_LINK_UNSPECIFIED, so the station has no primary link: the TXQs keep the WLAN index that they had before, seclink_id stays unspecified, mt7996_sta_rate_ctrl_update() finds no primary link, and mt7996_sta_set_4addr() treats every link as a secondary link. Make a returning link the primary link when the station has none, in the same way as mt7996_mac_sta_init_link() does for a new link. Move the two steps that set the primary link, and the switch to the secondary link on removal, to helpers. Fixes: e8c819df0243 ("wifi: mt76: mt7996: Destroy active sta links in mt7996_mac_sta_remove()") Link: https://patch.msgid.link/20261006205936.669125-13-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit f0d28b936114c71e8ba1b98621011d4e9d29b98e Author: Felix Fietkau Date: Tue Oct 6 22:59:21 2026 +0200 wifi: mt76: mt7996: pick the secondary link from links with driver state [ Upstream commit 53eadd11e92729976168d74f27345461a5e1ef46 ] mt7996_mac_sta_init_link() takes the secondary link from sta->valid_links. On a station interface mac80211 creates driver state only for active links, since drv_change_sta_links() masks both link sets with vif->active_links. With three valid links of which links 0 and 2 are active, seclink_id then points at link 1, which has no mt7996_sta_link. mt7996_tx_prepare_skb() maps odd TIDs to seclink_id, keeps the primary wcid for them and passes the inactive link id to mt7996_mac_write_txwi(), which finds no vif link and falls back to OMAC and WMM index 0. Choose the secondary link among the links that have driver state and are valid, and choose it again whenever such a link is added, restored or removed. A removed secondary link now hands over to another remaining link instead of the primary one, and a secondary link that was promoted to primary gets a successor. Fixes: 85cd5534a3f2 ("wifi: mt76: mt7996: use correct link_id when filling TXD and TXP") Link: https://patch.msgid.link/20261006205936.669125-12-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 98e45adaf4b978eeeaab4022a4c0e8d68de985cd Author: Felix Fietkau Date: Tue Oct 6 22:59:20 2026 +0200 wifi: mt76: mt7996: free the WTBL index if a link allocation fails [ Upstream commit 36f1934a2bf04f355e748c68ba7f7cbb5e6950fc ] mt7996_mac_sta_init_link() takes a WTBL index from wcid_mask before it allocates the msta_link of a link other than the first one. If that allocation fails, the function returns -ENOMEM and the index stays set in wcid_mask, so no later station can use it. Return the index to wcid_mask on that error. Fixes: dd82a9e02c05 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks") Link: https://patch.msgid.link/20261006205936.669125-11-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 891d1ee5a602fc6cf819842a21ef01db34f2fc06 Author: Felix Fietkau Date: Tue Oct 6 22:59:19 2026 +0200 wifi: mt76: mt7996: clear all link wcid entries in sta_pre_rcu_remove [ Upstream commit a53699a3d482a980efb016469b99ffac172280af ] mt76_sta_pre_rcu_remove() clears the wcid table entry of msta->deflink only. mac80211 calls it before the synchronize_net() that ends the RCU readers of the station, and frees the station right after mt7996_mac_sta_remove(). For an MLD station, the wcid table entries of the other links stay set until mt7996_mac_sta_remove(), after that grace period. An RX or TX status reader that looks up one of these entries in that window can follow msta_link->sta or def_wcid into the freed station. Clear the wcid table entries of all links of the station in .sta_pre_rcu_remove. Fixes: dd82a9e02c05 ("wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks") Link: https://patch.msgid.link/20261006205936.669125-10-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 06b1c3fed4a75ad99a5d3cc8ed8003385a9e674d Author: Felix Fietkau Date: Tue Oct 6 22:59:18 2026 +0200 wifi: mt76: mt7996: report station statistics from the primary link [ Upstream commit a9792846fbc62af2290552ab66b5a855415acaa8 ] mt7996_sta_statistics() and mt7996_ethtool_worker() read the TX rate, the TX counters and the ACK signal from msta->deflink. That is the msta_link of the first link of the station, not of its primary link. When the first link of an MLD station is removed, msta->deflink keeps the values of the removed link, and the station reports them until it is removed. Read them from the link that deflink_id selects. msta->deflink also holds the RX reorder state, the TX aggregation state and the def_wcid target of all links. These are state of the whole station, and wcid_to_sta() needs def_wcid at the start of drv_priv, so they stay there. Fixes: f520eceacd24 ("wifi: mt76: mt7996: Add mt7996_mac_sta_change_links callback") Link: https://patch.msgid.link/20261006205936.669125-9-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit a27f261f035480f99b9dc39659b8892498d07a21 Author: Felix Fietkau Date: Tue Oct 6 22:59:16 2026 +0200 wifi: mt76: mt7996: upload only the keys of the link being set up [ Upstream commit 2ec14ab42dfd195976bd834fecbcea00ae7da600 ] mt7996_vif_link_add() and mt7996_vif_link_destroy() walk the vif keys through mt7996_key_iter(), which passes every group key to mt7996_set_hw_key() for the link being set up. On an MLD interface each group key belongs to one link, as key->link_id says, so a new link gets the GTK and BIGTK of the other links written to its group WTBL entry, and its hw_key_idx set to their key index. Skip keys that belong to a different link, as mt7996_set_key() already does for keys that mac80211 installs. Fixes: eddc7286f6bb ("wifi: mt76: mt7996: fix key add/remove imbalance") Link: https://patch.msgid.link/20261006205936.669125-7-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 36cf2d63118354e017c764bcec612a38a1962314 Author: Felix Fietkau Date: Tue Oct 6 22:59:15 2026 +0200 wifi: mt76: mt7996: find the last MLD link among the links torn down [ Upstream commit 90abe74d274fad080dffaf3c671e5f31cee53a5b ] On disassociation, mt7996_mac_sta_event() sends STA_REC_MLD_OFF when the link it handles is the last of sta->valid_links, but it handles only active links with driver state. On a station interface with one active link out of two valid links, no link is ever the last one, so the firmware never gets STA_REC_MLD_OFF for the MLD. Walk the same set of links that mt7996_mcu_sta_mld_setup_tlv() describes, and detect the last link within that set. The per-link event handling moves into a helper that takes the set of links, so that a later change can bring up links that became active after association. Fixes: c1d6dd5d03eb ("wifi: mt76: mt7996: Add mt7996_mcu_teardown_mld_sta rouine") Link: https://patch.msgid.link/20261006205936.669125-6-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit b60d13e9ca9b609ab4f3c45bdda0ba2ea28518f0 Author: Felix Fietkau Date: Tue Oct 6 22:59:14 2026 +0200 wifi: mt76: mt7996: size the MLD setup TLV by the links it describes [ Upstream commit 24cc6d911e1d2f6ada086402f07b30b42fe6b545 ] mt7996_mcu_sta_mld_setup_tlv() sets link_num and the TLV length from hweight16(sta->valid_links), but fills an entry only for active links that have driver state. On a station interface mac80211 activates only the association link at first, and drv_change_sta_links() masks the other links with vif->active_links, so the driver has no state for them. A station with valid_links 0x3 and active_links 0x2 thus sends STA_REC_MLD with link_num 2 and a second entry of zeroes, at association and again at authorization. The zeroed entry names WTBL index 0 and BSS index 0 as a link of the MLD. Count the links with driver state first and describe exactly those, with the secondary id taken from them. A link removed without flush keeps its mt7996_sta_link but is no longer valid, so leave it out as well. Fixes: 00cef41d9d8f ("wifi: mt76: mt7996: Add mt7996_mcu_sta_mld_setup_tlv() and mt7996_mcu_sta_eht_mld_tlv()") Link: https://patch.msgid.link/20261006205936.669125-5-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit e676c1127ce85c58757e6df08ba8d698d1df8ed9 Author: Felix Fietkau Date: Tue Oct 6 22:59:13 2026 +0200 wifi: mt76: mt7996: update the address of an AP link that is added again [ Upstream commit cebf7dbfa14a39bdf3913f3fa7452d096c90c15b ] mt7996_vif_link_remove() only stops an AP link and keeps its BSS, so a link that is added again takes the early branch of mt7996_vif_link_add(). For other interface types that branch sends DEV_INFO with the new link address. For an AP it only restarts the link, and the firmware keeps the own MAC address the link had when it was first created. The hardware takes A2 of an encapsulation offload frame from that address. A reload that gives an AP MLD link a new address therefore makes every data frame on that link carry the old address as TA. The receiver acknowledges the frame by its RA but cannot find a key for the TA and drops it, so the AP counts no failure. The BSS_INFO update on BSS_CHANGED_BEACON_ENABLED restores the BSSID, but nothing sends DEV_INFO again. Send DEV_INFO for an AP link as well, before the link is restarted. Fixes: 08813703ac41 ("wifi: mt76: mt7996: Destroy vif active links in mt7996_remove_interface()") Link: https://patch.msgid.link/20261006205936.669125-4-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 4e66078c746ae06885138e3c20d1265898937856 Author: Felix Fietkau Date: Tue Oct 6 22:59:12 2026 +0200 wifi: mt76: mt7996: set sniffer mode on a radio that is already running [ Upstream commit 78072c1a661d643f341536219c19c28ba0a0fed3 ] mt7996_add_interface() skips a radio that has MT76_STATE_RUNNING set, and the skip covers both the start of the radio and the call to mt7996_set_monitor(). mt7996_init_wiphy_band() sets MT_WF_RFCR_DROP_OTHER_UC in phy->rxfilter on every band, and mt7996_configure_filter() does not clear it, so only mt7996_set_monitor() does. A monitor interface that is added while an AP runs on the same radio thus receives no unicast frame addressed to another device. Start only an idle radio, but put every radio of a monitor interface into sniffer mode. mt7996_remove_interface() already clears sniffer mode whether the radio runs or not. Fixes: 69d54ce7491d ("wifi: mt76: mt7996: switch to single multi-radio wiphy") Link: https://patch.msgid.link/20261006205936.669125-3-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 7ae0cf70142136a01f3d0a8acfda9840a244966b Author: Felix Fietkau Date: Tue Oct 6 22:59:11 2026 +0200 wifi: mt76: mt7996: enable the SKU power limit table [ Upstream commit 267424ac63aa65fb28b7f3cff1e1a7d0098c4d6f ] mt7996_mcu_set_txpower_sku() uploads the per-rate power limit table, but the firmware applies it only after the driver enables the SKU power limit. mt7915 does that in mt7915_mcu_set_sku_en(); mt7996 never does, so the radio keeps the EEPROM target power and the configured tx power has no effect. Add the power control command and enable the table per band in mt7996_run(), as the MediaTek vendor driver does. The backoff table stays disabled. This driver does not build the per-path limits; it pads that part of the message with zeros. Fixes: f75e4779d215 ("wifi: mt76: mt7996: add txpower setting support") Link: https://patch.msgid.link/20261006205936.669125-2-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 627aa59549d762cf4c392c0e1a1a957e97baa83e Author: Felix Fietkau Date: Tue Oct 6 22:59:10 2026 +0200 wifi: mt76: abort a scan only for a link change on the scanning radio [ Upstream commit c7a6b6a1dcc8fc0ac49ec0d7418b4603684e7d73 ] mt76_assign_vif_chanctx() and mt76_unassign_vif_chanctx() abort the scan whenever the scanning vif gains or loses a link, on any radio. An AP MLD that scans on one radio for ACS while its link on another radio comes up therefore loses the whole scan, and hostapd gets an aborted scan. mac80211 does not continue an aborted scan with the next band. The scan uses the link of the vif that mt76_get_vif_phy_link() returns for the scanning radio, so it needs to stop only for a channel context on that radio: the new link would duplicate the offchannel link, or the removed link is the one the scan uses. Abort only in that case, as mt76_add_chanctx() does. Fixes: e411b8190fe7 ("wifi: mt76: add multi-radio support to scanning code") Link: https://patch.msgid.link/20261006205936.669125-1-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit bd1d44bc1d6957a4fc3b35d3134f6900e73f1992 Author: Eason Lai Date: Mon Aug 17 13:28:39 2026 +0800 wifi: mt76: mt7925: Fix MCU command timeouts during module unload [ Upstream commit 79941e85f4b3b1385b545cf18998fda6e1176919 ] Move MT76_REMOVED flag setting from mt7925_pci_remove() to after mt76_unregister_device() completes. Setting it too early causes mt792x_irq_handler() to drop MCU completion interrupts, timing out teardown commands (scan abort, BSS_INFO_UPDATE, etc). The flag must still be set before napi_disable() to prevent reset_work from re-enabling NAPI and causing deadlock. Also guard mt792x_reset() to skip queuing work when device is removed. With nothing associated it still costs 9 to 10 seconds, so a bare rmmod does reach this, just small enough there to read as normal teardown. Fixes: eb628006a2c6 ("wifi: mt76: mt7925: Fix unregister deadlock") Tested-by: Devin Wittmayer Signed-off-by: Eason Lai Link: https://patch.msgid.link/20260817052840.99478-1-eason.lai@mediatek.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 92ad95b25506a515105eac39a9465e828d4c5053 Author: Mahesh Saran Date: Tue Oct 6 22:05:53 2026 +0530 wifi: mt76: mt7921: clear WM2 from MT7902 RX all_complete_mask [ Upstream commit 87b67aa8eb32cf89dab4c6df88d65e07fec46592 ] MT7902 does not have an MCU_WA ring and sets wm2_complete_mask to 0. However, commit 83c65e82e5b2 ("wifi: mt76: connac2: apply new rx all_complete_mask") populated all_complete_mask in the shared irq_map template with MT_INT_RX_DONE_ALL, which includes MT_INT_RX_DONE_WM2. Because MT7902 duplicates irq_map but only clears wm2_complete_mask, its all_complete_mask still contains MT_INT_RX_DONE_WM2. This leaves the MT7902 RX interrupt configuration inconsistent: the aggregate RX completion mask includes WM2 even though the corresponding RX queue is not present on MT7902. Clear MT_INT_RX_DONE_WM2 from all_complete_mask for MT7902 as well. Fixes: 83c65e82e5b2 ("wifi: mt76: connac2: apply new rx all_complete_mask") Signed-off-by: Mahesh Saran Link: https://patch.msgid.link/20261006163553.11193-1-maheshsaran477@gmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit fe95c1ab8ad0ab84746f2f70b3b03064b1d0c649 Author: Cristian Papa Date: Thu Sep 24 00:26:39 2026 -0300 wifi: mt76: feed the station RSSI average from the chain signals [ Upstream commit e1534fef1ae4df6e16401117394c26dbef84f361 ] mt76_check_sta() adds status->signal of every received frame to the station's RSSI average, wcid->rssi, which mt76_get_min_avg_rssi() reads for the dynamic sensitivity of mt7603 and mt7615 and for the gain control of mt76x0 and mt76x2. Since commit 4550fb9e9810 ("mt76: improve signal strength reporting"), drivers no longer set status->signal: mt76_rx_convert() computes it from the chain values when the frame is handed to mac80211, after mt76_check_sta() has run. Except on mt7921, which still sets it, the average is fed zeros. mt76_get_min_avg_rssi() then returns 0, so mt7603 and mt7615 leave the sensitivity at its default, and mt76x0 and mt76x2 fall back to -75 dBm for their gain settings. Compute the signal from the chain values in mt76_check_sta() as well, as mt76_rx_convert() does. On mt7921, the average now follows the same combined value that mac80211 gets instead of the strongest chain. Tested on a TP-Link Archer XR500v with one client, switching between the old and the new input every 30 seconds. On the MT7662E (mt76x2), the average the AGC works with was -75 dBm, its fallback, with the old input and -54 dBm with the new one, while iw reported -54 and -52 dBm for the station, and the AGC mostly used its low_gain 2 setting instead of 1. On the MT7603E, the station average was 0 with the old input and -41 dBm with the new one, while iw reported -42 and -41 dBm. The mt7603 sensitivity still stayed at its default: a separate bug keeps it from leaving 0. Fixes: 4550fb9e9810 ("mt76: improve signal strength reporting") Assisted-by: LLM Signed-off-by: Cristian Papa Link: https://patch.msgid.link/20260924032639.28158-1-pcristian292@gmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit abdeec45c282d9173555dccd953b60a82c9f6a49 Author: Slavin Liu Date: Fri Sep 11 14:09:22 2026 +0800 wifi: mt76: mt7996: guard station-only MLO TX handling [ Upstream commit fb03c4204498f300ffa3324f2e90df5742a2984d ] Pending frames can be retried after their station is no longer available. Require a station for both MLO-specific branches and retain the existing non-station transmission path for valid vif traffic. Detected by static analysis and reviewed with AI-assisted source auditing. Fixes: 7ef0c7ad735b ("wifi: mt76: mt7996: Implement MLD address translation for EAPOL") Fixes: 85cd5534a3f2 ("wifi: mt76: mt7996: use correct link_id when filling TXD and TXP") Assisted-by: LLM Signed-off-by: Slavin Liu Link: https://patch.msgid.link/20260911060922.94383-1-bolin.liu@seu.edu.cn Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 548ada8134683d8331dbb61c708a101830e1b1a5 Author: Pengpeng Hou Date: Sun Aug 30 21:10:49 2026 +0800 wifi: mt76: mt7615: validate MCU response lengths [ Upstream commit 356735fc612ea54062eb741ea15fa4ff7df4fc36 ] mt7615_mcu_parse_response() reads the common response header before checking its size and then consumes command-specific fields after unchecked skb_pull() calls. A short firmware response can therefore be read beyond its current extent. Validate the common header and each command-specific payload before reading it. Fixes: 0e6a29e477f3 ("mt76: mt7615: add support to read temperature from mcu") Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260830131049.2097-1-pengpeng@iscas.ac.cn Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 33c3b0105851a4619bcb0eb58bcc78a6710cd281 Author: Ahmed Naseef Date: Wed Aug 19 23:29:11 2026 +0400 wifi: mt76: mt7615: read MT7663 temperature from the correct offset [ Upstream commit 40217d8e6cba433a6ccb8c73737dd38b54dcc26f ] On MT7663 the hwmon temp1_input attribute always reads 0. mt7615_mcu_parse_response() takes the temperature from the first dword of the THERMAL_CTRL response payload, but MT7663 firmware reports it in the second one. On a DASAN H660GM-A (MT7663E, N9 firmware 7663mp1827) the request and its response are: request: 00 00 00 00 response: 00 00 00 00 2a 00 00 00 0x2a is the reading, 42 degrees, while the driver returns the leading zero. mt7915 and mt7921 already pull sizeof(*rxd) + 4 for this command. Restrict the extra pull to MT7663, as no MT7615 or MT7622 hardware was available to check whether their firmware uses the same layout. Fixes: f40ac0f3d3c0 ("mt76: mt7615: introduce mt7663e support") Signed-off-by: Ahmed Naseef Link: https://patch.msgid.link/20260819192911.1886457-1-naseefkm@gmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 798ede5b2bb38557f8f5acf5ae5af14b0ed21548 Author: Ethan Tidmore Date: Mon Aug 17 20:54:40 2026 -0500 wifi: mt76: mt7925: Remove useless condition [ Upstream commit 8db0381351fe6af82f81693d5085790e291b2f17 ] The condition (master_pref > NAN_MAX_MASTER_PREFERENCE) will always be false because the variable 'master_pref' is of type u8 and the macro 'NAN_MAX_MASTER_PREFERENCE' is equal to 255. Fixes: a5487a6824068 ("wifi: mt76: mt7925: add NAN MCU helpers") Signed-off-by: Ethan Tidmore Link: https://patch.msgid.link/20260818015440.875703-1-ethantidmore06@gmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit f2bdff69bd8dc8b85a5d79f41f37fc9b95b66943 Author: Ryan Leung Date: Thu Aug 20 12:45:01 2026 +0000 wifi: mt76: fix wcid->pktid corruption in mt76_wcid_cleanup() [ Upstream commit 158c1145fe7ddd82914011a00de7cc3262616b16 ] mt76_wcid_cleanup() releases dev->status_lock before calling idr_destroy(&wcid->pktid) to tear down the pktid idr. Meanwhile, mt76_tx_status_skb_add() from tx.c can concurrently insert into that same idr during tx completion handling: spin_lock_bh(&dev->status_lock); pid = idr_alloc(&wcid->pktid, skb, MT_PACKET_ID_FIRST, MT_PACKET_ID_MASK, GFP_ATOMIC); Since idr_destroy() runs outside the lock, it can execute concurrently with idr_alloc() on the same idr, corrupting its internal data structures. Because idr nodes are freed through the generic slab allocator, this corruption can resurface later as an unrelated-looking crash anywhere in the kernel that happens to reuse the same freed memory. Fix this by calling idr_destroy() before releasing dev->status_lock, so that the table teardown and any concurrent insertion are mutually exclusive. Closes: https://github.com/openwrt/openwrt/issues/24594 Fixes: bd1e3e7b693c ("mt76: introduce packet_id idr") Signed-off-by: Ryan Leung Link: https://patch.msgid.link/20260820-mt76-pktid-idr-race-v1-1-451f176a6495@protonmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 10100dcc12c82d9bf9a72d91892d16ac9a4cfe7e Author: Aamir Ahmed Date: Mon Sep 7 09:00:39 2026 +0000 wifi: mt76: mt7996: validate TLV length in mt7996_mcu_ie_countdown() [ Upstream commit e75897e6cb8b900d095acf6fbff1ffb026c86c35 ] mt7996_mcu_ie_countdown() iterates over TLV entries in the countdown event but only checks for a non-zero tlv->len. A malformed event with a TLV length smaller than the 4-byte TLV header advances the cursor by less than a header size, causing misaligned reads on subsequent iterations. A TLV whose declared length exceeds the remaining buffer is also not caught, so the cursor can overshoot the end. The band field of the event header is also read without checking that the event is long enough to contain it. This is the same class of bug fixed for mt7925 in commit fc7801b7f11d ("wifi: mt76: mt7925: fix infinite loop in UNI event TLV parsing"). Fix by checking that the event contains the header before reading the band, and that each TLV is large enough to contain the countdown notify payload and does not exceed the remaining buffer. Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Assisted-by: Claude (Anthropic) Signed-off-by: Aamir Ahmed Link: https://patch.msgid.link/AS8P251MB0001CCE8D1BEE1F330D9E57AC8B22@AS8P251MB0001.EURP251.PROD.OUTLOOK.COM Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit f891f6ac87604c97c9b1b4cad580a27df9338451 Author: Chris Scott Date: Fri Sep 18 19:16:59 2026 +1000 wifi: mt76: mt7996: refresh the tx BA session timer on NPU devices [ Upstream commit 43fa49b185832a3dac6845e6d30de44c87a91f16 ] mt7996_mac_add_txs_skb() refreshes mac80211's tx BlockAck session timer only when a WED device is active. Airoha boards offload through the NPU instead, so on those the condition is never true and nothing keeps the timer alive. NPU-forwarded frames do not traverse mac80211, and the only other places that stamp tid_tx->last_tx are in the software tx path. When the peer negotiates a non-zero BlockAck timeout in the ADDBA response (Intel stations commonly do, most others answer 0) mac80211 arms tid_tx->session_timer, which then expires in the middle of an offloaded transfer and tears the session down with a DELBA. The session does not come back on its own either: mt7996 restarts one from mt7996_tx_check_aggr(), reached via mt7996_txwi_free(), and offloaded frames carry no driver token so they never get there. mac80211's ieee80211_aggr_check() fallback needs RATE_CTRL_CAPA_AMPDU_TRIGGER, which mt7996 does not set. The reported symptom is a file transfer to an Intel client dropping from line rate to a few MB/s and staying there, with a single ping from the router - one frame on the software path - restoring it instantly. Extend the check with mt76_npu_device_active(). TXS reports do arrive for NPU-forwarded frames, measured at roughly 24 per second on a busy radio, which is far more than a seconds-scale session timer needs. A second user who independently saw the same collapse, held off only by a once-a-second ping from the AP, ran a patched image for 100 hours (~175 TB of offloaded iperf3 traffic, ~4 Gbit/s) without it recurring. Link: https://forum.openwrt.org/t/quantum-fiber-w1700k-support/222776/3900 Link: https://forum.openwrt.org/t/quantum-fiber-w1700k-support/222776/3901 Link: https://forum.openwrt.org/t/gemtek-w1700k-community-builds/249319/458 Fixes: 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver") Signed-off-by: Chris Scott Acked-by: Lorenzo Bianconi Link: https://patch.msgid.link/20260918091659.1176350-1-gilroyscott@hotmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 6d3acd3ec1cd45626d2bf469c867c78bb5f23c83 Author: Cristian Papa Date: Tue Sep 22 19:08:14 2026 -0300 wifi: mt76: mt7603: don't drop short frames looped back on PS entry [ Upstream commit 9956c4cac9d3f479817d6fe6a057aef3e86defcf ] When a station enters power save, mt7603 has the PSE redirect the frames still queued for it back to the host, and mt7603_rx_loopback_skb() parks them until the station wakes up. The handler rejects every frame shorter than a four-address header (sizeof(struct ieee80211_hdr), 30 bytes) before looking at it. A BlockAck request is 20 bytes and a QoS-Null 26, so both are freed without a trace. Since commit b473c0e47f04 ("wifi: mt76: mt7603: fix tx queue of loopback packets"), a BAR would also be freed later as a frame that is not a bufferable MMPDU, although mac80211 buffers BARs for a sleeping station like any other unicast frame. mac80211 queues the BAR with IEEE80211_TX_CTL_REQ_TX_STATUS, so it only learns about the loss when the tx status times out, and the recipient keeps waiting on its reorder window until then. Check the length against the header length of the actual frame, and park a BlockAck request on the queue of its TID, behind the data frames it refers to. Found on a TP-Link Archer XR500v (MT7603E) with a client whose Bluetooth coexistence toggles PM every ~15 ms under load. To test the change on its own, a temporary debugfs switch flipped between the old and the new checks every 30 seconds during a bidirectional TCP test, with counters on the loop-back path and on the tx status of BARs. With the old check, all 92 BARs that came back were freed, and 91 of the 544 BARs queued in those phases never got a tx status from the hardware. With this change, all 129 BARs that came back were parked and sent again, and 11 of 411 got no tx status. Throughput was the same with both checks. Fixes: e004b7006600 ("mt76: mt7603: notify mac80211 about buffered frames in ps queue") Assisted-by: LLM Signed-off-by: Cristian Papa Link: https://patch.msgid.link/20260922220814.15070-1-pcristian292@gmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 7166085c464022720d04bb4bd769de5fdb2faa44 Author: Ryan Leung Date: Sat Oct 3 04:01:04 2026 +0000 wifi: mt76: mt7915: fix thermal zone use-after-free [ Upstream commit 9be6ee96184c3f1219f2ab023345d22268e06833 ] The thermal zone registered via devm_thermal_of_zone_register() on the parent device is never torn down when the phy is unregistered, so the thermal core can still dereference it after the phy is freed. Unregister the thermal zone alongside the cooling device in mt7915_unregister_thermal(). Also clear phy->tzone and phy->cdev after unregistering so the function is safe to call when only a subset of the objects were registered, e.g. after a partially failed mt7915_thermal_init(). While at it, include the band index in the thermal zone registration warning to help identify which band failed on multi-band chips. Fixes: 313f1a27ebcb ("wifi: mt76: mt7915: add thermal zone device registration") Signed-off-by: Ryan Leung Link: https://patch.msgid.link/20261003-mt7915-unregister-thermal-v4-1-8ed55f6f5535@protonmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 1075e8ead19825b8567d92a0c1c1cd4a7a3407f5 Author: Jiale Yao Date: Fri Sep 25 23:05:55 2026 +0800 wifi: mt76: mt7615: usb: fix source overread in mt7663u_copy [ Upstream commit 0c2fcb5225361f71905697ef9db287b24bcc67cf ] mt7663u_copy() rounds up len to a multiple of four and uses the rounded length as the bound for memcpy() from the source buffer. When the caller's length is not four-byte aligned, the final copy reads up to three bytes past the source buffer. Keep the original length for the source copy and zero the remaining bytes in the transmit buffer so that the hardware access width remains four-byte aligned. Fixes: 6cb596ba84e3 ("mt76: usb: introduce __mt76u_init utility routine") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925150556.2304003-3-yaojiale02@163.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit bab0f5345030aec04b5410488dec49d139af1b85 Author: Jiale Yao Date: Fri Sep 25 23:05:54 2026 +0800 wifi: mt76: usb: fix source overread in mt76u_copy [ Upstream commit d435130cdd064b901d8ce5ada0322298e6a86a49 ] mt76u_copy() rounds up len to a multiple of four and uses the rounded length as the bound for memcpy() from the source buffer. When the caller's length is not four-byte aligned, the final copy reads up to three bytes past the source buffer. Keep the original length for the source copy and zero the remaining bytes in the transmit buffer so that the hardware access width remains four-byte aligned. Fixes: 9446248669968 ("mt76: speed up usb bulk copy") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925150556.2304003-2-yaojiale02@163.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 360c78349e76f84c704478279a4535415df9e4d7 Author: Devin Wittmayer Date: Wed Sep 23 10:24:24 2026 -0700 wifi: mt76: mt792x: defer the MCU shutdown past unregister on USB [ Upstream commit 3c334603f0ecd0ce3db05c068ba775e6e37b7c72 ] The USB disconnect path abandons the MCU before it unregisters, so the teardown commands that follow cannot be answered. The response parser reads the silence as a timeout and starts a chip reset for each one, queueing the work that was cancelled nine lines earlier and reloading firmware onto a device being removed. Shut the MCU down after unregister instead. MT7921AU on a Pi 5, eight unload cycles per arm: unload 5.67 s -> 2.81 s MCU timeouts 8 -> 0 reset queued 8/8 -> 0/8 Deauthorizing the port with the link up, to cover a surprise removal, goes from 3.21 s to 0.33 s. Fixes: 7910bd565d8b ("wifi: mt76: mt792x: quiesce USB paths on disconnect") Tested-by: Eason Lai Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260923172424.24021-1-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 0f8b0fb734897435647fc5140bf62c7b2b6c0c4b Author: Mark Anthony Agarro Date: Mon Oct 5 20:14:25 2026 -0700 wifi: mt76: mt7925: keep the join ROC until the station is authorized [ Upstream commit ac22c8c723c62013dd45b74e32249fc877c86fe0 ] When a non-MLO station associates, mgd_complete_tx() aborts the join ROC as soon as the association succeeds, which is right before the supplicant sends message 2 of the 4-way handshake. With the abort that close to message 2, the adapter acknowledges nothing the AP sends for the next several ms: the AP sends message 3 and its seven retries within about 5 ms, none is acknowledged, and the handshake ends with reason 15 (4WAY_HANDSHAKE_TIMEOUT). Keep the ROC after a successful (re)association on a non-MLD station interface and release it when the station is authorized, on disassociation, or when the station is removed. The ROC timer still ends it if none of that happens. MLD interfaces keep the old behaviour: there the ROC that is active at this point is the MLO ROC set up by mt7925_mac_set_links(), and holding it makes mt7925_set_mlo_roc() fail with -EBUSY in the link activation work, which leaves one link instead of two. Tested by a reporter on an MT7925U (USB) against a FRITZ!Box 5690 Pro on a 6 GHz-only, non-MLO SSID, kernel 7.2.3, from traces and monitor captures taken in separate runs: handshakes first M3 acked abort before M2 unpatched 8 of 84 0 of 83 84 of 84 this patch 30 of 30 31 of 31 0 of 30 With the patch the AP sends message 3 once and the adapter acknowledges it straight away; the ROC is released right after the station is authorized. A 20 ms delay after the abort instead of this change gave 15 of 15, which points at the abort timing and not at the delay. Tested here on an MT7925 and an MT7927 (PCIe), kernel 7.3.0-rc4: on a non-MLO SSID neither build showed the failure (1 stalled handshake in 110 unpatched, none patched), so no effect could be measured there. On an MLO connection the change is inert: 16 of 16 link activations succeeded in two rounds per build, with two active links and the same ROC order as before. Not tested: other APs, other USB parts, MT7927 over USB, MLO connections beyond the check above. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Reported-by: Mark Junker Closes: https://github.com/morrownr/mt76/issues/106 Tested-by: Mark Junker Signed-off-by: Mark Anthony Agarro Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20261006031425.20922-1-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 5a16c3533c4bc879104de84f877ffff8dfed1442 Author: Mark Anthony Agarro Date: Mon Oct 5 13:38:46 2026 -0700 wifi: mt76: mt7921: keep the join ROC until the station is authorized [ Upstream commit 6f591a4bb5d9a6a4a28f3f2fd77f394ddbcc4e05 ] When an association succeeds mac80211 calls mgd_complete_tx(), and mt7921 aborts the join ROC there. The AP starts the 4-way handshake right away, so the abort lands where message 3 arrives. On an MT7922 this loses message 3 often enough to matter: the supplicant sends message 2 (acked), never receives message 3, and the connection ends with reason 15 (4WAY_HANDSHAKE_TIMEOUT) after about 3.3 s. The mt7925 capture in the linked issue shows the same ordering: abort, message 2 out, then message 3 retried by the AP several times without an answer. Keep the ROC after a successful (re)association on a station interface and release it when the station is authorized, on disassociation, or when the station is removed. The ROC timer still ends it if none of that happens. The state lives in a flag in struct mt792x_vif so that an unrelated ROC, for example a user remain-on-channel, is never aborted by the authorize hook. Tested on an MT7922 (PCIe), kernel 7.3.0-rc4, WPA3-SAE AP, two rounds of 20 disconnect/reconnect cycles per build in the same boot, unpatched and patched in ABAB order: unpatched 34 of 73 association attempts: M1 rx, M2 tx acked, no M3, reason 15 patched 0 of 40 Delaying the abort by 20 ms before it made no difference (8 of 29), and delaying 20 ms after it removed the failures (0 of 20), so what matters is where the abort lands relative to the handshake. The firmware behaviour after the abort is inferred from these outcomes, not observed directly. Not tested: MT7921 and other connac2 parts, USB and SDIO, APs other than the one above, open or WPA2 networks, scheduled scan, suspend and resume. Fixes: 41ac53c899bd ("wifi: mt76: mt7921: introduce chanctx support") Link: https://github.com/morrownr/mt76/issues/106 Signed-off-by: Mark Anthony Agarro Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20261005203846.239445-1-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 3eea7a9905064911a08e9f388130f89407b4d322 Author: Andrei Rusu de Castro Date: Sun Oct 4 15:49:02 2026 +0000 wifi: mt76: mt7925: keep MLD membership consistent during link add [ Upstream commit dd3f17ef69ed6d0085cd94a15b9dec227b4ebfb1 ] mt7925_mac_link_sta_add() sends an ASSOC update for the primary WCID before sending the update for a new secondary WCID. The new link is published in msta->link[] and msta->valid_links only after both commands succeed. Selecting the secondary entry from the subject of each command gives the primary STA_REC_MLD one link and the secondary STA_REC_MLD two links. Enumerating published links alone still omits the pending link from the primary command. Firmware-bound command captures reproduce this n=1/n=2 sequence during a secondary addition. Build each MLD TLV from the station's published links and an explicit pending link. Pass the initialized pending link through both add-time station updates, including the update whose subject is the primary. Keep the primary first, bound entries by the firmware array, and skip links without station and BSS state. Other update callers have no pending link. This leaves msta->link[] publication after successful link setup and preserves the existing add-failure cleanup. The pending pointer is used synchronously to populate the command, not stored in shared state. Fixes: ff643b81bc38 ("wifi: mt76: mt7925: pass mlink and mconf to sta_mld_tlv()") Link: https://lore.kernel.org/linux-wireless/066b30cc-a9e6-4aeb-964d-71551e8ea3ef@posteo.de/ Signed-off-by: Andrei Rusu de Castro Tested-by: Devin Wittmayer Tested-by: Jonas Hort Link: https://patch.msgid.link/20261004-mt7925-mld-v2-248bb5e6404f@empyreal.works Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 2b573a5725ed4ac4e75b9981102041dc2f99b26f Author: Arnd Bergmann Date: Mon Sep 28 16:51:44 2026 +0200 wifi: mt76: mt7996: add NET_AIROHA dependency [ Upstream commit 29329dfa41de31f8adc7ff0aac0abccb555bb738 ] MT7996E fails to link as build-in when NET_AIROHA=m: WARNING: unmet direct dependencies detected for MT76_NPU Depends on [m]: NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_MEDIATEK [=y] && (NET_AIROHA_NPU [=y]=y [=y] || MT76_CORE [=y]=NET_AIROHA_NPU [=y]) && (NET_AIROHA [=m] || !NET_AIROHA [=m]) Selected by [y]: - MT7996_NPU [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_MEDIATEK [=y] && MT7996E [=y] && (NET_AIROHA_NPU [=y]=y [=y] || MT76_CORE [=y]=NET_AIROHA_NPU [=y]) arm-linux-gnueabi-ld: drivers/net/wireless/mediatek/mt76/npu.o: in function `mt76_npu_init': npu.c:(.text.mt76_npu_init+0x4c): undefined reference to `airoha_ppe_get_dev' arm-linux-gnueabi-ld: npu.c:(.text.mt76_npu_init+0xf8): undefined reference to `airoha_ppe_put_dev' Add another dependency to prevent this configuration, with an explicit special case to allow the NPU to be used while the PPE code is stubbed out with NET_AIROHA=n. Fixes: 377aa17d2aed ("wifi: mt76: mt7996: Add NPU offload support to MT7996 driver") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20260928145210.3153783-1-arnd@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 9ad5277a9b5339ad72385b0351c53319596f4679 Author: Jiale Yao Date: Fri Sep 25 23:27:54 2026 +0800 wifi: mt76: mt76x02: validate RX padding before use [ Upstream commit baf375ca58eaa24503f9febac75c056852694c3a ] The RX descriptor provides L2 and PN padding lengths that are used to locate the CCMP IV and determine how many bytes to remove from the packet. These lengths are not checked against the received skb length before the IV is read or mt76x02_remove_hdr_pad() is called. Reject frames whose IV does not fit within the skb or whose header padding would extend past the end of the skb. Fixes: 30ce7f4456ae ("mt76: validate rx CCMP PN") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925152754.2323624-1-yaojiale02@163.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 11b56b4461ff5a779d113a00e4579bc3a0359ad9 Author: Charlie-cy Wu Date: Wed Sep 30 16:31:02 2026 +0800 wifi: mt76: connac2: fill TXD spe_idx for connac2 fixed-rate frames [ Upstream commit e9fd0a209ff7f646e6ce9221a73c92c4912175c7 ] On connac2 chipsets - MT7920, MT7921 and MT7922 - the spe_idx of fixed-rate frames was never programmed, so every management frame - auth and assoc req included - went out 1SS 1T on WF0 instead of 1SS 2T duplicate, giving up ~3dB of array gain during connection setup, which is exactly when the link budget is worst. mt76_connac2_mac_write_txwi() takes the MT_TXD2_FIX_RATE path for any non-data frame, but the block filling MT_TXD7_SPE_IDX was guarded by !is_connac2(), leaving the field at 0. As spe_idx 0 also encodes "WF0" the hardware happily transmitted on a single path. Drop the guard so connac2 fills the index like the other generations do. Do not set MT_TXD6_SPE_ID_IDX along with it: on connac2 that bit points the hardware at the WTBL instead of the TXD, and the WTBL spe_idx is still 0 while connecting, so setting it puts the frames back on WF0. This matches connac3, where SPE_IXD_SELECT_TXD is 0 and SPE_IXD_SELECT_BMC_WTBL is 1, and is the opposite of what the falcon firmware macro name HAL_MAC_TX_DESC_SET_FR_SPE_IDX_SPE_BY_TXD suggests. Guard the duplicate fallback with hweight8() as well: ant_to_spe[] maps a single-antenna mask to 0 too, so without the check a user asking for one antenna would still get spe_idx 24 and duplicate onto both paths. Verified on MT7922: TXD DW7 spe_idx now reads 0x18 and the in-chip sniffer reports spe_idx 0x18 in the TXV of auth and assoc req, where it previously reported 0x0. MT7920 and MT7921 share the same connac2 TXD path and are fixed by the same change. Fixes: 5c81a4f182d9 ("wifi: mt76: connac: use is_connac2() to replace is_mt7921() checks") Signed-off-by: Charlie-cy Wu Link: https://patch.msgid.link/20260930083103.1284937-1-jb.tsai@mediatek.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 31302510436cf903fe32e28bb833b3ce1774e4bd Author: Ryan Leung Date: Fri Aug 21 13:26:43 2026 +0000 wifi: mt76: fix wcid teardown ordering in mt76_reset_device() [ Upstream commit 5cebbd7a87df834efe002c8e54211e6adc99703a ] mt76_reset_device() tears down each wcid's pktid idr before clearing dev->wcid[i], which is the reverse of the ordering used on the sta removal path. Until the pointer is cleared, a concurrent lookup under status_lock can still find the wcid and access its already destroyed idr. Clear dev->wcid[i] before calling mt76_wcid_cleanup(), reproducing the ordering mac80211 already enforces for normal sta removal (where mt76_sta_pre_rcu_remove() clears dev->wcid[idx] before mt76_wcid_cleanup() runs via the .sta_state callback). Fixes: 065c79df595a ("wifi: mt76: mt7915: fix list corruption after hardware restart") Signed-off-by: Ryan Leung Link: https://patch.msgid.link/20260821-mt76-wcid-null-before-cleanup-v1-1-0e364d9062d6@protonmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit bb4fef74d4cd422f9bcdc70e13bb773deaca703c Author: Ryan Leung Date: Fri Aug 21 11:42:49 2026 +0000 wifi: mt76: fix unlocked wcid check in mt76_tx_status_skb_add() [ Upstream commit cfb05250ded4d6de09dfd273c2a72092f48b55a3 ] mt76_tx_status_skb_add() checks rcu_access_pointer(dev->wcid[wcid->idx]) before taking dev->status_lock, then allocates a pktid afterwards. A concurrent mt76_wcid_cleanup() can run between the check and the lock, letting a stale wcid be re-added to dev->wcid_list after teardown. Worse, the check only tests for a non-NULL slot, so it also passes if a different wcid has since been published at the same idx. Move the check under status_lock, alongside idr_alloc(), and compare identity (rcu_access_pointer(dev->wcid[wcid->idx]) != wcid) instead of just testing for non-NULL, so that a reused index is correctly rejected. Fixes: fcfe1b5e162b ("mt76: fix tx status related use-after-free race on station removal") Signed-off-by: Ryan Leung Link: https://patch.msgid.link/20260821-mt76-stale-wcid-race-v2-1-8f41ee96fb73@protonmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit a514f9a45cc7501fa6edfb7ce20b58b537731afc Author: Ryan Leung Date: Fri Aug 21 09:00:01 2026 +0000 wifi: mt76: mt7915: publish wcid before MCU add commands [ Upstream commit a2d1c02c59f84e982179751bced5fb2fd5bb4212 ] mt7915_add_interface() enables the BSS/STA in firmware via mt7915_mcu_add_bss_info() and mt7915_mcu_add_sta() before publishing dev->mt76.wcid[idx] with rcu_assign_pointer(). Firmware can start generating tx-status/tx-free events referencing that wcid as soon as it processes those MCU commands, but mt76's rx/tx-free handlers (e.g. mt7915_mac_tx_free()) look up dev->mt76.wcid[idx] to service them, and won't find it published yet. This can lead to memory corruption and kernel crashes shortly after an AP interface is brought up. This ordering was introduced by commit 8e3e7567b8c1 ("mt76: mt7915: add sta_rec with EXTRA_INFO_NEW for the first time only"): mt7915_mcu_add_sta() derived its "newly added" flag from !rcu_access_pointer(dev->mt76.wcid[idx]), so the publish had to happen after that call. Commit 33eb14f10290 ("wifi: mt76: mt7915: use mac80211 .sta_state op") later replaced that flag with a caller-supplied `newly` argument to mt7915_mcu_add_sta(), now simply hardcoded to true, so the ordering is no longer required. Move the rcu_assign_pointer() before the MCU add_bss_info/add_sta calls, so that the wcid is visible to lookups before firmware is told it's live. This makes the ordering symmetric with mt7915_remove_interface(), which keeps the pointer published until after the MCU disable commands have been issued. Closes: https://github.com/openwrt/openwrt/issues/24594 Fixes: 8e3e7567b8c1 ("mt76: mt7915: add sta_rec with EXTRA_INFO_NEW for the first time only") Signed-off-by: Ryan Leung Link: https://patch.msgid.link/20260821-mt7915-wcid-publish-order-v2-1-acf0b7f32cbd@protonmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 64463f2840e6693a2d1386a18dd389aa3ac83563 Author: Devin Wittmayer Date: Wed Aug 26 16:10:29 2026 -0700 wifi: mt76: mt7921: honour FIF_FCSFAIL instead of hardcoding drop_err [ Upstream commit f8794eb3ff6dedbba0337c5197626b62da0ef057 ] When a monitor interface asks to see frames that failed their checksum, mac80211 passes the request down to the driver. mt7921 works out the answer, sends it to the firmware as a receive filter, and then configures the sniffer with a hardcoded byte telling it to drop those frames anyway. The answer is used once and never kept, so the sniffer never gets to see it. That matters to anyone using monitor mode to judge a link honestly, which is most of the reason to be in monitor mode at all. Mark Anthony Agarro posted the same change for mt7925: keep what mac80211 asked for on the phy, and read it back when the sniffer is configured. This does that for mt7921, and applies on top of it, since that patch is what adds the field. https://lore.kernel.org/linux-wireless/20260826091757.469953-1-markanthonyagarro@gmail.com/ The stored value is read in one place only, configuring the sniffer, which has a single caller, and that call sits inside a branch reached only by a monitor interface. Nothing else changes. Measured on an MT7922 with a read-only probe on the command as the driver sends it, so these are the driver's own bytes rather than an inference from what came back: request arm drop_err none stock 1 1 1 1 none patched 1 1 1 1 fcsfail stock 1 1 fcsfail patched 0 0 Stock sends the drop byte whether or not anyone asked for it. Patched sends it only when nobody did. Withdrawing the request and making it again inside one driver load moves the byte back and forth, 0 then 1 then 0 across three changes, so nothing sticks once set. If it does appear to stick when trying this against an MT7927, that is mac80211 rather than the driver. It raises the filter count unconditionally when a monitor comes up, but skips lowering it again for drivers that set NO_VIRTUAL_MONITOR, and that is the only chip in this family which does. Fixes: 914189af23b8 ("wifi: mt76: mt7921: fix channel switch fail in monitor mode") Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260826231029.39632-1-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit a65fe902042aa1e15106bb5f637680c27100d130 Author: Mark Anthony Agarro Date: Wed Aug 26 05:17:57 2026 -0400 wifi: mt76: mt7925: honour mac80211's FIF_FCSFAIL instead of hardcoding drop_err [ Upstream commit 31b53a9c4ada2ce49201ed0da0105819acfd86bf ] mt7925_mcu_config_sniffer() hardcodes drop_err = 1, ignoring what mac80211 actually requested via configure_filter(). FIF_FCSFAIL is computed there but discarded instead of persisted. Persist the FCSFAIL bit on the phy in mt7925_configure_filter() and read it back in mt7925_mcu_config_sniffer() to derive drop_err, so the firmware sniffer only passes through unfiltered/marginal frames when a monitor listener actually requested them. mt7925_mcu_config_sniffer() is only reached from mt7925_change_chanctx(), which is itself only exercised on a monitor-mode chanctx, so this stays scoped to monitor mode. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Tested-by: Devin Wittmayer Signed-off-by: Mark Anthony Agarro Link: https://patch.msgid.link/20260826091757.469953-1-markanthonyagarro@gmail.com Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 0949f98eb294cfc80f640c2c97d176c45de97a76 Author: Devin Wittmayer Date: Sat Aug 29 23:42:01 2026 -0700 wifi: mt76: mt7925: fix the lock inversion in suspend and resume [ Upstream commit a105a9fe9a07a56d1e0b5a6978a49cde2ac7e7be ] Same as the previous patch, other driver. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260830064201.92285-3-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 5c7c713c69b7b72d5ac2dd631253bb22521c9c04 Author: Devin Wittmayer Date: Sat Aug 29 23:42:00 2026 -0700 wifi: mt76: mt7921: fix the lock inversion in suspend and resume [ Upstream commit 0e6472108d51a42272332f5b6a95871244b64301 ] Same inversion as the config path, same one word fix, missed the first time. Both are called with the wiphy mutex held, so the walk can rely on that instead of taking the list mutex. No new splat: same class pair as the accepted fix, and lockdep reports a pair once per boot. Fixes: ffa1bf97425b ("mt76: mt7921: introduce PM support") Link: https://patch.msgid.link/20260810045338.118923-2-lucid_duck@justthetip.ca Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260830064201.92285-2-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 6463168b2e77f487ad96ebfe427b0436a693e0ce Author: Felix Fietkau Date: Thu Aug 27 18:21:15 2026 +0200 wifi: mt76: mt7925: restore the reset state when fw_pmctrl fails [ Upstream commit 8d2f5990cd429a2fe5fff05f7acf84d6799d4324 ] mt7925e_mac_reset() returns directly when mt792xe_mcu_fw_pmctrl() fails, leaving MT76_RESET set and the TX worker parked. Every other error path jumps to out, which clears both. mt7925_mac_reset_work() clears neither, so once every reset attempt fails there, TX stays blocked until another reset succeeds. Jump to out instead. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Link: https://patch.msgid.link/20260827162115.1449757-1-nbd@nbd.name Acked-by: Lorenzo Bianconi Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 368e9502de461c852546057c54d5babb310433cb Author: Devin Wittmayer Date: Sun Aug 9 13:55:59 2026 -0700 wifi: mt76: mt7925: check drv_pmctrl return in the PCIe reset path [ Upstream commit d12a54be2604ecd23a1e9ac863583e34034aadde ] mt7925e_mac_reset() ignores the return value of mt792xe_mcu_drv_pmctrl(), unlike the two pmctrl calls later in the same function. When the driver-own handshake fails, __mt792xe_mcu_drv_pmctrl() returns -EIO without reinitialising WPDMA or clearing MT76_STATE_PM, and the reset carries on: it writes the interrupt enable registers, cycles NAPI, resets WPDMA and calls mt7925_run_firmware() on a chip the driver does not own. Return the error instead. The call is the first statement in the function, before MT76_RESET is set and before the TX worker and NAPI are disabled, so nothing needs unwinding. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260809205559.32116-1-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit cccd35c44516eb16ea375cc351a61faef3b699f6 Author: Devin Wittmayer Date: Sat Aug 8 18:23:09 2026 -0700 wifi: mt76: mt7921: check drv_pmctrl return in the PCIe reset path [ Upstream commit 75673ab3c0e4186628e0a76b94443cddfbeca255 ] mt7921e_mac_reset() ignores the return value of mt792xe_mcu_drv_pmctrl(). When the driver-own handshake fails, __mt792xe_mcu_drv_pmctrl() returns -EIO without reinitialising WPDMA or clearing MT76_STATE_PM, and the reset carries on: it writes the interrupt enable registers, cycles NAPI, resets WPDMA and downloads firmware to a chip the driver does not own. Return the error instead. The call is the first statement in the function, before any teardown, so nothing needs unwinding. Reported-by: moosager Link: https://lore.kernel.org/linux-wireless/anG46qbvCqCHGF-f@fedora.fritz.box/ Fixes: dfc7743de1eb ("mt76: mt7921: refactor mcu.c to be bus independent") Signed-off-by: Devin Wittmayer Tested-by: moosager Link: https://patch.msgid.link/20260809012309.43657-1-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit b81aee259e5397393500e48dcf593216414b8271 Author: Devin Wittmayer Date: Sun Aug 9 21:53:38 2026 -0700 wifi: mt76: mt7925: fix lock inversion between dev->mutex and iflist_mtx [ Upstream commit 3208623121309a42f878364aff3c770f597d6a70 ] mt7925_config() has the same inversion as mt7921_config(): it holds dev->mutex across ieee80211_iterate_active_interfaces(), which takes local->iflist_mtx, while mac80211 calls drv_unassign_vif_chanctx() with iflist_mtx already held. .config is only reached through drv_config(), which asserts the wiphy mutex, so use ieee80211_iterate_active_interfaces_mtx() here too. Fixes: c948b5da6bbe ("wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips") Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260810045338.118923-3-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 12916793343c9084298eeccf92720bf48c1ee8f6 Author: Devin Wittmayer Date: Sun Aug 9 21:53:37 2026 -0700 wifi: mt76: mt7921: fix lock inversion between dev->mutex and iflist_mtx [ Upstream commit 3dcb98c5cb51a70750ae8dc006d6d787ca09f425 ] mt7921_config() holds dev->mutex across ieee80211_iterate_active_interfaces(), which takes local->iflist_mtx. mac80211 uses the opposite order: ieee80211_del_virtual_monitor() holds iflist_mtx while calling drv_unassign_vif_chanctx(), and mt792x_unassign_vif_chanctx() takes dev->mutex. Deleting a monitor interface that has a channel assigned reaches the second order and lockdep reports the cycle. The driver side of it: -> #1 (&local->iflist_mtx){+.+.}-{4:4}: __mutex_lock+0xda/0x1070 ieee80211_iterate_interfaces+0x34/0x70 [mac80211] mt7921_config+0xb8/0xe0 [mt7921_common] drv_config+0x63/0x1d0 [mac80211] .config is only reached through drv_config(), which asserts the wiphy mutex, so ieee80211_iterate_active_interfaces_mtx() can be used. It walks the same list under the wiphy mutex and never takes iflist_mtx, which drops the driver's dev->mutex -> iflist_mtx edge. Fixes: cbaa0a404f8d ("mt76: mt7921: fix up the monitor mode") Link: https://lore.kernel.org/linux-wireless/20260730053916.109426-1-lucid_duck@justthetip.ca/ Signed-off-by: Devin Wittmayer Link: https://patch.msgid.link/20260810045338.118923-2-lucid_duck@justthetip.ca Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 2a90442d41b8db1eec49e9f87e75a671b64a50ea Author: Jacobs Wu Date: Mon Aug 24 14:52:27 2026 -0500 wifi: mt76: mt7925: fix HT/VHT caps and rates for NAN NDP peers [ Upstream commit 3590825b642ccda15690125d82d3d82206671486 ] NAN NDP peers were added with bare link_sta caps: no HT cap or QoS flag (so no BA/A-MPDU), no VHT cap / bandwidth / rx_nss, a data BSS phy mode that still read legacy when the firmware built the peer's rate table, and caps filtered down by the currently committed schedule. Push the NAN_DATA BSS phymode before sta_update, force the HT cap and QoS flag, seed VHT80 / bandwidth / rx_nss=2 from the BSS RLM, fix the NDP HT/VHT rate selection and stop filtering the link_sta caps by the schedule, so rate control always sees the peer's real capabilities. Bench (MT7925<->MT7925 NDP, 5 GHz ch149): 866.7M VHT80 MCS9 NSS2 link rate, UDP ~290 Mbit/s. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Jacobs Wu Link: https://patch.msgid.link/20260824195227.12589-16-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit a88159fa0d2ab371edb996d1d7ef986befe2f1a5 Author: Jacobs Wu Date: Mon Aug 24 14:52:26 2026 -0500 wifi: mt76: mt7925: support deferred NAN schedule update and cluster events [ Upstream commit 86bd20cb500a201318d2008cf346647ce5a311e5 ] Send the is_deferred flag in the availability control TLV so FW applies a deferred schedule change at the next DW boundary, and report the NAN_UNI_EVENT_ID_SCHED_UPDATE_DONE and STARTED_CLUSTER events to mac80211 via ieee80211_nan_sched_update_done() and ieee80211_nan_cluster_joined(). Both events arrive on the BH-disabled MCU RX path, where notifying mac80211 inline is wrong: ieee80211_nan_sched_update_done() needs the wiphy mutex and may sleep, and ieee80211_nan_cluster_joined() would fire during NAN_START before mac80211 sets sdata->u.nan.started and before the supplicant subscribes to NL80211_MCGRP_NAN, so the self-anchor cluster-join is lost and a solo anchor master can never publish a service. Deliver both events from a shared nan_deferred_work selected by a pending bitmap instead. The bitmap spinlock is taken with spin_lock_bh() on the RX side, the work re-checks nan_vif under the wiphy mutex, and the stop path clears the bitmap. STARTED_CLUSTER signals new_cluster=true, and JOINED_CLUSTER is corrected to new_cluster=false. Fixes: a5487a682406 ("wifi: mt76: mt7925: add NAN MCU helpers") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Co-developed-by: Stella Liu Signed-off-by: Stella Liu Signed-off-by: Jacobs Wu Link: https://patch.msgid.link/20260824195227.12589-15-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit c9ed6506b2fc4abe52a3e7ba14eef32148265a28 Author: Stella Liu Date: Mon Aug 24 14:52:25 2026 -0500 wifi: mt76: mt7925: configure NAN PHY setting on enable [ Upstream commit bbb8334e63824c941dbe685e62345d4c41afeb69 ] Implement NAN_UNI_CMD_UPDATE_PHY_SETTING (tag=18) to configure the BSS-level PHY parameters that the FW NAN scheduler uses when it switches channels. The command carries separate 2G and 5G PHY settings, each with its own phy type, rate sets and protection modes. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-14-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit ad4e0553e12ad4faf851e76808f498ef153244ea Author: Stella Liu Date: Mon Aug 24 14:52:24 2026 -0500 wifi: mt76: mt7925: add ULW event handling and peer ULW update [ Upstream commit 0ed6ac64344e0dcbed04f270426ca6f4a240b472 ] Forward NAN Unaligned Window attributes between FW and mac80211: report ULW updates from FW via cfg80211_nan_ulw_update() and push peer ULW attributes to FW with NAN_UNI_CMD_UPDATE_ULW. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-13-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit dafc1764fd6e1a590362f4124a0287889421221d Author: Stella Liu Date: Mon Aug 24 14:52:23 2026 -0500 wifi: mt76: mt7925: clear CRB before deactivating NAN peer record [ Upstream commit f0793ef2f7d48fa32d11e1b0915d9989ceb1de9a ] Send a zero avail_map CRB TLV before the peer record deactivation command. This ensures FW clears the committed schedule slots for the departing peer, preventing stale CRB entries from affecting subsequent NDP connections. Fixes: a5487a682406 ("wifi: mt76: mt7925: add NAN MCU helpers") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-12-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 5ffec246e932fedabebfc160055a1c560d87ecc3 Author: Stella Liu Date: Mon Aug 24 14:52:22 2026 -0500 wifi: mt76: mt7925: fill all DW intervals in NAN avail_map [ Upstream commit 4489c66f64289cdf07a396f5edc7487af584b2db ] Fill avail_map for all DW intervals instead of only DW index 0. FW requires the bitmap to be set across all 16 DW intervals for correct NAN scheduling. Without this, NDP ping latency is extremely high (~200ms) because FW only schedules data in the first DW interval. Also set ch_type = 1 for new channel entries to indicate channel-based (non-band) availability. Fixes: a5487a682406 ("wifi: mt76: mt7925: add NAN MCU helpers") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-11-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit d5fbcd9bd218e0094db5154cb930db303f049933 Author: Stella Liu Date: Mon Aug 24 14:52:21 2026 -0500 wifi: mt76: mt7925: replace NAN DW end event with DW start [ Upstream commit ad393e4d799cc52e282003cba4a1f5ed1b01cfa3 ] Handle the NAN DW start event instead of the DW end event for DW notification. Queuing NDP action frames at the beginning of the DW window, rather than after it ends, improves NDP handshake reliability. Fixes: a5487a682406 ("wifi: mt76: mt7925: add NAN MCU helpers") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-10-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 2aee49bab09d02c96f26516874e588cdf0d773f8 Author: Stella Liu Date: Mon Aug 24 14:52:20 2026 -0500 wifi: mt76: mt7925: share TLV setup for NAN enable command [ Upstream commit 9d758e4f60c12a396bd75b246b30cc9064dd1e47 ] Refactor mt7925_nan_enable() to build the MCU command from separate TLVs via skb instead of inline fields in the enable request struct. The cluster ID, DW interval, discovery beacon interval and RSSI threshold settings are now shared with mt7925_nan_change_configure() through the common TLV helpers, avoiding duplicated setup code. Fixes: a5487a682406 ("wifi: mt76: mt7925: add NAN MCU helpers") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-9-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 8bd194bd82a1a9306a88ad62f7d2d70e038701df Author: Stella Liu Date: Mon Aug 24 14:52:19 2026 -0500 wifi: mt76: mt7925: use OFDM-only PHY mode for NAN STA records [ Upstream commit b757f5b8c346d02d69c88e4520537ecbb4cfef90 ] NAN operates with OFDM and does not support CCK, so the phy, rate control and BSS rate TLVs must not fall back to 2.4 GHz. Borrow the 5 GHz band lookup to keep the STA records OFDM-only. Fixes: 9824fb4edbf3 ("wifi: mt76: mt7925: add NAN MCU handling") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-8-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 1f3a94cf0757656b1fb8a85fbaec5dc2b858395d Author: Stella Liu Date: Mon Aug 24 14:52:18 2026 -0500 wifi: mt76: mt7925: drop deferred NAN local schedule update handling [ Upstream commit 851b8f026ac10afa978f8d8af3eb2af4a4930c92 ] The deferred NAN local schedule update path in mt7925_nan_local_sched_changed() is removed for now; it will be implemented separately. Drop the now set-but-unused ret variable along with it. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-7-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 2f96e993d8a10b442526779eec767b99a6c8388b Author: Stella Liu Date: Mon Aug 24 14:52:17 2026 -0500 wifi: mt76: mt7925: drop unused NAN 2.4/5 GHz support config [ Upstream commit f87a9e7f49495e822e41828421ce51550e752dce ] The config_support_5g/support_5g_val and config_2dot4g_support/ support_2dot4g_val fields in the NAN enable request are not used by the firmware, so stop setting them and drop mt7925_nan_set_2g_support(). Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-6-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 48d0ea64dee4bfeb8ac1c51f92ab46c99f95cf6b Author: Stella Liu Date: Mon Aug 24 14:52:16 2026 -0500 wifi: mt76: mt7925: report only 2.4 GHz NAN supported band [ Upstream commit 4d57010abf701cb08d7216b30143c696a8c2405b ] The firmware only checks the 2.4 GHz bit of the local device capability supported_bands field, so set it directly and drop the unused helper. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-5-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 373c2212c9da77765e6ec7f92e77454e21d70359 Author: Stella Liu Date: Mon Aug 24 14:52:15 2026 -0500 wifi: mt76: mt7925: fix NAN committed CRB timeline layout [ Upstream commit d7e818693cca1e8e474a4df33cffce0583e02880 ] The committed CRB timeline carried a local_map_id byte that does not exist in the firmware NAN_SCHEDULE_TIMELINE_T layout (map id plus 3 reserved bytes), shifting the availability bitmap. Drop it and match the firmware structure. The common-slot check is also dropped as redundant: mac80211 already tracks common slots, so avail_map is built directly from the peer schedule. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-4-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit b11f0e26910774c89aefa57bf303ff68f6cfe143 Author: Stella Liu Date: Mon Aug 24 14:52:14 2026 -0500 wifi: mt76: mt7925: fix NAN start failure [ Upstream commit e2f7c78a764c41f231e86533257ab623d4b4fed9 ] mt7925_start_nan() called mt7925_nan_set_nmi_addr(), which makes NAN start fail. The NMI address is not managed here, so drop the call. Also track dev->nan_vif only in add/remove_interface and fold the single BSS rollback into an inline error check. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-3-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit f7eb5eb2bbf25c4764d6d50eb6dfa816f346e88c Author: Stella Liu Date: Mon Aug 24 14:52:13 2026 -0500 wifi: mt76: mt7925: fix NAN NDP STA record role index [ Upstream commit a34595a955af242372cea2abfa7604f544399286 ] The NDP STA record role_idx must carry the NAN BSS band0 index rather than the mac80211 BSS index, otherwise the firmware maps the NDP peer to the wrong role. Use the fixed NAN_BSS_INDEX_BAND0 value. While at it, drop the inline peer-schedule setup in mt792x_nan_map_sta_rec(): the peer schedule is already driven by the upper layer through the peer_sched_changed callback (mt792x_nan_set_peer_schedule()), so the redundant call and the now-unused local variables are removed. Fixes: 0f3605e4f8de ("wifi: mt76: mt7925: wire up NAN operations") Co-developed-by: Sean Wang Signed-off-by: Sean Wang Signed-off-by: Stella Liu Link: https://patch.msgid.link/20260824195227.12589-2-sean.wang@kernel.org Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 65373f0c62d4e7442f0e9177c5347653edf0db40 Author: Felix Fietkau Date: Thu Jul 2 15:54:59 2026 +0000 wifi: mt76: mt7996: bound RRO session id before indexing addr_elem[] [ Upstream commit ec0889c74734131c6526493bd3134eea7de25bf8 ] seq_id from the WED RRO indication is a 12-bit field (0-4095), but only values up to MT7996_RRO_MAX_SESSION map into wed_rro.addr_elem[], which has MT7996_RRO_ADDR_ELEM_LEN (128) entries. A larger session id computes an out-of-bounds element index that is then read and, on a signature mismatch, written. Reject an out-of-range session id. Fixes: a09d2f9d69af ("wifi: mt76: Convert mt76_wed_rro_ind to LE") Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 35709bb62a44c23fe4bf871d2c40131090b41721 Author: Felix Fietkau Date: Thu Jul 2 15:51:53 2026 +0000 wifi: mt76: mt7915: guard firmware memory dump write on disabled memdump [ Upstream commit decf5142c2d4c295684da8644d4cb93dcf956c5d ] mt7915_coredump_build()/mt7996_coredump_build() wrote dump_mem->len unconditionally, but the allocation only reserves room for the memory dump header when coredump_memdump is enabled and memdump_buf_len is non-zero. In the default configuration the allocation ends right after the fixed header, so the write landed one struct past the buffer. Only populate the memory-dump section when it was actually allocated. Fixes: 4dbcb9125cc3 ("wifi: mt76: mt7915: enable coredump support") Fixes: 878161d5d4a4 ("wifi: mt76: mt7996: enable coredump support") Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 7d4bc3acbbc3307c4b67de8b2a526fa57a933dfc Author: Felix Fietkau Date: Thu Jul 2 15:21:12 2026 +0000 wifi: mt76: mt7915: unregister thermal cooling device on hwmon failure [ Upstream commit b8286bc7fe520e7117e7b6e1a1fd4c0df439aa3a ] mt7915_thermal_init() registered the thermal cooling device and its sysfs link, then returned the hwmon registration error without undoing them. The cooling device (not devm-managed) and the link then leaked, and its callbacks referenced the freed phy. Unregister the cooling device before returning the error. Fixes: 0ae3ff568451 ("mt76: mt7915: fix hwmon temp sensor mem use-after-free") Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit f75a46ed29a4b63bba5a3457fcdebd1ba0a46fd2 Author: Felix Fietkau Date: Thu Jul 2 15:14:11 2026 +0000 wifi: mt76: mt7996: validate firmware event lengths before parsing [ Upstream commit c88f880c6430948492a4eee00d90e48fa800febf ] Two unsolicited event handlers trusted firmware-provided lengths: mt7996_mcu_rx_all_sta_info_event() looped over res->sta_num without checking it against skb->len, reading the flex array out of bounds; and mt7996_mcu_rx_log_message() could compute a negative or oversized length from tlv->len and feed it to %.*s and the debugfs log path. Bound both against the actual skb length. Fixes: adde3eed4a75 ("wifi: mt76: mt7996: Add mcu commands for getting sta tx statistic") Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices") Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 96070483173399c9d7e7f2244d399576157d5bfd Author: Felix Fietkau Date: Thu Jul 2 15:09:01 2026 +0000 wifi: mt76: mt7915: check default EEPROM firmware size before copying [ Upstream commit bce4aef211b3941af9ca297162406fc84f22ed5d ] mt7915_eeprom_load_default() copied mt7915_eeprom_size() bytes from the firmware blob after only checking that it was non-NULL. A truncated default bin caused an out-of-bounds read past the firmware buffer into the EEPROM image. Reject a blob smaller than the EEPROM size. Fixes: beed8bea8d74 ("mt76: mt7915: add mt7916 calibrated data support") Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 31d050c1809589ffdc3ff68828a8a4fbc90bf0f0 Author: Felix Fietkau Date: Tue Aug 18 12:58:24 2026 +0000 wifi: mt76: clear offchannel state if a scan has no channel to restore [ Upstream commit 3aaa4871006d2abb3a597028c45042311acbc640 ] mt76_scan_complete() restores the operating channel only if the phy has one. __mt76_set_channel() is the only function that clears phy->offchannel. A phy can run a scan while it has no operating channel. A 6 GHz radio with no configured interface is one example. After such a scan, the flag stays set. mt76_txq_schedule_list() skips each TXQ whose wcid points to a phy in this state. All traffic for the stations on that band stops. The frames stay in the mac80211 queues. They do not reach the hardware, and no counter shows them. Only an unrelated channel set clears the flag. Fixes: 31083e38548f ("wifi: mt76: add code for emulating hardware scanning") Fixes: a8f424c1287c ("wifi: mt76: add multi-radio remain_on_channel functions") Link: https://patch.msgid.link/20260818125825.395538-4-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 29035e4450d7d2f6bfec428d0e548baaef40b6a5 Author: Felix Fietkau Date: Tue Aug 18 12:58:22 2026 +0000 wifi: mt76: check the owner of a remain-on-channel request [ Upstream commit d6173b8b36e5cefc7cce34c31a0cc63fb3bd77f4 ] mvif->roc_phy points to the phy of the request that started last for the interface. That request can end, and the phy can start a request for a different interface. The driver does not always clear the pointer. Two callers trust the pointer: - mt76_vif_cleanup() aborts the request on that phy when the driver removes the interface. - mt76_cancel_remain_on_channel() aborts the request on that phy for the interface. If the phy holds a request for a different interface, both callers abort the wrong request. The request of the interface stays active. Its work then runs after the driver removes the interface. The work tears the link down through the freed bss_conf. Compare phy->roc_vif with the interface in both callers before the abort. Fixes: a8f424c1287c ("wifi: mt76: add multi-radio remain_on_channel functions") Link: https://patch.msgid.link/20260818125825.395538-2-nbd@nbd.name Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin commit 3c749b99ea34fd26b18209c62df44a9f629c4a51 Author: Jiale Yao Date: Sat Oct 3 16:31:54 2026 +0800 pinctrl: sprd: free maps on DT map failure [ Upstream commit e873c665e503ebfb6dafaf9346c3956695686226 ] sprd_dt_node_to_map() reserves map storage before adding mux and configuration entries. If a later operation fails, the error path only frees the temporary configurations and leaves the map allocation reachable through the output pointer. Free the partially built map on failure. The caller ignores the output parameters when the mapping callback returns an error, so they do not need to be reset after freeing the map. Fixes: 41d32cfce1ae ("pinctrl: sprd: Add Spreadtrum pin control driver") Signed-off-by: Jiale Yao Reviewed-by: Baolin Wang Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit ef00491967eff4dbef94bd9ccd7710060ae8a745 Author: Leizhen Zhang Date: Mon Oct 5 03:57:29 2026 -0500 gen_init_cpio: stop parsing on lines with a missing argument list [ Upstream commit c8dd1aa0274d8ad3df82ec1b064065f410ce99ed ] When a line in the cpio list consists of a file type followed only by whitespace and no newline (e.g. "slink " as the last line of the file), strtok(NULL, "\n") returns NULL. main() prints an error and sets ec, but then carries on and passes the NULL args pointer to the type handler, which hands it to sscanf() and crashes: AddressSanitizer: SEGV on unknown address 0x000000000000 #4 __isoc99_sscanf #5 cpio_mkslink_line usr/gen_init_cpio.c:169 Break out of the loop as is already done for the other format error, so that the error is reported and gen_init_cpio exits with a failure status. Found by fuzzing gen_init_cpio built with ASan/UBSan. Reproducer: printf 'slink ' > list && usr/gen_init_cpio list Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Assisted-by: Claude:claude-opus-5-5 ASan UBSan Signed-off-by: Leizhen Zhang Link: https://patch.msgid.link/20261005085729.872402-1-lzsx618@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit f553af34ec2e9452bd4ed042fa6e25ef07a4ed39 Author: Michael Petlan Date: Fri Sep 25 00:30:27 2026 +0200 perf test attr: Fix wrong size expectation for events [ Upstream commit 5c52bb65844426070edca789ae7896c56e314bcb ] Although config4 and tee sample_simd_* fields has been added into 'struct perf_event_attr', the size expectation for the struct hasn't been adjusted. This hasn't been noticed, since the testcase's return value has been ignored after rewriting the testcase to python until previous commit. Fix that. Fixes: eb89aef367e47010 ("perf headers: Sync perf_event.h/perf_regs.h with the kernel headers") Fixes: 80cdf208117a36de ("tools headers UAPI: Sync linux/perf_event.h with the kernel sources") Signed-off-by: Michael Petlan Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo [ Updated it to take into account 80cdf208117a36de (sample_simd_* fields) 144 -> 176 ] Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 7fd5544514ddca07c5314e34e9c9ed5685f70502 Author: Michael Petlan Date: Fri Sep 25 00:30:26 2026 +0200 perf test attr: Propagate the return value from the test to the wrapper [ Upstream commit f8596112cbad0072cdc957c0ea06695afda246dc ] Currently it does not matter what the python script actually returns, the test always passes, as the $err variable is always 0. Fix that. Fixes: 8519e4f44c2af722 ("perf test: Add a shell wrapper for "Setup struct perf_event_attr"") Signed-off-by: Michael Petlan Acked-by: Namhyung Kim Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit ef46c077ed88f9570982bef6f457e01d41ce9e48 Author: Takashi Iwai Date: Tue Oct 6 15:44:04 2026 +0200 ALSA: caiaq: Allow zero-length packet handling for EP1 [ Upstream commit ccfe6ab672c020fca56988e634088bfb7764e2a7 ] The recent fix to avoid OOB access for malformed packets added a packet length check and returns immediately if it's too short. However, this can be lead to a regression because the completion handler doesn't resubmit the packet, while a zero-length packet itself is valid, per se. For addressing the potential regression above, change the handling for a zero-length packet to just resubmit without processing the incoming contents. Fixes: aba30af07d4f ("ALSA: usb-audio: caiaq: validate EP1 reply lengths") Link: https://patch.msgid.link/20261006134405.479603-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit f46caad2cbb5c168e474764a27244facf148251c Author: Priyank Rathod Date: Fri Sep 18 17:24:48 2026 +0000 PCI/AER: Fix struct pci_dev reference leak in aer_process_err_devices() [ Upstream commit e86ac10110d00e6c3801f38bde1863951315222b ] When an AER error occurs, candidate error-source devices are added to e_info->dev[] by add_error_device(), which takes a reference with pci_dev_get(). A device can be recorded without any error status being present: the Requester ID fast path in is_error_source(), if (e_info->id == pci_dev_id(dev)) return true; matches purely on the ID reported by the Root Port and returns true without reading the device's AER status registers. In aer_process_err_devices(), handle_error_source() is called only if aer_get_device_error_info() returns non-zero, i.e. only if an unmasked error status bit is actually set. It returns 0 if the device has become inaccessible (status and mask both read as all ones, so status & ~mask == 0) or if no unmasked status bit is set. Because handle_error_source() was responsible for calling pci_dev_put(), skipping it permanently leaks the reference taken in add_error_device(). Decouple reference lifetime from error handling by moving pci_dev_put() out of handle_error_source() and into the aer_process_err_devices() loop, so every recorded device is put exactly once. handle_error_source() is static and aer_process_err_devices() is its only caller, so no other path is affected. Fixes: 60271ab044a5 ("PCI/AER: Take reference on error devices") Signed-off-by: Priyank Rathod Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260918-fix-aer-refcount-leak-v2-1-bdd1ff1c35a9@google.com Signed-off-by: Sasha Levin commit 0f3c6b1b62f3ba755b7b4f5b03335eb91d144f29 Author: Muhammad Bilal Date: Sun Sep 20 00:22:31 2026 +0500 wifi: mm81x: check bytes_remaining before reading delimiter [ Upstream commit 54a54c06868d0c2beb9ec3e2ffda0f6cb33d5c8e ] mm81x_yaps_hw_read_pkts() reads a full 4-byte delimiter and then subtracts sizeof(delim) from bytes_remaining on every loop iteration, guarded only by "bytes_remaining > 0". If 1-3 bytes are left in the window, this reads past the end of the valid data and then subtracts 4 from a value smaller than 4, driving bytes_remaining negative. A negative bytes_remaining then reaches the total_len > bytes_remaining branch, where "bytes_remaining" is passed to memcpy() as the copy length. Implicitly converted to size_t, a negative int becomes a huge value, turning that memcpy() into a massive out-of-bounds copy. Bail out of the split loop once fewer than sizeof(delim) bytes remain, the same way the existing "end of stream" check bails on a zero delimiter. Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Muhammad Bilal Link: https://patch.msgid.link/20260919192231.272078-1-meatuni001@gmail.com Signed-off-by: Lachlan Hodges Signed-off-by: Sasha Levin commit 956574857864824a571e682c25706748e1a8ee4f Author: Aamir Ahmed Date: Fri Sep 11 23:15:31 2026 +0100 wifi: mm81x: validate n_channels in disabled channels response [ Upstream commit ad130fe516914076f3fb11940b1bf9181de04425 ] mm81x_mac_check_fw_disabled_chans() iterates over n_channels entries of the firmware response without validating the response length against the array size. A firmware response with n_channels larger than ARRAY_SIZE(mors_s1ghz_channels) reads past the end of the response buffer. To fix, make sure we validate the length prior to use. Assisted-by: LLM Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Aamir Ahmed Link: https://patch.msgid.link/AS8P251MB00015A3FFF9F9A9628CB0BB0C8BE2@AS8P251MB0001.EURP251.PROD.OUTLOOK.COM [slightly reword commit message] Signed-off-by: Lachlan Hodges Signed-off-by: Sasha Levin commit 856fc19b2b06f86a4ae1e920adcd5a955efc4f6b Author: Samuele Yang Date: Tue Sep 29 13:34:08 2026 +1000 wifi: mm81x: start beaconing on beacon enable not interface add [ Upstream commit 54b96109768276fa6dd0bad8e5701ad55643412a ] Currently we only initialise and start the beaconing process when the AP interface is first added. If the BSS alone is reconfigured and beaconing is temporarily stopped, the subsequent call to re-enable the beacon via BSS_CHANGED_BEACON_ENABLED is ignored and beaconing will be permanently stopped until the interface is completely re-added. To fix, move the beaconing start/stop to mm81x_mac_ops_bss_info_changed and react accordingly to info->enable_beacon and just keep the per-vif work item init in the add_interface callback. Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Samuele Yang Link: https://patch.msgid.link/20260929033408.69266-1-samuele.yang@morsemicro.com Signed-off-by: Lachlan Hodges Signed-off-by: Sasha Levin commit bd4f561733996d7f0cadc310fa4bb652f7dc40ab Author: Lachlan Hodges Date: Thu Aug 27 15:49:10 2026 +1000 wifi: mm81x: move beacon work and init below the tx op [ Upstream commit 483e1ebc813280dc566210ec5c48738060355f62 ] Move mm81x_mac_beacon_work() and mm81x_mac_beacon_init() to below mm81x_mac_ops_tx() to prepare for future multicast handling such that we avoid a forward declaration. No functional change. Link: https://patch.msgid.link/20260827054917.255584-2-lachlan.hodges@morsemicro.com Signed-off-by: Lachlan Hodges Stable-dep-of: 54b961097682 ("wifi: mm81x: start beaconing on beacon enable not interface add") Signed-off-by: Sasha Levin commit 2e6afa1a19213848be34c61ed8d88342c831c406 Author: Joseph Qi Date: Thu Sep 3 21:13:13 2026 +0800 ocfs2: reject inconsistent xattr bucket during defrag [ Upstream commit bd40b997f04542869afeabe94f2cf1a016fc9bfa ] ocfs2_defrag_xattr_bucket() has two mlog_bug_on_msg() checks that assume the name/value pairs in a bucket are disjoint and that xh_free_start is not below the compacted region. ocfs2_validate_xattr_bucket() only checks each entry in isolation, so a corrupt bucket holding overlapping entries, or one with an inflated xh_free_start, passes validation and then hits BUG() in defrag when a setxattr triggers it. Defrag works on a linear copy of the bucket and does not touch the real blocks before the copy back, so the checks can return an error instead of calling BUG(). Link: https://lore.kernel.org/20260903131313.2396208-3-joseph.qi@linux.alibaba.com Fixes: 012255961c9e ("ocfs2: Enable xattr set in index btree") Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Cc: Changwei Ge Cc: Heming Zhao Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Sasha Levin commit 4b0adafbb676900ffa674306c4325ee7f4837f2f Author: Joseph Qi Date: Thu Sep 3 21:13:12 2026 +0800 ocfs2: allow xattr bucket entries to span multiple blocks [ Upstream commit 78cce2082d22d3c56bd3a6146ef0dcf7cd661a33 ] Patch series "ocfs2: xattr bucket validation fixes", v2. This series fixes two problems around xattr bucket validation. Patch 1 fixes a false-corruption failure on blocksize-512 volumes: the bucket validator limited the entry array to the first bucket block while the write path stores entries across the whole 4096-byte bucket region, so a legitimately written, fsck-clean bucket could be rejected and force the filesystem read-only. It also adds an alignment check on the bucket block number, since the entry array is accessed as one contiguous region and a corrupted xattr tree could otherwise point a bucket at blocks straddling a page boundary. Patch 2 converts two mlog_bug_on_msg() checks in the bucket defrag path to ocfs2_error() returns, so that a corrupt bucket holding overlapping entries or an inflated xh_free_start marks the filesystem read-only and fails the setxattr instead of panicking the kernel. Both patches have been tested in QEMU: the blocksize-512 reproducer (40 xattrs with 100-byte values, previously failing with "entry count 32 exceeds maximum 31") now passes with a clean fsck.ocfs2 result, and the ocfs2 testsuite xattr tests pass 48/48 across blocksize combinations. This patch (of 2): ocfs2_validate_xattr_bucket() limits the entry array to the first bucket block, but the write path stores entries across the whole OCFS2_XATTR_BUCKET_SIZE region. With 512-byte blocks a bucket spans eight blocks, and a bucket filled with small xattrs places its last entries past offset 512. Reading such a bucket back errors out: OCFS2: ERROR (device loop0): ocfs2_validate_xattr_bucket: Invalid xattr bucket 86072: entry count 32 exceeds maximum 31 On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted. OCFS2: File system is now read-only. This is reproducible by setting ~33 xattrs with 100-byte values on a file on a blocksize-512 volume; fsck.ocfs2 reports the resulting image clean. Check the entry count against the full bucket region instead. The per-block bounds checks for names and values stay as they are, since ocfs2_bucket_align_free_start() keeps each name+value pair within a single block. The entry array is one contiguous region, so a bucket from a corrupted xattr tree whose first block is not aligned to OCFS2_XATTR_BUCKET_SIZE could straddle a page and make the validation loop read out of bounds. Buckets allocated within clusters are always aligned, so reject any other block number while validating. Link: https://lore.kernel.org/20260903131313.2396208-1-joseph.qi@linux.alibaba.com Link: https://lore.kernel.org/20260903131313.2396208-2-joseph.qi@linux.alibaba.com Fixes: 2cf82b46d5e4 ("ocfs2: validate external xattr entries when reading metadata") Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Heming Zhao Signed-off-by: Sasha Levin commit 31bf628e93b57f072e4fabb8710c1405cde58f9d Author: Andrei Vagin Date: Sun Aug 16 16:12:15 2026 +0000 proc: report SIGEV_NONE in /proc/pid/timers if target task has died [ Upstream commit 0a27f795030ce6a2c71525b0544e3b13bba8828e ] When a posix timer is created targeting a specific thread (using SIGEV_SIGNAL | SIGEV_THREAD_ID), it takes a reference to the target struct pid in timer->it_pid. If the target thread subsequently terminates, its numeric tid is freed and can be recycled for an unrelated task. However, the timer holds its reference to the original struct pid. show_timer() in /proc/[pid]/timers previously called pid_nr_ns() directly on timer->it_pid without checking whether any task remained attached to that struct pid. As a result: 1. It reported the stale tid, which could mistakenly refer to a recycled pid. 2. In the kernel, expired signals for dead target threads are dropped by posixtimer_send_sigqueue() because posixtimer_get_target() returns NULL, so the timer functionally acts as SIGEV_NONE. 3. Checkpoint/restore tools (CRIU) parsing /proc/[pid]/timers would try to restore a timer with SIGEV_SIGNAL | SIGEV_THREAD_ID targeting a non-existent or unrelated thread. Check pid_has_task(timer->it_pid, timer->it_pid_type) in show_timer(). If the target task has died, override notify to SIGEV_NONE and report PID 0 (e.g., 'notify: none/pid.0'). Link: https://lore.kernel.org/20260816161216.984580-1-avagin@google.com Fixes: 57b8015e07a7 ("posix-timers: Show sigevent info in proc file") Signed-off-by: Andrei Vagin Signed-off-by: Andrew Morton Reviewed-by: Pavel Tikhomirov Cc: Thomas Gleixner Signed-off-by: Sasha Levin commit ba7e51d2d8e25f33c4cf48c795d44d96a70c9afb Author: Wilson Felipe Pereira Date: Tue Aug 18 04:53:47 2026 +0000 init/main: fix false-positive kernel panic on environment variable overwrite [ Upstream commit 51e766bcd35e706d8df29dd0fac98871fdced261 ] In unknown_bootoption(), the limit checking for environment variables sets panic_later *before* checking if the variable already exists in envp_init. If a user passes exactly MAX_INIT_ENVS custom variables and then overwrites the final variable by matching its key, it causes a false-positive hard panic on boot despite not actually exceeding the array bounds or increasing the total variable count. Swapping the order of these checks allows the duplicate check to break out of the loop before the panic flag is erroneously latched. To verify, boot a VM with 31 custom variables (filling the array up to its limit of 32) and then overwrite the very last variable: ENV_VARS=$(for i in {1..31}; do echo -n "var$i=$i "; done) qemu-system-x86_64 -kernel bzImage -append "$ENV_VARS var31=overwrite" Without this patch, the kernel crashes instantly with: Kernel panic - not syncing: Too many boot env vars at 'var31=overwrite' With this patch, the kernel safely overwrites the variable and boots. Link: https://lore.kernel.org/20260818045357.4123784-3-wfelipe@google.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Wilson Felipe Pereira Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin commit f40923e5426ea2cf48c95c9116069874509a8f23 Author: Wilson Felipe Pereira Date: Tue Aug 18 04:53:46 2026 +0000 init/main: fix off-by-one in argv_init cleanup [ Upstream commit b82ed0e3a1dafe41577b095318a3ea6c0eec6f46 ] Patch series "init: fix array boundary bugs in boot parameter parsing". This series fixes two distinct boundary logic edge-case bugs in `init/main.c` related to parsing boot command-line arguments and environment variables. Both bugs have been present since the early git history (Linux-2.6.12-rc2). 1. The first patch fixes an off-by-one error in `init_setup()` where the final slot of the `argv_init` array was left uncleared. This allowed a stale kernel parameter to leak into the `init` process's user-space command line if exactly `MAX_INIT_ARGS` unknown parameters were passed. 2. The second patch fixes a false-positive kernel panic in `unknown_bootoption()`. If a user filled the environment variable array up to its exact limit (32) and then attempted to overwrite the final variable, the kernel would panic before evaluating whether it was a harmless duplicate. Exact QEMU reproduction steps for both edge cases are documented inside their respective commit descriptions. This patch (of 2): When cleaning up argv_init in init_setup() and rdinit_setup(), the loop terminates one element early due to using '<' instead of '<='. Since argv_init is sized MAX_INIT_ARGS+2, index MAX_INIT_ARGS is a valid element that should be cleared to NULL. If exactly MAX_INIT_ARGS unknown arguments are passed before 'init=', the uncleared argv_init[MAX_INIT_ARGS] can act as a ghost argument to /sbin/init or cause a spurious kernel panic when later appended to. To verify the argument leak, boot a VM into a shell with 32 unknown kernel arguments, the init parameter, and 31 user arguments: STALE_ARGS=$(for i in {1..32}; do echo -n "stale$i "; done) USER_ARGS=$(for i in {1..31}; do echo -n "user$i "; done) qemu-system-x86_64 -kernel bzImage \ -append "$STALE_ARGS init=/bin/sh $USER_ARGS" Running `cat /proc/1/cmdline` inside the shell reveals that the 32nd kernel argument ('stale32') incorrectly leaked into the init process's command line. This patch zeroes the final slot, cleanly terminating the array. Link: https://lore.kernel.org/20260818045357.4123784-1-wfelipe@google.com Link: https://lore.kernel.org/20260818045357.4123784-2-wfelipe@google.com Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Fixes: ffdfc40976dd ("[PATCH] Add rdinit parameter to pick early userspace init") Signed-off-by: Wilson Felipe Pereira Signed-off-by: Andrew Morton Signed-off-by: Sasha Levin commit 18098fed5b27427568087dc17a88d3295492bfb7 Author: Joseph Qi Date: Fri Aug 28 19:28:25 2026 +0800 ocfs2: defer suballocator block group reclaim to workqueue [ Upstream commit b4cc0016f8ead77c823f2d55f4e0a0e61dd924b3 ] When the last bit in a suballocator block group is freed, _ocfs2_free_suballoc_bits() reclaims the group back to the global bitmap. The reclaim takes inode_lock() on the global bitmap inode while running inside the freeing transaction, adding a lock dependency of j_trans_barrier -> global bitmap inode i_rwsem This forms a circular dependency with paths such as ocfs2_shutdown_local_alloc(), which take the global bitmap inode lock before starting a transaction: Task1 (dealloc): ocfs2_run_deallocs ocfs2_free_cached_blocks ocfs2_start_trans down_read(j_trans_barrier) _ocfs2_free_suballoc_bits _ocfs2_reclaim_suballoc_to_main inode_lock(main_bm_inode) <- wait on Task2 Task2 (dismount): ocfs2_shutdown_local_alloc inode_lock(main_bm_inode) ocfs2_start_trans down_read(j_trans_barrier) <- wait on Task3 Task3 (ocfs2cmt): ocfs2_commit_cache down_write(j_trans_barrier) <- wait on Task1's handle jbd2_journal_flush Task1 waits for Task2's inode_lock(), Task2 waits for the j_trans_barrier down_write() held by ocfs2cmt, and ocfs2cmt waits for Task1's running transaction to commit - a real deadlock, observed with aio-stress direct IO writes racing dismount. Fix it by deferring the reclaim to the per-superblock ocfs2_wq workqueue, so the freeing transaction no longer takes the global bitmap inode lock. The worker re-checks under the suballocator locks that the block group is still fully freed (it may have been allocated from again in the meantime), takes the global bitmap inode locks before starting its own transaction, and performs the same suballocator cleanup and space return. The inode lock order (suballocator inode -> global bitmap inode) is consistent with the existing "inode lock before transaction" order, breaking the cycle. Reclaim work can still be queued late in dismount, e.g. when the truncate log is flushed or orphan dir recovery frees inode bits, so both ocfs2_dismount_volume() and the mount error path flush ocfs2_wq right before the system inodes are released, while the journal is still alive, to make sure no reclaim work is left running. The worker also bails out if the journal is already gone. Tested with the ocfs2 testsuite (including aio-stress direct IO) and umount/mount cycles on a CONFIG_PROVE_LOCKING kernel: the circular locking dependency is gone and freed block groups are still returned to the global bitmap. Link: https://lore.kernel.org/20260828112825.666097-3-joseph.qi@linux.alibaba.com Fixes: 4a54331616b3 ("ocfs2: give ocfs2 the ability to reclaim suballocator free bg") Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Reviewed-by: Heming Zhao Assisted-by: Qoder:Qwen3.8-Max Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao _ocfs2_free_suballoc_bits() reclaims the group back to the global bitmap. The reclaim takes inode_lock() on the global bitmap inode while running inside the freeing transaction, adding a lock dependency of j_trans_barrier -> global bitmap inode i_rwsem This forms a circular dependency with paths such as ocfs2_shutdown_local_alloc(), which take the global bitmap inode lock before starting a transaction: Task1 (dealloc): ocfs2_run_deallocs ocfs2_free_cached_blocks ocfs2_start_trans down_read(j_trans_barrier) _ocfs2_free_suballoc_bits _ocfs2_reclaim_suballoc_to_main inode_lock(main_bm_inode) <- wait on Task2 Task2 (dismount): ocfs2_shutdown_local_alloc inode_lock(main_bm_inode) ocfs2_start_trans down_read(j_trans_barrier) <- wait on Task3 Task3 (ocfs2cmt): ocfs2_commit_cache down_write(j_trans_barrier) <- wait on Task1's handle jbd2_journal_flush Task1 waits for Task2's inode_lock(), Task2 waits for the j_trans_barrier down_write() held by ocfs2cmt, and ocfs2cmt waits for Task1's running transaction to commit - a real deadlock, observed with aio-stress direct IO writes racing dismount. Fix it by deferring the reclaim to the per-superblock ocfs2_wq workqueue, so the freeing transaction no longer takes the global bitmap inode lock. Signed-off-by: Sasha Levin commit da58f77cb9d5e03926c5f35e3e0707e84d6977d1 Author: Florian Schmaus Date: Fri Aug 28 17:54:07 2026 +0200 selftests/epoll: fix race condition in multi-waiter wakeup tests [ Upstream commit 4238e66c82b6ee888a768cb298c85083b4566726 ] In tests with multiple concurrent waiters on edge-triggered epoll instances where an emitter writes to multiple sockets (epoll16, epoll56, epoll58): When the emitter performs its first write(), ep_poll_callback() fires and wakes up both waiters because one waiter uses epoll_wait() and the other one uses poll(). This translates to different wait queues, ep->wq for epoll and ep->poll_wait for poll/select, which are both awoken by the kernel because of that single write. Next, both waiter threads invoke epoll_wait(), but since there is only one event, only one epoll_wait() will return non-zero because of the edge-triggered mode being used (in level-triggered mode, the kernel would re-queue the event because of remaining unread data). Since the second waiter sees an empty ready list, it does not increment ctx.count and the test fails spuriously with ctx.count == 1 instead of 2. Emitter (CPU 0) Thread 0 (CPU 1) Thread 1 (CPU 2) =============== ================ ================ epoll_wait(e0, -1) poll(e0, -1) [on e0->wq] [on e0->poll_wait] write(sfd[1]) | +--(Kernel wakes BOTH e0->wq and e0->poll_wait via callback)--+ | | | wakes up wakes up | | epoll_wait() reaps e1 poll() returns 1 | | (e1 removed via ET) (wants event) | | e0->rdllist is EMPTY | | | count++ (count = 1) v | | epoll_wait(e0, 0) | | sees EMPTY list! | | returns 0! | | thread exits | v | write(sfd[3]) | (event arrives too late!) v EXPECT_EQ(count, 2) <-- SPURIOUS FAILURE! Introduce waiter_entry1ap_loop() to retry poll() if the initial epoll_wait(..., 0) yielded no events. This ensures the thread waits for the subsequent write rather than failing immediately. Apply this helper in epoll16, epoll56, and for both waiter threads in epoll58. Link: https://lore.kernel.org/20260828-selftest-epoll-fix-race-v2-1-953ab57fd60a@codasip.com Fixes: f2728fe80cef ("selftests: add epoll selftests") Signed-off-by: Florian Schmaus Signed-off-by: Andrew Morton Cc: Heiher Cc: Roman Penyaev Cc: Shuah Khan Cc: Christian Brauner Signed-off-by: Sasha Levin commit 7e76e1eae6d60c550f3b3bc949544ed7cc841e3d Author: Joseph Qi Date: Wed Aug 26 19:26:59 2026 +0800 ocfs2: fix deadlock in inline-data truncate transactions [ Upstream commit c204bf5ac3eeb66648904d0374d6f7b84d843aac ] Updating an inode xattr can cause an ABBA deadlock with inline file truncation: ocfs2_truncate_file() down_write(&oi->ip_alloc_sem) ocfs2_truncate_inline() ocfs2_start_trans() ocfs2_xattr_set() ocfs2_start_trans() ocfs2_xattr_ibody_set() down_write(&oi->ip_alloc_sem) The xattr set path starts the merged transaction before the inode-body xattr helper acquires ip_alloc_sem, reversing the ip_alloc_sem -> transaction order used by the allocation and truncate paths. The transaction merge in commit 85db90e77806 ("ocfs2/xattr: Merge xattr set transaction.") introduced this ordering. Fix it by acquiring ip_alloc_sem once in ocfs2_xattr_set(), before xattr preparation, allocation reservations and ocfs2_start_trans(), and removing the per-helper acquisition from ocfs2_xattr_ibody_find(), ocfs2_xattr_ibody_set() and ocfs2_xattr_create_index_block(). These helpers now assert via lockdep that the caller holds ip_alloc_sem. ocfs2_xattr_set_handle(), which only sets initial ACL or security xattrs on unpublished inodes inside the create transaction, takes ip_alloc_sem under a dedicated lockdep subclass so that the assertions hold without creating a transaction -> ip_alloc_sem cycle against the ip_alloc_sem -> transaction order. The inode is unpublished, so the acquisition can never contend. This keeps the established ip_alloc_sem -> transaction order and makes the locking unconditional, so lockdep can verify a single plain ordering instead of conditional acquisitions. Link: https://lore.kernel.org/20260826112659.246574-1-joseph.qi@linux.alibaba.com Fixes: 85db90e77806 ("ocfs2/xattr: Merge xattr set transaction.") Signed-off-by: Joseph Qi Signed-off-by: Andrew Morton Cc: ZhengYuan Huang Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Changwei Ge Cc: Jun Piao Cc: Heming Zhao Signed-off-by: Sasha Levin commit ba53c54bac01e5a296d0c882d29eb351381f3e8f Author: Petr Vorel Date: Mon Aug 10 18:11:59 2026 +0200 checkpatch: skip CamelCase cache for --no-tree without root [ Upstream commit d41ebc7f9e2cc80cb57139c05e71415a79582ab0 ] Running outside tree (--no-tree) without git root (--root DIR) is not doable because we have no include/ directory which could be cached. But 3445686af721 expected that we are always in Linux tree (w/a git). But --no-tree does not require --root. Therefore skip whole caching in that case. This fixes perl and find errors when running checkpatch.pl *with* --no-tree --strict and *without* --root: No structs that should be const will be found - file 'scripts/const_structs.checkpatch': No such file or directory Use of uninitialized value $root in concatenation (.) or string at scripts/checkpatch.pl line 1213. find: `/include': No such file or directory Link: https://lore.kernel.org/20260810161159.1044160-1-pvorel@suse.cz Fixes: 3445686af721 ("checkpatch: ignore existing CamelCase uses from include/...") Signed-off-by: Petr Vorel Signed-off-by: Andrew Morton Cc: Andy Whitcroft Cc: Dwaipayan Ray Cc: Joe Perches Cc: Lukas Bulwahn Signed-off-by: Sasha Levin commit 66a3388d1f3b74f0b01dc7c76d77fe611810c6ba Author: Wilson Felipe Pereira Date: Fri Aug 28 03:37:32 2026 +0000 selftests/cgroup: test_zswap: fix implicit unsigned promotion bug in test_no_kmem_bypass [ Upstream commit 0567c7eaefd7ea1b26d76c46964f9a1d92120d7d ] In test_no_kmem_bypass(), delta (stored_pages * page_size - zswapped) is checked against stored_pages * page_size / 4 to verify that the pages pushed to zswap belong to the test memory cgroup. Due to slight stat update timing differences, delta can evaluate to a small negative number (e.g. -5MB out of 1GB). Because delta is declared as a signed int and stored_pages is an unsigned size_t, C's usual arithmetic conversions implicitly promote a negative delta to a large unsigned 64-bit integer, causing `delta < stored_pages * page_size / 4` to falsely evaluate to 0 and fail the test. Fix this by declaring zswapped and delta as signed long long and comparing against a signed threshold, ensuring negative deltas correctly evaluate to true. Link: https://lore.kernel.org/20260828033741.2184560-3-wfelipe@google.com Fixes: a549f9f31561a ("selftests: cgroup: add test_zswap with no kmem bypass test") Signed-off-by: Wilson Felipe Pereira Signed-off-by: Andrew Morton Acked-by: Michal Koutný Cc: Chengming Zhou Cc: Johannes Weiner Cc: Nhat Pham Cc: Shuah Khan Cc: Tejun Heo Signed-off-by: Sasha Levin commit 1cf9cc90a5b86b3e9df9832015e7d514480cf78a Author: Tejun Heo Date: Tue Oct 6 10:29:05 2026 -1000 sched_ext: Clear a sub-scheduler's caps before ops.sub_detach() [ Upstream commit a546831dff38b624240a90a6ff6d2b43d9226d51 ] A sub-scheduler can leave standing state behind on the cids delegated to it, cpuperf targets being the obvious case, and the kernel does not track who wrote it. Restoring it is the parent's job and ops.sub_detach() is the place for it. Today the parent can't rely on that: the dying sub-scheduler keeps every cap until it is marked dead after ops.exit(), so its ops.exit() or a late timer can write after the parent has cleaned up. Clear every cap of the sub-scheduler before ops.sub_detach(). The pshard caps go first as a pending sync recomputes ecaps from them, and ecaps are then zeroed directly. A grant racing the clear is refused under the child's pshard lock, so nothing hands the caps back. Fixes: 86094b95efcf ("sched_ext: Add per-shard cap delegation for sub-schedulers") Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 006cd94c74fe0fc18009211ba1a6ad834e739086 Author: Karl Mehltretter Date: Fri Sep 11 23:36:43 2026 +0200 rcuref: Fix the rcuread_is_dead reference in rcuref_read() kernel-doc [ Upstream commit 852fbf7fc857fd375d8caccbce576aefc37fb065 ] The kernel-doc comment of rcuref_read() refers to rcuread_is_dead, which does not exist. The name is rcuref_is_dead. Say rcuref_is_dead. Fixes: 3efa66ce6ee1 ("rcuref: Provide rcuref_is_dead()") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Sebastian Andrzej Siewior Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin commit 4f8e43e8abe7615b8d3c5e293f43ad29082c3b78 Author: Kuppuswamy Sathyanarayanan Date: Fri Oct 2 14:18:27 2026 -0700 PCI/ACPI: Centralize pcie_ports_native checking [ Upstream commit 4fe37866b0d92cdc45b62954a76489a9d9f8bd73 ] If the user booted with "pcie_ports=native", we take control of the PCIe port services unconditionally, regardless of what _OSC says. Centralize the testing of pcie_ports_native in acpi_pci_root_create(), where we interpret the _OSC results, so other places only have to check host_bridge->native_X and we don't have to sprinkle tests of pcie_ports_native everywhere. Rather than overriding the host_bridge->native_X flags after the fact, fold "pcie_ports=native" into the _OSC control mask we evaluate, i.e., proceed as though the platform had granted control of the port services. That way there is a single mechanism deciding each native_X flag, and we can report exactly which features we are overriding _OSC for instead of just noting that we are overriding something: acpi PNP0A08:00: _OSC: OS forcing control ("pcie_ports=native") of [PCIeHotplug PME AER DPC] Forcing host_bridge->native_aer also restores DPC service binding under "pcie_ports=native", which regressed in commit 97ca178c899d ("PCI/DPC: Allow DPC on all Downstream Ports when OS controls AER"). That commit replaced the AER service test in get_port_device_capability() with host->native_aer, so DPC stayed off when host_bridge->native_aer was not set. This also extends "pcie_ports=native" to host_bridge->native_dpc, which had no pcie_ports_native fallback before. That effect is narrow. native_dpc is only consumed by pci_dpc_recovered(), where with CONFIG_PCIE_EDR=n it previously gave up immediately and now lets pciehp wait for DPC recovery before treating a Link Down as a hotplug event. Fold "pcie_ports=dpc-native" into the control mask the same way, so host_bridge->native_dpc reflects it as well, with the same narrow effect on pci_dpc_recovered(). Move the pcie_ports_dpc_native declaration to so acpi_pci_root_create() can test it. host_bridge->native_ltr is deliberately not forced. "pcie_ports=" controls PCIe port services and LTR is not one. There is no PCIE_PORT_SERVICE_LTR, and native_ltr is only used by pci_configure_ltr() to enable ASPM L1.2, so forcing it would be an ASPM policy decision users did not ask for. SHPC hotplug is left alone for a simpler reason: SHPC is a conventional PCI feature rather than a PCIe one, so "pcie_ports=" has no bearing on it. Fixes: 97ca178c899d ("PCI/DPC: Allow DPC on all Downstream Ports when OS controls AER") Closes: https://lore.kernel.org/linux-pci/20260901064554.2178688-1-kanie@linux.alibaba.com/ Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas Reviewed-by: Guixin Liu Acked-by: Rafael J. Wysocki (Intel) # ACPI core Link: https://patch.msgid.link/20261002211828.1293177-4-sathyanarayanan.kuppuswamy@linux.intel.com Signed-off-by: Sasha Levin commit 6b8eba1942518059320db3003a509ef42d8ba2c6 Author: Kuppuswamy Sathyanarayanan Date: Fri Oct 2 14:18:26 2026 -0700 PCI/ACPI: Tidy _OSC control bit checking [ Upstream commit 0a1fdf4546ccf2f02845135fa5b36ed90685b220 ] Add OSC_OWNER() helper to prettify checking the _OSC control bits to learn whether the platform has granted us control of PCI features. No functional change intended. Signed-off-by: Kuppuswamy Sathyanarayanan Signed-off-by: Bjorn Helgaas Acked-by: Rafael J. Wysocki (Intel) Link: https://patch.msgid.link/20261002211828.1293177-3-sathyanarayanan.kuppuswamy@linux.intel.com Stable-dep-of: 4fe37866b0d9 ("PCI/ACPI: Centralize pcie_ports_native checking") Signed-off-by: Sasha Levin commit 1cd9c49962aa6b977b0f8e90b626a47534e8ec0d Author: Ryusuke Konishi Date: Tue Oct 6 17:48:25 2026 +0900 nilfs2: fix link count underflow when removing corrupted directory [ Upstream commit 814f5a53b4724798795b15690ff3d1c1d9ac1eb6 ] When removing an empty directory with a corrupted link count (e.g., i_nlink is 1 due to filesystem corruption), nilfs_rmdir() calls drop_nlink() via nilfs_do_unlink() and then calls drop_nlink() again on the directory inode. This second call causes an underflow of i_nlink, triggering a kernel WARNING in drop_nlink(). Fix this issue by using clear_nlink() instead of drop_nlink() to finalize the link count reset for the target directory in nilfs_rmdir(). Additionally, log a warning message when i_nlink is not 2 before removing an empty directory to notify about the link count inconsistency. Reported-by: syzbot+c388db0347b7fc88fa7a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=c388db0347b7fc88fa7a Fixes: d25006523d0b ("nilfs2: pathname operations") Signed-off-by: Ryusuke Konishi Signed-off-by: Viacheslav Dubeyko Signed-off-by: Sasha Levin commit 64c0c5dfde81f2fd52c819b85b3353f744971deb Author: Georgios Androutsopoulos Date: Tue Sep 8 16:13:02 2026 -0400 rust: bitmap: document panics in `next_bit` and `next_zero_bit` [ Upstream commit a73b4d1fa7d334a5f7de5bb0a14726530f66196e ] `next_bit()` and `next_zero_bit()` use `bitmap_assert!()` to check that `start` is less than `self.len()`, which panics when `CONFIG_RUST_BITMAP_HARDENED` is enabled. However, neither function has a `# Panics` section, and both document that `None` is returned for exactly the input that triggers the panic. Update the documentation of `next_bit()` and `next_zero_bit()` to add the missing `# Panics` sections, add the missing blank doc comment line before `Returns` in `next_zero_bit()`, and simplify the wording. Fixes: 11eca92a2cae ("rust: add bitmap API.") Closes: https://github.com/Rust-for-Linux/linux/issues/1252 Reviewed-by: Alexandre Courbot Signed-off-by: Georgios Androutsopoulos Signed-off-by: Yury Norov Signed-off-by: Sasha Levin commit 2da8385e37a9576f7472493feeb1a4fb853cf702 Author: Georgios Androutsopoulos Date: Tue Sep 8 16:31:57 2026 -0400 rust: id_pool: document panics in `find_unused_id` and `release_id` [ Upstream commit 842c5beca0b369bb143b86d6ae63dbcd7c5f0988 ] `find_unused_id()` calls `Bitmap::next_zero_bit()` and `release_id()` calls `Bitmap::clear_bit()`, both of which panic when `CONFIG_RUST_BITMAP_HARDENED` is enabled and the index is out of bounds. Neither `IdPool` method documents this. Add the missing `# Panics` sections and state the bounds requirement on `offset` and `id`. Fixes: 2cdae413cd3e ("rust: add dynamic ID pool abstraction for bitmap") Reviewed-by: Alexandre Courbot Signed-off-by: Georgios Androutsopoulos Signed-off-by: Yury Norov Signed-off-by: Sasha Levin commit 6f690f1eb354ba9d5b9fa1a20e767cb7e2ad1aec Author: Roberto Bergantinos Corpas Date: Thu Sep 17 12:49:05 2026 +0200 NFS: return DENIED in decode_lock_denied if we cannot decode owner [ Upstream commit 4fdfe2312cbed99b1438dcf20b348e72393f9633 ] After commit 43502f6e8d1e ("NFS: fix open_owner_id_maxsz and related fields.") we dramatically changed the size of the LOCK/LOCKT reply buffer from 164 to 52 bytes. This made visible a situation on a buggy NFS server that sent oversized denied responses which led to us returning EIO instead of DENIED. Now, apart from buggy server issue, this poses an interesting question: what if other implementations have legitimate but bigger than we expect lock owner response, especially now that we have reduced the size we allocate for it (20 bytes for the lock owner part). This change proposes to tackle that issue returning DENIED instead of EIO regardless of whether we manage to decode the owner or not: - At this point of decode_lock_denied we know there is an owner. - Server legitimately denied the lock request, with an owner that fits on NFS4_OPAQUE_LIMIT but we returned EIO instead to userspace. - The owner data is decoded but actually never used, decode_lock path simply retries, and decode_lockt turns it into 0 on file_lock and returns it to userspace. - LOCK/LOCKT are the last operations on the compound so it's not relevant if we didn't advance the pointer. - Also removes an inverted likely(!p) hint. Fixes: 43502f6e8d1e ("NFS: fix open_owner_id_maxsz and related fields.") Signed-off-by: Roberto Bergantinos Corpas Reviewed-by: Prabhakar Pujeri Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 900eeb7b315ce16b43a3ec807d11816c5b597d01 Author: Marc Kleine-Budde Date: Mon Sep 14 17:35:58 2026 +0200 spi: spi-sun4i: sun4i_spi_handler(): fix race condition between transfer completion and RX FIFO interrupt [ Upstream commit b8f09251da7871fbb9c62bd83516af422641d816 ] In commit 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size"), support for transfers larger than the FIFO size was added. This commit moves the draining of the RX-FIFO from sun4i_spi_transfer_one() (after completion of the transfer) to the IRQ handler when the IRQ "transfer complete" is handled. In addition, the IRQ "RX-FIFO 3/4 full" is activated for all transfers. However, this does not take into account that the RX-IRQ for transfers that exceed 3/4 of the FIFO size is still pending after the IRQ "transfer complete" has been processed. All interrupt sources are only deactivated after the wait_for_completion_timeout() in sun4i_spi_transfer_one(). This opens a race window for "RX-FIFO 3/4 full" interrupts to come. The sequence is as follows: | sun4i_spi_transfer_one() | sun4i_spi_fill_fifo() // fill TX-FIFO with 48 bytes | // enable RX-FIFO 3/4 full IRQ | wait_for_completion_timeout(); | | // SPI controller transfers 48 bytes | // SPI controller issues "transfer complete" and "RX-FIFO 3/4 full" IRQ | | // IRQ handler start | sun4i_spi_handler() | // ACK "transfer complete" IRQ | sun4i_spi_drain_fifo(); | complete(); ----. | return IRQ_HANDLED; \ | // IRQ handler end \__ race | / window | // wait_for_completion_timeout() continues / | // disable all IRQ sources ----' Avoid the race condition by disabling all interrupts when handling the "transfer complete" IRQ and before calling complete(). Also move the draining of the RX-FIFO back into sun4i_spi_transfer_one() where it was before commit 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size"). This has the added benefit of spending a little less time in the IRQ handler. With all interrupts disabled once the transfer completed, omit the clearing of the Transfer Complete bit in sun4i_spi_handler. This is safe because sun4i_spi_transfer_one() takes care of this before enabling any interrupts again. Cc: Tobias Schramm Fixes: 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size") Signed-off-by: Marc Kleine-Budde Signed-off-by: Jonas Rebmann Link: https://patch.msgid.link/20260914-spi-sun4i-fixes-v3-4-9fe919d5cecf@pengutronix.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e9291c655c18fc0592eee9dbc36bf146012c0454 Author: Marc Kleine-Budde Date: Mon Sep 14 17:35:57 2026 +0200 spi: spi-sun4i: sun4i_spi_transfer_one(): fix setting of clock rate [ Upstream commit 672ba6d88324f223634dd2dc4098f6fb6b346b25 ] A SPI transfer defines the _maximum_ speed of the SPI transfer. However the driver doesn't take into account that the clock divider is always rounded down (due to integer arithmetic). This results in a too high clock rate for the SPI transfer. E.g.: with an mclk_rate of 24 MHz and an SPI transfer speed of 10 MHz, the original code calculates a reg of "0", which results in an effective divider of "2" and a 12 MHz clock for the SPI transfer. Use DIV_ROUND_UP() instead of a plain integer division to fix the problem. While there simplify the divider calculation for the CDR1 case, use order_base_2() instead of two ilog2() calculations. Fixes: b5f6517948cc ("spi: sunxi: Add Allwinner A10 SPI controller driver") Signed-off-by: Marc Kleine-Budde Signed-off-by: Jonas Rebmann Link: https://patch.msgid.link/20260914-spi-sun4i-fixes-v3-3-9fe919d5cecf@pengutronix.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6b922b50d0540640eb135dce560e939deb70f89f Author: Marc Kleine-Budde Date: Mon Sep 14 17:35:56 2026 +0200 spi: spi-sun4i: sun4i_spi_fill_fifo(): always apply A10 FIFO fill level workaround [ Upstream commit ee109e2bbea0986f6ad34bfbcba90fce36f17538 ] In commit 6d9fe44bd73d ("spi: sun4i: fix FIFO limit"), the TX FIFO is filled max to SUN4I_FIFO_DEPTH - 1 (= 63) bytes to work around timeouts observed on A10s SoCs. Commit 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size") added support for transfers larger than the FIFO size. This commit did not consider the A10 workaround (limit the TX FIFO fill size to SUN4I_FIFO_DEPTH - 1 (= 63) bytes) for refilling the TX FIFO in the IRQ handler. To apply the workaround independent from where sun4i_spi_fill_fifo() is called, remove the length argument from the function and directly take the max fill level of SUN4I_FIFO_DEPTH - 1 into account when calculating the free space in the FIFO. Due to the lack of HW this patch has not been tested on an A10 SoC, but on an A20 SoC. It was not possible to reproduce the timeout on the A20. Fixes: 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size") Signed-off-by: Marc Kleine-Budde Signed-off-by: Jonas Rebmann Link: https://patch.msgid.link/20260914-spi-sun4i-fixes-v3-2-9fe919d5cecf@pengutronix.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 73228b15dcbe4862577b97f25d39a4a630d2466a Author: Marc Kleine-Budde Date: Mon Sep 14 17:35:55 2026 +0200 spi: spi-sun4i: sun4i_spi_transfer_one(): fix transfers for SUN4I_FIFO_DEPTH [ Upstream commit f3ce7a3ca82bd9cda9ef61250aeff65fe6b44809 ] In commit 6d9fe44bd73d ("spi: sun4i: fix FIFO limit"), the TX-FIFO is filled max to SUN4I_FIFO_DEPTH - 1 (= 63) bytes to work around timeouts observed on A10s SoCs. Commit 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size") added support for transfers larger than the FIFO size. But this commit only enabled the TX-FIFO empty interrupt for transfers larger than the FIFO (= 64) bytes. This breaks transfers with exactly 64 bytes: the TX-FIFO is only filled with 63 bytes but the interrupt to refill the FIFO is not triggered. The problem can be reproduced with the following command: | spidev_test -D /dev/spidev0.1 -S 64 -s 20000000 -I 1 | | [ 7797.548745] spi_master spi0: spi0.1: timeout transferring 64 bytes@20000000Hz for 110(100)ms | [ 7797.557237] spidev spi0.1: SPI transfer failed: -110 | [ 7797.562308] spi_master spi0: failed to transfer one message from queue | [ 7797.568936] spi_master spi0: noqueue transfer failed To fix the problem enable the TX-FIFO interrupt if the total TX length is larger than SUN4I_FIFO_DEPTH - 1 (= 63) bytes. Fixes: 196737912da5 ("spi: sun4i: Allow transfers larger than FIFO size") Signed-off-by: Marc Kleine-Budde Signed-off-by: Jonas Rebmann Link: https://patch.msgid.link/20260914-spi-sun4i-fixes-v3-1-9fe919d5cecf@pengutronix.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 252540943e8fa19079f9f5bb736532a994b8cfeb Author: Daniel Drake Date: Sun Oct 4 19:24:45 2026 +0100 drm/vc4: Set DRM DMA device directly from HVS and V3D [ Upstream commit b0a6b769cc174dd9fd154270f78acf72dc3e5c7e ] vc4 uses of_dma_configure() during bind to set the DMA configuration of the drm device by borrowing the configuration of one of its component devices. This violates driver model expectations that IOMMU probing and domain attachment occur before driver binding - see commit bcb81ac6ae3c ("iommu: Get DT/ACPI parsing into the proper probe path"). With the introduction of the bcm2712-iommu driver behind the vc4 hvs device, a warning is triggered: vc4-drm gpu: late IOMMU probe at driver bind, something fishy here! Instead of configuring the virtual aggregate device, adopt the pattern used by sun4i/sun8i/exynos where candidate DMA-capable hardware components register themselves as the device to use for DRM allocations via drm_dev_set_dma_dev(), provided a DMA device has not already been assigned. HVS will typically bind first and claim the DMA device. The gen6 36-bit DMA mask configuration was moved into vc4_hvs_bind() accordingly. For older generations, vc4's v3d component continues to be available as a fallback, and the default platform bus 32-bit DMA mask is retained. Fixes: da8e393e23ef ("drm/vc4: drv: Adopt the dma configuration from the HVS or V3D component") Signed-off-by: Daniel Drake Link: https://patch.msgid.link/20261004-drm-dma-device-2-v3-1-45b121ab819f@reactivated.net Reviewed-by: Maíra Canal Signed-off-by: Maíra Canal Signed-off-by: Sasha Levin commit 1e0f15259fb65fd618c21c964a35d889b1d87ac7 Author: Maíra Canal Date: Tue Sep 15 17:51:24 2026 -0300 drm/vc4: Drop the undocumented brcm,vc4-v3d compatible [ Upstream commit fb825a46e7982460bd620f5e6a71924c647f4280 ] "brcm,vc4-v3d" is the compatible string V3D support originally shipped with in commit d3f5168a0810 ("drm/vc4: Bind and initialize the V3D engine."). Commit 90d7116061f8 ("drm/vc4: Recognize a more specific compatible string for V3D.") added "brcm,bcm2835-v3d" in v4.6 and kept the original one around, because the Raspberry Pi firmware was shipping device trees that used it. That string was never part of the binding: the documentation added in commit 4653f22e9ab0 ("dt-bindings: Add binding docs for V3D.") describes only "brcm,bcm2835-v3d", and no upstream device tree has ever used "brcm,vc4-v3d": the first in-tree V3D node, from commit 49ac67e0c39c ("ARM: bcm2835: Add VC4 to the device tree."), already carried the specific name. The firmware device trees the compatible was kept for predate v4.6, released in 2016. Drop it from both match tables. Reviewed-by: Florian Fainelli Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260915-vc4-reset-control-v2-1-cb3a25b07822@igalia.com Signed-off-by: Maíra Canal Stable-dep-of: b0a6b769cc17 ("drm/vc4: Set DRM DMA device directly from HVS and V3D") Signed-off-by: Sasha Levin commit 2f079d1bd752d735c6ea49a053c8f65deab2ecf2 Author: Linus Walleij Date: Fri Sep 18 17:46:45 2026 +0200 dt-bindings: dma: dma40: Restore disabled-channels [ Upstream commit 38d97b1122e02f6b8859e660990aaeda1c32e00f ] The conversion of the DMA40 binding to YAML omitted the optional disabled-channels property from the original text binding. The driver still parses this property, but additionalProperties: false rejects any device tree using it. Restore disabled-channels and constrain it to the physical channel range. Also constrain memcpy-channels to the limits enforced by the driver and reject duplicate channel entries in both properties. Fixes: 23fbc87c8ae6 ("dt-bindings: dma: Rewrite ST-Ericsson DMA40 to YAML") Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Rob Herring (Arm) Link: https://patch.msgid.link/20260918-dma40-dt-disabled-channels-v1-1-0f691109d8d3@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 8c8d869138d4c59baf6223b5d6d830d47f297a99 Author: Jason Gunthorpe Date: Fri Oct 2 20:31:40 2026 -0300 efi/libstub: Free cmdline_ptr in efi_pe_entry [ Upstream commit 8ea857a2bb547e388e86ca42c58a97e162e09f83 ] Sashiko points out that efi_handle_cmdline() allocates this memory and hands it over to the caller. If efi_pe_entry() ever returns it should be freed. Add a __free annotation. Fixes: 42c8ea3dca09 ("efi: libstub: Factor out EFI stub entrypoint into separate file") Signed-off-by: Jason Gunthorpe Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin commit 7ff3df2efe4c2906e3892f0faa84f38f59f2647e Author: Vincent Mailhol Date: Thu Sep 3 23:25:16 2026 +0200 efi/libstub: make local GUID variables static [ Upstream commit e57b05932a49b1ef54c6f116b9b044ce37db7dcc ] Local efi_guid_t variables with automatic storage produce assembly similar to passing the address of the GUID macro directly. For the same reason, make these GUID variables static. Put the static declarations first in their local declaration block to visually separate them from the automatic variables. For an x86_64 build with gcc 15.3.0, bloat-o-meter reports: add/remove: 15/0 grow/shrink: 0/10 up/down: 336/-742 (-406) Function old new delta tbl_guid - 32 +32 rng_proto - 32 +32 pci_proto - 32 +32 guid - 32 +32 fs_proto - 32 +32 cc_guid - 32 +32 tpm2_guid - 16 +16 text_to_dp_guid - 16 +16 tcg2_guid - 16 +16 rng_table_guid - 16 +16 rng_algo_raw - 16 +16 proto - 16 +16 linux_eventlog_guid - 16 +16 lf2_proto_guid - 16 +16 info_guid - 16 +16 efi_get_memory_map 707 696 -11 efi_pci_disable_bridge_busmaster 1199 1184 -15 efi_get_random_bytes 216 188 -28 efi_remap_image 357 328 -29 efi_load_initrd 1113 1065 -48 efi_random_get_seed 1368 1297 -71 efi_measure_tagged_event 935 854 -81 efi_retrieve_eventlog 1686 1570 -116 handle_cmdline_files 2501 2341 -160 efi_stub_entry 4136 3953 -183 Total: Before=28877, After=28471, chg -1.41% Signed-off-by: Vincent Mailhol Signed-off-by: Ard Biesheuvel Stable-dep-of: 8ea857a2bb54 ("efi/libstub: Free cmdline_ptr in efi_pe_entry") Signed-off-by: Sasha Levin commit aa83272c6ffdb1e054b39462f807afec2c6eb90e Author: Jason Gunthorpe Date: Fri Oct 2 20:31:39 2026 -0300 efi/riscv: libstub: Don't set image_size in handle_kernel_image() [ Upstream commit fd4465f49b53c7379d10610f8edb71f77366a5b7 ] Sashiko points out the image_size should only be set if image_addr was reassigned to some allocated memory. If image_size is not zero then the caller will free the image_addr pointer. efi_kaslr_relocate_kernel() never works like that, if it changes image_addr to allocated memory the free is done through reserve_size. Fixes: b7ac4b8ee73d ("riscv: libstub: Implement KASLR by using generic functions") Signed-off-by: Jason Gunthorpe Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin commit d003acbf52efa21803321d65be9996877cac6d99 Author: Jason Gunthorpe Date: Fri Oct 2 20:31:38 2026 -0300 efi/libstub: Fix error unwind freeing fdt in allocate_new_fdt_and_exit_boot() [ Upstream commit d83fe67339f2032d8facf0fe8a047a4c5d15394f ] Sashiko says fdt_addr can point to either an allocated fdt or the fdt from get_fdt() which is memory owned by FW. Only the allocated fdt should be freed on the error unwind path. Use a dedicated variable for the allocation's size so that the free does not get confused. Fixes: 4fc8e738ff3e ("efi: libstub: remove DT dependency from generic stub") Reviewed-by: Jonathan Cameron Signed-off-by: Jason Gunthorpe Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin commit ac1e7ceaefb0a29af1c7f4b4f48dbead60f44fd3 Author: Pengpeng Hou Date: Fri Aug 14 15:55:31 2026 +0800 sh: defconfig: Enable the current M66592 UDC symbol [ Upstream commit 9b65dcd94222c37febf98127b1ac5452c94a16d0 ] The M66592 UDC provider is built under CONFIG_USB_M66592. Several SuperH defconfigs still enable the removed CONFIG_USB_GADGET_M66592 symbol. Replace the stale entries with the current provider symbol. Fixes: 193ab2a6070039e7 ("usb: gadget: allow multiple gadgets to be built") Signed-off-by: Pengpeng Hou Assisted-by: Codex:gpt-5 Tested-by: Geert Uytterhoeven # build-tested Reviewed-by: Geert Uytterhoeven Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: Sasha Levin commit 67d86f93b389e0c50a26aa18565efb30a6536824 Author: Florian Fuchs Date: Thu Jul 16 18:53:29 2026 +0200 sh: uaccess: Require offsettable operands for 64-bit user access [ Upstream commit 8b5dba9ea4a3f5ed994f03d6ca7686c49491b426 ] The 64-bit __get_user_u64()/__put_user_u64() paths address the memory operand as %T2 (base+4). This base+4 requires an offsettable address, but "m" also allows the indexed mode @(R0,Rn) (e.g. for a variable- indexed array element), which has no displacement field for the +4. Depending on optimization this build fails with "invalid 'asm'" or an ICE in GCC's change_address_1. Require an offsettable memory operand, allowing GCC to reload an unsuitable indexed address into an appropriate form. Fixes: 2d2b308a8b7d ("sh: Implement __get_user_u64() required for 64-bit get_user()") Signed-off-by: Florian Fuchs Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: Sasha Levin commit f3e3ef962a4c6deb0e647861e6da123aa0005abf Author: Florian Fuchs Date: Sat Jul 11 02:01:46 2026 +0200 sh: Fix built-in DTB build with generic rule [ Upstream commit 642c9b8ee61dd492eb75b347f9e5f0ce6bf24281 ] Commit 21bcc49974c2 ("sh: Migrate to the generic rule for built-in DTB") selected GENERIC_BUILTIN_DTB and renamed the Kconfig symbols, but left arch/sh/boot/dts/Makefile using the old obj-y form. So convert them as well, to fix the build error when using CONFIG_BUILTIN_DTB. Fixes: 21bcc49974c2 ("sh: Migrate to the generic rule for built-in DTB") Signed-off-by: Florian Fuchs Reviewed-by: John Paul Adrian Glaubitz Signed-off-by: John Paul Adrian Glaubitz Signed-off-by: Sasha Levin commit 39b5a7cd941d58a6bf22a01a63ff1902e4a63ee5 Author: Aurelien Jarno Date: Mon Oct 5 19:02:53 2026 -0600 riscv: fix RVG_SYSTEM_CSR_MASK width mask [ Upstream commit f89e5ee4d8c6cd56499cd87e550d4d4e19cf7e17 ] RVG_SYSTEM_CSR_MASK should be 12 bits [31:20], shifted down by 20 bits. Replace GENMASK(12, 0) by GENMASK(11, 0). Fixes: cd054837243b ("riscv: Allocate user's vector context in the first-use trap") Signed-off-by: Aurelien Jarno Reviewed-by: Jisheng Zhang Link: https://patch.msgid.link/20260911194233.3379532-1-aurelien@aurel32.net Signed-off-by: Paul Walmsley Signed-off-by: Sasha Levin commit abf9f320f9d615358a768aa7b238dbedb79f566c Author: Xu Yunxiang Date: Sun Sep 27 20:04:21 2026 +0800 bpf: Destroy callee-local dynptrs on subprog return [ Upstream commit b65cc81792eb07436879d9f0be8ebd18a78fffb4 ] A data slice is valid only while the specific dynptr that produced it remains valid. prepare_func_exit() copies a subprogram return value into the caller and then frees the callee state without applying the normal destruction semantics to dynptrs in the callee stack. A callee can therefore derive a slice from a local dynptr, return or spill the slice into its caller, and then let the dynptr disappear with the callee frame. The slice retains the id of a dynptr that is no longer in the verifier state, so the verifier continues to accept accesses through it. Before the object relationship refactor, bpf_dynptr_data() slices from referenced dynptrs also carried the shared reference id, allowing a later release to catch some of these escaped slices. The refactor made those slices precise children of their source dynptr and exposed the missing teardown as an accepted stale access even after the shared resource is released. Add destroy_dynptrs_in_stack_slots() to apply the existing dynptr teardown to an inclusive range of stack slots. Reuse it for dynptr initialization, variable-offset stack writes, and the entire callee stack before freeing the frame. The teardown rejects losing the last dynptr for a referenced resource and invalidates the dynptr and all its descendants, including slices held in the caller. Propagate errors through prepare_func_exit(). Reuse the existing teardown API and diagnostic. Update the affected callback test expectation in this change so the commit remains test-clean. Fixes: 308c7a0ae885 ("bpf: Refactor object relationship tracking and fix dynptr UAF bug") Reported-by: Sashiko Suggested-by: Amery Hung Signed-off-by: Xu Yunxiang Reviewed-by: Amery Hung Acked-by: Ihor Solodrai Link: https://lore.kernel.org/r/CAMB2axOmdHwSrHihSRskDywkCmEGQOX+6dZPN_A9u-HhxY3UDA@mail.gmail.com Link: https://lore.kernel.org/r/CAMB2axMmrTb+UZ84UD48MwMtXbk1s9bWtreU3AOfjzU0fPT0BA@mail.gmail.com Link: https://lore.kernel.org/bpf/20260927120422.1042107-2-xyx2021@mail.ustc.edu.cn Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit d82e7f2084dfe61f75283c5c093f0020617db627 Author: Daniel Zahka Date: Wed Sep 30 16:46:49 2026 -0700 selftests: drv-net: psp: test that rx-assoc fails on closed and listen socks [ Upstream commit ab1f1ed8e0bbd7721240fce0150194b232121f19 ] Cover two of the basic psp assoc states that have been defeatured. Do not include tests with shutdown(), connect(..., AF_UNSPEC), etc. I don't think the coverage is worth the complexity. That should be done with packetdrill. Signed-off-by: Daniel Zahka Fixes: 6b46ca260e22 ("net: psp: add socket security association code") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260930-psp-defeat-v2-4-f266e7447129@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 92619f6e2fbbab987ba957df9f1e68b5ee26cae9 Author: Daniel Zahka Date: Wed Sep 30 16:46:48 2026 -0700 net: psp: drop psp assoc clear in sk_clone() [ Upstream commit c135ee9f4975f9f05465a5fe5eb0970b0a47c55d ] Unwind the change from commit 1d2929d0850f ("net: psp: do not inherit the Rx association on clone"), now that assoc state cannot exist on listen sockets. With commit 8cc3aef0cb19 ("tcp: Do not allow buggy transitions between ehash and lhash2."), and the change in this series restricting PSP assoc operations to established sockets, this state should be unreachable. Signed-off-by: Daniel Zahka Fixes: 6b46ca260e22 ("net: psp: add socket security association code") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260930-psp-defeat-v2-3-f266e7447129@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit f84e20af7d01a7f29586cf3ddff92d275615e637 Author: Daniel Zahka Date: Wed Sep 30 16:46:47 2026 -0700 net: psp: require an established connection for association setup [ Upstream commit 86a19284425fb0c420e1702f8d0de891279df6b7 ] Check sk_state under the socket lock in both the rx-assoc and tx-assoc handlers, and only allow association setup on sockets in TCP_ESTABLISHED. Also, fail connect() when PSP assoc state is already present, and remove the dead PSP MSS adjustment from tcp_v[46]_connect(). The net effect of this commit is: 1. PSP assoc state can never exist on a listen socket. 2. The upgrade to PSP must be done while the socket is in TCP_ESTABLISHED. This change defeatures behavior that was previously allowed under the PSP uapi. My justification is: Nothing useful can be done after association setup on closed or listen sockets today. Listen sockets could accept a PSP-encrypted TCP SYN, but the child socket will not inherit any PSP state. On the other side, establishing PSP state prior to connect() will result in a PSP-encrypted TCP SYN sent to a listening peer, which in turn has the aforementioned limitations. That implies that there cannot be any users of this feature, so it should be safe to remove it from the PSP uapi. In theory, the check in the tx-assoc path is more restrictive than necessary. FIN_WAIT1/2, CLOSING, LAST_ACK and CLOSE_WAIT could be allowed, and the peer would accept PSP-encrypted ACKs in the post-FIN-sent states, or data in the half-close case, but it is simpler to disallow those states because they don't fit the upgrade model. The check in the tx-assoc path fixes a bug in commit 6b46ca260e22 ("net: psp: add socket security association code") where an unsynchronized write can be performed on an assoc shared with a timewait socket when the socket is in TCP_CLOSE after shutdown. This commit is not targeted at net because its premise of preventing listen sockets from holding assoc state depends on net-next commit 8cc3aef0cb19 ("tcp: Do not allow buggy transitions between ehash and lhash2.") Signed-off-by: Daniel Zahka Fixes: 6b46ca260e22 ("net: psp: add socket security association code") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260930-psp-defeat-v2-2-f266e7447129@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d129f53bdcb1060c86ded11010c4fa4cb2a499bc Author: Daniel Zahka Date: Wed Sep 30 16:46:46 2026 -0700 selftests: drv-net: psp: swap closed for connected sockets in assoc tests [ Upstream commit e404a2de7ed1a19ed356086e3b012e2227c1024d ] Future work will only allow rx-assoc and tx-assoc to be performed when the sock is in TCP_ESTABLISHED state. Several assoc_ tests, as well as dev_rotate_spi, test using the rx-assoc and tx-assoc uapi calls against sockets in TCP_CLOSE state. These tests don't involve sending or receiving data, nor involve looking up psp device by dst entry, so using a disposable disconnected socket was just a convenience. These can be replaced by a disposable loopback socket. The loopback sockets are IPv4, where the sockets they replace were AF_INET6. This doesn't reduce coverage, since the assoc handlers accept any TCP socket and don't look at the address family. Some users of rx-assoc and tx-assoc on closed sockets are left if they validate errors that are returned before the kernel will check the socket for TCP_ESTABLISHED. Signed-off-by: Daniel Zahka Fixes: 6b46ca260e22 ("net: psp: add socket security association code") Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260930-psp-defeat-v2-1-f266e7447129@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d5852b716d1bd55ecd523c24f972bc2c3b1d95b9 Author: Eric Dumazet Date: Wed Sep 30 14:40:18 2026 +0000 ipv4: reserve one IP ID per segment for UDP GSO packets [ Upstream commit 852c08d6a99149dc71c51cea125b5083f555237e ] __ip_make_skb() reserves a single IP ID for UDP GSO packets, but GSO assigns one IP ID per segment. Following packets then reuse these IDs, either from inet->inet_id or from the shared generator. Unless IP_PMTUDISC_DO/PROBE is used, DF is not set on UDP GSO packets, so segments can be fragmented on the path and IP ID reuse can lead to incorrect reassembly. Reserve one IP ID per segment, using the same test as udp_send_skb(). Fixes: bec1f6f69736 ("udp: generate gso with UDP_SEGMENT") Signed-off-by: Eric Dumazet Reviewed-by: Jiayuan Chen Cc: Willem de Bruijn Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260930144018.1174068-3-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 7422b4a152a58138bb00928e7840ca4aa12707ed Author: Eric Dumazet Date: Wed Sep 30 14:40:17 2026 +0000 ipv4: fix IP ID reuse in ip_select_ident_segs() [ Upstream commit fe7ca0c13f7d477d6f461114815c57fde3f930ca ] ip_select_ident_segs() must put the first of the @segs reserved IP IDs in iph->id, as GSO assigns id, id + 1, ..., id + segs - 1 to segments. Commit f866fbc842de ("ipv4: fix data-races around inet->inet_id") used atomic_add_return() for non-TCP sockets, which returns the first ID of the next packet instead. Consecutive GSO packets can then reuse IP IDs. SCTP GSO is affected. Other callers use segs == 1, and only see a harmless off-by-one (UDP GSO has a separate, older issue). Use atomic_fetch_add() instead, like the TCP path. Fixes: f866fbc842de ("ipv4: fix data-races around inet->inet_id") Signed-off-by: Eric Dumazet Reviewed-by: Jiayuan Chen Reviewed-by: David Ahern Reviewed-by: Willem de Bruijn Link: https://patch.msgid.link/20260930144018.1174068-2-edumazet@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 1a390fb479ba13eb5a4102e1c514e9bd642b243b Author: Chen-Yu Tsai Date: Sun Jul 12 11:00:09 2026 +0800 arm64: dts: allwinner: sun50i-h6: Add missing IOMMU for video engine [ Upstream commit 965a49fc413d996eba9bae2a3132f03f45a2ea1b ] The video engine on the H6 actually has two IOMMU ports. The one already listed is simply named "VE" in the user manual. The missing one is named "VE_R" and is probably either read-only or used for reference frames. Either way, it should be listed. Add a reference to the "VE_R" IOMMU port to the video engine node. Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage") Reviewed-by: Jernej Skrabec Link: https://patch.msgid.link/20260712030011.3778169-7-wens@kernel.org Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin commit bb83509d02d32c9ede987d752eb8e7637bcb5ea2 Author: Chen-Yu Tsai Date: Sun Jul 12 11:00:08 2026 +0800 arm64: dts: allwinner: sun50i-h6: Add missing SRAM region for video engine [ Upstream commit d7287d940f3cd8d5945009076058a8120281744b ] The SRAM C region contains a partial alias to the VE SRAM already referenced by the video engine. To avoid access through this alias window, the region should also be claimed by the video engine. Add a reference to the SRAM C region to the video engine node. Fixes: b542570e5605 ("arm64: dts: allwinner: h6: Add Video Engine node") Reviewed-by: Jernej Skrabec Link: https://patch.msgid.link/20260712030011.3778169-6-wens@kernel.org Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin commit 59f7ef6ee55302cfb237b4ebd184981b0fc876c3 Author: Mike Snitzer Date: Mon Sep 28 11:54:30 2026 -0400 pNFS/flexfiles: don't reset to MDS for v4 error when previous layout forbid it [ Upstream commit ec906cf7bee60f3bbc8500bac14e65813e38ac93 ] ff_layout_async_handle_error_v4() ends in -NFS4ERR_RESET_TO_MDS, which makes ff_layout_read_release() / ff_layout_write_release() call ff_layout_reset_read() or ff_layout_reset_write(hdr, false), and those call pnfs_read_done_resend_to_mds() / pnfs_write_done_resend_to_mds(). Those build a page I/O descriptor with force_mds set, so the flexfiles ->pg_init() never runs and no layout is consulted anywhere on the way: the READ or WRITE goes to the metadata server unconditionally. For a layout carrying FF_FLAGS_NO_IO_THRU_MDS that is exactly what the server forbade. The fall-through into reset: is already safe, because ff_layout_avoid_mds_available_ds() returns true for a segment with the flag and so answers -NFS4ERR_RESET_TO_PNFS first. What is not safe is the goto: the invalid-layout errors (NFS4ERR_PNFS_NO_LAYOUT, STALE, BADHANDLE, ISDIR, FHEXPIRED, WRONG_TYPE) call pnfs_destroy_layout() and jump straight to reset:, over that check. That is the case where the file had a perfectly good layout, something forced it to be given back, and the client answers by writing to the MDS behind the server's back. Test at reset: itself, so it covers the goto and any future one, and ask the inode (NFS_INO_NO_IO_THRU_MDS): the callers that jump here have just destroyed the layout hdr, so the hdr-level flag is no longer reachable, while the inode-level one is set for the life of the in-core inode. -NFS4ERR_RESET_TO_PNFS is the right answer rather than an error. It is what the fall-through already returns for the same flag, and the resends it drives - ff_layout_resend_pnfs_read() and ff_layout_reset_write(hdr, true) - re-enter the pgio path with force_mds clear, so a fresh LAYOUTGET is taken, which is precisely what a destroyed layout needs. A LAYOUTGET that fails fatally makes pnfs_update_layout() return an error, which ->pg_init() reports; a non-fatal refusal (NFS4ERR_LAYOUTUNAVAILABLE, NFS4ERR_TOOSMALL) returns no segment instead, and the client keeps retrying through pNFS rather than falling back. ff_layout_async_handle_error_v3() needs no such change: it returns only -NFS4ERR_RESET_TO_PNFS or -EAGAIN. Fixes: 260074cd8413 ("pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS") Assisted-by: Claude:claude-opus-5[1m] Signed-off-by: Mike Snitzer Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 341a9bd0f7061d857edd6583107b367f432ed065 Author: Mike Snitzer Date: Mon Sep 28 11:54:29 2026 -0400 pNFS/flexfiles: don't read through MDS when previous layout forbid it [ Upstream commit 2f007ba074ad77e70d941e16956d1937dc3080c6 ] ff_layout_pg_init_read() falls back to the MDS whenever pnfs_update_layout() returns no segment and no error: a bulk CB_LAYOUTRECALL (FSID, DEVICEID or ALL), LAYOUTGETs blocked behind a layout being returned, or a LAYOUTGET refused with NFS4ERR_LAYOUTUNAVAILABLE or NFS4ERR_TOOSMALL, which set the per-iomode fail bit for PNFS_LAYOUTGET_RETRY_TIMEOUT. That is the read-side twin of the write path fixed by commit 1d62e659c0bf ("NFSv4/flexfiles: honor FF_FLAGS_NO_IO_THRU_MDS in pg_get_mirror_count_write"), and it is reached in exactly the situation that matters most: the file had a valid layout, the layout had to go back, and the next one has not arrived yet. The write side could answer -EAGAIN because writeback owns the retry and redirties the page. A read has no such owner, so -EAGAIN here would surface as an I/O error to the application. Wait for a layout instead, on the same terms the function already uses when the layout lookup itself returns -EAGAIN: sleep a second and retry, bounded by pg_maxretrans, which ff_layout_pg_init_read() sets only for soft and softerr mounts. A hard mount therefore waits, which is what a hard mount is for, and matches what the FF_FLAGS_NO_IO_THRU_MDS check on the data server selection a few lines above already does. That includes waiting out NFS4ERR_LAYOUTUNAVAILABLE: a file that was given a layout with this flag must not be read off the MDS, whatever the server says afterwards. The test asks the inode (NFS_INO_NO_IO_THRU_MDS) rather than the layout hdr, because in this path there is no segment, and the hdr that carried the flag may already have been destroyed. Where a segment is in hand - the data server selection above, ff_layout_read_pagelist() - the existing per-segment ff_layout_no_fallback_to_mds() test stays, since it is the more precise question. Fixes: 260074cd8413 ("pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS") Assisted-by: Claude:claude-opus-5[1m] Signed-off-by: Mike Snitzer Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 186abac93c09287d46c41f8bb194ab1c5aa04395 Author: Mike Snitzer Date: Mon Sep 28 11:54:28 2026 -0400 pNFS/flexfiles: honor FF_FLAGS_NO_IO_THRU_MDS over the mdsthreshold hint [ Upstream commit 78422f623c1e150e3cdfe62598c6e352a2dcfc5f ] A flexfiles layout may carry FF_FLAGS_NO_IO_THRU_MDS, which tells the client that this file's data must not be read or written through the metadata server. The RFC 5661 mdsthreshold hint pulls the other way. When a server returns one, pnfs_within_mdsthreshold() answers "use MDS I/O" for every I/O below the threshold, pnfs_update_layout() then hands back no segment, and ff_layout_pg_init_read() reads through the MDS - the very thing the layout forbids. A server that sets both is asking for two incompatible things; the layout flag is the stronger statement, and the one whose violation the client cannot recover from. Record the policy on the inode, where it outlives the layout hdr that carried it, and consult it before the hint: - ff_layout_alloc_lseg() sets NFS_INO_NO_IO_THRU_MDS beside the existing sticky hdr-level NFS4_FF_HDR_NO_IO_THRU_MDS bit. - pnfs_within_mdsthreshold() returns false at once for such an inode, so no I/O is diverted to the MDS on the strength of the hint. The bit is never cleared for the life of the in-core inode. Servers are assumed to be consistent in their no-fallback policy per file, which is the assumption ff_layout_hdr_no_fallback_to_mds() already makes; a server that was not would lose the effect of its mdsthreshold hint - a SHOULD - on an inode that is already in core, and nothing else. Fixes: 260074cd8413 ("pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS") Assisted-by: Claude:claude-opus-5[1m] Signed-off-by: Mike Snitzer Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit a2c365819b99d534593238d01887e61f4b702a78 Author: Scott Gauche Date: Mon Oct 5 11:40:17 2026 -0400 ALSA: hda/realtek: Fix audio after Windows reboot on ASUS Q423SA [ Upstream commit 8acd6469f42784f38872ad83b14c41152d986b63 ] The ASUS Vivobook S 14 Q423SA-U5512 (DMI family S5406SA) with the ALC294 codec has working analog audio when booted directly after a full shutdown. After a warm reboot from Windows 11, audio works briefly during Linux startup, then both the internal speakers and headphones become silent. PCM playback continues without errors. Coefficient 0x1b is 0x4e4b on a direct cold boot, but 0x4a4b after the Windows warm reboot. Restoring bit 10 changes it back to 0x4e4b and immediately enables both analog outputs. Speaker playback, headphone playback, jack switching, cold boot, and suspend/resume were tested successfully. The same 0x4a4b state and immediate recovery with 0x4e4b were independently confirmed on another S5406SA with subsystem 1043:10c4. The same coefficient write is already used by ALC294_FIXUP_ASUS_COEF_1B for the ASUS UX431DA. That fixup cannot be reused here because it chains to ALC289_FIXUP_ASUS_GA401 and applies unrelated DAC routing and microphone pin configuration. Add a model-specific fixup for subsystem 1043:10c4 and chain it to the existing ALC2XX_FIXUP_HEADSET_MIC fixup instead. Link: https://github.com/thesofproject/sof/issues/11051 Fixes: f2d08f3651fb ("ALSA: hda/realtek: Fix headset mic on ASUS Vivobook S14 S5406SA") Signed-off-by: Scott Gauche Link: https://patch.msgid.link/20261005154017.1164657-1-scott-dev@scottgauche.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit f420328d84be72008f93ead99e5c254b5fbe993a Author: Linus Walleij Date: Sun Sep 27 11:03:37 2026 +0200 dmaengine: ste_dma40: Validate memcpy configuration [ Upstream commit 0ac4a90c4805b41013044fdefff051ae59a54302 ] d40_config_memcpy() builds a default memcpy configuration without passing it through d40_validate_conf(). A dev_type supplied through the memcpy-channels device tree property can therefore bypass the bounds checks added for client configurations. The generic DMA direction enum assigns zero to DMA_MEM_TO_MEM, unlike DMA40's old private enum. Allow memory-to-memory directions in the validator so checking the generated configuration does not reject all memcpy channels. Validate the generated memcpy configuration before deriving logical channel registers or allocating the channel. Fixes: 2c2b62d5d911 ("dmaengine: ste_dma40: Replace ST-E's home-brew DMA direction defs with generic ones") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225008.5F9651F000E9@smtp.kernel.org/ Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-24-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 942ff12bbc95589f8e9658d44808ff78295f04ca Author: Linus Walleij Date: Sun Sep 27 11:03:36 2026 +0200 dmaengine: ste_dma40: Validate fixed physical channel indexes [ Upstream commit 884e01160bc727509b4fdf04e763a86b936df464 ] Fixed physical memcpy allocation uses dma_cfg.phy_channel directly as an index into phy_res when use_fixed_channel is set. d40_validate_conf() validates dev_type but not the fixed physical channel, allowing an invalid configuration to access memory outside the array. Validate the fixed physical channel centrally before accepting the channel configuration. Fixes: f000df8c5a0e ("dmaengine: ste_dma40: support fixed physical channel allocation") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225008.5F9651F000E9@smtp.kernel.org/ Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-23-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit be029521507553f9f2bdf9a35a1812c7c582ad93 Author: Linus Walleij Date: Sun Sep 27 11:03:34 2026 +0200 dmaengine: ste_dma40: Fix V4B event group mapping [ Upstream commit b36f8fce7314fed53563c60e683ff86deb8a51ae ] DMA40 physical resources are connected in pairs to event groups. The mapping repeats after each complete set of groups. D40_GROUP_SIZE and D40_PHYS_TO_GROUP() encode the four-group V4A layout. On V4B, which has five groups, resources 8 and 9 are consequently offered both to event groups 0 and 4. The GCC clock bookkeeping also treats these resources as group 0 instead of group 4. Derive the physical-resource stride and reverse mapping from the variant-specific number of event groups. This preserves the V4A mapping and gives V4B a ten-resource stride: resources 8 and 9 belong only to group 4, while resources 10 and 11 repeat group 0. Fixes: 3cb645dc85a0 ("dmaengine: ste_dma40: support more than 128 event lines") Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20260927-dma40-fixes-v7-21-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit e9d08e45b12e815484886e4d0e6f11168e9437db Author: Linus Walleij Date: Sun Sep 27 11:03:33 2026 +0200 dmaengine: ste_dma40: Fix event group bounds [ Upstream commit e66a9dbe04c71249cfb2a544c9c25d1b3b761fba ] The dev_type validation can allow values whose derived event group has no matching physical channel pair. d40_allocate_channel() then indexes phy_res with j + event_group * 2, and __d40_set_prio_rt() uses the same group to select priority and realtime registers. The physical-mode validation also compares dev_type with the number of physical channels. However, dev_type identifies an event line: DB8500 has eight physical channels but 64 source and 64 destination event lines. The event group determines which physical channel pair can serve an event, so the physical channel count is not a valid dev_type limit. Reject dev_type values outside the hardware event-group range, remove the incorrect physical channel count limit, and stop the physical-channel search before a partial final channel group can index past phy_res. Fixes: 26955c07dcf3 ("dmaengine: ste_dma40: Amalgamate DMA source and destination channel numbers") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225008.5F9651F000E9@smtp.kernel.org/ Assisted-by: LLM Link: https://lore.kernel.org/dmaengine/20260819225008.5F9651F000E9@smtp.kernel.org/ Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20260927-dma40-fixes-v7-20-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 3943d389093a64151e187682e075d8fff356b169 Author: Linus Walleij Date: Sun Sep 27 11:03:32 2026 +0200 dmaengine: ste_dma40: Fix logical channel bounds check [ Upstream commit 57938e0c2a24f9f792fe9f611391ef6b58d1aa21 ] d40_validate_conf() checks the raw dev_type against num_log_chans, but d40_allocate_channel() derives the lookup_log_chans index as either 2 * dev_type or 2 * dev_type + 1. Validate the dev_type against the derived logical channel index limit so channel allocation cannot write past lookup_log_chans. Fixes: 26955c07dcf3 ("dmaengine: ste_dma40: Amalgamate DMA source and destination channel numbers") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260618051539.15E201F000E9@smtp.kernel.org/ Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20260927-dma40-fixes-v7-19-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit d83113f699232956f0c724c0b33b03c3663f2444 Author: Linus Walleij Date: Sun Sep 27 11:03:31 2026 +0200 dmaengine: ste_dma40: Reject direction changes after allocation [ Upstream commit 77ebc64f40717b8501793b5f5ee717a141e62e8e ] Logical channel allocation uses the configured direction to select the source or destination allocation mask, derive the logical channel number, and choose the LCPA location. d40_set_runtime_config_write() nevertheless overwrites the configured direction when a transfer is prepared for the opposite direction. d40_free_dma() then clears the wrong allocation mask, leaking the original resource and potentially releasing one used by another client. Reject directions that differ from the direction used during allocation and propagate runtime configuration errors to callers. Skip slave runtime configuration for memcpy transfers, which also use d40_prep_sg() but do not require it. Fixes: 95e1400fa131 ("DMAENGINE: add runtime slave config to DMA40 v3") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260618051539.15E201F000E9@smtp.kernel.org/ Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-18-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 42d97e76f29c00e5c1e34e73919fae6106044cad Author: Linus Walleij Date: Sun Sep 27 11:03:30 2026 +0200 dmaengine: ste_dma40: Validate DMA specifier length [ Upstream commit 9f1064ebe17cf3ab65ac6eb166398e02678aea33 ] The DMA40 binding requires three cells, but d40_xlate() reads args[0], args[1], and args[2] without checking args_count. A malformed provider node can specify fewer cells, leaving some of these values uninitialized when the OF DMA core invokes the translation callback. Reject specifiers that do not contain exactly three cells before reading the argument array. Fixes: fa332de5c6b3 ("dmaengine: ste_dma40: Supply full Device Tree parsing support") Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-17-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit a6a9b7846e09613bad2ad61bdf15ae942ef98f19 Author: Linus Walleij Date: Sun Sep 27 11:03:29 2026 +0200 dmaengine: ste_dma40: Validate disabled channel indexes [ Upstream commit c96e9f056095825b5f8d4a11f4107fc174892f92 ] d40_of_probe() checks how many entries disabled-channels contains, but not the channel numbers themselves. d40_phy_res_init() later uses every value as an index into base->phy_res, whose size is the number of channels found in this DMA40 instance. An out-of-range value can therefore write beyond the allocation. Validate each disabled channel against the detected hardware channel count before allocating and initializing the channel resources. Fixes: 499c2bc3cc89 ("dmaengine: ste_dma40: Fetch disabled channels from DT") Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-16-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 8a68c0d3112b551dafe822fe384b0ac1881ee35a Author: Linus Walleij Date: Sun Sep 27 11:03:28 2026 +0200 dmaengine: ste_dma40: Fix memcpy channel parsing [ Upstream commit f2baf04a695de4f952513cb00ccf0338c6db2e00 ] d40_of_probe() validates the memcpy-channels property against D40_MEMCPY_MAX_CHANS, but reads the property directly into a smaller global array. A long property can therefore overwrite adjacent data. The mutable global also lets a later DMA40 instance replace the memcpy channel mapping used for future allocations on an earlier instance. Store the mapping in the per-device platform data, validate the property against that storage, and check the property read result. The property is required and d40_probe() always populates the platform data, so remove the obsolete global mapping and fallback. Fixes: a7dacb68b35a ("dmaengine: ste_dma40: Allow memcpy channels to be configured from DT") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225215.5EA2F1F000E9@smtp.kernel.org/ Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-15-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 6a665b8f66faebcb2942184bd12a4660d272fdb2 Author: Linus Walleij Date: Sun Sep 27 11:03:27 2026 +0200 dmaengine: ste_dma40: Put the LCPA SRAM node [ Upstream commit 9a3762b470421658214baeb6cce3eed7344bb435 ] of_parse_phandle() takes a reference to the LCPA SRAM node, but d40_probe() does not release it after translating the node into a resource. This leaks the node reference for the lifetime of the system. Put the node immediately after of_address_to_resource() so both the success and error paths release the reference. Fixes: 5a1a3b9c19dd ("dmaengine: ste_dma40: Get LCPA SRAM from SRAM node") Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-14-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit e1e6717da8079593546c3f11cdc7447766cac0d4 Author: Linus Walleij Date: Sun Sep 27 11:03:26 2026 +0200 dmaengine: ste_dma40: Fix probe LCLA free [ Upstream commit 750dfcdb7a406bdd52d604099a631bbe96ddda91 ] When LCLA is placed in ESRAM, d40_probe() stores a devm_ioremap() address in lcla_pool.base and leaves base_unaligned unset. The destroy_cache error path can then pass the ioremap address to free_pages(). Only free lcla_pool.base with free_pages() when the driver allocated the LCLA pool from normal memory. The ESRAM mapping is devm-managed. Fixes: 339f5041089a ("dmaengine: ste_dma40: Use managed resources") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225114.AE1511F000E9@smtp.kernel.org/ Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-13-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 646e7c7225235aed443e3a4726cf920477192b01 Author: Linus Walleij Date: Sun Sep 27 11:03:25 2026 +0200 dmaengine: ste_dma40: Fix LCLA allocation order [ Upstream commit 7d4dc355c574d414d2402ac481a2fc4ee51e2771 ] d40_lcla_allocate() calculates the number of pages needed for LCLA, but passes that raw page count as the allocation order to __get_free_pages(). The same value is later passed to free_pages(). Store the allocation order with get_order() instead, and use a separate byte size for allocation diagnostics, fallback kmalloc() sizing and DMA mapping. Fixes: 508849ade23c ("DMAENGINE: ste_dma40: allocate LCLA dynamically") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225114.AE1511F000E9@smtp.kernel.org/ Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-12-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 4e322ea4609915e9097c9f921442f07e7598ed97 Author: Linus Walleij Date: Sun Sep 27 11:03:24 2026 +0200 dmaengine: ste_dma40: Fix DMA registration unwind [ Upstream commit f71ef686f913c8e9771a54466a76d653b83cd3dd ] d40_dmaengine_init() registers DMAengine devices using devres-managed unregister actions. If probe fails after one of those registrations, the DMAengine devices stay visible until devres unwinds after d40_probe() returns. The channel tasklets are also initialized before each DMAengine device is registered. An interrupt can therefore have queued a tasklet by the time a later registration step fails, but unregistering the DMAengine devices does not drain that tasklet before probe-owned storage is released. Add tasklet cleanup actions to the DMAengine registration devres group. Install each action before publishing its DMAengine device. If action registration fails, those tasklets have never been exposed and cannot have been scheduled, so use devm_add_action() without immediate reset cleanup. On later failure, free the IRQ before releasing the group so no new tasklets can be scheduled, then unregister the DMAengine devices and drain their tasklets before freeing the remaining probe resources. Keep the managed registrations and cleanup actions in place on successful probe by removing only the temporary group markers. Fixes: 42ae6f1695be ("dmaengine: ste_dma40: Remove platform data") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225215.5EA2F1F000E9@smtp.kernel.org/ Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20260927-dma40-fixes-v7-11-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 6f6c08a8f2473d91d9d9e55c9f488b61c5492b4c Author: Linus Walleij Date: Sun Sep 27 11:03:23 2026 +0200 dmaengine: ste_dma40: Fix probe IRQ leak [ Upstream commit 7ca608cf6b842685bbbe131d4f7d638f7cdc2b5d ] d40_probe() registers the hardware interrupt before several later probe steps that can fail. Those error paths jump to destroy_cache without freeing the IRQ, leaving the handler registered after probe resources have been released. Route failures after a successful IRQ request through a dedicated cleanup label. Keep the request before DMAengine registration because that registration publishes channels to clients. Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260618051539.15E201F000E9@smtp.kernel.org/ Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20260927-dma40-fixes-v7-10-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 1d740ca0378406ded93898b39138f36d51647d3c Author: Linus Walleij Date: Sun Sep 27 11:03:22 2026 +0200 dmaengine: ste_dma40: Init hardware before registration [ Upstream commit ffd583a734dc4bdafb9e18d9aa48b6efafd1a628 ] d40_probe() enables the interrupt handler and registers DMAengine devices before calling d40_hw_init(). An interrupt pending from the bootloader can therefore reach the handler while the hardware interrupt state is not initialized and channel lookup entries are empty. The handler deliberately does not acknowledge an interrupt for an unknown channel, so a level IRQ can retrigger continuously. Initialize the hardware and set the DMA segment limit before requesting the IRQ or registering DMAengine devices. d40_hw_init() clears pending logical and physical interrupt status, so request_irq() can enable the line normally after the hardware state is initialized. This ensures that the handler and clients only observe initialized hardware. Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225215.5EA2F1F000E9@smtp.kernel.org/ Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20260927-dma40-fixes-v7-9-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit dfe7959f45433b394b4572b5e764ef9a889d69e3 Author: Linus Walleij Date: Sun Sep 27 11:03:21 2026 +0200 dmaengine: ste_dma40: Return IRQ_NONE when no interrupt is pending [ Upstream commit b96967644c524d34b2fdd2e58c31e7b36e3469e6 ] d40_handle_interrupt() returns IRQ_HANDLED even when no terminal-count or error status bit is pending. IRQ_NONE is not only used to identify a device on a shared interrupt. The generic IRQ core also counts it as unhandled for spurious IRQ detection. DMA40 does not request this IRQ with IRQF_SHARED, so interrupt sharing is not the purpose of this change. If the line remains asserted without matching DMA40 status, returning IRQ_HANDLED hides the stuck interrupt and can leave the CPU servicing it indefinitely. Track whether any DMA40 status is pending and return IRQ_NONE when none is present, allowing the generic IRQ core to diagnose and eventually disable the faulty line. DMA40 channels can be owned by other SoC cores. Their status means that the interrupt is real, but Linux must not acknowledge it. Treat foreign status as handled and leave its acknowledgment to the owning core, while acknowledging and dispatching only registered Linux channels. Fixes: 8d318a50b3d7 ("DMAENGINE: Support for ST-Ericssons DMA40 block v3") Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-8-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 137d6d8ac172eef518d862ca092df06cd561d479 Author: Linus Walleij Date: Sun Sep 27 11:03:20 2026 +0200 dmaengine: ste_dma40: Handle runtime PM resume errors [ Upstream commit 55a35231b8ced2250a7743ec350a9566d553780e ] Several channel operations use pm_runtime_get_sync() and access DMA40 registers without checking whether runtime resume succeeded. If resume fails, the registers may be inaccessible. pm_runtime_get_sync() also increments the usage counter on failure, making error unwinding easy to unbalance. Use pm_runtime_resume_and_get() and avoid register access when resume fails. Acquire the runtime PM reference before allocating a channel so failure needs no channel-allocation rollback. If a queued transfer cannot be started because resume failed, retire all issued descriptors through the normal tasklet path. Since dma_async_issue_pending() cannot return an error, leaving them queued would make clients wait indefinitely for callbacks. Termination and channel release must also clean up software state when the controller cannot resume. d40_term_all() only releases descriptor state and does not access DMA40 registers, so it remains unconditional. Balance each transient runtime PM reference in its successful acquisition block, without bookkeeping flags. Release the outstanding busy reference and channel allocation state when freeing a channel. Skip only the hardware stop that requires register access. Fixes: 7fb3e75e1833 ("dmaengine/ste_dma40: support pm in dma40") Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-7-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit cc768e379fa23bd1f45e719722698c70a0c3cba5 Author: Linus Walleij Date: Sun Sep 27 11:03:19 2026 +0200 dmaengine: ste_dma40: Check runtime PM in IRQ [ Upstream commit 12787e3f2f93f3af59769b08ee4fcb044531120b ] d40_handle_interrupt() reads DMA40 interrupt registers unconditionally. A spurious interrupt can arrive while the device is runtime suspended, after dma40_runtime_suspend() has disabled the GCC clock. Avoid touching the registers unless the device is runtime active by taking a conditional runtime PM reference. Return IRQ_NONE when the device is suspended, and drop the reference after handling an active interrupt. When CONFIG_PM is disabled, pm_runtime_get_if_active() returns -EINVAL even though the registers remain accessible. Keep handling interrupts in that configuration and only drop the runtime PM reference when one was acquired. Fixes: 7fb3e75e1833 ("dmaengine/ste_dma40: support pm in dma40") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260819225114.AE1511F000E9@smtp.kernel.org/ Reviewed-by: Frank Li Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-6-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 5100d5e82f59bf9aec4b2b270a143581d1eedb1c Author: Linus Walleij Date: Sun Sep 27 11:03:18 2026 +0200 dmaengine: ste_dma40: Fix probe runtime PM disable [ Upstream commit c6809b381e34f8966cc3d9e5d7d658775a408f83 ] Some d40_probe() error paths jump to destroy_cache before runtime PM has been enabled for the DMA controller device. The label unconditionally calls pm_runtime_disable(), which increments disable_depth even though this probe attempt never enabled runtime PM. Use devm_pm_runtime_set_active_enabled() to mark the controller active, enable runtime PM and register balanced cleanup for probe failure. This avoids both the disable-depth imbalance and ad-hoc probe state tracking. The interrupt handler uses pm_runtime_get_if_active() and cannot acknowledge a pending interrupt while runtime PM is disabled. Request the IRQ only after enabling runtime PM so the handler cannot enter an unacknowledged interrupt loop during probe. Fixes: 0618c077a8c2 ("dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260618051539.15E201F000E9@smtp.kernel.org/ Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-5-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit a51635742c5b94a85d1ee572f6734735214b3239 Author: Linus Walleij Date: Sun Sep 27 11:03:17 2026 +0200 dmaengine: ste_dma40: Fix failed start cleanup [ Upstream commit 8175ead5727173d4b96d1e830e696765d75ade71 ] If d40_start() fails after a queued descriptor has been moved to the active list, d40_queue_start() currently returns NULL without unwinding the transfer state or clearing the channel busy flag. Fix this pre-existing error path by completing the descriptor through the normal tasklet path, clearing the busy flag, balancing the runtime PM reference and returning an error pointer to distinguish the failure from the no-work case. Do not free the descriptor directly, since it has already been submitted and has a DMA cookie. When starting the next queued transfer from the completion handler, put the completed descriptor on the done list first. This preserves FIFO completion order if the new transfer fails to start and prevents the completed cookie from moving backwards. Use done-list membership rather than the cyclic flag to identify terminal descriptors in the tasklet. A cyclic descriptor that failed to start is then completed and removed instead of remaining permanently at the head of the done list. Fixes: 7d83a854a1a4 ("dma40: remove "hardware link with previous jobs" code") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/dmaengine/20260618051539.15E201F000E9@smtp.kernel.org/ Reviewed-by: Frank Li Assisted-by: LLM Link: https://lore.kernel.org/dmaengine/20260618051539.15E201F000E9@smtp.kernel.org/ Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-4-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 7e845a72faee81f4daf1f9613e18013255526635 Author: Linus Walleij Date: Sun Sep 27 11:03:16 2026 +0200 dmaengine: ste_dma40: Recover coalesced cyclic callbacks [ Upstream commit db28400d92cd97005065dad230b8a5d72ab121cb ] DMA40 has one terminal-count status bit per channel, so cyclic period interrupts can coalesce. Use the memory-side pointer displacement to queue the minimum observable number of callbacks. If sampling fails, queue one callback and invalidate the saved position; the next successful sample resynchronizes without recounting it. The pointer is modulo the cyclic buffer: a displacement of d periods can mean d plus n complete iterations of the buffer. Report d, so the driver could have missed n iterations of the buffer; DMA40 has no counter to recover them. For an unchanged pointer, report one callback rather than risk a spurious full-buffer burst. This condition has not been seen in practice and is only a product of review comments that the buffer can miss interrupts. The preceding cyclic-residue fix ensures that every cyclic period fits in one LLI, so each boundary corresponds to one client callback. Fixes: 0c842b551063 ("dma40: cyclic xfer support") Assisted-by: LLM Signed-off-by: Linus Walleij Reviewed-by: Frank Li Link: https://patch.msgid.link/20260927-dma40-fixes-v7-3-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit c94f960fcaea45aae7622f21d7fb73097021a832 Author: Linus Walleij Date: Sun Sep 27 11:03:15 2026 +0200 dmaengine: ste_dma40: Fix cyclic transfer residue [ Upstream commit c80edceff29ee212987c2d2c851b2cb2eb4b477a ] DMA40 reads residue from the element count of the currently active LLI. For a cyclic transfer this reports at most one period, not the bytes remaining until the cyclic buffer wraps. Once DMA40 advertises burst granularity, DMAengine PCM uses this residue directly. For a four-period PCM buffer it consequently reports the hardware pointer near three periods after every period interrupt. ALSA eventually stops playback with -EIO although DMA period callbacks continue. Calculate cyclic residue from the current memory-side hardware pointer instead. Read the destination pointer for capture and the source pointer for playback. Sample the split logical channel pointer coherently and retain the last valid residue during relink transitions. Make at most three residue sampling attempts: one initial read plus two retries. The retries let transient split-register updates or LLI relink windows settle, while the limit prevents unbounded polling if hardware does not yield a valid pointer. This avoids counting terminal-count interrupts, which races with hardware advancing to the next LLI and cannot account for coalesced interrupt status. Also reject cyclic periods that expand into multiple LLIs because logical cyclic LLIs each request a terminal-count interrupt and would generate more than one callback per period. Reject invalid cyclic geometries before dividing or constructing the scatterlist as well. Reported-by: Frank Li Closes: https://lore.kernel.org/dmaengine/aq2wIPJW6viUxyy9@SMW015318/ Fixes: 15c606686541 ("dmaengine: ste_dma40: indicate granularity on channels") Assisted-by: LLM Reviewed-by: Frank Li Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-2-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit b5b853984fa6a83a6ea18327677badd77162da6c Author: Linus Walleij Date: Sun Sep 27 11:03:14 2026 +0200 dmaengine: ste_dma40: Fix physical cyclic capability [ Upstream commit 11101a8e3e42273a5910a149f6324040b88f4747 ] d40_dmaengine_init() configures dma_both for physical channels that can handle both slave and memcpy transfers. Physical DMA40 channel setup has supported cyclic LLIs since cyclic transfer support was added, but the DMA_CYCLIC capability is set on dma_slave a second time instead of dma_both. Set DMA_CYCLIC on dma_both so d40_ops_init() installs device_prep_dma_cyclic and physical channels advertise cyclic support. Fixes: 0c842b551063 ("dma40: cyclic xfer support") Reviewed-by: Frank Li Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260927-dma40-fixes-v7-1-89f595e8851d@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit dea7e879d182e021001fc18ebce9b73aca18fc04 Author: Roman Demidov Date: Tue Sep 29 17:20:59 2026 +0300 drm/msm/a6xx: check pm_runtime_resume_and_get during resume [ Upstream commit e2f57c576f14f96449cfee840860cb9707501d23 ] The return values of pm_runtime_resume_and_get() calls in a6xx_pm_resume() are not checked, which can lead to hardware access on suspended devices and PM reference underflows. Fix this by checking the return value of each pm_runtime_resume_and_get() call and properly unwinding the previously acquired resources on failure. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 5a903a44a984 ("drm/msm/a6xx: Introduce GMU wrapper support") Signed-off-by: Roman Demidov Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/757106/ Message-ID: <20260929142103.81854-2-roman.demidov.nn@gmail.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit 6459d1895ca87a901e4e2abbec1a113845c7e908 Author: Roman Demidov Date: Tue Sep 29 17:20:58 2026 +0300 drm/msm/a6xx: fix use-after-free of OPP in a6xx_pm_resume [ Upstream commit 8128ae7af6b4dc95e486c5c0a80839a069df578e ] The OPP reference obtained via dev_pm_opp_find_freq_ceil() is dropped with dev_pm_opp_put() before being passed to dev_pm_opp_set_opp(). If the reference count reaches zero, the OPP object may be freed, leading to a use-after-free when dev_pm_opp_set_opp() dereferences it. Fix the order of calls: first use the OPP to set the required performance state, then release the reference. Fixes: 5a903a44a984 ("drm/msm/a6xx: Introduce GMU wrapper support") Signed-off-by: Roman Demidov Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/757104/ Message-ID: <20260929142103.81854-1-roman.demidov.nn@gmail.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit 962306ab3a2c21a60d3c72641f9deaf9222619a7 Author: Jiale Yao Date: Sat Oct 3 17:59:13 2026 +0800 wifi: ath12k: Reserve space for a string terminator [ Upstream commit 13b15eabe2c541b80406166964cdc8ccb5e9c32a ] ath12k_write_htt_stats_type() accepts count == size, which fills the zero-initialized buffer without a terminating NUL. sscanf() then reads beyond the buffer. Reject input that leaves no room for the trailing NUL. Fixes: 8c7a5031a6b0 ("wifi: ath12k: Fix buffer overflow in debugfs") Reviewed-by: Dan Carpenter Reviewed-by: Rameshkumar Sundaram Reviewed-by: Baochen Qiang Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20261003095913.575108-1-yaojiale02@163.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit e90220cca3c7b4dc237b1b60ec0146e53e59a5f6 Author: Baochen Qiang Date: Mon Sep 28 18:45:25 2026 +0800 wifi: ath11k: fix unbalanced IRQ enable/disable during suspend/resume [ Upstream commit e56c9d429ba004d5416b03091fd7656187cdcaf1 ] Commit f7a74e131d3f ("wifi: ath11k: disable interrupts during firmware crash recovery") added an unconditional ath11k_hif_irq_disable()/ ath11k_hif_ce_irq_disable() pair inside ath11k_core_reconfigure_on_crash(), guarded by "if (!ab->is_reset)", to stop the DP NAPI from touching rings that have just been torn down. That fixes AHB device recovery, but breaks PCI device suspend/resume. During suspend, IRQs are disabled once in ath11k_core_suspend_late(). Then during resume, ath11k_core_reconfigure_on_crash() sees ab->is_reset clear and disables them a second time. Those IRQs are enabled only once during the following reinitialization, leaving the IRQ lines masked. As a result, HTC control responses never arrive, and resume fails: failed to receive control response completion, polling.. failed to connect to HTT: -110 failed to reconfigure driver on crash recovery failed to resume core: -110 Fix this by disabling the IRQs unconditionally at the top of ath11k_core_reconfigure_on_crash(), and instead drop the disable calls from the two places that already disable IRQs before this function can run: ath11k_core_suspend_late() and ath11k_core_reset(). This keeps a single disable per recovery/suspend cycle regardless of which path (recovery or suspend) triggers it, so the refcount on PCI parts stays balanced while AHB parts keep getting the disable that the original commit needed. Fixes: f7a74e131d3f ("wifi: ath11k: disable interrupts during firmware crash recovery") Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/linux-wireless/a068a857-a549-4cc2-ae0f-3ef119d3a859@samsung.com/ Tested-by: Marek Szyprowski Tested-by: Julius Bairaktaris Signed-off-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260928-ath11k-unbalanced-irq-enable-disable-v1-1-75166f534763@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 5033a6b4d3e2432e073579ddf799621e170a8460 Author: Guangshuo Li Date: Wed Jul 8 18:57:03 2026 +0800 floppy: unregister platform device on add_disk failure [ Upstream commit f1e72d80ad4ac5ff3573796d07bd1a1e74909f94 ] The change referenced by the Fixes tag reverted a previous fix because that fix added incorrect cleanup for the platform_device_register() failure path. However, reverting the whole change also removed the cleanup for a later failure path. If platform_device_register() succeeds but device_add_disk() fails, the current floppy platform device has already been registered and registered[drive] has been set. The common out_remove_drives path uses while (drive--), so it starts from the previous drive and does not unregister the current one. As a result, the platform device registered for the failing drive is leaked. Unregister the current platform device directly on the device_add_disk() failure path, where platform_device_register() is known to have succeeded. Leave the platform_device_register() failure path unchanged. Fixes: 895a9b37917d ("Revert "floppy: fix reference leak on platform_device_register() failure"") Fixes: 47d34aa2d211 ("floppy: add error handling support for add_disk()") Signed-off-by: Guangshuo Li Link: https://patch.msgid.link/20260708105703.747262-1-lgs201920130244@gmail.com Signed-off-by: Denis Efremov (Oracle) Signed-off-by: Sasha Levin commit 25eb801eae91bc772d34fdc9386659c5ffd23a98 Author: Yang Xiuwei Date: Thu Jul 23 15:35:12 2026 +0800 floppy: avoid NULL deref in reset_interrupt when cont is cleared [ Upstream commit 7c82781039c03a3e47b70d3259f336adbb9d2692 ] reset_fdc() arms do_floppy = reset_interrupt; the IRQ handler then queues that function via schedule_bh(). If unlock_fdc() or do_wakeup() clears cont before the work runs, reset_interrupt() dereferences a NULL cont and oopses. Example crash excerpt: [ 1070.468148] status=80 [ 1070.468152] fdc_busy=1 [ 1070.468158] cont= (null) [ 1070.468161] current_req= (null) [ 1070.468162] command_status=-1 [ 1070.468163] [ 1070.557051] floppy0: floppy timeout called [ 1070.557053] no cont in shutdown! [ 1070.557056] floppy0: floppy_shutdown: timeout handler died. [ 1074.419509] floppy0: FDC access conflict! [ 1074.419782] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 1074.421969] PGD 0 P4D 0 [ 1074.422320] Oops: 0000 [#1] SMP NOPTI [ 1074.422648] CPU: 10 PID: 3269 Comm: kworker/u256:4 Kdump: loaded [ 1074.423830] Hardware name: inspur Standard PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015 [ 1074.424284] Workqueue: floppy floppy_work_workfn [floppy] [ 1074.424757] RIP: 0010:reset_interrupt+0x3a/0xa0 [floppy] The same NULL deref has also been reported by syzbot on upstream. Return early if cont is already NULL after result(). The hardware reset has completed; result() still drains the FDC. A later request can lock the FDC and reset again. This is a defensive fix for stale work, not a rewrite of the floppy continuation state machine. Reported-by: syzbot+619e27617b2abe6b9b72@syzkaller.appspotmail.com Link: https://lore.kernel.org/linux-block/00000000000093c4d105f9aa34d6@google.com/ Link: https://lists.openwall.net/linux-kernel/2021/10/27/56 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Yang Xiuwei Link: https://patch.msgid.link/20260723073512.11120-1-yangxiuwei@kylinos.cn Signed-off-by: Denis Efremov (Oracle) Signed-off-by: Sasha Levin commit cd601163736041f8aa5160463796ace841509c3e Author: Qing Ming Date: Fri Oct 2 17:11:28 2026 -0400 dlm: validate node weights before building member array [ Upstream commit 7f662eb1807ed732ac7d5e119753c8185f241bb8 ] DLM node weights are parsed as signed integers and copied into the member list. make_member_array() uses their sum as the allocation count, but only positive weights contribute entries to the array. A negative weight can therefore reduce the allocation without reducing the number of writes. The issue was found through static analysis of the configfs input and member array construction. With two recovery members weighted -31 and 32, the sum is 1, so recovery allocates one int and then writes the positive member's node ID 32 times. A reproducer using dlm_controld and dlm_tool triggered the same report on a KASAN kernel: BUG: KASAN: slab-out-of-bounds in dlm_recover_members [dlm] Write of size 4 by task dlm_recoverd Call Trace: dlm_recover_members dlm_recoverd kthread ret_from_fork Reject negative weights at the configfs input boundary. Also detect overflow when adding non-negative weights to the signed allocation count, and propagate array construction errors to the recovery path. Fixes: e7fd41792fc0 ("[DLM] The core of the DLM for GFS2/CLVM") Signed-off-by: Qing Ming Assisted-by: Codex:gpt-5 Acked-by: Alexander Aring Signed-off-by: Alexander Aring Signed-off-by: David Teigland Signed-off-by: Sasha Levin commit 5905e12fb492998babf12a96cefa5979ea8a782f Author: Karl Mehltretter Date: Wed Jul 22 05:44:35 2026 +0200 floppy: flush pending work before releasing resources on init failure [ Upstream commit 74c2e2eeb7e51cdeb5e3eceaf324cfcf8dcd0d32 ] do_floppy_init() probes each FDC with user_reset_fdc(), which queues a redo_fd_request() work item on floppy_wq that may still be pending when the probe finishes. When no controller is found, the error path calls floppy_release_irq_and_dma() to free the IRQ and DMA channel, and only later destroys the workqueue. destroy_workqueue() drains the queued work last, so it can run after the IRQ and DMA are already gone: floppy0: no floppy controllers found work still pending The flush used to be here. Commit 070ad7e793dc ("floppy: convert to delayed work and single-thread wq") renamed the label out_flush_work to out_release_dma and dropped it. Restore it so the work drains before the IRQ and DMA are released, as floppy_module_exit() already does. Fixes: 070ad7e793dc ("floppy: convert to delayed work and single-thread wq") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260722034435.13432-1-kmehltretter@gmail.com Signed-off-by: Denis Efremov (Oracle) Signed-off-by: Sasha Levin commit 8531d24a6f886b78e2dcf93d3060c6436c04cc62 Author: Aamir Ahmed Date: Sat Sep 12 17:20:31 2026 +0100 wifi: nxpwifi: validate variable IE lengths in beacon parser [ Upstream commit 52c9568fa2eda80d02842961e7ba01e07eb01883 ] nxpwifi_update_bss_desc_with_ie() stores pointers to the HT, VHT and HE capability and operation elements, to the operating mode notification and to the 20/40 BSS coexistence element, taken from a beacon or probe response, without checking that each element is long enough for the structure the driver later dereferences it as. bss_desc->beacon_buf is a tight kmemdup() of the on-air elements, so a truncated element leaves the stored pointer short of the structure and the consumers read past the end of that allocation at association time. Some of those bytes are copied into the association request, so a rogue access point in range can both trigger the read and receive the result. Reject the frame with -EINVAL when any of these elements is shorter than the structure read from it, as the FH, DS and CF parameter set cases in the same parser already do. The extended capabilities element has no structure size to check against, so nxpwifi_is_ap_11ax_twt_supported()'s read of bcn_ext_cap->data[9] is bounded at that consumer instead. Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x") Assisted-by: LLM Signed-off-by: Aamir Ahmed Reviewed-by: Jeff Chen Signed-off-by: Jeff Chen Signed-off-by: Sasha Levin commit 12b21ea4dc3c47ffc0b74bd4b755910d8a644ddf Author: Jeff Chen Date: Mon Aug 31 17:43:08 2026 +0800 wifi: nxpwifi: fix missing error codes in _nxpwifi_fw_dpc() [ Upstream commit df40d3645443e884897b5b95873f9871bb44b7e5 ] When nxpwifi_register_cfg80211(), nxpwifi_init_channel_scan_gap(), or nxpwifi_add_virtual_intf() fail, the function jumped to an error label but left ret == 0, causing _nxpwifi_fw_dpc() to return success despite the failure. Fix by propagating the return value of nxpwifi_register_cfg80211() and nxpwifi_init_channel_scan_gap() directly into ret, and by extracting the encoded error from the ERR_PTR wdev with PTR_ERR() before each goto err_add_intf. The P2P client interface path had the same IS_ERR/goto pattern and is fixed in the same way. Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-wireless/anwshVbQWXXHTJpa@stanley.mountain/ Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Jeff Chen Signed-off-by: Sasha Levin commit 4e33aa616a4d15372302dc71069383aa81d92ba8 Author: Jérémy Jean Date: Mon Sep 14 20:42:38 2026 +0000 NFS: filelayout: calculate dense stripe width in 64 bits [ Upstream commit 9ba13ef0e3ad033d3ddbaeb740b12d135a88363d ] filelayout_get_dense_offset() calculates the stripe width from the stripe unit and count, where both values are provided by the server. Their product is stored on 32 bits, and can wrap to zero despite passing individual checks. For example, a 1 GiB stripe unit (0x40000000) and four stripes (4) cause the following div_u64() to raise a divide error during the first read through the dense layout. Update u32 to u64 and use div64_u64() instead of div_u64(). stripe_unit is a u32 and stripe_count is limited to 4096, so the product cannot overflow a u64. Fixes: cfe7f4120f8b ("NFSv4.1: filelayout i/o helpers") Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 3fb92a7ec93d8a7af333a446198e9808aece0455 Author: Chuck Lever Date: Sat Aug 8 11:40:14 2026 -0400 SUNRPC: treat every client-side TLS error alert as fatal [ Upstream commit 9b7b1f89b93a3ec1ed121e1ab28450acde815bff ] xs_sock_process_cmsg() decides whether an alert ends the session by reading the alert's level octet. RFC 8446 Section 6 retired that field. The severity is implicit in the description, and a receiver treats every alert listed in Section 6.2 as an error alert "regardless of the AlertLevel in the message". A peer that aborts with unexpected_message but leaves the legacy octet set to warning makes the client return -EAGAIN. xs_stream_data_receive() wakes no pending task for that error, so RPC Calls queued on a dead TLS session wait for their timeouts to expire. Decide from the alert description instead. close_notify and user_canceled are the closure alerts (RFC 8446 Section 6.1). Every other description ends the session, including one this kernel does not recognize. Fixes: 39067dda1d86 ("SUNRPC: Use new helpers to handle TLS Alerts") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 78628c745a47c409b072a716f491e73104706388 Author: Chuck Lever Date: Sat Aug 8 11:40:13 2026 -0400 SUNRPC: reject a client-side TLS alert record that is not two octets [ Upstream commit 1e87497aac8d2d4aee9b288ba43f58d1690b9a89 ] tls_alert_recv() reads two octets from the kvec it is handed and does not check the length (net/handshake/alert.c). xs_sock_process_cmsg() calls it for any alert record, and the alert[] buffer that xs_sock_recv_cmsg() supplies carries no initializer. A one-octet alert body leaves the description read from uninitialized stack and reported through trace_tls_alert_recv(). The peer controls that length. Neither tls_rx_msg_size() nor tls_rx_one_record() enforces the two-octet Alert payload. A TLS 1.3 record carrying only the inner content-type octet decrypts to a zero-length payload. RFC 8446 Section 5.1 requires a record with an Alert type to carry exactly one message, so any other length is malformed. RFC 9289 Section 5 bars RPC-with-TLS from negotiating a version below TLS 1.3, so no other alert framing applies. Require exactly two octets before parsing and return -EACCES otherwise. xs_stream_data_receive() already treats -EACCES as a fatal alert and reports it to the pending tasks. Gate the path on a control message rather than a positive count so that a zero-length record reaches the check. Fixes: cc5d59081fa2 ("sunrpc: fix client side handling of tls alerts") Signed-off-by: Chuck Lever Signed-off-by: Anna Schumaker Signed-off-by: Sasha Levin commit 95f4c5ab319a41528ee9c57036d811f0dffb94df Author: Logan Gunthorpe Date: Wed Sep 2 00:21:52 2026 -0600 dmaengine: plx_dma: fix NULL pointer deref in plx_dma_isr() [ Upstream commit f3017892457d8bb664ea4b912910dc254e2dd825 ] plx_dma_create() registered the interrupt handler with request_irq() before initializing plxdev->bar. If the device raised an interrupt in that window, plx_dma_isr() would dereference the still-NULL bar. Move the bar assignment ahead of request_irq() so everything the handler can touch is initialized before it can run. Reported-by: Sangyun Kim Reported-by: Kyungwook Boo Link: https://lore.kernel.org/all/20260610112121.676561-1-jjy600901@snu.ac.kr Fixes: c2dbcaa8c672 ("dmaengine: plx-dma: Implement hardware initialization and cleanup") Reviewed-by: Frank Li Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/all/20260610112121.676561-1-jjy600901@snu.ac.kr/T/#u Link: https://patch.msgid.link/20260902062153.31048-11-logang@deltatee.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit cef75a63b5dc55bf914bae96ea9590c56a5a7dcb Author: Logan Gunthorpe Date: Wed Sep 2 00:21:50 2026 -0600 dmaengine: ioat: disable relaxed ordering before registering the device [ Upstream commit 10d34fbca6e09a6a18d64fa3ebaa3db9f27fc1a6 ] ioat3_dma_probe() disabled PCIe relaxed ordering after calling dma_async_device_register(), so if an error occurs and the code jumps to err_disable_interrupts, the function returns with the device still registered in the core's dma_device_list while the caller frees the ioatdma_device struct, leaving a dangling registration that anything walking the device list can dereference after it's been freed. Move the capability read/write ahead of dma_async_device_register() instead. Nothing after registration depends on relaxed ordering already being disabled, and nothing before it depends on the device being registered, so this is a plain reordering. It also means every remaining step after registration can't fail, so there's no need to ever have to unregister the device once registered. Fixes: 511deae0261c ("dmaengine: ioatdma: disable relaxed ordering for ioatdma") Reported-by: Sashiko Link: https://lore.kernel.org/dmaengine/20260707165906.249F41F000E9@smtp.kernel.org Acked-by: Dave Jiang Reviewed-by: Frank Li Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/dmaengine/20260707165906.249F41F000E9@smtp.kernel.org/T/#u Link: https://patch.msgid.link/20260902062153.31048-9-logang@deltatee.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 01b4ef445a756b265f47768ddaf1f33db3990f88 Author: Logan Gunthorpe Date: Wed Sep 2 00:21:45 2026 -0600 dmaengine: switchtec-dma: fix channel leak on registration failure [ Upstream commit fd39726ab7096840cc9c9dea6dfba23834fc81f0 ] switchtec_dma_chans_release() is called in three places but the underlying memory is not freed in all of those places. In order to clean this up, introduce a switchtec_dma_chans_free() helper that will free the memory. Ensure each call to switchtec_dma_chans_release() has a corresponding switchtec_dma_chans_free() call. (The release in switchtec_dma_remove() pairs with the free in switchtec_dma_release()). swdma_dev->chan_cnt is now set to the number of channels that succeeded when one fails to initialise, so switchtec_dma_chans_free() can still be used if not all channels succeed in being allocated. switchtec_dma_chans_free() also removes each channel from dma_dev->channels before freeing it, since the channel status ISR walks that list and would otherwise dereference freed memory. Fixes: 30eba9df76ad ("dmaengine: switchtec-dma: Implement hardware initialization and cleanup") Reported-by: Sashiko Link: https://lore.kernel.org/dmaengine/20260717223024.9BB8A1F000E9@smtp.kernel.org Link: https://lore.kernel.org/dmaengine/20260727190604.397DB1F000E9@smtp.kernel.org Reviewed-by: Frank Li Signed-off-by: Logan Gunthorpe Link: https://patch.msgid.link/20260902062153.31048-4-logang@deltatee.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 40c59812a3193d01fc52be22f86eb485f37a27de Author: Logan Gunthorpe Date: Wed Sep 2 00:21:44 2026 -0600 dmaengine: switchtec-dma: fix resource leak in alloc_chan_resources [ Upstream commit 1188942d6160b9f799af297bdb5d7812cd7fde6d ] switchtec_dma_alloc_chan_resources() returns directly on any later failure, without ever freeing the descriptor rings and coherent DMA memory it just allocated. The dmaengine core does not call device_free_chan_resources() when device_alloc_chan_resources() fails, so the driver has to unwind its own partial state. The device-removed check also runs after ring_active and comp_ring_active have already been set true, so a failure there left the channel marked active despite alloc_chan_resources() reporting failure. Add an error-unwind path that disables the channel and frees the descriptor rings on every failure after allocation. ring_active and comp_ring_active are cleared under the same locks switchtec_dma_free_chan_resources() already uses, since the completion tasklet checks comp_ring_active under complete_lock before touching the completion ring, and a stale IRQ can still be in flight when this unwind path runs. Reported-by: Sashiko Link: https://lore.kernel.org/dmaengine/20260707165555.350951F000E9@smtp.kernel.org Fixes: 30eba9df76ad ("dmaengine: switchtec-dma: Implement hardware initialization and cleanup") Reviewed-by: Frank Li Signed-off-by: Logan Gunthorpe Link: https://lore.kernel.org/dmaengine/20260707165555.350951F000E9@smtp.kernel.org/T/#u Link: https://patch.msgid.link/20260902062153.31048-3-logang@deltatee.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 8cba9a0fb162748b6d5c73628d1713a2f895c972 Author: Logan Gunthorpe Date: Wed Sep 2 00:21:43 2026 -0600 dmaengine: switchtec-dma: fix double-free in switchtec_dma_free_desc() [ Upstream commit bdfd76514bd11301f4e67d150485ab696c26d83d ] switchtec_dma_free_desc() frees swdma_chan->hw_sq, hw_cq, and every desc_ring[] entry without clearing the pointers afterward. If switchtec_dma_alloc_chan_resources() fails partway through and calls it during unwind, then a later retry of alloc_chan_resources() fails in switchtec_dma_alloc_desc() before reallocating one of those pointers, its own failure path calls switchtec_dma_free_desc() again and frees the same, already-freed pointers a second time. NULL out each pointer as it's freed so a subsequent call is a no-op for anything already released. Fixes: 30eba9df76ad ("dmaengine: switchtec-dma: Implement hardware initialization and cleanup") Reviewed-by: Frank Li Signed-off-by: Logan Gunthorpe Link: https://patch.msgid.link/20260902062153.31048-2-logang@deltatee.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 20f4f677801cc8f16093442a183881b8385d1bb9 Author: Dmitry Baryshkov Date: Sun Sep 20 14:08:52 2026 +0300 drm/msm/a5xx: don't read the GPMU registers on GPUs without a GPMU [ Upstream commit 77e3ffcf69065c4ce92c725540e0b4db14f43ad7 ] Only a530/a540 have a GPMU. On the other a5xx parts, reading the 0xa800-0xac60 GPMU aperture during a crashdump resets the board -- on sda660 (a512) a GPU hang thus reboots the SoC instead of recovering. Split the GPMU block into its own array and collect it only when a GPMU is present. Fixes: e20c9284c8f2 ("drm/msm/adreno: Add support for Adreno 510 GPU") Assisted-by: LLM Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Patchwork: https://patchwork.freedesktop.org/patch/754867/ Message-ID: <20260920-a5xx-no-gpmu-v1-1-714200254f76@oss.qualcomm.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit c72fd30907b15fb0b09b2dbc74d7f3ddf10941b3 Author: Aloka Dixit Date: Fri Oct 2 12:10:56 2026 -0700 Revert "wifi: mac80211: do not use old MBSSID elements" [ Upstream commit 56fb2334c86cef0b6d44099a6b21de4c8d80a7cb ] Commit a519be2f5d95 ("wifi: mac80211: do not use old MBSSID elements") fixed the incorrect inclusion of stopped/removed non-transmitted profiles from the Beacon frames, but it caused a regression for channel switch (CSA) and BSS color change (CCA) operations initiated from hostapd. Hostapd passes two Beacon templates to kernel for CSA and CCA - (1) beacon_csa/beacon_color_change used during the countdown. (2) beacon_after/beacon_next used after the countdown completes. Hostapd relies on the kernel to include the old MBSSID elements while sending beacon_csa/beacon_color_change templates to the driver. This path is now broken and results in CSA/CCA failure. Including existing MBSSID elements explicitly makes the netlink buffer larger than default 4 KB depending on the number of APs which would need unnecessary complication to pre-calculate the buffer length. Revert the commit to fix the regression. Regarding the original issue fixed by the reverted commit - Hostapd now has a new commit which always includes at least one MBSSID element when the feature is enabled, hence when all non-transmitted profiles are removed, this empty element ensures that stopped profiles are not advertised. Fixes: a519be2f5d95 ("wifi: mac80211: do not use old MBSSID elements") Signed-off-by: Aloka Dixit Link: https://patch.msgid.link/20261002-csa_cca_fix-v1-1-b83a998aeb44@oss.qualcomm.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 178998a6cf135fb527e6962f00b0bdc28e51e299 Author: Dan Carpenter Date: Thu Oct 1 10:37:50 2026 +0300 wifi: carl9170: NUL terminate string in debugfs [ Upstream commit ece30e1daf6a9c95d6f9d0518534a0b9c8c7fd42 ] The "buf" buffer comes from the user. We use it to store a number or two so it doesn't need to be large. It gets passed to sscanf() in the write functions such as carl9170_debugfs_erp_write(). Ensure that buffer is NUL terminated. This is debugfs so it's root only. Fixes: 00c4da27a421 ("carl9170: firmware parser and debugfs code") Signed-off-by: Dan Carpenter Acked-by: Christian Lamparter Acked-by: Jeff Johnson Link: https://patch.msgid.link/674270ab4aeefa1982362c0ea4132427e14f15eb.1790839793.git.error27@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 020f8fd259e24a0d4a67cf185132ce4619819091 Author: Dan Carpenter Date: Thu Oct 1 10:37:46 2026 +0300 wifi: b43legacy: debugfs: NUL terminate string in debugfs [ Upstream commit f94595252b318a9ae3c01d78b3bcd33b01b1c082 ] The "buf" buffer is PAGE_SIZE and allocated with kzalloc(). We store a string from the user in it and then pass it to sscanf() in the write functions such as tsf_write_file(). The buffer is only used to store a number so we never come close to filling up the whole PAGE_SIZE. Reserve the last character of the page for a NUL terminator. This is debugfs so it's root only. Fixes: 75388acd0cd8 ("[B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/909ea7a88658b5e7c183bf0fda31687a91d73818.1790839793.git.error27@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 1186781e4d00dae4836cdeb2251cf3b422bc503d Author: Dan Carpenter Date: Thu Oct 1 10:37:40 2026 +0300 wifi: b43: don't pass unterminated string to sscanf() [ Upstream commit 9b6cb072f9249e2cdb7c32be2b8069774c7e01e6 ] The "buf" buffer is a PAGE_SIZE and allocated with kzalloc(). We store a string from the user in it and then pass it to sscanf() in the write functions such as shm32write__write_file(). Only a few numbers are stored in the buffer so it never comes close to filling up the whole PAGE_SIZE. Reserve the last character of the page for a NUL terminator. This is debugfs so it's root only. Fixes: 75388acd0cd8 ("[B43LEGACY]: add mac80211-based driver for legacy BCM43xx devices") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/b396713e697c7411b23a2157e2102c347ac900bc.1790839793.git.error27@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit b56219c1cbc19eb0f3b6c1d7b1eebeb799a13ae5 Author: Dominic White Date: Thu Sep 3 10:18:04 2026 +0200 wifi: cfg80211: allow zero HE OBSS PD offsets [ Upstream commit d9ecaa0a31732014a128e3b03243de54bbbd8394 ] IEEE Std 802.11 permits the OBSS PD offset fields in the Spatial Reuse Parameter Set element to have a value of zero. (IEEE Std 802.11-2024, 26.10.2.4) The standard specifies the offsets as unsigned values added to -82 dBm, with field presence signalled independently. The valid offset range is therefore 0..20. nl80211 currently rejects zero for all three HE OBSS PD offset attributes during nested netlink policy validation, before the values reach cfg80211 or the driver. Allow zero while retaining the upper bound and the existing minimum/maximum relationship validation. Fixes: 796e90f42b7e ("cfg80211: add support for parsing OBBS_PD attributes") Signed-off-by: Dominic White Link: https://patch.msgid.link/20260903081804.96532-1-github@singe.za.net Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit c21b55ce5ddb24c0fb43c78840bd56446098ed52 Author: Karl Mehltretter Date: Sat Oct 3 21:07:38 2026 +0200 ASoC: codecs: es8375: use devm_clk_get_optional() for mclk [ Upstream commit 58e7bca5cf264e910ad9199cfc40246e0a2834f4 ] es8375_read_device_properities() gets "mclk" with devm_clk_get() and then tests the result for NULL to print "assuming static mclk". A missing clock makes devm_clk_get() return -ENOENT, so the probe fails before that test can match. The binding does not require clocks, its example has none, and everest,mclk-src lets the codec run from SCLK instead of MCLK. Use devm_clk_get_optional(), as es8311, es8316, es8323, es8326 and es8389 do for the same clock. Found with an experimental clang warning about NULL tests on functions that return error pointers. Tested only in QEMU with i2c-stub in place of the codec, not on real hardware. Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20261003190738.77564-1-kmehltretter@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b093c10c2617fa2c0e09bc32d9768a1eb6beb6b4 Author: Yibo Tan Date: Sun Sep 13 00:12:10 2026 +0800 soc: qcom: pmic_pdcharger_ulog: prevent work requeue during remove [ Upstream commit 66894a1c51366cc2d5c498178105dfe3bcccc1e4 ] pmic_pdcharger_ulog_rpmsg_remove() cancels the delayed worker while the RPMsg endpoint can still deliver callbacks. The RPMsg core invokes the driver remove callback before destroying the endpoint, so a response callback can run after cancel_delayed_work_sync() returns and queue the worker again. Device cleanup then frees the devm-allocated pmic_pdcharger_ulog while the requeued delayed work still embeds and dereferences that object. KASAN reports a slab-use-after-free in pmic_pdcharger_ulog_work(). Use disable_delayed_work_sync() to drain the worker and reject queue attempts that race with removal. The issue was reproduced in four of four runs with the real target driver, RPMsg bus removal, endpoint teardown, workqueue code and devres cleanup. The test provider delivered a valid response in the window between the driver remove callback and endpoint destruction. With this change, the same late callback occurred in four of four runs without a KASAN report, warning, Oops or panic. The reproducer uses a test RPMsg provider to control the teardown timing. No unprivileged trigger or physical Qualcomm-device result is claimed. Fixes: 086fdb48bc65 ("soc: qcom: add ADSP PDCharger ULOG driver") Assisted-by: Codex:GPT-5 Signed-off-by: Yibo Tan Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260912161210.1683266-1-lhfff@tju.edu.cn Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit ac376392c3f8dc32b98a521c64a6b41ec8fa5ad3 Author: Neil Armstrong Date: Wed Sep 23 10:51:45 2026 +0200 soc: qcom: geni-se: provide PROG_RAM_DEPTH for I2C HUB Serial Engines [ Upstream commit 803f9950a6c6e0b37ed7f24925feed823703467e ] The I2C Hub serial elements lacks DMA, so the SE_HW_PARAM_2 register which is in the DMA register space doesn't exist for those instances. Provide the ram depth in the compatible data to be used instead of the reading the missing SE_HW_PARAM_2 register. Fixes: 522bfb4f33c0 ("soc: qcom: geni-se: Use HW PROG_RAM_DEPTH to validate firmware size") Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20260923-topic-sm8x50-i2c-hub-fw-ram-v3-1-44287b4e814b@linaro.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 9fc9a6051af33787ba2b3395596a97ff64611bde Author: Konrad Dybcio Date: Mon Jul 20 16:39:02 2026 +0200 soc: qcom: pmic_glink: Avoid losing early rpmsg probe [ Upstream commit 0c79a829af36a94143c747a0ab8f0a8563b17cfa ] The PMIC GLINK rpmsg device can appear before the platform device has finished probing. In that case pmic_glink_rpmsg_probe() sees __pmic_glink as NULL and returns -ENODEV, which is treated as a fatal probe failure for the rpmsg endpoint. If this race is hit, pg->ept is never installed and PMIC GLINK clients never receive the service-up notification. This may leave the system with no Type-C functionality and without battery/power supply management. Return -EPROBE_DEFER when the rpmsg endpoint arrives before the platform device is ready. Fixes: 58ef4ece1e41 ("soc: qcom: pmic_glink: Introduce base PMIC GLINK driver") Assisted-by: Codex:GPT-5.5 Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20260720-topic-pmic_glink_defer-v1-1-94c0f233f2f7@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 1c948bdbeaf80d51e1de3b401721a42d631c3d3c Author: Mukesh Ojha Date: Tue Sep 22 01:26:36 2026 +0530 firmware: qcom_scm: align PAS resource table retry [ Upstream commit 57e43df2e426ac5561ee3832d425e1071772e963 ] The initial PAS resource-table buffer can be too small. TrustZone returns the required size and the wrapper retries the SCM call. Although qcom_tzmem_alloc() aligns the allocated buffer, the size passed to TrustZone remained unaligned. Align the retry size to a page boundary so that both the buffer and its advertised size satisfy the PAS/TrustZone contract. Fixes: 8b9d2050cfa0 ("firmware: qcom_scm: Add qcom_scm_pas_get_rsc_table() to get resource table") Signed-off-by: Mukesh Ojha Reviewed-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260921195636.1925869-3-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 839887668c40f68de64cb92336d77babe50971ed Author: Mukesh Ojha Date: Tue Sep 22 01:26:35 2026 +0530 firmware: qcom_scm: handle empty PAS resource table [ Upstream commit 324103eb65ba26704c2293d9daaa15c0dc022930 ] The PAS resource-table query may successfully return a zero-sized table. kmemdup() with a zero length returns ZERO_SIZE_PTR, which is stored in rproc->table_ptr. The remoteproc core then dereferences this invalid pointer while processing resources. Treat a zero-sized result as an absent resource table and return NULL after releasing the TrustZone memory buffer. This allows the remoteproc core to skip resource-table processing. Fixes: 8b9d2050cfa0 ("firmware: qcom_scm: Add qcom_scm_pas_get_rsc_table() to get resource table") Signed-off-by: Mukesh Ojha Reviewed-by: Bartosz Golaszewski Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260921195636.1925869-2-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit efa67bcf1a14b8c6d6e801a498222c000271ddea Author: Mukesh Ojha Date: Tue Sep 22 01:26:34 2026 +0530 firmware: qcom: tzmem: Use DO_ONCE_SLEEPABLE() in qcom_tzmem_enable() [ Upstream commit 60d4a6edea9ec617725db6dd1e66d96a13bc8d0a ] qcom_tzmem_enable() is called from qcom_scm_probe() in a sleepable process context. The helper it wraps, qcom_tzmem_init(), calls qcom_scm_shm_bridge_enable() -> qcom_scm_call(), which invokes might_sleep() and later acquires the qcom_scm_lock mutex via __scm_smc_do(). DO_ONCE() takes the once_lock spinlock with IRQs disabled, so invoking qcom_tzmem_init() from inside DO_ONCE() runs a sleepable call chain in atomic context. CONFIG_DEBUG_ATOMIC_SLEEP=y catches this on boot: BUG: sleeping function called from invalid context at drivers/firmware/qcom/qcom_scm.c:334 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 49, name: kworker/u16:2 ... __might_resched+0x148/0x24c __might_sleep+0x48/0x7c qcom_scm_call+0x30/0xc0 __qcom_scm_is_call_available+0x98/0x100 qcom_scm_shm_bridge_enable+0x60/0xbc qcom_tzmem_enable+0xf8/0x118 qcom_scm_probe+0x2d0/0x680 [ BUG: Invalid wait context ] ... kworker/u16:2/49 is trying to lock: ffffa83e8a485e38 (qcom_scm_lock){....}-{4:4}, at: __scm_smc_do+0x70/0x488 Switch to DO_ONCE_SLEEPABLE(), which guards the one-shot init with a mutex-style path (__do_once_sleepable_start/done) that is safe to hold across sleeping callees. All callers of qcom_tzmem_enable() are in process context (driver probe), so this is safe. Fixes: 9941fe8a04f3 ("firmware: qcom: scm: Fix tzmem state on probe retry") Reported-by: Marek Szyprowski Closes: https://lore.kernel.org/lkml/5ea74dd3-7471-4c7c-9242-c2005312b1ab@samsung.com/ Reviewed-by: Bartosz Golaszewski Signed-off-by: Mukesh Ojha Link: https://patch.msgid.link/20260921195636.1925869-1-mukesh.ojha@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit e2007c80ce13b88815d39b650369c92c45d7c909 Author: Joonhoe Kim <26rote@gmail.com> Date: Sun Oct 4 19:27:58 2026 +0900 drm/msm/dpu: round up the compressed INTF width [ Upstream commit 6b93e8b453fa27a1b6a1d472f3ff8663e6811fae ] For DSI with DSC, drm_mode_to_intf_timing_params() scales the INTF active width by bpp / (3 * bits_per_component) and rounds down. The DSI host computes the same width with DIV_ROUND_UP, both for the pixel clock (dsi_adjust_pclk_for_compression()) and for the active width it programs (dsi_timing_setup(), from bytes per line). When the division is not exact the INTF line is one pclk shorter than the DSI line, and the DSI FIFO overflows. Example: a bonded DSI video-mode panel, 952 pixels per link, DSC 8 bpp at 10 bpc: 952 * 8 / 30 = 253.87, so the INTF uses 253 and the DSI 254. Round up, as the DSI host does. Qualcomm's downstream SDE driver also rounds this width up, and Pengyu Luo needed the same rounding on the Legion Y700 gen 4 [1]. Tested on a Lenovo Legion Tab Y700 gen 5 (SM8850) with that panel, with a module parameter selecting the rounding: rounding down, DPMS off/on gives no vblank and 14000-17000 DSI FIFO error interrupts per second (dsi_err_worker: status=4); rounding up, the picture comes back and there are no errors. Only tested on this device. Link: https://lore.kernel.org/all/CAH2e8h6oinKxN1ndcvHCSc+=bFLXVVDZVAVF0cQHoiaMvEwhPQ@mail.gmail.com/ [1] Fixes: f9ce482d7dc0 ("drm/msm/dpu: fix video mode DSC for DSI") Assisted-by: LLM Signed-off-by: Joonhoe Kim <26rote@gmail.com> Reviewed-by: Pengyu Luo Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/757958/ Link: https://lore.kernel.org/r/20261004102758.84436-1-26rote@gmail.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin commit e1d3ca8978c1a2bf3030397a21b9131e265e85ba Author: Xueqin Luo Date: Mon Aug 31 17:11:59 2026 +0800 cpufreq: sti: avoid NULL dereference in dev_err() [ Upstream commit fdbe4cae71c8196cd7681ad47254b5b0560d3c1e ] ddata.cpu is NULL-checked, then immediately passed to dev_err(). Replace with pr_err() to avoid dereferencing NULL. Fixes: ab0ea257fc58 ("cpufreq: st: Provide runtime initialised driver for ST's platforms") Signed-off-by: Xueqin Luo Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin commit ee3c689f1280cd0224996a6de59e70a685817c3c Author: Xueqin Luo Date: Mon Aug 31 15:30:08 2026 +0800 cpufreq: tegra194: fix double-pointer error in get_cpu_ndiv [ Upstream commit f0a750dad7da1c653e85f0698063235453b43831 ] ndiv is already a u64 pointer, passing &ndiv to smp_call_function_single() results in a u64** being written to instead of the caller's u64 variable, so the caller always reads back an uninitialized ndiv. Drop the spurious '&'. Fixes: 0839ed1fd7ac ("cpufreq: tegra194: add soc data to support multiple soc") Signed-off-by: Xueqin Luo Reviewed-by: Sumit Gupta Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin commit 45a29123e061371a36f588439dc680a0007da7ab Author: Xueqin Luo Date: Mon Aug 31 13:44:38 2026 +0800 cpufreq: sparc-us2e: fix frequency table index copy-paste error [ Upstream commit e5b33fa47792375ca7fc49ccadee87d8e4b72929 ] In us2e_freq_cpu_init(), the last two frequency writes both use index [2] instead of [3] and [4] respectively, and the terminator uses [3] instead of [5]. This is a copy-paste error where the index was not incremented, causing the divider-6 and divider-8 entries to overwrite the already-written divider-4 entry. As a result, only three frequency steps (div 1, 2, and 4) are actually available to the cpufreq core, while the intended dividers 6 and 8 are silently lost. The struct us2e_freq_percpu_info::table[6] has room for 5 entries plus a terminator, matching the 5 hardware dividers. Fix the indices so all five frequency steps are correctly populated: table[0]=div1, table[1]=div2, table[2]=div4, table[3]=div6, table[4]=div8, table[5]=TABLE_END. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Xueqin Luo Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin commit 045f10450d4516fd4769efc3cf7b4faaddf14acc Author: Karl Mehltretter Date: Wed Sep 9 08:43:43 2026 +0200 svcrdma: Fix svc_rdma_recv_cid_init() kernel-doc [ Upstream commit d1caedce2d015573b4c26b127c488059f25aabc4 ] svc_rdma_recv_cid_init() initializes a Receive Queue completion ID, but its kernel-doc heading names svc_rdma_send_cid_init(). The latter is a separate helper immediately below it, so kernel-doc cannot match this comment to the receive helper. Fix the copied function name. Fixes: 28ee0ec8948a ("svcrdma: De-duplicate completion ID initialization helpers") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260909064343.90437-1-kmehltretter@gmail.com Signed-off-by: Chuck Lever Signed-off-by: Sasha Levin commit 177725cffe043bee78d2518f6a1f20864e0c0158 Author: hpp.iscas Date: Sat Sep 5 21:43:17 2026 +0800 perf/marvell: cn10k_tad: Publish the OF module alias [ Upstream commit 848468c86f716e4552bd478d2f3c3f5d81bec7ac ] The TAD PMU platform driver has ACPI and OF match tables, but only the ACPI table is published. A Device Tree platform device emits an OF modalias, so the ACPI alias does not select this module for it. Publish the OF table inside CONFIG_OF and retain ACPI support. Fixes: 036a7584bede ("drivers: perf: Add LLC-TAD perf counter support") Signed-off-by: hpp.iscas Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 1e87166bcf7cd3237319b72efa58ae672c918606 Author: Dennis Gilmore Date: Thu Oct 1 21:57:46 2026 -0500 arm64: dts: rockchip: Use GPIO function for PCIe reset on Orange Pi 5 Pro [ Upstream commit e95e4fcdc4541e999888f297174e8f6f5f5f899a ] The PERST# pins of pcie2x1l1 and pcie2x1l2 are used as reset-gpios, but the default pinctrl state muxes them to the controllers' dedicated PERST# function instead of GPIO. Linux happens to work because the pin is switched to GPIO function when it is requested as a GPIO, but the devicetree should describe the pin function the board actually uses. Bootloaders such as U-Boot apply the pinctrl state as described and do not change the function when the GPIO is requested, and probing pcie2x1l2 then hangs. Add GPIO pinctrl nodes for both reset pins and use them in place of the PERST# function, like other RK3588 boards do. Fixes: f47af8ebbe53 ("arm64: dts: rockchip: Add Orange Pi 5 Pro board support") Signed-off-by: Dennis Gilmore Link: https://patch.msgid.link/20261002025746.3284691-1-dennis@ausil.us Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit be6604ba3a305eae1365b1c4bc16bd5f3cf38b71 Author: Hongyan Xu Date: Mon Sep 28 21:40:54 2026 +0800 ASoC: mt6359-accdet: manage private workqueues with devres [ Upstream commit 9a773d9d21fa909e8babbe11e93c811cf1a6d22d ] The threaded jack-detect interrupts queue work on two private workqueues. Neither queue is destroyed on device removal, so queued callbacks can retain pointers to devm-allocated state after it is released. Probe error paths also leak the queues. Create and initialize both workqueues before requesting interrupts, then add a managed cleanup action. Since the managed IRQs are acquired afterwards, devres releases and synchronizes them before draining and destroying the workqueues on both removal and probe failure. Fixes: eef07b9e0925 ("ASoC: mediatek: mt6359: add MT6359 accdet jack driver") Signed-off-by: Hongyan Xu Link: https://patch.msgid.link/20260928134054.312-1-getshell@seu.edu.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 55b88e7447720515e696faf4f48ebedd19ef363d Author: Yaozhong Li Date: Mon Sep 21 14:34:29 2026 +0800 arm64: dts: rockchip: disable unused i2s0 on rk3399-firefly [ Upstream commit 9416a641cfe5b75dd9178c15960ee741c1091b45 ] The board file enables i2s0, but no sound card references it: the on-board RT5640 is wired to i2s1 and the S/PDIF transmitter has its own controller. Keeping it enabled starves the other controllers, due to the pl330 instance that serves the audio block only having six channels. The i2s0 pin groups also lists GPIO4_A0, which carries SCLK_I2S_8CH_OUT, providing the MCLK the codec runs on. So add the pinmux for the MCLK signal to the i2s1 node. The RT5640 and S/PDIF cards then register with no DMA errors, and a 1 kHz tone measured through the codec's internal HPOL/HPOR loopback is unchanged (L 2135 -> 2138, R 2202 -> 2203), confirming that MCLK still reaches the codec. Fixes: 171582e00db1 ("arm64: dts: rockchip: add support for firefly-rk3399 board") Assisted-by: LLM Signed-off-by: Yaozhong Li Link: https://patch.msgid.link/20260921063431.103-3-yaozhonguwl@gmail.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit 44810bdab54a91bed377f23c1ca541cdc0ea4788 Author: Yaozhong Li Date: Mon Sep 21 14:34:28 2026 +0800 arm64: dts: rockchip: fix analog headphone output on rk3399-firefly [ Upstream commit 23eab1a5e36099fd1269f8a18dc389e04dc19011 ] The analog headphone jack on this board has never produced any sound with a mainline kernel. GPIO4_C5 has to be high for audio to reach the jack. The board file muxes the pin to GPIO through the rt5640_hpcon pinctrl group and references that group from the codec node, but nothing ever requests or drives the line. Describe it the way rk3399-roc-pc-plus.dts already does something similar, as a simple-audio-amplifier auxiliary component, so that DAPM asserts the GPIO while the headphone path is active. Measured on a Firefly-RK3399 by toggling only this line while a 1 kHz tone kept playing, with the playback PCM in state: RUNNING throughout: high -> audible, low -> silent, high -> audible With this change the line is claimed and follows the audio path: pin 149 (gpio4-21): headphones-amp gpio4:149 idle: gpio-21 (|enable) out lo playing: gpio-21 (|enable) out hi Fixes: 171582e00db1 ("arm64: dts: rockchip: add support for firefly-rk3399 board") Assisted-by: LLM Signed-off-by: Yaozhong Li Link: https://patch.msgid.link/20260921063431.103-2-yaozhonguwl@gmail.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit 163f61ae9b51b15bbee82d7e2fc6be10afc71bb5 Author: Joachim Eastwood Date: Thu Sep 3 23:23:15 2026 +0200 arm64: dts: rockchip: fix missing pcie rst pinctrl on rk3588s-nanopi-r6 [ Upstream commit 1d974afb0ea4e1ffc03535a2b2ae5a84d35738d7 ] The pins are used as reset-gpios but not reserved through pinctrl. Fixes: f3c6526d6fb2 ("arm64: dts: rockchip: Convert dts files used as parents to dtsi files") Signed-off-by: Joachim Eastwood Link: https://patch.msgid.link/20260903-nanopi-m6-v6-3-37416bbd6862@gmail.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit d2737760553e4a9b73caad0086888c78b4d01b91 Author: Joachim Eastwood Date: Thu Sep 3 23:23:14 2026 +0200 arm64: dts: rockchip: fix missing sdmmc cd pinctrl on rk3588s-nanopi-r6 [ Upstream commit 30fcc62cf5d27fe264145bb743407af62f8ff240 ] The cd (card detect) pin is used, but not reserved through pinctrl. Fixes: 95147bb42bc1 ("arm64: dts: rockchip: Fix the SD card detection on NanoPi R6C/R6S") Signed-off-by: Joachim Eastwood Link: https://patch.msgid.link/20260903-nanopi-m6-v6-2-37416bbd6862@gmail.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit 1ecf3b4589259f3bf50212275435817c0ef28d36 Author: Detlev Casanova Date: Thu Sep 10 09:34:50 2026 -0400 arm64: dts: rockchip: Rename rk3588 HDMI audio cards [ Upstream commit d1b7c3228041f4b3ad888abe6a31f6494279e979 ] Rename the two cards from "hdmi0"/"hdmi1" to "RK3588 HDMI0"/"RK3588 HDMI1" so they identify the SoC in user-visible ALSA fields and match the naming scheme used across the rest of the Rockchip family. Fixes: b8c6c136971c0 ("arm64: dts: rockchip: Add HDMI audio outputs for rk3588") Signed-off-by: Detlev Casanova Link: https://patch.msgid.link/20260910-fix-rockchip-hdmi-audio-names-v2-8-1396a6168e20@collabora.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit 47960c12a3a34f521d9794b983093ef4dc97b0aa Author: Detlev Casanova Date: Thu Sep 10 09:34:49 2026 -0400 arm64: dts: rockchip: Rename rk3576 HDMI audio card [ Upstream commit d3d3b67505fa5f10af587a6fc8e6d4640010d52e ] Rename the card from "HDMI" to "RK3576 HDMI" so it identifies the SoC in user-visible ALSA fields and no longer collides with the identical "HDMI" string used by other Rockchip SoCs. Fixes: 7f1561d82e3d3 ("arm64: dts: rockchip: Add RK3576 HDMI audio") Signed-off-by: Detlev Casanova Link: https://patch.msgid.link/20260910-fix-rockchip-hdmi-audio-names-v2-7-1396a6168e20@collabora.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit 836ed5caf7e83b0006dfb66a89141e617542b7e3 Author: Detlev Casanova Date: Thu Sep 10 09:34:48 2026 -0400 arm64: dts: rockchip: Rename rk3566 and rk3568 HDMI audio cards [ Upstream commit 8043ed0f40fe2b49df1c2c25409ab6bd3f88e806 ] Move the HDMI audio card name for RK3566 and RK3568 to their corresponding dtsi files so the name can be set to match the SoC in user-visible ALSA fields and no longer collides with the identical "HDMI" string used by other Rockchip SoCs. Fixes: 697ee8546e241 ("arm64: dts: rockchip: Add HDMI audio nodes to rk356x") Signed-off-by: Detlev Casanova Link: https://patch.msgid.link/20260910-fix-rockchip-hdmi-audio-names-v2-6-1396a6168e20@collabora.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit 2663077374a845f12393e0e8bffd34a0ee432283 Author: Linus Walleij Date: Fri Sep 25 10:59:25 2026 +0200 ARM: dts: ux500: Use AB8505 charger compatible [ Upstream commit ff1501cbb825de117267124ecb8898112b4051c5 ] Identify the AB8505 charger using its variant-specific compatible and retain the AB8500 compatible as a fallback for the existing driver. This selects the AB8505 interrupt constraints from the binding. The AB8505 interrupt table explicitly omits the five interrupt sources belonging to the AB8500 main charger. Remove these nonexistent interrupts from the AB8505 charger node, leaving its nine USB charger interrupts. Fixes: bc324d447fba ("ARM: dts: ux500: Add interrupts to charger") Assisted-by: LLM Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit c92d1626d3e7c35ca7fc2924815644693110c4a3 Author: Detlev Casanova Date: Thu Sep 10 09:34:46 2026 -0400 arm64: dts: rockchip: Rename rk3328 HDMI audio card [ Upstream commit daa0db717771d43c25d98c2798fa6a7b0252deb7 ] Rename the card from "HDMI" to "RK3328 HDMI" so it identifies the SoC in user-visible ALSA fields and no longer collides with the identical "HDMI" string used by other Rockchip SoCs. Fixes: 29e8976e604f1 ("arm64: dts: rockchip: Add RK3328 audio pipelines") Signed-off-by: Detlev Casanova Link: https://patch.msgid.link/20260910-fix-rockchip-hdmi-audio-names-v2-4-1396a6168e20@collabora.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit 7af02bbc67521cdb8c60389840272c2847bc92e2 Author: Jiale Yao Date: Fri Sep 25 22:50:18 2026 +0800 ASoC: rt722-sdca: always cancel jack work on remove [ Upstream commit 9d29132d81a7f269177be676c3b81cc575899975 ] rt722_sdca_sdw_remove() cancels the jack work only when hw_init is true. rt722_sdca_update_status() clears hw_init when the SoundWire slave becomes unattached, but jack work may already have been queued by rt722_sdca_interrupt_callback() or the jack initialization path. A remove after that status update can therefore skip the cancellation and leave delayed work pending after the codec private data has been freed. The work objects are initialized during probe, so cancel them unconditionally instead of relying on the mutable hw_init state. Fixes: 7f5d6036ca00 ("ASoC: rt722-sdca: Add RT722 SDCA driver") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925145019.2290367-7-yaojiale02@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 21373d033068972d4c1b56acc39f6e4839704d17 Author: Jiale Yao Date: Fri Sep 25 22:50:17 2026 +0800 ASoC: rt721-sdca: always cancel jack work on remove [ Upstream commit 958d025d62352b81dbbd7e975442dd211176f4e1 ] rt721_sdca_sdw_remove() cancels the jack work only when hw_init is true. rt721_sdca_update_status() clears hw_init when the SoundWire slave becomes unattached, but jack work may already have been queued by rt721_sdca_interrupt_callback() or the jack initialization path. A remove after that status update can therefore skip the cancellation and leave delayed work pending after the codec private data has been freed. The work objects are initialized during probe, so cancel them unconditionally instead of relying on the mutable hw_init state. Fixes: 86ce355c1f9a ("ASoC: rt721-sdca: Add RT721 SDCA driver") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925145019.2290367-6-yaojiale02@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c56c8fc5e78ecbb6a6127a58afd86f891fdeef1c Author: Jiale Yao Date: Fri Sep 25 22:50:16 2026 +0800 ASoC: rt712-sdca: always cancel jack work on remove [ Upstream commit c7d07df95ee7ce7859e6c873a76d19ea9c64b6fd ] rt712_sdca_sdw_remove() cancels the jack work only when hw_init is true. rt712_sdca_update_status() clears hw_init when the SoundWire slave becomes unattached, but jack work may already have been queued by rt712_sdca_interrupt_callback() or the jack initialization path. A remove after that status update can therefore skip the cancellation and leave delayed work pending after the codec private data has been freed. The work objects are initialized during probe, so cancel them unconditionally instead of relying on the mutable hw_init state. Fixes: 6c39710da75c ("ASoC: rt712-sdca: Add RT712 SDCA driver for Jack and Amp topology") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925145019.2290367-5-yaojiale02@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6ef6055339b8c0f340ae076238481ab058f7d39a Author: Jiale Yao Date: Fri Sep 25 22:50:15 2026 +0800 ASoC: rt711-sdca: always cancel jack work on remove [ Upstream commit ecc2fca6decefe27d8cf40a4c9815798eec24d30 ] rt711_sdca_sdw_remove() cancels the jack work only when hw_init is true. rt711_sdca_update_status() clears hw_init when the SoundWire slave becomes unattached, but jack work may already have been queued by rt711_sdca_interrupt_callback() or the jack initialization path. A remove after that status update can therefore skip the cancellation and leave delayed work pending after the codec private data has been freed. The work objects are initialized during probe, so cancel them unconditionally instead of relying on the mutable hw_init state. Fixes: ac63716da307 ("ASoC: Realtek/Maxim SoundWire codecs: disable pm_runtime on remove") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925145019.2290367-4-yaojiale02@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3bdcb3d2ea58679e1ea75d05dee6620fe7406f6c Author: Jiale Yao Date: Fri Sep 25 22:50:14 2026 +0800 ASoC: rt711-sdw: always cancel jack work on remove [ Upstream commit 4bf78e3d9e324f9f2e39feecedd4f70b05baeb16 ] rt711_sdw_remove() cancels the jack and calibration work only when hw_init is true. rt711_update_status() clears hw_init when the SoundWire slave becomes unattached, but work may already have been queued by rt711_interrupt_callback() or the jack initialization path. A remove after that status update can therefore skip the cancellation and leave work pending after the codec private data has been freed. The work objects are initialized during probe, so cancel them unconditionally instead of relying on the mutable hw_init state. Fixes: ac63716da307 ("ASoC: Realtek/Maxim SoundWire codecs: disable pm_runtime on remove") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925145019.2290367-3-yaojiale02@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3c0312610320ffd452532673cef0fa20f03ea6fc Author: Jiale Yao Date: Fri Sep 25 22:50:13 2026 +0800 ASoC: rt5682-sdw: always cancel jack work on remove [ Upstream commit 9a98f7e955d35e0831fb179e88e98cf9bc0e001e ] rt5682_sdw_remove() cancels jack_detect_work only when hw_init is true. rt5682_update_status() clears hw_init when the SoundWire slave becomes unattached, but jack_detect_work may already have been queued by rt5682_interrupt_callback() or the jack initialization path. A remove after that status update can therefore skip the cancellation and leave delayed work pending after the codec private data has been freed. The work object is initialized during probe, so cancel it unconditionally instead of relying on the mutable hw_init state. Fixes: ac63716da307 ("ASoC: Realtek/Maxim SoundWire codecs: disable pm_runtime on remove") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260925145019.2290367-2-yaojiale02@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c56ec2fa9941f234fa0b0ae3c9f1a0907423cc46 Author: Marco Giunta Date: Sat Sep 26 14:25:58 2026 +0200 ASoC: aw88399: skip BSTS check when boost converter is bypassed [ Upstream commit 664824782df63013ba8686b649c625cac4793248 ] The sysst check in aw_dev_check_sysst() requires BSTS (boost finished) to assert, but on hardware where the boost converter is bypassed via external power supply (BSTCTRL10 register 0x69, EN_HVBAT bit 2 set), BSTS (SYSST register 0x01, bit 9) will never assert. The vendor's generic driver (aw883xx) handles this by reading EN_HVBAT and conditionally masking out BSTS from the sysst check. The in-tree driver missed this logic when the original code was ported upstream. Add the same conditional check, matching the vendor driver's aw_dev_sysst_check() implementation. Fixes: 8ade6cc7e261 ("ASoC: codecs: Add aw88399 amplifier driver") Signed-off-by: Marco Giunta Link: https://patch.msgid.link/SN6PR19MB2303FF1922BF5F876378066FFC8F2@SN6PR19MB2303.namprd19.prod.outlook.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3e4af19fa095c0fea7ff004228d746e07dcde259 Author: Linus Walleij Date: Wed Sep 16 08:49:37 2026 +0200 power: supply: ab8500_fg: Avoid reserved AB8505 CCConf bit [ Upstream commit edafb2e4642b72b0f86ce5990d5c29c116bb642b ] AB8500 defines CCConf bit 1 as CCDeepSleepEna, but AB8505 reserves bits 7:1 and only defines bit 0, CCPwrUpEna. The fuel-gauge driver currently writes both bits whenever it starts the coulomb counter. The Samsung-GT-S7710-Skomer and related Samsung product trees use the same unconditional value in their fuel-gauge drivers, so they provide no AB8505 workaround to carry over. Select the value from the detected PMIC variant instead, retaining the deep-sleep enable bit on all existing non-AB8505 paths and avoiding the reserved bit on AB8505. Fixes: a982362c1723 ("mfd: Support for the AB8500 AB8505 variant") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-15-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit ec6db97e0ad95d2805b1761f75fb7fd91cc52450 Author: Linus Walleij Date: Wed Sep 16 08:49:36 2026 +0200 power: supply: ab8500_fg: Finalize current measurements [ Upstream commit 9a0461fb5e7cc64ed303bee3661452879ee139a1 ] ab8500_fg_inst_curr_start() returns with cc_lock held and the CCEOC IRQ enabled. The bounded sampling loop in the load-compensated voltage path returns without calling ab8500_fg_inst_curr_finalize() when it expires, leaving both resources active. The next fuel-gauge work item then blocks on cc_lock and all cached power-supply values stop updating. The Samsung-GT-I8530-Gavini, Samsung-GT-S7710-Skomer, Samsung-SGH-I407-Kyle and Samsung-SGH-T599-Codina-TMO product trees use a bounded sampling loop in drivers/battery/abb_fuelgauge.c but still call the finalizer. Follow that pattern so the normal completion timeout also performs the required cleanup. Check the start result as well and return an uncompensated voltage if the instantaneous current transaction cannot be started or completed. Fixes: edc400e1632f ("power: supply: ab8500_fg: Break loop for measurement") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-14-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 653f4e2491ccd8371214e43dde21099fb738b537 Author: Linus Walleij Date: Wed Sep 16 08:49:35 2026 +0200 power: supply: ab8500_charger: Recover inactive AB8505 charger [ Upstream commit 76bdf9d78245bb068207c23e9bf43d4b9bb201c3 ] UsbChCtrl1.UsbChEna can remain set while UsbChStatus1.UsbChOn is clear. The existing recovery only checks the control bit, so it considers the charger enabled and leaves charging stopped. The Samsung-GT-S7710-Skomer, Samsung-SGH-I407-Kyle, and Samsung-SGH-T599-Codina-TMO product trees are reference points for checking both bits and cycling the charger when they disagree. Extend the USB charger check to detect this AB8505 state and enable the check in the charging algorithm for AB8505. Only cycle the charger when VBUS is debounced and no charger-not-OK, thermal, overvoltage, or watchdog fault accounts for the inactive hardware. Fixes: 4dcdf57773fd ("ab8500-bm: Quick re-attach charging behaviour") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-13-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit e8921d357b839f6255201ff1ce59794a9dec32d2 Author: Linus Walleij Date: Wed Sep 16 08:49:34 2026 +0200 power: supply: ab8500_charger: Retry AB8505 USB detection [ Upstream commit 95fba2e3055df99ed19e7d6399101bac42b3e7d5 ] AB8505 reports UsbLink1Status state 14 when the USB charger port is not OK. The manual says that software can return the port detector to the detection state by setting the self-clearing ChargerCtrl.DropCountReset bit. The Samsung-GT-S7710-Skomer, Samsung-SGH-I407-Kyle, and Samsung-SGH-T599-Codina-TMO product trees are reference points for a workaround that cycles the USB charger and retries detection three times before rejecting VBUS. Only the Kyle tree writes 1 to DropCountReset; the other two write 0 and therefore do not request the documented reset. Add the same bounded recovery for AB8505, preserving the configured USB charger control bits across each cycle. Keep the charger connected while recovering, then report the fault and disconnect it if all three attempts fail. Leave AB8500 behavior unchanged. Fixes: d4337660d069 ("ab8500-charger: Add AB8505_USB_LINK_STATUS") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-12-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit f8fb71724418b6c589dd5de7d27cc0d0b0d7edc1 Author: Linus Walleij Date: Wed Sep 16 08:49:33 2026 +0200 power: supply: ab8500_charger: Skip absent AB8505 main charger [ Upstream commit 52c8cdcc1146d86fae524a589d4512c8d59ea8b4 ] AB8505 contains only the USB charger. It has no integrated main charger, main-charger status register, or main-charger interrupts. Avoid reading the missing status register, requesting the five missing interrupts, or disabling an AC charger which was never enabled. This lets the driver bind using only the AB8505 USB charger resources. Fixes: d4337660d069 ("ab8500-charger: Add AB8505_USB_LINK_STATUS") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-11-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 3c50fabc7b9fabbb6b85850a45ed5b829afe90d2 Author: Linus Walleij Date: Wed Sep 16 08:49:32 2026 +0200 power: supply: ab8500_charger: Handle detection errors [ Upstream commit 1098c619ce7595a77a8c2e366a703e9fc5f29bf7 ] ab8500_charger_detect_chargers() returns either a charger bitmask or a negative register-access error. The probe and component-bind paths use a negative return value as a bitmask, making failed reads appear as both AC and USB connections. Propagate detection errors and release the bind-time workqueue on failure. Fixes: 84edbeeab67c ("ab8500-charger: AB8500 charger driver") Fixes: 1c1f13a006ed ("power: supply: ab8500: Move to componentized binding") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-10-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 23150338111051f1bb2976cc2a6ac3b5f04a821f Author: Linus Walleij Date: Wed Sep 16 08:49:31 2026 +0200 power: supply: ab8500_charger: Respect AB8505 register layout [ Upstream commit dcecf527632297011153f088573689a1ad1de790 ] Several AB8505 charger fields differ from AB8500. Its long VBUS falling debounce is 300 ms rather than 100 ms, and its VBUS overvoltage selector has a different encoding programmed through OTP. Writing the AB8500 6.3 V value selects 9 V on AB8505. AB8505 revision 3 also defines SwControlFallback as reserved, correcting older documentation which led the driver to support autopower there. Preserve the AB8505 overvoltage setting, wait for its documented debounce, and reject the unsupported autopower setting. Fixes: 0ed5107fa860 ("ab8500-charger: Do not touch VBUSOVV bits") Fixes: b016322293c7 ("ab8500-charger: Add support for autopower on AB8505 and AB9540") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-9-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 230cf742a3336dc8b2967e3237b16ca435cf5eac Author: Linus Walleij Date: Wed Sep 16 08:49:30 2026 +0200 power: supply: ab8500_charger: Decode AB8505 USB status [ Upstream commit 2b697df2b6394613a3bb168adfa8a845ad7c83d9 ] AB8505 keeps USB link status in the same bit position as AB8500 but defines a different five-bit value table. Reusing the AB8500 enum treats several reserved AB8505 values as chargers and misidentifies the AB8505 charger-fault and DM-high states. Add an AB8505 decoder, reject reserved and non-charging states, and retain conservative current limits for supported charger types. Restrict the invalid-link workaround to AB8500 and stop processing when the status register cannot be read. Fixes: d4337660d069 ("ab8500-charger: Add AB8505_USB_LINK_STATUS") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-8-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit acaaa95e088bbb50cd8e08219f7fb3efe1bada4d Author: Linus Walleij Date: Wed Sep 16 08:49:29 2026 +0200 power: supply: ab8500_charger: Fix AC charger re-enable [ Upstream commit 3e1d2517347f6bb72f74e63ec77d1634385fbf21 ] The AC check-enable callback passes the embedded USB charger object to ab8500_charger_ac_en(). That helper derives the parent with the AC charger offset, so the wrong object yields an invalid ab8500_charger pointer. Pass the AC charger object when re-enabling AC charging. Fixes: bc6e02871402 ("power: supply: ab8500: Standardize CV voltage") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-7-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit f2d7cf04f8c8eee827f2c76c91310b38698efbd6 Author: Linus Walleij Date: Wed Sep 16 08:49:28 2026 +0200 power: supply: ab8500: Preserve battery termination current [ Upstream commit 3b33eda4067494658d51db0792377fef98787e3f ] The battery-info parser uses a negative value for an unspecified termination current. Testing the value as a boolean instead replaces every valid positive current from the battery description with 200 mA. Apply the default only when the property is unspecified so batteries retain their described charging termination current. Fixes: 9c20899da46b ("power: supply: ab8500: Standardize termination current") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-6-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 363aba2a6721b846bc2ee8b7188bcb9d413db0ab Author: Linus Walleij Date: Wed Sep 16 08:49:27 2026 +0200 power: supply: ab8500_btemp: Fix event temperature reporting [ Upstream commit 95990cda8e42dda4bd3f1475d578323981bd8579 ] The event-aware path initializes its local temperature to zero and compares that zero against the thermal thresholds. Consequently some events report the measured temperature after it crosses the event threshold, while others always report the threshold. Start with the measured temperature, clamp it according to the active event, and convert to tenths of a degree only once. This path is used by AB8505 and later variants. Fixes: 1f855824757e ("ab8500-btemp: AB8500 battery temperature driver") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260916-ab8500-charging-v1-5-e986ed321cc6@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 87d3135874bd3056bd9d864ec04624f71d3a9e81 Author: HyeongJun An Date: Wed Sep 30 20:15:33 2026 +0900 selftests/alsa: Do not take another control's event as our own [ Upstream commit c9b0768669976a1beb0a1537b4257bd6b76dfbac ] The wait_for_event() skips an event for a different control with a continue inside its do-while loop. But continue goes straight to the loop condition, and that tests the mask of the event just skipped. So a value event for another control ends the wait as if it were ours. A driver that notifies a second control from its put() queues that event first. The core only sends ours once put() returns. So the wait returns early and leaves ours in the queue. The next test then reports it as spurious. And event_missing passes for a control whose put() said nothing changed, as long as it notified a neighbour. To fix this, clear the mask before skipping the event. Fixes: b1446bda5645 ("kselftest: alsa: Check for event generation when we write to controls") Signed-off-by: HyeongJun An Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260930111534.3782264-2-sammiee5311@gmail.com Signed-off-by: Sasha Levin commit 94f0383e4c076e94d8d9efe9019b91f977bb402a Author: Guangshuo Li Date: Thu Sep 24 19:23:29 2026 +0800 spi: bcm63xx-hsspi: Disable runtime PM on remove [ Upstream commit 38232bd3cea74845c2064eb9f7eac77fa5a21d85 ] bcm63xx_hsspi_probe() enables runtime PM before creating the sysfs group, but bcm63xx_hsspi_remove() does not perform the matching pm_runtime_disable() after a successful probe. The probe error paths already disable runtime PM when sysfs group creation or controller registration fails. Add pm_runtime_disable() to the remove path after removing the sysfs group to balance pm_runtime_enable() from bcm63xx_hsspi_probe(). Fixes: fb8695e3749e ("spi: bcm63xx-hsspi: fix pm_runtime") Signed-off-by: Guangshuo Li Link: https://patch.msgid.link/20260924112329.1566051-4-lgs201920130244@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 1fd01936ba6028ab0cf3c11cbcbf173ca570c0de Author: Guangshuo Li Date: Thu Sep 24 19:23:27 2026 +0800 spi: fsl: unmap immr_spi_cs on remove [ Upstream commit af1d882d421de504a1e5fac92eb06947b6cbdd8f ] of_fsl_spi_remove() does not unmap pinfo->immr_spi_cs after a successful probe when CONFIG_FSL_SOC is enabled and fsl,spisel_boot causes of_fsl_spi_probe() to map it with ioremap(). The probe error path already performs the matching iounmap(). Retrieve pinfo from the platform data and call iounmap() when pinfo->immr_spi_cs is present, pairing normal removal with the mapping established by of_fsl_spi_probe(). Fixes: 0f0581b24bd0 ("spi: fsl: Convert to use CS GPIO descriptors") Signed-off-by: Guangshuo Li Link: https://patch.msgid.link/20260924112329.1566051-2-lgs201920130244@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 73df677d5b48f77a05fa3a9cf9fdfe67dee62195 Author: Arnd Bergmann Date: Fri Sep 25 15:04:30 2026 +0200 perf: marvell: avoid large stack variables [ Upstream commit 7e17084177aa6c76231c6ee8cdbbcd24f40c86cc ] The probe function in this driver constructs multiple large structures on the stack, which ends up causing a size warning: drivers/perf/marvell_cn10k_ddr_pmu.c:1168:12: error: stack frame size (1296) exceeds limit (1280) in 'cn10k_ddr_perf_probe' [-Werror,-Wframe-larger-than] 1168 | static int cn10k_ddr_perf_probe(struct platform_device *pdev) | ^ Avoid this warning and simplify the code by turning these into static const structures and directly assigning them without the extra copy. Fixes: 9b551a2446b2 ("perf: marvell: Add CN20K DDR PMU support") Signed-off-by: Arnd Bergmann Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 474a00b6291de71efc1644a8c8352e36c2bc21dc Author: Ruoyu Wang Date: Thu Aug 20 21:56:11 2026 +0800 perf/dwc_pcie: Fix PCI device reference leak in probe [ Upstream commit 3a4067658363e34bf4e1d7039e5b52951fcb4012 ] pci_get_domain_bus_and_slot() returns a referenced PCI device. When the subsequent RAS DES capability lookup fails, dwc_pcie_pmu_probe() returns -ENODEV without releasing that reference. Repeated failed probes can therefore keep the PCI device allocated after removal. Declare the looked-up device with __free(pci_dev_put), so the temporary reference is released on every return path. Keeping the reference scoped to the whole probe also covers all later uses of the device during initialization. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 7f35b429802a ("perf/dwc_pcie: fix duplicate pci_dev devices") Suggested-by: Markus Elfring Signed-off-by: Ruoyu Wang Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit bcac727aa3727301d0a89e81ef81f87d3cfc4efb Author: Dave Jiang Date: Wed Aug 5 08:59:11 2026 -0700 perf/cxl: Clear stale overflow status before using a counter [ Upstream commit 05d82cf377f706d0b566b572bc66e3a2057bd68e ] cxl_pmu_event_stop() leaves the counter's bit set in the overflow status register and only cxl_pmu_irq() ever clears it, so a counter handed from one event to the next starts with the previous owner's overflow pending. The perf core stops and starts back to back with interrupts off, so an interrupt latched over the handover lands on the new event. prev_count is 0 by then, so the read path adds a full period: 2^counter_width phantom counts. Clear the bit in cxl_pmu_event_start(), before the config write arms Interrupt on Overflow. Clear the whole register at probe too, for counters no event ever owns - the driver never touched it, so firmware or a previous kernel can leave a bit set there. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: Richard Cheng Closes: https://lore.kernel.org/linux-cxl/anAVpO--i5heVfz9@MWDK4CY14F/ Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit b5f7af93db8a72905ce9084eb7ba77eea835809c Author: Dave Jiang Date: Wed Aug 5 08:59:10 2026 -0700 perf/cxl: Don't log through pmu.dev in the overflow interrupt handler [ Upstream commit 984920c893f0e6832351bc03deeb5ef9a42fbdbb ] perf_pmu_unregister() frees pmu->dev without clearing the pointer, and cxl_pmu_probe() orders its devm actions so that teardown runs it before free_irq(). Nothing in between masks the interrupt, and cxl_pmu_event_stop() leaves the overflow status bit set, so an overflow taken just before teardown is still delivered and still reaches the dev_dbg() in the !event branch - by which point info->pmu.dev is freed. Log through info->pmu.parent instead, which is devm-managed and outlives every teardown action. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Acked-by: Jonathan Cameron Signed-off-by: Dave Jiang Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 68f53832045954a72123d605247139b1f39e905a Author: Dave Jiang Date: Wed Aug 5 08:59:09 2026 -0700 perf/cxl: Validate the hardware-reported counter width [ Upstream commit 1c5499e67303a9393388197fb14b39ed06a3dc55 ] cxl_pmu_parse_caps() takes the Counter Width straight from the CPMU Capability register without a bounds check. The Counter Data register is 64 bits wide, so a device reporting 0 or more than 64 is reporting nonsense, and GENMASK_ULL(width - 1, 0) in the read path then shifts out of range. That is undefined behaviour, and a UBSAN splat where it is enabled. Reject a counter width outside 1..64 at probe. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 4718a85f9a46fc1ab0545d5c2c2e09fed284d70c Author: Dave Jiang Date: Wed Aug 5 08:59:08 2026 -0700 perf/cxl: Unfreeze counters after handling an overflow interrupt [ Upstream commit 2e4fe234c72d65a09bbfd421240a0cfd7c8046a2 ] The counters run with Freeze on Overflow set, so one overflow freezes every counter in the block (CXL r4.0 8.2.7.2.1), and a frozen counter "remains frozen until explicitly unfrozen by software" (8.2.7.1.3, Table 8-183). cxl_pmu_irq() reads the overflowed counters and clears the overflow status but never unfreezes, so everything stays frozen until the next pmu_enable() and events in that window are lost. Unfreeze after clearing the status, unless the PMU has been disabled in the meantime - cxl_pmu_disable() freezes the block deliberately. Track the enabled state and leave it frozen in that case. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit f299cb3c24b89fe681e0008e8631e6a2d10440c4 Author: Dave Jiang Date: Wed Aug 5 08:59:07 2026 -0700 perf/cxl: Don't share the overflow interrupt, and keep it pinned [ Upstream commit b899fd3487b0d4066d60ebcf5b73e77c9617de54 ] The PMU pins its overflow interrupt to info->on_cpu in the hotplug callbacks, but requests it with only IRQF_SHARED | IRQF_NO_THREAD. Without IRQF_NOBALANCING, irqbalance or a userspace smp_affinity write can move it elsewhere, and cxl_pmu_irq() then runs local64_cmpxchg() and local64_add() on hwc->prev_count and event->count at the same time as the managing CPU. local64_t is only atomic against same-CPU access, so the counts corrupt. The flag alone does not fix that while the line is shared. __setup_irq() only acts on it for the first action on a line, and a co-owner has no reason to want our affinity - it would keep taking the interrupt wherever its own points, running our handler on the wrong CPU. Drop IRQF_SHARED and add IRQF_NOBALANCING. The spec only recommends a distinct Interrupt Message Number per CPMU instance (CXL r4.0 8.2.7.1.1), so a device may put several on one vector, or share with the mailbox or event log. Such a device now loses a PMU rather than silently miscounting - and only the PMU, since the preceding patch adds the CPMUs after the event configuration. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Signed-off-by: Dave Jiang Link: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 70986b02d57ccacb648d9c9837c47568d1763529 Author: Dave Jiang Date: Wed Aug 5 08:59:06 2026 -0700 cxl/pci: Add the PMUs after configuring events [ Upstream commit 28b2b667f48f42a2adb491192b2a95fca07943e3 ] cxl_pci_probe() adds the CPMU instances before configuring the event interrupts. Both take an MSI/MSI-X vector the device names in its own capability registers, and the spec lets a device point several capabilities at one message number, so the two can collide. They do not fail the same way. A failed devm_cxl_pmu_add() only breaks out of the loop, while a failed cxl_event_config() aborts probe and the memory device never appears. Going PMUs-first therefore lets a peripheral facility take the vector and deny it to one that matters. Configure events first, so a collision costs the PMU rather than the memdev. Return 0 explicitly afterwards, since rc still holds any PMU error that cxl_event_config() used to overwrite on the way past. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dave Jiang Reviewed-by: Jonathan Cameron Reviewed-by: Alison Schofield Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 343b527fd24e62170a3e4c8844c0acc56bef0040 Author: Dave Jiang Date: Wed Aug 5 08:59:04 2026 -0700 perf/cxl: Accept an overflow interrupt on MSI message number 0 [ Upstream commit af06fba45746058ba8f983a0ac2f457a3404edba ] cxl_pmu_probe() rejects the PMU when info->irq <= 0, but at that point the field still holds the MSI/MSI-X message number the device signals overflow on, not a Linux virq. That number is 0-based, and -1 means no interrupt support. Message number 0 is valid and pci_irq_vector() takes a 0-based index, so a compliant device signalling on the first vector fails to probe. Reject only the no-interrupt case, matching how the CXL mailbox and event interrupts handle it. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Jonathan Cameron Reviewed-by: Davidlohr Bueso Acked-by: Richard Cheng Signed-off-by: Dave Jiang Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 873ff565f6704ffe0a74517519781f66b9820cf2 Author: Dave Jiang Date: Wed Aug 5 08:59:03 2026 -0700 perf/cxl: Fix the counter overflow delta fixup [ Upstream commit 0326269ed73529cdf821664b6176814cde9ca374 ] The counter is masked to counter_width, so the subtraction in __cxl_pmu_read() throws away the bit that records the wrap. A delta of one whole period reads back as 0, the same as no events at all, and only the overflow status tells the two apart - which is why __cxl_pmu_read() takes an overflow argument. The fixup keys off the delta rather than the operands: delta = (new_cnt - prev_cnt) & GENMASK_ULL(counter_width - 1, 0); if (overflow && delta < GENMASK_ULL(counter_width - 1, 0)) delta += (1UL << counter_width); so it cannot tell which of these it is looking at: event_start polled read wrap ctr = 0 .......... ctr = P/2 ......... mask -> 0 (+r) prev = 0 prev = P/2 IRQ reads new = r prev = 0 (no read yet): new >= prev, fell short -> add period prev = P/2 (polled): new < prev, spans wrap -> add nothing Both rows are the same interrupt and the old guard adds a period in both, so a mid-period read makes the event over-count. 'perf stat -I' hits that. Condition the fixup on new_cnt >= prev_cnt, the one case the subtraction cannot express. Dropping it outright would break the first row. It stays exact whatever the residual r is, which matters because some events increment by more than 1 per cycle (CXL r4.0 8.2.7.2.1, Threshold) and can step past 0 as they wrap. Use mask + 1 for the period rather than a shift. It is 0 for a 64-bit counter, and avoids the old 1UL << counter_width - undefined for width 64, and for >= 32 on 32-bit kernels. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dave Jiang Reviewed-by: Jonathan Cameron Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 8091266ae5dd9fadff7cdc464b0cf735d7d8245b Author: Dave Jiang Date: Wed Aug 5 08:59:02 2026 -0700 perf/cxl: Clear stale event fields before reprogramming a counter [ Upstream commit 7406d6cf76b1dad53084f3988dc65ab967209344 ] cxl_pmu_event_start() ORs the event group id, event mask, edge and invert selections into a configurable counter's config register without clearing them first, and cxl_pmu_event_stop() leaves them set. Reuse the counter for another event and the new selection lands on top of the old one, so the counter counts the wrong events with stale edge and invert behaviour. Use FIELD_MODIFY() so each field is replaced rather than accumulated. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit cc07ef0c192bc6f6822a8f22820b46d2cef6db3e Author: Dave Jiang Date: Wed Aug 5 08:59:01 2026 -0700 perf/cxl: Program the requested event group on configurable counters [ Upstream commit b22dcc11429866e07dc54299255e8ca13c26d38a ] cxl_pmu_get_event_idx() sets *counter_idx for a configurable counter but never *event_idx. hwc->event_base stays 0, so cxl_pmu_event_start() programs event group 0 no matter which group the user asked for. Return the matched capability's event_idx. Fixes: 5d7107c72796 ("perf: CXL Performance Monitoring Unit driver") Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260715191454.459673-1-dave@stgolabs.net?part=1 Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Jonathan Cameron Signed-off-by: Dave Jiang Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 73afa5509c812db5f1a7dc68cda1b8ee9a628684 Author: Alexey Charkov Date: Thu Sep 10 18:32:59 2026 +0400 power: supply: bq257xx: Use psy directly instead of driver data [ Upstream commit 1a64071bb30d97b75a1029943b6a3481098b254b ] bq257xx_external_power_changed() is handed the power supply it is called for, but passes pdata->charger to power_supply_am_i_supplied(). Those are not equivalent during probe or teardown, and a supplier's changed_work can reach power_supply_external_power_changed() when pdata->charger doesn't point anywhere meaningful (e.g. freed memory during teardown). Use the psy argument, which is valid whenever the callback runs. Fixes: 1cc017b7f9c7 ("power: supply: bq257xx: Add support for BQ257XX charger") Signed-off-by: Alexey Charkov Link: https://patch.msgid.link/20260910-bq257xx-init-v3-2-4e219a1a04a5@flipper.net Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit b8fd12c16844be292ff05d8e3acc358ac139ee4c Author: Jan Stancek Date: Thu Oct 1 09:11:10 2026 +0200 .gitignore: drop Module.markers [ Upstream commit a7d32fa14bc74d1786a2f0513b6f0815bd4be311 ] commit fc5377668c3d ("tracing: Remove markers") deleted the marker code and the modpost output. Follow-up commit 8723eaeff59a ("Kbuild: clean up marker") removed it from clean and mrproper targets. Both are from 2009, so the file is hopefully no longer in anyone's tree, drop it from .gitignore as well. Fixes: 8723eaeff59a ("Kbuild: clean up marker") Signed-off-by: Jan Stancek Reviewed-by: Nicolas Schier Link: https://patch.msgid.link/8cbe913b9f80dc6fea73a9e3d51429db2b38905f.1790838401.git.jstancek@redhat.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 53c9ea06a41c5fd0c674e2f9f4311c9e6ac6fd9e Author: Liviu Nicoara Date: Sun Sep 20 15:34:02 2026 -0400 power: supply: qcom_battmgr: Report capacity on X1E80100 [ Upstream commit f7c62ebfd9127b12a1e39f1cc7f3131cb3065886 ] Commit 3f87baacea4d ("power: supply: qcom_battmgr: Report battery capacity") added POWER_SUPPLY_PROP_CAPACITY to the SC8280XP battery properties, computed from the firmware's charge and last-full values. When commit cc3e883a0625 ("power: supply: qcom_battmgr: Add charge control support") later gave X1E80100 a property table of its own, the table was copied without the capacity property, so X1E80100 machines expose energy_now and energy_full but no capacity. The percentage is already computed for this variant in the shared SC8280XP callback; only the property list is missing it. Add it, in the same place it sits in the SC8280XP table. Tested on a Dell XPS 13 9345: capacity reads 94 with energy_now 52640000 and energy_full 55540000. Fixes: cc3e883a0625 ("power: supply: qcom_battmgr: Add charge control support") Signed-off-by: Liviu Nicoara Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260920193402.2402-1-lnicoara@thinkoid.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 57729bca305c529a2a8dd08e1733002bb6daab9b Author: Nicolin Chen Date: Wed Sep 23 13:11:25 2026 -0700 iommu/arm-smmu-v3: Don't rb_erase() a never-inserted stream node [ Upstream commit 2888520bdcbe0599cfc77b2fad8dc6c95505a3cb ] arm_smmu_insert_master() skips inserting a stream whose StreamID duplicates one the same master already owns (bridged PCI devices can present duplicate IDs), leaving that master->streams[i].node zeroed and unlinked from the smmu->streams rb-tree. Both the insert error-rollback loop and arm_smmu_remove_master() then call rb_erase() on every master->streams[i].node unconditionally. rb_erase() on a zeroed node sees a NULL parent, treats the node as the tree root and sets root->rb_node = NULL, silently emptying the whole SID tree and breaking SID lookups (and DMA) for every other master on the SMMU. Mark each node with RB_CLEAR_NODE() after sort_nonatomic() reorders the array, since sorting relocates the entries and would leave the earlier self-referential RB_CLEAR_NODE() pointer stale. An un-inserted node then stays RB_EMPTY_NODE() and is skipped in both erase loops; inserted nodes are linked by rb_find_add() and erased as before. Fixes: b00d24997a11 ("iommu/arm-smmu-v3: Fix iommu_device_probe bug due to duplicated stream ids") Assisted-by: LLM Signed-off-by: Nicolin Chen Reviewed-by: Mostafa Saleh Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit ca3a4d7a68b420f441069be2f6cf351f972cc47f Author: Linus Walleij Date: Fri Sep 25 10:59:24 2026 +0200 dt-bindings: power: supply: ab8500: Add AB8505 charger [ Upstream commit 80d28539c1f9baab72210501729d67e3d9daa4b8 ] AB8500 and AB8505 expose different charger interrupt sets. Add a unique AB8505 charger compatible with the AB8500 compatible as its fallback. Use the variant-specific string to require the fourteen main and USB charger interrupts on AB8500 and the nine USB charger interrupts on AB8505. Also clarify that autopower_cfg describes the AB8500 facility, since the corresponding AB8505 register bit is reserved. Fixes: eb917497734c ("dt-bindings: power: supply: ab8500: Convert to DT schema format") Assisted-by: LLM Reviewed-by: Krzysztof Kozlowski Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260925-ab8500-charger-dt-v3-1-f80b8d295e2d@kernel.org Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 9768d577d9a417b9437b9cee504b771f219d3552 Author: Zhihao Cheng Date: Tue Sep 22 11:05:38 2026 +0800 md: Fix the null-ptr-deref of 'mddev->private' while submitting IO [ Upstream commit 4c90b76e0198deb89376988daa8d96b48bea7fcf ] Concurrent processes md_stop and IO submission can trigger a NULL pointer dereference of mddev->private: BUG: kernel NULL pointer dereference, address: 0000000000000070 RIP: 0010:_wait_barrier+0x2f/0x250 Call Trace: raid1_make_request+0x150/0xf50 md_handle_request+0x104/0x530 md_submit_bio+0x76/0x130 submit_bio+0xdd/0x250 submit_bio_wait+0x1f/0x40 __blkdev_direct_IO_simple+0x1f6/0x370 blkdev_write_iter+0x3b2/0x520 ksys_write+0x7d/0x190 One process can submit I/O through an open file while a forked process uses the same file to issue STOP_ARRAY. The opener check permits this because md_open() was called only once. do_md_stop() can then clear mddev->private while the I/O is entering the personality make_request callback. This affects raid0, raid1, raid10, and raid5. Suspend STOP_ARRAY while holding the reconfiguration lock so teardown waits for active_io references to drain. Fail I/O in md_handle_request() if mddev->pers is NULL after the array resumes. The sysfs stopping paths are protected by mddev_set_closing_and_sync_blockdev(). Apply that protection to both clear and inactive transitions even when the array is read-only. dm-raid teardown is already invoked with the device suspended. Fetch a reproducer in https://bugzilla.kernel.org/show_bug.cgi?id=222020 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+3fe892ea5fc292e1353f@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3fe892ea5fc292e1353f Signed-off-by: Zhihao Cheng Link: https://patch.msgid.link/20260922030538.1634904-1-chengzhihao1@huawei.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 6de4a09f9763b09de9e15275ce402a1ce484824f Author: Ryan Brue Date: Mon Sep 28 17:26:17 2026 -0500 power: supply: bq24190_charger: don't reset registers across system suspend [ Upstream commit e0844bd22a9f97885882bde3c4a441710e895240 ] bq24190_pm_suspend() calls bq24190_register_reset(), which returns every register to its power-on default, and bq24190_pm_resume() does it again before re-applying the probe-time configuration. On any board that wires the charger's interrupt this makes system suspend unusable. The reset re-arms the chip's 40 s i2c watchdog. bq24190_set_config() turns that watchdog off at probe, deliberately: as the comment there explains, the same write also takes the part out of default mode into host mode. Nothing pets it while the system is asleep, so it expires, resets the registers again and pulses INT. The charger interrupt is a system wake source -- armed unconditionally in probe since commit f385e6e2a153 ("power: bq24190_charger: Use PM runtime autosuspend"), and still enabled by default after the conversion to the wake irq API [1] -- so the pulse wakes the machine. Measured on an MT8173 board (Amazon Fire HD 10 2017, BQ24297) by swapping only this driver between builds with and without this change, asking for a 150 s suspend each time: on charger, with the reset: 41-43 s, 7 runs of 7 on charger, without the reset: 150 s, 3 runs of 3 on battery, with the reset: 40-41 s, 3 runs of 3 on battery, without the reset: 150 s, 3 runs of 3 It is not a charging-only problem. The watchdog runs from VBUS or from the battery, so an unplugged tablet loses suspend in the same way. ftrace names the wake source. Across the resume, the first device interrupt after the machine comes back is the charger: 1270.760799: suspend_resume: machine_suspend[3] end 1270.775683: irq_handler_entry: irq=25 name=bq24190-charger 1270.776156: irq_handler_entry: irq=250 name=11010000.i2c Everything between is IPI and arch_timer from bringing the secondary CPUs back up, and no RTC interrupt appears anywhere in the trace -- the 150 s wake alarm never fired. The cause leaves nothing behind for userspace to find, because WATCHDOG_FAULT is in the latch-on-read fault register and the driver's own interrupt handler has already consumed it. The reset also discards host configuration that nothing restores. Resume calls bq24190_set_config(), which writes only the watchdog, SYS_MIN, IPRECHG, ITERM, ICHG and VREG, so: - IINLIM returns to its power-on default. Boards without a charger-type detector set the input limit from userspace; measured here, one ordinary suspend/resume silently took input_current_limit from 1500 mA to 500 mA, and to 100 mA when running from the battery, where the default differs. - EN_HIZ is cleared, so a charger the host put into high-impedance mode starts drawing from VBUS again the moment the system sleeps. There is no way to have both. Default mode is what the reset is for, and on this part default mode and a disarmed watchdog are mutually exclusive: a write to any register moves the chip into host mode, and it only returns to default mode when the watchdog times out. Parking it in default mode for the sleep therefore always leaves a timer armed that will fire, and on any board that wires INT that firing is a wake. A per-board opt-out would not be choosing between two workable configurations, only between a working suspend and a broken one. Resetting in suspend buys nothing worth this. The part is in host mode with its watchdog off; it charges on its own, switching from constant current to constant voltage and terminating when the battery is full, and nothing in it can expire or change while the host sleeps. Resetting on resume is weaker still: the host is awake and about to reconfigure the chip, so the reset only guarantees the loss. The one thing the reset does guard against is a host that never comes back: a chip in host mode keeps whatever it was last told, where default mode would revert to the power-on values. But that is the state the driver leaves it in for all of normal runtime operation already, so sleep is not special, and the part still makes its own constant-current to constant-voltage transition and terminates when the battery is full. So drop it in both directions. The suspend callback has nothing left to do and goes away. Resume re-applies the probe-time configuration, which is idempotent and also recovers a part that did somehow fall back to default mode, since bq24190_set_config() starts by turning the watchdog off. This has been proposed before. Hans de Goede sent the same change in 2017 [2] and Sebastian Reichel agreed with the reasoning [3], but v6 kept the reset on by default and added the "disable-reset" device property instead [4]. That property cannot answer this: it is set only from x86 platform code -- i2c-cht-wc and x86-android-tablets -- and is not in bq24190.yaml, so no DT board can reach it. Every in-tree DT user of this driver (tegra124-xiaomi-mocha, qcom-msm8974-lge-nexus5-hammerhead, qcom-msm8974pro-oneplus-bacon, rk3188-bqedison2qc) wires the charger interrupt and so has the same wake armed, with no way to opt out. If some board does want the reset, it would be better expressed the other way round. The vendor kernel for this board does not reset across suspend either: its driver, drivers/power/mt81xx/bq24297.c, only masks the charger interrupt on suspend and unmasks it on resume. Reproduced on a BQ24297. The reasoning applies to the family, but the other parts were not available to test. [1] https://lore.kernel.org/all/20260908-rbrue-suez-upstreaming-bq24190_charger-use-wake-irq-api-v1-1-c3f10ae2a34a@gmail.com/ [2] https://lore.kernel.org/all/20170322145536.30570-5-hdegoede@redhat.com/ [3] https://lore.kernel.org/all/20170323112052.ukyazi4pnji7n6st@earth/ [4] https://lore.kernel.org/all/20170414165233.4532-1-hdegoede@redhat.com/ Fixes: d7bf353fd0aa ("bq24190_charger: Add support for TI BQ24190 Battery Charger") Assisted-by: LLM Signed-off-by: Ryan Brue Reviewed-by: Hans de Goede Link: https://patch.msgid.link/20260928-rbrue-suez-upstreaming-bq24190_charger-no-reset-regs-sys-suspend-v1-1-9a7689f12c05@gmail.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 431475fc42da6d65c1061b26942ca6ee3837b261 Author: Chen-Yu Tsai Date: Sun Jul 12 11:00:04 2026 +0800 dt-bindings: media: sun4i-a10-video-engine: Fix IOMMU count for H6 [ Upstream commit ca9a67831805dc788407a05f276abb6b86b1174d ] On the H6 SoC, the Video Engine has two memory ports, thus two IOMMU connections. The secondary one that is missing is likely used for reading reference frames. The newer H616 is the same. On the other hand, the D1 only has one memory port. Add the missing IOMMU connection for the Video Engine. Fixes: 62a8ccf3a248 ("arm64: dts: allwinner: h6: Fix Cedrus IOMMU usage") Reviewed-by: Jernej Skrabec Acked-by: Rob Herring (Arm) Signed-off-by: Chen-Yu Tsai Signed-off-by: Nicolas Dufresne Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin commit 0205b18e26afb24452d5b31f9624dd2dc59de3f8 Author: Sang-Hoon Choi Date: Wed Sep 30 02:37:38 2026 +0900 md/raid5: protect big_stripe_tree lookup with RCU [ Upstream commit 73b0df929494522acf9ccc8dafea4f721166965b ] big_stripe_tree is updated under tree_lock, and deleted radix-tree nodes are freed after an RCU grace period. r5c_big_stripe_cached() used to run under an RCU read-side critical section, but that protection was removed together with unrelated rdev lookup protection. The lookup can now be preempted while walking the tree, allowing a concurrent deletion and grace period to complete before the walk resumes. Protect the lookup locally with rcu_read_lock(). Only the presence of the entry is used after unlocking. Fixes: ad8606702f26 ("md/raid5: remove rcu protection to access rdev from conf") Assisted-by: LLM Signed-off-by: Sang-Hoon Choi Link: https://patch.msgid.link/179070265341.12871.12495446593114993799.idr-bug-88@gmail.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit e36d7e85cd65a89c2dda97d62c96b9c17c2d79b4 Author: Cristian Ciocaltea Date: Tue Sep 1 22:55:14 2026 +0300 phy: rockchip: samsung-hdptx: Handle PHY config after module reload [ Upstream commit a673b3d18e37e573d52bf41c47e75d46982f2fae ] The pll_config_dirty mechanism introduced in commit aec3e4ce25da ("phy: rockchip: samsung-hdptx: Handle uncommitted PHY config changes") invalidates the clock rate in determine_rate() by resetting req->rate to zero, ensuring CCF will invoke set_rate() to program pending PLL configuration changes into hardware. However, after a module reload cycle the PHY PLL clock gets re-registered with CCF, which causes the framework's cached rate to also be zero. Setting req->rate to zero then has no effect, since CCF sees no difference between the requested and current rates and skips calling set_rate(), leaving the PLL unconfigured. Address this by first computing the actual target rate from the HDMI link configuration, and only then invalidating it when it matches the CCF cached rate. Fixes: aec3e4ce25da ("phy: rockchip: samsung-hdptx: Handle uncommitted PHY config changes") Signed-off-by: Cristian Ciocaltea Link: https://patch.msgid.link/20260901-hdptx-ffe-v2-2-3a5922c76fc5@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 3db36f06fd1e7caa79cd456f1bb4b00073537265 Author: Linkai Gong Date: Mon Sep 7 10:22:14 2026 +0800 clk: imx: composite-93: return timeout from gate enable [ Upstream commit 246d9fa6b83d2d3c524aad28de1ab5db5cecf048 ] imx93_clk_composite_wait_ready() already reports a busy timeout, but imx93_clk_composite_gate_enable() ignores that and always returns 0. The clk framework then marks the clock enabled and lets consumers run while the CCM slice is still busy. Propagate the timeout so enable fails instead of looking successful. Fixes: 4a3de5aa7743 ("clk: imx: clk-composite-93: check slice busy") Signed-off-by: Linkai Gong Reviewed-by: Peng Fan Reviewed-by: Frank Li Link: https://patch.msgid.link/20260907022214.1076402-1-gonglinkai@kylinos.cn Signed-off-by: Abel Vesa Signed-off-by: Sasha Levin commit c1f1904ee84e95cd2d28475d0f30b0dfdf5620ac Author: Li Youhong Date: Tue Sep 29 16:39:16 2026 +0800 md/raid5: drain released_stripes before destroying the cache [ Upstream commit af560e357a81964544be40c549e241b032ef7565 ] grow_one_stripe() calls raid5_release_stripe() for each new stripe. When mddev->thread is already set, that queues the stripe on conf->released_stripes and wakes the thread. Only raid5d moves that list onto inactive_list. Takeover calls setup_conf() while mddev->thread still belongs to the previous personality, so those stripes stay on released_stripes. If setup_conf() then fails, shrink_stripes() only frees inactive_list and kmem_cache_destroy() warns that objects remain. Move stripes still queued on released_stripes onto inactive_list before shrink_stripes() frees them. Fixes: 773ca82fa1ee ("raid5: make release_stripe lockless") Reported-by: syzbot+6a132745caefcf42cb0d@syzkaller.appspotmail.com Closes: https://lore.kernel.org/linux-raid/6ab6b743.7eec07f4.c25c.0006.GAE@google.com/T/#t Signed-off-by: Li Youhong Link: https://patch.msgid.link/20260929083916.50620-1-dayou5941@163.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 28024177d04a3a76e193fbfb1abf064ad7b49d0a Author: Nguyen Ngoc Thang Date: Fri Sep 25 00:13:45 2026 +0700 md: take reconfig_mutex when enabling PPL on an inactive array [ Upstream commit 900bf42e0ff8009f66ffd4a679c56264957019dd ] consistency_policy_store() sets MD_HAS_PPL for an external-metadata array that is not running yet, without holding reconfig_mutex. But ->pers is only assigned after pers->run() returns, so "not running" also covers an md_run() that is in progress under the lock. If the write lands inside raid5_run() after log_init() has decided not to set up PPL, or after a failed ppl_init_log() has cleared the flag, the flag ends up set with conf->log_private still NULL. The next idle pass of raid5d() then does: raid5d() -> handle_active_stripes() -> log_flush_stripe_to_raid() -> ppl_write_stripe_run() and dereferences the NULL ppl_conf: Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002 KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] RIP: 0010:ppl_write_stripe_run+0x60/0x1320 drivers/md/raid5-ppl.c:538 Take reconfig_mutex around the update and refuse it with -EBUSY once the array is running, in which case ->change_consistency_policy() is the right interface. Fixes: 664aed04446c ("md: add sysfs entries for PPL") Reported-by: syzbot+75d7e96ad03ac2dbbd9f@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=75d7e96ad03ac2dbbd9f Signed-off-by: Nguyen Ngoc Thang Link: https://patch.msgid.link/20260924171345.75894-1-ngocthang2710.1999@gmail.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 026a62414f0c82cf89eec37e5961eaf042c9e7aa Author: Shawn Lin Date: Mon Aug 31 14:36:44 2026 +0800 phy: rockchip: naneng-combphy: Fix TX detect RX termination errata [ Upstream commit d68e47a06c5cdc90cbd29ce2e74fa61eab5d47cc ] Some PHY revisions may fail to detect the peer RX's termination resistor (RTERM) under certain critical temperature conditions. This causes TX detection failures on PCIe links. Add a workaround to force the RTERM detection ready signal for affected PHY revisions. This ensures reliable TX-to-RX termination detection across all operating temperature ranges. The fix applies to RK3562, RK3568, RK3576 and RK3588 SoCs which share the same PHY IP with this hardware errata. Fixes: 7160820d742a ("phy: rockchip: add naneng combo phy for RK3568") Fixes: f13bff25161b ("phy: rockchip-naneng-combo: Support rk3562") Fixes: ba8ad7eece66 ("phy: rockchip-naneng-combo: add rk3576 support") Fixes: a03c44277253 ("phy: rockchip: Add naneng combo phy support for RK3588") Signed-off-by: Shawn Lin Link: https://patch.msgid.link/1788158204-161347-1-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit f6b145b55df192f5b5b71cc60a037f1b06c53951 Author: David Carlier Date: Tue Aug 25 23:57:29 2026 +0100 phy: qcom: qmp-pcie: Check clock-output-names count in the multi-PHY driver [ Upstream commit fb0f0e0e9e5dace7a6d9cde289537980ad35db3d ] of_property_count_strings() returns a negative errno when the property is missing or malformed. The value was passed straight to devm_kcalloc(), whose overflow check rejected it, turning a device tree problem into a bogus -ENOMEM with no diagnostic. Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver") Signed-off-by: David Carlier Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260825225729.230493-2-devnexen@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit d45784b6d57d6a5351ef6e602b5b2b65b8fc0f09 Author: Krishna Chaitanya Chundru Date: Mon Sep 21 11:07:13 2026 +0530 phy: qcom: qmp-pcie: Refactor common multiphy handling [ Upstream commit 6dd77bf6a10d0eb9ed17f5b6093b3511052084db ] Reuse the existing port resource arrays for Glymur register regions, power domains, and NOCSR resets instead of maintaining duplicate Glymur-specific lists. Attach each PHY instance's power domains to the device created for that PHY. This ensures that the associated GDSCs are managed with the lifetime of the individual PHY device rather than the parent multiphy platform device. Validate the clock-output-names property before using its count for allocation, and use a generic module description. Signed-off-by: Krishna Chaitanya Chundru Reviewed-by: Manivannan Sadhasivam Reviewed-by: Shawn Guo Tested-by: Shawn Guo Tested-by: Qiang Yu Link: https://patch.msgid.link/20260921-nord-v4-5-ed05c6e09240@oss.qualcomm.com Signed-off-by: Vinod Koul Stable-dep-of: fb0f0e0e9e5d ("phy: qcom: qmp-pcie: Check clock-output-names count in the multi-PHY driver") Signed-off-by: Sasha Levin commit 1f38490bd0442936d8639a58d2baf4d4e7f18a54 Author: David Carlier Date: Tue Aug 25 23:57:28 2026 +0100 phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver [ Upstream commit 77a0e6ae5dec54fb6049e3ab88288bc40c81f9fd ] The driver reads the active link mode through syscon_regmap_lookup_by_phandle_args(). Without CONFIG_MFD_SYSCON the stub returning -ENOTSUPP is compiled in instead, so probe fails for every device and no PHY is ever registered. Nothing in the build catches this: the driver still compiles, and arm64 defconfig happens to enable MFD_SYSCON through an unrelated select. Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver") Signed-off-by: David Carlier Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260825225729.230493-1-devnexen@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 6436877fbdfc88a246eb9b0bfccb429da4ec5444 Author: Bruno Banelli Date: Tue Aug 25 08:50:06 2026 +0200 phy: spacemit: fix K1 USB 2.0 PHY Kconfig dependencies [ Upstream commit 882af55e42a4cd5bd61db0244c0b78941884518a ] phy-k1-usb2.c maps its registers with devm_platform_ioremap_resource() and wraps them with devm_regmap_init_mmio(), but PHY_SPACEMIT_K1_USB2 neither depends on HAS_IOMEM nor selects REGMAP_MMIO. REGMAP_MMIO has no prompt and can only be enabled by select, so a configuration that leaves it off fails to link. In practice the symbol is usually pulled in indirectly, which is why this has gone unnoticed. PHY_SPACEMIT_K1_PCIE, directly above it in the same file, already has the HAS_IOMEM dependency; without it PHY_SPACEMIT_K1_USB2 can be built under COMPILE_TEST on architectures that provide no I/O memory. Fixes: fe4bc1a08638 ("phy: spacemit: support K1 USB2.0 PHY controller") Signed-off-by: Bruno Banelli Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260825065007.69353-2-bbanelli@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 39c57293dd32905523b39c496d9f10d5a971730d Author: Jason Yang Date: Fri Aug 21 19:44:19 2026 +0800 phy: rockchip-samsung-dcphy: Enable runtime PM at PHY core level [ Upstream commit 261e84f9278f4373970471ad71479df20d82ed4c ] phy_create() only enables runtime PM on the new PHY device if the parent already has it enabled, and this driver enables it afterwards. The PHY device therefore never gets runtime PM, and phy_pm_runtime_get_sync() returns -ENOTSUPP for every phy_init() and phy_power_on(). The block is still resumed today, but only through the supplier link fw_devlink builds from the phys phandle, which fw_devlink=off and =permissive do not. Move devm_pm_runtime_enable() before devm_phy_create(), as done for the sibling HDPTX PHY in commit 10ba8479f460 ("phy: phy-rockchip-samsung-hdptx: Enable runtime PM at PHY core level"). Fixes: b2a1a2ae7818 ("phy: rockchip: Add Samsung MIPI D-/C-PHY driver") Signed-off-by: Jason Yang Reviewed-by: Heiko Stuebner Reviewed-by: Sebastian Reichel Link: https://patch.msgid.link/20260821-dcphy-rpm-v1-v1-1-a7db728b2539@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 0663d3ff1848000ee194800ecf5ab35304c0645c Author: Laurence Oberman Date: Tue Sep 29 15:28:19 2026 -0400 scsi: st: Record the tape position after a successful MTLOAD [ Upstream commit 54ee0ee9bdeb7e9d3b70cc5c2bdf7e58c4423e8d ] Commit 0b120edb37dc ("scsi: st: Add MTIOCGET and MTLOAD to ioctls allowed after device reset") allows MTLOAD to clear the reset condition because the tape location is known after MTLOAD. But the driver does not record it: reset_state() sets the file and block numbers to -1, and do_load_unload() leaves them there. check_tape() sets them to 0 only for a new session, which requires a new-medium unit attention. Drives that do not report one when the medium was already loaded (seen with IBM LTO drives) keep reporting file/block -1 in MTIOCGET and no BOT, although the tape is at the beginning. After a successful load, reset the partition and the state of all partitions, as the new-session path in check_tape() does: partition 0, position at BOT, EOF state cleared and no pending write. Otherwise the driver may still record the previous partition, so that a later MTSETPART to that partition is not performed; a read after loading at EOD fails with EIO; and a partition left in the ST_WRITING state by a partition switch in read() or write() makes st_flush() write a filemark at the beginning of partition 0 when the device is closed. Fixes: 0b120edb37dc ("scsi: st: Add MTIOCGET and MTLOAD to ioctls allowed after device reset") Suggested-by: Kai Mäkisara Assisted-by: Claude sashiko Signed-off-by: Laurence Oberman Reviewed-by: Kai Mäkisara Link: https://patch.msgid.link/20260929192821.997675-3-loberman@redhat.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 0bb62dc4316d29e39df5953ff12facd2dcd6f84b Author: Laurence Oberman Date: Tue Sep 29 15:28:18 2026 -0400 scsi: st: Restore changed drive settings after reset also for MTLOAD and MTRETEN [ Upstream commit 8d1cc285194dbcba88c136e1ff7c25cb10e38a5b ] A device reset returns the drive's density and block size to their defaults. Commit 7081dc75df79 ("scsi: st: Restore some drive settings after reset") re-applies values changed by the user when the position is recovered with MTREW, MTSEEK or MTEOM. MTLOAD and MTRETEN are also allowed to clear the reset condition and also leave the same medium at BOT, but they restore nothing. Because check_tape() reads the drive's block size with MODE SENSE on every open, the driver silently switches to the drive default after the reset. An application that set fixed-block mode with MTSETBLK and recovers with MTLOAD or MTRETEN keeps writing, but variable-length blocks, without any error. Restore the changed density and block size for MTLOAD and MTRETEN as well. Both operations may make the drive report a new medium, and the new session started by check_tape() clears the "changed" flags and applies the mode defaults. So save the values before the operation, let check_tape() run first (do_load_unload() already calls it for MTLOAD; call it after MTRETEN), and then re-apply them. Retry the restore once in case a unit attention is still pending. Only restore when the drive is ready after the operation: with an immediate-mode load and O_NONBLOCK, check_tape() does not wait and the drive may still be loading. In immediate mode (MT_ST_NOWAIT) MTRETEN may return before the retension has finished; do not wait for it there. MTOFFL is not changed: the medium is unloaded and a different one may be loaded next, for which the mode defaults apply. Reproduced with scsi_debug (which reports a new medium after MTRETEN and MTLOAD) and with IBM LTO drives on FC (which do not). Fixes: 7081dc75df79 ("scsi: st: Restore some drive settings after reset") Assisted-by: Claude sashiko Signed-off-by: Laurence Oberman Reviewed-by: Kai Mäkisara Link: https://patch.msgid.link/20260929192821.997675-2-loberman@redhat.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 678e14a050d2b2442f0c7bb4770e24384aae7dd3 Author: Niklas Cassel Date: Tue Sep 29 10:25:10 2026 +0200 scsi: scsi_debug: Validate the access parameters of WRITE ATOMIC (16) [ Upstream commit a6c339feb830daa097ccc4c50c339c1733c12d42 ] resp_atomic_write() validates the fields that are specific to an atomic write, but never the range that the command addresses. Every other command that writes user data calls check_device_access_params() first, which rejects a transfer that ends beyond the capacity of the device, one whose length exceeds the size of the store, and any write to a write protected device. Call check_device_access_params(). The zone checks that it ends with are unreachable, as atomic writes and ZBC emulation are mutually exclusive. Assisted-by: LLM Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support") Reviewed-by: Damien Le Moal Reviewed-by: John Garry Signed-off-by: Niklas Cassel Link: https://patch.msgid.link/20260929082456.857423-28-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 98978d9469cd98d4ac9d5d070455aadd66d63a02 Author: Niklas Cassel Date: Tue Sep 29 10:25:09 2026 +0200 scsi: scsi_debug: Map the region written by WRITE ATOMIC (16) [ Upstream commit 491bd55c35cbb1ce059f22e7f3c6284551970fef ] When logical block provisioning is enabled, every command that writes user data calls map_region() so that GET LBA STATUS reports the region as mapped. resp_atomic_write() does not, so GET LBA STATUS keeps reporting a region as deallocated after a WRITE ATOMIC (16) has written it. Call map_region() the way resp_write_dt0() does, holding the zone metadata write lock across the access. That lock is what serialises the map against resp_unmap(), which does nothing unless logical block provisioning is enabled. Assisted-by: LLM Reviewed-by: Damien Le Moal Reviewed-by: John Garry Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support") Signed-off-by: Niklas Cassel Link: https://patch.msgid.link/20260929082456.857423-27-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit df23d3d2a9c7daf1deb07f1fe8768886a3f7f6f7 Author: Niklas Cassel Date: Tue Sep 29 10:25:08 2026 +0200 scsi: scsi_debug: Refuse a short WRITE ATOMIC (16) before writing it [ Upstream commit b81608b17c5d04c797e6fc1cfb95182c842a4db9 ] A write whose data-out buffer is shorter than its transfer length is short. An ordinary write transfers what the buffer holds and reports the rest as a residual, but an atomic write cannot be short: SBC-6 r02 (T10/BSR INCITS 587), 4.28.1, requires each atomic write operation to write either all of its data or none of it, and 4.28.2 requires one that cannot complete to leave the LBAs that it specifies unaltered. resp_atomic_write() does fail a short WRITE ATOMIC (16) with DID_ERROR, but only after do_device_access() has returned, and do_device_access() copies one logical block at a time, so by then the blocks that the buffer did hold have been written. An eight block WRITE ATOMIC (16) with a buffer of four fails having overwritten the first four. Check the length of the buffer before writing anything, and fail the command with the same DID_ERROR as before. Assisted-by: LLM Reviewed-by: Damien Le Moal Reviewed-by: John Garry Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support") Signed-off-by: Niklas Cassel Link: https://patch.msgid.link/20260929082456.857423-26-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit dd6324c275d916dcd63e434359a4e9b563a93b10 Author: Niklas Cassel Date: Tue Sep 29 10:25:07 2026 +0200 scsi: scsi_debug: Advance the write pointer over the data written [ Upstream commit cb2d2a7c80c62d1e5e476609706f29dd9584d0e0 ] resp_write_dt0() and resp_write_scat() advance the write pointer of a sequential write required zone by the transfer length of the command without looking at what do_device_access() returned, which is -1 when the data direction of the command does not match the operation, and a short byte count when the data-out buffer is smaller than the transfer length. An initiator can produce both with SG_IO. The zone then describes more data than is on the medium, and a write at the position where the data really ends is terminated with UNALIGNED WRITE COMMAND, so the zone has to be reset before it can be written to again. Advance the write pointer over the data that was written instead. As do_device_access() does not write a partial physical block to such a zone, that leaves the write pointer where a write can end. Assisted-by: LLM Reviewed-by: Damien Le Moal Fixes: f0d1cf9378bd ("scsi: scsi_debug: Add ZBC zone commands") Signed-off-by: Niklas Cassel Link: https://patch.msgid.link/20260929082456.857423-25-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 7da15a0a9d92beb401cf2b74921b9466eedef9f9 Author: Niklas Cassel Date: Tue Sep 29 10:25:05 2026 +0200 scsi: scsi_debug: Enforce physical block alignment of zoned writes [ Upstream commit 63cb3900be261fccc05cadcf3402058418a5fada ] ZBC-3 r06 (T10/BSR INCITS 579), 4.5.3.3.2, requires a write to a sequential write required zone to be terminated with ILLEGAL REQUEST / UNALIGNED WRITE COMMAND both when it does not start at the write pointer and when it does not end on a physical block boundary. That is why sd_zbc_read_zones() sets the zone_write_granularity queue limit to the physical block size of a host-managed device. check_zbc_access_params() implements the first condition but not the second. So with zbc=managed sector_size=512 physblk_exp=3, a write of a single logical block at the write pointer is accepted and advances the write pointer by one logical block, leaving it off the granularity that was advertised: nothing can write at it any more, and the zone can only be used again after being reset. Check the ending LBA as well, with the same sense data, as the standard gives both conditions the same. An entire medium write same command, which the standard excludes, needs no special case: the preceding check already terminates it with WRITE BOUNDARY VIOLATION. Sequential write preferred zones are left alone, as writes to them need not be sequential, and with the default physblk_exp=0 the check is a no-op. Assisted-by: LLM Fixes: f0d1cf9378bd ("scsi: scsi_debug: Add ZBC zone commands") Reviewed-by: Damien Le Moal Signed-off-by: Niklas Cassel Link: https://patch.msgid.link/20260929082456.857423-23-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit ddfaa50d6a4821b9f40453f1aff62eb56ade4bad Author: Damien Le Moal Date: Tue Sep 8 18:02:59 2026 +0900 scsi: scsi_debug: Use combined sense codes [ Upstream commit 1b7ea7bb198e73a5237d3799187e46fe2b818ef5 ] Refactor the scsi_debug driver to replace hard-coded additional sense codes and additional sense code qualifiers with the enum values defined in include/scsi/scsi_sense.h. This helps with code clarity as the sense codes being processed are easier to test and self-documented. The functions mk_sense_buffer() and mk_sense_info_tape() are modified to take a 16-bit sense code as argument. No functional change intended. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20260908090308.1085097-32-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Stable-dep-of: 63cb3900be26 ("scsi: scsi_debug: Enforce physical block alignment of zoned writes") Signed-off-by: Sasha Levin commit 5613250b0a36a89d0b993b4143219a3388e04871 Author: Damien Le Moal Date: Tue Sep 8 18:02:33 2026 +0900 scsi: core: Prepare for using combined sense codes [ Upstream commit ec5562d3ea803ec45831477129c626b2a22d2e2c ] In preparation for handling sense codes and their qualifers as a single 16-bit sense code field, with the values defined as macros in include/scsi/scsi_sense.h, modify the definition of the structures scsi_failure and scsi_sense_hdr to introduce a 16-bit sense_code field as a union with the existing 8-bit asc and ascq fields. This temporary modification allows accessing either the asc and ascq fields individually, or their combination as the 16-bit sense_code field. The helper functions scsi_sense_asc(), scsi_sense_ascq() are defined to allow accessing the 8-bit ASC and ASCQ values from the sense_code filed of struct scsi_sense_hdr. The helper functions scsi_failure_asc() and scsi_failure_ascq() provide the same for the sense code field of struct scsi_failure. The helper functions scsi_set_sense_buffer() and scsi_set_sense() are also added to wrap calls to scsi_build_sense_buffer() and scsi_build_sense() using a 16-bit sense code argument instead of the 8-bit ASC and ASCQ arguments. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20260908090308.1085097-6-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Stable-dep-of: 63cb3900be26 ("scsi: scsi_debug: Enforce physical block alignment of zoned writes") Signed-off-by: Sasha Levin commit 750125dd732b535ae5d8f58a338c92cbef622ea9 Author: Damien Le Moal Date: Tue Sep 8 18:02:32 2026 +0900 scsi: core: Rename sense field of struct scsi_failure [ Upstream commit 45cdf8164237277e52af5d8aa4218c3cb6199bf2 ] Rename the sense field of struct scsi_failure to sense_key. This makes it clear that this field stores the sense key, and also unifies this structure field names with the names used in struct scsi_sense_hdr. To be consistent with this change, the macro SCMD_FAILURE_SENSE_ANY is renamed SCMD_FAILURE_SENSE_KEY_ANY. Of note is that the definition of the array any_sense_failure_defs in scsi_lib_test_any_sense() is modified to change the initialization of the result field to use SCMD_FAILURE_RESULT_ANY and add the .sense_key field initialization to SCMD_FAILURE_SENSE_KEY_ANY to match the test target case. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20260908090308.1085097-5-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Stable-dep-of: 63cb3900be26 ("scsi: scsi_debug: Enforce physical block alignment of zoned writes") Signed-off-by: Sasha Levin commit ee61e3b14179676125f0538a73443793a2bfe31b Author: Damien Le Moal Date: Tue Sep 8 18:02:29 2026 +0900 scsi: core: Define all additional sense codes and their qualifiers [ Upstream commit 72c54bd0cbb2e0c35f4acd056e91c596469edc5f ] Introduce the file include/scsi/scsi_sense.h to define all existing additional sense codes and their combinations with additional sense code qualifiers, according to the most current T10 list available at https://www.t10.org/lists/asc-num.txt. Additional sense codes (ASCs) are individually defined as an 8-bit value with the ASC_ name prefix. The combination of all ASCs with T10 defined possible code qualifiers are defined as 16-bit values without any name prefix. The 16-bit value for ASCs with a zero ASCQ are defined together with the ASC 8-code using the ASC() macro. For names that may potentially create conflicts with other subsystems (e.g. WARNING or WRITE_ERROR), the SSC_ prefix is added to the sense code name. The sense key macro definitions in include/scsi/scsi_proto.h are also moved into this new file and scsi_sense.h is included in scsi_proto.h. The helper function scsi_sense_code() is defined to facilitate generating a 16-bit sense code from the 8-bit ASC and ASCQ. The accessors scsi_sense_code_asc() and scsi_sense_code_ascq() are defined for the reverse operations, that is, to respectively extract an ASC and an ASCQ from a 16-bit sense code. Signed-off-by: Damien Le Moal Reviewed-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke Link: https://patch.msgid.link/20260908090308.1085097-2-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Stable-dep-of: 63cb3900be26 ("scsi: scsi_debug: Enforce physical block alignment of zoned writes") Signed-off-by: Sasha Levin commit 2ac0242057476865feebf1f864ad96af79b57f29 Author: Niklas Cassel Date: Tue Sep 29 10:25:03 2026 +0200 scsi: scsi_debug: Avoid 32-bit overflow in WRITE SCATTERED offsets [ Upstream commit 92feb036a2d33c7b78b8daa2384f5c70d6679a91 ] resp_write_scat() computes the length of an LBA range in bytes as a 32-bit product, num_by = num * lb_size, and adds it to sg_off, the 32-bit offset of the next range in the data-out buffer. The product wraps for a range of 4 GiB or more, which check_device_access_params() allows once the store is that large, and sg_off wraps once the ranges add up to 4 GiB, which neither their number nor their overlap prevents. The ranges that follow are then written from the wrong offset in the buffer. Make num_by and sg_off 64-bit, and pass do_device_access() sg_off capped at the length of the buffer. An offset at the end of the buffer copies nothing, and sg_copy_buffer(), which takes it as an off_t, is never given one larger than the buffer that it copies. Assisted-by: LLM Fixes: 481b5e5c7949 ("scsi: scsi_debug: add resp_write_scat function") Signed-off-by: Niklas Cassel Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/20260929082456.857423-21-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 326123fcbda92a1e1abd61da524e2b9bd4b58259 Author: Niklas Cassel Date: Tue Sep 29 10:25:01 2026 +0200 scsi: scsi_debug: Take the zone metadata lock before the data lock [ Upstream commit c9aedbcbff0fe31fabdea09600609eb30e05441d ] resp_comp_write() takes the data lock and then the zone metadata lock, while every other command that takes both takes the metadata lock first and reaches the data lock through do_device_access(). A COMPARE AND WRITE and any other write to the same store can therefore deadlock each other. Take the locks in the same order as everywhere else. Correct the comment above map_region() while here: the provisioning map is covered by the metadata lock rather than the data lock, which is why resp_unmap() takes only the metadata lock. Assisted-by: LLM Fixes: 84f3a3c01d70 ("scsi: scsi_debug: Atomic write support") Reviewed-by: Damien Le Moal Signed-off-by: Niklas Cassel Link: https://patch.msgid.link/20260929082456.857423-19-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 23b4d2211d2c56c138c09f21e941c7ff2546162d Author: Niklas Cassel Date: Tue Sep 29 10:25:00 2026 +0200 scsi: scsi_debug: Refuse a negative physblk_exp [ Upstream commit a349876633f7a583429367daf16f9a4282118255 ] sdebug_init() refuses a physblk_exp above 15, but the parameter is a signed int, so a negative value is accepted. The driver then shifts by it when it builds the Block Limits VPD page, which is undefined behaviour, and READ CAPACITY (16) reports an exponent of 15 for -1. Refuse a negative value as well, and print it as a signed value. Assisted-by: LLM Fixes: ea61fca58c13 ("scsi_debug: Add support for physical block exponent and alignment") Signed-off-by: Niklas Cassel Reviewed-by: Damien Le Moal Link: https://patch.msgid.link/20260929082456.857423-18-cassel@kernel.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit fd7fef87517f757d90e3d3d667584f621c94fc32 Author: Sebastian Reichel Date: Tue Sep 15 17:06:14 2026 +0200 phy: rockchip: usbdp: Only enable USB3 when not in high-speed mode [ Upstream commit fbbf6c85b08008bf68ef49931175edeaa36ba82f ] Ensure that USB3 mode is not accidently enabled during PHY re-init for systems that are configured as high-speed only via DT. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://sashiko.dev/#/message/20260626212424.C215E1F000E9%40smtp.kernel.org Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-11-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit f001b4d3917fefaaa5aa1344061466580267bcc5 Author: Sebastian Reichel Date: Tue Sep 15 17:06:13 2026 +0200 phy: rockchip: usbdp: Handle rk_udphy_reset_deassert errors [ Upstream commit 35101e2f49c04bf1cfc69b8a0d3f85c742369ccc ] Handle rk_udphy_reset_deassert returning errors to avoid theoretical (Rockchip reset controller driver does not return errors) SError. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://sashiko.dev/#/message/20260626211151.2332F1F000E9%40smtp.kernel.org Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-10-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 93a4209b472a359d860e2d20964b7701ef2d623a Author: Sebastian Reichel Date: Tue Sep 15 17:06:12 2026 +0200 phy: rockchip: usbdp: Avoid xHCI SErrors [ Upstream commit cf3aa34e6f0798544c26ad93a6c3c2231ab09738 ] The USBDP PHY provides the PIPE clock to the USB3 controller, which means the PHY must be fully running when anything tries to access the xHCI registers. When switching between USB3-only, USB3 + DP and DP-only mode, the PHY must be re-initialized resulting in a short period of the PHY being disabled. If the DWC3 driver decides to access the xHCI at this point the system will fail with an SError. This patch avoids the problems by disabling the USB3 port before re-initializing it. This does a couple of things: - forces phystatus to 0 from GRF (not from PHY) - switches PIPE clock source from PHY to UTMI (safe fallback clock) - num_u3_port=0 The last part will be ignored, as DWC3 already probed, but the clock re-routing will avoid the SError. There is a small delay afterwards to make sure the mux happened. The datasheet gives no hints how long it takes, so delay time is a guess. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-9-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 043648faf553a72841ec5ae46d8d4d6cd0c3a840 Author: Sebastian Reichel Date: Tue Sep 15 17:06:05 2026 +0200 phy: rockchip: usbdp: Rename mode_change to phy_needs_reinit [ Upstream commit fbce9cc28cadb24026a6c061819d42e50d3bfea0 ] Right now the mode_change property is set whenever the mode changes between USB-only, DP-only and USB-DP. It is needed, because on any mode change the PHY needs to be re-initialized. Apparently at least DP also requires a re-init when the cable orientation is changed, which is currently not being done (except when the orientation switch also involves a mode change). Prepare for this by renaming mode_change to phy_needs_reinit. Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-2-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul Stable-dep-of: cf3aa34e6f07 ("phy: rockchip: usbdp: Avoid xHCI SErrors") Signed-off-by: Sasha Levin commit 50adac51b3f9c0cc9fc21077c23fb57dfbb53ac1 Author: Sebastian Reichel Date: Tue Sep 15 17:06:10 2026 +0200 phy: rockchip: usbdp: Hold mutex in DP PHY configure [ Upstream commit 619233ce6b2329529c9f0ff9682d6e22d160ebd6 ] rk_udphy_dp_phy_configure() accesses some variables from the struct rk_udphy, which are updated independently from the USB-C framework. The USB-C mux/orientation switch functions already hold a mutex to ensure mutual exclusive access to the struct rk_udphy states, so simply hold the same one in the DP PHY configuration function. Reproducing problems due to this on real hardware would be really hard, but could be possible when quickly re-connecting the USB-C connector. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://lore.kernel.org/linux-phy/20260612164627.23D391F000E9@smtp.kernel.org/ Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-7-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 993bc3d6961a4d411e9b54482b7a13b15b34aed3 Author: Sebastian Reichel Date: Tue Sep 15 17:06:08 2026 +0200 phy: rockchip: usbdp: Properly handle TYPEC_STATE_SAFE and TYPEC_STATE_USB [ Upstream commit b1ca8de219ae6e4d9eec22acfbe4357d8addd94c ] Handle TYPEC_STATE_SAFE and TYPEC_STATE_USB Type-C state events, so that the muxing is properly updated when exiting DP AltMode. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://sashiko.dev/#/message/20260619155020.CC7361F000E9%40smtp.kernel.org Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-5-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 29005642b5849d01f4e0a9c627e9c18fb2ef8776 Author: Sebastian Reichel Date: Tue Sep 15 17:06:04 2026 +0200 phy: rockchip: usbdp: Drop DP HPD handling [ Upstream commit 4fd2c13cbb11f5483a43cc789cb8de1c3bd23238 ] Drop the HPD handling logic from the USBDP PHY. The registers involved require the display controller power domain being enabled and thus the HPD signal should be handled by the displayport controller itself. Apart from that the HPD handling as it is done here is incorrect and misses hotplug events happening after the USB-C connector (e.g. when a USB-C to HDMI adapter is involved and the HDMI cable is replugged). Proper USB-C DP HPD support requires some restructuring of the DP controller driver, which will happen independent of this patch. The mainline kernel does not yet support USB-C DP AltMode on RK3588 and RK3576, so it is fine to drop this code without adding the counterpart in the DRM in an atomic change. Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-part2-v15-1-8d507cb1174f@collabora.com Signed-off-by: Vinod Koul Stable-dep-of: b1ca8de219ae ("phy: rockchip: usbdp: Properly handle TYPEC_STATE_SAFE and TYPEC_STATE_USB") Signed-off-by: Sasha Levin commit c6b6f3694ec6911bbd92a46b50a74a6ef3077ee2 Author: Zhang Yubing Date: Tue Sep 15 15:49:58 2026 +0200 phy: rockchip: usbdp: Support single-lane DP [ Upstream commit ae9b60ef1d626d1a4fdf8854f66d58f6ac56e37d ] Implement support for using just a single DisplayPort line. Signed-off-by: Zhang Yubing Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-11-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Stable-dep-of: b1ca8de219ae ("phy: rockchip: usbdp: Properly handle TYPEC_STATE_SAFE and TYPEC_STATE_USB") Signed-off-by: Sasha Levin commit 2e8aa152b3c04774d16594a574d0a7e91ec74e64 Author: Sebastian Reichel Date: Tue Sep 15 15:49:57 2026 +0200 phy: rockchip: usbdp: Add missing mode_change update [ Upstream commit 5def5d61ea5ac6f391364f6fdcff13a27a52026e ] rk_udphy_set_typec_default_mapping() updates the available modes, but does not set the mode_change as required. This results in missing re-initialization and thus non-working DisplayPort. Fix this issue by introducing a new helper to update the available modes. Reviewed-by: Neil Armstrong Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-10-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Stable-dep-of: b1ca8de219ae ("phy: rockchip: usbdp: Properly handle TYPEC_STATE_SAFE and TYPEC_STATE_USB") Signed-off-by: Sasha Levin commit 853a2aa289979ea9cb782d3ec368991be9265779 Author: Sebastian Reichel Date: Tue Sep 15 15:49:59 2026 +0200 phy: rockchip: usbdp: Limit DP lane count to muxed lanes [ Upstream commit 443997ca8d797375ff35e8f3ad3828799e88f71b ] In theory the DP controller could request 4 lanes when the PHY is restricted to 2 lanes as the other half is used by USB3. With the current user (DW-DP) this cannot happen, but as the check is cheap and users might change in the future protect things accordingly. Not doing so would corrupt USB3 usage by the following code configuring the voltages. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://lore.kernel.org/linux-phy/20260612165546.98E1F1F000E9@smtp.kernel.org/ Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/linux-phy/20260612165546.98E1F1F000E9@smtp.kernel.org/ Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-12-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit f79e313a80a29b76d5f1e6fb3e3f8c24f3b69fb7 Author: Sebastian Reichel Date: Tue Sep 15 15:49:53 2026 +0200 phy: rockchip: usbdp: Drop seamless DP takeover [ Upstream commit 1ab628ce8f3ab694c28dcfcd5b1eec0cf9f499b8 ] Right now the DRM drivers do not support seamless DP takeover and I'm I'm not aware of any bootloader implementing this feature either. In any case this feature would be limited to boards using the USBDP PHY for a DP or eDP connection instead of the more commonly USB-C connector. With USB-C's DP AltMode a seamless DP takeover requires handing over the state of the TCPM state machine from the bootloader to the kernel. This in turn requires a huge amount of work to keep the state machine implementations synchronized. It's very unlikely we will see somebody implementing that in the foreseeable future. As the current code is obviously buggy and untested, let's simply drop support for seamless DP takeover. It can be re-implemented cleanly once somebody adds all missing bits. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://lore.kernel.org/linux-phy/20260612164107.C7DB21F000E9@smtp.kernel.org/ Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-6-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 82aad27807815b70c3548873ce11678e19565b1d Author: Sebastian Reichel Date: Tue Sep 15 15:49:52 2026 +0200 phy: rockchip: usbdp: Handle missing clock-names DT property gracefully [ Upstream commit 17cd5e026a6e806b811f915b8e02a8b9d14f6f41 ] The rk_udphy_clk_init() function would currently try to do a strncmp for a NULL pointer, if DT specifies 'clocks' property, but no 'clock-names' property. Fix this by making sure the clock has an id string set. Note that DT binding requires setting clock-names, so this is only a problem when booting a non-compliant device tree. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://sashiko.dev/#/message/20260619154349.071321F000E9%40smtp.kernel.org Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-5-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 71ff15da83682419de2e601683c08a9d30e9b4b4 Author: Sebastian Reichel Date: Tue Sep 15 15:49:51 2026 +0200 phy: rockchip: usbdp: Fix devm_clk_bulk_get_all check [ Upstream commit a2ddfc60a7d3ba0f571f037371b261642f8ed208 ] If devm_clk_bulk_get_all() returns -EPROBE_DEFER, it is replaced with -ENODEV, permanently failing the driver probe instead of allowing it to defer. Avoid masking the error code to fix the issue. This effectively drops returning -ENODEV in case no clocks are being described in DT. This special case will now be handled by the follow-up check searching for "refclk" and exit with -EINVAL. None of this will be hit in practice, since the driver is only used by RK3588 and RK3576 - on these platforms the DT is validated to contain the clocks and the clock driver is force probed early. Thus there is no need to backport this. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://lore.kernel.org/linux-phy/20260612164107.C7DB21F000E9@smtp.kernel.org/ Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/linux-phy/20260612164107.C7DB21F000E9@smtp.kernel.org/ Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-4-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit f687c230cdbbb58c7f9e4f9f19c657d60558e908 Author: Sebastian Reichel Date: Tue Sep 15 15:49:50 2026 +0200 phy: rockchip: usbdp: Do not lose USB3 PHY status [ Upstream commit b322403c294b67fd6bcf6719b4fc9f8a9e313129 ] By default (i.e. without manually enabling runtime PM) DWC3 requests the USB3 PHY once and keeps it enabled all the time. When DisplayPort is being requested later on, a mode change is needed. This re-initializes the PHY. During re-initialization the status variable has incorrectly been cleared, which means the tracking information for USB3 is lost. This is not an immediate problem, since the DP side keeps the PHY enabled. But once DP is toggled off, the whole PHY will be disabled. This is a problem, because the USB side still needs it powered. Fix things by not clearing the status flags. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-3-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 12a7edf06284015b6e8b5187211c18508314097e Author: Sebastian Reichel Date: Tue Sep 15 15:49:49 2026 +0200 phy: rockchip: usbdp: Update mode_change after error handling [ Upstream commit 3f2181226d7708349c69cd4a4b21372a8049576b ] If rk_udphy_init() or rk_udphy_setup() fails, the reinit will not be tried again. Fix this by only updating the variable after all potential errors have been handled. Note, that no errors have been seen on real hardware and failures would most likely be fatal and require at least a full reboot as the function already asserts the PHY reset lines. So this is more of a theoretical issue. Fixes: 2f70bbddeb45 ("phy: rockchip: add usbdp combo phy driver") Reported-by: Sashiko Closes: https://lore.kernel.org/linux-phy/20260612163835.8D5471F000E9@smtp.kernel.org/ Tested-by: Igor Paunovic # Orange Pi 5 Plus Signed-off-by: Sebastian Reichel Reviewed-by: Manivannan Sadhasivam Link: https://lore.kernel.org/linux-phy/20260612163835.8D5471F000E9@smtp.kernel.org/ Link: https://patch.msgid.link/20260915-rockchip-usbdp-cleanup-v15-2-80e2c11d1ce8@collabora.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 76b5aafcc2bfcc16989f4b6b3f6f31153d20059b Author: Akash Sukhavasi Date: Wed Jul 8 16:31:00 2026 -0500 phy: HiSilicon: Fix error handling in hi3670_pcie_allclk_ctrl() [ Upstream commit 7540fc0a4f667b6773d10753a602a42a3113087b ] When hi3670_pcie_pll_ctrl() fails, hi3670_pcie_allclk_ctrl() returns -EINVAL directly, skipping the close_clocks cleanup path. This leaves the PLL with its power-down bit cleared. Use goto close_clocks instead, which disables the PLL and propagates the original error code from hi3670_pcie_pll_ctrl(). Found while investigating a Smatch warning. Fixes: 73075011ffff ("phy: HiSilicon: Add driver for Kirin 970 PCIe PHY") Signed-off-by: Akash Sukhavasi Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260708-b4-hi3670-v1-1-f9236f3e585c@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 2a2ee5765fa2780c2e338e260a7d7036458b9570 Author: Yuan Chen Date: Mon Sep 28 17:11:21 2026 +0800 bpf: Roll back freplace link state when bpf_arch_text_poke() fails [ Upstream commit 5ec398d9ec8fe13f8058af9a2e5f5e8f46e0a35a ] A freplace attach claims the target prog by bumping tgt_prog->aux->freplace_link_cnt and setting tr->extension_prog. bpf_arch_text_poke() then makes the extension take effect. If the poke fails, the claims are never released: the attach unwinds through bpf_link_cleanup(), which clears link->prog, so bpf_trampoline_unlink_prog() never runs. Drop the link count under ext_mutex on the error path, and set tr->extension_prog only after the poke succeeded. The count is still bumped before the poke: it blocks prog_array updates while the entry is patched. Fixes: d6083f040d5d ("bpf: Prevent tailcall infinite loop caused by freplace") Fixes: be8704ff07d2 ("bpf: Introduce dynamic program extensions") Suggested-by: Leon Hwang Signed-off-by: Yuan Chen Signed-off-by: Alexei Starovoitov Acked-by: Leon Hwang Link: https://patch.msgid.link/20260928091121.219333-1-chenyuan_fl@163.com Signed-off-by: Sasha Levin commit d2e0ceed22d69fd3fe4ebba0a72f365683b86262 Author: Yeoreum Yun Date: Sat Oct 3 03:52:17 2026 +0100 coresight: etm3x: fix inconsistencies with sysfs configuration [ Upstream commit 950cca5352b009dcf8ef0ca4a2fae850d26b552f ] The current ETM3x configuration via sysfs can lead to the following inconsistencies: - If a configuration is modified via sysfs while a perf session is active, the running configuration may differ between before a sched-out and after a subsequent sched-in. To resolve these issues, separate the configuration into: - curr_config: the configuration applied to the current session - config: the configuration set via sysfs Additionally: - Since curr_config and related fields are accessed only by the local CPU in etm_enable/disable_sysfs_smp_call() (similar to perf enable/disable), remove the lock/unlock from the sysfs enable/disable path and starting/dying_cpu path except when to access config fields only. - Some of sysfs interface read etm register directly. To reduce lock scope while the etm_enable_hw()/etm_disable_hw(), handle it via IPI so that registers could be read from on proper CPU. Fixes: 1925a470ce69 ("coresight: etm3x: splitting struct etm_drvdata") Tested-by: Leo Yan Reviewed-by: Mike Leach Signed-off-by: Yeoreum Yun Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20261003-separate_etm_cfg_v2-v13-5-5d8a29aead95@arm.com Signed-off-by: Sasha Levin commit ce45b731b9bc3cb231538db7f6d4e538c533770e Author: Yeoreum Yun Date: Sat Oct 3 03:52:15 2026 +0100 coresight: etm3x: Prohibit modifying cntr_val while session is enabled [ Upstream commit 88eaf963853d557957a9dcbff6b33d1626c91cb7 ] cntr_val are overwritten with the values read from the corresponding registers by etm_disable_hw() when the session is disabled. This means that any changes to this value made while the session is enabled would be lost when the session is disabled. Also, reset shouldn't be called while session is enabled. Therefore, prohibit modifying cntr_val and reset while the session is enabled. Reviewed-by: Mike Leach Tested-by: Leo Yan Signed-off-by: Yeoreum Yun Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20261003-separate_etm_cfg_v2-v13-3-5d8a29aead95@arm.com Stable-dep-of: 950cca5352b0 ("coresight: etm3x: fix inconsistencies with sysfs configuration") Signed-off-by: Sasha Levin commit ed194bc94edf5416da747354e0b073acd6fb1667 Author: Yeoreum Yun Date: Sat Oct 3 03:52:16 2026 +0100 coresight: etm4x: fix inconsistencies with sysfs configuration [ Upstream commit b2131cff722479bb4e6db3e4d5d8014421c6c97f ] The current ETM4x configuration via sysfs can lead to several inconsistencies: - If the configuration is modified via sysfs while a perf session is active, the running configuration may differ before a sched-out and after a subsequent sched-in. - If a perf session and a sysfs session enable tracing concurrently, the configuration from configfs may become corrupted. - There is a risk of corrupting drvdata->config if a perf session enables tracing while cscfg_csdev_disable_active_config() is being handled in etm4_disable_sysfs(). To resolve these issues, separate the configuration into: - curr_config: the configuration applied to the current session - config: the configuration set via sysfs Additionally: - Apply the configuration from configfs after taking the appropriate mode. - Since curr_config and related fields are accessed only by the local CPU in etm4_enable/disable_sysfs_smp_call() (similar to perf enable/disable), remove the lock/unlock from the sysfs enable/disable path and startup/dying_cpu except when to access config fields. As the curr_config is used for cfg-configfs, etmv4 doesn't need to set its lock for the cfg-configfs since the curr_config is proceted by cs_mode otherwise it would make a possible cpu-stall when it get interrupt while setting the sysfs configuration. Therefore, set the drv_spinlock for cfg-configfs as NULL and let the cfg-configfs disable irq without grap drv_spinlock when it is NULL. Fixes: 54ff892b76c6 ("coresight: etm4x: splitting struct etmv4_drvdata") Tested-by: Leo Yan Reviewed-by: Mike Leach Signed-off-by: Yeoreum Yun Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20261003-separate_etm_cfg_v2-v13-4-5d8a29aead95@arm.com Signed-off-by: Sasha Levin commit 14364ec4c7f56ad9ec71f5070b472512a4022247 Author: Yeoreum Yun Date: Sat Oct 3 03:52:14 2026 +0100 coresight: etm4x: prohibit modifying cntr_val while session is enabled [ Upstream commit 76b21c25a5f7701ded1386952bb37a29d3ab69c8 ] cntr_val is overwritten with the values read from the corresponding registers by etm4_disable_hw() when the session is disabled. This means that any changes to these values made while the session is enabled would be lost when the session is disabled. Therefore, prohibit modifying cntr_val while the session is enabled. Tested-by: Leo Yan Reviewed-by: Mike Leach Signed-off-by: Yeoreum Yun Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20261003-separate_etm_cfg_v2-v13-2-5d8a29aead95@arm.com Stable-dep-of: b2131cff7224 ("coresight: etm4x: fix inconsistencies with sysfs configuration") Signed-off-by: Sasha Levin commit 8ed077b1cc98f42b6225ea6cf9e792ae7374c9d2 Author: Yeoreum Yun Date: Sat Oct 3 03:52:13 2026 +0100 coresight: etm4x: Prohibit TRCSEQSTR modifications while tracing enabled [ Upstream commit a373952d86cf5d1efac5acff4f1d85fe66094d47 ] TRCSEQSTR can be changed by the ETM while a session is active. Its value therefore needs to be preserved when a sysfs session is disabled so that users can read the current sequence state after the session ends. This means that any changes made to TRCSEQSTR while the sysfs-session is active would be lost when the session is disabled. Copy the TRCSEQSTR value when disabling a sysfs session, and prohibit modifying seq_state while the session is active. Suggested-by: Mike Leach Reviewed-by: Mike Leach Signed-off-by: Yeoreum Yun Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20261003-separate_etm_cfg_v2-v13-1-5d8a29aead95@arm.com Stable-dep-of: b2131cff7224 ("coresight: etm4x: fix inconsistencies with sysfs configuration") Signed-off-by: Sasha Levin commit ca51da30cbbbf9a759415fb08bf69298d9ef0ba0 Author: Joonhoe Kim <26rote@gmail.com> Date: Fri Oct 2 22:06:56 2026 +0900 drm/msm/dpu: compute the CRTC bandwidth from the state being checked [ Upstream commit 480ba24aa34031c898d0a711405664cd947bbee4 ] _dpu_core_perf_calc_bw() is called with the new CRTC state but sums plane_fetch_bw over drm_atomic_crtc_for_each_plane(), i.e. the planes of the committed state. When the CRTC is re-enabled (DPMS on, system resume) the committed state has no planes attached, so the check computes bw_ctl = 0 and the display runs without an average bandwidth vote on the MDP path until some later commit changes a plane -- which may not happen for a long time on a static screen such as a lock screen. Seen on a Lenovo TB323FU (SM8850) through the interconnect and DPU tracepoints: after DPMS off/on or s2idle, dpu_perf_crtc_update reported bw_ctl=0 and qnm_mdp was left at avg_bw=0 (peak 800000) instead of the 3728793 kBps voted before, until the next mode change. Iterate the plane states of the CRTC state being checked instead. drm_atomic_crtc_state_for_each_plane_state() falls back to the current plane state for planes that are not part of the commit, so the result is unchanged for commits that do touch the planes. With this, bw_ctl is 3728793600 right after DPMS on and after resume. Only tested on this device. Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display") Assisted-by: LLM Signed-off-by: Joonhoe Kim <26rote@gmail.com> Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/757683/ Link: https://lore.kernel.org/r/20261002130656.50577-1-26rote@gmail.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin commit 12d0650b48ba281be654a56585736f57637b21d3 Author: Joonhoe Kim <26rote@gmail.com> Date: Fri Oct 2 22:07:12 2026 +0900 drm/msm/dpu: disable the slave encoder before the master [ Upstream commit 32d04280ddebb6eb964990931b0f1001f63b35e7 ] dpu_encoder_virt_atomic_disable() disables the physical encoders in phys_encs[] order, i.e. the master first. With a split display (two interfaces on one CTL, e.g. bonded DSI) the master's dpu_encoder_helper_phys_cleanup() then resets the shared CTL while the slave's timing engine is still running, and the source pipe is left stalled half-way through the slave's next frame. A power collapse of the MDSS core GDSC clears the stall, so it normally goes unnoticed. When MDSS stays powered across the disable (a full modeset, or an active DP controller), the next enable scans out nothing: black screen with the backlight on. Disable the slave before the master, as atomic_enable() enables them in that order. The slave's cleanup still resets the CTL while the master is running, but the last reset, from the master's cleanup, now happens with both timing engines stopped. Tested on a Lenovo Legion Tab Y700 gen 5 (SM8850, bonded DSI video-mode panel) with MDSS kept active: echo on > /sys/bus/platform/devices/9800000.display-subsystem/power/control DPMS off/on: black 10/10 before, picture 10/10 after. Full modesets were not retested with this version. Only tested on this device. Suggested-by: Dmitry Baryshkov Fixes: 22cb02bc96ff ("drm/msm/disp/dpu: reset the datapath after timing engine disable") Assisted-by: LLM Signed-off-by: Joonhoe Kim <26rote@gmail.com> Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/757684/ Link: https://lore.kernel.org/r/20261002130712.50612-1-26rote@gmail.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin commit a36925dbd944d143faf787590687e721bd7cd464 Author: Oleg Keri Date: Fri Sep 25 14:53:14 2026 +0200 drm/msm/dp: don't report link training success after a reinit [ Upstream commit a47987366e7fc2c05aeffc97f8e1f776e583f792 ] When every training attempt fails, the retry loop in msm_dp_ctrl_on_link() ends on a successful msm_dp_ctrl_reinitialize_mainlink(), leaving rc at 0. The caller then enables the stream on an untrained link and the display stays dark. The retry counter only reaches zero in that case, so treat it as a training failure. Fixes: 8ede2ecc3e5e ("drm/msm/dp: Add DP compliance tests on Snapdragon Chipsets") Signed-off-by: Oleg Keri Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/756528/ Link: https://lore.kernel.org/r/20260925125314.16563-1-okerixx@gmail.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin commit 716ac53f6360e4270da03ed4e1034a7fd66b5af5 Author: Yuho Choi Date: Sat Aug 1 19:50:08 2026 -0400 soc/tegra: flowctrl: Release OF node reference on error [ Upstream commit 4eaed7ea6ab36e1160d660b05551702c36dfed6c ] tegra_flowctrl_init() obtains a reference from of_find_matching_node() and currently releases it only after of_address_to_resource() succeeds. Release the reference before checking the resource conversion result so the error path is balanced as well. Fixes: 1fd09e5d884a ("soc/tegra: Add initial flowctrl support for Tegra132/210") Signed-off-by: Yuho Choi Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin commit 485d5adcbc423a2f935fd94755f4420458bd5fb0 Author: Igor Velkov Date: Fri Oct 2 21:36:47 2026 +0300 arm64: dts: amlogic: meson-sm1-odroid-hc4: run the SPI NOR at 40 MHz [ Upstream commit b44e2be772f866985cafdf90355285069ea68495 ] At 104 MHz, reads return corrupted data: bit 0 of the first byte of a transfer flips from 0 to 1 part of the time. The same byte read as the second byte of a transfer was correct in all 100 reads. One 4 KiB block read 200 times came back wrong 157 times. Writes are unaffected. flashcp verifies while it writes, so a bootloader update erases blocks it should skip and can abort halfway, with the flash half written. The Hardkernel vendor device tree for this board uses 40 MHz. At 40 MHz the same tests pass: 200 block reads with no mismatch, and 14 flashcp runs with no block erased. Tested on ODROID-HC4 with an XT25F128B. Fixes: 7178f340e929 ("arm64: dts: meson-sm1-odroid-hc4: add spifc node to ODROID-HC4") Assisted-by: LLM Reviewed-by: Neil Armstrong Signed-off-by: Igor Velkov Link: https://patch.msgid.link/20261002-hc4-spi-nor-v2-2-8366a4f91049@iav.lv Signed-off-by: Neil Armstrong Signed-off-by: Sasha Levin commit 3844404d018571fc7c92ef439b2a8f508f4a4078 Author: Igor Velkov Date: Fri Oct 2 21:36:46 2026 +0300 arm64: dts: amlogic: meson-sm1-odroid-hc4: mux the SPI NOR HOLD# and WP# pins [ Upstream commit 0b825126590879812321cdab53786fcd906f7761 ] The SPI NOR flash uses six lines, but nor_pins covers only four: data, clock and chip select. Nothing claims HOLD# (BOOT_3) and WP# (BOOT_7), so they keep the boot ROM setting. After a boot from SPI they are in the nor function and the flash works. After a boot from SD with the button under the board, they stay eMMC data lines pulled low, and spi-nor reports "unrecognized JEDEC id bytes: 00 00 00 00 00 00". Add them as a separate group in meson-g12-common.dtsi rather than to nor_pins: whether HOLD# and WP# reach the SoC depends on the board. The HC4 has eMMC disabled and takes both groups. Tested on ODROID-HC4: with BOOT_3 and BOOT_7 set back to eMMC with pull-down and spifc rebound, the flash fails as above without this patch and probes as a 16 MiB mtd0 with it. Fixes: 7178f340e929 ("arm64: dts: meson-sm1-odroid-hc4: add spifc node to ODROID-HC4") Assisted-by: LLM Signed-off-by: Igor Velkov Reviewed-by: Neil Armstrong Link: https://patch.msgid.link/20261002-hc4-spi-nor-v2-1-8366a4f91049@iav.lv Signed-off-by: Neil Armstrong Signed-off-by: Sasha Levin commit b19e3006fae2801bcb492ab984feaaf80c6fb16b Author: Hal Feng Date: Mon Aug 10 11:07:13 2026 +0800 riscv: dts: starfive: Correct pwm nodes [ Upstream commit 2186ec5f59c23fcf0bf896ca0543b6a1135d7bb5 ] Each of the StarFive JH7100/JH7110 SoCs has 8 OpenCores PTC IP cores. One OpenCores PTC IP core can output one PWM channel. Change the register size to 0x10, since an OpenCores PTC IP has only 4 32-bit registers: CNTR, HRC, LRC and CTRL. Fixes: 8d01f741a046 ("riscv: dts: starfive: jh7110: Add PWM node and pins configuration") Fixes: 5e598b99fedf ("riscv: dts: starfive: jh7100: Add PWM node and pins configuration") Signed-off-by: Hal Feng Tested-by: Maud Spierings Signed-off-by: Conor Dooley Signed-off-by: Sasha Levin commit 9872a75851c27904597c9db25045f5309b02ae66 Author: Ben Horgan Date: Thu Sep 17 15:56:17 2026 +0100 arm_mpam: resctrl: Don't stop early when tearing down a class [ Upstream commit 1c39415492323b9c5fd4a59179b390d45c26778a ] An MPAM class can back more than one control and more than one monitor. mpam_resctrl_teardown_class() iterates through all the controls but stops if it finds a match which means classes backing more than one class aren't torn down. The same for monitors, in which case the mbwu counters will be leaked. Stop terminating the loops early. As we are already changing mpam_resctrl_teardown_class() remove the misleading comment. It doesn't call resctrl_exit() and isn't required to do so as the only caller does it first. Fixes: fb481ec08699 ("arm_mpam: resctrl: Call resctrl_init() on platforms that can support resctrl") Reported-by: Sashiko Signed-off-by: Ben Horgan Reviewed-by: Gavin Shan Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit 2016ab829baac0627a421a74282e3dc67209dcd9 Author: Ben Horgan Date: Thu Sep 17 15:56:16 2026 +0100 arm_mpam: Switch to kvzmalloc_objs() for allocation of component cfg [ Upstream commit 046384f02b57da84a697d32aff7d7d46e881ae84 ] Each component cfg is sized by the size of a per-PARTID multiplied by the number of PARTIDs. On a platform sized to push the limits of the specification, the allocation using kzalloc_objs() will consistently fail. Change to use kvzmalloc_objs() so that large allocations fall back to vmalloc() based allocations. Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit 00b076a8835c80580b9d4f684a35ada02782b58a Author: Ben Horgan Date: Thu Sep 17 15:56:15 2026 +0100 arm_mpam: Don't loop forever if there is the maximum possible amount of PARTIDs [ Upstream commit 1e105782a1ce59ad066492a574ee57ff2f4374d1 ] On a theoretical platform with the maximum possible number of usable PARTIDs, 0XFFFF, the loops iterating over PARTID in mpam_reset_ris() and mpam_reprogram_ris() will never reach their termination condition leading to a system hang when register the cpu hotplug handlers when MPAM is enabling. Fix these loops. Fixes: f188a36ca241 ("arm_mpam: Reset MSC controls from cpuhp callbacks") Fixes: 09b89d2a72f3 ("arm_mpam: Allow configuration to be applied and restored during cpu online") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit c58d1ed981b57a4d5c27c2d6dc3b95158d52d648 Author: Ben Horgan Date: Thu Sep 17 15:56:14 2026 +0100 arm_mpam: resctrl: Make read_mon_cdp_safe() self consistent [ Upstream commit 09ff5358c6233c3155c8779c608c24d7f146f532 ] When read_mon_cdp_safe() is called with cdp_enabled equal to false then the reading returned in val is the sum of the monitor values for the given component. However, when cdp_enabled equal to true it is again the sum of the monitor values but with the initial value of val also added. Both resctrl_arch_cntr_read() and resctrl_arch_rmid_read() call read_mon_cdp_safe() and are documented to return the val directly without consideration of the older value. The val is always zeroed before read_mon_cdp_safe() is called except in __check_limbo() and __l3_mon_event_count_sum() but the latter is not relevant on MPAM systems. The extra accumulation in __check_limbo() means when there are multiple RMIDs in limbo some of them may be marked dirty when they are already clean. Change the cdp_enabled equals true case to match the false case. Fixes: fb56b29932ca ("arm_mpam: resctrl: Add resctrl_arch_rmid_read()") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan Reviewed-by: James Morse [morse: fixed commit message indenting and removed stale description] Signed-off-by: James Morse Signed-off-by: Sasha Levin commit 7d1b7b8d1988dfd7f8217ef283d30110e7e393ce Author: Ben Horgan Date: Thu Sep 17 15:56:13 2026 +0100 arm_mpam: resctrl: Correct check that existing class is L3 [ Upstream commit 724eae25d16ee49e5cabbd927af95ef2be8fd78c ] The class used to back mbm_total_bytes can be either at the L3 or the memory. If a platform had candidate classes at both the memory and the L3 then, as the check for whether the existing class is L3 or not in counter_update_class() is broken, the class that will be chosen depends on which order the classes are considered and so the probe order. Fix the check. Fixes: 1458c4f05335 ("arm_mpam: resctrl: Add support for csu counters") Tested-by: Gavin Shan Signed-off-by: Ben Horgan Reviewed-by: Gavin Shan Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit c0102add30d41c37f7ffdf8d729bc9f287ca3f4e Author: Ben Horgan Date: Thu Sep 17 15:56:12 2026 +0100 arm_mpam: Initialize all of struct mon_read in mpam_restore_mbwu_state() [ Upstream commit 4643335d5846123a25f535aad697c23f0135faca ] m->err and *m->val may be read before initialization in __ris_msmon_read() when called from mpam_restore_mbwu_state(). Initialize the whole struct mon_read in mpam_restore_mbwu_state() and fix the spelling of mbwu in the name. Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit 57eade54bd7c3ca982b2b08ba5389d066152c3d1 Author: Ben Horgan Date: Thu Sep 17 15:56:11 2026 +0100 arm_mpam: Use __ris_msmon_read() for saving MBWU state [ Upstream commit d056d29aefbe8fabe26862b1372837484bdde4c6 ] mbwu_save_mbwu_state() reads the MBWU counters and adds that to a saved correction value. However, the type of counter to read is determined by the RIS rather than the class and overflow is not taken into account. Fix this and mitigate against further divergence by using a locked variant of the same helper used for user monitor reads, __ris_msmon_read(). Using the locked variant avoids having to drop and retake the mon_sel lock. If the lock was dropped, an interleaved monitor read which detects overflow would cause the overflow not to be accounted for in the saved value of mbwu_state->correction. The correction is no longer updated for disabled counters but this has no effect as the saved values are not expected to be useful for disabled counters. Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan [morse: Added comment on correction being included in mpam_save_mbwu_state()] Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit 9b2c71d3e52a2c31c70215387a0de04d8843e249 Author: Ben Horgan Date: Thu Sep 17 15:56:10 2026 +0100 arm_mpam: Ensure MBWU counters are reset on restore [ Upstream commit 80db6616c710a358391516ad82de44361580f8da ] When an MSC becomes inaccessible due to cpu offline CFG_MBWU_CTL is set to zero in mpam_save_mbwu_state(). This is very likely to mean that the config will mismatch when restoring and so the monitor will be reset. However, the state may have been lost and so there are no guarantees. Ensure the reset happens by setting the reset_on_next_read and remove the unnecessary writes from mpam_save_mbwu_state(). Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan Reviewed-by: James Morse [morse: Restored clearing of CTL register for kexec/powerdown] Signed-off-by: James Morse Signed-off-by: Sasha Levin commit 2675fc0513ddfe82072d66a6a02c7705223b89db Author: Ben Horgan Date: Thu Sep 17 15:56:09 2026 +0100 arm_mpam: Add missing mon_sel locking in MBWU save and restore [ Upstream commit 0045b87f65bbdd3b433747cce0d723ae94f77d38 ] The mon_sel_lock is used to protect the mbwu_state, as well as h/w accesses that use MPAMCFG_MON_SEL. However, in mpam_restore/save_mbwu_state(), mbwu_state is accessed without holding the mon_sel_lock. Add the missing locking. Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit 72b31a86cc71b9ae91318cb4496ac0531957f189 Author: Ben Horgan Date: Thu Sep 17 15:56:08 2026 +0100 arm_mpam: Set mpam_feat_msmon_mbwu_31counter when there are bandwidth counters [ Upstream commit b010d258f30a512a9eafaba6c50a0943f8420ab2 ] When MPAMF_MSMON_IDR.MSMON_MBWU is 1, MSMON_MBWU is present and has a VALUE field of 31 bits. If additionally, MPAMF_MBWUMON_IDR.HAS_LONG is 1, then MSMON_MBWU_L is also present and has a VALUE field of 44 or 63 bits as indicated by MPAMF_MBWUMON_IDR.LWD. Hence, if there are memory bandwidth counters then there are always 31 bit counters irrespective of whether there also long counters. Set the 31 bit bandwidth counter feature bit whenever there are bandwidth counters. Fixes: fdc29a141d63 ("arm_mpam: Probe for long/lwd mbwu counters") Signed-off-by: Ben Horgan Tested-by: Gavin Shan Reviewed-by: Gavin Shan Reviewed-by: James Morse Signed-off-by: James Morse Signed-off-by: Sasha Levin commit e2a35f090219cf8cb67d04cf8661c7bbf53a1543 Author: James Clark Date: Thu Oct 1 16:48:10 2026 +0100 perf python: Track linked libraries as extension dependencies [ Upstream commit 2ed38aa8a52d3e245a9f71b98825ad7f77956d50 ] Since the Python extension switched to linking perf libraries, setup.py only lists util/python.c as a source. The libraries are supplied through LDFLAGS, which setuptools does not consider when deciding whether the extension needs to be rebuilt. When a library changes, make invokes setup.py, but setuptools can skip the build and the recipe copies the stale cached extension back into python/. This leaves perf and its Python module running different versions of the same code. Pass the linked library paths to setup.py and declare them as Extension dependencies so that library changes trigger a rebuild. Include EXTRA_PERFLIBS in the shared library list so that both make and setuptools track those inputs as well, preserving the existing linker order. Fixes: 9dabf4003423c8d3 ("perf python: Switch module to linking libraries from building source") Reviewed-by: Ian Rogers Assisted-by: Codex:GPT-6-Astra Signed-off-by: James Clark [ Applied manually to address some fuzz ] Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 1932c117fd0b478d9523aeb8f365a78d2dd211f6 Author: Mostafa Saleh Date: Thu Sep 24 08:56:16 2026 +0000 iommu/arm-smmu-v3-test: Fix UBSAN error [ Upstream commit b370a5e979f8bb8f34e30ad126ade734d8f128c0 ] struct arm_smmu_invs marks its flexible array member inv[] with the __counted_by(max_invs). arm_smmu_v3_invs_test() uses invs1 to invs5 which has num_invs = 3 but omit max_invs. This causes the following UBSAN error: [ 2.333240] UBSAN: array-index-out-of-bounds in drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:1116:21 [ 2.333604] # arm_smmu_v3_invs_test: lib/ubsan.c:228: array-index-out-of-bounds in drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c [ 2.334129] index 1 is out of range for type 'struct arm_smmu_inv[] __counted_by(max_invs)' (aka 'struct arm_smmu_inv[]') [ 2.335375] CPU: 6 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G N 7.2.0-g8dcb331fbb72 #2 PREEMPT [ 2.335759] Tainted: [N]=TEST [ 2.335791] Hardware name: linux,dummy-virt (DT) [ 2.336254] Call trace: [ 2.336932] show_stack+0x18/0x24 (C) [ 2.338443] __dump_stack+0x28/0x38 [ 2.338494] dump_stack_lvl+0x54/0x6c [ 2.338518] dump_stack+0x18/0x24 [ 2.338541] ubsan_epilogue+0x10/0x44 [ 2.338565] __ubsan_handle_out_of_bounds+0xb8/0xbc [ 2.338834] arm_smmu_invs_merge+0x688/0x8ac [ 2.338862] arm_smmu_v3_invs_test+0xd4/0x598 [ 2.338890] kunit_try_run_case+0x64/0x160 [ 2.338914] kunit_generic_run_threadfn_adapter+0x28/0x4c [ 2.338955] kthread+0x10c/0x12c [ 2.338984] ret_from_fork+0x10/0x20 [ 2.339433] ---[ end trace ]--- Explicitly set max_invs = 3 on the test arrays to match the number of elements. Fixes: 15a2a5645ad7 ("iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array") Reviewed-by: Nicolin Chen Reviewed-by: Jason Gunthorpe Signed-off-by: Mostafa Saleh Reviewed-by: Pranjal Shrivastava Tested-by: Nicolin Chen Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 2bcabb3b3cd30ee60c9af0ac006e981070283542 Author: Mostafa Saleh Date: Thu Sep 24 08:56:15 2026 +0000 iommu/arm-smmu-v3-test: Fix OOB in arm_smmu_v3_invs_test_verify() [ Upstream commit 8105675f33746cce48f5381d02d0356ef79dca89 ] arm_smmu_v3_invs_test_verify() validates the array bounds using KUNIT_EXPECT_EQ(), which triggers a failure and continues execution. If invs->num_invs was smaller than expected, the next loop over num_invs would blindly read past the end of the invs->inv[] array. Switch to KUNIT_ASSERT_EQ() to fail and stop the test on bound errors. Fixes: 15a2a5645ad7 ("iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array") Reported-by: Sashiko <> Reviewed-by: Nicolin Chen Reviewed-by: Jason Gunthorpe Signed-off-by: Mostafa Saleh Reviewed-by: Pranjal Shrivastava Tested-by: Nicolin Chen Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 25e71f426b072887a4d11e1ec34c167df2092a01 Author: Mostafa Saleh Date: Thu Sep 24 08:56:14 2026 +0000 iommu/arm-smmu-v3-test: Add missing error checks for inv array [ Upstream commit 388986bfc540e98f3f7ca1b6bc8703fc43e279d1 ] arm_smmu_invs_merge() and arm_smmu_invs_alloc() can return NULL or errors which are checked by the driver but not the test. Add KUNIT_ASSERT_NOT_ERR_OR_NULL() after calling them to fail the test instead of accessing NULL or ERR pointers. Fixes: 15a2a5645ad7 ("iommu/arm-smmu-v3: Introduce a per-domain arm_smmu_invs array") Reported-by: Sashiko <> Signed-off-by: Mostafa Saleh Reviewed-by: Pranjal Shrivastava Tested-by: Nicolin Chen Reviewed-by: Jason Gunthorpe Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit d12cb6b7f267f3116ad900a41c43e60a1309409a Author: Mostafa Saleh Date: Thu Sep 24 08:56:13 2026 +0000 iommu/arm-smmu-v3-test: Fix arm_smmu_v3_test_debug_print_used_bits() [ Upstream commit ce58940ccc3d1a377d238d93666c140405f8ce05 ] arm_smmu_v3_test_debug_print_used_bits() hardcodes arm_smmu_get_ste_used() instead of using the provided writer->ops->get_used() callback. This caused Context Descriptors to be incorrectly parsed as STEs. Fixes: 56e1a4cc2588 ("iommu/arm-smmu-v3: Add unit tests for arm_smmu_write_entry") Reported-by: Sashiko <> Reviewed-by: Nicolin Chen Reviewed-by: Jason Gunthorpe Signed-off-by: Mostafa Saleh Reviewed-by: Pranjal Shrivastava Tested-by: Nicolin Chen Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 965951c14cee52e6b615a5c1cd8ee5cf02826740 Author: Mostafa Saleh Date: Thu Sep 24 08:56:12 2026 +0000 iommu/arm-smmu-v3: Ensure L2 tables are visible before L1 ptrs [ Upstream commit 84366fb547ed987c4857311da0e5127d95bf97e6 ] Commit 6fabce53f6b9 ("iommu/arm-smmu-v3: Add a missing dma_wmb() for hitless STE update") adds a dma_wmb() to arm_smmu_write_entry() to make sure stream tables and context descriptors are observed first. However, STE L1 table descriptors are configured directly via WRITE_ONCE(), where before that they were zeroed with memset() inside dma_direct_alloc() then written to abort in via memset() also in arm_smmu_init_initial_stes() without a barrier in both cases which means that the SMMUv3 can observe the allocated table before the written descriptors causing it to fetch random data. Similarly in arm_smmu_write_cd_l1_desc() where the L1 CD is written after dma_alloc_coherent() with no barriers. Add dma_wmb() in both cases. Fixes: 48ec83bcbcf5 ("iommu/arm-smmu: Add initial driver support for ARM SMMUv3 devices") Reported-by: Sashiko <> Reviewed-by: Nicolin Chen Reviewed-by: Jason Gunthorpe Signed-off-by: Mostafa Saleh Reviewed-by: Pranjal Shrivastava Tested-by: Nicolin Chen Signed-off-by: Will Deacon Signed-off-by: Sasha Levin commit 1f3ffd66e109dc5942e89e3da4a4d77c6a6bada1 Author: Emil Tsalapatis Date: Fri Oct 2 10:52:14 2026 +0000 bpf: Add sleepable arena page allocation path [ Upstream commit 5316ede1f5d07653a669285ca715a24152d729c6 ] The bpf_arena_alloc_pages() function currently only allocates pages inside a spinlock critical section with IRQs off. This forces the use of alloc_pages_nolock() in the BPF allocator, even when the caller is a sleepable BPF function. This in turn causes allocation failures even in cases where falling into the allocator slow path and possibly sleeping would eventually succeed. This can be triggered consistently by heavy BPF arena users like scx. Allocate the arena pages before taking the critical section and pass whether the caller can sleep to bpf_alloc_pages(). This lets sleepable callers use the blocking allocator while non-sleepable callers retain the no-lock allocation behavior. Fixes: b8467290edab ("bpf: arena: make arena kfuncs any context safe") Signed-off-by: Emil Tsalapatis Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261002105218.6171-4-emil@etsalapatis.com Signed-off-by: Sasha Levin commit fe72d6a3efe036ce13df9dcf68a9fc49d864a14d Author: Emil Tsalapatis Date: Fri Oct 2 10:52:13 2026 +0000 bpf: Add sleepable argument to bpf_alloc_pages() [ Upstream commit cbe7d2bf7355416815c878e839d03028f4724dfb ] bpf_alloc_pages() currently decides whether it may use the blocking page allocator from the current execution context alone. Let callers further restrict that choice by passing whether their context is sleepable. Use the blocking allocator only when both the caller and runtime context allow sleeping. Add __GFP_RETRY_MAYFAIL so this path can reclaim without invoking the OOM killer when the allocation is charged to another memcg. Existing non-sleepable callers retain the no-lock allocation behavior. Signed-off-by: Emil Tsalapatis Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261002105218.6171-3-emil@etsalapatis.com Stable-dep-of: 5316ede1f5d0 ("bpf: Add sleepable arena page allocation path") Signed-off-by: Sasha Levin commit 1ceadefb7172ab3b85f846c42acb46d5d7f7beec Author: Emil Tsalapatis Date: Fri Oct 2 10:52:12 2026 +0000 bpf: Use an llist for page allocations [ Upstream commit 11de29f38a3455e5785c5fd5f38d93c413c5e822 ] bpf_map_alloc_pages() does not use its map argument. Storing allocated pages in an array also forces arena callers to allocate a separate pointer array. Expose the single-page allocator as bpf_alloc_page(), rename the bulk helper to bpf_alloc_pages(), and return bulk allocations through an llist using page->pcp_llist. Add bpf_free_pages() to safely release all pages remaining on such a list. Signed-off-by: Emil Tsalapatis Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20261002105218.6171-2-emil@etsalapatis.com Stable-dep-of: 5316ede1f5d0 ("bpf: Add sleepable arena page allocation path") Signed-off-by: Sasha Levin commit 321b0dc5e8ad65ed5a2400000702071b86cbfc2c Author: Jiayuan Chen Date: Tue Sep 22 18:17:33 2026 +0800 bpf: arena: Allocate the fault-in page outside the lock [ Upstream commit c7cd8be3d72f9b03454424fff31542b8a0122437 ] arena_vm_fault() allocated the page while holding arena->spinlock, so it could only use the non-blocking allocator, which never reclaims. Once the memcg is at memory.max that allocation just fails, the fault turns into VM_FAULT_SIGSEGV, and the process gets a SIGSEGV on a perfectly valid arena address. Hitting memory.max is routine (e.g. page cache from reading a big file), so this kills innocent processes over memory that reclaim could have freed. Rework the fault handler: - Preallocate the page before taking the lock, like do_anonymous_page() does, so it can sleep and reclaim, instead of turning a routine memory.max into a fake segfault. The allocation uses __GFP_RETRY_MAYFAIL so it never invokes the OOM killer: the page is charged to the map's memcg, which need not be the faulting task's, so an OOM there could kill unrelated tasks in the map's cgroup while a foreign faulter could never be its victim. map->numa_node is always NUMA_NO_NODE for an arena (BPF_F_NUMA_NODE is rejected), so the page comes from the local node, as before. - On allocation failure fall through to the locked recheck rather than failing right away: a page a concurrent allocator installed meanwhile is used, otherwise the non-blocking fallback fails and we return VM_FAULT_SIGBUS. Not VM_FAULT_OOM: nothing ran the OOM killer, and the fault path would just retry it forever. - A lockless probe skips that preallocation when a page is already mapped (e.g. allocated by the bpf program), so the common case wastes no allocation. The rare race where such a page is freed before we take the lock falls back to the non-blocking allocator under the lock. - Return VM_FAULT_SIGBUS for the other non-recoverable errors (allocation, range-tree and page-table failures) instead of VM_FAULT_SIGSEGV; the lock failure already did. Only BPF_F_SEGV_ON_FAULT, and a scratch-page hole under that flag, is a real user addressing error and keeps VM_FAULT_SIGSEGV. - Tidy up the error labels. Signed-off-by: Jiayuan Chen Signed-off-by: Alexei Starovoitov Reviewed-by: Emil Tsalapatis Link: https://patch.msgid.link/20260922101831.192102-2-jiayuan.chen@linux.dev Stable-dep-of: 5316ede1f5d0 ("bpf: Add sleepable arena page allocation path") Signed-off-by: Sasha Levin commit d66bc5fd061bbfab24a0354874a34ece53c562d7 Author: Yuri Zaporozhets Date: Thu Oct 1 21:25:52 2026 +0200 ASoC: dwc: Use OF match data again for StarFive JH7110 [ Upstream commit d532e2f5c288556075dc429941861391118787a0 ] Commit d6d6c513f5d2 ("ASoC: dwc: Use ops to get platform data") made dw_i2s_probe() fetch its platform data with of_device_get_match_data(), and commit 52ea7c0543f8 ("ASoC: dwc: i2s: Add StarFive JH7110 SoC support") put the JH7110 configuration into the OF match table. Commit 9c97790a07dc ("ASoC: dwc: Fix non-DT instantiation") then went back to pdev->dev.platform_data so that non-DT users such as AMD work again. Since then the JH7110 match data is never read. The probe runs neither the JH7110 clock and reset setup (i2s_pd_init) nor uses its capability flags; it configures the DAI from COMP_PARAM_1 instead. On the VisionFive 2, i2stx0 drives the bit and frame clocks for HDMI audio, but COMP_PARAM_1 reports it as slave-only, so the sound card fails to probe: designware-i2s 120b0000.i2s: ASoC error (-22): at snd_soc_dai_set_fmt() on 120b0000.i2s asoc-simple-card sound-hdmi: probe with driver asoc-simple-card failed with error -22 Take the OF match data first and fall back to the platform data when there is none, so that both DT and non-DT users get their configuration. Tested on a VisionFive 2 v1.3B (v7.0.3 with local HDMI audio patches): the HDMI sound card now probes and plays through i2stx0. The non-DT path is build-tested only. Fixes: 9c97790a07dc ("ASoC: dwc: Fix non-DT instantiation") Assisted-by: LLM Signed-off-by: Yuri Zaporozhets Link: https://patch.msgid.link/20261001192552.2904-1-yuriz@vodafonemail.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit a200daa44c266f6ca1079de0731b50e127ff457a Author: Junhui Liu Date: Fri Sep 18 00:29:38 2026 +0800 riscv: dts: spacemit: k3: Replace incorrect CLINT node with ACLINT nodes [ Upstream commit cc6371a7f5195387584e56054f3af671ff7354dc ] The K3 implements separate ACLINT MSWI, MTIMER and SSWI devices. The existing CLINT node at 0xe081c000 incorrectly describes the SSWI register space in the non-secure window as a legacy CLINT. The ACLINT register space is mapped at two base addresses: a secure window at 0xf1810000 and a non-secure window at 0xe0810000. The secure window exposes all three components, while the non-secure window only exposes SSWI; the MSWI and MTIMER offsets are reserved there. Moreover, depending on the eFuse configuration, the non-secure window may be entirely inaccessible, whereas the secure window is always available. Replace the CLINT node with the three ACLINT devices, all using secure-window addresses: MSWI and MTIMER for machine-level firmware such as OpenSBI, and SSWI for supervisor software interrupts. Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC") Signed-off-by: Junhui Liu Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260918-k3-aclint-v3-6-cf4fd4050e14@pigmoral.tech Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit 23e13fdf1690c05c13b1cb6c52f52a698778b5fd Author: Junhui Liu Date: Fri Sep 18 00:29:37 2026 +0800 irqchip/aclint-sswi: Add support for SpacemiT K3 [ Upstream commit b424b3b0ab920a25c23fbd7d226a0174b38d0de7 ] Add a match entry for the spacemit,k3-aclint-sswi compatible. The K3 SSWI device requires no special handling and can use the existing generic ACLINT SSWI initialization function. Signed-off-by: Junhui Liu Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260918-k3-aclint-v3-5-cf4fd4050e14@pigmoral.tech Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit 91748d5ba4c333978e6947c40edc3d00ff3a6038 Author: Junhui Liu Date: Fri Sep 18 00:29:36 2026 +0800 dt-bindings: timer: sifive,clint: Remove spacemit,k3-clint [ Upstream commit 5397ba147c28427d3728812dec999fdab0f53619 ] The SpacemiT K3 implements separate ACLINT MSWI, MTIMER and SSWI devices. The existing spacemit,k3-clint compatible incorrectly describes the SSWI register space as a legacy CLINT. Remove this compatible, as it never matched the actual hardware and has no remaining users. Fixes: 6cdeb30db4d8 ("dt-bindings: timer: add SpacemiT K3 CLINT") Signed-off-by: Junhui Liu Acked-by: Rob Herring (Arm) Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260918-k3-aclint-v3-4-cf4fd4050e14@pigmoral.tech Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit 06fec33c60831303fdce8e7c38dd17a6a5368c66 Author: Junhui Liu Date: Fri Sep 18 00:29:35 2026 +0800 dt-bindings: interrupt-controller: thead,c900-aclint-sswi: Add SpacemiT K3 [ Upstream commit 08257b5b3d38b3e19b61b807850f5a637fd1421b ] Add support for the SpacemiT K3 ACLINT SSWI, which provides inter-processor interrupts in Supervisor mode without calling into Machine-mode firmware. Acked-by: Conor Dooley Signed-off-by: Junhui Liu Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260918-k3-aclint-v3-3-cf4fd4050e14@pigmoral.tech Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit bf51b355f5e7c912d0ac5d842692e2b8db612a0b Author: Junhui Liu Date: Fri Sep 18 00:29:34 2026 +0800 dt-bindings: interrupt-controller: thead,c900-aclint-mswi: Add SpacemiT K3 [ Upstream commit c9bae665035f345ca050e98d6f4d6830c3d74f84 ] Add support for the SpacemiT K3 ACLINT MSWI, which provides per-hart software interrupts for inter-processor communication in Machine mode. Acked-by: Conor Dooley Signed-off-by: Junhui Liu Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260918-k3-aclint-v3-2-cf4fd4050e14@pigmoral.tech Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit bb86414df552b8afc6cc085aa67652f850ea08bf Author: Junhui Liu Date: Fri Sep 18 00:29:33 2026 +0800 dt-bindings: timer: thead,c900-aclint-mtimer: Add SpacemiT K3 [ Upstream commit 73329198cdc273008bd273b0c5ad4c65251cb49e ] Add support for the SpacemiT K3 ACLINT MTIMER, which provides per-hart timer interrupts in Machine mode. Acked-by: Conor Dooley Signed-off-by: Junhui Liu Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260918-k3-aclint-v3-1-cf4fd4050e14@pigmoral.tech Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit 7e53e3b6909cb1e695bbd6b7e00d8195566d6682 Author: James Morris Date: Mon Sep 28 19:18:04 2026 -0400 riscv: dts: spacemit: k3-com260: keep dldo4 enabled [ Upstream commit f314c98807c12272a1902aeda9c648d81b39bad2 ] dldo4 on the P1 PMIC is marked regulator-boot-on, but has no consumer described in the device tree. The regulator core can therefore disable the firmware-enabled rail during unused-regulator cleanup. Enabling pcie4_rc on a K3 CoM260 Dev Kit without this change while the board's included RTL8852BE module is connected to the M.2 E-key slot results in CPU hard-lock, as seen in kernel log: [ 32.521536] dldo4: disabling [ 48.125823] watchdog: CPU3: Watchdog detected hard LOCKUP on cpu 4 [ 64.125829] watchdog: BUG: soft lockup - CPU#1 stuck for 26s! [ 64.125926] Hardware name: SpacemiT K3 CoM260 IFX (DT) [ 64.125928] epc : smp_call_function_many_cond+0x158/0x740 [ 64.125938] ra : smp_call_function_many_cond+0x11a/0x740 GitHub Copilot assisted with diagnosis and build and test automation, and changelog drafting. Fixes: cfe5c91cb73c ("riscv: dts: spacemit: k3: Initial support for CoM260-IFX board") Assisted-by: GitHub-Copilot:gpt-sol-5.6 Signed-off-by: James Morris Signed-off-by: Jennifer Berringer Link: https://patch.msgid.link/20260928231807.1757995-2-jberring@redhat.com Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit b856b576cfdc8490799d4802fd546adcbc30f7ea Author: Aurelien Jarno Date: Mon Sep 28 22:49:06 2026 +0200 riscv: dts: spacemit: k3: move USB3 phy to board level [ Upstream commit a87ca1e5b5d28dee5af42f59f3c6f833c5ad1da0 ] On the SpacemiT K3 SoC, the combo phy provides 8 lines that can either be used for PCIe or USB3, depending on its configuration (spacemit,apmu). This configuration is defined at the board level, and assigning a phy line to a USB3 controller while it is configured as PCIe results in an "Invalid PHY mode" error. Move the USB phy definitions at the board level, as it is done for the submitted PCIe controller [1]. As a consequence, boards that do not enable a USB3 controller node will not match the DT schema due to missing PHY entries. This is not an issue as dtbs_check only validates enabled nodes. [1] https://lore.kernel.org/spacemit/20260923015016.64069-1-inochiama@gmail.com Fixes: 46380e4b1534 ("riscv: dts: spacemit: k3: add USB controller and USB phy support") Cc: Inochi Amaoto Signed-off-by: Aurelien Jarno Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260928205012.3689405-2-aurelien@aurel32.net Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit f4ec089b0508c90433f8e6b87b6c7b8f29b430f4 Author: Matthias Goergens Date: Sat Sep 26 12:29:13 2026 +0800 isofs: return long Joliet names whole [ Upstream commit b8253bcf92d6365b20eea6465f5a93c9fc4aa029 ] get_joliet_filename() writes into a buffer allocated by its caller but is not told how big that buffer is. It hardcodes PAGE_SIZE as the output limit for utf16s_to_utf8s() and gives uni16_to_x8() no limit at all. PAGE_SIZE was never the right bound. Before commit b2eb2e288604 ("isofs: Drop support of directory entries straddling blocks") both callers allocated a page, but only its first 1024 bytes were for the name, the rest holding a copy of a directory record that straddled a block. It could not overflow only because a directory record holds at most 222 bytes of name (255 bytes, 33 of them fixed), which no converter expands beyond 1024 bytes. It also keeps the converted length in an unsigned char. 222 bytes of name are 111 UTF-16 units, and the UTF-8 converter, used for iocharset=utf8 and when CONFIG_NLS_DEFAULT is "utf8", needs three bytes for each CJK, Thai or Devanagari character, so such a name can take up to 333 bytes. Past 255 the length wraps. readdir then reports a short name that usually ends in the middle of a UTF-8 sequence, and lookup finds the file only under that name, never under its real one; a name that wraps to exactly 0 bytes is not listed at all. Such names are out of spec, since Joliet allows 64 units, but common tools write them: PowerISO 9.5 and UltraISO 9.76 both keep up to 110 units by default. Windows, for which Joliet was made, returns them whole, including 111-unit names in records that leave out the padding byte. Return them whole here too. Pass the buffer size down and have both converters respect it. utf16s_to_utf8s() stops before a character that does not fit, and uni16_to_x8() now hands uni2char() the space that actually remains and stops on -ENAMETOOLONG, as fs/hfsplus/unicode.c does. Both callers pass JOLIET_NAME_MAX + 1, room for 111 units at three bytes each plus the terminator; no character set needs more than three bytes for a UTF-16 unit, and isofs_dir_record_valid() already rejects a record whose name_len claims more than the record holds, so no name is cut. Make the length an int, which is what both converters return. These names are longer than NAME_MAX. POSIX lets the limit vary by filesystem, reported by pathconf(_PC_NAME_MAX), and the VFS limits a name only by PATH_MAX (verify_dirent_name() in fs/readdir.c). vfat, exfat, hfsplus and ntfs3 already return names of up to 255 UTF-16 units, 765 bytes of UTF-8, and such names break the same things there: copying the file to a filesystem with a 255-byte limit, such as ext4 or tmpfs, fails with ENAMETOOLONG, and cp, tar, rsync and Python's shutil report that file and carry on with the rest, so the copy is incomplete but says so. glibc's readdir() returns the names, but the deprecated readdir_r() skips them and fails with ENAMETOOLONG, and an inotify reader with the buffer size inotify(7) suggests gets EINVAL. In the kernel, fanotify reports events on such a file without its name and warns once in fanotify_info_copy_name(), and a directory with such a name cannot be reconnected from a file handle, because the generic get_name() in fs/exportfs, which isofs uses, skips names longer than NAME_MAX. Cutting at NAME_MAX would avoid these, but would list names that Windows does not show and that can coincide within a directory. Every name of at most 255 bytes is returned exactly as before. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Matthias Goergens Link: https://patch.msgid.link/20260926042916.3277409-2-matthias.goergens@gmail.com Signed-off-by: Jan Kara Signed-off-by: Sasha Levin commit aabea9af16686038473a7c8b4b9decae7f979b49 Author: Jennifer Berringer Date: Tue Sep 29 08:02:27 2026 -0400 riscv: dts: spacemit: set console baud rate on OrangePi RV2 [ Upstream commit 789eed2d8bfa83d79e24d185f736b038a121b3ce ] Set the baud rate to 115200, matching what is used by U-Boot on this platform so that the console is usable even when console options are not specified in cmdline. Fixes: bab8dea259100 ("riscv: dts: spacemit: Add OrangePi RV2 board device tree") Tested-by: Vincent Legoll Reviewed-by: Iker Pedrosa Reviewed-by: Yixun Lan Signed-off-by: Jennifer Berringer Link: https://patch.msgid.link/20260929120227.1791356-1-jberring@redhat.com Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit f6401b62e5961394efbb9196b6f56f36d3f327db Author: Slavin Liu Date: Fri Sep 11 14:09:17 2026 +0800 clocksource/drivers/dbx500-prcmu: Check timer register mapping [ Upstream commit 8f30b035a6676e292ee8e54334711d9905dd0495 ] Return -ENOMEM if of_iomap() fails, before reading or configuring the timer register block. Detected by static analysis and reviewed with AI-assisted source auditing. Fixes: 9d2aa8c7961a ("ARM/clocksource: use automatic DT probing for ux500 PRCMU") Assisted-by: LLM Signed-off-by: Slavin Liu Signed-off-by: Daniel Lezcano Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20260911060917.94310-1-bolin.liu@seu.edu.cn Signed-off-by: Sasha Levin commit 0e74599f1842c47b32d3024576ad48852ba317ea Author: Markus Schneider-Pargmann (TI) Date: Fri Aug 28 20:47:45 2026 +0200 clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654 [ Upstream commit 0d3a67b1954a3988fef20ba7641d33e6085ad313 ] Registering clocksource/clockevent for the older platforms breaks booting them. The older platforms have their own implementation in early boot that is used to register clocksource/clockevent in timer-ti-dm-systimer.c. With am654, the timer is much more complex with more dependencies so doing this in early boot with the other driver is very difficult and gets ugly. Instead it is implemented in the platform driver for am654. However the old platforms may not register clocksource/clockevent in this driver as that would break the boot. Add a system_timer_capable flag that is only set for am654-timer that gates the clocksource/clockevent registration. Reported-by: H. Nikolaus Schaller Closes: https://lore.kernel.org/r/2013A99A-0502-4128-ACFA-B04886224393@goldelico.com Fixes: b8eeeca55456 ("clocksource/drivers/timer-ti-dm: Add clocksource support") Signed-off-by: Markus Schneider-Pargmann (TI) Signed-off-by: Daniel Lezcano Tested-by: Andreas Kemnade # OMAP3 GTA04 Tested-by: Kevin Hilman # OMAP3 Beagle XM Tested-by: H. Nikolaus Schaller # OMAP3 OpenPandora Link: https://patch.msgid.link/20260828-v7-3-next-topic-ti-timer-dm-clocksource-omap-fix-v1-1-85f0e4dc6f9f@baylibre.com Signed-off-by: Sasha Levin commit 62b403d4a833cef91113cc5293651f7b31366392 Author: Thorsten Blum Date: Tue Sep 22 20:11:01 2026 +0200 hwrng: intel - return -ENOMEM when ioremap() fails [ Upstream commit 4c3ca7c8c152278332590bfd3df1b0f086364759 ] intel_init_hw_struct() incorrectly returns -EBUSY when ioremap() fails. Return -ENOMEM instead. Fixes: c24c95a085c6 ("[PATCH] fix Intel RNG detection") Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 443af8517f1b10655678a97b1d928f95d3fe8ab3 Author: Takashi Iwai Date: Fri Oct 2 10:18:22 2026 +0200 ALSA: ump: Avoid dereference with max_src_size=0 [ Upstream commit b61a2369085fd995c8ad44245d3fbd45b1216f71 ] safe_copy_string() refers the source pointer for a NUL terminator before verifying the source size. When max_src_size=0, it may dereference wrongly. Fix the verification order. Only hypothetical hardening, and we see no actual issue in the current code, as they are all valid sources. Fixes: e3f035edadcc ("ALSA: ump: Copy FB name string more safely") Link: https://patch.msgid.link/20261002081823.680131-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 0dfb6db14e8ec35d9a0c4254d0e6c2561342c814 Author: Liu Dalin Date: Thu Aug 27 16:03:20 2026 +0800 rtc: ftrtc010: fix integer overflow in time calculation [ Upstream commit 32f04694fa87b8ac9fa58f9ceb2dc6cbc476e2a1 ] In ftrtc010_rtc_read_time() and ftrtc010_rtc_set_time(), all variables (offset, days, hour, min, sec) are u32. The expression "days * 86400 + hour * 3600 + min * 60 + sec" is evaluated in 32-bit arithmetic, which silently wraps around for dates beyond approximately year 2106 (U32_MAX / 86400 ≈ 49710 days). In ftrtc010_rtc_read_time(), perform the addition in 32-bit arithmetic first to preserve two's complement wrapping for negative offsets, then cast the result to timeu64_t. In ftrtc010_rtc_set_time(), cast individual u32 operands to timeu64_t before multiplication to prevent overflow in the right-hand side of the offset calculation. Fixes: 1d61d2592c1f ("rtc: gemini/ftrtc010: rename driver and symbols") Assisted-by: Sashiko AI [static analysis] Signed-off-by: Liu Dalin Reviewed-by: Linus Walleij Tested-by: Liu Dalin Link: https://patch.msgid.link/42C8FBD59AA34EA9+20260827080320.3351155-4-liudalin@kylinsec.com.cn Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit e7073c9828cb99069afee3de47026f0d697a52f4 Author: Arnd Bergmann Date: Fri Sep 25 15:01:00 2026 +0200 drm/panel: fix novatek-nt36536 dependencies [ Upstream commit f11277810402d0e2f3f8e64618cdb5af2ade8d3f ] The recently added driver requires access to DSC helper code and fails to link without that: ld.lld: error: undefined symbol: drm_dsc_pps_payload_pack >>> referenced by panel-novatek-nt36536.c:109 (/home/arnd/arm-soc/drivers/gpu/drm/panel/panel-novatek-nt36536.c:109) >>> drivers/gpu/drm/panel/panel-novatek-nt36536.o:(novatek_prepare) in archive vmlinux.a Add the usual Kconfig dependency. Fixes: 75a5dbd1f4f7 ("drm/panel: Add Novatek NT36536 panel driver") Signed-off-by: Arnd Bergmann Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20260925130125.3897046-1-arnd@kernel.org Signed-off-by: Sasha Levin commit e7678b137b7fbf7946b32381edab407f7d32ea02 Author: Thorsten Blum Date: Tue Sep 22 20:11:02 2026 +0200 hwrng: intel - return -ENOMEM when kmalloc_obj() fails [ Upstream commit a0590c556cdbf88373d38494a23f1503d39b0ab2 ] intel_rng_mod_init() incorrectly returns -ENODEV when kmalloc_obj() fails. Return -ENOMEM instead. Fixes: ee527cd3a20c ("Use stop_machine_run in the Intel RNG driver") Signed-off-by: Thorsten Blum Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit c0a248b8b300cc8c6358913d381aeac682cb974e Author: Herbert Xu Date: Tue Sep 22 19:49:18 2026 +1000 crypto: tcrypt - Avoid reading req->base after submission [ Upstream commit 3a31a4baad6726bf974bcc58a6398f6a36d10aa0 ] Once a request has been submitted to the Crypto API, the value of req->base.data must not be read by the caller as it may change while the request is processed. Avoid reading it in tcrypt by combining the crypto_wait struct with the request object into a tcrypt request object and pass that around instead of the request object. Reported-by: T Pratham Fixes: beb63da739f7 ("crypto: tcrypt - Add speed tests for async hashing") Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit cb0c2e9887629518af7c7ee5db626f18487dfabb Author: Karl Mehltretter Date: Tue Sep 22 07:17:04 2026 +0200 crypto: atmel - handle authenc requests without plaintext [ Upstream commit ccbd95b3efbc0580b6abde2a905823417ca56022 ] Authenc permits a nonempty associated-data string with no plaintext. The Atmel driver accepts such a request, has SHA process the associated data, and then unconditionally asks AES DMA to transfer zero bytes. The Atmel DMA engines reject the zero-length descriptor, so the valid request fails, normally with -ENOMEM. Skip the AES transfer when textlen is zero and proceed directly to SHA finalization. Once an HMAC transform has cached its inner and outer states, SHA can complete this path synchronously. The forced ahash completion callback then invokes the AES finalizer through a void function and discards its return value. This loses -EBADMSG for a mismatched tag and reports successful decryption. For synchronous SHA completion, release the SHA device without invoking the ahash callback and call the AES finalizer directly. Its result then propagates through the synchronous call chain. Keep the existing callback path for asynchronous completion. On a SAM9X75, the unpatched driver failed valid AAD-only requests and returned success for a bad tag after the transform had been used once. With this change, bad tags return -EBADMSG for both fresh and reused transforms. Fixes: 89a82ef87e01 ("crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 834847b5a34047e84bc5be2909ab3588876314e0 Author: Bartosz Szpila Date: Thu Oct 1 08:57:13 2026 +0000 platform/chrome: cros_ec_typec: Validate SVID and mode counts in discovery data [ Upstream commit 317e7abcaf60b79765dcf35c014edac8b9d37a6e ] cros_typec_register_altmodes() iterates over sop_disc->svid_count and sop_disc->svids[i].mode_count from the EC_CMD_TYPEC_DISCOVERY response without validating their bounds. port->disc_data is allocated as a buffer of EC_PROTO2_MAX_RESPONSE_SIZE bytes, and each SVID entry contains a fixed mode_vdo[6] array. If the EC returns an out-of-bounds svid_count or mode_count, the loops read past the end of the mode_vdo array or the disc_data buffer. Validate that the discovery response with svid_count entries fits within EC_PROTO2_MAX_RESPONSE_SIZE using struct_size(), and ensure each SVID's mode_count does not exceed ARRAY_SIZE(sop_disc->svids[i].mode_vdo) before registering altmodes. Fixes: de0f49487db3 ("platform/chrome: cros_ec_typec: Register partner altmodes") Signed-off-by: Bartosz Szpila Reviewed-by: Andrei Kuchynski Link: https://lore.kernel.org/r/20261001085714.1086242-1-bszpila@google.com Signed-off-by: Tzung-Bi Shih Signed-off-by: Sasha Levin commit f666e1db6026e2f492ad5f4a45782443798fb920 Author: Hemanth Selam Date: Fri Sep 11 13:55:43 2026 +0530 nvdimm/pmem: Release gendisk on probe failure [ Upstream commit 855a46681e0ba601952c346e5b62d867e51ecb23 ] pmem_attach_disk() allocates the gendisk with blk_alloc_disk() and hands it to devres only once device_add_disk() has succeeded. Until that point the probe path owns the disk itself, which is why every failure after the allocation jumps to the out: label and puts it there. The devm_init_badblocks() failure returns directly instead, so the disk allocated a few lines earlier is never released. Nothing releases it afterwards either: the devres action that would have done so has not been registered yet, so unbinding the namespace or destroying it does not reach the disk, and it stays allocated along with its queue and its bdev inode until the machine is rebooted. devm_init_badblocks() only fails when a single page allocation fails, so reaching this at all needs memory exhaustion during namespace probe, and because device_add_disk() has not run there is nothing user visible left behind: no device node, no sysfs entry, only the leaked memory. Release the gendisk through the existing cleanup path on this failure. Fixes: 3dd60fb9d95d ("nvdimm/pmem: stop using q_usage_count as external pgmap refcount") Signed-off-by: Hemanth Selam Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20260911082543.473670-1-hemanth.selam@gmail.com Signed-off-by: Alison Schofield Signed-off-by: Sasha Levin commit 8649098e5709ff31af1ae6b4ecdd5501574cd8c3 Author: Alexander Duyck Date: Mon Sep 28 09:12:08 2026 -0700 fbnic: Rework the BMC state pulled from the capabilities message [ Upstream commit d261a371e3b74c82c417b1171264dd35f6ddc615 ] The BMC side of the RPC configuration is driven entirely out of the capabilities message: it carries the BMC presence, its MAC addresses and the all-multi request, and the reinit flag raised off it is what gets the service task to reprogram the MACDA and action TCAMs. Pull that out of fbnic_fw_parse_cap_resp() into a helper and rework the state it publishes. The firmware reports the BMC present as soon as its NC-SI channel is enabled, before the BMC has been assigned a MAC address. Such a message carries no BMC MAC array and is rejected with -EINVAL, discarding the rest of it. Treat a present BMC with no MAC as absent instead. There is no entry to steer traffic to without one, so the BMC paths stay disabled either way, and the link speed, FEC and anti-rollback version in the same message are no longer thrown out with it. bmc_present, need_bmc_tcam_reinit, need_bmc_macda_sync and all_multi are single bit members of one bitfield, so every write to one is a read-modify-write of all four. The mailbox writes three of them and the service task writes the other two. Move them into an unsigned long state field driven by the atomic bitops. Putting it at the top of the struct keeps the cost to the word itself: 152 bytes grows to 160, still three cachelines, with a 1 byte hole left ahead of anti_rollback_version. Order the reinit handoff while there. The mailbox publishes the BMC state before raising the flag and the service task tests the flag before consuming it, so pair an smp_mb__before_atomic() on the raise with a test_and_clear_bit() on the consume. Claiming the flag atomically also keeps a raise that lands mid-pass instead of dropping it. Commit all_multi unconditionally rather than only when the firmware supplied the attribute. An absent attribute means the BMC is not asking for all-multi, so holding the previous value just kept stale state. It is read out of the message only when a BMC is present, so it is never set on its own and the three callers that paired it with the presence check can test it alone. fbnic_write_macda() tests the reinit flag to force a MACDA sync and now always sees it clear when reached from fbnic_bmc_rpc_check(). That path is unaffected, as fbnic_bmc_rpc_init() unconditionally marks the broadcast entry, so the update count is never zero while a BMC is present. Signed-off-by: Alexander Duyck Fixes: 20d2e88cc746 ("eth: fbnic: Add initial messaging to notify FW of our presence") Fixes: 04a230b27d8f ("fbnic: Add logic to repopulate RPC TCAM if BMC enables channel") Fixes: cee8d21d8091 ("fbnic: Push local unicast MAC addresses to FW to populate TCAMs") Link: https://patch.msgid.link/179061192791.414394.2161969547553719796.stgit@ahduyck-xeon-server.home.arpa Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ec24bafafc1a5e08820f3b4b0296fb79d8b41ac1 Author: Kris Pan Date: Mon Sep 28 09:47:08 2026 +0800 net: iterate online nodes in skb_defer_free_flush() [ Upstream commit 56fbbb662795b29f4d12a55cb1b456553a6ec3b0 ] skb_attempt_defer_free() only queues skbs on the current CPU's node (numa_node_id() of a running CPU), which is always online, so the flush loop never needs to visit nodes that are merely possible. for_each_node() walks node_possible_map. On machines where the possible map is much larger than the online map -- e.g. a POWER10 LPAR with 32 possible but 1 online node -- the flush loop touches 31 cold, always-empty per-node lists on every softirq pass. Use for_each_online_node() to iterate only node_online_map. Nodes that go offline are drained by dev_cpu_dead() ("net: flush skb_defer_nodes in dev_cpu_dead()"), so the flush no longer needs to visit offline nodes. Loopback UDP throughput in a QEMU guest with 32 possible / 1 online nodes (bench_udp, 8 senders, interleaved runs) improves by ~5%. Fixes: 5628f3fe3b16 ("net: add NUMA awareness to skb_attempt_defer_free()") Reported-by: kernel test robot Suggested-by: Adrian Tomasov Closes: https://lore.kernel.org/oe-lkp/202512112119.5b9829a-lkp@intel.com Signed-off-by: Kris Pan Link: https://patch.msgid.link/20260928014708.3903028-1-kris.pan@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ce62091cf34540df619d886d6b9a87d4d4478705 Author: Markus Schneider-Pargmann (TI) Date: Fri Sep 18 11:17:50 2026 +0200 arm64: dts: ti: var-som-am62p: Fix wkup R5F memory region size [ Upstream commit c9b15cd49b3fbd54f3382655b4e898921a7adb4e ] The wkup_r5fss0_core0_memory_region was reserved with 0x01e00000 but the MCU SDK linker for the wkup R5F firmware on AM62P defines the DM code/data DDR footprint differently: /* DDR for DM R5F code/data [ size 27 MiB + 396 KB ] */ DDR : ORIGIN = 0x9CAA5000 LENGTH = 0x1B63000 which results in an end at 0x9e608000. For this memory region which starts at 0x9c900000 this means a length of: 0x9e608000 - 0x9c900000 = 0x1d08000 Link: https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd Fixes: 571562e76458 ("arm64: dts: ti: Add support for Variscite VAR-SOM-AM62P") Reviewed-by: Stefano Radaelli Reviewed-by: Bryan Brattlof Reviewed-by: Kendall Willis Signed-off-by: Markus Schneider-Pargmann (TI) Link: https://patch.msgid.link/20260918-topic-am62a-ioddr-dt-v6-19-v9-6-40972ef1f663@baylibre.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit b1ed1158d4dbc898f88166733c6d960bf88b6c9b Author: Markus Schneider-Pargmann (TI) Date: Fri Sep 18 11:17:49 2026 +0200 arm64: dts: ti: k3-am62p5-sk: Fix wkup R5F memory region size [ Upstream commit 93cfb76923603ccaec3720dec065a7874458e67d ] The wkup_r5fss0_core0_memory_region was reserved with only 0x0f00000 but the MCU SDK linker for the wkup R5F firmware on AM62P defines the DM code/data DDR footprint differently: /* DDR for DM R5F code/data [ size 27 MiB + 396 KB ] */ DDR : ORIGIN = 0x9CAA5000 LENGTH = 0x1B63000 which results in an end at 0x9e608000. For this memory region which starts at 0x9c900000 this means a length of: 0x9e608000 - 0x9c900000 = 0x1d08000 Link: https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd Fixes: b05a6c145001 ("arm64: dts: ti: k3-am62p5-sk: Enable IPC with remote processors") Reviewed-by: Bryan Brattlof Reviewed-by: Kendall Willis Signed-off-by: Markus Schneider-Pargmann (TI) Link: https://patch.msgid.link/20260918-topic-am62a-ioddr-dt-v6-19-v9-5-40972ef1f663@baylibre.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit 93ab9963456f19c559df5dbb71e178c79a1feb0a Author: Markus Schneider-Pargmann (TI) Date: Fri Sep 18 11:17:48 2026 +0200 arm64: dts: ti: k3-am62p-verdin: Fix wkup R5F memory region size [ Upstream commit 70c9859fcca8dd964a588a0642aed3bd71bc1dcd ] The wkup_r5fss0_core0_memory_region was reserved with 0x01e00000 but the MCU SDK linker for the wkup R5F firmware on AM62P defines the DM code/data DDR footprint differently: /* DDR for DM R5F code/data [ size 27 MiB + 396 KB ] */ DDR : ORIGIN = 0x9CAA5000 LENGTH = 0x1B63000 which results in an end at 0x9e608000. For this memory region which starts at 0x9c900000 this means a length of: 0x9e608000 - 0x9c900000 = 0x1d08000 Link: https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62px-sk/wkup-r5fss0-0_freertos/ti-arm-clang/linker.cmd Fixes: 87f95ea316ac ("arm64: dts: ti: Add Toradex Verdin AM62P") Acked-by: Francesco Dolcini Reviewed-by: Bryan Brattlof Reviewed-by: Kendall Willis Signed-off-by: Markus Schneider-Pargmann (TI) Link: https://patch.msgid.link/20260918-topic-am62a-ioddr-dt-v6-19-v9-4-40972ef1f663@baylibre.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit 29c6f2df73d6a5cfd1a514edae1b20a48a86bd3c Author: Markus Schneider-Pargmann (TI) Date: Fri Sep 18 11:17:47 2026 +0200 arm64: dts: ti: k3-am62a7-sk: Fix wkup R5F memory region size [ Upstream commit 8d36eb58c06b867f29a8df2f39f7fe6718c726af ] The wkup_r5fss0_core0_memory_region was reserved with only 0x0f00000 but the MCU SDK linker for the wkup R5F firmware on AM62A defines the DM code/data DDR footprint differently: /* DDR for DM R5F code/data [ size 27 MiB + 364 KB ] */ DDR : ORIGIN = 0x9CAA5000 LENGTH = 0x1B5B000 which results in an end at 0x9e600000. For this memory region which starts at 0x9c900000 this means a length of: 0x9e600000 - 0x9c900000 = 0x1d00000 AM62A additionally has a second DM firmware for edgeai whose highest section end address reaches 0x9e700000, so the region should end there: 0x9e700000 - 0x9c900000 = 0x1e00000 Link: https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62ax-sk/r5fss0-0_freertos/ti-arm-clang/linker.cmd Fixes: 77c29ebe76d8 ("arm64: dts: ti: k3-am62a7-sk: Enable IPC with remote processors") Reviewed-by: Bryan Brattlof Reviewed-by: Kendall Willis Signed-off-by: Markus Schneider-Pargmann (TI) Link: https://patch.msgid.link/20260918-topic-am62a-ioddr-dt-v6-19-v9-3-40972ef1f663@baylibre.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit f0b01d789c4ed8c2f24da7fd54105c0bf04481c7 Author: Markus Schneider-Pargmann (TI) Date: Fri Sep 18 11:17:46 2026 +0200 arm64: dts: ti: k3-am62d2-evm: Fix wkup R5F memory region size [ Upstream commit 5dd0e5b9d5f67276ff291f30da9bf5a17a46c48e ] The wkup_r5fss0_core0_memory_region was reserved with only 0x0f00000 but the MCU SDK linker for the wkup R5F firmware on AM62A defines the DM code/data DDR footprint differently: /* DDR for DM R5F code/data [ size 27 MiB + 364 KB ] */ DDR : ORIGIN = 0x9CAA5000 LENGTH = 0x1B5B000 which results in an end at 0x9e600000. For this memory region which starts at 0x9c900000 this means a length of: 0x9e600000 - 0x9c900000 = 0x1d00000 AM62A additionally has a second DM firmware for edgeai whose highest section end address reaches 0x9e700000, so the region should end there: 0x9e700000 - 0x9c900000 = 0x1e00000 Link: https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62ax-sk/r5fss0-0_freertos/ti-arm-clang/linker.cmd Fixes: 1544bca2f188 ("arm64: dts: ti: Add support for AM62D2-EVM") Reviewed-by: Bryan Brattlof Reviewed-by: Kendall Willis Signed-off-by: Markus Schneider-Pargmann (TI) Link: https://patch.msgid.link/20260918-topic-am62a-ioddr-dt-v6-19-v9-2-40972ef1f663@baylibre.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit 9cb833d19c6c0c33a157bb91b3359d243aebc4e8 Author: Markus Schneider-Pargmann (TI) Date: Fri Sep 18 11:17:45 2026 +0200 arm64: dts: ti: k3-am62a-phycore-som: Fix wkup R5F memory region size [ Upstream commit 3690b591d07a2e8863eb96e2aff740da47b8de03 ] The wkup_r5fss0_core0_memory_region was reserved with only 0x0f00000 but the MCU SDK linker for the wkup R5F firmware on AM62A defines the DM code/data DDR footprint differently: /* DDR for DM R5F code/data [ size 27 MiB + 364 KB ] */ DDR : ORIGIN = 0x9CAA5000 LENGTH = 0x1B5B000 which results in an end at 0x9e600000. For this memory region which starts at 0x9c900000 this means a length of: 0x9e600000 - 0x9c900000 = 0x1d00000 AM62A additionally has a second DM firmware for edgeai whose highest section end address reaches 0x9e700000, so the region should end there: 0x9e700000 - 0x9c900000 = 0x1e00000 Link: https://github.com/TexasInstruments/mcupsdk-core-k3/blob/k3_main/examples/drivers/ipc/ipc_rpmsg_echo_linux/am62ax-sk/r5fss0-0_freertos/ti-arm-clang/linker.cmd Fixes: 8dd0ac27fcd1 ("arm64: dts: ti: k3-am62a-phycore-som: Enable Co-processors") Acked-by: Andrew Davis Reviewed-by: Bryan Brattlof Reviewed-by: Kendall Willis Signed-off-by: Markus Schneider-Pargmann (TI) Reviewed-by: Wadim Egorov Link: https://patch.msgid.link/20260918-topic-am62a-ioddr-dt-v6-19-v9-1-40972ef1f663@baylibre.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit c484428878be96789e634adb1615808307a26f40 Author: Mikko Perttunen Date: Thu Jul 30 13:44:43 2026 +0900 drm/tegra: Drop reference on postfence [ Upstream commit 5ba3dfe724448f308ad7b28ef8d4f41bca4896ae ] drm_syncobj_replace_fence() calls dma_fence_get() on the parameter fence, so we need to drop ours. Add a call to dma_fence_put() to do that. Fixes: 13abe0bb15ce ("drm/tegra: Implement job submission part of new UAPI") Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: https://patch.msgid.link/20260730-b4-host1x-syncobj-wait-v1-3-afa730410392@nvidia.com Signed-off-by: Sasha Levin commit 24290a0c5400e9e5478fe91e2e52c2e6508ce1b9 Author: Mikko Perttunen Date: Thu Jul 30 13:44:42 2026 +0900 drm/tegra: Don't pass an ERR_PTR to drm_syncobj_replace_fence() [ Upstream commit 7fce3d34eddfff6361cb4de2c5b8789b88a552b6 ] When host1x_fence_create() fails, avoid trying to attach the error pointer to the out syncobj. Fixes: 13abe0bb15ce ("drm/tegra: Implement job submission part of new UAPI") Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: https://patch.msgid.link/20260730-b4-host1x-syncobj-wait-v1-2-afa730410392@nvidia.com Signed-off-by: Sasha Levin commit d550f50f14be923e4aff1d65be2db741859527a7 Author: Mikko Perttunen Date: Thu Jul 30 13:44:41 2026 +0900 drm/tegra: Fix syncobj_in wait return value check [ Upstream commit 27836c46a3db5a7869a9f7e181136f0c4d8bc0d1 ] dma_fence_wait_timeout() returns the remaining timeout in jiffies on success, zero on timeout, and a negative error code if interrupted. The return value was assigned to 'err' and checked as if it were an errno, the opposite of the correct logic. Fix the code to use a properly typed variable and check each condition correctly. Fixes: 13abe0bb15ce ("drm/tegra: Implement job submission part of new UAPI") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/all/aJM_te551jUwnRv7@stanley.mountain/ Signed-off-by: Mikko Perttunen Signed-off-by: Thierry Reding Link: https://patch.msgid.link/20260730-b4-host1x-syncobj-wait-v1-1-afa730410392@nvidia.com Signed-off-by: Sasha Levin commit 5df65669c2b21910fe43312f9bb7332a3e17ad62 Author: Mikko Perttunen Date: Wed Sep 30 13:11:40 2026 +0900 ARM: tegra: Add core supply for Tegra114 boards [ Upstream commit fa9ac42208aaf43e4ab460ea75b57b226ba5fc08 ] After commit 4cc90d4c043e ("ARM: tegra: Configure Tegra114 power domains"), a core-supply property is required in the PMC node. Label the core regulator on Dalmore, NVIDIA SHIELD and Tegra Note 7 and add the property. Fixes: 4cc90d4c043e ("ARM: tegra: Configure Tegra114 power domains") Signed-off-by: Mikko Perttunen Tested-by: Svyatoslav Ryhel # Tegratab/TN7 Reviewed-by: Svyatoslav Ryhel Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin commit 2062695c28db539725e4882ad9ffac969ee29db3 Author: Lance Yang Date: Thu Oct 1 00:04:32 2026 +0800 mm/memory_hotplug: fix missing rollback in __add_pages() [ Upstream commit c31bb839fb829958101250ee5acfa4f94fdb7ecd ] __add_pages() returns on a sparse_add_section() failure without removing the sections already added in the same request. For memremap_pages(), the failed range is not counted in pgmap->nr_range, so memunmap_pages() skips it. The sections already added in that range retain their vmemmap mappings and subsection bits. Retrying a section-aligned range can then fail with -EEXIST. Save the initial PFN and remove [start_pfn, pfn) on failure. For a vmemmap population failure, section_activate() already cleans up the current section, so the rollback excludes it. If the first section fails, __remove_pages() receives an empty range and does nothing. Link: https://lore.kernel.org/all/BAD58999-1EDD-4A37-ABA0-DB1BD8AB3453@linux.dev/ Suggested-by: Muchun Song Signed-off-by: Lance Yang Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") Acked-by: Muchun Song Link: https://patch.msgid.link/20260930160432.5564-1-lance.yang@linux.dev Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Sasha Levin commit f554cc119af3b230c369e5d50426f992d7138093 Author: Chuanhong Guo Date: Sat Sep 26 18:04:14 2026 +0800 pinctrl: mediatek: mt7629: fix the 2.4 GHz Wi-Fi pin mode array [ Upstream commit 0b056aef31602cd10d2b35adc4746781b4fb8609 ] The wf0_2g group contains nine pins but only eight mux values. mtk_pinmux_set_mux() indexes the mode array once for each pin, reading past its end when configuring pin 78 (WF0_2G_HB6). This can select an unrelated mux value or fail with -EINVAL, preventing the Wi-Fi device from probing. Add the missing mode 1 entry for WF0_2G_HB6. Fixes: b44677375fee ("pinctrl: mediatek: add pinctrl support for MT7629 SoC") Signed-off-by: Chuanhong Guo Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit 3df0e313f8c62eff30fcdec18143b39a0b2c3b34 Author: Kate Hsuan Date: Fri Oct 2 13:11:00 2026 +0800 media: i2c: imx471: Fix register size for IMX471_REG_DPGA_USE_GLOBAL_GAIN [ Upstream commit 3bfba69ee8f914c5c07bc64e18b66c21bbb05292 ] The IMX471_REG_DPGA_USE_GLOBAL_GAIN register was incorrectly defined as a 16-bit register, preventing global gain from enabling correctly. As a result, only the green channel gain was applied instead of the intended global gain. Change the register size to 8 bits to ensure global gain is properly enabled. Link: https://lore.kernel.org/linux-media/35240e45-c73b-4425-923a-c1026386ed3c@slotpi17m12/ Fixes: be1589e567ae ("media: i2c: imx471: Add Sony IMX471 image sensor driver") Signed-off-by: Kate Hsuan Signed-off-by: Sakari Ailus Signed-off-by: Sasha Levin commit fc1abbd6108ced3dad659461251b03761b064564 Author: Thiébaud Weksteen Date: Thu Sep 17 15:11:47 2026 +1000 rust: macros: allow non-ASCII characters in `authors` [ Upstream commit e91836593fbfb0014c290e9a0bbd86d0b98c1d2f ] Module authors may have non-ASCII characters in their names. In C, `MODULE_AUTHOR` allows arbitrary string literals which are emitted as raw UTF-8 bytes into the `.modinfo` section, and multiple in-tree modules use non-ASCII author names. Originally, the single `author` field permitted arbitrary string literals including non-ASCII characters. When support for multiple authors was introduced in commit 38559da6afb2 ("rust: module: introduce `authors` key"), it reused the `expect_string_array` helper that had originally been added for module aliases. Because that helper enforced an ASCII check, `authors` inadvertently became restricted to ASCII-only string literals. Later, when the macro parsing was rewritten to use `syn` in commit c578ad703ae9 ("rust: macros: use `syn` to parse `module!` macro"), this restriction was carried over by using AsciiLitStr in `authors` type. Change the element type of `authors` in `ModuleInfo` from `AsciiLitStr` to `LitStr` so that UTF-8 author names are permitted. Fixes: 38559da6afb2 ("rust: module: introduce `authors` key") Signed-off-by: Thiébaud Weksteen Acked-by: Petr Pavlu Link: https://patch.msgid.link/20260917051147.98775-1-tweek@google.com Signed-off-by: Miguel Ojeda Signed-off-by: Sasha Levin commit 43d2b3ac32ac7a3ed66f74f87b465b64330173b7 Author: Mario Limonciello Date: Mon Sep 21 14:02:33 2026 -0500 cpufreq: amd-pstate: Propagate cppc_set_auto_sel() errors on mode change [ Upstream commit 8de705037124dd1cd49bd8cae6536d63ec4e1807 ] amd_pstate_change_mode_without_dvr_change() iterates over the online CPUs and calls cppc_set_auto_sel() to enable or disable hardware autonomous selection, but discards its return value and unconditionally returns 0. If the firmware rejects the request, the failure is hidden: the cpufreq core records the mode transition as successful while the hardware stays in its previous autonomous-selection state. The software mode and the actual hardware behaviour then disagree, breaking the expected frequency scaling. Check the return value of cppc_set_auto_sel() and propagate the first error to the caller so the sysfs write reports the failure. Reported-by: Sashiko Closes: https://sashiko.dev/#/bug/linux-d114a94a-655b-43a6-91b1-9484889726c9 Fixes: 3ca7bc818d8c ("cpufreq: amd-pstate: Add guided mode control support via sysfs") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20260921190235.3651688-2-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Sasha Levin commit 895feb8b824a929892d0d19a58c7e0095aa630d0 Author: Mario Limonciello Date: Mon Sep 21 14:02:32 2026 -0500 cpufreq: amd-pstate: Restore previous mode when changing driver mode fails [ Upstream commit f6d3cbc63935fa8911da87e91ed768824d495470 ] amd_pstate_change_driver_mode() unregisters the currently active driver before registering the requested mode. If amd_pstate_register_driver() fails for the new mode, the function returns the error without restoring anything, leaving the system with no cpufreq scaling driver at all until a valid mode is manually re-selected. Remember the mode that was active before the transition and, if registering the requested mode fails, register the previous mode again so the system keeps a working scaling driver. The original error is still returned to the caller so the sysfs write reports the failure. Reported-by: Sashiko Closes: https://sashiko.dev/#/bug/linux-5b138ddb-c88b-4f82-8a2d-f39446b625d4 Fixes: 3ca7bc818d8c ("cpufreq: amd-pstate: Add guided mode control support via sysfs") Signed-off-by: Mario Limonciello Link: https://lore.kernel.org/r/20260921190235.3651688-1-mario.limonciello@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Sasha Levin commit 1160096565fc51013138ebab8d6cd5878652b5ee Author: Bjorn Helgaas Date: Wed Sep 23 14:57:20 2026 -0500 PCI: tegra264: Fix Link Capabilities register offset [ Upstream commit 42b5b17cf4bb6154028b31f12db94ecb9069fd74 ] The PCI Express Capability begins at 0x48. Link Capabilities is a 32-bit register at offset 0xc, and Link Status is a 16-bit register at offset 0x12: Link Capabilities is at 0x48 + 0xc = 0x54 Link Status is at 0x48 + 0x12 = 0x5a Previously the driver read Link Capabilities with a 16-bit read from XTL_RC_PCIE_CFG_LINK_CAPS (0x56), which incorrectly read just the upper half of the register. When a hotplug-capable port has no link during probe, tegra264_pcie_icc_set() consequently derives the maximum speed and width from unrelated bits and requests the wrong interconnect bandwidth. Correct the Link Capabilities usage by adding a XTL_RC_PCIE_CAP definition for the base of the PCIe Capability, using the existing PCI_EXP_LNKCAP (0xc) and PCI_EXP_LNKSTA (0x12) offsets so they're easily searchable, and reading the entire 32 bits of Link Capabilities. Fixes: 01c3c27a0ef6 ("PCI: tegra264: Add Tegra264 support") Based-on-patch-by: Linmao Li Link: https://lore.kernel.org/20260827093919.2825467-1-lilinmao@kylinos.cn Signed-off-by: Bjorn Helgaas Tested-by: Thierry Reding Reviewed-by: Thierry Reding Link: https://patch.msgid.link/20260923195719.1933175-2-bhelgaas@google.com Signed-off-by: Sasha Levin commit fb81c122c1432202655e8c0395f2aa361e4b73c3 Author: Arnd Bergmann Date: Tue Sep 15 22:14:28 2026 +0200 drm/amd/display: fix unused function warnings [ Upstream commit a387d5d707850627b0a6d6fd479afc7c83cdb02a ] When CONFIG_DRM_AMD_DC_DCE is disabled, most functions insde dce110_hwseq.c are no longer referenced, causing a lot of warnings such as drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c:3510:13: error: 'dce110_enable_analog_link_output' defined but not used [-Werror=unused-function] 3510 | static void dce110_enable_analog_link_output( | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/amd/amdgpu/../display/dc/hwss/dce110/dce110_hwseq.c:3391:13: error: 'dce110_set_cursor_attribute' defined but not used [-Werror=unused-function] 3391 | static void dce110_set_cursor_attribute(struct pipe_ctx *pipe_ctx) Replace the #ifdef with an IS_ENABLED() check that leads to an empty function in this configuration, so the compiler can eliminate the unused functions and not complain about it. Fixes: cd2cfe4d1504 ("drm/amd/display: gate DCE ASIC code behind CONFIG_DRM_AMD_DC_DCE") Signed-off-by: Arnd Bergmann Reviewed-by: Fangzhi Zuo Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 79526c41d9e4849bba91947c80dd1a8ede0e9934 Author: YiPeng Chai Date: Tue Sep 15 14:52:32 2026 +0800 drm/amd/ras: use __le32 pointer type to resolve the sparse warnings [ Upstream commit 7296103acacda6a7514a6215279ef5337a0e19b2 ] Use __le32 pointer type to resolve the sparse warnings. sparse warnings: ras/core/eeprom.c:275:15: sparse: expected unsigned int [usertype] ras/core/eeprom.c:275:15: sparse: got restricted __le32 [usertype] ras/core/eeprom.c:277:15: sparse: expected unsigned int [usertype] ras/core/eeprom.c:277:15: sparse: got restricted __le32 [usertype] ras/core/eeprom.c:288:33: sparse: sparse: cast to restricted __le32 ras/core/eeprom.c:289:33: sparse: sparse: cast to restricted __le32 ras/core/eeprom.c:290:33: sparse: sparse: cast to restricted __le32 ras/core/eeprom.c:291:33: sparse: sparse: cast to restricted __le32 ras/core/eeprom.c:333:15: sparse: expected unsigned int [usertype] ras/core/eeprom.c:333:15: sparse: got restricted __le32 [usertype] ras/core/eeprom.c:343:15: sparse: sparse: cast to restricted __le32 Fixes: 5c3be5defc92 ("drm/amd/ras: Add eeprom ras functions") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202609101657.kczNjTnY-lkp@intel.com/ Signed-off-by: YiPeng Chai Acked-by: Alex Deucher Reviewed-by: Tao Zhou Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit bbe972532966269d52f689d0595b6ac30201cda3 Author: Jesse Zhang Date: Wed Sep 23 17:43:06 2026 +0800 drm/amdgpu/userq: fix reading the WPTR at a non-zero BO offset [ Upstream commit c7ae3b2043282da8de92bd925c8f6bb614633181 ] The user queue UAPI permits the WPTR at any 8-byte aligned offset within a BO. amdgpu_userq_fence_read_wptr() locates the mapping containing the WPTR address, but amdgpu_bo_kmap() returns the start of the BO, so the code read the first u64 regardless of the WPTR offset. USERQ_SIGNAL uses this value as the exported fence seqno, so a wrong read makes the fence signal early (or never), breaking dependency synchronization. Translate the WPTR GPU address to a byte offset within the BO, accounting for the VA mapping start and the mapping's BO offset, before reading it. Fixes: a292fdecd728 ("drm/amdgpu: Implement userqueue signal/wait IOCTL") Reviewed-by: Alex Deucher Signed-off-by: Jesse Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit dca6d7e4d43d28c4cbd34adc86ab398de4bb25cf Author: Dmytro Laktyushkin Date: Mon Sep 21 15:16:25 2026 -0400 drm/amd/display: Enable dcn42 pstate pmo [ Upstream commit 0d07b189787617a8f2d62e0d2c67573b590a36ff ] Set a flag to enable pstate pmo, we want to always allow pstate support on dcn42 Partial application: DCN42B resource constructor only. Fixes: 6352e6027307 ("drm/amd/display: Enable dcn42 pstate pmo") Signed-off-by: Dmytro Laktyushkin Signed-off-by: Fangzhi Zuo Reviewed-by: Nicholas Kazlauskas Tested-by: Dan Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit bfbf972d459ae5658e7925e4d60e99fcc1126b94 Author: Bjoern Doebel Date: Wed Sep 30 13:55:30 2026 +0000 selftests/rdma: Skip rxe_sent_rcvd_bytes when rdma_rxe is missing [ Upstream commit d2c08575500145dc5cb55075cd9b177626531613 ] On a kernel built without CONFIG_RDMA_RXE the test exits 1 instead of skipping: # modprobe: FATAL: Module rdma_rxe not found in directory ... not ok 467 selftests: rdma: rxe_sent_rcvd_bytes.sh # exit=1 Every other test in this directory probes with modinfo and exits $KSFT_SKIP. Apply the same guard, identical to the one in the otherwise near-identical rxe_socket_with_netns.sh. Fixes: c67bd973695c3 ("selftest/rxe: Add selftests for perf") Assisted-by: kiro:claude-opus-5 Signed-off-by: Bjoern Doebel Link: https://patch.msgid.link/20260930135530.881281-1-doebel@amazon.de Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 37d7b6f7520948d138b69c07138c3d231dd544a1 Author: Charlene Liu Date: Mon Sep 21 15:15:07 2026 -0400 drm/amd/display: Fix zero dlg_reg write to program_ext_vblank [ Upstream commit 6497a922e7155d2b794ae19feadbe50c23a0fa5a ] [why] fix some non initialized reg_offset allow z8_only to program_ext_vblank [CLEANED] for dml2.1, dlg_reg moved inside hubp_reg add current_compbuf_size check ensure HW state reached. Partial application: DCN42 register-list additions only. Fixes: 0a5e0416e191 ("drm/amd/display: Add DCN42B code to DC") Fixes: 002f32db0d42 ("drm/amd/display: Fix dcn401_optimize_bandwidth") Signed-off-by: Charlene Liu Signed-off-by: Fangzhi Zuo Reviewed-by: Dmytro Laktyushkin Reviewed-by: Leo Chen Tested-by: Dan Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 97cc1191d8e283610afb165fb81b8c9badc0e7fb Author: Ian Rogers Date: Mon Sep 28 11:25:53 2026 -0700 perf thread_map: Add thread_map__tgid() [ Upstream commit 1fdf657871b9240edcaaf1d15caaac5b78a84317 ] bpf-filter reads the tgid of each thread in a thread map from /proc, to key its BPF map by process, and perf trace is about to do the same. Move convert_to_tgid() to thread_map.c as thread_map__tgid(), taking the thread map and index both users have. While moving it, fix two bugs. Match Tgid: at the start of a line, as a task can set its comm, shown on the Name: line before it, to contain "Tgid: ". And check the character after the number before freeing the buffer it points into, rather than after. Fixes: eb1693b1150d4b99 ("perf bpf-filter: Split per-task filter use case") Reviewed-by: Namhyung Kim Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 5577e34ffab1cddcdbf3efa5d947ef72298776d6 Author: Ian Rogers Date: Mon Sep 28 11:25:45 2026 -0700 perf trace: Copy sockaddr arguments by their length [ Upstream commit 1c443dfc3202048b2cb1d3c2534b39b28701e929 ] The BTF augmenter copies sizeof(struct sockaddr), 16 bytes, for the sockaddr arguments of connect, bind and sendto, and runs before the sys_enter_connect and sys_enter_sendto programs that copy their length. An IPv6 address needs 24 or 28 bytes, so the rest was read from past the payload, and now that the printers are bounded only its family is shown. Copy them as buffers sized by the length argument after them, up to the 32 bytes augmented buffers are limited to. That holds an IPv6 address and doubles the AF_LOCAL path shown. Committer testing: Is using BPF: root@x2:~# strace -e bpf perf trace -e connect,bind |& head -5 bpf(BPF_TOKEN_CREATE, {token_create={flags=0, bpffs_fd=12}}, 8) = -1 EOPNOTSUPP (Operation not supported) bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=2, insns=0x7ffea3054260, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, core_relo_cnt=0, fd_array=NULL, core_relos=NULL, core_relo_rec_size=0, log_true_size=0, prog_token_fd=0}, 148) = 12 bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=2, insns=0x7ffea3054390, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, core_relo_cnt=0, fd_array=NULL, core_relos=NULL, core_relo_rec_size=0, log_true_size=0, prog_token_fd=0, fd_array_cnt=0, signature=NULL, signature_size=0, keyring_id=0}, 168) = 12 bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_SOCKET_FILTER, insn_cnt=2, insns=0x7ffea3053f80, license="GPL", log_level=0, log_size=0, log_buf=NULL, kern_version=KERNEL_VERSION(0, 0, 0), prog_flags=0, prog_name="libbpf_nametest", prog_ifindex=0, expected_attach_type=BPF_CGROUP_INET_INGRESS, prog_btf_fd=0, func_info_rec_size=0, func_info=NULL, func_info_cnt=0, line_info_rec_size=0, line_info=NULL, line_info_cnt=0, attach_btf_id=0, attach_prog_fd=0, core_relo_cnt=0, fd_array=NULL, core_relos=NULL, core_relo_rec_size=0, log_true_size=0, prog_token_fd=0}, 148) = 12 bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_ARRAY, key_size=4, value_size=4, max_entries=1, map_flags=BPF_F_MMAPABLE, inner_map_fd=0, map_name="libbpf_mmap", map_ifindex=0, btf_fd=0, btf_key_type_id=0, btf_value_type_id=0, btf_vmlinux_value_type_id=0, map_extra=0, value_type_btf_obj_fd=0, map_token_fd=0, excl_prog_hash=NULL, excl_prog_hash_size=0}, 92) = 12 root@x2:~# And btf: root@x2:~# strace -e openat perf trace -e connect,bind |& grep "/sys/kernel/btf/vmlinux" openat(AT_FDCWD, "/sys/kernel/btf/vmlinux", O_RDONLY) = 12 ^C root@x2:~# And copying the sockaddr parameters according to its addrlen or the cap in the augmented bpf, that probably needs to be a bit bigger for local sockets: ⬢ [acme@toolbx perf-tools-next]$ echo -n /var/run/.heim_org.h5l.kcm-soc | wc -c 30 ⬢ [acme@toolbx perf-tools-next]$ ls -la /var/run/.heim_org.h5l.kcm-socket srw-rw-rw-. 1 nobody nobody 0 Sep 14 23:13 /var/run/.heim_org.h5l.kcm-socket ⬢ [acme@toolbx perf-tools-next]$ root@x2:~# perf trace -e connect,bind --max-events 10 0.000 ( 0.717 ms): pool-0/29901 connect(fd: 9, uservaddr: { .family: LOCAL, path: /var/run/.heim_org.h5l.kcm-soc }, addrlen: 110) = 0 3.733 ( 0.059 ms): pool-0/29901 connect(fd: 10, uservaddr: { .family: LOCAL, path: /var/run/.heim_org.h5l.kcm-soc }, addrlen: 110) = 0 8.859 ( 0.054 ms): pool-0/29901 connect(fd: 9, uservaddr: { .family: LOCAL, path: /var/run/.heim_org.h5l.kcm-soc }, addrlen: 110) = 0 10.880 ( 0.053 ms): pool-0/29901 connect(fd: 9, uservaddr: { .family: LOCAL, path: /var/run/.heim_org.h5l.kcm-soc }, addrlen: 110) = 0 1225.303 ( 0.081 ms): systemd-resolv/103685 connect(fd: 30, uservaddr: { .family: INET6, port: 53, addr: fd55:6f31:c26b::1, scope_id: 4 }, addrlen: 28) = 0 1226.000 ( 0.046 ms): systemd-resolv/103685 connect(fd: 31, uservaddr: { .family: INET6, port: 53, addr: fd55:6f31:c26b::1, scope_id: 4 }, addrlen: 28) = 0 1371.972 ( 0.055 ms): systemd-resolv/103685 connect(fd: 27, uservaddr: { .family: INET6, port: 53, addr: fd55:6f31:c26b::1, scope_id: 4 }, addrlen: 28) = 0 1382.266 ( 0.260 ms): Socket Thread/2663038 connect(fd: 178, uservaddr: { .family: INET, port: 443, addr: 186.192.83.34 }, addrlen: 16) = -1 (unknown) (Operation now in progress) 5003.508 ( 0.063 ms): pool-0/29901 connect(fd: 9, uservaddr: { .family: LOCAL, path: /var/run/.heim_org.h5l.kcm-soc }, addrlen: 110) = 0 5007.007 ( 0.054 ms): pool-0/29901 connect(fd: 10, uservaddr: { .family: LOCAL, path: /var/run/.heim_org.h5l.kcm-soc }, addrlen: 110) = 0 root@x2:~# Fixes: a68fd6a6cdd309bb ("perf trace: Collect augmented data using BPF") Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 4184a993bf6b4c8797bb5bee2dcd9ed53eede520 Author: Lu Yao Date: Sun Sep 20 14:25:10 2026 +0800 drm/amdkfd: drop KFD_QUEUE_TYPE_DIQ note [ Upstream commit 0da420089bdadf26fd02c2144a48faf57736f9fa ] Commit e1b73b64271d ("amdkfd: remove DIQ support") removed the KFD_QUEUE_TYPE_DIQ enumerator from enum kfd_queue_type but left its description behind in the note block. Fixes: e1b73b64271d ("amdkfd: remove DIQ support") Signed-off-by: Lu Yao Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit e36171df596195d602372ac2db1d86717a7a0e69 Author: Danish Khateeb Date: Tue Sep 29 07:49:37 2026 -0500 pps: generators: wake up PPS_GEN_FETCHEVENT readers on unregister [ Upstream commit 5b864f8db0bd33216895f3fe0bb1ec245c596c8e ] A reader sleeping in PPS_GEN_FETCHEVENT waits for the next event, but no event comes after pps_gen_unregister_source(), so the reader sleeps until it gets a signal. A PPS_GEN_FETCHEVENT issued after the unregister sleeps the same way. Wake up the readers on unregister, and make PPS_GEN_FETCHEVENT fail with -ENODEV once the generator is gone, like the other ioctls. The wait checks info without info_lock, so clear it with WRITE_ONCE(). Fixes: 86b525bed275 ("drivers pps: add PPS generators support") Suggested-by: Rodolfo Giometti Assisted-by: LLM Signed-off-by: Danish Khateeb Acked-by: Rodolfo Giometti Link: https://patch.msgid.link/20260929124937.51114-5-danishkhateeb03@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 66bb6151193fe159f0986c119eb74dd7a53720c0 Author: Shuming Fan Date: Thu Oct 1 17:02:19 2026 +0800 ASoC: rt712: avoid duplicate reset in io_init [ Upstream commit 923ff8155ef6e83b73b852300d50f2053b969552 ] The codec should be reset only once during io_init, regardless of whether the system performs a warm or cold reboot. Fixes: 4c9854ad3cdc ("ASoC: rt712-sdca: reset codec at io_init to fix silent headphone") Signed-off-by: Shuming Fan Link: https://patch.msgid.link/20261001090219.797880-1-shumingf@realtek.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit ff52a51ea732ca39e865fb93696be8fddef1b700 Author: Yichong Chen Date: Fri Aug 7 18:00:53 2026 +0800 debugfs: make debugfs_create_str() read-only [ Upstream commit 5ec78be9552035e1e71de218f968c03c44181bf0 ] debugfs_create_str() supports replacing the backing string from userspace. Concurrent writers can race and free the same old string twice. All writable in-tree users have been converted to local file operations. Remove the generic write support from debugfs_create_str(), and refuse to create a file when the caller passes write permission bits. This makes unsupported writable use visible instead of silently creating a file with different permissions. Fixes: 86b5488121db ("debugfs: Add write support to debugfs_create_str()") Signed-off-by: Yichong Chen Link: https://patch.msgid.link/20260807100053.1089834-4-chenyichong@uniontech.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 11a90a27a13ffdf2115e970be56b2010c73cf2fb Author: Yichong Chen Date: Fri Aug 7 18:00:52 2026 +0800 soundwire: debugfs: replace writable string helper [ Upstream commit 98421ba5925fd95db714727f7ae82e87e571979b ] debugfs_create_str() is being made read-only because its generic write path is hard to make safe without adding more locking to the helper. Convert the SoundWire firmware_file entry to a local write-only file operation before removing writable string support from debugfs_create_str(). Copy the firmware name before request_firmware() so later debugfs writes cannot replace the string while it is being used. Signed-off-by: Yichong Chen Link: https://patch.msgid.link/20260807100053.1089834-3-chenyichong@uniontech.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 1f662558b336bfdff989f2953e1f1b46b75c4114 Author: Runyu Xiao Date: Tue Sep 29 21:22:45 2026 +0800 mei: vsc-tp: initialize IRQ state before requesting interrupt [ Upstream commit 7754a2924604ea442ef03ed8fc12ccc9221a2e98 ] request_threaded_irq() enables the interrupt before returning, so the threaded handler may schedule work while the probe is still initializing its mutexes and work item. Initialize that state first and only free the IRQ on paths where the request succeeded. Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device") Assisted-by: LLM Signed-off-by: Runyu Xiao Link: https://patch.msgid.link/20260929132245.2152433-1-runyu.xiao@seu.edu.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 5142bb4d1a63a8d4c07057cac048fe38b1ced9d6 Author: Ruoyu Wang Date: Sat Aug 15 23:17:45 2026 +0800 misc: nsm: fix CBOR short-length decoding [ Upstream commit 6edddc1d101bfd5cafc94ca2dffaf13e4394662d ] CBOR encodes byte-string lengths from 0 through 23 directly in the additional-information field. cbor_object_get_array() only handles 23, so shorter byte strings leave array_len uninitialized. Reserved values 28 through 30 and the unsupported indefinite-length encoding also fall through without assigning it. parse_resp_get_random() then uses the indeterminate value for bounds checking and as the byte count returned to the hwrng core. This can reject a valid short response or report an incorrect amount of entropy. Decode the complete inline-length range and reject unsupported values. Extended definite-length encodings retain their existing behavior, and the existing size and INT_MAX checks continue to bound the returned slice. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: b9873755a6c8 ("misc: Add Nitro Secure Module driver") Assisted-by: unnamed:claude-opus-4.8 typestate Signed-off-by: Ruoyu Wang Link: https://patch.msgid.link/20260815151745.3758574-1-ruoyuw560@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 6108f106130f562ce97cbb5b0e102934ad24599f Author: Jasper Wise Date: Thu Aug 13 08:37:52 2026 +0000 misc: nsm: mark device ready before registering the hwrng and misc device [ Upstream commit e15596e84c818a2b727d2a7cf742a29331e44c43 ] nsm_device_probe() registers an hwrng provider and /dev/nsm. hwrng_register() can make this the current RNG, and the hwrng fill kthread finds it through the RCU-protected get_current_rng() rather than under the rng_mutex that hwrng_register() holds, so it can be in nsm_rng_read() offering buffers and kicking the queue before probe has returned. The driver never calls virtio_device_ready(), so DRIVER_OK is set on its behalf by virtio_dev_probe(), only once probe has returned. The virtio spec is explicit about that ordering in 3.1 Device Initialization: | The driver MUST NOT send any buffer available notifications to the | device before setting DRIVER_OK. A device that waits for DRIVER_OK before servicing the queue therefore leaves that read unanswered. Set DRIVER_OK once the virtqueue exists and before either interface is registered, so that the queue is usable by the time anything that can reach it is published; commit f5866db64f34 ("virtio_console: enable VQs early") and commit 1d774589f924 ("i2c: virtio: mark device ready before registering the adapter") do the same for the same reason. The err_hwrng and err_misc paths then unwind a device that is live, so reset it before deleting the virtqueue - the core only adds VIRTIO_CONFIG_S_FAILED to the status when probe fails, it does not reset. Fixes: b9873755a6c8 ("misc: Add Nitro Secure Module driver") Signed-off-by: Jasper Wise Link: https://patch.msgid.link/20260813083752.581981-1-jaspwise@amazon.co.uk Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 7b138cd144ef18f8cd9ff99cc00f11c465cc3d56 Author: Linkai Gong Date: Thu Aug 6 15:03:58 2026 +0800 misc: enclosure: fix UAF on device_register() failure [ Upstream commit 0f3b12bab74e13a2b8686a49c5b83099da61e032 ] After device_register() fails, the embedded struct device has already been initialized and must be released with put_device() so that enclosure_release() can drop the parent reference and free edev. The error path currently does put_device(parent) + kfree(edev), which skips the device lifetime rules and can free the object while the device core still owns a reference (use-after-free). Fixes: d569d5bb3fd9 ("[SCSI] enclosure: add support for enclosure services") Signed-off-by: Linkai Gong Link: https://patch.msgid.link/20260806070358.1599627-1-gonglinkai@kylinos.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit d9079e8eb14188f57d6553a7433ced6875c83711 Author: Sechang Lim Date: Tue Jun 30 08:47:37 2026 +0000 sched: Set TIF_NEED_RESCHED before calling __trace_set_need_resched() [ Upstream commit 53bc5c556b82a3ca32b62ba349c4511f91526b9f ] set_tsk_need_resched() tests TIF_NEED_RESCHED, calls __trace_set_need_resched() if the flag is clear, then sets it via set_tsk_thread_flag(). A BPF raw_tp program attached to sched_set_need_resched executes synchronously inside __bpf_trace_run(). On return, __bpf_trace_run() drops the RCU lock with rcu_read_unlock_migrate(), which on the preempt-or-BH-disabled path calls set_need_resched_current() -> set_tsk_need_resched() again. set_tsk_thread_flag() follows the tracepoint call, so every re-entrant frame sees TIF_NEED_RESCHED clear and calls __trace_set_need_resched() again: BUG: TASK stack guard page was hit at ffffc9001224ff98 Oops: stack guard page: 0000 [#1] SMP KASAN PTI RIP: 0010:__bpf_trace_sched_set_need_resched_tp+0x1c/0x190 Call Trace: trace_sched_set_need_resched_tp+0x110/0x130 set_tsk_need_resched include/linux/sched.h:2076 set_need_resched_current include/linux/sched.h:2094 rcu_read_unlock_special+0x43a/0x440 __rcu_read_unlock+0x9e/0x120 rcu_read_unlock_migrate+0xa9/0x240 __bpf_trace_run+0x131/0x180 bpf_trace_run3+0x333/0x430 __bpf_trace_sched_set_need_resched_tp+0x13a/0x190 trace_sched_set_need_resched_tp+0x110/0x130 set_tsk_need_resched include/linux/sched.h:2076 ... __resched_curr() has the same ordering, firing the tracepoint before setting the flag via set_ti_thread_flag() or set_nr_and_not_polling(). Fix it for consistency. Replace the separate test_tsk_thread_flag() + set_tsk_thread_flag() pair in set_tsk_need_resched() with test_and_set_tsk_thread_flag(). In __resched_curr(), move the tracepoint call after the flag is set in each path. Fixes: adcc3bfa8806 ("sched: Adapt sched tracepoints for RV task model") Signed-off-by: Sechang Lim Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Andrea Righi Acked-by: Gabriele Monaco Link: https://patch.msgid.link/20260630084750.2792851-1-rhkrqnwk98@gmail.com Signed-off-by: Sasha Levin commit d7079421c52ab33407c5a431769c3b48be4055ab Author: Nam Cao Date: Thu Oct 1 06:42:18 2026 +0200 rv/rtapp/wakeup: Use "rv_this" the rv_monitor variable [ Upstream commit 5e9bdf2924c9041ff1520b528db6104626e9ef41 ] Commit d9e4c61a12dd ("rv: Use generic rv_this for the rv_monitor variable in LTL") renamed the rv_monitor variable to rv_this. But rtapp/wakeup monitor was late to the party and missed that. So for this monitor, rv_this is an empty struct. The reactor fails to work, because rv_react() checks monitor->react and sees NULL. Correct to "rv_this" and make the reactor work again. Signed-off-by: Nam Cao Fixes: d9e4c61a12dd ("rv: Use generic rv_this for the rv_monitor variable in LTL") Link: https://lore.kernel.org/r/20261001044218.3508990-1-namcao@linutronix.de Signed-off-by: Gabriele Monaco Signed-off-by: Sasha Levin commit a032f611227ecdc0d6d9e6e97f7c5d2ef9d110fc Author: Wen Yang Date: Tue Sep 15 03:13:34 2026 +0800 rv: Use LD_WAIT_SPIN as the reactor lockdep wait type [ Upstream commit 39ccedfd9e55c95e440c26611a1db750b92b83bf ] rv_react() overrides the lockdep wait type to LD_WAIT_FREE to enforce that reactor callbacks take no locks. But callbacks run in the context of the triggering tracepoint, which can be preemptible task context on any kernel. A timer interrupt firing during the callback makes the interrupt-exit path schedule and take rq->__lock (LD_WAIT_SPIN) while the LD_WAIT_FREE override is still held, producing a spurious "Invalid wait context" warning: [ BUG: Invalid wait context ] context-{5:5} 1 lock held by kunit_try_catch/209: #0: (rv_react_map-wait-type-override){+.+.}-{1:1} kunit_try_catch/209 is trying to lock: ffff8a743ed3e8a0 (&rq->__lock){-...}-{2:2} Use LD_WAIT_SPIN instead of LD_WAIT_FREE, which causes false-positive warnings in preemptible contexts due to scheduler preemption taking rq->__lock. Fixes: 69d8895cb9a9 ("rv: Add explicit lockdep context for reactors") Reviewed-by: Gabriele Monaco Signed-off-by: Wen Yang Cc: Thomas Weißschuh Link: https://lore.kernel.org/r/5586dd00789a0f904cc299cd8889744b8c6f8dc9.1789412799.git.wen.yang@linux.dev Signed-off-by: Gabriele Monaco Signed-off-by: Sasha Levin commit 9cb035a90aa47ffb8d6b610aefc62949ce6b9b10 Author: Omar Ramadan Date: Mon Sep 28 21:15:57 2026 +0300 amt: pull the AMT header behind the transport header in amt_parse_type() [ Upstream commit eb0c18404c8943356f4aa164e5db9067b79ea93c ] A gateway's encap socket passes ICMP errors to amt_err_lookup(), which calls amt_parse_type() on the quoted datagram to see which AMT message failed. On that path skb->data points at the quoted IP header and the transport header at the quoted UDP header, and icmp_socket_deliver() only guarantees the quoted IP header plus 8 bytes, that is, up to the end of the UDP header. amt_parse_type() pulls sizeof(struct udphdr) + sizeof(struct amt_header) bytes from skb->data, which on this path stays inside the quoted IP header, and then reads the AMT header behind udp_hdr(skb). An ICMP error that quotes only the IP and UDP headers of a Request, the minimum RFC 792 asks for, therefore makes it read past the pulled data, and past the end of the packet when nothing follows. Pull up to the transport header plus the UDP and AMT headers, as vxlan_err_lookup() does. amt_rcv() is called with the transport header at skb->data, so the pull on the receive path does not change. Fixes: cbc21dc1cfe9 ("amt: add data plane of amt interface") Signed-off-by: Omar Ramadan Reviewed-by: Eric Dumazet Reviewed-by: Eric Dumazet Link: https://patch.msgid.link/20260928181557.85796-1-omar@blockcast.net Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 3c82e978a0b0a45f521b8c200c037d50d66080e8 Author: Yuya Kusakabe Date: Sat Sep 26 20:19:27 2026 +0900 seg6: fix HMAC validation when an extension header precedes the SRH [ Upstream commit f9cb4d296d81adb0923546ca5d54fae57a81af52 ] seg6_hmac_validate_skb() derived the SRH from skb_transport_header(). That only holds while the two coincide, which is not true on the seg6_local input path. ip6_rcv_core() leaves the transport header just past the IPv6 header. A Hop-by-Hop options header is consumed before the route lookup and advances it, but a Destination Options header is not: the seg6_local lwtunnel is entered through an input redirect from the route lookup, which bypasses the extension header handlers. The transport header then still points at the Destination Options header while seg6_get_srh() has located the real SRH further down the chain. The HMAC is therefore computed over the Destination Options header, and a packet carrying a valid HMAC TLV is dropped when seg6_require_hmac is set. Such a packet is legitimate: RFC 8200 allows Destination Options before a routing header, and get_srh() has walked the header chain since commit 5829d70b0b6c ("ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200""). With a Fragment or an Authentication header in front of the SRH, the same mistake also reads past the data pulled by seg6_get_srh(). This happens before seg6_require_hmac is read, so the default configuration is affected. Reproduce by giving a node a seg6local End SID with net.ipv6.conf..seg6_require_hmac=1 and a key installed with "ip sr hmac set sha1", then sending IPv6 -> Destination Options -> SRH (carrying a valid HMAC TLV) -> payload to that SID: it is dropped, while the same packet without the Destination Options header passes. Fixes: 5829d70b0b6c ("ipv6: sr: fix get_srh() to comply with IPv6 standard "RFC 8200"") Assisted-by: LLM Signed-off-by: Yuya Kusakabe Reviewed-by: Andrea Mayer Link: https://patch.msgid.link/20260926-b4-seg6-hmac-transport-header-v2-1-8087b76f6375@gmail.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 0bd73fe865796391d4935db9a8c447aad60d116b Author: Barnabás Pőcze Date: Tue Sep 29 15:30:21 2026 +0200 media: rcar-isp: ispcore: Fix inconsistent step sizes [ Upstream commit a5b7cf994f6361e2c7be43979c82f16f897afa63 ] `risp_io_{input,capture}_enum_framesizes()` sets the horizonal and vertical step size to 2. However, `risp_io_{input,capture}_try_format()` passes 2 to `v4l_bound_align_image()`, which corresponds to a step size of 2^2 = 4. So move these constants into macros to avoid the repetition, and with that, use 4 as the step size everywhere. Fixes: 2151350f60d1 ("media: rcar-isp: Add support for ISPCORE") Signed-off-by: Barnabás Pőcze Reviewed-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Sasha Levin commit 748b6ef3cb9785b8774f406a8bc33e7cee297373 Author: Christopher Snowhill Date: Tue Sep 29 19:01:38 2026 -0700 media: em28xx: hold the vb2 queue lock when releasing the queue on close [ Upstream commit 37f4b2004b9a22e70a289be77451f9f2b278142a ] Commit de626073dfcb ("media: em28xx: drop 'users' field") replaced the vb2_fop_release() call in em28xx_v4l2_close() with _vb2_fop_release(filp, NULL) under dev->lock. vb2_fop_release() took the vb2 queue lock, but the new call takes no lock at all. The video and VBI queues have their own locks (vb_queue_lock and vb_vbi_queue_lock), and v4l2_ioctl_get_lock() serializes the queue ioctls with those rather than dev->lock. The queue can therefore be released on close while another file handle is in the middle of VIDIOC_REQBUFS. __vb2_queue_alloc() adds each buffer to the queue before allocating its planes, so the release can find an MMAP buffer whose mem_priv is still NULL and hand it to vb2_vmalloc_put(): BUG: kernel NULL pointer dereference, address: 0000000000000020 RIP: 0010:vb2_vmalloc_put+0xe/0x50 [videobuf2_vmalloc] Call Trace: __vb2_queue_free+0x14e/0x350 [videobuf2_common] vb2_core_queue_release+0x3b/0x80 [videobuf2_common] _vb2_fop_release+0x44/0x70 [videobuf2_v4l2] em28xx_v4l2_close+0x60/0x140 [em28xx_v4l] v4l2_release+0x9d/0xf0 [videodev] __fput+0xfd/0x280 This was hit with OBS on a MyGica iGrabber (card=105). Pass the queue lock to _vb2_fop_release(). Taking it while holding dev->lock matches the existing order in em28xx_v4l2_fini(), where vb2_video_unregister_device() takes the queue lock under dev->lock. Fixes: de626073dfcb ("media: em28xx: drop 'users' field") Assisted-by: LLM Signed-off-by: Christopher Snowhill Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin commit 25e9313f363cf33961ce3c67a39e1f73baec35ad Author: Cong Nguyen Date: Sun Jul 26 17:04:08 2026 +0700 staging: media: tegra-video: fix syncpoint leak in tegra20 channel init [ Upstream commit db757893500d682996f2ee9bd670f30f7fc504af ] tegra20_channel_host1x_syncpt_init() requests two host1x syncpoints. It stored the first one (mw ack) into chan->mw_ack_sp[0] and only then requested the second one (frame start). If the second request failed the function returned without releasing the first syncpoint, leaking it: the caller tegra_channel_init() bails out with a bare "return ret" on a syncpt init failure and does not run its free_syncpts error path (that path only covers failures after syncpoint init has fully succeeded), and the channel is subsequently torn down via the kfree()-only path, so nothing ever releases the orphaned syncpoint. Release the already-acquired syncpoint on the error path, and only publish the syncpoints into the channel once both have been successfully requested, so chan->mw_ack_sp[0] never holds a released handle. This matches the handling in tegra210_channel_host1x_syncpt_init(). Fixes: 0e2c4117c351 ("staging: media: tegra-video: add CSI support for Tegra20 and Tegra30") Signed-off-by: Cong Nguyen Reviewed-by: Mikko Perttunen Reviewed-by: Svyatoslav Ryhel Reviewed-by: Luca Ceresoli Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin commit 288ee00f962fe3bbdc462aef3596cfc012b12459 Author: Mateusz Nowicki Date: Thu Sep 24 19:38:10 2026 +0000 arm64: dts: st: fix sai3b unit address on stm32mp231 [ Upstream commit 4b14dbc4c636e760f5db5a2e4e1b4589d484a7d2 ] The unit address of the sai3b node, 502b0024, is the address of the SAI_BCR1 register in the secure alias of SAI3. The reg property of the node translates to the non-secure address 0x402b0024, which all other SAI nodes use. Fix the unit address to match. Fixes: e9b03ef21386 ("arm64: dts: st: introduce stm32mp23 SoCs family") Signed-off-by: Mateusz Nowicki Link: https://lore.kernel.org/r/20260924193759.27881-3-mateusz.nowicki@posteo.net Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit e4fd499e98808af68115e774585169d68331bf17 Author: Mateusz Nowicki Date: Thu Sep 24 19:38:09 2026 +0000 arm64: dts: st: fix sai3b unit address on stm32mp251 [ Upstream commit 64a74189380955bd2d45e5e38a90947b0f63efd3 ] The unit address of the sai3b node, 502b0024, is the address of the SAI_BCR1 register in the secure alias of SAI3. The reg property of the node translates to the non-secure address 0x402b0024, which all other SAI nodes use. Fix the unit address to match. Fixes: bf26d75a95f1 ("arm64: dts: st: add sai support on stm32mp251") Signed-off-by: Mateusz Nowicki Link: https://lore.kernel.org/r/20260924193759.27881-2-mateusz.nowicki@posteo.net Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit 564f44159329ccd727ff77020b66f2f3f943bb55 Author: Danish Khateeb Date: Sat Sep 26 11:35:06 2026 -0500 serial: 8250: Fix section mismatch with CONFIG_MODULES=n [ Upstream commit c44a4925cdac02af781ebfae96df68a7bf3580b0 ] Without CONFIG_MODULES, __init_or_module means __init, so serial8250_pnp_exit() and serial8250_hub6_exit() end up in .init.text. They are also called from serial8250_exit(), which is __exit, and modpost warns: WARNING: modpost: vmlinux: section mismatch in reference: serial8250_exit+0x2a (section: .exit.text) -> serial8250_pnp_exit (section: .init.text) The exit code never runs in such a kernel, so nothing breaks at runtime. But a function that is called from both __init and __exit code can't carry either annotation, so drop it. Fixes: a300273c458c ("serial: 8250: hub6: Add cleanup code") Fixes: 4cf187f9dea9 ("serial: 8250: pnp: Annotate init and exit functions for conditional discarding") Assisted-by: LLM Signed-off-by: Danish Khateeb Link: https://patch.msgid.link/20260926163506.487201-1-danishkhateeb03@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit fae994e171ba23dfb9f1947996a1048ab94562dc Author: Nathan Chancellor Date: Sun Sep 27 01:01:17 2026 +0200 serial: 8250_mid: Add missing module namespace import for SERIAL_8250 [ Upstream commit 789f52f83305032ecfaaf7efae9a8ba75815c01b ] After commit 1c305d5f1daa ("serial: 8250_mid: wait for LSR tx empty before setting termios"), modpost errors (or warning with CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y): ERROR: modpost: drivers/tty/serial/8250/8250_mid.ko: module uses symbol 'serial8250_wait_for_xmitr' from namespace 'SERIAL_8250', but does not import it. Add the missing module namespace import to clear up the error/warning. Fixes: 1c305d5f1daa ("serial: 8250_mid: wait for LSR tx empty before setting termios") Signed-off-by: Nathan Chancellor Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20260927-tty-8250_mid-ns-import-v1-1-84d0482e1c5d@kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit c19748feac3d28513d14f76a49ae6c4f71ba2b76 Author: Weigang He Date: Sat Sep 26 03:32:52 2026 +1000 ARM: vexpress: fix device_node refcount leak in vexpress_smp_dt_prepare_cpus() [ Upstream commit 27b98d331f1dcebe088ab51a7061a387a7440cb2 ] vexpress_smp_dt_prepare_cpus() obtains a reference to the SCU device node via of_find_matching_node() and passes it to of_iomap(), but never calls of_node_put() on it. of_iomap() does not take ownership of the node, so the reference is leaked. The function is the .smp_prepare_cpus hook invoked once from the __init SMP bring-up path, so this is a one-shot leak of a single refcount during boot, with no functional impact. Annotate scu with the __free(device_node) cleanup attribute so the reference is released when the function returns. Found while reviewing a CodeQL report for vexpress_flags_set() on the same SMP bring-up path. Fixes: d2606f81d563 ("ARM: vexpress: Simplify SMP operations for DT-powered system") Assisted-by: LLM codeql Signed-off-by: Weigang He Reviewed-by: Liviu Dudau Link: https://patch.msgid.link/20260925173252.933705-3-geoffreyhe2@gmail.com Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin commit 7503de8649ceac53b2ce90f5c26a400aede9f6f0 Author: Weigang He Date: Sat Sep 26 03:32:51 2026 +1000 ARM: vexpress: fix device_node refcount leak in vexpress_flags_set() [ Upstream commit 62b9ae8ae4a7f0b93efa1efa230782b37057b1e7 ] vexpress_flags_set() obtains a reference to the "arm,vexpress-sysreg" device node via of_find_compatible_node() and passes it to of_iomap(), but never calls of_node_put() on it. of_iomap() only reads the node's reg property to create the mapping and does not take ownership, so the node reference is leaked. The function runs from the __init SMP prepare path and caches the mapping in a static, so this is a one-shot leak of a single refcount during boot, with no functional impact. The lookup was added to drivers/mfd/vexpress-sysreg.c by the commit below and later moved here by commit 9b06fc39084e ("ARM: vexpress: Move vexpress_flags_set() into arch code"). Annotate node with the __free(device_node) cleanup attribute so the reference is released when it goes out of scope. Found by static analysis tool CodeQL. Fixes: 974cc7b93441 ("mfd: vexpress: Define the device as MFD cells") Assisted-by: LLM codeql Signed-off-by: Weigang He Reviewed-by: Liviu Dudau Link: https://patch.msgid.link/20260925173252.933705-2-geoffreyhe2@gmail.com Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin commit 78b42d66548c4f8de288875e0077e737fd6efaf2 Author: Liu Dalin Date: Thu Aug 27 16:03:19 2026 +0800 rtc: ftrtc010: use devm clock APIs to fix use-after-disable in remove [ Upstream commit d41ee317c9907d714014d0d5e4726fbd6acf338e ] The driver mixes devm_rtc_register_device() with manual clock disabling in ftrtc010_rtc_remove(). Because the RTC device was registered via devm, it remains registered until devres cleanup runs after .remove() returns. An unprivileged process holding an open /dev/rtc0 file descriptor could issue ioctl(RTC_RD_TIME) during this window, triggering MMIO reads on clock-gated hardware and causing a synchronous external abort. Replace devm_clk_get() + clk_prepare_enable() with devm_clk_get_enabled() to tie clock lifecycle to devres. Remove the manual .remove() callback and the corresponding error handling labels in ftrtc010_rtc_probe(). Fixes: 1d61d2592c1f ("rtc: ftrtc010: Rename to Faraday FTRTC010") Assisted-by: Sashiko AI [static analysis] Signed-off-by: Liu Dalin Reviewed-by: Linus Walleij Tested-by: Liu Dalin Link: https://patch.msgid.link/0238203A74C9B9F6+20260827080320.3351155-3-liudalin@kylinsec.com.cn Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 4802bcce02b41f7d3a03b3a08aa00ae8ee34c1fa Author: Liu Dalin Date: Thu Aug 27 16:03:18 2026 +0800 rtc: ftrtc010: fix clock resource leak on probe failure [ Upstream commit c60478875a445dee1206aad6285c18cd8c91f7f2 ] When devm_rtc_register_device() fails, ftrtc010_rtc_probe() returns the error directly without releasing clocks obtained via clk_prepare_enable(). This leaks both extclk and pclk resources, which may prevent subsequent probe attempts or module removal. Capture the return value and jump to the error handling path to properly release clocks via clk_disable_unprepare(). Fixes smatch warnings: - drivers/rtc/rtc-ftrtc010.c:189 ftrtc010_rtc_probe() warn: 'rtc->extclk' from clk_prepare_enable() not released on lines: 183. - drivers/rtc/rtc-ftrtc010.c:189 ftrtc010_rtc_probe() warn: 'rtc->pclk' from clk_prepare_enable() not released on lines: 183. Fixes: fdcfd854333b ("rtc: rework rtc_register_device() resource management") Assisted-by: smatch:2.0 [static analysis] Signed-off-by: Liu Dalin Reviewed-by: Linus Walleij Tested-by: Liu Dalin Link: https://patch.msgid.link/AC51B5F2C5FFEBB0+20260827080320.3351155-2-liudalin@kylinsec.com.cn Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 8f8c5606c125cba00e491dad0da071e9b59feba5 Author: Chancel Liu Date: Wed Sep 16 12:04:35 2026 +0900 pinctrl: pinctrl-generic-mux: Fix provider resource leak on re-parse [ Upstream commit 707855c21198c6a0b73efa053ac4fe733cbe1985 ] The pinctrl core re-parses a consumer's pinctrl on every probe attempt (pinctrl_bind_pins() runs before the driver's probe(), and again on each deferred-probe retry or re-bind), so .dt_node_to_map() must be side-effect free and safe to call repeatedly. mux_pinmux_dt_node_to_map() instead allocated provider-side resources on every call - the mux_pin_function, the group name table and a mux_state reference, plus a group name and a pinctrl_generic_add_group() registration via pinctrl_generic_to_map(). All of these are allocated with devm_*() against the provider device, so they live for the provider's lifetime and are only released when the provider itself is unbound. The .dt_free_map() path never touches them; it frees the per-consumer pinctrl_map only. Every re-parse therefore adds another set of provider-side allocations that are never reclaimed, so a consumer that repeatedly defers probe or is re-bound leaks memory and mux_state references on the provider without bound. The groups and functions of a board-level mux are static and fully described by the device tree, so build them once at probe time in the new mux_pinctrl_probe_dt(). mux_pinmux_dt_node_to_map() then only looks up the already registered group and builds the per-consumer mux map, which the core frees via .dt_free_map. As the mux has no pin electrical configuration, no config map is emitted. Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/20260824022020.2812810-1-chancel.liu%40oss.nxp.com Fixes: 34acc5a8adfb ("pinctrl: add generic board-level pinctrl driver using mux framework") Signed-off-by: Chancel Liu Assisted-by: LLM Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit 1ca0a33f6cd3eda407e8908af275575d14da857a Author: Ze Huang Date: Sat Sep 19 22:59:35 2026 +0800 drm/imx/lcdc: avoid duplicate clk_per enable [ Upstream commit b08f4d9b21a7846b91bb6c4064f58c3a7ab997c7 ] The simple-KMS helper calls the pipe update after enabling the CRTC. On an enable commit, imx_lcdc_pipe_enable() already programs the mode and enables clk_per. The following pipe update sees the plane move from no CRTC to the active CRTC, treats it as a mode update, and calls imx_lcdc_update_hw_registers() again. That second call has no old CRTC state to disable clk_per first, but it enables clk_per again at the end. The disable path only drops one reference, leaving clk_per enabled after each on/off cycle. Skip the register update from the pipe update path when the CRTC already needs a modeset. The enable path has already programmed the hardware for that commit; keep the event handling in pipe update unchanged. Fixes: c87e859cdeb5 ("drm/imx/lcdc: Implement DRM driver for imx25") Acked-by: Thomas Zimmermann Signed-off-by: Ze Huang Signed-off-by: Thomas Zimmermann Link: https://patch.msgid.link/20260919-b4-imx-simple-kms-v4-v4-1-53b1fdf4589e@oss.qualcomm.com Signed-off-by: Sasha Levin commit ca9fe1f242ebd124f75aa9b1c5e82c161d423410 Author: Karl Mehltretter Date: Sat Sep 12 00:14:43 2026 +0200 OPP: Fix the return value in dev_pm_opp_get_of_node() kernel-doc [ Upstream commit 706081c6b9327dd611dd72b20130a77f0f059b6e ] dev_pm_opp_get_of_node() returns NULL when the OPP is invalid, but its kernel-doc says "else 0 on success", which was never true. Say NULL. Fixes: e2f4b5f8dc59 ("PM / OPP: Implement dev_pm_opp_get_of_node()") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Viresh Kumar Signed-off-by: Sasha Levin commit 392d7349cfce28505b29032383e6674f50bdb0b4 Author: Lucas Costa <2000.costalucas@gmail.com> Date: Tue Sep 22 11:28:51 2026 -0300 staging: sm750fb: free cmap on framebuffer release [ Upstream commit b7c885194b81a0376d1fdb457eac40d21d6fb65f ] The cmap is allocated by lynxfb_set_fbinfo() but never freed, so it is leaked when the framebuffer is torn down. This happens on every unbind, and on the register_framebuffer() error path in sm750fb_framebuffer_alloc(). Add a lynxfb_unset_fbinfo() cleanup counterpart to lynxfb_set_fbinfo() which deallocates the cmap, and call it on teardown. In the alloc error path it is only called once lynxfb_set_fbinfo() has succeeded, so the cmap is only freed when it was actually allocated. Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging") Suggested-by: Dan Carpenter Signed-off-by: Lucas Costa <2000.costalucas@gmail.com> Link: https://patch.msgid.link/20260922142851.46724-1-2000.costalucas@gmail.com Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 978af32fbd1c40579afda9e0555f948dce87815a Author: Xilin Wu Date: Wed Sep 30 20:41:55 2026 +0800 drm/msm/dp: Initialize the debugfs connector pointer [ Upstream commit c2f772ec52898a3f6967d17035da7b739465f81c ] The debugfs cleanup removed the connector assignment from the debug context, but the video-pattern test files still dereference that pointer to check connector status. Reading those files can therefore dereference NULL. Store the supplied connector before creating the debugfs files. Fixes: ab8420418c2e ("drm/msm/dp: cleanup debugfs handling") Assisted-by: LLM Signed-off-by: Xilin Wu Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/757261/ Link: https://lore.kernel.org/r/20260930-msm-dp-hdr10-v1-11-dbbf8b2b42bc@radxa.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin commit 63be642bc8bf8f37d48783253f15daa8de48e1fc Author: Dmitry Baryshkov Date: Mon Sep 14 02:24:24 2026 +0300 drm/msm/mdp5: drop cursor pipe for msm8x76 [ Upstream commit c33cee4c07f1533ad48ed8e3eef75df57edf44c1 ] The MSM8976/56 family of platforms doe't have a separate cursor plane. Instead the cursor is a part of the LM block. Drop the erroneously added pipe configuration, letting LM to provide a legacy cursor instead. Fixes: 1860f2a8b8b1 ("drm/msm/mdp5: Add configuration for msm8x76") Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/753150/ Link: https://lore.kernel.org/r/20260914-mdp5-fix-cursor-v1-1-9fba3ace6cb9@oss.qualcomm.com Signed-off-by: Sasha Levin commit cd487a8e65a3190ffb0e7fb977fc8ccb42fe6102 Author: Krzysztof Kozlowski Date: Fri Sep 11 12:29:40 2026 +0200 dt-bindings: display/msm: hdmi: Correct name of disallowed supplies [ Upstream commit 3309f5c888602c647f50c1921c9b60759fa86c21 ] There are no properties in DTS or Linux drivers called "core-vcc-supplies" or "hdmi-mux-supplies", so the binding probably wanted "-supply" properties instead (which are defined in the top-level properties of the binding). Acked-by: Conor Dooley Signed-off-by: Krzysztof Kozlowski Fixes: 2f14bc38d88a ("dt-bindings: display/msm: hdmi: split and convert to yaml") Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/752661/ Link: https://lore.kernel.org/r/20260911-drm-msm-hdmi-fixes-before-eliza-v4-7-87bdb9f1987f@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin commit af6d5c3f4fca9859a7c601c84ef711a2221bc27f Author: Krzysztof Kozlowski Date: Fri Sep 11 12:29:38 2026 +0200 drm/msm: Properly handle msm_ioremap() without name [ Upstream commit 14fe0ea79e0e25efc603f6f4bc81cb5b813f0e69 ] msm_ioremap() accepts being called without name of the region to map and in such case maps by index 0. However error paths still use the name in error message. Reviewed-by: Abel Vesa Signed-off-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/752660/ Link: https://lore.kernel.org/r/20260911-drm-msm-hdmi-fixes-before-eliza-v4-5-87bdb9f1987f@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Sasha Levin commit bad6f3692c39f1a655d7c61dc4e28d4607b11182 Author: Alexandra Winter Date: Mon Sep 28 17:14:20 2026 +0200 s390/ism: Zerorize dmb at allocation [ Upstream commit a0227fa24e8a2a0397cc4eb669731ff8d9161bbd ] Sashiko reported [1] that 'Missing __GFP_ZERO in folio_alloc() causes uninitialized kernel memory to be exposed in the receive message buffer'. An ism dmb is receive-only, so the data is not leaked to a remote peer. In general the smc kernel module (dibs client) will only push newly received data to userspace. We still should not have uninitialized data in a receive buffer. Since commit 750afb08ca71 ("cross-tree: phase out dma_zalloc_coherent()") dma_alloc_coherent no longer required the __GFP_ZERO flag, but when commit 83781384a96b ("s390/ism: Properly fix receive message buffer allocation") switched to folio_alloc(), it should have added back the __GFP_ZERO flag. Add __GFP_ZERO flag and state in dibs.h that register_dbm() provides a zerorized buffer (dibs_lo already does). Link: https://lore.kernel.org/linux-s390/20260903143746.A5CC41F00A3A@smtp.kernel.org/ [1] Fixes: 83781384a96b ("s390/ism: Properly fix receive message buffer allocation") Signed-off-by: Alexandra Winter Reviewed-by: Julian Ruess Link: https://patch.msgid.link/20260928151420.383105-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 7f19a9ec5e7ba40db48f191868946690ac1b073b Author: Maíra Canal Date: Tue Sep 15 16:42:21 2026 -0300 drm/vc4: Use drm_timeout_rel_to_jiffies() [ Upstream commit 88b7a9fb64afd206b3aad92a96425d2b562774d4 ] vc4_wait_bo_ioctl() converts its timeout with usecs_to_jiffies(), which takes an unsigned int. The microsecond value derived from the u64 timeout_ns is narrowed to fit, so any timeout above UINT_MAX microseconds, around ~71 minutes, wraps into a much shorter one. Unlike the equivalent problem in the other drivers, this one is not limited to 32-bit. Use the shared helper, which takes the duration in ns and clamps the result to MAX_JIFFY_OFFSET. Fixes: 21bd85f82ec2 ("drm/vc4: Use DMA Resv to implement VC4 wait BO IOCTL") Acked-by: Christian König Link: https://patch.msgid.link/20260915-drm-timeout-helpers-v3-6-f2ae987d861f@igalia.com Signed-off-by: Maíra Canal Signed-off-by: Sasha Levin commit ed12884716a120a0969782fefdf4d38be2c9f68d Author: Maíra Canal Date: Tue Sep 15 16:42:17 2026 -0300 drm: Add drm_timeout_rel_to_jiffies() [ Upstream commit 421cf7ccfc61cb990f38d671ddfe3a901519e21d ] drm_timeout_abs_to_jiffies() covers the drivers whose wait UAPI takes an absolute deadline, but there is no equivalent for the drivers that express a wait as a duration. Drivers such as i915 and v3d convert the value themselves. Converting a nanosecond duration to jiffies needs some care. nsecs_to_jiffies() returns unsigned long, so on 32-bit a large userspace-supplied timeout overflows its range and is silently truncated. i915 already handles both cases in a local helper, which v3d has a copy of. Add the same conversion to the core, so that it is available to any driver and both copies can be dropped. Differently from drm_timeout_abs_to_jiffies(), the new function enforces that a timeout in jiffies is a positive value and therefore, returns an unsigned value. Reviewed-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patch.msgid.link/20260915-drm-timeout-helpers-v3-2-f2ae987d861f@igalia.com Signed-off-by: Maíra Canal Stable-dep-of: 88b7a9fb64af ("drm/vc4: Use drm_timeout_rel_to_jiffies()") Signed-off-by: Sasha Levin commit 476a91c44f17296cf1e00340dec8df5f75bfa475 Author: Maíra Canal Date: Tue Sep 15 16:42:16 2026 -0300 drm: Move drm_timeout_abs_to_jiffies() to drm_timeout.c [ Upstream commit ae72b9c39d280e02b1c9e6c91f1f7dd23b550a85 ] drm_timeout_abs_to_jiffies() began as a static helper inside the syncobj wait implementation and was later exported in place, so that it could be called by multiple drivers (e.g. panfrost, lima, tegra and accel drivers). All of them reach it through drm_utils.h. Give it a file of its own, so that timeout conversion helpers have a home, which will be useful when we add new timeout handlers. Also create a drm_timeout.h header to host all timeout-related helpers. The function was moved to the new file as it is, including the use of "signed long" as the return type. Note that the return and parameters types should be reconsidered in the future to better represent the non-negative nature of a timeout. No functional change. Reviewed-by: Tvrtko Ursulin Reviewed-by: Thomas Zimmermann Reviewed-by: Christian König Link: https://patch.msgid.link/20260915-drm-timeout-helpers-v3-1-f2ae987d861f@igalia.com Signed-off-by: Maíra Canal Stable-dep-of: 88b7a9fb64af ("drm/vc4: Use drm_timeout_rel_to_jiffies()") Signed-off-by: Sasha Levin commit 9ea29a1ddb0f26da485b1ed00a5cabaab37d7bb9 Author: Abel Vesa Date: Thu Sep 24 13:39:44 2026 +0300 arm64: dts: qcom: kaanapali: Add GCC CX power domain [ Upstream commit 9339897ad7eded77adf834e032482f7609911448 ] The GCC GDSCs on Kaanapali are backed by the RPMh CX power domain. Without describing that parent domain, consumers of GCC-provided GDSCs can enable their local domain without causing the required CX vote to be held. Add the CX power-domain reference to the GCC node so votes from GCC GDSC consumers can propagate to RPMh CX. Fixes: 2eeb5767d53f ("arm64: dts: qcom: Introduce Kaanapali SoC") Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260924-qcom-tie-cx-to-gcc-v5-28-38732033e5b5@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 3e010b031f15c6fd56eeea6d0800f02038e29fbd Author: Przemek Kitszel Date: Fri Sep 25 15:15:48 2026 +0200 ice: size ring stats arrays from the final queue count [ Upstream commit f1c3b87896e656c1940a1dc3e2f286e000c62da8 ] The ring stats arrays were sized in one place and indexed in another, with nothing reconciling the two. ice_vsi_alloc_stat_arrays() gave up as soon as a container existed: if (pf->vsi_stats[vsi->idx]) /* realloc will happen in rebuild path */ return 0; while ice_vsi_alloc_ring_stats() walks the arrays with ice_for_each_alloc_txq() / ice_for_each_alloc_rxq(), that is, up to vsi->alloc_txq / vsi->alloc_rxq. Whenever the arrays are shorter than the count ice_vsi_set_num_qs() ends up computing, that loop reads and stores past the end of the kmalloc'ed pointer arrays. Deferring to "the rebuild path" does not hold. It cannot get the size right, and some paths never call it at all. ice_devlink_reinit_down() is one of the latter. It calls ice_vsi_decfg() directly, which does not free pf->vsi_stats[], and nothing on the way down releases the main VSI's entry either: ice_dealloc_vsis() runs only from ice_init()/ice_deinit(), and the single entry that ice_unload() does drop is the control VSI's, via ice_deinit_fdir(). The main VSI's arrays therefore survive the reload, while ice_devlink_reinit_up() runs ice_vsi_cfg() and recomputes the count from netif_get_num_default_rss_queues(), which follows cpu_online_mask. Sizing the arrays with most CPUs offline and then onlining them is enough, no VF involved: for c in /sys/devices/system/cpu/cpu[0-9]*/online; do echo 0 > $c; done echo 0000:18:00.0 > /sys/bus/pci/drivers/ice/unbind echo 0000:18:00.0 > /sys/bus/pci/drivers/ice/bind for c in /sys/devices/system/cpu/cpu[0-9]*/online; do echo 1 > $c; done devlink dev reload pci/0000:18:00.0 action driver_reinit The unbind/bind is what makes the arrays actually be allocated at the small size; a reload alone only reuses them. The read then runs off the end of tx_ring_stats[] and picks up whatever follows it in kmalloc-32. Here that was a string, 0x74756f5f6c697475 spelling "util_out" in memory order. It is stored into ring->ring_stats and faults on the first dereference, in ice_setup_tx_ring(), call trace: RIP: 0010:ice_setup_tx_ring+0x8d/0xe0 [ice] ice_vsi_setup_tx_rings+0x2a/0x80 [ice] ice_vsi_open+0x28/0x170 [ice] ice_open_internal+0xc9/0x160 [ice] __dev_open+0x138/0x2b0 __dev_change_flags+0x1d5/0x250 netif_change_flags+0x21/0x60 do_setlink.constprop.0+0x336/0xcf0 rtnl_newlink+0x4a4/0x9b0 Even where the rebuild path does run, it sizes the arrays before ice_vsi_decfg() returns the queues to the PF pool, and for an ICE_VSI_PF VSI with no explicit request it derives the count from that shared pool. Nothing serializes it against the recount in ice_vsi_set_num_qs(), so a concurrent release, say "echo 0 > sriov_numvfs", leaves the final count larger than the arrays that were already installed. ice_vsi_alloc_stat_arrays() runs from ice_vsi_cfg_def(), right after ice_vsi_alloc_def() called ice_vsi_set_num_qs(), so it is the first place where the queue count is final. Make it the only authority: keep the existing arrays when they are already long enough, and otherwise grow them with ice_vsi_install_stat_arrays(), which carries the surviving entries over. The check only forces a grow: while both arrays are long enough they are kept, an oversized one being merely wasteful. Once either is too short the whole container is replaced, and then the other one follows the final count too, shrinking if that is what it takes. Michal Schmidt hit the same corruption through the VF path, where a guest raises its queue count with VIRTCHNL_OP_REQUEST_QUEUES and the following VF reset reconfigures the VSI with the larger count while the old, shorter arrays are still installed: BUG: KASAN: slab-out-of-bounds in ice_vsi_alloc_ring_stats+0x385/0x4a0 [ice] Workqueue: ice ice_service_task [ice] Call Trace: kasan_report+0xd7/0x120 ice_vsi_alloc_ring_stats+0x385/0x4a0 [ice] ice_vsi_cfg_def+0x12e2/0x2060 [ice] ice_vsi_cfg+0xb5/0x3c0 [ice] ice_reset_vf+0x858/0xf80 [ice] ice_vc_request_qs_msg+0x1da/0x290 [ice] ice_vc_process_vf_msg+0xb15/0x1430 [ice] __ice_clean_ctrlq+0x70d/0x9d0 [ice] ice_service_task+0x840/0xf20 [ice] process_one_work+0x690/0xff0 worker_thread+0x4d9/0xd20 kthread+0x322/0x410 ret_from_fork+0x332/0x660 ret_from_fork_asm+0x1a/0x30 Allocated by task 2439: kasan_save_stack+0x1c/0x40 kasan_save_track+0x10/0x30 __kasan_kmalloc+0x96/0xb0 __kmalloc_noprof+0x1d8/0x580 ice_vsi_cfg_def+0x115c/0x2060 [ice] ice_vsi_cfg+0xb5/0x3c0 [ice] ice_vsi_setup+0x180/0x320 [ice] ice_start_vfs+0x1f3/0x590 [ice] ice_ena_vfs+0x66d/0x798 [ice] ice_sriov_configure.cold+0xe4/0x121 [ice] sriov_numvfs_store+0x279/0x480 kernfs_fop_write_iter+0x331/0x4f0 vfs_write+0x4c4/0xe40 ksys_write+0x10c/0x240 do_syscall_64+0xd9/0x650 entry_SYSCALL_64_after_hwframe+0x76/0x7e The buggy address belongs to the object at ffff88810affea40 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 0 bytes to the right of allocated 32-byte region [ffff88810affea40, ffff88810affea60) Fixes: 288ecf491b16 ("ice: Accumulate ring statistics over reset") Reported-by: Michal Schmidt Closes: https://redhat.atlassian.net/browse/RHEL-164321 Signed-off-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20260925132636.123300-7-przemyslaw.kitszel@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 2f7b37855ac4e12bab04224b67645282bce55550 Author: Przemek Kitszel Date: Fri Sep 25 15:15:47 2026 +0200 ice: rebuild ring stats arrays instead of reallocating them in place [ Upstream commit 66444f06a9fe96ac49f5c168d06aaebbfa109c9e ] ice_vsi_realloc_stat_arrays() resized the ring stats arrays in place with krealloc_array(), sizing them from vsi->req_txq/req_rxq. That is not what ice_vsi_set_num_qs() computes later in ice_vsi_cfg_def(), so after a rebuild the arrays could end up shorter than vsi->alloc_txq / vsi->alloc_rxq, and ice_vsi_alloc_ring_stats() then walked past their end. The VF case shows the divergence. ice_sriov_set_msix_vec_count() writes vsi->req_txq and then calls ice_vsi_rebuild(), so the old resizer sized from req_txq, while ice_vsi_get_num_qs() reads vf->num_req_qs ?: vf->num_vf_qs and ignores req_txq entirely. Once a guest has raised vf->num_req_qs through VIRTCHNL_OP_REQUEST_QUEUES the two disagree and the arrays come out shorter than the alloc_txq/alloc_rxq the rebuild installs. The reset that such a request triggers is a different path, ice_vf_reconfig_vsi(), which does not use this resizer at all; that one is handled by the next patch. Replace it with ice_vsi_resize_stat_arrays(), which allocates a fresh struct ice_vsi_stats instead, sized with ice_vsi_get_num_qs() and the queues ice_vsi_decfg() is about to return to the PF pool, which is exactly what ice_vsi_set_num_qs() will compute once they are back there, barring a concurrent change of the PF pool; the next patch stops relying on that. Copy the surviving entry pointers over and install the new structure, all before ice_vsi_decfg() runs. The entries that did not fit are freed by ice_vsi_free_unused_stat_arrays(); the old container itself then goes through __ice_vsi_free_stats() with @free_entries set to false, since the entries it still points at now belong to the new structure. Allocating up front also means a failure no longer leaves a half-updated ice_vsi_stats behind, with the Tx array already swapped and its surplus Tx entries already freed, but the Rx allocation failed. Put the allocate-install-free-surplus sequence in ice_vsi_install_stat_arrays(), next to ice_vsi_new_stat_arrays(), so that only the sizing decision is left in the resizer. Signed-off-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20260925132636.123300-6-przemyslaw.kitszel@intel.com Signed-off-by: Jakub Kicinski Stable-dep-of: f1c3b87896e6 ("ice: size ring stats arrays from the final queue count") Signed-off-by: Sasha Levin commit 0fda7aee2ab1575448b6456c455805266d273970 Author: Przemek Kitszel Date: Fri Sep 25 15:15:46 2026 +0200 ice: extract ice_vsi_get_num_qs() [ Upstream commit 4425fa055c0da53c893ff5989b63cd04b9c8353b ] ice_vsi_set_num_qs() mixed two things: deciding how many queues a VSI gets, and applying all the side effects of that decision. Split the decision out into ice_vsi_get_num_qs(), returning both counts at once. To make that possible, group alloc_txq and alloc_rxq in struct ice_vsi with struct_group_tagged(), which gives the return type without adding any new storage. Field order changes slightly, num_txq now follows alloc_rxq, but nothing depends on it. ice_vsi_get_num_qs() takes @held_txq and @held_rxq from the start, even though the only caller so far passes zero for both. They let a caller ask what the counts would be once the queues the VSI currently owns are back in the PF pool. A later commit adds the caller that needs this: the rebuild path has to size its ring stats arrays before ice_vsi_decfg() releases the queues, yet the arrays must match what ice_vsi_set_num_qs() computes afterwards. While reshaping the whole body, drop the kernel-doc line promising a return value; ice_vsi_set_num_qs() returns void. No functional change intended. Signed-off-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20260925132636.123300-5-przemyslaw.kitszel@intel.com Signed-off-by: Jakub Kicinski Stable-dep-of: f1c3b87896e6 ("ice: size ring stats arrays from the final queue count") Signed-off-by: Sasha Levin commit b40533752e0d60e037a858c299d90cada61f98e9 Author: Przemek Kitszel Date: Fri Sep 25 15:15:45 2026 +0200 ice: extract ice_vsi_new_stat_arrays() [ Upstream commit ed3cbc4430c2f365281623b8c9fa81e47f4e8d31 ] Split the allocation of a struct ice_vsi_stats and its two ring stats arrays out of ice_vsi_alloc_stat_arrays(), which is left with just the lookup and the store into pf->vsi_stats[]. The sole caller keeps passing the very same queue counts as before, vsi->alloc_txq and vsi->alloc_rxq. A later commit adds a second caller in the rebuild path, which cannot use vsi->alloc_* because it has to size the arrays before the VSI is reconfigured. Note that the error path no longer clears pf->vsi_stats[vsi->idx]; the early return above guarantees it is already NULL. No functional change intended. Signed-off-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20260925132636.123300-4-przemyslaw.kitszel@intel.com Signed-off-by: Jakub Kicinski Stable-dep-of: f1c3b87896e6 ("ice: size ring stats arrays from the final queue count") Signed-off-by: Sasha Levin commit 86812f8602b90d049e4a5773850c418a58536bb9 Author: Przemek Kitszel Date: Fri Sep 25 15:15:44 2026 +0200 ice: extract __ice_vsi_free_stats() [ Upstream commit db61b199031c614d1a98e844af00e3c426fc9d5f ] Record the length of each ring stats array in struct ice_vsi_stats, so that freeing the array entries no longer needs the owning VSI. Keep the new fields in sync in both places that size the arrays. With that, the body of ice_vsi_free_stats() becomes independent of the VSI and can be split out as __ice_vsi_free_stats(). The @free_entries parameter is always true here; a later commit adds a caller that frees only the array container, after its entries have been handed over to a freshly allocated stats structure. The free path now stops at the recorded length instead of the VSI queue count, so it follows the real allocation rather than a number that can disagree with it. Sizing still does not: "ice: rebuild ring stats arrays instead of reallocating them in place" starts using the lengths to carry entries over, and only "ice: size ring stats arrays from the final queue count" makes them authoritative for the allocation path. Signed-off-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20260925132636.123300-3-przemyslaw.kitszel@intel.com Signed-off-by: Jakub Kicinski Stable-dep-of: f1c3b87896e6 ("ice: size ring stats arrays from the final queue count") Signed-off-by: Sasha Levin commit 6d7ca893c85c50c1adbcb44c2765ed0ec72d3e1b Author: Przemek Kitszel Date: Fri Sep 25 15:15:43 2026 +0200 ice: skip stats handling for channel VSIs on rebuild [ Upstream commit 3fca849c965333f387aa02dca02326ce3abd1305 ] ice_vsi_alloc_stat_arrays() returns early for ICE_VSI_CHNL, so a channel VSI never gets an entry in pf->vsi_stats[]. ice_vsi_realloc_stat_arrays() dereferences that entry unconditionally, and ice_vsi_rebuild() calls it before anything else, so the NULL is not filtered out anywhere. The path is live. ice_prepare_for_reset() removes the queue channels only for resets other than a PFR, so a PFR leaves the channel VSIs in place, and ice_rebuild() then calls ice_rebuild_channels(), which rebuilds every ICE_VSI_CHNL VSI it finds. A PF reset with ADQ (mqprio hardware offload) configured thus dereferences NULL. That combination is reset recovery on top of an active mqprio offload, which is why it went unnoticed. It was found while refactoring this code, not reported by a user. I'm leaning towards removing our limited (compared to OOT ADQ) support, but it's outside of this series. Bug could be triggered by: tc qdisc del dev "$IF" root 2>/dev/null || true tc qdisc add dev "$IF" root mqprio num_tc 2 \ map 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 \ queues 2@0 2@2 hw 1 mode channel sleep 3 ethtool --reset "$IF" irq dma filter offload Workqueue: ice ice_service_task [ice] RIP: 0010:ice_vsi_rebuild+0x289/0x380 [ice] ice_rebuild_channels+0xd6/0x320 [ice] ice_rebuild+0x4f6/0x540 [ice] ice_do_reset+0x9f/0x1a0 [ice] ice_service_task+0x4a/0x460 [ice] Fixes: 5995ef88e3a8 ("ice: realloc VSI stats arrays") Signed-off-by: Przemek Kitszel Reviewed-by: Aleksandr Loktionov Link: https://patch.msgid.link/20260925132636.123300-2-przemyslaw.kitszel@intel.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 2c1b4d2e2aeb4bd4c2e9e39ae66648d1a111132d Author: Lu Yao Date: Tue Sep 8 13:52:02 2026 +0800 drm/amd/display: Fix wrong plane index in dcn6 writeback latency loop [ Upstream commit 2c3ed158087d2971cad00faab24e2143eef49944 ] Use plane_descriptors[k] for the loop bound, matching the loop body. Fixes: 7f7d7ea1fa51 ("drm/amd/display: Add new sources for DCN6") Reviewed-by: George Zhang Signed-off-by: Lu Yao Tested-by: Dan Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 12b5f9b52e04a5d828344dd2e57b6880cb443522 Author: Qingfang Deng Date: Sun Sep 20 12:07:37 2026 +0800 ARM: mvebu: fix Cortex-A9 errata selection for Armada 38x [ Upstream commit 76e67df8bc1cb72157368c3669119e64cdb0a6a6 ] Armada 38x uses Cortex-A9 r4p1, but MACH_ARMADA_38X selects the workaround for erratum 720789, which was fixed in r2p0, and omits workarounds for errata that still affect r4p1. Drop ARM_ERRATA_720789 and select ARM_ERRATA_754322 for faulty MMU translations following an ASID switch and ARM_ERRATA_764319 for unexpected undefined instruction exceptions when reading debug registers. Also select ARM_ERRATA_764369 when SMP is enabled to work around cache maintenance by MVA failing to reach other agents. The Cortex-A9 r4 Software Developers Errata Notice (ARM UAN 0009D) lists these errata in sections 2.3.3, 2.5.10 and 2.3.4, respectively. Link: https://documentation-service.arm.com/static/608118675e70d934bc69f143 Fixes: 9aa30f1c13d1 ("ARM: mvebu: add initial support for the Armada 380/385 SOCs") Signed-off-by: Qingfang Deng Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit 0f879aa005ddd87adba3617fc2e95e3372ecb620 Author: Matthias Goergens Date: Sat Sep 26 13:21:17 2026 +0800 x86/hibernate: Ignore page-zero RAM in E820 checksum [ Upstream commit 29671cabfc09afb1ee2426b21173cdde276a95ac ] The legacy kexec_load path reconstructs the E820 map exported through sysfs. kexec-tools leaves the first 1 KiB unavailable for the real-mode transition, so a kernel entered through kexec_load can see conventional RAM starting at 0x400. A subsequent firmware boot reports the same RAM range starting at zero. The hibernation E820 checksum compares those byte representations and rejects the image, even though the maps agree from page one onwards. A QEMU guest showed this transition: firmware: RAM [0-0x9fbff] kexec_load: gap [0-0x3ff], RAM [0x400-0x9fbff] firmware: RAM [0-0x9fbff] The checksum covers e820_table_firmware, which trim_bios_range() leaves alone. The nosave regions come from e820_table instead, where trim_bios_range() has already turned conventional RAM in page zero into reserved memory, so page zero never occurs in the image, whatever the firmware map says about it. Canonicalise only the conventional-RAM portion below PAGE_SIZE before calculating the checksum. Preserve RESERVED, ACPI, NVS, UNUSABLE, PMEM and all other E820 types so that changes to exceptional mappings remain detectable. This is deliberately narrower than Marco Scardovi's June proposal to checksum only RAM and its opt-in relaxed_memmap successor. Rafael noted that ignoring non-RAM changes could hide moved ACPI or UEFI regions still used by the resumed kernel. This patch preserves every non-RAM entry and ignores only RAM within page zero, which common setup already reserves and excludes from the image. Bump RESTORE_MAGIC, since the checksum semantics change, so that an image written by a kernel without this change is refused by the magic check instead of being compared under different rules. In the same guest, with the page-zero difference kept, hibernation and resume now work after both a direct boot and a kexec_load boot. An image written by an unpatched kernel is refused at resume with "Unrecognized hibernate image header format!", and the firmware-booted kernel carries on. Fixes: 62a03defeabd ("PM / hibernate: Verify the consistent of e820 memory map by md5 digest") Reported-by: Roberto Ricci Signed-off-by: Matthias Goergens Link: https://lore.kernel.org/all/Z-hYWc9LtBU1Yhtg@desktop0a/ Link: https://lists.openwall.net/linux-kernel/2025/04/04/1372 Link: https://lore.kernel.org/all/CAJZ5v0jmOj0WBtMTvbnaD+2b0bTFowA=JWrqRzaaCYpHpai1Nw@mail.gmail.com/ Link: https://lore.kernel.org/all/20260623165724.10753-1-scardracs@disroot.org/ Link: https://patch.msgid.link/20260926052117.3613637-1-matthias.goergens@gmail.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 7e7d9eed5581cccb6bef20087295ad4f2d3763e8 Author: Nicolo Giuliani Date: Mon Sep 21 02:26:41 2026 +0200 dt-bindings: vendor-prefixes: Add Sophos [ Upstream commit 538f8ec6b9c711833c5217a8bd8207a282265303 ] Add the "sophos" vendor prefix for Sophos Ltd., a vendor of network security appliances. Acked-by: Krzysztof Kozlowski Assisted-by: LLM Signed-off-by: Nicolo Giuliani Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit 3580447d0f2607df4b7b999b2789b11a6b57debb Author: Danish Khateeb Date: Sat Sep 26 10:24:14 2026 -0500 tools/nolibc: check for overflow in malloc() [ Upstream commit 2111eb4273e7fda0815de85319653104f323c441 ] malloc() adds the size of its header to the requested size without checking for overflow. For a size within the header size of SIZE_MAX, the sum wraps around to a few bytes, and malloc() returns a single page instead of NULL. calloc() checks its multiplication for overflow, but then passes the product to malloc(), so calloc(SIZE_MAX, 1) returns a single page too. So does realloc(ptr, SIZE_MAX). Such a size is usually a bug in the caller, for instance a length of -1 used as a size_t, and returning a page instead of NULL can turn it into a heap overflow. Fail with ENOMEM when adding the header overflows, as glibc does for sizes this large. Fixes: 0e0ff638400b ("tools/nolibc/stdlib: Implement `malloc()`, `calloc()`, `realloc()` and `free()`") Assisted-by: LLM Signed-off-by: Danish Khateeb Link: https://patch.msgid.link/20260926152414.251214-3-danishkhateeb03@gmail.com Signed-off-by: Thomas Weißschuh Signed-off-by: Sasha Levin commit 340ef27f325846285ffeed3197b228aba7de1f98 Author: Danish Khateeb Date: Sat Sep 26 10:24:13 2026 -0500 tools/nolibc: stop rounding malloc() sizes up to 4096 bytes [ Upstream commit b7db3ba9434cbad3d15f62500104525bfa28a304 ] malloc() rounds the size of each mapping up to a multiple of 4096, presumably to align it to a page boundary. But the page size is not 4096 on all architectures, and mmap() and munmap() round the length up to the page size themselves. Drop the rounding. As heap->len is no longer rounded up, growing a block with realloc() now always creates a new mapping. Assisted-by: LLM Signed-off-by: Danish Khateeb Reviewed-by: Willy Tarreau Link: https://patch.msgid.link/20260926152414.251214-2-danishkhateeb03@gmail.com Signed-off-by: Thomas Weißschuh Stable-dep-of: 2111eb4273e7 ("tools/nolibc: check for overflow in malloc()") Signed-off-by: Sasha Levin commit f725a556fb40006ddeadf026c8d21a2c7c01207d Author: Tianyi Chen Date: Thu Sep 17 00:11:25 2026 +0800 perf sched stats: Reject mismatched or incomplete snapshots [ Upstream commit 9910ee15c9fc024e713b66403edf23976d33a857 ] The before and after records are paired by list position. If a CPU or domain disappears, counters can be subtracted from a different record or left as absolute values. An extra record can also advance the cursor past the list. Identify the second snapshot by its timestamp or CPU ordering, and require matching CPU/domain IDs and versions before subtracting. Check that every record has a counterpart before printing, and propagate errors from either input of diff. Add a shell test with synthetic snapshots, including equal timestamps, CPU filtering, and missing or reordered CPU/domain records. Fixes: 5a357ae6ad63fd10 ("perf sched stats: Add support for report subcommand") Reviewed-by: Swapnil Sapkal Assisted-by: LLM Signed-off-by: Tianyi Chen Tested-by: Swapnil Sapkal Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 5e3713f3df1e8b094078e5ba9fd90d803ca5deab Author: Leo Yan Date: Wed Sep 30 14:11:36 2026 +0100 perf build: Build the Python extension before pylint consumers [ Upstream commit 179c2413bb601c94e144c7a84cd34ae3bee3b586 ] Pylint checks for tests and standalone Python scripts can run before the perf Python extension is available. On a clean parallel build, an import error can stop make before the extension is built. Run the script and test pylint checks in separate sub-makes after the language bindings are built. Keep their rules in the respective Build files so the perf and perf-test C sub-makes can compile concurrently with util and the Python extension. An isolated make perf does not need to build the extension just for these checks. Fixes: 8a54784e708b51c1 ("perf build: Add pylint build tests") Reported-by: Aishwarya TCV Reviewed-by: Ian Rogers Assisted-by: Codex:gpt-6 Signed-off-by: Leo Yan Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit bd31515f57518c856ad0b52f3a4cff6689d47095 Author: Waiman Long Date: Wed Sep 30 11:48:00 2026 -0400 cgroup/cpuset: Use cpuset_v2() in cpuset_num_cpus() [ Upstream commit 5ffe20411787dd9947a35669ef8cb9484053efcf ] The cpuset code has 2 different helpers for determining if it is in a v1 or v2 working environment - cpuset_v2() and is_in_v2_mode(). cpuset_v2() checks the binding of the cpuset subsystem is on a v1 or v2 hierarchy. It can also help to optimize out v1 specific code if CONFIG_CPUSETS_V1 isn't defined. is_in_v2_mode() layers on top of cpuset_v2() and returns true if it is in a v2 hierarchy or in a v1 hierarchy with "cpuset_v2_mode" mount option enabled to make "cpuset.cpus" and "cpuset.mems" behave in a way similar to their v2 counterparts. However the cpuset hierarchy may still be a standalone one separated from the other cgroup hierarchies. Commit 90ac22ffef48 ("sched/fair: Add cgroup_mode: max") adds a new cpuset_num_cpus() helper to return the number of effective CPUs in a given cgroup. It is part of the "sched: Flatten the pick" patch series to help flatten the cpu cgroup runqueue hierarchies. cpuset_num_cpus() currently uses is_in_v2_mode() to determine if it is in a v2 environment. However is_in_v2_mode() can be true in a v1 environment where the cpuset and cpu cgroup subsystems can be in two separate hierarchies. The current use case [1] for cpuset_num_cpus() assumes that it can return the number of effective CPUs present in the current cpu cgroup which may not be the case. Fix that by switching to use cpuset_v2() which signifies that it is in a unified hierarchy where both cpuset and cpu cgroup subsystems share the same cgroup hierarchy if it returns true. [1] https://lore.kernel.org/lkml/20260930081125.GF88198@noisy.programming.kicks-ass.net Fixes: 90ac22ffef48 ("sched/fair: Add cgroup_mode: max") Signed-off-by: Waiman Long Reviewed-by: Andrea Righi Reviewed-by: Michal Koutný Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit a0f7938dac8e1d347dae21ac3a7e4f840d66c4b0 Author: Michal Pluta Date: Mon Sep 28 02:02:24 2026 +0100 perf symbol: Don't return an unterminated Rust demangle buffer [ Upstream commit 0b0752e8a493634915e16456df609c08c0595e85 ] When dso__demangle_sym() runs out of retries or fails to grow the output buffer for a Rust v0 symbol, it returns the buffer and callers blindly use it as the demangled symbol name. However, rust_demangle_display_demangle() doesn't NUL terminate its output when it reports OverflowOverflow, so the buffer isn't a string. Free the buffer and return NULL in both cases. Callers already fall back to the mangled name when no demangled name is returned. Fixes: e20848c317b51e74 ("perf symbol-elf: Integrate rust-v0 demangling") Reviewed-by: Ian Rogers Assisted-by: LLM Signed-off-by: Michal Pluta Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 381311362da6c47b268e35ff6c23260eb68485e3 Author: Michal Pluta Date: Mon Sep 28 02:02:23 2026 +0100 perf test demangle: Fail when demangling fails [ Upstream commit 0568396eac41b56874d6ac0c552df91262e2ccf6 ] The Rust and Java demangle tests only log a NULL result from dso__demangle_sym() and carry on, so a symbol that fails to demangle doesn't fail the test. Set TEST_FAIL. Fixes: 07f2b1287c970e07 ("perf test demangle-java: Don't segv if demangling fails") Fixes: bdf05ccd18414274 ("perf test demangle-rust: Add Rust demangling test") Reviewed-by: Ian Rogers Assisted-by: LLM Signed-off-by: Michal Pluta Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit a68530a985f7aff0b63d7bfcca44ac12e9916a65 Author: Seongjae Jeong Date: Fri Sep 18 13:39:22 2026 +0000 f2fs: reject device aliasing without a multi-device configuration [ Upstream commit 7566fec606d233f803e61f5ce37c54fbcdb00010 ] A malformed F2FS image can enable F2FS_FEATURE_DEVICE_ALIAS without providing a multi-device configuration. For a regular single-device filesystem, f2fs_scan_devices() returns without allocating sbi->devs. In this state, f2fs_dev_is_alloc_blocked() passes the device alias feature check and dereferences FDEV(0), resulting in a NULL pointer dereference during segment allocation. Device aliasing requires at least one secondary device. Reject superblocks that enable device aliasing without entries for both the main and secondary devices in sanity_check_raw_super(). Fixes: eae3faf210bd ("f2fs: support dynamic reserve/release for device aliasing") Reported-by: syzbot+ae5b8eb92ed40411ce16@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ae5b8eb92ed40411ce16 Signed-off-by: Seongjae Jeong Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin commit e63429e04f581a3b31479f1c678ae968bf5efc93 Author: Arnd Bergmann Date: Thu Sep 17 16:21:42 2026 +0200 f2fs: quota: fix unused-label warning [ Upstream commit 4faeea625cf730bb20f609f061ff81c9b6852931 ] The newly added label causes a warning when QUOTA is turned off: fs/f2fs/super.c: In function '__f2fs_remount': fs/f2fs/super.c:3142:1: error: label 'restore_holder' defined but not used [-Werror=unused-label] 3142 | restore_holder: | ^~~~~~~~~~~~~~ Fixes: 3f140a60c92a ("f2fs: quota: fix stale lock holder on remount failure") Signed-off-by: Arnd Bergmann Acked-by: Randy Dunlap Tested-by: Randy Dunlap Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin commit cde463035e22a77b51e6f395fbbba6f65ec2d49a Author: Gabor Juhos Date: Thu Sep 24 19:02:56 2026 +0200 spi: spi-qpic-snand: set 'qpic_version2' flag [ Upstream commit 52efc89ccf664dcfa331fbdf2f5c8d3acd45a863 ] The kerneldoc of 'struct qcom_nandc_props' says this about the 'qpic_version2' member of the structure: "flag to indicate QPIC IP version 2" Since the SNAND controller is based on QPIC v2, set the flag in the device specific properties. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20260924-qpic-snand-set-qpic_version2-v1-1-a0a9a3e0d06a@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d17a6c8c125c45b818b964d65e7c1370ea62175e Author: Takashi Iwai Date: Wed Sep 30 17:53:51 2026 +0200 ALSA: usb-audio: Fix UAC2 mixer unit request handling [ Upstream commit 0458d97859840506c3688a963dcd4f72b4a23083 ] For a request for a Mixer Unit on UAC2 (also UAC3), the wValue is different from UAC1 and an incompatible value must be passed. Namely, UAC1 takes a word consisting of 1-based input channel in the high byte and 1-based output channel in the low byte. Meanwhile, UAC2/3 takes UAC2_MU_MIXER in the high byte and a MCN (0-based bit position of input/output channels) in the low byte. The current driver implementation blindly assumes the UAC1 way, hence it would cause a firmware error. This patch attempts to implement the conversion to UAC2 MCN at get_ctl_value_v2() and snd_usb_mixer_set_ctl_value() for mixer units. At the points above, the old wValue containing ICN and OCN is converted to the corresponding MCN, and it's used as the proper wValue. Reported-by: Zipdox Closes: https://lore.kernel.org/d46fcac6-bd7e-4fc4-95e1-4e8d39f92ad3@zipdox.net Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0") Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260930155356.348608-3-tiwai@suse.de Signed-off-by: Sasha Levin commit 6f71d16596ebec531023e32b0231a486d029da90 Author: Andreas Kemnade Date: Tue Sep 22 15:20:15 2026 +0200 rtc: bd70528: properly enable wakeup [ Upstream commit cb8a6249236fd970fc3418d5d2b27dc37376f3ff ] Wakeup on RTC alarm now only accidentially works when wakeup for the power button connected to the same PMIC is also enabled. Fix that by properly specifying the wakeup irq. Reviewed-by: Matti Vaittinen Fixes: 32a4a4ebf768 ("rtc: bd70528: Initial support for ROHM bd70528 RTC") Signed-off-by: Andreas Kemnade Link: https://patch.msgid.link/20260922-rtc-bd-v3-1-7f2580c55d58@kemnade.info Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 606375258cf2e0d70e670f3110adaab7542a443e Author: Nguyễn Văn Cao Nguyên Date: Wed Sep 30 14:51:42 2026 +0700 RDMA/irdma: Do not move a fresh RoCE QP to ERROR on RESET [ Upstream commit 6de34bfb56ad8c24bf63b243b5f32b345d9cdd4d ] irdma_modify_qp_roce() handles IB_QPS_RESET like IB_QPS_ERR and moves the QP to ERROR. On a QP that was never moved to INIT, this makes the following RESET->INIT fail with -EINVAL, while ibv_query_qp() still reports RESET. RESET->RESET is a valid transition. The Mooncake transfer engine resets every new QP before INIT, so it cannot connect over an E810, while mlx5 accepts the same sequence: ibv_create_qp(RC) -> RESET ibv_modify_qp(RESET) -> 0 ibv_modify_qp(INIT, ...) -> -EINVAL Skip the hardware modify when the QP has not been moved to INIT yet (iwarp_state is IRDMA_QP_STATE_INVALID), as there is nothing to flush. RESET after INIT still goes to ERROR. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Assisted-by: LLM Signed-off-by: Nguyễn Văn Cao Nguyên Link: https://patch.msgid.link/20260930-irdma-reset-fresh-qp-v1-1-065327274e2b@greennode.ai Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d152bc2ba4ca901044005f9a72c0b876a01d26bf Author: Nicolas Schier Date: Tue Sep 29 09:59:45 2026 +0200 kconfig: tests: Provide defconfig outfile for savedefconfig [ Upstream commit 09bd92ba15bd00d937deea38a10a439458393043 ] Let kconfig test framework's 'savedefconfig' forward the requested output 'defconfig' filename to 'conf'. The original implementation was calling 'conf' with '--savedefconfig' but missed the mandatory filename for the defconfig output file. While at it, honour the 'dot_config' argument which points to the input config file. Fixes: 022a4bf6b59d ("kconfig: tests: add framework for Kconfig unit testing") Reviewed-by: Julian Braha Signed-off-by: Nicolas Schier Link: https://patch.msgid.link/20260929-kconfig-tests-minor-updates-v2-2-c5902bee1d0c@fritz.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 78944f4ae881b4fd7836809f8161506fd5456b36 Author: Nicolas Schier Date: Tue Sep 29 09:59:44 2026 +0200 kconfig: tests: Reset all KCONFIG_* env variables by default [ Upstream commit 8688f0b29d021cad8188b11d5664b4a1f595691b ] Reset all environment variables with names starting with 'KCONFIG_' from the user-provided environment. This fixes the 'warn_changed_input' test on systems with KCONFIG_WARN_CHANGED_INPUT=1 and ensures a cleaner test environment. Fixes: 645323a7f4e5 ("kconfig: add optional warnings for changed input values") Signed-off-by: Nicolas Schier Reviewed-by: Julian Braha Link: https://patch.msgid.link/20260929-kconfig-tests-minor-updates-v2-1-c5902bee1d0c@fritz.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit fcd484dec4c309239d448fbcc5fd51907a251b48 Author: Wentao Liang Date: Thu Sep 17 13:50:56 2026 +0000 pinctrl: stm32: Fix clock reference leak in stm32_pctl_probe() [ Upstream commit dfd8259507c53a3c7eb0dd11c1152c88e12aa316 ] stm32_pctl_probe() obtains one clock per bank with of_clk_get_by_name(), but none of the error paths drop those references: the loop returns directly when a later clock lookup fails, and both the clk_bulk_prepare_enable() failure and the err_register path return without calling clk_bulk_put(). clk_bulk_disable_unprepare() only disables the clocks, it does not release them. Release the references on these paths; the success path keeps them as the driver needs them for suspend/resume. Fixes: 451bc9aea9a1 ("pinctrl: stm32: Add check for clk_enable()") Signed-off-by: Wentao Liang Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit 70179c4b9d7c5861f9e6072949ee507100479ab4 Author: Wentao Liang Date: Thu Sep 17 13:48:11 2026 +0000 pinctrl: nuvoton: Fix clock reference leak in ma35_get_bank_data() [ Upstream commit a854aa8e550502ef05c2836a4b426141d735bed1 ] ma35_get_bank_data() obtains the bank clock with of_clk_get() and stores it in bank->clk, but returns clk_prepare_enable() directly. If that call fails, the reference taken by of_clk_get() is never dropped, and the driver has no other clk_put() for it. Drop the reference when clk_prepare_enable() fails. Fixes: f805e356313b ("pinctrl: nuvoton: Add ma35d1 pinctrl and GPIO driver") Signed-off-by: Wentao Liang Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit a0eab0771433f9bb79cfbfaefeb129a4892d16c4 Author: Hongyan Xu Date: Mon Sep 28 21:41:48 2026 +0800 RDMA/hfi1: quiesce SDMA asynchronous cleanup on exit [ Upstream commit e95d076bc1fca7cc36fc8f2f0e9687f79fd314bd ] The SDMA state reference and completion cover the software cleanup tasklet, but not the hardware cleanup tasklet, err_halt_worker, or flush_worker. Queued instances can therefore access an SDMA engine after per_sdma is released. After the state machine has stopped, cancel err_halt_worker first because it can publish the hardware cleanup tasklet. Then kill that tasklet and drain the remaining flush work. Fixes: 7724105686e7 ("IB/hfi1: add driver files") Signed-off-by: Hongyan Xu Link: https://patch.msgid.link/20260928134148.977-1-getshell@seu.edu.cn Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit a9d9b1678dc0e268d575948922280739c11d9e96 Author: Hongyan Xu Date: Mon Sep 28 21:41:51 2026 +0800 RDMA/hfi1: shut down the trap timer before unregistering [ Upstream commit a1c9d476c2316685f85fffb6450ad88d01836357 ] MAD processing arms a trap timer embedded in each hfi1_ibport. Device unregistration does not stop the timer, so its callback can run after the port and its containing hfi1_devdata have been released. Shut down every port timer before unregistering the IB device. The shutdown form also prevents a concurrent path from rearming the timer. Fixes: bf90aadd630c ("IB/hfi1: Send MAD traps until repressed") Signed-off-by: Hongyan Xu Link: https://patch.msgid.link/20260928134151.1213-1-getshell@seu.edu.cn Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 5d0337d067231aa496c809a88386a4ac075b6fdb Author: Crystal Wood Date: Sat Sep 19 01:27:54 2026 -0500 rtla/tests: Use absolute path for $RTLA [ Upstream commit 7a5e8f91516d739c833e87591fbceac56a38628d ] When running the tests directly instead of from the makefile, RTLA is likely to be unset. The default "./rtla" no longer works, due to having changed the current diretory. Fixes: ad5b50a0959fb ("rtla/tests: Run runtime tests in temporary directory") Signed-off-by: Crystal Wood Link: https://lore.kernel.org/r/20260919062756.819701-2-crwood@redhat.com Signed-off-by: Tomas Glozar Signed-off-by: Sasha Levin commit 4b3d5d7ecbbfd2e95564b76f541d3380e109460a Author: Sasha Levin Date: Sun Sep 27 12:16:54 2026 -0400 RDMA/selftests: Fix the kernel config fragment [ Upstream commit f5d4cc88371feb9c5f96b6fb7fce5e8cb08ecb6a ] The config fragment lists bare option names with no values: CONFIG_TUN CONFIG_VETH CONFIG_DUMMY CONFIG_NET_NS CONFIG_RDMA_RXE which is not valid Kconfig syntax. When the fragment is merged, for example by "make kselftest-merge" or by CI systems, the lines are rejected: .config:5514:warning: unexpected data: CONFIG_TUN .config:5515:warning: unexpected data: CONFIG_VETH .config:5516:warning: unexpected data: CONFIG_DUMMY and none of the options gets enabled, so the rxe tests skip or fail for lack of the modules they load. Give each option a value. The scripts load and unload tun, veth, dummy and rdma_rxe with modprobe, so build those as modules. RDMA_RXE also depends on INFINIBAND, and rxe_rping_between_netns.sh runs rping, which needs the RDMA CM userspace interface provided by INFINIBAND_USER_ACCESS, so add both. Found by KernelCI kselftest builds. Fixes: e01027cab38a ("RDMA/rxe: Add testcase for net namespace rxe") Fixes: ecdcc8a455b7 ("RDMA/selftests: Add rxe_netns_names test") Link: https://patch.msgid.link/r/20260927161655.1184153-1-sashal@kernel.org Assisted-by: LLM Signed-off-by: Sasha Levin Reviewed-by: Zhu Yanjun Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin commit 60b08fdff6a878423bb27ca3dba3ee629df13715 Author: Serhat Kumral Date: Sun Sep 27 14:53:51 2026 +0300 RDMA/siw: Fix length of first chunk in siw_try_1seg() [ Upstream commit aac27aa8c5cfe3c3c6029b9c0f1113e0a53329de ] When a short-single SGE payload crosses a page boundary, siw_try_1seg() computes the length of the first chunk as the amount that spills into the second page instead of the amount left in the first page part = bytes - (PAGE_SIZE - off); Use the remaining length of the first page as the first chunk. Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Link: https://patch.msgid.link/r/20260927115351.12245-1-serhatkumral1@gmail.com Assisted-by: LLM Signed-off-by: Serhat Kumral Acked-by: Bernard Metzler Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin commit 95d5f15191d4c11d17a3252d8b70cf161509ee87 Author: Quanye Yang Date: Wed Sep 23 03:52:11 2026 -0700 RDMA/rtrs-clt: Validate peer-supplied IO completion msg_id [ Upstream commit c1fcde82f7b68181553af7efb4410df04109a9a8 ] process_io_rsp() indexes clt_path->reqs[] with the 19-bit msg_id taken from a WRITE_WITH_IMM immediate. That value is chosen by the peer. The only check was WARN_ON(msg_id >= queue_depth), which still lets a completion run after free_path_reqs() has set reqs to NULL, or against a slot whose FRWR is already gone. Either path dereferences req->mr and can GPF; KASAN reports a null-ptr-deref at offsetof(struct rtrs_clt_io_req, mr). Treat a missing reqs array, an out-of-range msg_id, or a req without an MR as a protocol error and recover the connection. Link: https://patch.msgid.link/r/20260923-rtrs-warning-inrtrs-clt-rdma-done-v1-1-0827a9a77c0b@proton.me Reported-by: Farhad Alemi Closes: https://lore.kernel.org/r/CA+0ovCiJZz6O8LzsS9Dq1-JE1OE1L_OTA6Mr-WratpUE6jczHw@mail.gmail.com Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Signed-off-by: Quanye Yang Reviewed-by: Jack Wang Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin commit 48a04f10c584afb72c528a0a7d527061a2296f3f Author: Alireza Haghdoost Date: Mon Sep 28 16:32:27 2026 -0700 perf symbols: Don't let a module's last symbol overlap the next module [ Upstream commit 45d15e89a783a0a279b7a54f9018c230127380d7 ] symbols__fixup_end() extends a zero-size symbol that is the last one in the kernel or in a module to the end of the next page. On x86 the next module can start in that page, so the stretched symbol overlaps it, and a lookup can return the wrong symbol. For example: ffffffffc0c4aa50 t dca_sysfs_exit [dca] ffffffffc0c4b000 t __nft_trace_packet [nf_tables] ffffffffc0c4b0b0 t nft_do_chain [nf_tables] dca_sysfs_exit gets end 0xffffffffc0c4c000, and samples in nft_do_chain are reported as dca_sysfs_exit. This patch clamps the end to the next symbol's start. The ARM case this code was added for, where the next module is far away, is unchanged. Add a "Kallsyms symbol ends" test case to the Symbols suite that covers the kernel/module boundary, adjacent modules and a distant module. Fixes: 8799ebce84d672aa ("perf symbol: Update symbols__fixup_end()") Fixes: bacefe0c7b77b752 ("perf tools: Fixup module symbol end address properly") Signed-off-by: Alireza Haghdoost Acked-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit b7d343b67f40bfb904dea4c8d40f60e0b685ab00 Author: Nicolas Schier Date: Mon Sep 28 19:26:57 2026 +0200 kbuild: Mark usr_gen_init_cpio as no-dot-config-target [ Upstream commit 14e2c1f5431a03478ed4bbf2e72298c769f375ac ] Let usr/gen_init_cpio be built also if there is no kernel configuration. Askar Safin reported that gen_init_cpio may be of use before any kernel configuration is available. Add usr_gen_init_cpio to list of targets that do not require a .config file. Reported-by: Askar Safin Closes: https://lore.kernel.org/all/20260220191150.244006-1-safinaskar@gmail.com Fixes: f8e05c10631e ("kbuild: Add top-level target for building gen_init_cpio") Signed-off-by: Nicolas Schier Link: https://patch.msgid.link/20260928-move-gen_init_cpio-to-scripts-v4-1-f437a33c40ac@kernel.org Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 02ea3f7341502f0c9aabb71efed785fd14cc732f Author: Qingshuang Fu Date: Tue Aug 25 14:46:05 2026 +0800 selftests/timers: clocksource-switch: Fix unchecked open()/read() [ Upstream commit 348f54c435bf3177baa78201952810b255d44b30 ] get_clocksources() and get_cur_clocksource() open and read the clocksource sysfs files without checking the return values and without NUL-terminating the buffer. If open() fails, read() is called on fd -1 and returns -1, which is stored in a size_t as SIZE_MAX. The token-scanning loop in get_clocksources() then walks past the uninitialized stack buffer, reading and writing out of bounds. Even on success the buffer is not NUL-terminated, so a fully read buffer makes the inner scan run past the data, and get_cur_clocksource() lets change_clocksource() call strlen() on a non-terminated buffer. Check the open()/read() results, use ssize_t for the read length, NUL-terminate the buffer, and close the fd in get_cur_clocksource(). Fixes: 7290ce1423c3 ("selftests/timers: Add clocksource-switch test from timetest suite") Signed-off-by: Qingshuang Fu Signed-off-by: Thomas Gleixner Acked-by: John Stultz Link: https://patch.msgid.link/20260825064605.472889-1-fffsqian@163.com Signed-off-by: Sasha Levin commit 0b4d943393cb75aa398db220c0fa192ed856b6e8 Author: Abdifatah Suruur Date: Tue Sep 29 12:48:44 2026 +0300 vfio/cdx: prevent read-only region mappings from becoming writable [ Upstream commit 9c5cd385d295fa8621dff0e9f6063e3f6ff24159 ] vfio_cdx_mmap() rejects writable mappings of regions without the WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region read-only and then upgrade the mapping to writable with mprotect(), writing to MMIO regions the device marks read-only. Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for its read-only objects and as fixed in drm/vc4 (CVE-2026-68445), drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock: prevent read-only mappings from becoming writable"). Note this is defensive hardening: no in-tree cdx device currently publishes a region without the WRITE flag. The guard costs nothing and keeps the mmap() interface honest if a read-only region ever appears. Fixes: 234489ac56130 ("vfio/cdx: add support for CDX bus") Signed-off-by: Abdifatah Suruur Link: https://lore.kernel.org/r/20260929094848.7439-4-suruurism@gmail.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit 3043b82aace2dddb7d12585ceee69afcaf657fb7 Author: Abdifatah Suruur Date: Tue Sep 29 12:48:43 2026 +0300 vfio/fsl-mc: prevent read-only region mappings from becoming writable [ Upstream commit 25fd8b27ee8d4f59cc2ad99cf67aef4570b82096 ] vfio_fsl_mc_mmap() rejects writable mappings of regions without the WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region read-only and then upgrade the mapping to writable with mprotect(). Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for its read-only objects and as fixed in drm/vc4 (CVE-2026-68445), drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock: prevent read-only mappings from becoming writable"). Note this is defensive hardening: the fsl-mc bus publishes all device regions with the WRITE flag set, so no device can currently reach the read-only path. The guard costs nothing and keeps the mmap() interface honest if a read-only region ever appears. Fixes: 67247289688d4 ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO regions") Reviewed-by: Ioana Ciornei Signed-off-by: Abdifatah Suruur Link: https://lore.kernel.org/r/20260929094848.7439-3-suruurism@gmail.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit 97faad50e37e5de90eea4f1fb132576b7f9211db Author: Abdifatah Suruur Date: Tue Sep 29 12:48:42 2026 +0300 vfio/platform: prevent read-only region mappings from becoming writable [ Upstream commit 420bed9131dbbe37abe9d6b32af51219875811e0 ] vfio_platform_mmap() rejects writable mappings of regions without the WRITE flag, but leaves VM_MAYWRITE set. Userspace can map such a region read-only and then upgrade the mapping to writable with mprotect(). Clear VM_MAYWRITE for regions without the WRITE flag, as i915 does for its read-only objects and as fixed in drm/vc4 (CVE-2026-68445), drm/panthor (CVE-2024-53071) and commit a5edadbae57e ("ptp: vmclock: prevent read-only mappings from becoming writable"). Note this is defensive hardening: no in-tree platform driver currently publishes a region without the WRITE flag. The guard costs nothing and keeps the mmap() interface honest if a read-only region ever appears. Fixes: fad4d5b1f042 ("vfio/platform: support MMAP of MMIO regions") Reviewed-by: Mostafa Saleh Reviewed-by: Eric Auger Reviewed-by: Pranjal Shrivastava Signed-off-by: Abdifatah Suruur Link: https://lore.kernel.org/r/20260929094848.7439-2-suruurism@gmail.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit 59af3e37eda7a1ac6491039a82b056f906a2cf78 Author: Quanye Yang Date: Mon Sep 21 21:25:25 2026 -0700 RDMA/rtrs-clt: Don't WARN on unexpected info-response opcode [ Upstream commit 49c5691ad76f000e66c4f2635d5f196db5d038f9 ] The info-response receive is posted for a SEND. The completion opcode comes from the peer, so RDMA WRITE with Immediate is a legal WC on that WQE even though it violates the RTRS handshake. WARN_ON(wc->opcode != IB_WC_RECV) treats that peer-controlled field as an internal invariant and panics with panic_on_warn. Treat a non-SEND completion as a handshake failure: log it and keep the existing CONNECTING_ERR cleanup. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Link: https://patch.msgid.link/r/20260921-rtrs-fix-rtrs-clt-info-rsp-done-v1-1-c64281ed97c0@proton.me Reported-by: Farhad Alemi Closes: https://lore.kernel.org/linux-rdma/CA+0ovCge-K+hcGHXZ4R3Ww5+cg159uxHBeVbKeUSLBRSMT8OWA@mail.gmail.com/ Signed-off-by: Quanye Yang Reviewed-by: Jack Wang Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin commit 0163c9141b412c995617cd8cc4ba362cbfb62d07 Author: Karl Mehltretter Date: Fri Sep 25 18:57:01 2026 +0200 time: Prevent time64_to_tm() day truncation on 32-bit [ Upstream commit 2927f7ca78448781e11a4623d347cd653c28adf6 ] time64_to_tm() accepts a 64-bit seconds value, but stores the quotient in long. On a 32-bit kernel the day count therefore wraps when it reaches 2^31, even though the corresponding year remains representable in struct tm. This is reachable when formatting externally supplied timestamps. For example, NILFS recovery copies the little-endian 64-bit ss_create field from an on-disk segment summary into time64_t. Its sysfs attributes then print that value with %ptTs, whose formatter calls time64_to_tm(). A corrupted image can consequently produce an architecture-dependent printed date. Keep the day quotient in s64 while leaving the seconds-within-day remainder as long. Use div_s64_rem() for the weekday calculation so 32-bit builds do not require compiler runtime division helpers. Fixes: e6c2682a1da3 ("time: Add time64_to_tm()") Signed-off-by: Karl Mehltretter Signed-off-by: Thomas Gleixner Assisted-by: LLM Reviewed-by: Thomas Weißschuh Link: https://patch.msgid.link/20260925165702.51677-2-kmehltretter@gmail.com Signed-off-by: Sasha Levin commit 349902957e61e73c5955568cf61a055ee5a72edb Author: Jiale Yao Date: Sat Sep 26 19:26:11 2026 +0800 RDMA/cxgb4: Do not allow userspace to write the status page [ Upstream commit 1c5335a6902639596a795705349da7f76027e103 ] The device status page is shared by all userspace contexts and contains db_off, which the driver updates to control doorbell flow. The rdma-core provider maps it with PROT_READ, but c4iw_mmap() passes the requested page protection through when handling CXGB4_MMAP_CONTIG. A process can therefore request PROT_WRITE directly or later upgrade a read-only mapping with mprotect() because VM_MAYWRITE remains set. This lets userspace alter device-wide flow-control state seen by the kernel and other contexts. Reject initially writable mappings and clear VM_MAYWRITE before mapping the page. This preserves the existing read-only userspace ABI. Fixes: 05eb23893c2c ("cxgb4/iw_cxgb4: Doorbell Drop Avoidance Bug Fixes") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260926112611.3214382-1-yaojiale02@163.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 890d601dae33f2610b134c86210a1b8ba55adaaf Author: Jiale Yao Date: Sat Sep 26 19:11:50 2026 +0800 RDMA/mlx4: Do not allow the user to write to the clock page [ Upstream commit 33db1d9683b8fb00bc233d0bea093e694ed9afc5 ] mlx4_ib_mmap() maps the internal clock page to userspace through rdma_user_mmap_io(), which does not restrict write access. Userspace can request PROT_WRITE directly, or upgrade a read-only mapping later with mprotect() because VM_MAYWRITE remains set. Reject VM_WRITE, VM_EXEC and clear VM_MAYWRITE, applying the same read-only policy as commit c660133c339f ("RDMA/mlx5: Do not allow the user to write to the clock page"). The rdma-core mlx4 provider requests this mapping with PROT_READ, so its existing behavior is unchanged. Fixes: 52033cfb5aab ("IB/mlx4: Add mmap call to map the hardware clock") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260926111150.3197004-1-yaojiale02@163.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 251549f9748ee479b1cd7370c605d2fb5f37b6cd Author: Jiale Yao Date: Sat Sep 26 18:59:25 2026 +0800 RDMA/mad: Reject receive completions shorter than GRH [ Upstream commit 2dc2126e690203d6adbddc7675927a242d810e43 ] ib_mad_recv_done() derives the OPA MAD length by subtracting the GRH size from wc->byte_len without ensuring the receive completion covers the GRH. If it is shorter, the subtraction wraps before the result is stored in mad_len and an invalid length can be passed downstream. Reject receive completions shorter than the GRH before inspecting the MAD header or deriving the MAD length. Fixes: 8e4349d13f33 ("IB/mad: Add final OPA MAD processing") Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260926105927.3183294-1-yaojiale02@163.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit f63b0ed2da4cf0bda31bc1e2f3022a9851511db5 Author: Ian Rogers Date: Mon Sep 28 23:58:39 2026 -0700 perf pmu: Fix race with concurrent tracepoint creation and removal in perf list [ Upstream commit ab20a3090d338c4f161cb1a68e64a7f8914569ea ] perf_pmus__print_pmu_events() first counts events via perf_pmu__num_events() to allocate the aliases array, then populates it via perf_pmu__for_each_event(). When dynamic tracepoints (such as kprobes or uprobes during 'perf test' runs) are concurrently created or removed between the two passes: - If an event is removed, state.index is smaller than the allocated len, leaving trailing zeroed entries in aliases[] with name == NULL and pmu == NULL, which causes qsort(cmp_sevent) or the print loop to crash with SIGSEGV. - If a dynamic tracepoint subsystem directory is removed while scanning /sys/kernel/tracing/events, tp_pmu__for_each_tp_event() returns -ENOENT and aborts enumeration of all remaining tracepoint subsystems. - If an event is added, perf_pmus__print_pmu_events__callback() aborts enumeration when state->index reaches state->aliases_len. Grow state->aliases dynamically via realloc() when needed, use state.index as the actual populated length for sorting and printing, and ignore -ENOENT when a tracepoint subsystem directory disappears during enumeration. Fixes: c3245d2093c16c60 ("perf pmu: Abstract alias/event struct") Fixes: 45b6e281cb0648ac ("perf tp_pmu: Add event APIs") Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit aa4403ec50dabb9e0da48a7047f16e540795fd72 Author: Ian Rogers Date: Mon Sep 28 23:58:38 2026 -0700 perf python: Initialize debug output on module load [ Upstream commit 3d13b3f1f3a7cd33d1847a4b87c3198089b6c4a7 ] Unlike the perf binary's main(), PyInit_perf() does not call perf_debug_setup(). As a result, the first warning or error printed from the perf Python C extension hits debug_file() with _debug_file == NULL and emits 'debug_file not set' without a trailing newline before the actual diagnostic message. Call perf_debug_setup() in PyInit_perf() and add the missing trailing newline to the fallback warning in debug_file(). Fixes: ec49230cf6dda704 ("perf debug: Expose debug file") Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit fc9f84d48070b7e6cce75f1f1490cbbe30c8e995 Author: Ian Rogers Date: Mon Sep 28 23:58:31 2026 -0700 perf evsel: Clamp sample_id size for ksymbol, bpf, and text_poke events [ Upstream commit 7c89ea1bd4c612eb5cc2e6c01f77ebfc21d5c95d ] On kernels without the fix ("perf/core: Restore header fields in sideband output callbacks") to restore event_id.header.size in perf_event_ksymbol_output(), perf_event_bpf_output(), and perf_event_text_poke_output(), concurrent perf sessions cause those sideband records to be emitted with header.size inflated by multiple id_header_size increments while the single id_sample is written immediately after the event payload. Indexing backwards from event->header.size reads uninitialized ring-buffer bytes at the end of the record, causing evlist__event2evsel() to fail with -EFAULT. Add evsel__event_size() to clamp the effective size used to locate the trailing id_sample for PERF_RECORD_KSYMBOL, PERF_RECORD_BPF_EVENT, and PERF_RECORD_TEXT_POKE to payload + id_hdr_size while leaving event->header.size intact for advancing the ring-buffer/file stream. Fixes: 9aa0bfa370b278a5 ("perf tools: Handle PERF_RECORD_KSYMBOL") Fixes: 45178a928a4b7c60 ("perf tools: Handle PERF_RECORD_BPF_EVENT") Fixes: 246eba8e9041c477 ("perf tools: Add support for PERF_RECORD_TEXT_POKE") Link: https://lore.kernel.org/r/20260929014206.4175245-1-irogers@google.com Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Cc: Adrian Hunter Cc: Song Liu Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 552bffa4096709382b816bebfe3557a29360ac62 Author: Abhijit Gangurde Date: Fri Sep 25 15:06:38 2026 +0530 RDMA/ionic: Fix double removal of CMB mmap entries in create QP error path [ Upstream commit 485effd117d0310a7f589defb4f442fa3bb52ae2 ] The error unwind in ionic_create_qp() removes the SQ and RQ CMB mmap entries explicitly, and then falls through to ionic_qp_rq_destroy() and ionic_qp_sq_destroy(), whose ionic_qp_{rq,sq}_destroy_cmb() helpers remove the very same entries a second time. Drop the explicit removals and leave ionic_qp_{rq,sq}_destroy_cmb() as the single owner on the ionic_destroy_qp() path. Fixes: e8521822c733 ("RDMA/ionic: Register device ops for control path") Signed-off-by: Abhijit Gangurde Link: https://patch.msgid.link/20260925093638.3032149-2-abhijit.gangurde@amd.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit cf11ce423eb12ce5fb774101e7e49ec397ed732a Author: Abhijit Gangurde Date: Fri Sep 25 15:06:37 2026 +0530 RDMA/ionic: Fix XArray initialization to use XArray flags [ Upstream commit 2eca9c14e66a1f71c089fe5c3afb2d339da3023a ] xa_init_flags() takes XArray flags (XA_FLAGS_*), not gfp flags, even though the parameter is typed gfp_t. Passing GFP_ATOMIC leaves both lock-type bits clear, so xa_lock_type() resolves to XA_LOCK_NORMAL for qp_tbl and cq_tbl. Both tables are used with the IRQ-safe accessors: xa_store_irq() with GFP_KERNEL from process context, and xa_lock_irqsave() from the event queue path. When a store needs to grow the tree, __xas_nomem() drops the lock using the recorded lock type before allocating: if (gfpflags_allow_blocking(gfp)) { xas_unlock_type(xas, lock_type); xas->xa_alloc = kmem_cache_alloc_lru(...); xas_lock_type(xas, lock_type); } With XA_LOCK_NORMAL that is a plain spin_unlock(), so the sleeping GFP_KERNEL allocation runs with interrupts still disabled by xa_store_irq(), and lockdep annotates the lock with the wrong class. GFP_ATOMIC also happens to set __GFP_HIGH (0x20), which collides with XA_FLAGS_ACCOUNT (32U) and silently enables memcg accounting of the XArray nodes. Use XA_FLAGS_LOCK_IRQ so the lock type matches how the tables are actually accessed. Fixes: e8521822c733 ("RDMA/ionic: Register device ops for control path") Signed-off-by: Abhijit Gangurde Link: https://patch.msgid.link/20260925093638.3032149-1-abhijit.gangurde@amd.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit fbc7c5692161b8807d35307e27401a6ba2475260 Author: Norbert Szetei Date: Wed Sep 23 16:40:50 2026 +0200 RDMA/rxe: Reject prefetch of a non-ODP MR [ Upstream commit 66f18a749a3eeeb19f0b7812ecbe8b1ac18d73ec ] rxe_ib_advise_mr_prefetch() and rxe_ib_prefetch_sg_list() look up the MR by lkey and hand it to rxe_odp_do_pagefault_and_lock() without checking that it is an ODP MR. That path runs to_ib_umem_odp() on mr->umem, and for a non-ODP MR mr->umem is a plain struct ib_umem from ib_umem_get(), so the container_of() in to_ib_umem_odp() lands past the end of the object and ib_umem_odp_map_dma_and_lock() reads its ib_umem_odp fields out of bounds. lookup_mr() validates the lkey, PD, access and state but not the MR type, and IB_UVERBS_ADVISE_MR_ADVICE_PREFETCH is accepted for any MR. BUG: KASAN: slab-out-of-bounds in ib_umem_odp_map_dma_and_lock+0x884/0x8a0 Read of size 8 at addr ffff88810a3ebcf0 by task advi/921 ib_umem_odp_map_dma_and_lock+0x884/0x8a0 rxe_ib_advise_mr+0x543/0xad0 ib_uverbs_handler_UVERBS_METHOD_ADVISE_MR+0x446/0x530 ib_uverbs_cmd_verbs+0x2b3c/0x3b20 ib_uverbs_ioctl+0x1e3/0x310 Allocated by task 921: __ib_umem_get_va+0x13e/0xae0 rxe_mr_init_user+0x2ae/0xb00 rxe_reg_user_mr+0x337/0x510 The buggy address belongs to the object at ffff88810a3ebc80 which belongs to the cache kmalloc-96 of size 96 Ask lookup_mr() for IB_ACCESS_ON_DEMAND in both the synchronous and the asynchronous prefetch arm. mr->access carries that flag only for an MR registered as ODP, so the existing (access & mr->access) != access test rejects a plain MR and the prefetch fails with -EINVAL. Fixes: 3576b0df1588 ("RDMA/rxe: Implement synchronous prefetch for ODP MRs") Signed-off-by: Norbert Szetei Link: https://patch.msgid.link/20260923-rxe-advise-mr-v3-v3-2-95e1a4077e4d@doyensec.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 3708e0d1e7ae01f5a7981c8b64713ef0fe5b5955 Author: Binbin Deng <18983559317@163.com> Date: Wed Sep 23 13:18:00 2026 +0800 RDMA/rxe: unpublish the per-net tunnel socket before [ Upstream commit 4af07308d8227affa1710b392ba79af7e878073e ] KASAN reports a slab-use-after-free in ip6_route_output_flags() reached from rxe_find_route(), with the free in __sk_destruct() after rxe_sock_put(), and a user with CAP_NET_ADMIN can remove the device with "rdma link del rxe0" while RoCE v2 over IPv6 traffic keeps looking the socket up. BUG: KASAN: slab-use-after-free in ip6_route_output_flags+0x300/0x360 Read of size 4 at addr ffff888115ddd794 by task kworker/u32:6/309 Call Trace: dump_stack_lvl+0x53/0x70 print_report+0xd0/0x630 ? __pfx__raw_spin_lock_irqsave+0x10/0x10 ? ip6_route_output_flags+0x300/0x360 kasan_report+0xce/0x100 ? ip6_route_output_flags+0x300/0x360 ip6_route_output_flags+0x300/0x360 ip6_dst_lookup_tail.constprop.0+0x76c/0xcc0 ? ct_nmi_exit+0xc3/0xf0 ip6_dst_lookup_flow+0xf5/0x1e0 ? __pfx_ip6_dst_lookup_flow+0x10/0x10 rxe_find_route+0x426/0xa30 ? __kasan_slab_alloc+0x6e/0x70 ? __pfx_rxe_find_route+0x10/0x10 ? kmem_cache_alloc_node_noprof+0x141/0x370 ? kmalloc_reserve+0x103/0x2b0 ? rxe_icrc_generate+0x229/0x330 ? __pfx___alloc_skb+0x10/0x10 rxe_prepare+0x9e8/0x18b0 ? rxe_init_packet+0x3c7/0x4f0 rxe_requester+0x1a0f/0x51f0 ? rxe_completer+0x1de9/0x38c0 ? __pfx_rxe_completer+0x10/0x10 ? __queue_work+0x43e/0x11f0 ? __pfx_rxe_requester+0x10/0x10 ? irqentry_exit+0xd2/0x640 ? _raw_spin_lock_irqsave+0x85/0xe0 ? __pfx__raw_spin_lock_irqsave+0x10/0x10 ? __pfx_rxe_sender+0x10/0x10 rxe_sender+0xe/0x30 do_work+0x144/0x470 process_one_work+0x633/0x1030 ? assign_work+0x11d/0x370 worker_thread+0x45b/0xd10 ? __pfx_worker_thread+0x10/0x10 kthread+0x2c6/0x3b0 ? recalc_sigpending+0x15c/0x1e0 ? __pfx_kthread+0x10/0x10 ret_from_fork+0x36e/0x5a0 ? __pfx_ret_from_fork+0x10/0x10 ? __switch_to+0x572/0xdd0 ? __pfx_kthread+0x10/0x10 ret_from_fork_asm+0x1a/0x30 Allocated by task 146020: kasan_save_stack+0x33/0x60 kasan_save_track+0x14/0x30 __kasan_slab_alloc+0x6e/0x70 kmem_cache_alloc_noprof+0x130/0x360 sk_prot_alloc+0x56/0x210 Fix by clearing the per-net pointer before the last reference is dropped. Fixes: f1327abd6abed ("RDMA/rxe: Support RDMA link creation and destruction per net namespace") Signed-off-by: Binbin Deng <18983559317@163.com> Link: https://patch.msgid.link/20260923051800.244740-1-18983559317@163.com Reviewed-by: Zhu Yanjun Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 69a88fc912a789d0ce6c8b1c546a7c8ccc1e51c2 Author: Quanye Yang Date: Tue Sep 22 21:09:58 2026 -0700 RDMA/rtrs-clt: Reject invalid queue_depth from the peer [ Upstream commit 724cd362162ca7ca5a250bec65efd74f7dad9f5c ] queue_depth is taken from the server's CM private_data and later used as a session invariant. A peer can send 0, which the client stores and then trips WARN_ON() in create_con_cq_qp() when the next connection is set up. Reject a zero queue_depth on ESTABLISHED, same as a bad magic or version, and fail the handshake with -ECONNRESET. Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality") Reported-by: Farhad Alemi Closes: https://lore.kernel.org/linux-rdma/CA+0ovCg_sG8gaZXXj9zmOrpxRt=8+-x9wvycVNUKwWmMbr6-Yg@mail.gmail.com Signed-off-by: Quanye Yang Link: https://patch.msgid.link/20260922-rtrs-fix-warning-rtrs-clt-rdma-cm-handler-v1-1-2076c0ee1455@proton.me Acked-by: Jack Wang Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 8897a629706ff34f261fdb87e093c8ae174436d0 Author: Yili Zhang Date: Wed Sep 23 21:12:39 2026 +0800 RDMA/nldev: Fix NULL deref in dumps of objects abandoned by DRIVER_FAILURE [ Upstream commit 9f4c322be27bf617cad2f4a15f6c6024a69e220c ] fill_res_cq_entry() dereferences cq->uobject->uevent.uobject.context->res.id unconditionally for user resources. This is normally safe by ordering: destroy_hw() removes the resource from the restrack before uverbs_destroy_uobject() clears ->context, and the XA_ZERO_ENTRY marker set by rdma_restrack_begin_del() hides the entry from concurrent netlink dumps. The ordering breaks when a driver keeps failing to destroy an object during ucontext teardown. uverbs_destroy_ufile_hw() then falls back to __uverbs_cleanup_ufile(RDMA_REMOVE_DRIVER_FAILURE), which abandons the object in place: the HW object and its restrack entry are intentionally leaked, while the uobject bookkeeping is torn down and ->context is explicitly set to NULL by uverbs_destroy_uobject(). rdma_restrack_del() is never reached, so the orphaned entry stays in the device restrack with a valid kref, reachable by any subsequent netlink dump. Observed on 6.1.52 with MLNX_OFED 24.10, after an mlx5 FW failure left a process unable to tear down its CQ (destroy_cq FW command failing during FD close): WARNING: ... uverbs_destroy_ufile_hw+0xe3/0x100 BUG: kernel NULL pointer dereference, address: 0000000000000058 RIP: 0010:fill_res_cq_entry+0x15e/0x180 [ib_core] res_get_common_dumpit+0x304/0x530 [ib_core] nldev_res_get_cq_dumpit+0x1a/0x20 [ib_core] The faulting chain maps to the source (CR2 = 0x58): cq->uobject (struct ib_cq +0x08, res at +0x98) uobject->context (struct ib_uobject +0x10, NULL after abandon) context->res.id (struct ib_ucontext +0x58) The recent restrack rework (8d186210677c and its series) moved the restrack deletion to the start of the destroy flow and thus fences concurrent dumps from an object being destroyed, but it does not cover this case: when destroy fails, rdma_restrack_abort_del() restores the entry, and the RDMA_REMOVE_DRIVER_FAILURE sweep still never removes it from the restrack. From the fallback until the device is unregistered, any "rdma res show cq" deterministically takes the NULL pointer dereference; this is a long-lived state, NOT A RACE. The dump path holds neither the restrack lock (dropped before the fill callback runs) nor ufile->hw_destroy_rwsem, and rdma_restrack_get() only guarantees that the res memory stays alive, not that ->context is still valid. Fix the dump side: check the uobject context directly instead of the rdma_is_kernel_res() marker. A non-NULL uobject already implies a user resource, so kernel resources keep being skipped, and the additional ->context check skips the RES_CTXN attribute for orphaned entries instead of crashing the dump. The orphaned resource itself remains visible in "rdma res show" (cqn/cqe/usecnt/pid), which is what an operator needs after the accompanying uverbs WARN to diagnose the driver destroy failure. fill_res_pd_entry() has the same pattern (pd->uobject->context->res.id) and is fixed the same way; a PD can even reach the fallback without its own driver callback failing, e.g. uverbs_free_pd() returns -EBUSY while another object that failed to destroy still holds the PD usecnt. Fixes: c3d02788b45a ("RDMA/nldev: Provide parent IDs for PD, MR and QP objects") Signed-off-by: Yili Zhang Link: https://patch.msgid.link/20260923131239.6521-1-zhangyili01@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit e89ba4082a146c2ef643e36f33585d4994e1f3a0 Author: Pengpeng Hou Date: Sun Sep 20 11:41:24 2026 +0800 clk: si5351: fail prepare when PLL reset times out [ Upstream commit b6685c30d15cd7f28c40b2daaeacc00f21b2f12a ] The clock prepare path requests a PLL reset when the platform data requires a deterministic output phase. The reset helper logs polling errors but returns no status, so prepare still enables the output and reports success when the reset did not complete. Return the poll result to prepare, restore the output power-down bit on failure, and leave the output disabled. XTAL and CLKIN inputs continue to bypass PLL reset successfully. The issue was found by our static-analysis tool. Fixes: 5142cbcea324 ("clk: si5351: Wait for bit clear after PLL reset") Reviewed-by: Brian Masney Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit d03182be5ffc7228dea6aa78679dfe7ccdf6cdeb Author: Dario Binacchi Date: Fri Sep 4 12:06:31 2026 +0200 clk: validate spread spectrum configuration [ Upstream commit 109124b8ff43fb911d5b8790bb5e4c5684f72d88 ] The spread spectrum configuration is passed to the provider's set_spread_spectrum() callback without any validation, as clk-conf.c only skips all-zero triplets from "assigned-clock-sscs". An invalid device tree can hand providers a zero modulation frequency or a spread ratio above 100%, and each provider would have to add the same checks to protect e.g. divisions in its rate computations. The KUnit test data for assigned-clock-sscs uses spread values of 30000 and 40000 permyriad (300% and 400%), which the new check rejects, as reported by Sashiko, so fix them to 300 and 400 (3% and 4%). Also use a realistic 6% value for the initial settings of the skip tests, for consistency. Fixes: c86814e70390 ("clk: Introduce clk_hw_set_spread_spectrum") Reported-by: Sashiko Closes: https://lore.kernel.org/r/20260901155657.6A5981F00A3A@smtp.kernel.org Reviewed-by: Peng Fan Signed-off-by: Dario Binacchi Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 09f52930042f5920264218197236f81e50336ad6 Author: Venkat Rao Bagalkote Date: Wed Sep 9 18:02:40 2026 +0530 powerpc/interrupt: Use early_radix_enabled() in NMI real-mode guard [ Upstream commit 644ffb02746690c0ebfe143e066f81c9bde2975e ] radix_enabled() uses a jump label which is only valid after setup_feature_keys() is called. Before that point, on a pSeries hash guest, early_check_vec5() clears MMU_FTR_TYPE_RADIX in cur_cpu_spec->mmu_features, but the jump label has not yet been patched, so radix_enabled() incorrectly returns true. The dangerous usage window where it goes wrong in early_setup(): early_setup: configure_exceptions(); setup_feature_keys(); If an NMI occurs in this window, !radix_enabled() evaluates to false in DEFINE_INTERRUPT_HANDLER_NMI. The handler fails to skip NMI entry in real mode and attempts to access memory outside the Real Mode Area (RMA), hanging the boot. Since common interrupt wrappers do not have the context of early or late, using early_radix_enabled() is the safer option. It does a plain bitmask check against cur_cpu_spec->mmu_features and is correct at all times. Console logs from a pSeries HASH guest showing values across boot stages: [ 0.000000] DEBUG: after early_init_devtree: early_radix_enabled=0 radix_enabled=1 (mismatch means NMI real-mode check is unsafe!) [ 0.000000] DEBUG: after configure_exceptions (DANGEROUS WINDOW): early_radix_enabled=0 radix_enabled=1 [ 0.000000] DEBUG: after setup_feature_keys (jump labels initialized): early_radix_enabled=0 radix_enabled=0 (should now match!) [ 0.057124] DEBUG: post secondary CPU bringup: early_radix_enabled=0 radix_enabled=0 (should match!) Console logs from a RADIX guest showing values across boot stages: [ 0.000000] DEBUG: after early_init_devtree: early_radix_enabled=1 radix_enabled=1 (mismatch means NMI real-mode check is unsafe!) [ 0.000000] DEBUG: after configure_exceptions (DANGEROUS WINDOW): early_radix_enabled=1 radix_enabled=1 [ 0.000000] DEBUG: after setup_feature_keys (jump labels initialized): early_radix_enabled=1 radix_enabled=1 (should now match!) [ 0.057016] DEBUG: post secondary CPU bringup: early_radix_enabled=1 radix_enabled=1 (should match!) Add the missing #include in alphabetical order since early_radix_enabled() is declared there. Fixes: 8d0e21012743 ("powerpc/mce: Avoid nmi_enter/exit in real mode on pseries hash") Signed-off-by: Venkat Rao Bagalkote Reviewed-by: Mukesh Kumar Chaurasiya Reviewed-by: Shrikanth Hegde Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20260909123240.58786-1-venkat88@linux.ibm.com Signed-off-by: Sasha Levin commit d1a3bd05a0a29a87323f227bfdfdec750b398b59 Author: Abhishek Dubey Date: Mon Sep 28 10:43:54 2026 +0530 powerpc/bpf: Move out dummy_tramp_addr after Long branch stub [ Upstream commit 6652b9941a6c9b6814ca6d2eb153dbf162b89a02 ] Move the long branch address field to the bottom of the long branch stub. This allows uninterrupted disassembly until the last 4/8 bytes. The last bytes exclusion is logically necessary to prevent disassembly failure, otherwise the actual program layout is never altered. Hence no effect on overall program size. Also, align dummy_tramp_addr field with 8-byte boundary. Following is disassembler output for test program with moved down dummy_tramp_addr field: ..... ..... pc:68 left:44 a6 03 08 7c : mtlr 0 pc:72 left:40 bc ff ff 4b : b .-68 pc:76 left:36 a6 02 68 7d : mflr 11 pc:80 left:32 05 00 9f 42 : bcl 20, 31, .+4 pc:84 left:28 a6 02 88 7d : mflr 12 pc:88 left:24 14 00 8c e9 : ld 12, 20(12) pc:92 left:20 a6 03 89 7d : mtctr 12 pc:96 left:16 a6 03 68 7d : mtlr 11 pc:100 left:12 20 04 80 4e : bctr pc:104 left:8 c0 34 1d 00 : Failure log: Can't disasm instruction at offset 104: c0 34 1d 00 00 00 00 c0 Disassembly logic can truncate at 104, ignoring last 8 bytes. Update the dummy_tramp_addr field offset calculation from the end of the program to reflect its new location, for bpf_arch_text_poke() to update the actual trampoline's address in this field. All BPF trampoline selftests continue to pass with this patch applied. Fixes: d243b62b7bd3 ("powerpc64/bpf: Add support for bpf trampolines") Signed-off-by: Abhishek Dubey Signed-off-by: Saket Kumar Bhaskar Tested-by: Yeswanth Krishna Tellakula Tested-by: R Nageswara Sastry Reviewed-by: Hari Bathini Acked-by: Hari Bathini Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/552225fc257381fb83d282b3040c6ad363246465.1789982239.git.skb99@linux.ibm.com Signed-off-by: Sasha Levin commit 599df8fe278c59c24bc7c0df160bf87b483302c4 Author: Abhishek Dubey Date: Mon Sep 28 10:43:50 2026 +0530 powerpc64/bpf: fix compare instruction emitted for tailcall [ Upstream commit 3ebf4ae6d8afac11fe6732418dd378e031f8f4ed ] The tail_call_info field can contain either a scalar counter value or a 64-bit pointer to the counter, using a 32-bit compare (cmplwi) only checks the lower 32 bits, which can lead to incorrect comparisions when location of counter is near 4GB boundary. Use instruction cmpldi/cmplwi for accurate comparision in corresponding cases. Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/bpf/20260517191450.85AE6C2BCB8@smtp.kernel.org/ Fixes: 2ed2d8f6fb38 ("powerpc64/bpf: Support tailcalls with subprogs") Signed-off-by: Abhishek Dubey Signed-off-by: Saket Kumar Bhaskar Tested-by: Yeswanth Krishna Tellakula Tested-by: R Nageswara Sastry Acked-by: Hari Bathini Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/961601491716ef9e00f79e3aa9f7f4ef4440d4d3.1789982239.git.skb99@linux.ibm.com Signed-off-by: Sasha Levin commit 38a56ba5b95b775690746255f85c75d2705b9ba4 Author: Myeonghun Pak Date: Fri Jun 26 18:41:26 2026 +0900 clk: ti: adpll: unregister OF clock provider on remove [ Upstream commit 4c943ddfc24340f1b899762b1ff35c38306b7a35 ] ti_adpll_probe() registers the driver's onecell clock provider with of_clk_add_provider(). The remove path only frees the clock resources, leaving the provider registered after the backing data has been torn down. Unregister the OF clock provider before freeing the ADPLL resources so the provider no longer points at released driver data after device removal. Fixes: 21330497f303 ("clk: ti: Add support for dm814x ADPLL") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 3540d7ef6e4246df6fff00eb0c56e8ceb6798d6b Author: Danish Khateeb Date: Mon Sep 28 13:44:22 2026 -0500 pwm: Allow 32-bit tasks to use the character device [ Upstream commit 45c3d07e3f18cff2b3ea8b797387451a3df9d421 ] pwm_cdev_fileops has no .compat_ioctl, so every ioctl on /dev/pwmchipN fails with -ENOTTY for 32-bit tasks on a 64-bit kernel, e.g. armhf userspace on arm64. struct pwmchip_waveform has the same layout for 32-bit and 64-bit tasks, so compat_ptr_ioctl() is enough. PWM_IOCTL_REQUEST and PWM_IOCTL_FREE take an integer rather than a pointer, which is fine too: compat_ptr() only changed the value on s390, which dropped compat support in v6.19. Fixes: 9c06f26ba5f5 ("pwm: Add support for pwmchip devices for faster and easier userspace access") Assisted-by: LLM Signed-off-by: Danish Khateeb Link: https://patch.msgid.link/20260928184422.380520-1-danishkhateeb03@gmail.com Signed-off-by: Uwe Kleine-König Signed-off-by: Sasha Levin commit 9edaa226ea03da865204e67f745ee974806136e3 Author: Dairui Zhang Date: Tue Sep 22 23:23:42 2026 +0800 IB/mad: fix UAF and double-free in RMPP receive reassembly [ Upstream commit 90e9b6357bec75f627cde1a85b5887215c80aad8 ] mad_rmpp_recv.state is protected by two locks that do not exclude each other: recv_timeout_handler() (port workqueue) uses agent->lock, continue_rmpp() (CQ softirq) uses rmpp_recv->lock. Nothing serializes the check-then-set sequence on the state word: T1 (CQ softirq) T2 (port workqueue) continue_rmpp() lock(rmpp_recv->lock) state == ACTIVE [passes] recv_timeout_handler() lock(agent->lock) state = TIMEOUT list_del(&rmpp_recv->list) unlock(agent->lock) destroy_rmpp_recv() wait_for_completion() [blocks on T1's ref] state = COMPLETE unlock(rmpp_recv->lock) complete_rmpp() queue cleanup_work (+10s) deref() [unblocks] kfree(rmpp_recv) ib_free_recv_mad(done_wc) +10s: recv_cleanup_handler() runs lock/list_del/destroy on the freed rmpp_recv -> UAF write and double free; nothing can cancel that cleanup_work anymore, the entry is already off agent->rmpp_list. done_wc is also returned to ib_mad_complete_recv() and freed again -> UAF read and double free. Reaching this requires sending MADs to a kernel RMPP agent from the InfiniBand/RoCE fabric: the per-port sa_query agent accepts subnet manager responses whose SLID/GID/TID are not authenticated on the fabric, and legacy user_mad agents registered without IB_USER_MAD_USER_RMPP start reassembly on any incoming RMPP DATA MAD with an attacker-chosen TID, no in-flight send required. The attacker controls segment timing and can run many transactions in parallel (agent->rmpp_list has no cap), so landing the microseconds-wide receive critical section on the 40-second timeout boundary is a matter of patience, not luck. Unify state transitions under rmpp_recv->lock in recv_timeout_handler(), keeping list manipulation under agent->lock (which preserves the agent->lock -> rmpp_recv->lock ordering used by continue_rmpp()). State check/set in both paths is then serialized, so the loser of the race always observes the final state and bails out. recv_cleanup_handler() needs no change: with transitions serialized, a cleanup_work can only be pending after COMPLETE, in which case the timeout handler exits early. The race is as old as the RMPP implementation itself. Fixes: fa619a77046b ("[PATCH] IB: Add RMPP implementation") Assisted-by: LLM Signed-off-by: Dairui Zhang Link: https://patch.msgid.link/20260922152342.1474845-1-zhangdairui@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 5bfe967d7ceee59e737e36f7505ee9aa0e88ffe1 Author: Sachin Kumar Garg Date: Sat Aug 1 12:14:48 2026 +0530 media: iris: cache work mode after computing it in iris_set_stage [ Upstream commit 1237888922a71897326495f848766412fb74307c ] iris_set_stage() computes work_mode and sends it to firmware but never updates inst->fw_caps[STAGE].value, leaving the cached STAGE value stale. iris_vpu_enc_bin_size() and iris_vpu3x_vpu4x_calculate_frequency() read this cached value, so a stale default causes them to miscalculate buffer size and clock frequency for sessions actually running in a different stage than the cached one. Update inst->fw_caps[cap_id].value with the computed work_mode before sending it to firmware, keeping the cache consistent with what is actually configured. Fixes: 3a19d7b9e08b ("media: iris: implement set properties to firmware during streamon") Reviewed-by: Vikash Garodia Signed-off-by: Sachin Kumar Garg Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit da146dab51d1470262a148a0b31762bf8f32f76f Author: Dmitry Baryshkov Date: Fri Jul 31 03:31:44 2026 +0300 media: iris: reference count video instances [ Upstream commit af5f7df6c8b33bed714ec0aea15a0a2f48900c0a ] iris_get_instance() looks up an instance on core->instances and returns it after dropping core->lock, without taking any reference. The threaded interrupt handler uses this to find the instance a firmware response belongs to and then takes inst->lock. Meanwhile userspace may close the same file descriptor: iris_close() removes the instance from the list, destroys inst->lock and frees the instance. The interrupt handler then operates on freed memory and a destroyed mutex, a use-after-free. Add a kref to struct iris_inst. iris_get_instance() takes a reference under core->lock, so an instance it returns cannot be freed until the caller drops that reference with iris_inst_put(). The instance is released (mutexes destroyed, memory freed) only when the last reference goes away, whether that is held by the closing thread or the interrupt handler. Fixes: 38fc8beaba55 ("media: iris: implement reqbuf ioctl with vb2_queue_setup") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit dbc08cf931f2036f7c138eb66b493a1557523762 Author: Dmitry Baryshkov Date: Fri Jul 31 03:31:43 2026 +0300 media: iris: reject open() when the session limit is reached [ Upstream commit 397ebadcbc219f6c20d11c0378d8cb7695d015c2 ] iris_add_session() silently skips adding the instance to core->instances once max_session_count is reached, but returns void, so iris_open() continues as if it succeeded and hands a file descriptor back to userspace. As the instance is not on core->instances, firmware responses for it are dropped and every subsequent ioctl times out. Make iris_add_session() return an error when the limit is reached and fail iris_open() accordingly, freeing the partially initialised instance. Fixes: 38fc8beaba55 ("media: iris: implement reqbuf ioctl with vb2_queue_setup") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit b6cf7ae685cb3bee215de5b9cc226c1b04febf31 Author: Dmitry Baryshkov Date: Fri Jul 31 03:31:42 2026 +0300 media: iris: guard against a NULL hfi_sys_ops in the interrupt handler [ Upstream commit 95f9e9fc9336ca4e8fb4ff0a76ddbde2f60bdb09 ] core->hfi_sys_ops is populated only during core bring-up, once the firmware generation has been detected. iris_vpu_power_on() enables interrupts earlier than that, so an interrupt (for instance a spurious one) that fires in this window makes iris_hfi_isr_handler() unconditionally dereference a NULL core->hfi_sys_ops and panic. Skip the response handler when hfi_sys_ops has not been set up yet; the interrupt is still acknowledged and the line re-enabled. Fixes: d8a6a63372b8 ("media: qcom: iris: merge hfi_response_ops and hfi_command_ops") Assisted-by: Claude:claude-opus-4-8 Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit 46c2a699e74cdb2ecc675a5c865e67cd9971c6c3 Author: Dmitry Baryshkov Date: Fri Jul 31 03:31:41 2026 +0300 media: iris: take core lock when scanning the instance list [ Upstream commit 428e6f95e685a06a73868aee95dd94dca7b3a027 ] iris_check_session_supported() walks core->instances to confirm the current instance is registered, but does so without holding core->lock. A concurrent iris_close() takes core->lock and removes a (possibly different) instance from the list via list_del_init() before freeing it, so the lockless traversal can follow a freed pointer and dereference it, resulting in a use-after-free. Hold core->lock across the list traversal, matching the other iterators over core->instances such as iris_check_core_mbpf(). The lock is dropped before iris_check_core_mbpf() is called so the nesting is unchanged. Fixes: bdbe1cac0c10 ("media: iris: add check whether the video session is supported or not") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit 216a6effc9b929735742837e69bd7d27d1bee7be Author: Dmitry Baryshkov Date: Fri Jul 31 03:31:40 2026 +0300 media: iris: fail firmware boot on invalid uc_region [ Upstream commit f301102c17f22f4a140bd9a50281473e6b782f0c ] iris_vpu_boot_firmware() polls CTRL_STATUS while the firmware boots. When the hardware reports an invalid uc_region setting, the poll loop breaks early with count still below max_tries. The following timeout check (count >= max_tries) is therefore false, so the function skips the error return and falls through to return 0, reporting a successful boot. The caller then enables host interrupts and proceeds to use firmware that never came up, which can lead to unhandled timeouts or hardware hangs. Return an error directly from the uc_region error path instead of breaking out of the loop and reporting success. Fixes: abf5bac63f68 ("media: iris: implement the boot sequence of the firmware") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit e17e310613cdc969f8b2dd376f9e1bc0739b550a Author: Dmitry Baryshkov Date: Fri Jul 31 02:48:22 2026 +0300 Revert "media: iris: Add Gen2 firmware autodetect and fallback" [ Upstream commit 6f4eb91fa27644ed57cbb43fa44ce8eea02bce0c ] The commit 412a2e5955e0 ("media: iris: Add Gen2 firmware autodetect and fallback") added support for detecting the firmware HFI interface based on the firmware contents, but it has issues with the MDT split files and with synchronisation / locking. Revert the commit, it will be replaced by the better version. Fixes: 412a2e5955e0 ("media: iris: Add Gen2 firmware autodetect and fallback") Signed-off-by: Dmitry Baryshkov Reviewed-by: Vishnu Reddy Reviewed-by: Bryan O'Donoghue [bod: Fixed merge conflict adding additional v4l2_device_register();] Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit 7cc7cdce5fb002f9946d697b65ca27d56511a949 Author: Malte Wechter Date: Tue Sep 29 11:34:06 2026 +0200 rnull: configfs: add power to configfs features [ Upstream commit 0cd698e89375d0dfc257f9ae978420aa7fe5359d ] features displayed by configfs for rnull was inconsistent with the actual features available. This correctly exposes `power` as a feature, which is also consistent with the C null_blk driver. Fixes: d969d504bc13 ("rnull: enable configuration via `configfs`") Signed-off-by: Malte Wechter Link: https://msgid.link/20260924-upstream-v7-3-rc3-v2-1-ca56ae7a73e9@gmail.com Signed-off-by: Andreas Hindborg Link: https://patch.msgid.link/20260929-rust-block-for-v7-4-rc1-b4-v1-8-642a4c1aebd7@kernel.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit f01d9fd3baab47b9d0d38d7deacd3db4b01d2d21 Author: Hungyu Lin Date: Thu Jun 4 05:47:08 2026 +0000 media: iris: cancel sys error work on driver removal [ Upstream commit 4524809316482b64ff092afb7e7b0525ce137c75 ] Cancel sys_error_handler before tearing down the driver. The delayed work may still be pending when iris_remove() runs. Since iris_core is allocated with devm_kzalloc(), allowing the work to execute after driver removal could result in accessing freed memory. Fixes: fb583a214337 ("media: iris: introduce host firmware interface with necessary hooks") Signed-off-by: Hungyu Lin Reviewed-by: Vishnu Reddy Reviewed-by: Dmitry Baryshkov [bod: Fixed patch title] Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit a0f9052ab62e25bc9592ad14ae6b11c01b55d3be Author: Ruoyu Wang Date: Tue Jul 7 23:06:24 2026 +0800 media: venus: Drop session events without an instance [ Upstream commit 8921f6da06fd869b6f1aa8d02e40a4e2e2a45fe4 ] hfi_process_msg_packet() intentionally allows HFI_MSG_EVENT_NOTIFY packets without a matching session instance because HFI_EVENT_SYS_ERROR is a system event and has no session attached. That exception currently applies to every event-notify packet. If the firmware reports a late or otherwise invalid session event after to_instance() fails, hfi_event_notify() can dispatch it to session-only handlers such as event_seq_changed() or event_release_buffer_ref(), which dereference inst. Only system errors are valid without a session instance. Drop other event notifications before the session event handlers can dereference a NULL inst. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 09c2845e8fe4 ("[media] media: venus: hfi: add Host Firmware Interface (HFI)") Signed-off-by: Ruoyu Wang Signed-off-by: Bryan O'Donoghue Signed-off-by: Sasha Levin commit df7ba0e118386ebef7aa3b0c970c6aebe8cdffb8 Author: Selvin Xavier Date: Mon Sep 21 23:12:30 2026 -0700 RDMA/bnxt_re: Use bnxt_ext_stats_supported for counter count selection [ Upstream commit 7cc8ccb157a4769c8fbce8296532dcb8a8ea0d5e ] Selecting between BNXT_RE_NUM_EXT_COUNTERS and BNXT_RE_NUM_STD_COUNTERS relied only on bnxt_qplib_is_chip_gen_p5_p7(), which doesn't account for the extended stats capability flag or the PF/VF restriction. Use bnxt_ext_stats_supported() instead, matching the check already used to populate the extended stats, so the counter count stays consistent with what gets filled in. Fixes: 8238c7bd8420 ("RDMA/bnxt_re: Fix the statistics for Gen P7 VF") Reviewed-by: Kalesh AP Signed-off-by: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d186095b3e9e19e348e9001279cf0b82e13e7c7e Author: Selvin Xavier Date: Mon Sep 21 23:12:29 2026 -0700 RDMA/bnxt_re: Fix the PD and DPI table size [ Upstream commit aa6c2ef821a6ba7f3fd58cfcc031b2d16f3811c6 ] The PD and DPI bitmaps were sized as max >> 3 (bytes), but bitmap ops (set_bit(), clear_bit(), find_first_bit(), test_and_set_bit()) operate on whole unsigned long words, so whenever max isn't a multiple of BITS_PER_LONG, the buffer under-allocates and the top word's bitops read/write past the end of the kmalloc()'d buffer. Most exposed on the DPI table, since dpit->max comes from the firmware-reported dev_attr->max_dpi with no alignment guarantee. Fix the size of both allocations with BITS_TO_LONGS(max) * sizeof(unsigned long). Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 9eddb556b59fc28e474a3a8644ed09f972eba76b Author: Selvin Xavier Date: Mon Sep 21 23:12:28 2026 -0700 RDMA/bnxt_re: Serialize dcb_wq access against async notifier [ Upstream commit 81caf9240dfb082c0eb2b24feef8266268fd152f ] bnxt_re_async_notifier() runs in NAPI/softirq context via bnxt_en's RCU-protected ULP ops dispatch, never under rtnl_lock, so it isn't serialized against bnxt_re_uninit_dcb_wq() destroying rdev->dcb_wq. A concurrent notifier call can queue_work() on a workqueue that is being, or has just been, destroyed. Add a spinlock scoped to dcb_wq: the notifier takes it before checking dcb_wq and queuing work, and bnxt_re_uninit_dcb_wq() takes it to atomically clear dcb_wq before destroying it. Initialize the lock at rdev allocation so it is valid on every teardown path, including bnxt_re_dev_init()'s early failure labels. Fixes: 51dc5312dcd9 ("RDMA/bnxt_re: Add support to handle DCB_CONFIG_CHANGE event") Signed-off-by: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit dce583e5f7da69dad88f0da08327deaaff27dda8 Author: Selvin Xavier Date: Mon Sep 21 23:12:26 2026 -0700 RDMA/bnxt_re: Initialize wqe.flags in bnxt_re_post_srq_recv() [ Upstream commit 4d8168a3b7c93385c11dc836df569d337089b218 ] wqe is declared once above the WR loop and never zeroed, so wqe.flags holds indeterminate stack contents on the first WR and the previous WR's stale value thereafter. This propagates straight into the hardware-visible srqe->flags in bnxt_qplib_post_srq_recv(). Most values of the wqe struct is set except flags. So initialize flags also. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 25fd9e64d73b0b5e8bebc05803a389324b6d1ee9 Author: Selvin Xavier Date: Mon Sep 21 23:12:25 2026 -0700 RDMA/bnxt_re: Validate SRQ max_sge at create time [ Upstream commit 1894ed9a664d19c190ce1bd2146759efbae77e4b ] bnxt_re_create_srq() stored attr.max_sge into srq->qplib_srq.max_sge unvalidated, which defeats the num_sge check in bnxt_re_post_srq_recv() since that check compares against this same attacker-chosen value. Reject max_sge > dev_attr->max_srq_sges at create time, and clamp dev_attr->max_srq_sges to BNXT_STATIC_MAX_SGE since SRQ WQEs use the fixed-size SGE array. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Signed-off-by: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 5259a2ab885136e528d458de6ad1cba0bb7031a8 Author: Selvin Xavier Date: Mon Sep 21 23:12:24 2026 -0700 RDMA/bnxt_re: Detect wrong sge_len passed for inline [ Upstream commit 81551ece0864c346080d241719d458c93f0e7fc9 ] Avoid handling wrong sge_len by adding extra check to see if the passed length is more than the inline size supported. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Reviewed-by: Kalesh AP Signed-off-by: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 12432d89fd42031808fb9457bb655f13549a4171 Author: Selvin Xavier Date: Mon Sep 21 23:12:23 2026 -0700 RDMA/bnxt_re: Fix integer overflow in send payload size computation [ Upstream commit 3483cbbd7487163345b4b4d5eb8cad8540d1c3ba ] bnxt_re_build_sgl() summed SGE lengths into a signed int, which could overflow. Make it return u32, and have bnxt_re_copy_wr_payload() report the size via a u32 out-parameter with the return value carrying only the error status, instead of overloading a signed int with both. Fixes: 1ac5a4047975 ("RDMA/bnxt_re: Add bnxt_re RoCE driver") Signed-off-by: Selvin Xavier Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit c0b3c2828a5fdc2dc53e62dde22cb65ea3c655c1 Author: Jeff Chen Date: Mon Aug 31 15:52:26 2026 +0800 wifi: nxpwifi: fix return value check in change_vif_to_sta/ap [ Upstream commit f833415e49981bee131841e805da3f24b90a7524 ] nxpwifi_change_vif_to_sta() and nxpwifi_change_vif_to_ap() both call nxpwifi_set_bss_mode() without storing the return value, then check 'if (ret)' which tests the stale value from the previous call. The 'if (ret) goto done' is therefore dead code, and errors from nxpwifi_set_bss_mode() are silently ignored. Fix this by assigning the return value to ret, so the existing error path works correctly. Fixes: 73b01e57ed3e ("wifi: nxp: add nxpwifi driver for IW61x") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-wireless/anwqp-LuExbRshYu@stanley.mountain/ Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Jeff Chen Signed-off-by: Sasha Levin commit 49f8567c54834fac1c1c876b48cd38a2ccc967d4 Author: Finn Thain Date: Tue Sep 29 10:19:35 2026 +1000 swim3: Fix FDEJECT ioctl for exclusive open [ Upstream commit ce054fbe9a4bf4ffefef0f8e2504ea54da058ed2 ] The eject command from the util-linux package does not work with the swim3 driver: the drive doesn't eject anything and the command fails. Apparently, ioctl(fd, FDEJECT) returns -EBUSY after fd was opened O_EXCL. Fix this by checking ref_count for either 1 or -1. Either value means that the caller is the sole user of the disk. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Tested-by: Stan Johnson Signed-off-by: Finn Thain Link: https://patch.msgid.link/f4cb43726ee6f1cf159a6208f77b4cceea670a3c.1790641175.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 9870ad72e75f05981d44f30061f25527db883f52 Author: Finn Thain Date: Tue Sep 29 10:19:35 2026 +1000 swim: Fix FDEJECT ioctl for exclusive open [ Upstream commit c76b93df9ae61d8ddebf6aa3bc218252f85e80c6 ] The eject command from the util-linux package does not work with the swim driver: the drive doesn't eject anything and the command fails. Apparently, ioctl(fd, FDEJECT) returns -EBUSY when fd is opened O_EXCL. Fix this by checking ref_count for either 1 or -1. Either value means that the caller is the sole user of the disk. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Tested-by: Stan Johnson Signed-off-by: Finn Thain Link: https://patch.msgid.link/ae3ee8e86833a2739d7857460cbe2addf4146088.1790641175.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 1956482f5734bcef726a8821c05005e773636a19 Author: Finn Thain Date: Tue Sep 29 10:19:35 2026 +1000 swim: Return -EROFS when opened with BLK_OPEN_WRITE flag [ Upstream commit d8fe777978a12a96cb5d10d6d888720fcba2da2b ] Write requests are not supported by the driver and produce IO errors as shown below. Avoid this by returning -EROFS when opened for writing. [ 4111.690000] I/O error, dev fd0, sector 2 op 0x1:(WRITE) flags 0x800800 phys_seg 1 prio class 2 [ 4111.700000] Buffer I/O error on dev fd0, logical block 2, lost async page write Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Tested-by: Stan Johnson Signed-off-by: Finn Thain Link: https://patch.msgid.link/327be6ca3c92c3411b5dfaeede014ed65a2d0f0f.1790641175.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 08e6a0e4c5a116f407bea314132083f2043fe184 Author: Logan Odell Date: Thu Sep 10 10:36:48 2026 -0700 PCI/IOV: Read VF config values that need not match PF [ Upstream commit ae43799529c480510dcc14bd0ed141a1d85b9259 ] Per PCIe r7.0, sec 7.5.1.1.5 and 7.5.1.2.3, VF Revision IDs and Subsystem IDs may differ from the PF's. Read these values from VF config space instead of using cached values from VF 0. Per 7.5.1.1.6 and 7.5.1.2.3, VF Class Codes and Subsystem Vendor IDs must be the same as the PF's. Use the PF's value instead of reading from VF config space. Per 7.5.1.1.9, the Header Type for a VF must be 0, so hardcode that assignment. Fixes: cf0921bea66c ("PCI/IOV: Use VF0 cached config registers for other VFs") Signed-off-by: Logan Odell [bhelgaas: commit log, move "rev" decl inside block that uses it] Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260910173648.1304517-1-loganodell@google.com Signed-off-by: Sasha Levin commit a7322c3fdb2719bce26728d59ce6d6656815464b Author: Peng Fan Date: Wed Jul 29 21:08:08 2026 +0800 arm64: dts: imx95-15x15-frdm: fix reserved memory node names for remoteproc [ Upstream commit 5cae743b988da033a709bfa10739b1d34fe57e71 ] The imx_rproc driver uses node names to identify reserved memory regions. It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the resource table, and "vdev" prefix to filter vdev regions. Rename the reserved memory nodes to use the expected names so the driver can correctly identify and handle each region. Fixes: 9bdfeed989b1 ("arm64: dts: freescale: imx95: Add support for i.MX95 15x15 FRDM board") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 502b3244cbe4879b744593adab0fa4cceade69b9 Author: Peng Fan Date: Wed Jul 29 21:08:07 2026 +0800 arm64: dts: imx93-11x11-evk: fix reserved memory node names for remoteproc [ Upstream commit 7e92e62246c472418230b48c05e9296835b26b07 ] The imx_rproc driver checks for the name "vdev0buffer" to skip mapping the vdev buffer region, as it is handled by rproc_add_virtio_dev. With the node named "vdevbuffer", the check fails and the region gets unnecessarily mapped. Rename it to "vdev0buffer" to match what the driver expects. Fixes: 3eb100e56195 ("arm64: dts: imx93: Extract common EVK description into shared dtsi") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit cffdf07ab99b079998440621422c9cb76f846dc5 Author: Peng Fan Date: Wed Jul 29 21:08:06 2026 +0800 arm64: dts: imx8dxl-sr-som: fix reserved memory node names for remoteproc [ Upstream commit d8aa7355f91ed71502f588d33200a211f24f58ef ] The imx_rproc driver uses node names to identify reserved memory regions. It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the resource table, and "vdev" prefix to filter vdev regions. Rename the reserved memory nodes to use the expected names so the driver can correctly identify and handle each region. Fixes: ef873f01a1b1 ("arm64: dts: imx8dxl: Add SolidRun SoM and HummingBoard") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 8d3b63cdb49f5ee4fe7385131476af67cbf57665 Author: Peng Fan Date: Wed Jul 29 21:08:05 2026 +0800 arm64: dts: imx93-9x9-qsb: fix reserved memory node names for remoteproc [ Upstream commit 475a58b82921cc89805b31e0bc1df91681124a3d ] The imx_rproc driver checks for the name "vdev0buffer" to skip mapping the vdev buffer region, as it is handled by rproc_add_virtio_dev. With the node named "vdevbuffer", the check fails and the region gets unnecessarily mapped. Rename it to "vdev0buffer" to match what the driver expects. Fixes: 0565d20cd8c2 ("arm64: dts: freescale: Support i.MX93 9x9 Quick Start Board") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit b891cb1a3d27e8fbe911367b184f10c7f6ce5175 Author: Peng Fan Date: Wed Jul 29 21:08:04 2026 +0800 arm64: dts: imx93-14x14-evk: fix reserved memory node names for remoteproc [ Upstream commit e62f7ef5320d05361ee7f665568d05361b0c59d9 ] The imx_rproc driver checks for the name "vdev0buffer" to skip mapping the vdev buffer region, as it is handled by rproc_add_virtio_dev. With the node named "vdevbuffer", the check fails and the region gets unnecessarily mapped. Rename it to "vdev0buffer" to match what the driver expects. Fixes: 0481dadbc5e5 ("arm64: dts: imx93: support i.MX93-14x14-EVK board") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 5af0d084b3ceae8c3c84f22528e3551f6bc84749 Author: Peng Fan Date: Wed Jul 29 21:08:03 2026 +0800 arm64: dts: imx93-11x11-frdm: fix reserved memory node names for remoteproc [ Upstream commit ab6fc27a020a18a765e17bc445b64ee18b6244de ] The imx_rproc driver checks for the name "vdev0buffer" to skip mapping the vdev buffer region, as it is handled by rproc_add_virtio_dev. With the node named "vdevbuffer", the check fails and the region gets unnecessarily mapped. Rename it to "vdev0buffer" to match what the driver expects. Fixes: eb2f28413e23 ("arm64: dts: freescale: add support for NXP i.MX93 FRDM") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 6166013e5a31e9d014a665a5d52a980093b8e258 Author: Joseph Guo Date: Thu Jul 23 16:13:21 2026 +0900 arm64: dts: imx93-11x11-frdm: factor out common parts into dtsi [ Upstream commit 264480ac044bd4d51489ccb7b17b7b50e2e5bf3f ] The i.MX93 Wireless FRDM board reuses most of the i.MX93 FRDM board. To avoid duplication and DTS-to-DTS includes, extract common hardware definitions from imx93-11x11-frdm.dts into imx93-11x11-frdm-common.dtsi to allow the common description shared by both boards. The FRDM-IMX93 board-specific .dts now includes the common dtsi and only contains board-specific overrides. Signed-off-by: Joseph Guo Signed-off-by: Frank Li Stable-dep-of: ab6fc27a020a ("arm64: dts: imx93-11x11-frdm: fix reserved memory node names for remoteproc") Signed-off-by: Sasha Levin commit 3a412ac03675e7e3456205b2798b0e007b9780bc Author: Peng Fan Date: Wed Jul 29 21:08:02 2026 +0800 arm64: dts: imx8ulp-evk: fix reserved memory node names for remoteproc [ Upstream commit f55e49b75c65c3e38e7bbe1d735f79128a50126e ] The imx_rproc driver checks for the name "vdev0buffer" to skip mapping the vdev buffer region, as it is handled by rproc_add_virtio_dev. With the node named "vdevbuffer", the check fails and the region gets unnecessarily mapped. Rename it to "vdev0buffer" to match what the driver expects. Fixes: 014fbffa25a7 ("arm64: dts: imx8ulp-evk: enable CM33 node") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 71725414674a2dd504c94ddc643d312484b9e323 Author: Peng Fan Date: Wed Jul 29 21:08:01 2026 +0800 arm64: dts: imx8qxp-mek: fix dsp reserved memory node names for remoteproc [ Upstream commit 715f8f8877d03025a2af98b4128c83441617eb74 ] The imx_dsp_rproc driver checks for the name "vdev0buffer" to skip mapping the vdev buffer region, as it is handled by rproc_add_virtio_dev. With the node named "memory", the check fails and the region gets unnecessarily mapped. Rename the DSP reserved memory nodes to use proper names for consistency with other remoteproc reserved memory regions and to ensure the vdev0buffer check works correctly. Rename the DSP reserved memory nodes to use the expected names so the driver can correctly identify and handle each region. Fixes: f3e22e1d8171 ("arm64: dts: imx8qxp-mek: add dsp rproc-related mem regions") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 633c8ffba2e42494d9c4df00d05df048773562a1 Author: Peng Fan Date: Wed Jul 29 21:08:00 2026 +0800 arm64: dts: imx8qxp-mek: fix reserved memory node names for remoteproc [ Upstream commit a9f3cf4354022ca0b4a0d12eab7af9858f71c9f7 ] The imx_rproc driver uses node names to identify reserved memory regions. It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the resource table, and "vdev" prefix to filter vdev regions. Rename the reserved memory nodes to use the expected names so the driver can correctly identify and handle each region. Fixes: 5fa302590f17 ("arm64: dts: imx8qxp-mek: add cm4 and related nodes") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 634b0b6ae08af4b34b3066ca1947622f15cbb20e Author: Peng Fan Date: Wed Jul 29 21:07:59 2026 +0800 arm64: dts: imx8qm-mek: fix dsp reserved memory node names for remoteproc [ Upstream commit 2cd565bde7e872409fa468fb9410e539fb5969e4 ] The imx_dsp_rproc driver checks for the name "vdev0buffer" to skip mapping the vdev buffer region, as it is handled by rproc_add_virtio_dev. With the node named "memory", the check fails and the region gets unnecessarily mapped. Rename the DSP reserved memory nodes to use proper names for consistency with other remoteproc reserved memory regions and to ensure the vdev0buffer check works correctly. Rename the DSP reserved memory nodes to use the expected names so the driver can correctly identify and handle each region. Fixes: d0ee7ae8ce26 ("arm64: dts: imx8qm-mek: enable dsp node for rproc usage") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit f79778aacf382239a36dcad339354738b93ce380 Author: Peng Fan Date: Wed Jul 29 21:07:58 2026 +0800 arm64: dts: imx8qm-mek: fix reserved memory node names for remoteproc [ Upstream commit c712a46c10d38ce7869a9d81d7986e844a4e9f24 ] The imx_rproc driver uses node names to identify reserved memory regions. It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the resource table, and "vdev" prefix to filter vdev regions. Rename the reserved memory nodes to use the expected names so the driver can correctly identify and handle each region. Fixes: 52c9971edd4f ("arm64: dts: imx8qm-mek: add cm4 remote-proc and related memory region") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit e9f4db12a108e448db6bb49f8e3efa62c8f4e969 Author: Peng Fan Date: Wed Jul 29 21:07:57 2026 +0800 arm64: dts: imx8dxl-evk: fix reserved memory node names for remoteproc [ Upstream commit c4e5f1a143799651aba2c4f66860b63b56786306 ] The imx_rproc driver uses node names to identify reserved memory regions. It checks for "vdev0buffer" to skip mapping, "rsc-table" to locate the resource table, and "vdev" prefix to filter vdev regions. Rename the reserved memory nodes to use the expected names so the driver can correctly identify and handle each region. Fixes: ee39dbd9a6cb ("arm64: dts: imx8dxl-evk: add imx8dxl_cm4, lsio mu5, related memory region") Signed-off-by: Peng Fan Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit a666d72d7f9c121fea2ba16b0a59bb06fc6ce5ed Author: Li RongQing Date: Mon Sep 21 11:11:00 2026 +0800 IB/isert: Don't share drop_cmd_list across concurrent connection teardowns [ Upstream commit d30e9b1bc47bd9be4b2fc97b0e4074bc02c4203a ] isert_put_unsol_pending_cmds() declares drop_cmd_list as a static LIST_HEAD, so the list is shared across all invocations of the function. It is called from isert_wait_conn(), the per-connection .iscsit_wait_conn transport callback, which runs independently for each connection during teardown. conn->cmd_lock only protects each connection's own conn_cmd_list, not the shared drop_cmd_list. If two connections tear down at the same time, both threads list_move_tail() commands into the same drop_cmd_list without any mutual exclusion, and then both iterate and list_del/put it concurrently. This corrupts the linked list and can double-free iscsit_cmd structures. Make drop_cmd_list a stack-local list, matching the pattern already used in isert_free_np(). Fixes: 3e03c4b01da3 ("iser-target: Put the reference on commands waiting for unsol data") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260921031100.2199-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 46f20f6e193f20892d2a5e2af7c4143d2a27562c Author: Li RongQing Date: Sat Sep 19 18:08:48 2026 +0800 RDMA/mlx5: Restore mr->pi_mr after temporary stack-local assignment [ Upstream commit 9728effe43d8fc4d58e12b697d0d6127355abdd5 ] In handle_reg_mr_integrity, when mr->pi_mr is NULL (physical-address optimization path), the code points mr->pi_mr at a stack-local pa_pi_mr so set_pi_umr_wr can read it during this call. The pointer is never restored, so after the function returns mr->pi_mr dangles at a freed stack frame. A second IB_WR_REG_MR_INTEGRITY posted on the same MR without remapping reads the stale pointer and dereferences it. Save the original pi_mr (captured at function entry) and restore it on the out path. Fixes: 2563e2f30acb ("RDMA/mlx5: Use PA mapping for PI handover") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260919100848.2442-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 55a684d43eaa1538a10be89e1b2ac6386d4d4c08 Author: Gabor Juhos Date: Tue Sep 22 19:50:57 2026 +0200 spi: spi-qpic-snand: fix read location register usage in qcom_spi_config_cw_read() [ Upstream commit f3c0a2b557ea87cbd802b278783c32484a063ded ] While configuring a codeword read, the com_spi_config_cw_read() function unconditionally schedules writing of the regular read location registers. However these registers should be written only if the actual codeword is not the last one. Change the function to schedule writing of the registers corresponding to the acual codeword only. While at it, also drop the single-use 'reg' and 'num_cw' local variables and use the respective values directly in order to make the code easier to understand. Fixes: 7304d1909080 ("spi: spi-qpic: add driver for QCOM SPI NAND flash Interface") Signed-off-by: Gabor Juhos Link: https://patch.msgid.link/20260922-qpic-snand-fix-cw_read-readloc-v1-1-67f6819fb3d7@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 92e80febad02cf5f284b9da30d9b99abb4de8a89 Author: Waiman Long Date: Sun Sep 27 17:53:18 2026 -0400 cgroup/cpuset: Run SCHED_DEADLINE shrink test on valid partition root only [ Upstream commit 8a1c0f5c82843104d9bef2bc3726c89da70a9b91 ] Commit f82f80426f7a ("sched/deadline: Ensure that updates to exclusive cpusets don't break AC") adds a check in validate_change() to make sure that there is enough bandwidth for SCHED_DEADLINE tasks if we shrink a v1 exclusive cpuset that has CS_CPU_EXCLUSIVE flag set. With the introduction of cpuset partition in cgroup v2, we keep setting the CS_CPU_EXCLUSIVE flag for a partition root so that the SCHED_DEADLINE check will continue to work as intended. However it turns out that the current code isn't perfect and there are cases where a cpuset isn't a valid partition root, but the exclusive flag is still incorrectly set. This can leads to SCHED_DEADLINE check being incorrectly triggered when there are deadline tasks in the system. This can result in unexpected -EBUSY failure when making changes to cpuset control files. Fix that by checking for a valid partition root for v2 and is_cpu_exclusive() for v1. It is far easier and less cumbersome than to make sure that the exclusive flag is only set for valid partition roots. Even though commit a86ce68078b2 ("cgroup/cpuset: Extract out CS_CPU_EXCLUSIVE & CS_SCHED_LOAD_BALANCE handling") is marked as a commit to be fixed, the problem may exist before that. Fixes: a86ce68078b2 ("cgroup/cpuset: Extract out CS_CPU_EXCLUSIVE & CS_SCHED_LOAD_BALANCE handling") Signed-off-by: Waiman Long Reviewed-by: Ridong Chen Reviewed-by: Guopeng Zhang Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit ea6e4b5031cfd6ebb84e26c3766e8591979e8125 Author: Xiang Mei (Microsoft) Date: Thu Jul 9 22:05:01 2026 +0000 fs/ntfs3: fix slab-out-of-bounds write in attr_insert_range() [ Upstream commit bf9a6578e03b065335836e025356b4b9170b9449 ] When fallocate(FALLOC_FL_INSERT_RANGE) grows a still-resident ntfs3 attribute, attr_insert_range() shifts the inline data using the insert length 'bytes' as both the destination offset and the copy size: memmove(data + bytes, data, bytes); Both are wrong: the shift must start at the insertion point 'vbo' and move only the data past it (data_size - vbo). When bytes > data_size the memmove runs off the end of the data_size + bytes buffer and overflows the adjacent slab object. Since vbo < data_size is already enforced above, the reworked offsets stay within the data_size + bytes buffer and cannot under/overflow. BUG: KASAN: slab-out-of-bounds in attr_insert_range (fs/ntfs3/attrib.c:2581) Write of size 512 at addr ffff8880135e8b10 by task exploit/142 ... __asan_memmove (mm/kasan/shadow.c:95) attr_insert_range (fs/ntfs3/attrib.c:2581) ntfs_fallocate (fs/ntfs3/file.c:618) vfs_fallocate (fs/open.c:338) __x64_sys_fallocate (fs/open.c:362) ... Fixes: 9256ec35359f ("fs/ntfs3: Refactoring attr_insert_range to restore after errors") Reported-by: AutonomousCodeSecurity@microsoft.com Signed-off-by: Xiang Mei (Microsoft) Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit 358e49fce2c7dc1c783ac462c022074b41b6ab7d Author: Karl Mehltretter Date: Wed Sep 23 08:16:58 2026 +0200 soc: ti: k3-ringacc: Fix DMA ring initialization kernel-doc [ Upstream commit 6c4e6e8f5cf95f7e0d4f04928a9ae70e20c73d4b ] The heading for k3_ringacc_init_data repeats struct, so kernel-doc cannot match it to the declaration. Its three fields are also missing descriptions. Use the structure name and describe the firmware handle, device ID, and total number of available rings used during DMA ring initialization. Fixes: d782298c6f6b ("soc: ti: k3-ringacc: add AM64 DMA rings support.") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Udit Kumar Link: https://patch.msgid.link/20260923061658.20140-2-kmehltretter@gmail.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit a265dbdfaf30bdc44614b537eafbf415f4e2a9e7 Author: Karl Mehltretter Date: Wed Sep 23 08:16:57 2026 +0200 soc: ti: k3-ringacc: Correct ring API kernel-doc [ Upstream commit 45ea6911ad16859d4ce4f25780b0ebcf5660e43a ] The ring accelerator header labels k3_ring_cfg as an enum, uses propname instead of property, and gives the DMA reset helper the ordinary reset helper's name. The DMA reset comment also omits occ, including the convention that zero requests a hardware occupancy read. The proxy flag is parsed as a separate parameter, and the pop helpers describe pushing elements. Proxy access is supported in Message mode; the listed Credentials and Queue modes are not implemented. The phandle lookup returns encoded error pointers rather than integer error values. Match the declarations and document these argument and operation roles. Fixes: 3277e8aa2504 ("soc: ti: k3: add navss ringacc driver") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260923061658.20140-1-kmehltretter@gmail.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit c3715141c30eda0a4923b1ce3ea3d1144f0dc5b4 Author: Ian Rogers Date: Thu Sep 24 10:03:46 2026 -0700 perf vendor events intel: Fix snowridgex umask encoding. [ Upstream commit 8a0b9c9ff582258aafc6d6c8fe3fb104d9686a7b ] Fix UMaskExt that was wrongly encoded when the UMask was 0. Fixes: 2bb848f820a5 ("perf vendor events intel: Fix uncore topics for snowridgex") Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit cceafdfaabe43fe8f162841194da4066dc47e058 Author: Ian Rogers Date: Thu Sep 24 10:03:45 2026 -0700 perf vendor events intel: Fix skylakex umask encoding. [ Upstream commit f37e7dfbd34c4e48d2bea4c5e0e64c398671e87b ] Fix UMaskExt that was wrongly encoded when the UMask was 0. Fixes: 748d5cf71948 ("perf vendor events intel: Fix uncore topics for skylakex") Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 7a55e4f6c5dd367e5ce21964210aa104ddb4dd80 Author: Ian Rogers Date: Thu Sep 24 10:03:44 2026 -0700 perf vendor events intel: Fix sierraforest umask encoding. [ Upstream commit a86bd28b6e71101a1b11b7768f9bbc648b7b14d3 ] Fix UMaskExt that was wrongly encoded when the UMask was 0. Fixes: 9626368d429a ("perf vendor events intel: Update sierraforst events to v1.01") Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit ac50541150a417a448350c4fb55e65cce4399f1f Author: Ian Rogers Date: Thu Sep 24 10:03:43 2026 -0700 perf vendor events intel: Fix lunarlake umask encoding. [ Upstream commit f2844acc9dfc330b6e4b4731c18ddafe10b2f99c ] Fix UMaskExt that was wrongly encoded when the UMask was 0. Fixes: 23878069de30 ("perf vendor events: Update/add Lunarlake events/metrics") Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 2d15673cbb175d4751efd51d36bdcc47b951f0aa Author: Ian Rogers Date: Thu Sep 24 10:03:42 2026 -0700 perf vendor events intel: Fix clearwaterforest umask encoding. [ Upstream commit b26183fade24530141a2c7a22ca47e1ab0f7989e ] Fix UMaskExt that was wrongly encoded when the UMask was 0. Fixes: 1a5c515eae7c ("perf vendor events intel: Update clearwaterforest events and metrics from 1.00 to 1.02") Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 1aae5656d026cb3e97b30f3033669cd4565764de Author: Francesco Dolcini Date: Tue Sep 22 17:25:49 2026 +0200 arm64: dts: ti: k3-am62-verdin-zinnia: Fix main_gpio0/main_gpio1 line names size [ Upstream commit 9dd7a67b29e0d49c66c4785014ac3befb086fbfc ] zinnia redefines gpio-line-names for main_gpio0/main_gpio1, sized 87/88 entries instead of the SoC's actual 92/52 ti,ngpio. Resize both arrays to match, keeping every existing label at its original index. Fixes: 4abc2f22e469 ("arm64: dts: ti: k3-am62-verdin: Add Zinnia") Assisted-by: LLM Signed-off-by: Francesco Dolcini Link: https://patch.msgid.link/20260922152551.270845-3-francesco@dolcini.it Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit 37c9ef888d3b2fa913fa701aa665b7f4b254d767 Author: Francesco Dolcini Date: Tue Sep 22 17:25:48 2026 +0200 arm64: dts: ti: k3-am62-verdin-ivy: Fix main_gpio0/main_gpio1 line names size [ Upstream commit a74db73609d6e307bfcb6ef8073be2c47fb5bd9e ] ivy redefines gpio-line-names for main_gpio0/main_gpio1, sized 87/88 entries instead of the SoC's actual 92/52 ti,ngpio. Resize both arrays to match, keeping every existing label at its original index. Fixes: 881f5e9d8082 ("arm64: dts: ti: k3-am62-verdin: Add Ivy carrier board") Assisted-by: LLM Signed-off-by: Francesco Dolcini Link: https://patch.msgid.link/20260922152551.270845-2-francesco@dolcini.it Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit 250f356c8b6930e75b62f81e555c8c39c31ab2a2 Author: Ian Rogers Date: Mon Sep 28 09:36:49 2026 -0700 perf build: Clean libperf-gtk.so in 'make clean' [ Upstream commit fb0da4af899ab1d6a66d29b21189bda3c68c2ce0 ] When GTK support was made opt-in (first via GTK2=1 and recently ported to GTK4=1), $(OUTPUT)libperf-gtk.so is only added to ALL_PROGRAMS when GTK4 is defined. As a result, running 'make clean' without GTK4=1 does not remove $(OUTPUT)libperf-gtk.so. Add $(OUTPUT)libperf-gtk.so explicitly to the core-progs clean list so it is always removed by 'make clean'. Fixes: 4751bddd3f983af2 ("perf tools: Make GTK2 support opt-in") Closes: https://lore.kernel.org/linux-perf-users/CAP-5=fV6+mzN3Lf_mCAJ4aP42JFZsF55ekvt8XrX505xOWwrmA@mail.gmail.com/ Reported-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 5d3017223268e1fee41516da439b253e20bcc1f2 Author: Ian Rogers Date: Mon Sep 28 00:55:17 2026 -0700 perf test code-reading: Fix duplicate kernel maps and machine leak [ Upstream commit 58bf7b7af359d4c6f1af29fd8d2067bbcff1d8c7 ] In do_test_code_reading(), machine__new_host(&host_env) already calls machine__create_kernel_maps(machine). Calling machine__create_kernel_maps(machine) a second time immediately afterwards duplicates all kernel module maps in machine->kmaps, causing dso__load_kcore()'s module validation (do_validate_kcore_modules()) to fail and fall back to /proc/kallsyms. Furthermore, when try_kcore is true and !have_kcore, returning TEST_CODE_READING_NO_KCORE directly bypasses out_err, leaking the entire struct machine, its kernel/module maps and DSOs, all kallsyms symbols, and host_env. Remove the redundant machine__create_kernel_maps() call, check for !machine after machine__new_host(), and jump to out_err when returning TEST_CODE_READING_NO_KCORE. Fixes: 0fd4008ed755c52d ("perf test: Use machine__new_host in mmap thread code reading test") Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 91447fd7c998cb56be591b98feb53918baca1d76 Author: Benoît Monin Date: Mon Sep 28 10:55:09 2026 +0200 perf build: Improve fix for "argument list too long" error [ Upstream commit ea2058a975c549bc2cae3ae42490c3f5a846ad81 ] The orphaned pmu-events JSON files are passed to the shell via `echo "$^"`, which puts the whole list into a single argument. With a long enough output directory path and enough files, exec'ing /bin/sh fails with: make[5]: /bin/sh: Argument list too long make[5]: *** [pmu-events/Build:228: prune_orphans] Error 127 This only happens with out-of-tree builds, when setting O= to a relatively long path. To reproduce, build once with JEVENTS_ARCH=all, then rebuild with a smaller JEVENTS_ARCH without cleaning first, so the leftover files become orphans. Using nds32 (which leaves ~1100 orphans), an output path of only ~70 characters is already enough to trigger it: OUT=/any/long/path (at least 70 characters) make -C tools/perf JEVENTS_ARCH=all O=$OUT -j$(nproc) make -C tools/perf JEVENTS_ARCH=nds32 O=$OUT -j$(nproc) Express the orphan file list as paths relative to $(OUT_DIR) by stripping the common prefix and restoring it with printf, the same approach used in scripts/Makefile.clean, so the shell arguments stay short. Fixes: b6712d91f8f5a289 ("perf build: Prevent "argument list too long" error") Suggested-by: Vladimir Kondratiev Reviewed-by: James Clark Signed-off-by: Benoît Monin Tested-by: Vladimir Kondratiev Acked-by: Ian Rogers Cc: Markus Mayer Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit d7fef432aa5c55ab1d68602dc2611702aec23814 Author: bui duc phuc Date: Fri Sep 18 20:39:11 2026 +0700 ASoC: mediatek: mt8192-mt6359: Fix error handling in MTKAIF calibration [ Upstream commit d6c8a0b5bf696d89350e43bf554362de8929f801 ] mt8192_mt6359_mtkaif_calibration() ignored the return values of pm_runtime_get_sync() and mt8192_afe_gpio_request(), which could leave PM runtime references or GPIO state unbalanced on failure. Switch to pm_runtime_resume_and_get(), check each GPIO request, and unwind on error. Fixes: 18b13ff23fab ("ASoC: mediatek: mt8192: add machine driver with mt6359, rt1015 and rt5682") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-16-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0d43a9cc1a8d447a6e868f3f9c1570000dde4557 Author: bui duc phuc Date: Fri Sep 18 20:39:10 2026 +0700 ASoC: mediatek: mt8192: Propagate errors in I2S DAI DAPM event handlers [ Upstream commit 49aeb628d10ef3d5694c39b7a3427d34bde06bb2 ] Currently, DAPM event handlers in mt8192-dai-i2s.c ignore return values from mt8192_afe_gpio_request(), mt8192_apll1_enable(), mt8192_apll2_enable(), and mt8192_mck_enable(). If GPIO configuration or clock setup fails during DAPM events, the error is silently ignored. Fix this by checking and propagating error codes properly in all I2S DAI DAPM event handlers. Fixes: 2c37b4ed730b ("ASoC: mediatek: mt8192: support i2s in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-15-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b88e2da5a6e03bc62552ecb1d620d8f1bd909083 Author: bui duc phuc Date: Fri Sep 18 20:39:09 2026 +0700 ASoC: mediatek: mt8192: Propagate errors in TDM DAI DAPM event handlers [ Upstream commit d0bc9613bc2d9e20a7e4f3e447cd9427c95d194a ] Currently, DAPM event handlers in mt8192-dai-tdm.c ignore return values from mt8192_afe_gpio_request() and mt8192_mck_enable(). If GPIO configuration or master clock setup fails during DAPM events, the error is silently ignored. Fix this by checking and propagating error codes properly in all TDM DAI DAPM event handlers. Fixes: 52fcd65414ab ("ASoC: mediatek: mt8192: support tdm in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-14-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9f208a86bf9855a362b7f4466e2ae24e7dfe607d Author: bui duc phuc Date: Fri Sep 18 20:39:08 2026 +0700 ASoC: mediatek: mt8192: Propagate mt8192_afe_gpio_request() errors in ADDA DAI [ Upstream commit eed9414a1b075e2df308e7222e3786981bd42b32 ] Currently, DAPM event handlers in mt8192-dai-adda.c ignore the return value of mt8192_afe_gpio_request(). If GPIO configuration fails during PRE_PMU or POST_PMD events, the error is silently ignored. Fix this by checking and propagating error codes from mt8192_afe_gpio_request() in all ADDA DAPM event handlers. Fixes: 607ac4859564 ("ASoC: mediatek: mt8192: support adda in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-13-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6ca9de041a32414bc00d9e4a3019be05fb75e203 Author: bui duc phuc Date: Fri Sep 18 20:39:06 2026 +0700 ASoC: mediatek: mt8192: Handle regcache_sync() failure in runtime resume [ Upstream commit d9e264741b041fc9dffc555bc1ab68708658cefd ] Currently, the return value of regcache_sync() in mt8192_afe_runtime_resume() is ignored. If regcache_sync() fails, the function continues execution with clocks enabled and regcache out of sync. Fix this by checking the return value of regcache_sync(). On failure, restore regcache to cache-only mode and disable the clocks enabled earlier in the function. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-11-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d183d7d4e6296a630a15d2f46be546ca929721d6 Author: bui duc phuc Date: Fri Sep 18 20:39:05 2026 +0700 ASoC: mediatek: mt8192: check return values in mt8192_afe_gpio_init() [ Upstream commit 7cca184ad434436e8f4648f71756bab0c3593ed9 ] Currently, mt8192_afe_gpio_init() ignores the return values of mt8192_afe_gpio_select() and mt8192_afe_gpio_request(). If configuring GPIO states or requesting GPIOs fails during initialization, the function still proceeds and returns 0, masking the initialization failure. Fix this by checking and propagating the return values properly. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-10-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 62d71d400d52241d6597ca18c45d4149b9ed892c Author: bui duc phuc Date: Fri Sep 18 20:39:03 2026 +0700 ASoC: mediatek: mt8192: Propagate errors in mt8192_afe_gpio_request() [ Upstream commit 411be3902fa8f879db6f2f55d0c15507efe09c92 ] Currently, mt8192_afe_gpio_request() ignores the return values from mt8192_afe_gpio_select() and other helper functions. If configuring a GPIO state fails, the function still returns 0, hiding the failure from callers. Fix this by capturing and returning the error codes properly. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-8-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 878c672563511558363b3865e62f0a1613a7572a Author: bui duc phuc Date: Fri Sep 18 20:39:01 2026 +0700 ASoC: mediatek: mt8192: switch to devm_clk_get_optional() [ Upstream commit 6f4edfdce0099dc0c346c78c85f58a23d4ee646e ] Switch from devm_clk_get() to devm_clk_get_optional() when requesting clocks, as optional clocks automatically return NULL when not present instead of requiring manual check and NULL assignment. Additionally, handle clock errors properly using dev_err_probe() to propagate error codes (such as -EPROBE_DEFER) on failure instead of just printing a warning and continuing with NULL pointers. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-6-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5d3a5932b770051309039599f1cfe4342a4242bc Author: bui duc phuc Date: Fri Sep 18 20:39:00 2026 +0700 ASoC: mediatek: mt8192: fix MCK clock error handling [ Upstream commit 4a0ab266cb1594f8c6aef3c79726476ad99618c5 ] If an error occurs after enabling 'm_sel_id' or 'div_clk_id' in mt8192_mck_enable(), the function returns directly without disabling the previously enabled clocks, leading to a resource leak. Fix this by jumping to proper cleanup labels to unwind enabled clocks on failure paths. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6f51f6ead65eacb68cc6d1929c77bd65e698d122 Author: bui duc phuc Date: Fri Sep 18 20:38:59 2026 +0700 ASoC: mediatek: mt8192: fix error handling in APLL enable functions [ Upstream commit 88760524ca995acd229c30ec69ced7d883a90a72 ] If a clock operation fails in mt8192_apll1_enable() or apll2_enable(), the functions return without checking the return value of mux settings or unwinding previously enabled clocks and MUX configurations. Fix this by checking the return value of apll1_mux_setting() and apll2_mux_setting(), and adding proper unwind handling on failure. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 534a664e8e7eeb678a6c4e78563a923ac6904700 Author: bui duc phuc Date: Fri Sep 18 20:38:58 2026 +0700 ASoC: mediatek: mt8192: fix AFE clock error handling [ Upstream commit 7c54781e6e60681af8d0858148d613becb582328 ] If a clock operation fails in mt8192_afe_enable_clock(), the function returns immediately via the EXIT label without disabling the clocks that were successfully enabled earlier in the sequence. This leaves unneeded clocks running and causes a resource leak. Properly unwind clocks enabled before an error by jumping to appropriate cleanup labels on failure. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6416a78f1645a9efc2fc5f175d31c46799737dee Author: bui duc phuc Date: Fri Sep 18 20:38:57 2026 +0700 ASoC: mediatek: mt8192: fix APLL mux error handling [ Upstream commit e8c263e0ef957fd8286e299b2be9266b902cec16 ] Propagate errors from clock operations in the enable path and clean up previously enabled clocks when a later operation fails. For the disable path, continue disabling all clocks even if a clock operation fails. Log the error without returning it, so the disable path can perform as much cleanup as possible. Fixes: 125ab5d588b0 ("ASoC: mediatek: mt8192: add platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260918133912.133799-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d9f55024e939ab0cf919abf48f21e5822e7df3b7 Author: Ovidiu Panait Date: Mon Sep 21 19:59:43 2026 +0000 spi: rspi: Fix DMA mode when the DMA controller is built as a module [ Upstream commit 7b85114d47f693b709b2e8e22e44cdf58c04b111 ] On the Renesas RZ/G2L platform, the RSPI driver falls back to PIO mode instead of using DMA when the DMA controller driver is built as a module (CONFIG_RZ_DMAC=m): renesas_spi 1004b000.spi: dma_request_slave_channel_compat failed renesas_spi 1004b000.spi: DMA not available, using PIO The driver requests DMA channels through dma_request_slave_channel_compat() which returns either a valid pointer or NULL and cannot handle -EPROBE_DEFER. If the DMA controller has not probed yet, the driver falls back to PIO directly. Fix this by replacing the dma_request_slave_channel_compat() call with a regular dma_request_chan() call. dma_request_slave_channel_compat() is always passed a NULL fn_param in all code paths, so it actually behaves like a plain dma_request_chan() call. Fixes: e825b8dd2b36 ("spi: rspi: Add DT support to DMA setup") Signed-off-by: Ovidiu Panait Link: https://patch.msgid.link/20260921195943.107247-1-ovidiu.panait.rb@renesas.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit f88253c5b781af5c66ed4b2091ae45a133df2fa9 Author: Leo Yan Date: Mon Sep 28 11:15:51 2026 +0100 perf test: Record kcore for the CoreSight callchain test [ Upstream commit 5dd1a045e576323a10d0c7ca6dbc0f0b81ed9b5c ] The CoreSight callchain test traces both userspace and kernel execution and checks the callchain across a syscall. Add --kcore to perf record to save the running kernel image alongside the trace data so perf script can use it to decode the kernel trace. If kcore is not available, the test will be skipped. Add a Fixes tag so the change can be backported to stable kernels and improve the test reliability. Fixes: ca0e19074bd6afcb ("perf test: Add Arm CoreSight callchain test") Reviewed-by: James Clark Signed-off-by: Leo Yan Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 6c03746b9c875338fbb49cffbb4db7166d7c8038 Author: Niko Huuskonen Date: Sun Sep 27 03:35:30 2026 +0300 ALSA: caiaq: Fix the Kore controller key map [ Upstream commit c0508fc6895137f9e2dd43c1a09cc834254cc149 ] keycode_kore does not match the hardware in two places: - Softkeys 5 to 8 are listed in reverse order, so pressing the fifth softkey reports BTN_8, the sixth BTN_7 and so on. Softkeys 1 to 4 are correct. The OpenKoreBridge project, which drives a Kore 2 through this driver, works around the same reversal in userspace. - On the first Kore controller the touch sensors of the eight knobs are scrambled: touching knob 1 reports KEY_BRL_DOT6, knob 2 KEY_BRL_DOT8, knob 3 KEY_BRL_DOT2, knob 6 KEY_BRL_DOT7, knob 7 KEY_BRL_DOT1 and knob 8 KEY_BRL_DOT3. Only knobs 4 and 5 are right. Put the softkeys in order for both controllers, and give the first Kore controller its own touch sensor order, so that BTN_n and KEY_BRL_DOTn belong to the n-th knob. The touch sensor order of the Kore 2 is left alone, as it could not be checked. Userspace that compensates for the old order needs to follow. It can read the key map with EVIOCGKEYCODE, which also makes it possible to support kernels with and without this change. Tested on a Kore controller (USB ID 17cc:4711). Link: https://github.com/OpenKoreBridge/OpenKoreBridge Fixes: 8e3cd08ed8e5 ("[ALSA] caiaq - add control API and more input features") Assisted-by: LLM Signed-off-by: Niko Huuskonen Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260927003532.289468-3-niko.huuskonen.00@gmail.com Signed-off-by: Sasha Levin commit 31048b09081a805c2ccec17e79b82668b59f9967 Author: Niko Huuskonen Date: Sun Sep 27 03:35:29 2026 +0300 ALSA: caiaq: Serialize access to the EP1 command buffer [ Upstream commit a718fd03e1e00211cf4662f5ab82d33f4c18e2a7 ] snd_usb_caiaq_send_command() and snd_usb_caiaq_send_command_bank() copy the command into cdev->ep1_out_buf and send it with a synchronous bulk transfer. Nothing serializes their callers. An ALSA control write, which sets the LEDs on the Kore controllers and several other devices, can run at the same time as a PCM prepare, which sends the audio parameters through the same buffer. One caller can then overwrite the buffer while the transfer of the other is still in flight, and the device receives a mix of both commands. Protect the buffer with a mutex. All callers run in process context and already sleep in usb_bulk_msg(). The problem was found by code review while adding another user of the buffer, the Kore LCD support later in this series. It has not been observed or reproduced. Fixes: 8e3cd08ed8e5 ("[ALSA] caiaq - add control API and more input features") Assisted-by: LLM Signed-off-by: Niko Huuskonen Signed-off-by: Takashi Iwai Link: https://patch.msgid.link/20260927003532.289468-2-niko.huuskonen.00@gmail.com Signed-off-by: Sasha Levin commit 1b8f041f439170a2153a8aa6904c96f1d302f846 Author: Arka Mondal Date: Fri Sep 18 21:20:30 2026 +0900 iio: dac: ad5758: Fix the offset calculation [ Upstream commit a3b3580713f3ac5a32dc2874ee546828977a1d68 ] The offset is a count of DAC codes, so the microamp or microvolt units of min and max cancel out and the final division by 1000 is wrong. For the +-20 mA range the driver reports -32 instead of -32768. For the +-5 V and +-10 V ranges min * (1 << 16) also overflows int, and the reported offset is 0. Drop the division and do the multiplication in 64 bits. Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support") Signed-off-by: Arka Mondal Reviewed-by: Nuno Sá Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit 27d3eb9088a38a3fd6e18a1ef098a6a66497a731 Author: Arka Mondal Date: Fri Sep 18 21:20:29 2026 +0900 iio: dac: ad5758: Reject out-of-range raw values [ Upstream commit ebc026be1b719e47bd7f2f1e72fabc875b590f87 ] ad5758_write_raw() passes the value from userspace straight to ad5758_spi_reg_write(), which keeps only the low 16 bits. Writing -1 to the raw attribute gives full-scale output, and 65536 gives code 0. Return -EINVAL for values outside 0 to U16_MAX, as ad5755 does. Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support") Signed-off-by: Arka Mondal Reviewed-by: Nuno Sá Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit 1d30d8bff7d400de0ab59b01e8d4757f53cf0541 Author: Arka Mondal Date: Fri Sep 18 21:20:28 2026 +0900 iio: dac: ad5758: Fix alignment for DMA safety [ Upstream commit 465bdce79a9fe140a4b46b95f6bdfd880d197148 ] ad5758_spi_reg_read() reads into st->d32[2] with spi_sync_transfer(), but d32 is not marked __aligned(IIO_DMA_MINALIGN), so it can share a cacheline with the fields before it. When DMA is not cache coherent, the cache invalidation after the read can discard CPU writes to those fields. Mark d32 __aligned(IIO_DMA_MINALIGN). It is the last member of the struct, so nothing comes after it. Fixes: 28d1a7ac2a0d ("iio: dac: Add AD5758 support") Signed-off-by: Arka Mondal Reviewed-by: Nuno Sá Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit bfe7500ddc2d2cdcdb9dbf39e79c58169d8024c1 Author: Abdelnasser Hussein Date: Wed Sep 23 14:07:45 2026 +0300 staging: iio: adc: ad7816: Protect sysfs attributes with mutex [ Upstream commit b96187644664d10b641dddeb7ca2eeef97a77c41 ] The sysfs store functions modify driver state that is critical during SPI transactions. ad7816_store_mode toggles hardware GPIO pins, while ad7816_store_channel updates the internal software state (chip->channel_id). If these are modified concurrently by userspace while an SPI transfer is in progress, it could corrupt the hardware transaction or cause the driver to communicate with the wrong channel. Add the existing chip->lock guard to these functions to serialize access and prevent these race conditions. Fixes: 7924425db04a ("staging: iio: adc: new driver for AD7816 devices") Suggested-by: Joshua Crofts Reviewed-by: Joshua Crofts Signed-off-by: Abdelnasser Hussein Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit 85002b359c6ac34deefd05ef2835125cbfe00860 Author: Abdelnasser Hussein Date: Tue Sep 15 10:59:38 2026 +0300 staging: iio: adc: ad7816: Serialize SPI operations [ Upstream commit 8f99c766605a484663764b52da56a0b160f9d9c3 ] The ad7816_spi_read() and ad7816_spi_write() functions perform a sequence of GPIO state changes followed by an SPI transfer. If multiple operations occur simultaneously, the GPIO state could be changed by one thread while another is in the middle of a transfer, leading to a race condition. Introduce a mutex to serialize the operations, ensuring that the GPIO toggling and the SPI transfer are treated as a single atomic operation. The mutex is placed right after the pointers in the device state structure to avoid padding holes. Signed-off-by: Abdelnasser Hussein Reviewed-by: Maxwell Doose Reviewed-by: Joshua Crofts Signed-off-by: Jonathan Cameron Stable-dep-of: b96187644664 ("staging: iio: adc: ad7816: Protect sysfs attributes with mutex") Signed-off-by: Sasha Levin commit 24071f2f8e087c8d65130351f7a5ab1e95503ef2 Author: Abdelnasser Hussein Date: Tue Sep 15 10:59:37 2026 +0300 staging: iio: adc: ad7816: Sort headers alphabetically [ Upstream commit 8c7b99ff159d64679c9b3b4d5878e44459f7272a ] Sort the include directives alphabetically to improve readability and maintainability. This is a precursor cleanup patch to prepare for the addition of new headers in subsequent changes. Signed-off-by: Abdelnasser Hussein Reviewed-by: Joshua Crofts Signed-off-by: Jonathan Cameron Stable-dep-of: b96187644664 ("staging: iio: adc: ad7816: Protect sysfs attributes with mutex") Signed-off-by: Sasha Levin commit a364ac348b2112ad699765b1335c3d3c2b1242a1 Author: Ariana Lazar Date: Thu Sep 24 15:59:20 2026 +0300 iio: dac: mcp47feb02: protect EEPROM store sequence with mutex [ Upstream commit 55b0514c2863d01e9b168d8a6ad0040d628fb534 ] Move the mutex lock into store_eeprom_store() to prevent race conditions when reading volatile registers and writing them to the EEPROM. Fixes: bf394cc80369 ("iio: dac: adding support for Microchip MCP47FEB02") Closes: https://lore.kernel.org/all/20260819125128.970911F000E9@smtp.kernel.org/ Reported-by: Sashiko Signed-off-by: Ariana Lazar Reviewed-by: Joshua Crofts Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit a835d1d03bf10bc64232c6bca30077cb98557422 Author: Lad Prabhakar Date: Mon Sep 21 12:01:42 2026 +0100 dt-bindings: iio: adc: renesas,r9a09g077-adc: Drop unwired interrupts [ Upstream commit 1182148719cffb5ea7a4610dac34deac9a70cf89 ] Remove the compare match and compare mismatch interrupts from the binding, as these interrupts are not wired to the GIC on RZ/T2H and RZ/N2H SoCs according to the hardware manual Rev. 1.30. While this change introduces an ABI break, the expected impact on existing users is minimal, if any, since the interrupts are not wired to the GIC and are not used by the driver. Fixes: 4d8d58987cb5 ("dt-bindings: iio: adc: document RZ/T2H and RZ/N2H ADC") Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit 30b2dd20a4d8986a712cd1fc84111cacae5a18eb Author: Yilin Chen <1479826151@qq.com> Date: Mon Sep 14 14:09:00 2026 +0000 rust: configfs: require thread-safe callback data [ Upstream commit ec27f3b700010d2ebae1cde2df0246197689d159 ] The Rust configfs abstractions do not fully constrain callback data for cross-thread use. Add the missing `Send` and `Sync` requirements. Specifically, make the following changes: 1. Require `Data: Send` when implementing `Send` for `Subsystem`, since the subsystem stores its data by value. 2. Make `GroupOperations` a `Sync` supertrait because `make_group` and `drop_item` receive `&self` from foreign threads. Require `Child: Send` because configfs may release child groups on an arbitrary thread. 3. Require `AttributeOperations::Data: Sync` because its callbacks receive `&Data` from foreign threads. 4. Update the safety comments in FFI callbacks that call `get_group_data` to cite these bounds as justification for sharing the returned references with the callback thread. 5. Remove redundant `Child: 'static` bounds from `GroupOperationsVTable` and `new_with_child_ctor`. Fixes: 446cafc295bf ("rust: configfs: introduce rust support for configfs") Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Should.20add.20Data.3A.20Send.2FSync.20bounds.20in.20configfs.3A.3ASubsystem.3F/with/623719979 Assisted-by: Gpt-5.6 Sol Signed-off-by: Yilin Chen <1479826151@qq.com> Link: https://msgid.link/tencent_5449081195EDDF5726C709CF648DD4044A08@qq.com [ Andreas: Add Send/Sync bounds for `Group`, add `Send` bounds to `GroupOperationsVTable`, `ItemOperationsVTable` and `ItemType` macro implementation. ] Signed-off-by: Andreas Hindborg Signed-off-by: Sasha Levin commit 6e578af41e392ea8857302a643d3b68f1e122a74 Author: Andreas Hindborg Date: Wed Sep 30 21:43:55 2026 +0200 rust: block: implement `Send` and `Sync` for `TagSet` [ Upstream commit 06dad60393f20985cc5f24eeed63f965d366c4a0 ] `TagSet` never implemented `Send` or `Sync`. This did not matter until commit "rust: block: fix `Send` bound for `GenDisk`" made `GenDisk: Send` depend on `Arc>: Send`, which in turn requires `TagSet: Send + Sync`. With that bound unsatisfiable, `GenDisk` is never `Send`, and the rnull driver fails to build once configfs requires `GroupOperations::Child: Send`. `TagSet` owns no data typed by `T`. It only wraps the C `struct blk_mq_tag_set`, which can be dropped from any thread by calling `blk_mq_free_tag_set`. Thus, implement `Send` and `Sync` for `TagSet` unconditionally. Reported-by: Thorsten Leemhuis Closes: https://lore.kernel.org/r/d1381ed8-eab8-4fd7-8b15-1e94876d7099@leemhuis.info Suggested-by: Gary Guo Signed-off-by: Andreas Hindborg Tested-by: Thorsten Leemhuis Reviewed-by: Alice Ryhl Link: https://patch.msgid.link/20260930-tag-set-send-sync-v1-1-51acdb36f4bb@kernel.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 497d476a8fce42c08ac7396127915ddaf7841da9 Author: Fuad Tabba Date: Mon Sep 7 12:29:43 2026 +0100 of/irq: Fix device node refcount leak in of_check_msi_parent() [ Upstream commit cbe0f79dcab1c121d767927b53a61eadf2c5b518 ] of_msi_xlate() documents @msi_np as a filter when it points at a node on entry, handing back a reference only when it points at NULL. The msi-map branch does that. of_check_msi_parent() keeps the reference from the 1:1 msi-parent match either way. pci_msi_domain_get_msi_rid() is the only caller that passes a node in, from irq_domain_get_of_node(), and it puts nothing, so a 1:1 match there leaks the MSI controller node. Fixes: 119aaeed0b67 ("of/irq: Add msi-parent check to of_msi_xlate()") Reported-by: Sashiko Closes: https://lore.kernel.org/all/20260826113604.010C01F000E9@smtp.kernel.org/ Signed-off-by: Fuad Tabba Link: https://lore.kernel.org/all/20260826113604.010C01F000E9@smtp.kernel.org/ Link: https://patch.msgid.link/20260907112944.313618-2-fuad.tabba@linux.dev Signed-off-by: Rob Herring (Arm) Signed-off-by: Sasha Levin commit 5be52e417592dc6aaba147496fe1086e9944eb17 Author: Chen-Yu Tsai Date: Wed Apr 8 14:50:54 2026 +0800 drm/exynos/fimd: fix register offset type in fimd_trigger() [ Upstream commit f901c9b986b6355716822d5c6ad34ae5edd71085 ] Sparse reports: exynos_drm_fimd.c:992:39: warning: incorrect type in initializer (different address spaces) exynos_drm_fimd.c:992:39: expected void *timing_base exynos_drm_fimd.c:992:39: got void [noderef] __iomem * exynos_drm_fimd.c:1005:33: warning: incorrect type in argument 1 (different address spaces) exynos_drm_fimd.c:1005:33: expected void const volatile [noderef] __iomem *addr exynos_drm_fimd.c:1005:33: got void * exynos_drm_fimd.c:1007:33: warning: incorrect type in argument 2 (different address spaces) exynos_drm_fimd.c:1007:33: expected void volatile [noderef] __iomem *addr exynos_drm_fimd.c:1007:33: got void * Add "__iomem" to *timing_base to fix its type. Fixes: 3854fab24e89 ("drm/exynos: fimd: support LCD I80 interface") Signed-off-by: Chen-Yu Tsai Acked-by: Marek Szyprowski Signed-off-by: Inki Dae Signed-off-by: Sasha Levin commit 1f191f7dfbce02b32d615710bbc67b0cbcd4220c Author: Runyu Xiao Date: Sun Sep 27 22:14:47 2026 +0800 ALSA: via82xx: use helper to activate DXS controls [ Upstream commit aee7c43126e3184d7eefde6545b3b88628e5591a ] The VIA DXS playback callbacks modify control access flags directly when a stream opens or closes. This bypasses the control core locking and notification path. Use snd_ctl_activate_id() for both transitions so access changes are serialized by the control core and reported with the expected info event. Fixes: 3d00941371a7 ("sound: via82xx: deactivate DXS controls of inactive streams") Assisted-by: LLM Signed-off-by: Runyu Xiao Link: https://patch.msgid.link/20260927141447.788664-1-runyu.xiao@seu.edu.cn Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit c718a0e8d4235eab92c05194b6580865e1df2580 Author: Runyu Xiao Date: Sun Sep 27 20:17:09 2026 +0800 ALSA: oxygen: use helper to activate the SPDIF PCM control [ Upstream commit 5bdc232c3094304a7e17df5ddb66dcdacbead6bf ] oxygen_open() and oxygen_close() modify the SPDIF PCM control access flags while holding chip->mutex. Direct access changes bypass the control core locking and notification path. Move the access transition outside the driver mutex and use snd_ctl_activate_id(), which serializes the control update with the control core. Fixes: d0ce9946c52e ("[ALSA] add CMI8788 driver") Assisted-by: LLM Signed-off-by: Runyu Xiao Link: https://patch.msgid.link/20260927121709.742840-1-runyu.xiao@seu.edu.cn Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit cba4fbc02480f6ab797b45119bb1a05012bbe80e Author: Yibo Tan Date: Wed Sep 23 02:50:57 2026 +0800 ASoC: amd: acp3x-es83xx: Keep an owned codec device reference [ Upstream commit 095025078dc3a1b4f0fcdc8b8d9dcb4d192a2a14 ] acpi_get_first_physical_node() returns a borrowed device pointer. The private data allocation failure path in acp3x_es83xx_probe() puts that pointer despite not owning a reference. The successful path also saves the borrowed pointer for later card operations. This was reproduced on current mainline with failslab restricted to the real static callback. The rejected devm_kzalloc() returned -ENOMEM, and normal codec platform-device unregister then produced a KASAN slab-use-after-free in device_del(), with allocation in acpi_create_platform_device() and release in acpi_unbind_one(). Use acpi_bus_get_primary_device() to acquire the reference while the physical-node lock is held. After allocating private data, register a devres put action before publishing the pointer. This balances action allocation and later probe failures, keeps the saved pointer alive during card use, and drops the reference after ASoC card unregister during successful teardown. The existing OOM put now correctly balances the owned lookup. The same filtered KASAN guest with this change reached the same -ENOMEM and unregister path without KASAN, WARNING, Oops or panic. The test directly invoked the production callback and did not emulate a complete ACP/ASoC card or physical Huawei hardware. Fixes: 54fcd9dd44b2 ("ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec") Signed-off-by: Yibo Tan Link: https://patch.msgid.link/20260922185057.954150-3-lhfff@tju.edu.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit ad073b81fd12ff0c64206f693db0f62f7fcaec35 Author: Yibo Tan Date: Wed Sep 23 02:50:56 2026 +0800 ASoC: amd: acp-es8336: Use an owned codec device reference [ Upstream commit c257e3bcb36f4597d6dbb6fbc546e466ef53e385 ] acpi_get_first_physical_node() returns a borrowed device pointer. If the pa-enable GPIO lookup fails, st_es8336_late_probe() puts that pointer despite not owning a reference. A later physical-node teardown can then release the device while device_del() is still using it. This was reproduced on current mainline with the real static late-probe callback and normal platform-device unregister. The GPIO lookup returned -EPROBE_DEFER and KASAN reported a slab-use-after-free in device_del(), with the object freed by acpi_unbind_one(). Use acpi_bus_get_primary_device(), which obtains a stable device reference under the physical-node lock, and release it at callback exit with scoped cleanup. Keep the reference callback-local because late probe can be retried; registering one devres action per attempt would accumulate references. The same KASAN guest with this change reached the same -EPROBE_DEFER and unregister path without KASAN, WARNING, Oops or panic. The test directly invoked the production callback and did not emulate a complete ASoC card or physical AMD hardware. Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Yibo Tan Link: https://patch.msgid.link/20260922185057.954150-2-lhfff@tju.edu.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 674005307775811354545959b2d614b9095deb59 Author: Yishai Hadas Date: Tue Sep 15 17:09:32 2026 +0300 RDMA/mlx5: Initialize QP/RQ/SQ resource refcount before publishing it [ Upstream commit 829a0e65deff3f826a7870a52404aeaf1a3fec3f ] create_resource_common() inserted the resource into the radix tree before its initialization was complete. A firmware EQE in that window finds a zero refcount_t and calls refcount_inc() on it; the refcount API treats this as a use-after-free, saturates the counter, and permanently breaks the resource's lifecycle tracking. Move the initialization before the radix_tree_insert(). Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-15-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 2570ac441eda1a76aaf7aa4dd56bbe297e527ec8 Author: Yishai Hadas Date: Tue Sep 15 17:09:31 2026 +0300 RDMA/mlx5: Set QP event handler before firmware QPC insertion [ Upstream commit 05a078c97eb0bb7158526dae414b853737692485 ] Four QP creation paths assigned base->container_mibqp and base->mqp.event after the firmware create call that inserts the QP into dev->qp_table.tree. A firmware error EQE in that window reaches qp->event() with a NULL pointer. Move both assignments before the firmware call. Also set ibqp.qp_num inside mlx5_qpc_create_qp() before create_resource_common() so an EQE arriving early does not observe qp_num==0. In addition, add a WARN_ON_ONCE(!qp->event) guard in rsc_event_notifier() as a safeguard for future regressions. Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-14-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d0b50c8987c558e855c08dc6eff4e30b493ac1cb Author: Yishai Hadas Date: Tue Sep 15 17:09:30 2026 +0300 RDMA/mlx5: Set RQ event handler for raw-packet QP [ Upstream commit a4fa6497002c80b55ebe597242a1bba2ff268886 ] create_raw_packet_qp() creates a separate firmware RQ object but never assigned rq->base.mqp.event. Any firmware event on this resource (e.g. WQ_CATAS_ERROR, WQ_ACCESS_ERROR) calls through a NULL pointer. Set the event pointer before the RQ is inserted into the resource table. Fixes: 0fb2ed66a14c ("IB/mlx5: Add create and destroy functionality for Raw Packet QP") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-13-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit f82a20355f2ce149566d0599d7c40b3b37c35550 Author: Yishai Hadas Date: Tue Sep 15 17:09:29 2026 +0300 RDMA/mlx5: Set SRQ event handler before xarray insertion [ Upstream commit d2aa15620e98dc4c6516944397ebea03b7a62b90 ] mlx5_cmd_create_srq() stores the SRQ into the xarray before srq->msrq.event was assigned. A firmware SRQ event arriving in that window calls through a NULL pointer. Move the assignment before mlx5_cmd_create_srq(). Fixes: e126ba97dba9 ("mlx5: Add driver for Mellanox Connect-IB adapters") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-12-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 6d92321cc794f388080d63862448454387be6c07 Author: Yishai Hadas Date: Tue Sep 15 17:09:28 2026 +0300 RDMA/mlx5: Set WQ event handler before firmware RQ insertion [ Upstream commit 28c559d1e25de46bb6dd39e6fa1e93ea6abdf1f6 ] create_rq() inserts the RQ into dev->qp_table.tree, making it visible to rsc_event_notifier() before rwq->core_qp.event was assigned. A firmware WQ_CATAS_ERROR event in that window finds a NULL event pointer. Move the assignment before create_rq(). Fixes: 350d0e4c7e4b ("IB/mlx5: Track asynchronous events on a receive work queue") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-11-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit df44799094d70f468d7375120f3396a1031854e9 Author: Yishai Hadas Date: Tue Sep 15 17:09:26 2026 +0300 RDMA/mlx5: Fix mlx5_ib_dev_res_init() failure when XRC cap is absent [ Upstream commit 4354ab7a85d1ddd45a8a3337227fad5b37b44902 ] mlx5_ib_dev_res_init() returns -EOPNOTSUPP when the firmware XRC capability is absent, failing driver probe on XRC-less devices. Make XRC optional throughout the devr resource path: initialize cq_lock and srq_lock unconditionally (needed for every QP creation), skip xrcd allocation and the XRC-type placeholder SRQ (s0) when xrc=0, and guard their cleanup paths accordingly. Fixes: f4375443b786 ("RDMA/mlx5: Get XRCD number directly for the internal use") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-9-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 8b0abb85ef0662323f4f35ad859120658a6538f5 Author: Yishai Hadas Date: Tue Sep 15 17:09:21 2026 +0300 RDMA/vmw_pvrdma: Pin QP and SRQ rings writable to match device DMA write access [ Upstream commit 89abac4b60b708037595255ea2614b6967c86ee5 ] pvrdma embeds a pvrdma_ring_state header directly inside the QP and SRQ ring buffers, and the hypervisor writes cons_head into that header. Pinning with access=0 does not force a private page copy (no FOLL_WRITE), so the hypervisor may write into a shared page. Pass IB_ACCESS_LOCAL_WRITE for all three rings. The SRQ ring_state is not currently used by the driver but is pinned writable for consistency. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-4-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 5afa562683a0fec2b427941cbe39e0a14ea79ada Author: Yishai Hadas Date: Tue Sep 15 17:09:20 2026 +0300 RDMA/hns: Pin CQ buffer writable to match device DMA write access [ Upstream commit ce29f6e741844a78ad1977f2a550ede27ecf95f8 ] alloc_cq_buf() leaves user_access zero-initialized, but the device writes CQEs into the CQ buffer. Set IB_ACCESS_LOCAL_WRITE so the buffer is pinned writable, matching the device's write access. Fixes: 744b7bdfa79e ("RDMA/hns: Support 0 hop addressing for CQE buffer") Signed-off-by: Yishai Hadas Link: https://patch.msgid.link/20260915140933.40580-3-yishaih@nvidia.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 852f70bae0da0b95a53abcf1e9ef4e5c87d56306 Author: Serhat Kumral Date: Fri Sep 18 14:04:28 2026 +0300 RDMA/irdma: Free IRQ when CEQ vector mapping fails [ Upstream commit 952f18e04fa9790e347e09263c25318afe723d86 ] irdma_cfg_ceq_vector() registers an IRQ handler before requesting the CEQ-to-vector mapping through the virtual channel. If the mapping fails, the function returns without releasing the IRQ resources. The caller destroys the CEQ, leaving the IRQ handler registered and potentially referencing freed memory. Call irdma_destroy_irq() on mapping failure to release the IRQ resources and drain the associated tasklet before the caller destroys the CEQ. Use the same dev_id passed to request_irq(), accounting for CEQ0 sharing its interrupt vector with the AEQ. Fixes: b800e82feba7 ("RDMA/irdma: Add GEN3 support for AEQ and CEQ") Assisted-by: Claude:claude-opus-5 Signed-off-by: Serhat Kumral Link: https://patch.msgid.link/20260918110428.36586-1-serhatkumral1@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 97d85f1e43648cc8a259bd4babf58ca903a7c2cf Author: Ginger Li Date: Tue Sep 22 13:42:53 2026 +0800 wifi: mac80211: Fix a race when expiring a mesh path [ Upstream commit 6571b6a24cc37c650a1815b1c320e30db5de466f ] My static analyzer identified a potential issue in 'net/mac80211/mesh_pathtbl.c': mpath_expired() reads mpath->flags and mpath->exp_time without holding mpath->state_lock, while mesh_path_fix_nexthop() and the other writers update both fields under that lock. In mpath_lookup() and __mesh_path_lookup_by_idx() the unlocked check is followed by taking the lock and clearing MESH_PATH_ACTIVE, so the check and the update are not atomic: CPU0 (mpath_lookup) CPU1 (mesh_path_fix_nexthop) mpath_expired() reads the stale flags/exp_time and returns true spin_lock_bh(&mpath->state_lock) mpath->exp_time = 0; mpath->flags = FIXED|SN_VALID; mesh_path_activate(mpath); spin_unlock_bh(&mpath->state_lock) spin_lock_bh(&mpath->state_lock) mpath->flags &= ~MESH_PATH_ACTIVE; spin_unlock_bh(&mpath->state_lock) A path which mesh_path_fix_nexthop() has just set up as MESH_PATH_FIXED and MESH_PATH_ACTIVE then has MESH_PATH_ACTIVE cleared again, and forwarding to that destination silently stops. Take mpath->state_lock before evaluating mpath_expired() so that the check and the clearing of MESH_PATH_ACTIVE are atomic with respect to the writers. Fixes: 60854fd94573 ("mac80211: mesh: convert path table to rhashtable") Signed-off-by: Ginger Li Link: https://patch.msgid.link/20260922054253.11976-1-ginger.jzllee@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit ccfd63bfce1e59e30d555f5e3fb4cd7a715cb66a Author: Andrei Otcheretianski Date: Mon Sep 21 22:00:23 2026 +0300 wifi: mac80211: implement NAN non-evacuable channels [ Upstream commit e9e25a957842ba2667b75df40f5a73bfda934d7b ] Implement the nan_set_non_evac_channels operation in mac80211. It marks the provided channels as non-evacuable in the current local schedule and clears the flag on all other channels. All provided channels must exist in the current schedule, otherwise -ENOENT is returned. ieee80211_nan_find_evac_chan() skips channels marked as non-evacuable when selecting a channel to evacuate for concurrent operations. Fixes: 42c9de58d990 ("wifi: mac80211: add NAN channel evacuation support") Signed-off-by: Andrei Otcheretianski Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20260921215936.ef5884349253.I38b685378c3557679ed6387922a94a7da821555c@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit ffc44913f1a777149d887a645f11e38cfdee64c0 Author: Andrei Otcheretianski Date: Mon Sep 21 22:00:22 2026 +0300 wifi: cfg80211: add NL80211_CMD_NAN_SET_NON_EVAC_CHANNELS [ Upstream commit 025ef5f4f63b5ecf38bb8f4eb80941c0d55c943f ] Add a new NL80211_CMD_NAN_SET_NON_EVAC_CHANNELS command that lets user space mark a set of NAN channels as non-evacuable. The command carries the channels as nested NL80211_ATTR_NAN_CHANNEL attributes (chandef only) and replaces the entire set of non-evacuable channels; channels not included in the list become evacuable again. All provided channels must already exist in the current local schedule, otherwise -ENOENT is returned. The command is rejected with -EBUSY while a schedule update is pending. This prevents the kernel from evacuating channels that carry NDC or immutable schedules, so evacuating these channels would break existing NDP connections. Fixes: 154b0296c0ec ("wifi: nl80211: Add a notification to notify NAN channel evacuation") Signed-off-by: Andrei Otcheretianski Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit Link: https://patch.msgid.link/20260921215936.2efc32011e73.Ice8839058e114f6f9783079807df446388187dda@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 80b58583901c26f655b87c1eb4c6c03c75cd07bd Author: Mateusz Nowicki Date: Mon Sep 7 09:14:11 2026 +0000 arm64: dts: st: fix arm,smc-id of the SMC watchdog on stm32mp2 [ Upstream commit ae4d08bbe3f4f5ec920dbdba26091adf0ae6ba71 ] OP-TEE implements the STM32MP2 watchdog SMC service with function ID 0xbc000000 (CFG_WDT_SM_HANDLER_ID), not 0xb200005a. With the current value the arm_smc_wdt probe fails with -EIO and the IWDG started by the bootloader is never refreshed. Fixes: 89fca38168c9 ("arm64: dts: st: add arm-wdt node for watchdog support on stm32mp251") Fixes: e9b03ef21386 ("arm64: dts: st: introduce stm32mp23 SoCs family") Signed-off-by: Mateusz Nowicki Reviewed-by: Antonio Borneo Link: https://lore.kernel.org/r/20260907091400.55954-1-mateusz.nowicki@posteo.net Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit b7fafd14c6f5ec0691efe706e12fc8c6d17abdce Author: Guanghui Feng Date: Mon Sep 28 11:27:22 2026 +0800 iommu/vt-d: Fix IQE handling to cover all descriptors in submission range [ Upstream commit 754d07b940c4ce025fab022b548fb5c3d11bf766 ] When an Invalidation Queue Error (IQE) occurs, hardware halts fetching and IQH points at the faulting descriptor. The previous code only checked whether IQH matched the first descriptor index of the current submission, missing faults on any other descriptor within the batch. Expand the check to cover the entire submission range [index, wait_index], accounting for circular wrap-around. Furthermore, after detecting IQE, the old recovery only replaced the single faulting slot with a copy of the wait descriptor and immediately returned -EINVAL. This left two problems: a) Hardware resumed fetching and could hit another invalid descriptor in the same abandoned batch, raising a second IQE that no submitter would claim — permanently deadlocking the queue. b) The caller reclaimed all batch slots (QI_FREE) while hardware might still be asynchronously processing descriptors from that batch, allowing concurrent overwrite and descriptor corruption. Fix both by introducing qi_drain_remaining_descs(): upon IQE detection, overwrite the stranded slots in [IQH, wait_index) with fenced no-op wait descriptors, resubmit the wait descriptor at wait_index, clear IQE, and spin until hardware signals QI_DONE (with DMAR_OPERATION_TIMEOUT). This guarantees hardware has fully drained the batch before the caller reclaims slots. Fixes: 8a1d82462540 ("iommu/vt-d: Multiple descriptors per qi_submit_sync()") Signed-off-by: Guanghui Feng Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin commit 23a6748ee12e6be38f0e20b491f90e12a1bf37fb Author: Lu Baolu Date: Mon Sep 28 11:27:21 2026 +0800 iommu/vt-d: Drop old iopf ref only after attach succeeds [ Upstream commit 5fbb0fa7327667ade8fa61921425bd4f8803e272 ] identity_domain_attach_dev() currently removes the old domain’s iopf reference before programming pass-through. If pass-through setup fails, attach fails but the old domain is still effectively attached — now with its IOPF ref already dropped. This can undercount info->iopf_refcount and may disable iopf queue handling while the old domain can still issue page requests. Fix it by removing the old domain’s iopf reference only after pass-through setup succeeds, matching other attach paths. Fixes: 236dd58fabd2 ("iommu/vt-d: Fix iopf_refcount leak on RID domain replacement") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin commit 689d18e8e251007c16dfd7aec28167a4998d5edd Author: Lu Baolu Date: Mon Sep 28 11:27:20 2026 +0800 iommu/vt-d: Fix iopf refcount leak in nested attach [ Upstream commit 83871c3ae10e3dce95408175df94ecfa0280e15f ] intel_nested_attach_dev() takes an iopf reference for the new domain but does not drop the possible reference from the old domain. This leaks info->iopf_refcount, can keep the device permanently on the iopf queue, and later triggers WARN_ON(info->iopf_refcount) when PRI is disabled. Fix this by dropping the possible reference from the old domain after the nested translation setup completes. Fixes: 17fce9d2336d9 ("iommu/vt-d: Put iopf enablement in domain attach path") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin commit d9ea309f76d4a81033ca06cd7416b29a68d32802 Author: Lu Baolu Date: Mon Sep 28 11:27:18 2026 +0800 iommu/vt-d: Reserve scalable-mode DIDs from PASID entries during copy [ Upstream commit 07a64cbe15c4b0bf1d55208f3e945ba8a53075a0 ] copy_context_table() reserves old domain IDs (DIDs) from context entries. That works for legacy mode, but not for scalable mode: scalable context entries do not carry DID, so this path ends up reserving the wrong value (often DID 0) repeatedly. In scalable mode, real DIDs are stored in PASID table entries. If they are not reserved during kdump table copy, new domains may reuse old DIDs while stale PASID/IOTLB cache state still exists, causing translation conflicts and DMA faults. Fix this by walking PASID tables in scalable mode, and reserving DIDs from present PASID entries. If PASID structures cannot be remapped, return error so caller can fall back safely instead of continuing with an unsafe DID space. Fixes: 0c5f6c0d8201 ("iommu/vt-d: Fix kdump kernels boot failure with scalable mode") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin commit 84a99c4bf8cda02227af620a47ab415d795c2de2 Author: Lu Baolu Date: Mon Sep 28 11:27:17 2026 +0800 iommu/vt-d: Handle DID reservation errors when copying context tables [ Upstream commit 12a2ea2d91bea9b1f8f0a6608433210d0abd1291 ] When kdump reuses old translation tables, all old domain IDs (DIDs) must be reserved in the new kernel before new domains are created. Today copy_context_table() ignores ida_alloc_range() return values, so a real -ENOMEM can be missed and an ID may stay unreserved. That can allow DID reuse while stale hardware cache entries still exist, risking domain aliasing. Fix this by moving DID reservation into a helper that: - treats duplicate reservations (-ENOSPC) as expected success, - skips out-of-range IDs as success, - propagates real allocation failures (like -ENOMEM), and - normalize successful return values. On failure, unwind as in existing copy-allocation failure paths. Fixes: f93b4ac5929a ("iommu/vt-d: Use ida to manage domain id") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin commit c4ea4386c808c2c6e0c17e265d7b841c4480e666 Author: Lu Baolu Date: Mon Sep 28 11:27:16 2026 +0800 iommu/vt-d: Do not ignore context table copy failures [ Upstream commit 53e15f28829ff304f94883e8f3f1f5074aa2a0a2 ] copy_translation_tables() currently logs copy_context_table() failures but still returns success, so partial copy failures are silently ignored. That means Intel IOMMU may run with only part of the old tables copied. Then some old domain IDs may not be reserved, and later may be reused by new domains. With stale hardware cache entries still around, this can cause bad DMA translations, DMA faults, or domain aliasing. Fix by aborting on the first context-table copy failure, freeing temporary context-table pages, and returning an error so caller falls back to a clean root table path. Fixes: f93b4ac5929a ("iommu/vt-d: Use ida to manage domain id") Signed-off-by: Lu Baolu Reviewed-by: Kevin Tian Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin commit 3ec31b7d4836f8dcea62511a1ddcf655d9f8ac26 Author: Zhenzhong Duan Date: Mon Sep 28 11:27:14 2026 +0800 iommu/vt-d: Fix page table level calculation in compute_vasz_lg2_ss() [ Upstream commit d00ac5f7b52bb1f3a2b605f0e773b0397c8e325a ] compute_vasz_lg2_ss() finds the optimal Second-Stage page table level by intersecting the maximum guest address width (mgaw) with the hardware's SAGAW capability register. The VT-d spec maps the SAGAW bit field positions as: - Bit 1: 39-bit AGAW (3-level page table, top_level = 2) - Bit 2: 48-bit AGAW (4-level page table, top_level = 3) - Bit 3: 57-bit AGAW (5-level page table, top_level = 4) The fallback paths use bit shifts that are one position too large, causing ffs() to select a deeper page table level than the mgaw window requires: - mgaw > 39: "3 + ffs(sagaw >> 3)" evaluates to top_level = 4 (5-level) instead of top_level = 3 (4-level) when hardware supports both 48-bit (Bit 2) and 57-bit (Bit 3) AGAW. - mgaw > 30: "2 + ffs(sagaw >> 2)" evaluates to top_level = 3 (4-level) instead of top_level = 2 (3-level) when hardware supports both 39-bit (Bit 1) and 48-bit (Bit 2) AGAW. In both cases the selected level is still one that the hardware advertises in its SAGAW capability, so IOVA translation remains functionally correct. However, an unnecessarily deep page table may be selected, adding an extra level of page walk overhead and reducing TLB and cache efficiency without providing any increase in addressable IOVA space beyond what the mgaw window already caps. Fix by decreasing the shift offset by one in each fallback case, ensuring ffs() targets the correct SAGAW bit position and selects the smallest page table level that fully covers the mgaw range: - mgaw > 39: "2 + ffs(sagaw >> 2)" correctly yields top_level = 3 - mgaw > 30: "1 + ffs(sagaw >> 1)" correctly yields top_level = 2 Fixes: d856f9d27885 ("iommupt/vtd: Allow VT-d to have a larger table top than the vasz requires") Signed-off-by: Zhenzhong Duan Reviewed-by: Jason Gunthorpe Signed-off-by: Lu Baolu Signed-off-by: Joerg Roedel Signed-off-by: Sasha Levin commit 4abb7537305ae2ff8c494548483107d664c17ac9 Author: Johannes Berg Date: Thu Sep 24 15:42:24 2026 +0200 um: time-travel: fix sched_yield() behaviour [ Upstream commit 0e70b1de88ef1973cf752ae27930683eb2acd338 ] Just incrementing tt_extra_sched_jiffies can make this drift enough to hit the softlockup detector, e.g. with ping using sched_yield() in a loop to measure short intervals. Make the simulation actually pass time, this requires going to the external scheduler but actually makes this sort of thing behave much better and avoids the soft lockup. Fixes: 887c5c12e80c ("um: work around sched_yield not yielding in time-travel mode") Link: https://patch.msgid.link/20260924134223.1672004-2-johannes@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit efa5b6bbb7c253cd13b47f69c830decce48f0f75 Author: Konrad Dybcio Date: Fri Sep 11 15:27:03 2026 +0200 arm64: dts: qcom: glymur-asus-zenbook-a16: Remove RTC-through-EFIvars [ Upstream commit 37e8a61bf7214306889777edd8bd3df53b52d287 ] This machine, unlike older Snapdragon laptops, doesn't feature an EFI variable to denote the system time. Remove the property that suggests it does. Fixes: e8fbbca94db7 ("arm64: dts: qcom: glymur: Add Asus Zenbook A16 (UX3607OA)") Reported-by: Greg Ociepka Closes: https://lore.kernel.org/linux-arm-msm/20260821181148.1642208-1-greg@ferrisoft.com/ Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260911-topic-remove_uefivar_rtc_a16-v1-1-0967d8d4b3a6@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 27dbd9b20124b80c8c6253b7d5bc220850cb8dc8 Author: Abel Vesa Date: Tue Sep 15 11:44:14 2026 +0300 arm64: dts: qcom: sm8150: Use SM8150_CX for the SDHC power domain [ Upstream commit 475aab59d9870d250f521e202d191899c50a3ded ] Replace the raw power-domain index of SDHC2 with the SM8150_CX binding constant, which is the correct power domain in this case. Fixes: 876644c76034 ("arm64: dts: qcom: sm8150: Add support for SDC2") Reported-by: sashiko-bot Link: https://sashiko.dev/#/patchset/20260914-qcom-tie-cx-to-gcc-v4-0-9d5a606ada33@oss.qualcomm.com?part=45 Signed-off-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260915-dts-qcom-sm8150-sdhc-use-mss-for-pd-index-v2-1-a8610199483d@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 2ca4e22b710889c32d907ce3f759e7ee7e628447 Author: Myeonghun Pak Date: Thu Sep 10 18:17:25 2026 -0400 PCI: aardvark: Disable PHY on probe failures [ Upstream commit 28cc5bc5a6c6cffbe7ba27c0acbfbe06747fa173 ] advk_pcie_setup_phy() initializes and powers on the PHY before the emulated bridge and IRQ domains are created. If any of those later initialization steps or pci_host_probe() fails, probe returns without powering off or exiting the PHY. Replace the direct returns with staged cleanup labels. Remove IRQ domains in reverse order, release the emulated bridge allocation only after successful initialization, and disable the PHY on every failure after advk_pcie_setup_phy() succeeds. A setup_phy() failure still returns directly, so its partial internal cleanup is not repeated. Fixes: 366697018c9a ("PCI: aardvark: Add PHY support") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260910221725.91980-1-mhun512@gmail.com Signed-off-by: Sasha Levin commit e2412564c5e32e658a95c95cedc5d7ce49e5f0f2 Author: Xin Liu Date: Mon Sep 14 03:12:29 2026 -0700 arm64: dts: qcom: hamoa-iot-evk: use on-board crystal for PS8830 retimers [ Upstream commit 723ce02feb131a81224a281872028d584b69b0ca ] On the Hamoa IoT EVK, each of the two existing PS8830 retimers has its own 25 MHz crystal wired to the retimer's XI/XO pins. The reference clock does not come from the PMIC, so the RPMH_RF_CLK4/5 references in the retimer nodes are wrong: they keep those RF clocks enabled for nothing and describe a connection that does not exist on the board. Fixes: c11645afb0e2 ("arm64: dts: qcom: Add base HAMOA-IOT-EVK board") Signed-off-by: Xin Liu Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260914101233.981643-3-xin.liu@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 6a5a71cff60a9b2cb4a57c3a93c5e7213f0c1717 Author: Xin Liu Date: Mon Sep 14 03:12:28 2026 -0700 arm64: dts: qcom: purwa-iot-evk: use on-board crystal for PS8830 retimers [ Upstream commit bda6d233a6ea408817fa5fb5727d11fa2349d9a5 ] On the Purwa IoT EVK, each PS8830 retimer has its own 25 MHz crystal wired to the retimer's XI/XO pins. The reference clock does not come from the PMIC, so the RPMH_RF_CLK4/5 references in the retimer nodes are wrong: they keep those RF clocks enabled for nothing and describe a connection that does not exist on the board. Remove the stale "Left unused" annotation from the vreg_rtmr0 regulators as the retimer is actively used. Fixes: 9ed20e877239 ("arm64: dts: qcom: Add base PURWA-IOT-EVK board") Signed-off-by: Xin Liu Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260914101233.981643-2-xin.liu@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 82ab66bbd14478911cc8b148d470ee1aabf5c927 Author: Phil Sutter Date: Wed Sep 9 11:34:55 2026 +0200 netfilter: nfnetlink: Fix for interrupted hook dumps [ Upstream commit d3950004ba90350bcdf414c5f804da277178564a ] Handling of concurrent hook changes with a dump in progress was problematic in nfnl_hook_dump and entirely broken in nfnl_hook_dump_nat. Address all issues in a single patch to please the review LLM. Introduce sequence numbers in struct netns_nf to replace pointer value-based modification detection which may fail due to memory buffer reuse. This also eliminates the need for most manual cb->seq updates and excessive array index value checks. Since nat hook updates are protected by a different mutex than others, they have to bump their own sequence number. nfnl_hook_dump_nat therefore open-codes what nl_dump_check_consistent does but bumps cb->seq instead of setting NLM_F_DUMP_INTR flag. Dumps of many nat hooks was entirely broken since the array index was not (re)stored. Use cb->args[1] for that and make sure it is reset upon completion as the same dump may loop over multiple arrays of nat hooks. In nfnl_hook_dump, don't signal NLM_F_DUMP_INTR if nfnl_hook_entries_head returns error: This is a permanent condition which does not change during a dump. It is already caught by nfnl_hook_dump_start though, so should not happen anyway. In general, access ops array pointer values using READ_ONCE since they are assigned to using WRITE_ONCE. Avoid setting NLM_F_DUMP_INTR flag in garbage memory by calling nl_dump_check_consistent only for non-empty skbs. If not a single netlink message was created, nfnetlink code will take care of setting the flag. Fixes: e2cf17d3774c ("netfilter: add new hook nfnl subsystem") Fixes: b010e2a4a9ac ("netfilter: nfnetlink_hook: Dump nat type chains") Signed-off-by: Phil Sutter Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit cc6f1d76ed4c591879ae81af7e532534cc41b354 Author: Linus Walleij Date: Mon Sep 21 11:15:55 2026 +0200 ARM: dts: gemini: Use a level-high interrupt for TVE200 [ Upstream commit 5bf1bb010712bba28eda926ed453db3cab91381a ] TVE200's interrupt is configured as rising-edge. On the D-Link DIR-685, this can stop interrupt delivery after the first vertical interrupt, causing vblank and page-flip timeouts and delaying framebuffer console startup. The vertical interrupt can remain pending after acknowledgment. Use level-high triggering so the pending condition is delivered again without requiring another edge. Fixes: d2b85241a9f5 ("ARM: dts: Add TVE200 to the Gemini SoC DTSI") Assisted-by: LLM Signed-off-by: Linus Walleij Message-ID: <20260921-gemini-tve200-fix-v1-2-8be03ac2a8f7@kernel.org> Signed-off-by: Sasha Levin commit 16ac3922ea9fddaede903691dcd1ad03879f3e44 Author: Fernando Fernandez Mancera Date: Wed Aug 19 12:24:08 2026 +0200 netfilter: synproxy: fix reset of ct seqadj when reopening a connection [ Upstream commit a8708aa9fe1095ca7859cb3f102b6a3fa0fb98bd ] SYNPROXY is resetting conntrack seqadj when a closed connection is re-opened, but it was using nf_ct_seqadj_init() which is a no-op for a zero offset. This patch introduces nf_ct_seqadj_reset() which sets the offset values directly to zero and avoid setting IPS_SEQ_ADJUST_BIT flag, it changes SYNPROXY code to use it when needed. Fixes: 48b1de4c110a ("netfilter: add SYNPROXY core/target") Signed-off-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin commit 9c1be26263f70a9a3c816ee5e4fde355f23c9b32 Author: Sasha Levin Date: Sun Sep 27 12:12:27 2026 -0400 kbuild: keep .modinfo when vmlinux is linked with --gc-sections [ Upstream commit a98db7418797bc27bef53c861b97ac748f598414 ] Builds with CONFIG_LD_DEAD_CODE_DATA_ELIMINATION=y, such as arm allmodconfig, now fail while extracting modules.builtin.modinfo: arm-linux-gnueabihf-objcopy: vmlinux.unstripped: can't dump section '.modinfo' - it does not exist: file format not recognized /bin/sh: 1: cannot open modules.builtin.modinfo: No such file or, with LLVM: llvm-objcopy: error: 'vmlinux.unstripped': section '.modinfo' not found Nothing references the MODULE_INFO() strings, so --gc-sections discards every .modinfo input section and vmlinux.unstripped ends up with no .modinfo data. This is not new: ever since modules.builtin.modinfo started being extracted from vmlinux.unstripped, these builds have silently produced an empty file, losing the modinfo of every built-in module. An arm multi_v7_defconfig build with LD_DEAD_CODE_DATA_ELIMINATION on current mainline yields a 0 byte modules.builtin.modinfo. The switch to --dump-section only turned that into a build error. Wrap the input section in KEEP() so that the linker retains it. The output section is still (INFO), so nothing is allocated for it. With the same arm config, modules.builtin.modinfo now has 14119 entries, and on x86_64 defconfig, where nothing is garbage collected, it is byte-identical before and after this change. Found by KernelCI builds of the linus-next tree. Fixes: 39cfd5b12160 ("kbuild: extract modules.builtin.modinfo from vmlinux.unstripped") Fixes: 5fe4dd596641 ("kbuild: do not allocate .modinfo in vmlinux") Assisted-by: LLM Signed-off-by: Sasha Levin Link: https://patch.msgid.link/20260927161227.1179863-1-sashal@kernel.org Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 6fc72f8810229c0efe8d04a376616733a79a6e58 Author: Lorenzo Stoakes (ARM) Date: Wed Sep 23 18:17:50 2026 +0100 kbuild: do not allocate .modinfo in vmlinux [ Upstream commit 5fe4dd59664105a9ea1a9468aa7391806b80364a ] Commit 3e86e4d74c04 ("kbuild: keep .modinfo section in vmlinux.unstripped") placed MODULE_INFO() strings in the .modinfo section in vmlinux.unstripped, however it left the section allocatable, so it gets assigned an address and on arm64, arm and riscv, the section is tagged as PT_LOAD. This is useless as the data is ultimately stripped anyway. Doing this results in a lot of unnecessary work - each pass copies the whole file, 450 MiB with relocations for an x86 allmodconfig build and 250 MiB for an arm64 allmodconfig build. This adds ~0.7s on the serial tail of every build for arm64 and ~0.2s for x86 (the tail is single-threaded work done after parallel work has finished). Nothing requires .modinfo to exist at an address, so mark the output section (INFO) so that it's not allocated and use --dump-section to extract it as -O only emits allocated sections. The dump doesn't pick up the arch's OBJCOPYFLAGS any longer as they should not impact the output of this section. Image, bzImage, System.map and modules.builtin.modinfo are unchanged and the stripped vmlinux differs only in its program headers. The objcopy passes are on the serial tail of every build that links vmlinux, no-op builds are unchanged. Whole build, 128-thread Threadripper 9980X, best of N runs: before after delta ------------------------------- x86 defconfig, touch mm/vma.c, gcc 11.2s 11.1s -0.15s (-1%) x86 defconfig, touch mm/vma.c, clang 11.3s 11.1s -0.19s (-2%) x86 defconfig, clean, gcc 32.5s 32.3s -0.16s (-1%) x86 defconfig, clean, clang 34.5s 34.2s -0.26s (-1%) x86 allmodconfig, touch mm/vma.c, gcc 40.1s 39.7s -0.44s (-1%) Assisted-by: LLM Reviewed-by: Kees Cook Signed-off-by: Lorenzo Stoakes (ARM) Reviewed-by: Nicolas Schier Link: https://patch.msgid.link/20260923-build-speedup-v4-1-73128809a4a4@kernel.org Signed-off-by: Nathan Chancellor Stable-dep-of: a98db7418797 ("kbuild: keep .modinfo when vmlinux is linked with --gc-sections") Signed-off-by: Sasha Levin commit 5dac2bb6b171eed8002665df8bb148f84d85a1d0 Author: Nathan Chancellor Date: Thu Sep 17 17:29:53 2026 -0700 kbuild: Remove alignment on .modinfo section [ Upstream commit 36d4a11b56aa98da4b4652a2e34d229ffcf36070 ] Commit d50f21091358 ("kbuild: align modinfo section for Secureboot Authenticode EDK2 compat") aligned .modinfo because it appeared in the x86_64 compressed kernel image after commit 3e86e4d74c04 ("kbuild: keep .modinfo section in vmlinux.unstripped"), breaking boot. Commit 8678591b4746 ("kbuild: Split .modinfo out from ELF_DETAILS") properly addresses .modinfo appearing in unexpected contexts like compressed images by moving it out of ELF_DETAILS and explicitly specifying its location in every architecture's vmlinux linker script or discarding it where it may appear elsewhere. Effectively revert commit d50f21091358 ("kbuild: align modinfo section for Secureboot Authenticode EDK2 compat") and its follow up fix, commit a26a6c93edfe ("kbuild: Strip trailing padding bytes from modules.builtin.modinfo"), as they are no longer necessary in the current tree. This simplifies future cleanups. Reviewed-by: Nicolas Schier Link: https://patch.msgid.link/20260918005142.GA1585590@ax162/ Signed-off-by: Nathan Chancellor Stable-dep-of: a98db7418797 ("kbuild: keep .modinfo when vmlinux is linked with --gc-sections") Signed-off-by: Sasha Levin commit bb27b9774221d643c10c65abd9630fc07e1ae980 Author: Sam Day Date: Sat Sep 26 16:17:13 2026 +1000 drm/msm/a3xx: fix VBIF halt mask for A306/A306A [ Upstream commit b5434691654441448c6d20a8ba887e29d3f81042 ] A306 and A306A implement only three VBIF XIN halt request bits. Consequently, waiting for the full 6-bit A3xx mask times out and prevents runtime suspend. This issue was reproduced on a DragonBoard 410c: the request reads back as 0x7 and the acknowledgment as 0x00070007 - the poll eventually returns -ETIMEDOUT, and a3xx_pm_suspend fails with -EBUSY. The downstream kgsl driver corroborates this (see link). Since the single-character difference between A3XX_VBIF_XIN_HALT_CTRL0_MASK and A30X_VBIF_XIN_HALT_CTRL0_MASK could be confusing to read, the narrowed GENMASK is instead defined inline in a3xx_vbif_halt(). Fixes: be0e82b8e0c9 ("drm/msm/a3xx: Drain VBIF before GPU suspend") Link: https://android.googlesource.com/kernel/msm/+/c90c7feeca2f5839ad6824f816c0bd207602a2f4/drivers/gpu/msm/adreno_a3xx.c#637 Assisted-by: LLM Signed-off-by: Sam Day Patchwork: https://patchwork.freedesktop.org/patch/756513/ Message-ID: <20260926-a306-vbif-mask-v1-1-2bae5e81c05a@samcday.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit b91648f74186c6db6226971b3e9f504466ec6ffb Author: Akhil P Oommen Date: Wed Sep 23 15:55:43 2026 +0530 drm/msm/a6xx: Fix RPMH dependency votes [ Upstream commit eab0aff8965ee17cf972a37eb6456032c45b7acd ] a6xx_gmu_rpmh_dep_votes_init() iterates the GPU frequency list (gmu->gpu_freqs) but was passed gmu->dev to resolve each frequency to an arc level. This results in generation of incorrect dependency votes table. To fix this, pass gpu->pdev->dev, which owns the GPU OPP table. Also, reorder the dependency vote init to improve clarity. Fixes: 06cfbca0e1c6 ("drm/msm/a6xx: Share dependency vote table with GMU") Reviewed-by: Konrad Dybcio Signed-off-by: Akhil P Oommen Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/755593/ Message-ID: <20260923-hawi-gpu-v1-3-0c3c79a1a470@oss.qualcomm.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit 21291ab009bd238fcc5592c5bf474d7b31271b85 Author: Akhil P Oommen Date: Wed Sep 23 15:55:42 2026 +0530 drm/msm/a6xx: Fix secondary rail vote in ARC votes [ Upstream commit 128a0edde50780ed9eb93ab5d2e18ca24c1f1c43 ] Using the requested level can pick a secondary corner lower than the one required to support the chosen primary corner, under-voting the dependent rail. To fix this, match against the selected primary voltage instead. Fixes: 4b565ca5a2cb ("drm/msm: Add A6XX device support") Reviewed-by: Konrad Dybcio Signed-off-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/755592/ Message-ID: <20260923-hawi-gpu-v1-2-0c3c79a1a470@oss.qualcomm.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit c2cc627a1a5646737ab217564cde47c28b2f449b Author: Akhil P Oommen Date: Wed Sep 23 15:55:41 2026 +0530 drm/msm/a6xx: Honor perfmode_bw threshold on A8x [ Upstream commit db6a2e4a7ebd4378d03a97f4bef22f8c157240ad ] Instead of voting ACV for all bw corners for A8x GPU, restrict it to BW votes above the perfmode_bw threshold, similar to the A7x GPUs. Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support") Signed-off-by: Akhil P Oommen Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/755589/ Message-ID: <20260923-hawi-gpu-v1-1-0c3c79a1a470@oss.qualcomm.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit 80d71d55643e5d60e9cd811c392d15165b59d919 Author: Daniel Palmer Date: Fri Aug 28 18:49:40 2026 +0900 m68k: apollo: Fix interrupt setup [ Upstream commit 6cdbe63badcb524c88f2c8b3cee08f2ffc099a1b ] The user interrupt vector needs to be installed before the interrupts are unmasked otherwise the timer tick isn't handled and boot up gets stuck in calibrate_delay(). Assisted-by: Claude:claude-fable-5 # Wrote Apollo DN3000 emulator using QEMU Fixes: 0aa78106c661cf6c ("[PATCH] m68k: convert apollo irq code") Signed-off-by: Daniel Palmer Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20260828094940.3882602-1-daniel@0x0f.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin commit 03594cad9f5b02106656d55dec0e4876fd55caa4 Author: Hui Su Date: Sat Sep 12 12:11:12 2026 +0900 perf synthetic-events: Check schedstat domain allocation failure [ Upstream commit bac027175ada974b3fde9eb0690ca5d698e0a6d1 ] __synthesize_schedstat_domain() uses event after zalloc() without checking for allocation failure, unlike __synthesize_schedstat_cpu(). If zalloc() fails and returns NULL, dereferencing ds->header.type immediately crashes with a segmentation fault: Program received signal SIGSEGV, Segmentation fault. 0x00005555558aed8a in __synthesize_schedstat_domain () #0 0x00005555558aed8a in __synthesize_schedstat_domain () #1 0x00005555558b889a in perf_event__synthesize_schedstat () #2 0x000055555563c397 in cmd_sched () #3 0x00005555556583a1 in handle_internal_command () #4 0x00005555555bf739 in main () perf_event__synthesize_schedstat() already treats a NULL event as an error and cleans up, so return NULL when the allocation fails. After this fix, an allocation failure returns NULL safely, allowing the caller to exit gracefully without crashing: [ perf sched stats: Failed !! ] Fixes: c3030995f23b3d35 ("perf sched stats: Add record and rawdump support") Signed-off-by: Hui Su Cc: Swapnil Sapkal Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 9843c6919e298832792d377283cc519bdbb0c2f3 Author: Jie Zhang Date: Fri Sep 25 02:44:32 2026 +0530 dt-bindings: display/msm/gmu: Fix Glymur's compatible [ Upstream commit f221c5856392fc16f56c7aa709d18f6714ab6f82 ] The Glymur GMU compatible string was incorrectly documented as qcom,adreno-gmu-x285.1. Fix it to use the correct string qcom,adreno-gmu-x290.1. Fixes: 7bc29d5fb6fa ("dt-bindings: display/msm/gmu: Add Adreno X2-85 GMU") Signed-off-by: Jie Zhang Signed-off-by: Akhil P Oommen Patchwork: https://patchwork.freedesktop.org/patch/756251/ Message-ID: <20260925-mahua-gpu-v1-1-0fa0bfd8d315@oss.qualcomm.com> Signed-off-by: Rob Clark Signed-off-by: Sasha Levin commit 1ff7a91379f5bda77fd29c9fa4fd9cfbfd16aa78 Author: Shashank Mohan Jain Date: Sat Sep 26 06:56:50 2026 +0530 bitmap: bitmap_parselist(): don't wrap around on a huge group size [ Upstream commit d075c4dc0b3c8ed91a4f67ebdf3384aa59fd4fbb ] In the "range:used/group" form bitmap_set_region() walks the range with for (start = r->start; start <= r->end; start += r->group_len) where all values are unsigned int. bitmap_getnum() accepts any group size up to UINT_MAX, and bitmap_check_region() only requires it to be non-zero and at least the used size. If start + group_len exceeds UINT_MAX, start wraps around to a small value that is still <= end, and bits below the start of the range get set: "1-1:1/4294967295" -> bits 0,1 (expected bit 1) "15-15:1/4294967281" -> bits 0,15 (expected bit 15) The loop still terminates, because start keeps decreasing until it wraps past zero again, but the resulting mask contains bits outside the requested range. This needs a group size within 'start' of UINT_MAX, so it is unlikely to be hit by accident; all bits set stay below the end of the range, so there is no out-of-bounds write. A group larger than the range simply means that the range contains a single group, so stop the walk when the next group would start beyond UINT_MAX. Fixes: 0a5ce0831d04 ("lib/bitmap.c: make bitmap_parselist() thread-safe and much faster") Assisted-by: LLM Signed-off-by: Shashank Mohan Jain Signed-off-by: Yury Norov Signed-off-by: Sasha Levin commit a23c260e7b2ead32c19544d20ad9ad7408dcc50d Author: Shashank Mohan Jain Date: Sat Sep 26 06:56:48 2026 +0530 bitmap: bitmap_parselist(): reject trailing characters after group size [ Upstream commit c55d102257fa31271c6f11fea595b78c48fd7aa2 ] bitmap_parse_region() checks that every region ends at a separator (',', whitespace, '\n' or '\0'), except in the "range:used/group" form: after parsing the group size it returns the pointer to the following character without looking at it. The caller then starts a new region at that character. Before 'N' and 'all' were accepted as region starts this happened to be harmless, because any other character would fail to parse as a new region. Now text directly following the group size is silently parsed as another region: "0-7:1/2N" -> bits 0,2,4,6,7 (nbits = 8), returns 0 "0-7:1/2all" -> all bits set, returns 0 while "0-7N", "5N" or "0-7:1/2x" are correctly rejected with -EINVAL. bitmap_parselist() is documented to return -EINVAL for an invalid character. It parses cpu lists from sysfs, cgroup cpuset files and boot parameters such as isolcpus= and nohz_full=, so a typo there is accepted and yields a different mask than intended. Check for the end of the region after the group size as well, like the other forms do. Fixes: 2c4885d24e64 ("lib: bitmap: support "N" as an alias for size of bitmap") Assisted-by: LLM Signed-off-by: Shashank Mohan Jain Signed-off-by: Yury Norov Signed-off-by: Sasha Levin commit a48c7ac69f65eb122efeba8e3b8a46fd6c70d678 Author: Shashank Mohan Jain Date: Sat Sep 26 06:56:46 2026 +0530 bitmap: bitmap_parse(): reject non-hex character before 8 digits [ Upstream commit 7cee2fb210a198667d3d4200705215e6f315cab0 ] bitmap_parse() is documented to return -EINVAL for illegal characters, and it does so everywhere except when the illegal character directly precedes a chunk of exactly eight hex digits. bitmap_get_x32_reverse() parses a chunk from right to left. After it has consumed eight digits it looks at one more character: a hex digit means the chunk is wider than 32 bits and -EOVERFLOW is returned. Any other character is silently consumed as if it were a separator, and the remaining input is parsed as the next chunk. As a result: "x12345678" -> 0x12345678, returns 0 (expected -EINVAL) "1g12345678" -> 0x1_12345678, returns 0 (expected -EINVAL) "0x0000000f" -> 0xf, returns 0, while "0xf" returns -EINVAL bitmap_parse() backs cpumask_parse() and cpumask_parse_user(), so the same inconsistency is visible when writing masks such as /proc/irq/*/smp_affinity or the network queue rps_cpus/xps_cpus files. __bitmap_parse(), which this function replaced in commit 2d6261583be0 ("lib: rework bitmap_parse()"), rejected all three strings with -EINVAL, and a "0x" prefix is accepted today only when exactly eight digits follow it, so no reliably working input is lost. When the loop falls through, *end is known to be a non-separator character inside the buffer, so return -EOVERFLOW if it is a hex digit and -EINVAL otherwise. Fixes: 2d6261583be0 ("lib: rework bitmap_parse()") Assisted-by: LLM Signed-off-by: Shashank Mohan Jain Signed-off-by: Yury Norov Signed-off-by: Sasha Levin commit 57994cb6beb3f9523a664ab249601e8dc35e0606 Author: Alexandra Lu Date: Fri Aug 7 14:33:53 2026 +0000 bus: mhi: host: pci_generic: Fix runtime PM imbalance for no_m3 devices [ Upstream commit 95601e9948b42f82600ff2d9e0c2f699a067d561 ] mhi_pci_probe() drops the runtime PM reference taken by local_pci_probe() only when the device supports both PME from D3hot and M3, but mhi_pci_remove() re-takes it based on PME capability alone, without checking no_m3. For a device that is PME capable and has no_m3 set, probe therefore never drops the reference while remove takes an extra one, leaving the runtime PM usage count one higher after every bind/unbind cycle. That is benign for the device being removed, since the PCI core resumes it to D0 on unbind regardless, but the struct device outlives the binding, so the count accumulates across repeated cycles and can end up preventing runtime suspend altogether. Cache no_m3 in the driver's private data, as is already done for reset_on_remove, and gate the removal side on it as well. Unlike reset_on_remove it is cached for virtual functions too, because the probe side gate tests info->no_m3 for physical and virtual functions alike. QDU100 is currently the only device that sets no_m3. Fixes: 0494cf9793b7 ("bus: mhi: host: pci_generic: Disable runtime PM for QDU100") Assisted-by: LLM Signed-off-by: Alexandra Lu Signed-off-by: Manivannan Sadhasivam Reviewed-by: Jeff Hugo Link: https://patch.msgid.link/20260807143353.1932381-1-alexandra.lu@nokia.com Signed-off-by: Sasha Levin commit ad9355837f45ce7fd7034ccc82b7c821a18b4ffa Author: WangYuli Date: Sat Sep 19 16:14:20 2026 +0100 MIPS: dec: Add missing inclusion to reset.h [ Upstream commit 271e680b17a40347cfc2d33f721249cbb82e34c8 ] Pull the header directly that is required for `irqreturn_t' type. Fixes: 0eb77376912e ("MIPS: DEC: Fix prototypes for halt/reset handlers") Signed-off-by: WangYuli Signed-off-by: Maciej W. Rozycki Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin commit ae559cc927279804665b3e04ff8972a8f0c8f72c Author: WangYuli Date: Sat Sep 19 16:14:13 2026 +0100 MIPS: Only check -msym32 when need-compiler [ Upstream commit 7a8f286c235f5d308208cfdcb025b2a0e0c84742 ] During 'make modules_install', the need-compiler variable is null, so Makefile.compiler isn't included. This results in call cc-option-yn returning nothing and consequently an error is issued: *** CONFIG_CPU_DADDI_WORKAROUNDS unsupported without -msym32. Stop. and the invocation terminated for configurations that set the Kconfig option named. Previously commit a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression") addressed the same issue for GCC versions now supported for Linux compilation, but caused a build error with Clang because it doesn't support '-msym32'. Then commit 18ca63a2e23c ("MIPS: Probe toolchain support of -msym32") fixed the issue with Clang, but reintroduced the 'make modules_install' error listed above. Wrap the handling of the '-msym32' option then with ifdef need-compiler, fixing said error for 'make modules_install'. For more technical details on why need-compiler is null during 'make modules_install' and why no compiler invocation is actually needed at this point, please refer to commit 4fe4a6374c4d ("MIPS: Only fiddle with CHECKFLAGS if need-compiler") and commit 805b2e1d427a ("kbuild: include Makefile.compiler only when compiler is needed"). NB leading 8 spaces rather than tabs required due to `make' syntax. Link: https://lore.kernel.org/all/alpine.DEB.2.21.2502120612000.65342@angie.orcam.me.uk/ Link: https://lore.kernel.org/all/alpine.DEB.2.21.2307180025120.62448@angie.orcam.me.uk/ Fixes: a79a404e6c22 ("MIPS: Fix CONFIG_CPU_DADDI_WORKAROUNDS `modules_install' regression") Reported-by: Maciej W. Rozycki Closes: https://lore.kernel.org/all/alpine.DEB.2.21.2501030535080.49841@angie.orcam.me.uk/ Co-developed-by: Chen Linxuan Signed-off-by: Chen Linxuan Signed-off-by: WangYuli Signed-off-by: Maciej W. Rozycki Reviewed-by: Chen Linxuan Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin commit 8bd336b7495cc69ea138b9ddb93e91bf17e151c4 Author: Orgad Shaneh Date: Tue Sep 15 08:18:24 2026 +0000 MIPS: Octeon: size the swiotlb for a modular OHCI platform driver [ Upstream commit f1dd1f0c8d595a019be503d40060d25721313b4a ] plat_swiotlb_setup() raises the swiotlb to 64 MB on OCTEON II with memory above 4 GB, because that OHCI can only DMA to 32 bits. The test is "#ifdef CONFIG_USB_OHCI_HCD_PLATFORM", which is false when the driver is a module - the usual way to build it - so the bump is silently skipped. What is left depends on the rest of the function: with PCI enabled the "memory past the BAR1 hole" branch happens to ask for the same 64 MB, but with CONFIG_PCI off - which is normal on these SoCs when no PCI devices are wired - swiotlbsize stays at the PAGE_SIZE it was initialised to. A full- or low-speed device on an OCTEON II board with more than 4 GB of RAM then has no bounce buffer to speak of. Use IS_ENABLED() so a modular OHCI gets the same sizing as a built-in one. Seen on a CN6635 board with 8 GB of RAM and CONFIG_USB_OHCI_HCD_PLATFORM=m. Fixes: a8667d706dfa ("MIPS: OCTEON: dma-octeon: fix OHCI USB config check") Assisted-by: Claude:claude-opus-5 Signed-off-by: Orgad Shaneh Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin commit 9c2636700dc69b9717cedc052744a1ebbefadca6 Author: Danish Khateeb Date: Fri Sep 25 16:15:59 2026 -0500 tools/nolibc: fix FD_SET(), FD_CLR() and FD_ISSET() on 64-bit [ Upstream commit 929ea5b3481fdbbb419f3986703280fb2b819504 ] Since commit feaf75658783 ("nolibc: fix fd_set type"), an fd_set is an array of unsigned long, but the FD_* macros still build their masks as an int or an unsigned int: 1 << n in FD_SET(), 1U << n in FD_CLR() and FD_ISSET(), where n is the fd modulo 64 on 64-bit architectures. So: - FD_SET() of an fd with n == 31 sets the bits for n = 31-63, as 1 << 31 is negative and gets sign-extended. - For n >= 32 the shifts are undefined. x86-64, for instance, masks the shift count, so FD_SET(40) and FD_ISSET(40) use the bit of fd 8. - FD_CLR() zero-extends ~(1U << n), so it also clears the bits for n = 32-63, whichever fd it is given. select() on fd 40, for instance, fails with EBADF, or watches fd 8 instead if that one is open. Build the masks from 1UL. Fixes: feaf75658783 ("nolibc: fix fd_set type") Assisted-by: LLM Signed-off-by: Danish Khateeb Link: https://patch.msgid.link/20260925211600.119116-3-danishkhateeb03@gmail.com Signed-off-by: Thomas Weißschuh Signed-off-by: Sasha Levin commit 7df6c7e889e700f63a8353cc15136d70e77d53d8 Author: Danish Khateeb Date: Fri Sep 25 16:15:58 2026 -0500 tools/nolibc: fix readdir_r() with 64-bit directory offsets [ Upstream commit 00c81514ad49110574e4b9bdbc448551004161f2 ] readdir_r() stores the result of _sys_lseek() in an int. Directory offsets are opaque cookies which can use all 64 bits: ext4, for instance, gives 64-bit processes 63-bit hashes, and 0x7fffffffffffffff as the offset after the last entry. Truncated to an int, such an offset is negative about half the time, and readdir_r() takes it for an error. Since commit 4ada5679f18d ("tools/nolibc/dirent: avoid errno in readdir_r"), readdir_r() fails at the first entry whose offset has bit 31 set, which on ext4 is usually one of the first few, and returns the truncated offset as the error number. Before that, only -1 counted as an error, which the last entry always hits: readdir_r() then returned errno, usually 0, without filling in the entry, so the caller got the previous entry a second time and never saw the last one. 32-bit processes get 31-bit hashes from ext4 and are not affected. Keep the offset in an off_t. Fixes: 665fa8dea90d ("tools/nolibc: add support for directory access") Assisted-by: LLM Signed-off-by: Danish Khateeb Link: https://patch.msgid.link/20260925211600.119116-2-danishkhateeb03@gmail.com Signed-off-by: Thomas Weißschuh Signed-off-by: Sasha Levin commit 7cedb31291d3d55fa6a979a0816f50273e146503 Author: Peter Wang Date: Mon Sep 14 16:49:25 2026 +0800 scsi: ufs: core: Serialize AHIT register access between sysfs and host driver [ Upstream commit 7dec5cedf7b248036da606c16f9f3f9aa350b417 ] A race exists between ufshcd_auto_hibern8_update() and ufs_mtk_pwr_change_notify() when both paths concurrently access REG_AUTO_HIBERNATE_IDLE_TIMER. Additionally, the static local variable used to save/restore AHIT in the power change path is not re-entrant and may hold a stale value if a sysfs write races with a gear change. Introduce ahit_mutex and ahit_disable_depth in struct ufs_hba to serialize AHIT register access. The depth counter tracks how many host-driver paths have forced AHIT off; sysfs writes are suppressed while it is non-zero and the register is restored from hba->ahit only when the last disabler drops it to zero. Fixes: f5ca8d0c7a63 ("scsi: ufs: host: mediatek: Disable auto-hibern8 during power mode changes") Signed-off-by: Peter Wang Reviewed-by: Chun-Hung Wu Link: https://patch.msgid.link/20260914085148.136429-3-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 293b9a33190df3e198de37992470f295aa5116a5 Author: Peter Wang Date: Mon Sep 14 16:49:24 2026 +0800 scsi: ufs: core: Always notify POST_CHANGE even on gear switch failure [ Upstream commit 6efee14ca0aed33103ea17f4367da173f893442f ] Previously, POST_CHANGE was only notified on a successful gear switch. This could leave the host in an inconsistent state if resources were acquired in PRE_CHANGE (e.g. disabling auto-hibern8) but never released due to a missing POST_CHANGE. Fix this by always calling POST_CHANGE regardless of the gear switch result. On failure, pass dev_req_params = NULL to signal that there is nothing to apply; hosts that receive NULL simply skip their post work. Update the affected drivers (ufs-exynos and ufshcd-pci) to guard their POST_CHANGE logic with a NULL check so they correctly handle the failure case. Fixes: f5ca8d0c7a63 ("scsi: ufs: host: mediatek: Disable auto-hibern8 during power mode changes") Signed-off-by: Peter Wang Reviewed-by: Chun-Hung Wu Link: https://patch.msgid.link/20260914085148.136429-2-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit f83d45ef1aa334b6ec77dee84708af4c5862626b Author: Tony Luck Date: Tue Sep 15 12:04:31 2026 -0700 x86/resctrl: Update documented unit for the "activity" event [ Upstream commit a17d099481bd11f0911993a8e69992269f92ad12 ] The unit for the AET (Application Energy Telemetry) activity event[1] is nF, not F, see https://github.com/intel/Intel-PMT/blob/main/xml/CWF/OOBMSM/RMID-ENERGY/cwf_common.xml#L9 Fixes: a8848c4b43ad ("x86,fs/resctrl: Update documentation for telemetry events") Signed-off-by: Tony Luck Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Link: https://patch.msgid.link/20260915190431.18189-1-tony.luck@intel.com Signed-off-by: Sasha Levin commit 735d47358d75816df7e67a56b393beca68c85447 Author: Eric Dumazet Date: Tue Sep 22 16:34:55 2026 +0000 net: synchronize proc_do_rss_key() with netdev_rss_key_fill() [ Upstream commit 9396e37c4860822fbc354fa438bb18e1437e0c9c ] proc_do_rss_key() reads netdev_rss_key[] without synchronization, so a concurrent reader of /proc/sys/net/core/netdev_rss_key can observe a partially populated key while netdev_rss_key_fill() is initializing it. Publish a boolean flag after an smp_wmb() once netdev_rss_key_fill() has populated netdev_rss_key[], and pair it with an smp_rmb() in proc_do_rss_key(), printing zero bytes until the flag is set. Fixes: 960fb622f851 ("net: provide a per host RSS key generic infrastructure") Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20260922163458.3900996-2-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b234b2562450ea07132d744e1786d36183a52689 Author: Kumar Kartikeya Dwivedi Date: Fri Sep 25 06:55:28 2026 +0200 bpf: Skip zero-length stream writes [ Upstream commit f17bedcd29517739a6491c1c51cc6a593f6a0332 ] A stream write whose formatted output is empty still allocates a stream element and links it into the stream log. Capacity accounting only counts payload bytes, so such elements never count against the stream limit, and a program that keeps producing empty output allocates elements without bound until a reader drains them. Return success without allocating anything when there is nothing to write, for both bpf_stream_vprintk() and staged writes. Every element in a stream log then carries at least one byte, which later changes rely on when they derive read readiness from published byte counts. Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams") Suggested-by: Emil Tsalapatis Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260925045536.1480933-2-memxor@gmail.com Signed-off-by: Sasha Levin commit ee864bab6d8ae655fb016e48cf07ab4ced5dea7f Author: Daniel Borkmann Date: Fri Sep 25 19:52:36 2026 +0200 bpf: Clear the insn array used flag with release semantics [ Upstream commit a83512036e0809497ee3259ba7458de287949b94 ] A program that fails after the JIT ran, for example in bpf_check_tail_call(), has already stored its jitted offsets and target pointers into the insn array maps it uses through bpf_prog_update_insn_ptrs() when release_insn_arrays() hands them back by clearing the used flag with a plain atomic_set(). Nothing orders those stores before the flag, so on a weakly ordered architecture they can still be in flight when the next program takes the map: it is acquired with atomic_xchg() in bpf_insn_array_init() and reset there, and the late stores then land on top of whatever the new owner has written since, be it that reset or the pointers its own JIT stored, leaving entries that point into an image which is about to be freed. Clear the flag with atomic_set_release() instead, so that everything the releasing program stored is visible before the map can be acquired again. This pairs with the fully ordered atomic_xchg() on the acquire side. Fixes: b4ce5923e780 ("bpf, x86: add new map type: instructions array") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260925175244.1136329-10-daniel@iogearbox.net Signed-off-by: Sasha Levin commit b590245a755d0fd0abdbd7924f79080db4e9862c Author: Daniel Borkmann Date: Fri Sep 25 19:52:35 2026 +0200 bpf: Clear insn array jitted pointers on map reuse [ Upstream commit 9aa11c4656b7bd8a32869296603f117a49eadd6e ] An insn array records, per entry, the xlated offset, the jitted offset and a jitted target pointer in ips[]. bpf_insn_array_init() runs when the map is bound to a program and resets only xlated_off; the jitted offset and the ips[] pointer are left as the previous owner set them. A program can be verified and JITed and only then fail to load (e.g. bpf_check_tail_call()). By that point bpf_prog_update_insn_ptrs() has already filled ips[] with pointers into that program's JIT image. Thus, the map is handed back for reuse with the stale pointers intact. If the next program reuses the map, the stale pointer survives in the now active program's jump table, pointing into the previous, freed image. Fix by resetting the jitted offset and the ips[] pointer alongside the xlated offset. Fixes: b4ce5923e780 ("bpf, x86: add new map type: instructions array") Reported-by: Sandipan Roy Reported-by: James Burton Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Anton Protopopov Acked-by: Eduard Zingerman Link: https://patch.msgid.link/20260925175244.1136329-9-daniel@iogearbox.net Signed-off-by: Sasha Levin commit 4d7421b7cb5297a21be62e9fa5689e6eb531ec78 Author: Daniel Borkmann Date: Fri Sep 25 19:52:34 2026 +0200 bpf: Don't remove indirect jump targets in the nop removal pass [ Upstream commit c48a91c049fd98fcde54880a24c51b9a05f7e185 ] bpf_opt_remove_nops() drops every ja +0 and may_goto +0 unconditionally. A gotox target may itself be such a transparent nop: it is a verified entry of an insn array jump table that is reachable at run time through the indirect jump. bpf_insn_array_adjust_after_remove() marks it as INSN_DELETED instead, and bpf_insn_array_ready() skips INSN_DELETED entries, so the program loads with a hole in its jump table. The x86 JIT, for example, lowers gotox to a raw indirect jump, so executing that index jumps to the zeroed ips[] slot, that is, to address 0. Fix by keeping an indirect jump target in place. Fixes: 493d9e0d6083 ("bpf, x86: add support for indirect jumps") Reported-by: Sandipan Roy Reported-by: James Burton Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Anton Protopopov Acked-by: Eduard Zingerman Link: https://patch.msgid.link/20260925175244.1136329-8-daniel@iogearbox.net Signed-off-by: Sasha Levin commit 046cdb35953063b5d38fa7de541c0bb86011feb2 Author: Daniel Borkmann Date: Fri Sep 25 19:52:31 2026 +0200 bpf: Leave out the hidden exit edge of a subprogram without an exit [ Upstream commit 939bb6270ee32cfef0631b30ff07a9e0b8806e64 ] visit_abnormal_return_insn() gives tail_call and ld_{abs,ind} insns a second successor, the exit_idx of their subprogram, so that the hidden exit from the subprogram is part of the CFG. check_subprogs() only assigns exit_idx when it walks over a BPF_EXIT, and a subprogram whose last insn jumps back into itself never has one, so exit_idx stays zero and the edge points at insn 0 of the program: 0: r0 = 0 1: r0 = *(u8 *)skb[0] 2: goto -2 For a subprogram other than main, update_insn() then reads the liveness masks at a negative relative index. Such a subprogram can still load when it leaves through a bpf_throw(), so mark exit_idx as unset in that case and leave the hidden edge out, as there is no exit for it to reach. Fixes: e40f5a6bf88a ("bpf: correct stack liveness for tail calls") Fixes: ee861486e377 ("bpf: Fix ld_{abs,ind} failure path analysis in subprogs") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260925175244.1136329-5-daniel@iogearbox.net Signed-off-by: Sasha Levin commit 1969470a530e376e87e9497a00ff25e32da922e1 Author: Daniel Borkmann Date: Fri Sep 25 19:52:30 2026 +0200 bpf: Rebase the exception callback subprog when dead subprogs are removed [ Upstream commit 8608ec8e981974b18834e2d67ed39638a9ec2e63 ] adjust_subprog_starts_after_remove() compacts subprog_info[] and the func_info when whole subprograms are removed as dead code, but leaves env->exception_callback_subprog alone, so an exception callback declared through the exception_callback decl tag which sits behind a removed subprogram keeps its old index. jit_subprogs() then takes the exception callback from func[] at that index, which is past the end when the callback was the last subprogram, or another subprogram otherwise. Rebase the index along with the entries it refers to. Fixes: b9ae0c9dd0ac ("bpf: Add support for custom exception callbacks") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260925175244.1136329-4-daniel@iogearbox.net Signed-off-by: Sasha Levin commit 10c336564fff4fba166280230b7b874154021879 Author: Daniel Borkmann Date: Fri Sep 25 19:52:29 2026 +0200 bpf: Bound the number of indirect jump edges in a program [ Upstream commit 57f6eca2f63b46dc9526e040cb419321a5013564 ] Every gotox instruction gets its own copy of the jump table of the subprog containing it, and each distinct target in that table is a CFG successor of the instruction. The number of such edges is therefore the number of gotox instructions times the number of distinct targets, and neither factor is bounded by anything except the instruction limit. What is expensive is a BPF prog whose gotox instructions are themselves the targets, which makes the edge count quadratic. 1024 such gotox are already ~1e6 edges and about 4s of CPU to load. Bound the total across the program at BPF_COMPLEXITY_LIMIT_INSNS, aka the limit on the number of instructions the verifier processes. Progs with real switch statements are orders of magnitude below this. This bounds the edges only. Building the jump table of a gotox costs the number of entries of all insn array maps regardless of how many distinct targets they hold, which a later patch addresses separately. Fixes: 493d9e0d6083 ("bpf, x86: add support for indirect jumps") Reported-by: STAR Labs SG Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Anton Protopopov Link: https://patch.msgid.link/20260925175244.1136329-3-daniel@iogearbox.net Signed-off-by: Sasha Levin commit 52d22cb53e0ec27c898e5921f6bab93df69d65ee Author: Daniel Borkmann Date: Fri Sep 25 19:52:28 2026 +0200 bpf: Avoid quadratic successor rescan in bpf_compute_scc [ Upstream commit 3852e19cb9547ffdf9e3fbf3c8decd2c78c85217 ] The iterative Tarjan DFS in bpf_compute_scc() emulates recursion with an explicit 'dfs' stack: when a successor has not been visited yet, the successor is pushed and the walk restarts at the top of the loop. On the way back to a vertex the successor scan starts over at index zero, so a vertex with k successors rescans up to k successors on each of its up to k descents, i.e. O(k^2) work. For ordinary instructions k <= 2 and this is irrelevant. For a gotox the successors are the jump table of the containing subprogram, whose size is bounded only by the max_entries of the insn_array map, so k can reach the 1M instruction complexity limit. Loading such a program keeps a CPU busy in the loop for a very long time before verification even begins. Record in 'dfs_pos' the successor index each frame stopped at and resume the scan there. Each edge is therefore examined a bounded number of times and the walk becomes linear in the number of edges. Fixes: 493d9e0d6083 ("bpf, x86: add support for indirect jumps") Reported-by: STAR Labs SG Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Eduard Zingerman Link: https://patch.msgid.link/20260925175244.1136329-2-daniel@iogearbox.net Signed-off-by: Sasha Levin commit 9511d8d538e58113460525205d515ec53f897f55 Author: Vinayak Katoch Date: Tue Sep 8 12:23:01 2026 +0530 arm64: dts: qcom: agatti: Add memory-region for audio PD [ Upstream commit 3fbf3b85bf861e1f4eb32312a1e3f22ffc8e6ca1 ] Reserve memory region for audio PD dynamic loading and remote heap requirements. Add the required VMID list for memory ownership transfers. Fixes: 851d5ae6003b ("arm64: dts: qcom: agatti: enable FastRPC on the ADSP") Tested-by: Christopher Obbard Reviewed-by: Ekansh Gupta Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Signed-off-by: Vinayak Katoch Link: https://lore.kernel.org/r/20260807-agatti-audio-v2-1-3959b1ab8059@oss.qualcomm.com Link: https://patch.msgid.link/20260908-agatti-audio-v4-1-b3db91d3fdec@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit d34effac539bb5cd287c21d9bbe5705033df883f Author: Aaron Kling Date: Sat Aug 29 14:35:31 2026 -0500 dt-bindings: vendor-prefixes: Add Retroid Pocket [ Upstream commit ea55bba4c68a49fcb527da6c71dd48879b705fd1 ] Add an entry for Retroid Pocket (https://www.goretroid.com/) Acked-by: Krzysztof Kozlowski Signed-off-by: Aaron Kling Link: https://patch.msgid.link/20260829-rp-qcs8550-v3-1-198d5b2fc475@gmail.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 2146f2cc51635e3cc2dd375be4919bd5e4a09933 Author: Adam Skladowski Date: Fri Aug 21 14:27:00 2026 +0200 dt-bindings: vendor-prefixes: Add LeEco [ Upstream commit 1658af4d25bd3133d1b3403ccdda6214d40c0ebb ] Add vendor prefix for now dead ecosystem company LeEco Signed-off-by: Adam Skladowski Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260821-next-patches-v5-1-ec81cee63e09@gmail.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 727f9d672d28dcd2d35a0320f62a070604ec0788 Author: Dmitry Baryshkov Date: Mon Aug 10 12:01:52 2026 +0300 ARM: dts: qcom: msm8974: add MDSS reset [ Upstream commit 542991a1d77e5fea5263c2406773a0cd09a8ec48 ] Commit 13a4b7fb6260 ("pmdomain: core: Leave powered-on genpds on until late_initcall_sync") kept power-domains on longer during boot which is causing DSI clock to get stuck and fail to acquire its configuration on DSI bringup. Follow the example of other platforms and add MDSS reset to the display subsystem node, fixing DSI issues. Fixes: 5a9fc531f6ec ("ARM: dts: msm8974: add display support") Suggested-by: Stephan Gerhold Signed-off-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260810-msm8974-mmcc-fix-v2-1-5c787d79c0fa@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit db78afab07e2b432c307623bf6a8c602b36b1df9 Author: Mohd Ayaan Anwar Date: Tue Aug 4 00:58:02 2026 +0530 arm64: dts: qcom: qcs8300-ride: fix SerDes PHY regulator supplies [ Upstream commit e55080f068f3f6b733235fd7618c12e61744244b ] The SerDes PHY node was configured with 'phy-supply = <&vreg_l5a>', which only covered the 1.2V rail. The 0.9V rail (vreg_l4a) was missing entirely. Replace phy-supply with the two named properties vdda-0p9-supply (vreg_l4a) and vdda-1p2-supply (vreg_l5a). Fixes: 787cb3b4c434 ("arm64: dts: qcom: qcs8300-ride: enable ethernet0") Signed-off-by: Mohd Ayaan Anwar Reviewed-by: Bartosz Golaszewski Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260804-b4-sgmiieth_serdes_regulator-v2-6-c4bc688177dd@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 8ed82e10f01aaa9cf34531acf40f8977990a714e Author: Mohd Ayaan Anwar Date: Tue Aug 4 00:58:01 2026 +0530 arm64: dts: qcom: monaco-evk: fix SerDes PHY regulator supplies [ Upstream commit de7bc562fc363421902db7bdda8e347cc78a5173 ] The SerDes PHY node was configured with 'phy-supply = <&vreg_l4a>', which only described one of the two supplies the hardware requires. While vreg_l4a is the correct 0.9V rail, the 1.2V rail (vreg_l5a) was missing entirely. Replace phy-supply with the two named properties vdda-0p9-supply (vreg_l4a) and vdda-1p2-supply (vreg_l5a). Fixes: 117d6bc9326b ("arm64: dts: qcom: qcs8300: Add Monaco EVK board") Signed-off-by: Mohd Ayaan Anwar Reviewed-by: Bartosz Golaszewski Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260804-b4-sgmiieth_serdes_regulator-v2-5-c4bc688177dd@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 47bab13edd4c8d6838002748b678f06415798dfc Author: Mohd Ayaan Anwar Date: Tue Aug 4 00:58:00 2026 +0530 arm64: dts: qcom: lemans-ride-common: fix SerDes PHY regulator supplies [ Upstream commit 0d567fb7def9564d15c334ec0fa5f5f6a0114ffa ] Both SerDes PHY nodes were configured with 'phy-supply = <&vreg_l5a>', which was incorrect on two counts: vreg_l5a is not a supply the PHY requires, and only one rail was described where the hardware needs two. The PHY requires vdda-0p9 (vreg_l4a) and vdda-1p2 (vreg_l1c). Replace the incorrect phy-supply with these two named properties on both nodes. Fixes: 5ef26fb8b3ed ("arm64: dts: qcom: sa8775p-ride: enable the SerDes PHY") Signed-off-by: Mohd Ayaan Anwar Reviewed-by: Bartosz Golaszewski Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260804-b4-sgmiieth_serdes_regulator-v2-4-c4bc688177dd@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 3030cda7eaac5e97527bea59a7ff40dc537492cc Author: Mohd Ayaan Anwar Date: Tue Aug 4 00:57:59 2026 +0530 arm64: dts: qcom: lemans-evk: fix SerDes PHY regulator supplies [ Upstream commit 457cf65a7997e398d8d6cef08601b4ea61b58e38 ] The SerDes PHY nodes were configured with 'phy-supply = <&vreg_l5a>', which was incorrect on two counts: vreg_l5a is not a supply the PHY requires, and only one rail was described whereas the hardware needs two. The PHY requires vdda-0p9 (vreg_l4a) and vdda-1p2 (vreg_l1c). Replace the incorrect phy-supply with these two named properties on both the base EVK node and the IFP mezzanine overlay. Fixes: 71ee90ed1756 ("arm64: dts: qcom: lemans-evk: Enable 2.5G Ethernet interface") Signed-off-by: Mohd Ayaan Anwar Reviewed-by: Bartosz Golaszewski Tested-by: Bartosz Golaszewski Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260804-b4-sgmiieth_serdes_regulator-v2-3-c4bc688177dd@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit e701e30d02a21c16cdb26e189e89ea9249e24ec8 Author: Andrei Vagin Date: Fri Sep 25 16:24:51 2026 +0000 x86/fpu: Fix potential underflow in xstate_calculate_size() [ Upstream commit f1751b220bc8a9bd2dc38ecf61f5c29f3826ace0 ] xstate_calculate_size() calculates the size required for a given set of xfeatures. It determines the topmost feature by finding the most significant bit in xfeatures using fls64(xfeatures) - 1. If xfeatures is 0, fls64(0) returns 0, and topmost becomes -1. Previously, topmost was unsigned int, so -1 underflowed to UINT_MAX. This caused the subsequent check `topmost <= XFEATURE_SSE` to fail, and the code proceeded to access xstate arrays using topmost (UINT_MAX) as an index, leading to an out-of-bounds access. [ bp: Remove text explaining what the patch does. ] Fixes: d6d6d50f1e80 ("x86/fpu/xstate: Consolidate size calculations") Signed-off-by: Andrei Vagin Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Alexander Mikhalitsyn Reviewed-by: Chang S. Bae Link: https://patch.msgid.link/20260925162454.1403405-6-avagin@google.com Signed-off-by: Sasha Levin commit b57bb1f1df39aa175cbfc68b86a4d00249ac1390 Author: Bruno Produit Date: Mon Sep 21 17:37:29 2026 +0200 hfs/hfsplus: serialize B-tree close against folio release [ Upstream commit dce0e0248205bb3dc5b4c6793cd2ecb453152259 ] B-tree nodes with a zero reference count remain in the node hash until folio reclaim or tree teardown frees them. The folio release callbacks remove nodes while holding hash_lock, but hfs_btree_close() walks and frees the same hash without that lock. Reclaim can therefore unhash and free a node after close has loaded its pointer, causing a use-after-free or double-free. The following syzkaller crashes seem to be the same UAF in {hfs,hfsplus}_btree_close() (or {hfs,hfsplus}_bnode_unhash()) and follow the same pattern, but do not contain a reproducer to confirm. Detach each node with hfs_bnode_unhash() while holding hash_lock before inspecting and freeing it. Drop the lock before hfs_bnode_free() so a large tree is not freed while holding a spinlock. Apply the same fix to the matching HFS+ implementation. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: syzbot+d729df28d933979e017a@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d729df28d933979e017a Reported-by: syzbot+2eac7d175baf21e6a5d5@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=2eac7d175baf21e6a5d5 Reported-by: syzbot+7155b2fe09e033c91381@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=7155b2fe09e033c91381 Reported-by: syzbot+adeb387cede15eb11607@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=adeb387cede15eb11607 Reported-by: syzbot+ae7f2423f3648100506d@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=ae7f2423f3648100506d Assisted-by: Codex:gpt-5.6-sol Reported-by: Kyle Zeng Signed-off-by: Kyle Zeng Signed-off-by: Bruno Produit Reviewed-by: Viacheslav Dubeyko Tested-by: Viacheslav Dubeyko Link: https://lore.kernel.org/r/20260921153729.600313-1-bruno.produit@trailofbits.com Signed-off-by: Viacheslav Dubeyko Signed-off-by: Sasha Levin commit 424d52e3b1137c87c0290956d20c882b6b9fe5b1 Author: Paul Sajna Date: Sun Aug 2 12:06:42 2026 -0700 arm64: dts: qcom: sdm845-lg: fix sdcard pinctrl nodes [ Upstream commit e57d572ed779eb53e7eb5b8f9546731eff21bc93 ] sdcard was previously rather unreliable during boot on sdm845-lg-judyln Identified and applied correct settings from downstream lineageos kernel. Verified card was properly detected over 5 reboots with rootfs on sdcard. Refer to downstream: https://github.com/LineageOS/android_kernel_lge_sdm845/blob/efa8458f79dffeb380d43b38b9403407f87d9f05/arch/arm64/boot/dts/qcom/sdm845-pinctrl.dtsi#L148-L303 Fixes: 28ae8aa3923c ("arm64: dts: qcom: add device tree for LG G7 and LG V35") Signed-off-by: Paul Sajna Reviewed-by: David Heidelberg Reviewed-by: Konrad Dybcio Link: https://patch.msgid.link/20260802-judyln-sdcard-fix-v1-1-b3477cfc42cc@postmarketos.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit df7541a4eaf0f9a6b52daadcea1ee2510f6125b2 Author: Aaron Kling Date: Mon Jul 27 19:20:09 2026 -0500 dt-bindings: vendor-prefixes: Add Chip Wealth Technology [ Upstream commit 058ee00216a1356e710446b59a800065d2abbd80 ] Add an entry for Chip Wealth Technology (https://www.chipwealth.com/) Signed-off-by: Aaron Kling Link: https://patch.msgid.link/20260727-ayn-qcs8550-v9-1-e3db456e10e5@gmail.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit e7af189268b30bb035313bba253cd3efaca0e318 Author: bui duc phuc Date: Thu Sep 3 11:52:01 2026 +0700 ASoC: mediatek: mt8183: Fix APLL enable error handling [ Upstream commit 30cf48383006579d7cd35380cc6e766260b72bff ] Currently, the mt8183_apll*_enable() functions call mux_setting(afe, true) but do not check its return value to handle failures. In addition, the cleanup paths of mt8183_apll*_enable() do not call mux_setting(afe, false) when the enable operation fails, while the mt8183_apll*_disable() functions do. Add error handling for apll*_mux_setting() and call mux_setting(afe, false) in the cleanup paths when mt8183_apll*_enable() fails. Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver") Reviewed-by: Cezary Rojewski Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903045203.175337-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5e0476861bfb3c706c4b3d3cf0b28632e6842185 Author: bui duc phuc Date: Thu Sep 3 11:52:00 2026 +0700 ASoC: mediatek: mt8183: Fix clock handling in mux disable path [ Upstream commit 4a0f9566ae0c3ad32620254342b266f37f4757de ] In the disable path of the appl*_mux_setting() functions, clk_disable_unprepare() is called after clk_set_parent(). If clk_set_parent() fails, clk_disable_unprepare() is skipped, potentially leaving one of the clocks enabled. Remove the goto exit paths so that all teardown steps are attempted and any errors are only reported. Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver") Suggested-by: Cezary Rojewski Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/20260903045203.175337-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9ba71cb7b0a0156913998446e8d166c14921cae7 Author: bui duc phuc Date: Thu Sep 3 11:51:59 2026 +0700 ASoC: mediatek: mt8183: Fix wrong clock cleanup on clk_set_parent() failure [ Upstream commit 7f05596bd4047e4623eeb1f3c6921d6f71481c3b ] In mt8183_afe_enable_clock(), when clk_set_parent() fails, the current error path incorrectly cleans up the previously enabled clock instead of the clock used by clk_set_parent(). Fix the error path to clean up the correct clock when clk_set_parent() fails. Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver") Reviewed-by: Cezary Rojewski Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903045203.175337-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit fc55875984309ff9eee69056774d076ca0d5f647 Author: Sudeep Holla Date: Tue Sep 22 15:43:01 2026 +0100 ACPI: PCC: Free channel on OpRegion deactivation [ Upstream commit fa9c7ee692988edddc1da74bc5257d53dd3c7130 ] ACPICA calls the address space setup callback with ACPI_REGION_DEACTIVATE when a PCC OperationRegion is torn down. The PCC setup callback currently allocates a fresh pcc_data and requests the mailbox channel before looking at the function argument. If ACPICA deactivates a region, this can leave the existing region context and mailbox channel unreleased, and may also request a channel during teardown. Handle ACPI_REGION_DEACTIVATE before allocation. Free the PCC mailbox channel, release the region context and clear the context pointer. Fixes: 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype") Reviewed-by: Huisong Li Signed-off-by: Sudeep Holla Link: https://patch.msgid.link/20260922144302.3847593-4-sudeep.holla@kernel.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 22411b18d2c14b798b91da9596a2e69e269b6808 Author: Sudeep Holla Date: Tue Sep 22 15:43:00 2026 +0100 ACPI: PCC: Preserve shared memory signature in OpRegion handler [ Upstream commit 46c263c213876bdc2297ef61aa90f0b210ebac73 ] ACPI 6.3 introduced PCC OperationRegions. Section 5.5.2.4.7.3, "Declaring message fields within a PCC OperationRegion", states that, for all PCC subspace types, the PCC Operation Region pertains to the region of PCC subspace that succeeds the PCC signature. Its length therefore excludes the 4-byte signature. The PCC address space handler currently copies the OperationRegion buffer to and from the start of the shared memory. This overwrites or exposes the platform-populated signature and omits the final four bytes of the OperationRegion. Offset the copies by the size of the signature and reject an OperationRegion that does not fit in the remaining shared memory. The example added by commit 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype") incorrectly included the signature as an OperationRegion field. A Type 3 OperationRegion containing a 100-byte communication area is declared as follows: OperationRegion (PFRM, PCC, 2, 0x70) Field (PFRM, ByteAcc, NoLock, Preserve) { FLGS, 32, LEN, 32, CMD, 32, DATA, 800 } This contains three 32-bit fields followed by a 100-byte DATA field. The fields correspond to the Type 3 shared memory layout in ACPI 6.3, Table 14-372, after excluding its 4-byte signature. Fixes: 77e2a04745ff ("ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype") Reviewed-by: Huisong Li Signed-off-by: Sudeep Holla Link: https://patch.msgid.link/20260922144302.3847593-3-sudeep.holla@kernel.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit a0bfb657af2b778a8e5110147568fb04d90ef607 Author: Arnaldo Carvalho de Melo Date: Thu Sep 24 16:27:56 2026 -0300 perf annotate-data: Resolve type DIEs in the debug file they came from [ Upstream commit 14ca0a28de37849afdda6ffd4c9047f58d8906c2 ] 'perf report -s type' hangs burning CPU on the dwz compressed debug info of libz.so.1 (zlib-ng): die_collect_vars() saves the dwarf_dieoffset() of the type DIE, which is relative to the file it lives in - the dwz alt file for the types shared by more than one CU - and update_var_state() resolves that offset in the main debug file, parsing whatever is at it, here a typedef whose DW_AT_type refers to itself. Record whether the type DIE came from the alt file and resolve the offset with die_get_type_die() in that file, with no fallback. Fixes: 06b2ce75386df04b ("perf annotate-data: Maintain variable type info") Fixes: 55ee3d005d62279d ("perf annotate-data: Add a cache for global variable types") Reviewed-by: Ian Rogers Reviewed-by: Namhyung Kim Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 29a721c00d96f1fdc8cd13ce6a142853bb628cf2 Author: Arnaldo Carvalho de Melo Date: Thu Sep 24 16:27:56 2026 -0300 perf dwarf-aux: Add die_same_file() and die_get_type_die() [ Upstream commit 3dfdd195c7e45f5a6b85dd2b6e3722610dbd5bf5 ] dwarf_dieoffset() is relative to the file the DIE is in, so an offset saved by die_collect_vars()/die_collect_global_vars() is only meaningful in that file: add die_same_file(), comparing the Dwarf each DIE's CU belongs to, and die_get_type_die(), resolving the offset in it with the saved tag as a sanity check. Resolving the offset in the main file instead parses whatever is at it when it came from the dwz common file. dwarf_cu_getdwarf() is new in elfutils 0.160, so the libdw feature test probes for it and Makefile.config says 0.160. Reviewed-by: Ian Rogers Reviewed-by: Namhyung Kim Cc: Masami Hiramatsu Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit ff4f1b38883c51c08b1fde536d48feb5b9f6b5e7 Author: Sudeep Holla Date: Tue Sep 22 15:42:59 2026 +0100 ACPICA: Fix PCC OperationRegion command offsets [ Upstream commit 888dab4b04ea8725168c6d50d0bfb8057fccca18 ] ACPI 6.3, section 5.5.2.4.7.3, states that the PCC Operation Region is associated with the region of shared memory that follows the PCC signature. The generic and extended PCC shared memory layouts include the 4-byte signature at offset 0, so their raw shared memory COMMAND fields are at offsets 4 and 12 respectively. Since AML field offsets for the PCC OperationRegion are relative to the region after that signature, ACPICA must look for those COMMAND fields at OperationRegion offsets 0 and 8. Adjust the generic and master subspace command checks to use those OperationRegion-relative offsets. Otherwise writes to the COMMAND field can fail to invoke the PCC address space handler at the offset described by the PCC OperationRegion definition. Link: https://github.com/open-acpica/acpica/pull/1205 Fixes: aa6ec56b574d ("ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter") Signed-off-by: Sudeep Holla [ rjw: Fixed the Fixes: tag ] Link: https://patch.msgid.link/20260922144302.3847593-2-sudeep.holla@kernel.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 9e19ca7b34b854e438b2f714057a288ae9601c1f Author: Breno Leitao Date: Fri Sep 25 07:35:10 2026 -0700 ACPICA: Fix memory leak in acpi_ds_create_field() [ Upstream commit dbb3d99ee95c32711950850ddd33eb22a6042eb2 ] acpi_ds_create_field() allocates internal_pcc_buffer for operation regions in the PCC address space. The function runs once per field, so a second field on the same region overwrites the pointer and orphans the previous buffer. The matching ACPI_FREE() in acpi_ut_delete_internal_obj() only ever sees the last one. An arm64 platform whose SSDT declares regions with multiple fields each leaks two buffers at boot, as detected by kmemleak: unreferenced object 0xffff000051e65400 (size 192): comm "swapper/0", pid 1, jiffies 4294668436 backtrace (crc 0): __kmalloc_noprof acpi_ds_create_field acpi_ds_load2_end_op acpi_ds_exec_end_op acpi_ps_parse_loop acpi_ps_parse_aml acpi_ns_load_table acpi_load_tables acpi_init Do not allocate a region if it was previously allocated before, preserving the current design, but, not leaking memory. Fixes: aa6ec56b574d ("ACPICA: ACPI 6.3: add PCC operation region support for AML interpreter") Link: https://github.com/open-acpica/acpica/commit/c71849d476bb5f97ca1867849e893368e12a69e6 Signed-off-by: Breno Leitao [ rjw: Subject tweak, fixed the Fixes: tag ] Link: https://patch.msgid.link/20260925-acpica-pcc-field-leak-v2-1-e37008e715af@debian.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 95794fa29cc9440d153bb27342be3e9c764c7af6 Author: Arnaldo Carvalho de Melo Date: Fri Sep 25 12:21:37 2026 -0300 perf test workload: Use unsigned int in code_with_type instead of uint [ Upstream commit 66fcf1357a26d9cf8c7e34e2a70d12ebd7bd538f ] The declaration of the Rust helper test_rs() uses "uint", a BSD-ism that lives in , so on glibc it is only visible by accident: glibc's includes , where uint is exposed under __USE_MISC, which is on by default. musl does none of that: its doesn't include and it typedefs uint there only when _GNU_SOURCE/_BSD_SOURCE is defined, while nothing else in this translation unit includes . Building it on Alpine therefore fails with: tests/workloads/code_with_type.c:9:21: error: unknown type name 'uint'; did you mean 'int'? tests/workloads/code_with_type.c:39:17: error: implicit declaration of function 'test_rs' [-Wimplicit-function-declaration] The second error is a consequence of the first one: with the declaration at line 9 rejected, the call at line 39 has no prototype, which is an error since gcc 14. The breakage is only visible when rustc is present, because tests/workloads/Build adds code_with_type.o when CONFIG_RUST_SUPPORT is detected, and tools/build/feature only checks for "rustc --version". That is why alpine:3.23 and alpine:3.24 fail while alpine:3.22 and alpine:edge, lacking rustc, build fine and hide it. Use unsigned int, which needs no header at all. Fixes: 2e05bb52a12d3 ("perf test workload: Add code_with_type test workload") Reviewed-by: Ian Rogers Acked-by: Namhyung Kim Cc: Dmitrii Dolgov <9erthalion6@gmail.com> Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 52d18aa43c61e5ae964b083cef6d6cda3a9b38f5 Author: Abel Vesa Date: Thu Sep 24 13:39:25 2026 +0300 dt-bindings: clock: qcom: sm8750-gcc: Add CX power domain [ Upstream commit f9c74b6ed57922b1fdb1ed6835665e06b5ba01a5 ] The GDSCs provided by the SM8750 and Kaanapali GCCs are supplied by the RPMh CX power domain. Model that parent domain in the GCC binding so the provider can describe the dependency in devicetree. Add a single CX power-domain entry to the binding and make it required. Without this dependency, GCC GDSC consumers cannot vote for CX and RPMh may undervolt it. Fixes: 342d2a607450 ("dt-bindings: clock: qcom: Add Kaanapali Global clock controller") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260924-qcom-tie-cx-to-gcc-v5-9-38732033e5b5@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit a00811307787e6637f5c3e75b01b1eb96f0760f8 Author: Xin Yin Date: Thu Sep 24 14:54:43 2026 +0800 writeback: size foreign flushes by target wb dirty pages [ Upstream commit 168a8c13159c6e3f0f08da6f8fa2f633a91ba9fd ] Foreign dirty tracking records the bdi and wb memcg IDs of recently dirtied foreign inodes. When the source memcg needs foreign writeback, mem_cgroup_flush_foreign() queues WB_REASON_FOREIGN_FLUSH to the recorded target bdi_writeback. cgroup_writeback_by_id() currently sizes this best-effort work from the target memcg's NR_FILE_DIRTY counter. The work is scoped to one target wb, so a memcg-wide dirty count can over-size a single-bdi flush when the target memcg has dirty pages on other devices. It can also under-size the flush when the target wb has dirty pages charged to other memcgs. Over-sizing keeps the target wb busy longer and can delay later writeback work. Under-sizing can finish before enough pages are written back for the source memcg. Use the target wb's WB_RECLAIMABLE counter and keep the existing 25% headroom. This keeps the budget aligned with the writeback object being queued. Fixes: 97b27821b485 ("writeback, memcg: Implement foreign dirty flushing") Reviewed-by: Jan Kara Acked-by: Tejun Heo Signed-off-by: Xin Yin Link: https://patch.msgid.link/20260924065443.1650126-1-yinxin.x@bytedance.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit c01db9560b6109e8d202ea72bddb0c58c341698d Author: Pardeep Kaur Date: Wed Aug 19 11:02:40 2026 +0530 wifi: ath12k: fix out-of-bounds access on TX stats arrays [ Upstream commit c8f83d3389d1d1b318ac3bd2ae3d60c2862c90b4 ] The fw_tx_status[], tx_wbm_rel_source[], and tqm_rel_reason[] arrays are indexed directly by values read from hardware without bounds checks. Values at or beyond MAX_FW_TX_STATUS, HAL_WBM_REL_SRC_MODULE_MAX, or MAX_TQM_RELEASE_REASON respectively would write past the end of the arrays causing memory corruption. Add likely() bounds checks before incrementing each counter. For tx_wbm_rel_source[] and tqm_rel_reason[], add WARN_ON_ONCE() on the out-of-bounds else branch. For fw_tx_status[], no WARN_ON_ONCE is added since the switch statement that follows already calls ath12k_warn() in its default: branch for unknown values, avoiding a double-warn. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6.r1-00402-QCAHKSWPL_SILICONZ-1 Fixes: c5c62287e690 ("wifi: ath12k: Add device dp stats support") Signed-off-by: Pardeep Kaur Reviewed-by: Rameshkumar Sundaram Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20260819053247.1420393-2-pardeep.kaur@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 4ce15d5502c380be9f747fda654c9858be1da4aa Author: Jeff Johnson Date: Mon Aug 17 16:46:34 2026 -0700 wifi: ath11k: fix reg_info_store leak in ath11k_service_ready_ext_event() [ Upstream commit 64828f091c7de5c1324427b140fb545f93ef073f ] Currently, while processing the WMI Service Ready Ext event, the iterator in ath11k_service_ready_ext_event() can dispatch the HAL Regulatory Capabilities handler ath11k_wmi_tlv_ext_soc_hal_reg_caps_parse() which can allocate ab->reg_info_store. If a subsequent failure occurs during iteration, the ab->reg_info_store allocation is leaked. Directly free and clear the pointer on the error path. Note that the normal cleanup function ath11k_reg_free() cannot be used since other regulatory-related fields are not yet populated at this point. Compile tested only. Fixes: 7004bdceef60 ("wifi: ath11k: store cur_regulatory_info for each radio") Assisted-by: Claude:claude-sonnet-4-6 Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20260817-reg_info_store-leak-v1-1-77025a99b074@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit dff59c14dcab55b660c7b88429dd9fb4ec38fd8f Author: Kang Yang Date: Wed Sep 16 14:03:25 2026 +0800 wifi: ath12k: avoid double DMA unmap of held monitor RX buffers [ Upstream commit febe1f8cbccc3434790bfc4d94d40c9dbd803065 ] ath12k_dp_cc_cleanup() assumes that every rx_desc_info entry with a non-NULL skb still has an active DMA mapping and therefore always calls dma_unmap_single() before freeing the skb. This assumption is not true for the monitor RX path. ath12k_wifi7_dp_rx_mon_mpdu_pop() may DMA-unmap a buffer and mark rxcb->unmapped before returning early to hold the MSDU for later reprocessing. In that state desc_info->skb remains populated, so module removal can trigger a second dma_unmap_single() from ath12k_dp_cc_cleanup(). IOMMU reports the issue as: dma_unmap_phys() dma_unmap_page_attrs() ath12k_dp_cc_cleanup() ath12k_dp_cmn_device_deinit() ath12k_core_stop() Skip dma_unmap_single() when rxcb->unmapped is already set and free the skb directly. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 72bfbf19b7da ("wifi: ath12k: add support to reap and process mon dest ring") Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260916060325.854-7-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 023df2c07566b1e6d0d4e63fb09233b4bef260ea Author: Kang Yang Date: Wed Sep 16 14:03:24 2026 +0800 wifi: ath12k: fix skb leak on monitor PPDU ID wraparound [ Upstream commit 97b144b82e2388efef1f78269626d61de0480feb ] ath12k_dp_mon_comp_ppduid() updates *ppdu_id and returns msdu_ppdu_id to indicate that a PPDU transition was detected. When PPDU IDs wrap around, msdu_ppdu_id can be 0. In that case the function updates *ppdu_id but returns 0, causing ath12k_wifi7_dp_rx_mon_mpdu_pop() to interpret the result as "no PPDU update" and continue processing the MPDU. The MSDUs are then linked into head_msdu while their RX descriptors have already been detached. Later, ath12k_wifi7_dp_rx_mon_dest_process() detects the PPDU mismatch and exits with the partially built MSDU chain, leaking the SKBs. kmemleak reports the leak through: kmemleak_alloc() __netdev_alloc_skb() ath12k_dp_rx_bufs_replenish() ath12k_wifi7_dp_rx_mon_dest_process() Fix this by returning a boolean value from ath12k_dp_mon_comp_ppduid() so the update notification is independent of the actual PPDU ID value. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 72bfbf19b7da ("wifi: ath12k: add support to reap and process mon dest ring") Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260916060325.854-6-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit ccabf8fb6a4b0bb5d7205b725d3e6c5cfd565d9d Author: Kang Yang Date: Wed Sep 16 14:03:23 2026 +0800 wifi: ath12k: place dp_mon_mpdu on stack in mon dst reap loop [ Upstream commit 8b1d2f4c3805b9f1bddd5dc3bd241edd1f9ab2d9 ] ath12k_wifi7_dp_rx_mon_dest_process() allocates a dp_mon_mpdu with kzalloc(GFP_ATOMIC) for each delivered MPDU. On allocation failure it breaks out of the reap loop without calling ath12k_hal_srng_dst_get_next_entry(), leaving the destination ring tail pointer parked on the current entry -- the same entry will be peek()ed on every subsequent NAPI schedule, stalling monitor RX until the mon_dest_ring_stuck_cnt recovery path resyncs the PPDU ID. The head_msdu chain accumulated for this iteration is also orphaned since the break bypasses both the delivery and the cleanup paths. kmemleak reports these skbs in field testing: kmemleak_alloc() __netdev_alloc_skb() ath12k_dp_rx_bufs_replenish() ath12k_wifi7_dp_rx_mon_dest_process() dp_mon_mpdu is used only within a single reap loop iteration and is passed synchronously to ath12k_wifi7_dp_mon_rx_deliver(); the callee does not retain the pointer. Place it on the stack instead of using kzalloc(GFP_ATOMIC). This eliminates the allocation failure path (and the ring stall it caused) and saves a kzalloc/kfree pair per delivered MPDU. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 72bfbf19b7da ("wifi: ath12k: add support to reap and process mon dest ring") Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260916060325.854-5-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit a5354898b32b2c368dcf09c7500410348ba70cee Author: Kang Yang Date: Wed Sep 16 14:03:22 2026 +0800 wifi: ath12k: fix stale tail_msdu pointer returned from mpdu_pop [ Upstream commit 1a10a558555072dba8510ded23a9174b2a00d079 ] ath12k_wifi7_dp_rx_mon_mpdu_pop() assigns *tail_msdu from the loop cursor msdu at function exit. That cursor reflects the state of the last msdu_list entry processed, not the end of the accumulated MSDU chain: on next_msdu paths (invalid skb, drop_mpdu, first-MSDU rx_desc invalid) it is set to NULL, and on the set_pktlen failure path it becomes a dangling pointer to a freed skb. When these occur on the final iteration, callers see head_msdu populated with a valid chain while tail_msdu is NULL or points to freed memory. The chain end is already tracked by the local variable last, which is updated only after each MSDU has been validated and linked. Use it as the source for tail_msdu so head_msdu and tail_msdu are either both NULL or both point into the same live chain. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 72bfbf19b7da ("wifi: ath12k: add support to reap and process mon dest ring") Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260916060325.854-4-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 447f3d8ac0dbd565435535cc67ec3584d28a70f6 Author: Kang Yang Date: Wed Sep 16 14:03:21 2026 +0800 wifi: ath12k: free pending MSDUs on duplicate mon link descriptor [ Upstream commit d8e8eac3fcffc114a79f7d07d7cb73cc16645381 ] ath12k_wifi7_dp_rx_mon_mpdu_pop() aborts processing when a duplicate monitor link descriptor is detected. Previous iterations may already have linked MSDUs onto *head_msdu and detached the corresponding RX buffers from their descriptors. Returning without completing or freeing the chain leaves those skbs orphaned, resulting in a memory leak. kmemleak reports these skbs in field testing: kmemleak_alloc() __netdev_alloc_skb() ath12k_dp_rx_bufs_replenish() ath12k_wifi7_dp_rx_mon_dest_process() Free the accumulated MSDU chain before returning and clear *head_msdu so callers observe a consistent state. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 72bfbf19b7da ("wifi: ath12k: add support to reap and process mon dest ring") Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260916060325.854-3-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 15fd492671f4776bb1065e549cb7932851554a07 Author: Kang Yang Date: Wed Sep 16 14:03:20 2026 +0800 wifi: ath12k: fix skb leak on paddr mismatch in wifi7 mon RX pop [ Upstream commit 4dfe8e3ac731c3372b5c1f1f73b0676c301c3916 ] When rxcb->paddr does not match the MSDU-list paddr reported by the link descriptor, ath12k_wifi7_dp_rx_mon_mpdu_pop() sets drop_mpdu = true and continues to the next MSDU. At that point the skb is still attached to the descriptor via desc_info->skb; the local msdu variable only holds a copy of that pointer. The continue skips the rest of the loop body, which would normally DMA-unmap the buffer, free the skb, clear desc_info->skb, and append the descriptor to used_list in the next_msdu block. The descriptor therefore stays in_use with the skb attached forever. The skb is never DMA-unmapped, delivered, freed or replaced, and HW does not write into it either because the descriptor is no longer posted to any SRNG. The descriptor is also never returned to used_list, so ath12k_dp_rx_bufs_replenish() cannot allocate a fresh buffer for it and the RX refill ring gradually drains. The skb is still reachable via dp->rxbaddr[][].skb and is reclaimed at teardown by ath12k_dp_cc_cleanup(), so this is not a kmemleak-style unreachable leak. Nevertheless, both the descriptor slot and the skb memory are wasted for the module lifetime, and under sustained mismatches monitor RX stalls. Remove the continue so drop_mpdu remains true, execution reaches the DMA unmap and dev_kfree_skb_any() below, and the descriptor is returned to used_list via the next_msdu block for replenish. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 72bfbf19b7da ("wifi: ath12k: add support to reap and process mon dest ring") Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Reviewed-by: Vasanthakumar Thiagarajan Link: https://patch.msgid.link/20260916060325.854-2-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit febeaa22ec3dc14c7e4a8dcb8d5f35c394edfa6b Author: Arnd Bergmann Date: Fri Sep 25 15:11:27 2026 +0200 ASoC: amd: acp: add EFI dependency for selecting TAS2783 [ Upstream commit 4d2b92b82ee82f0008179cd795b02256144064e1 ] The TAS2783 codec requires EFI support, so it cannot be selected unless that is also enabled: WARNING: unmet direct dependencies detected for SND_SOC_TAS2783_SDW Depends on [n]: SOUND [=m] && SND [=m] && SND_SOC [=m] && SOUNDWIRE [=m] && SND_SOC_SDCA [=m] && EFI [=n] Selected by [m]: - SND_SOC_AMD_LEGACY_SDW_MACH [=m] && SOUND [=m] && SND [=m] && SND_SOC [=m] && SND_SOC_AMD_ACP_COMMON [=m] && X86 [=y] && PCI [=y] && ACPI [=y] && SOUNDWIRE [=m] Add this as a dependency for SND_SOC_AMD_LEGACY_SDW_MACH, assuming that this is only needed on modern x86 machines that require EFI support already. It would likely be possible to do something more complex to still allow SND_SOC_AMD_LEGACY_SDW_MACH to be used without TAS2783 when EFI is disabled, but I cannot see a usecase for that. Fixes: 28114992dd2f ("ASoC: amd: acp: enable TAS2783 and add RT712-VB SoundWire machine") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20260925131137.146638-1-arnd@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 2c9890b904bc02742927902c49054f48dd5977b6 Author: Abel Vesa Date: Thu Sep 24 14:47:01 2026 +0300 clk: qcom: gcc-qcs615: Fix GCC_CPUSS_GNOC_CBCR offset [ Upstream commit 51ff9ffa18758c465a1a67ca36a78c2a8a5f3b2e ] According to the documentation, the offset GCC_CPUSS_GNOC_CBCR is 0x48004. Drop the extra zero, otherwise we land outside of regmap range. Fixes: 39d6dcf67fe9 ("clk: qcom: gcc: Add support for QCS615 GCC clocks") Reviewed-by: Imran Shaik Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260924-clk-qcom-gcc-qcs615-fix-cpuss-gnoc-offset-v2-1-67275f94aaec@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit f1ce933dffb4e051a41e66bc77eb022d9d0fce5b Author: Qingfang Deng Date: Mon Sep 21 09:49:20 2026 +0800 mtd: block: prevent reclaim I/O during request processing [ Upstream commit d498b2ddda99eed28cde177b1620dbcea246a1c4 ] The blktrans request callbacks run under dev->lock and may allocate memory with GFP_KERNEL. For example, mtdblock_writesect() uses vmalloc() to allocate its eraseblock cache. Direct reclaim can then recurse into block I/O and deadlock on resources held by the request being processed. syzbot reports a circular locking dependency involving the device mutex and fs_reclaim. Commit d5ba1c8ffd0b ("mtd: don't use PF_MEMALLOC") removed PF_MEMALLOC from the MTD request thread. That flag had prevented direct reclaim, so its removal made allocations during request processing eligible for reclaim without excluding I/O. Wrap request processing in mtd_queue_rq() in a NOIO scope. This covers both the request and background callbacks, including allocations made by lower MTD drivers, and prevents reclaim from initiating filesystem or block I/O. Fixes: d5ba1c8ffd0b ("mtd: don't use PF_MEMALLOC") Assisted-by: Codex:gpt-6-astra Reported-by: syzbot+e08e0a15269eefa87790@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e08e0a15269eefa87790 Signed-off-by: Qingfang Deng Signed-off-by: Miquel Raynal Signed-off-by: Sasha Levin commit 9bc069d90aff991d836187d373f103ed5f5d9c07 Author: Nia Su Date: Wed Sep 9 19:31:52 2026 -0700 perf evlist: Don't restrict uncore events to PMU CPUs [ Upstream commit aa9265d5073cb01b89f31ae030442873d4a259d3 ] The PMU CPU map has different semantics for core and uncore PMUs. For core PMUs, pmu_cpus contains the CPUs on which the event can be opened. Intersect the user-requested CPU map with the PMU CPU map to reject CPUs unsupported by the PMU. For uncore PMUs, pmu_cpus is read from the PMU's cpumask sysfs attribute, which lists the default CPU to open the event on per socket/die, not the set of CPUs it can only be opened on. The user-requested CPU may override these defaults, and the driver can redirect the event to the appropriate control CPU. Currently, __perf_evlist__propagate_maps() intersects the user-requested CPU map with pmu_cpus for all PMUs. If the user-requested CPU is not in pmu_cpus, the intersection becomes empty and the evsel is removed before perf_event_open() is called. Add evsel->is_pmu_uncore, set once from pmu->is_uncore at parse time, to skip the intersection for uncore PMUs. Core PMUs, and other non-core PMUs such as software events, breakpoints, or tracepoints, continue to be restricted to their PMU CPU map. Fixes: 811082e4b668db96 ("perf parse-events: Support user CPUs mixed with threads/processes") Reviewed-by: Ian Rogers Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Nia Su Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 8ea7d6fd166a18400748d98f543cd2d9ae7768db Author: Jiebin Sun Date: Fri Aug 21 13:56:09 2026 +0800 perf tests c2c: Report skip when the workload fails [ Upstream commit f4a58c7164957e73df36ed24c42b0b9b713a43b3 ] The workload path leaves err at 0 and returns, so the test exits 0 and is reported as a pass even though nothing was recorded and neither report invocation ran. The check_c2c_support() path above it already sets err=2. Set err=2 there as well so a failing workload is reported as a skip. Fixes: ac881007c4bf7be4 ("perf tests c2c: Add a basic c2c") Reviewed-by: Tianyou Li Reviewed-by: Wangyang Guo Signed-off-by: Jiebin Sun Acked-by: Namhyung Kim Cc: Dapeng Mi Cc: Ian Rogers Cc: James Clark Cc: Thomas Falcon Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 18a91cea21e40fd4ab87b29901795b6f0ca9c916 Author: Jiebin Sun Date: Fri Aug 21 13:56:08 2026 +0800 perf c2c: Fix documented default coalesce fields [ Upstream commit b36a6f180baad35a962677ae181681ca60dda35b ] The default coalesce fields dropped pid in favor of iaddr, but the man page still documents the old pid,iaddr default. Update it to match the command. Fixes: 423701a0c8d754d9 ("perf c2c: Change the default coalesce setup") Reviewed-by: Tianyou Li Reviewed-by: Wangyang Guo Signed-off-by: Jiebin Sun Acked-by: Namhyung Kim Cc: Dapeng Mi Cc: Ian Rogers Cc: James Clark Cc: Jiri Olsa Cc: Thomas Falcon Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 8c1586652b1db9e94755a33bb5b39061765fad52 Author: Muzaffer Kadir Date: Mon Sep 21 21:18:57 2026 +0300 dt-bindings: vendor-prefixes: Add General Mobile [ Upstream commit 7034bec693b752bcd7ebb4fa00dc3b429b4dc4f7 ] Add vendor prefix for General Mobile. Link: https://www.generalmobile.com Acked-by: Krzysztof Kozlowski Signed-off-by: Muzaffer Kadir Link: https://patch.msgid.link/20260921-msm8952-initial-support-v3-6-b96fd3fe298b@mainlining.org Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 55ae879af15c922f841dcf55c7bec5e9dbf37e1a Author: Abel Vesa Date: Tue Sep 22 10:51:22 2026 +0300 arm64: dts: qcom: x1p42100-thinkbook-16: Mark the EC reset gpio as reserved [ Upstream commit d15d83967b113e43a4811164ada19909d99c93a7 ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: d3f600dc452d ("arm64: dts: qcom: Add Lenovo ThinkBook 16 G7 QOY device tree") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-13-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 78f602314dba562b8f9d6631f05326db1aeb0b9b Author: Abel Vesa Date: Tue Sep 22 10:51:21 2026 +0300 arm64: dts: qcom: x1-hp-omnibook-x14: Mark the EC reset gpio as reserved [ Upstream commit 4ea8c5b790dd884bb5118336dfcb2c648cb40b2d ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: 6f18b8d4142c ("arm64: dts: qcom: x1e80100-hp-x14: dt for HP Omnibook X Laptop 14") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-12-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 453cc04c9c959a38e64ec6255cc5c05f7a40b34e Author: Abel Vesa Date: Tue Sep 22 10:51:20 2026 +0300 arm64: dts: qcom: x1-dell-thena: Mark the EC reset gpio as reserved [ Upstream commit 2c376a1b675075018c77d040ba1595db896a75f6 ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: e7733b42111c ("arm64: dts: qcom: Add support for Dell Inspiron 7441 / Latitude 7455") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-11-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit c695879ddc24966aa243022367d5d9fcadb6b483 Author: Abel Vesa Date: Tue Sep 22 10:51:19 2026 +0300 arm64: dts: qcom: x1-asus-zenbook-a14: Mark the EC reset gpio as reserved [ Upstream commit 48213677c9173680de328785768ea56315bfdd53 ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: 6516961352a1 ("arm64: dts: qcom: Add support for X1-based Asus Zenbook A14") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-10-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 5d416ef0b16876c5b3d1c9cbce3bd847cbb7eabe Author: Abel Vesa Date: Tue Sep 22 10:51:18 2026 +0300 arm64: dts: qcom: x1-asus-vivobook-s15: Mark the EC reset gpio as reserved [ Upstream commit 94a0d3a2595821878de98d495e89691f694a2083 ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: d0e2f8f62dff ("arm64: dts: qcom: Add device tree for ASUS Vivobook S 15") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-9-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit ed5f882322fb815a60a21c47301294c61c94f2cd Author: Abel Vesa Date: Tue Sep 22 10:51:17 2026 +0300 arm64: dts: qcom: x1e80100-qcp: Mark the EC reset gpio as reserved [ Upstream commit fd7d7b5d307f3a475e9555dfd89ff80cfae46b3c ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: af16b00578a7 ("arm64: dts: qcom: Add base X1E80100 dtsi and the QCP dts") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-8-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 76dc4c0b44d1f39a313a8c43204c5d0e84d5284c Author: Abel Vesa Date: Tue Sep 22 10:51:16 2026 +0300 arm64: dts: qcom: medion-sprchrgd-14-s1: Mark the EC reset gpio as reserved [ Upstream commit c1d21b09a46896a0bc57a5183128b6bf31d9e43e ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: 8cf65490cdb0 ("arm64: dts: qcom: Add dts for Medion SPRCHRGD 14 S1") Signed-off-by: Abel Vesa Reviewed-by: Georg Gottleuber Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-7-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 85ff774940748cee316d2ea458b13dd35d270998 Author: Abel Vesa Date: Tue Sep 22 10:51:15 2026 +0300 arm64: dts: qcom: x1e80100-yoga-slim7x: Mark the EC reset gpio as reserved [ Upstream commit a92ac66d35dfd8438b6e40bfb956ff69365798ac ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: 45247fe17db2 ("arm64: dts: qcom: x1e80100: add Lenovo Thinkpad Yoga slim 7x devicetree") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-6-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 15e8fb550f7ea3023750c72f3a75cf76fba3beac Author: Abel Vesa Date: Tue Sep 22 10:51:14 2026 +0300 arm64: dts: qcom: honor-magicbook-art-14: Mark the EC reset gpio as reserved [ Upstream commit fc29959413b0e9f7a7d4e1ffa02fa2465461a6f2 ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: 21b15fa5f8f4 ("arm64: dts: qcom: Add HONOR MagicBook Art 14 device tree") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-5-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 374e3d52fc002d4e81ecc4b661633f91fb72cc5f Author: Abel Vesa Date: Tue Sep 22 10:51:13 2026 +0300 arm64: dts: qcom: x1e80100-dell-xps13-9345: Mark the EC reset gpio as reserved [ Upstream commit 5630150c90db33df906d26cc4b6ff56315471352 ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: f5b788d0e8cd ("arm64: dts: qcom: Add support for X1-based Dell XPS 13 9345") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-4-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit f6fa2a051cf59324969a512a8a99a7c420feb0f6 Author: Abel Vesa Date: Tue Sep 22 10:51:12 2026 +0300 arm64: dts: qcom: x1e78100-t14s: Mark the EC reset gpio as reserved [ Upstream commit 07321595ce693eea5854120869a8b1560d7b14d6 ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: 7d1cbe2f4985 ("arm64: dts: qcom: Add X1E78100 ThinkPad T14s Gen 6") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-3-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 2c3a9e94892bf6f8f1347b8c4b88c318d7347a89 Author: Abel Vesa Date: Tue Sep 22 10:51:11 2026 +0300 arm64: dts: qcom: x1e001de-devkit: Mark the EC reset gpio as reserved [ Upstream commit 0297c8e98a054fc2a0afcb96114f57603a02594e ] GPIO 65 from TLMM is used by the embedded controller as its reset line. On some devices, toggling the embedded controller reset line makes the device not power up at all, unless the battery is unplugged. So reserve it in order to prevent Linux from requesting or reconfiguring it. Fixes: 7b8a31e82b87 ("arm64: dts: qcom: Add X1E001DE Snapdragon Devkit for Windows") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-2-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 1d21e165ac611e9fc0fe840ef9daf871e56b7666 Author: Abel Vesa Date: Tue Sep 22 10:51:10 2026 +0300 arm64: dts: qcom: x1-crd: Mark the EC reset gpio as reserved [ Upstream commit 099cd579fa73c142fde2f7e3ea473f334792a249 ] GPIO 65 from TLMM is connected to the embedded controller's active-high reset line. Asserting it causes the fans to run at full speed during reset and leaves the keyboard non-functional afterwards. Reserve it to prevent Linux from requesting or reconfiguring it. Fixes: bd50b1f5b6f3 ("arm64: dts: qcom: x1e80100: Add Compute Reference Device") Signed-off-by: Abel Vesa Link: https://patch.msgid.link/20260922-dts-qcom-hamoa-reserve-ec-reset-gpio-v3-1-fde7f8a53382@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 94097e79de552d5125664448ec139fe2ad595d95 Author: Charlie Garner Date: Thu Sep 24 00:55:06 2026 +0930 arm64: dts: qcom: x1e80100-dell-inspiron-14-plus-7441: fix touchscreen i2c address [ Upstream commit 52c679ecfd03312c585bfbfe1c7a0d3a9c25cf0e ] The touchscreen is at i2c address 0x09, not 0x10. Nothing responds at 0x10, so i2c_hid_of never probes and the panel does not work. tlmm pin 51, the touchscreen interrupt, is left unclaimed as a result. Scanning the bus shows only 0x09 responding (0x28 also ACKs but returns zeros, presumably an alternate address on the same controller). Linux bus 0 here is the GENI I2C controller at 0xa80000, which is i2c8 in the DT: # i2cdetect -y -r 0 00: -- 09 -- -- -- -- -- -- ... and 0x09 returns a valid HID-over-I2C descriptor: 1e 00 descriptor length 30 00 01 bcdVersion 1.00 6b 03 report descriptor length 875 ... bd 29 vendor 0x29bd 03 11 product 0x1103 whose report descriptor opens as a Windows Precision touchscreen: 05 0d Usage Page (Digitizer) 09 04 Usage (Touch Screen) a1 01 Collection (Application) 85 10 Report ID (0x10) 05 0d Usage Page (Digitizer) 09 22 Usage (Finger) a1 02 Collection (Logical) 09 42 Usage (Tip Switch) ... Contact Id, 16-bit X/Y, unit exponent -3 The firmware agrees. The DSDT describes one touchscreen, \_SB.TSC1, on I2C9 (QUP_1_SE_0 at 0xa80000, i2c8 here) with its interrupt on GPIO 51. Its _HID, slave address and HID descriptor address are placeholders that UEFI fills in at boot, and on this machine they read LXST2021, 0x09 and 0x0001. Nothing at 0x28 is described. The Latitude 7455 DT already has the same LXST2021 touchscreen at 0x09. The original touchscreen@10 node is identical to the ones in x1-crd.dtsi, x1e80100-dell-xps13-9345.dts and x1e78100-lenovo-thinkpad-t14s.dtsi, which the Inspiron DT was based on. Rename the node to match the corrected unit address. Fixes: e7733b42111c ("arm64: dts: qcom: Add support for Dell Inspiron 7441 / Latitude 7455") Signed-off-by: Charlie Garner Link: https://lore.kernel.org/r/20260923152506.44989-3-charlie@akao.au Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 52478ef75b37c264991119612ca06cb5217e4189 Author: Alex Williamson Date: Fri Sep 11 11:04:24 2026 -0600 vfio: Reject a second cdev open before mutating shared device state [ Upstream commit 258ba46543abdd36844f04bba8b4022a5731d873 ] The cdev single-open check lives in vfio_df_open(), which runs at the end of the bind ioctl, after vfio_df_ioctl_bind_iommufd() has already updated state shared across all opens: vfio_df_check_token() can set the PF vf_token and vfio_df_get_kvm_safe() records the caller's KVM pointer in device->kvm and takes a reference. A second cdev bind of an already-open device runs both, only to be rejected in vfio_df_open(). The error path clears device->kvm and drops the reference, tearing down the current opener's KVM association and potentially resulting in an unbalanced reference on close or premature release, while the vf_token remains clobbered. Move the single-open check into vfio_df_ioctl_bind_iommufd() ahead of both mutations, so a bind that cannot complete leaves the current opener's state untouched. df->group is NULL on this path, so a non-zero open_count is exactly what vfio_df_open() rejected. The test in vfio_df_open() becomes redundant and is removed. Return -EBUSY rather than -EINVAL here. The arguments are not invalid, the device is in use, which could be a transient condition due to a delayed fput if the prior user is terminated. This provides compatibility with the group path, where a group open returns -EBUSY, and users may choose bounded polling to detect such a transient condition. Fixes: 839e692fa4eb ("vfio: Make vfio_df_open() single open for device cdev path") Fixes: 5fcc26969a16 ("vfio: Add VFIO_DEVICE_BIND_IOMMUFD") Fixes: 86624ba3b522 ("vfio/pci: Do vf_token checks for VFIO_DEVICE_BIND_IOMMUFD") Assisted-by: LLM Reviewed-by: Jason Gunthorpe Signed-off-by: Alex Williamson Reviewed-by: Kevin Tian Link: https://lore.kernel.org/r/20260911170429.1642480-2-alex.williamson@nvidia.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit 8a97fe2a2a6382257635ecd1f8d33af6f12145aa Author: Ian Rogers Date: Thu Sep 17 23:26:20 2026 -0700 perf machine: Add session back pointer to fix out of bounds read [ Upstream commit d227b45fc162ce9134bb96f33f71e6952ec36ea5 ] thread__e_machine_endian() decides whether a thread is live, and so whether to read /proc/pid/exe rather than fall back to the perf.data environment, by recovering the session from the machine: session = container_of(machine->machines, struct perf_session, machines); is_live = !session->data; That only holds when the struct machines is the one embedded in a struct perf_session. It is not the only one. aslr_tool keeps its own in struct aslr_tool, and hists_cumulate, hists_filter, hists_link, hists_output and thread-maps-share each put one on the stack. For those the container_of subtracts offsetof(struct perf_session, machines) from an address that was never inside a session, and the following load of session->data reads outside the object, which is what ASan reports. Replace the derivation with an explicit link. machines__init() takes the owning session, or NULL when the machines is standalone, and thread__e_machine_endian() reads it back through machines__session(). A NULL session is treated as live. The tests use synthetic pids that have no /proc entry, so the read fails there and the e_machine falls back to EM_HOST as before, rather than being decided by whatever the out of bounds read happened to return. perf inject registers its session with the aslr tool once the session exists, before any event is processed, so that tool keeps reporting file based threads as not live. Fixes: 70351029b556 ("perf thread: Add support for reading the e_machine type for a thread") Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit ff452703fa2c8b6b5aa7c2046d46bd19caaf7726 Author: Yibo Tan Date: Sun Sep 20 02:51:10 2026 +0800 sysctl: unregister tables before freeing bitmap [ Upstream commit 238dfe02fb0a9f72d7fd275d74ce80f13923ef31 ] The table registered for bitmap_0001 retains a pointer to test_data.bitmap_0001. unregister_sysctl_table() prevents new handlers from starting and waits for active handlers to finish. test_sysctl_exit() currently frees the bitmap before unregistering the table. A concurrent read during module removal can therefore enter proc_do_large_bitmap() while the bitmap is freed. KASAN reports a slab-use-after-free in _find_next_bit(). Unregister all tables before freeing the bitmap so the unregister rundown provides the required lifetime boundary. The unmodified module reproduced the use-after-free in three KASAN runs. With this change, three runs each completed 100 load, read and unload race rounds without a kernel diagnostic. Fixes: 2ea622b887e7 ("tools/testing/selftests/sysctl/sysctl.sh: add proc_do_large_bitmap() test case") Assisted-by: LLM Signed-off-by: Yibo Tan Signed-off-by: Joel Granados Signed-off-by: Sasha Levin commit b1532bb3f5715ddf9a87a53bb468f0cd52355e69 Author: Michael J. Ruhl Date: Wed Sep 23 11:11:16 2026 -0700 platform/x86/intel/pmt: complete pcidev to device update [ Upstream commit b86e5062cb881f6e5c1ddb8913c1357a9508f6db ] The update that moved struct pci_dev usage to struct device is incomplete. Only telemetry endpoints are covered. Other PMT features (crashlog) are now blocked from using the callback mechanism. Change struct intel_pmt_entry pci_dev member to device. Update callback usage to use the intel_pmt_entry rather than the telemetry endpoint. Reviewed-by: Rodrigo Vivi Fixes: 353042d54d82 ("platform/x86/intel/vsec: Switch exported helpers from pci_dev to device") Signed-off-by: Michael J. Ruhl Link: https://patch.msgid.link/20260923181115.2514193-23-michael.j.ruhl@intel.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 922f0fefd8e54690c751e888bae649339d57eb9a Author: Sandipan Das Date: Thu Sep 17 15:29:21 2026 +0530 perf jevents: Limit the number of JSON reading workers [ Upstream commit 1a097d93caf62c4e6c834bff81609512070e5008 ] The ProcessPoolExecutor is created without max_workers, so concurrent.futures defaults to one worker per CPU and forks all of them when the first task is submitted. Each worker costs the parent a few file descriptors. For systems with high core-count processors like the AMD EPYC 9996, the pool can easily exhaust RLIMIT_NOFILE as seen below. File ".../multiprocessing/popen_fork.py", line 65, in _launch child_r, parent_w = os.pipe() OSError: [Errno 24] Too many open files The error is reported, but jevents.py does not exit. The workers that did start stay blocked waiting for work and are never joined, so the build eventually hangs. Other targets keep building in the meantime, leaving the traceback several lines above the point where the build stalls. Limit the pool instead of sizing it against the descriptor limit, which would mean relying on how many descriptors concurrent.futures needs for each worker. At least for recent AMD EPYC processors, reading the JSON files does not need many workers to be fast and things typically stop scaling beyond 32 workers. Hence, a small upper bound keeps the speedup and stays well inside any usable limit. Fixes: eaab2eb09dc2f86f ("perf pmu-events: Parallelize JSON and metric pre-computation in jevents.py") Reviewed-by: Ian Rogers Signed-off-by: Sandipan Das Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 9d9ccc96361973dd63a45069cb2b880b6c22132c Author: Joanne Koong Date: Thu Sep 3 21:56:51 2026 -0700 fuse: zero the correct range on a short read reply [ Upstream commit d0a079b5b94bf5e10f1c00bd092eda0333782037 ] When a read reply is shorter than the requested range, fuse_copy_folio() zeroes everything in the folio outside the copied bytes. However, for folios with block sizes smaller than the folio size, this can clear blocks outside the requested range which are uptodate, or dirty and have not yet been written back. Move the zeroing logic into fuse_copy_folios(), since descs[i].length needs to be used, and clear only the tail of the requested range that the server did not send. The range is also no longer cleared upfront in the non cs->skip_folio_copy case. This is fine since a failed copy leaves those blocks non-uptodate, so the uncopied bytes are never visible. This also matches the pre-existing behavior in the non-short-read case (a failed copy doesn't zero out the range in the folio). This lets the zeroing logic stay the same regardless of whether the folio copy is skipped or not. Fixes: a4c9ab1d4975 ("fuse: use iomap for buffered writes") Reported-by: Sashiko Reported-by: Kanishka De Silva Signed-off-by: Joanne Koong Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin commit 8f3751f91ec9a47928d4fd14140dd250c79a0103 Author: Tengda Wu Date: Thu Sep 17 12:58:02 2026 +0000 perf llvm: Fix memory leak of args->fileloc in symbol__disassemble_llvm() [ Upstream commit fe529886843f451ad6da7e65d53325432e0f80fb ] In symbol__disassemble_llvm(), after calling llvm_addr2line(), if the subsequent disasm_line__new() fails, the code directly jumps to 'err' without freeing args->fileloc, leading to a memory leak. Fix this by explicitly calling free(args->fileloc) before jumping to the error handling path when disasm_line__new() fails. Fixes: 04885681788855bb ("perf annotate: LLVM-based disassembler") Reviewed-by: Ian Rogers Signed-off-by: Tengda Wu Cc: Steinar H. Gunderson Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit f3bd942493c912fd84a5c3fe57b7ea31083988b6 Author: Hao Sun Date: Fri Sep 25 10:28:13 2026 +0200 bpf: Fix uninit read for helper mem args on partially spilled slots [ Upstream commit b3861495d2b2f7459cddf49e63fa0758ba430583 ] check_stack_range_initialized() takes the spilled register path when bpf_is_spilled_reg(ss) holds, which, however, only looks at the last byte of the slot. Hence, a partially spilled scalar (on the lower part) bypasses the check and the following loads: 0: (b7) r1 = 1 ; R1=1 1: (63) *(u32 *)(r10 -8) = r1 ; R1=1 R10=fp0 fp-8=????1 2: (18) r1 = 0x0 ; R1=map_ptr(map=rb,ks=0,vs=0) 4: (bf) r2 = r10 ; R2=fp0 R10=fp0 5: (07) r2 += -8 ; R2=fp-8 6: (b7) r3 = 8 ; R3=8 7: (b7) r4 = 0 ; R4=0 8: (85) call bpf_ringbuf_output#130 ... When executed, it dumps the uninit four bytes: RINGBUF: 01 00 00 00 ff ff ff ff This is the same root cause as the non-fetch atomic case fixed in commit 5a84b4424db8 ("bpf: Fix uninit read for non-fetch atomics on partially spilled slots"). Fix by only taking the spilled register path for the bytes marked STACK_SPILL, so the rest of the slot goes through the usual checks. Fixes: 354e8f1970f8 ("bpf: Support <8-byte scalar spill and refill") Suggested-by: Kumar Kartikeya Dwivedi Signed-off-by: Hao Sun Link: https://lore.kernel.org/bpf/20260925082814.1554771-1-sunhao.th@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 7880dfae923cdf3176e3b5e071c5ca5b1a5f3693 Author: Shrikanth Hegde Date: Mon Sep 21 12:51:50 2026 +0530 powerpc/ftrace: Don't restore r13 during ftrace_regs_caller [ Upstream commit af5f0870883ae4aea7f668d06cbb7ad0e12824c8 ] Michal reported a stack-protector failure and subsequent panic when running kernel builds. This was observed with full/lazy preemption. Initially it was suspected as KVM, but later turned out to be due to a bcc tool running in parallel. Issue was recreated using a bcc tool. For example, running below in parallel leads to crash. ./funccount sched* -d 100 and make -j 64 The same crash was observed when running kprobe for schedule() function, while simpler function tracer for schedule() didn't cause the crash. This helped to narrow it down to ftrace backed kprobes area. The crash occurs as follows: ftrace_regs_caller entry on CPU A | +-> save r13 = CPU A PACA into pt_regs | +-> call kprobe_ftrace_handler() | +-> ftrace_test_recursion_unlock() | +-> preempt_enable +-> task can schedule and migrate to CPU B +-> task resumes with live r13 = CPU B PACA | +-> REST_GPRS(2, 31) | +-> restore saved r13 = CPU A PACA | |-> The task then continues running on CPU B with r13 pointing | to CPU A's PACA. The stack-protector canary is accessed through the PACA. After the task migrates, CPU A may run a different task and update its PACA with that task's canary. Restoring the saved r13 then causes the migrated task's saved stack canary to be compared against the canary in CPU A's PACA, resulting in a stack-protector failure. Similarly, current is resolved through the PACA. With a stale r13, preempt_count() can access the state of the task referenced by CPU A's PACA instead of the task running on CPU B. This results in corrupted preempt-count warnings and scheduling-while-atomic failures. This path for example is called when using kprobes and parallel kernel builds can cause preemptions during ftrace_test_recursion_unlock. Do not restore r13 from the saved register frame. If the task did not migrate, the live r13 already has the saved value. If it migrated, the live r13 contains the correct PACA pointer for the CPU on which the task resumed. On PPC32, r13 is regular register. So do this fix only for PPC64 Fixes: 153086644fd1 ("powerpc/ftrace: Add support for -mprofile-kernel ftrace ABI") Reported-by: Michal Suchánek Closes: https://lore.kernel.org/all/aqKfsVArHHaIK6M9@kunlun.suse.cz/ Reviewed-by: Christophe Leroy (CS GROUP) Reviewed-by: Hari Bathini Signed-off-by: Shrikanth Hegde Tested-by: Samir Mulani Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20260921072151.35531-1-sshegde@linux.ibm.com Signed-off-by: Sasha Levin commit d0abc2bedda3d901985d5be62cab8c16f796c35e Author: Hao Sun Date: Thu Sep 24 15:13:41 2026 +0200 bpf: Fix uninit read for non-fetch atomics on partially spilled slots [ Upstream commit 5a84b4424db8ae07f0ac682ab031c37a91dce50b ] check_stack_read_fixed_off() skips partial spill checks for non-fetch atomics; the following prog can be loaded: 0: (b7) r1 = 1 ; R1=1 1: (63) *(u32 *)(r10 -8) = r1 ; R1=1 R10=fp0 fp-8=????1 2: (db) lock *(u64 *)(r10 -8) += r1 ; R1=1 R10=fp0 fp-8=mmmmmmmm 3: (79) r0 = *(u64 *)(r10 -8) ; R0=scalar() R10=fp0 fp-8=mmmmmmmm 4: (77) r0 >>= 32 ; R0=scalar(smin=0,smax=umax=0xffffffff,var_off=(0x0; 0xffffffff)) 5: (95) exit When test run: retval=4294967295 Note fp-8 is ????1 at #1, yet it becomes fp-8=mmmmmmmm after the non-fetching atomic add at #2; hence the high 32 bits are leaked. Fix by applying the partial load check; after the patch, the prog is rejected: Verification failed: Memory Safety: Uninitialized stack read Reason: This rejected read uses 8 bytes at stack offset -8, but byte 4 in that range is uninitialized on this path. Programs loaded with CAP_PERFMON can be allowed to read uninitialized stack bytes, but this program is being rejected without that allowance. At: ... 0 | (b7) r1 = 1 1 | (63) *(u32 *)(r10 -8) = r1 >>> 2 | (db) lock *(u64 *)(r10 -8) += r1 3 | (79) r0 = *(u64 *)(r10 -8) 4 | (77) r0 >>= 32 This affects CAP_BPF only. Fixes: 354e8f1970f8 ("bpf: Support <8-byte scalar spill and refill") Signed-off-by: Hao Sun Link: https://lore.kernel.org/bpf/20260924131342.934290-1-sunhao.th@gmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit c13c63c6775d9b87ea48d6eebff8186a22d38fbd Author: Rob Herring (Arm) Date: Mon Sep 21 18:28:18 2026 -0500 dt-bindings: arm: mediatek: Fix MT6779 audsys compatible [ Upstream commit 034b3b1ce25a62222920e2bb3b6a0c7ef160b108 ] The correct name for the MediaTek MT6779 audsys compatible is "mediatek,mt6779-audio", not "mediatek,mt6779-audsys". The original .txt binding was correct. Fixes: e97c618234d9 ("dt-bindings: arm: mediatek: convert audsys and mt2701-afe-pcm to yaml") Assisted-by: LLM Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260921232819.3137721-1-robh@kernel.org Signed-off-by: Rob Herring (Arm) Signed-off-by: Sasha Levin commit 0b980b2b7d30c1bd8df6e4a8021ef90affdbe61f Author: Pengpeng Hou Date: Sun Sep 20 11:33:58 2026 +0800 iio: accel: bma220: publish the SPI driver ACPI alias [ Upstream commit cdc7d3dd101251a6373332726b8d6fad35e83b8a ] The SPI driver advertises an ACPI match for BMA0220 but does not export that table. A modular build therefore lacks the ACPI alias used to load the driver when the device is enumerated through ACPI. Export the ACPI table. Move the existing SPI export next to its SPI ID table so each export is adjacent to the table it describes. The issue was found by our static-analysis tool. Fixes: bf2a5600a3eb ("iio: accel: Add support for Bosch BMA220") Assisted-by: LLM Signed-off-by: Pengpeng Hou Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit cc3ad4a2f4812f1efeb6fff6eba6260f8fc6faa6 Author: Alexei Starovoitov Date: Thu Sep 24 23:31:29 2026 +0000 bpf: Don't converge a loop on an iterator that was created anew [ Upstream commit 6f3ee3516305da3043f1787e3890381a54151730 ] When the verifier reaches bpf_iter_*_next() in a state that is equal to a state that is still being explored it concludes that the loop converged, since an active iterator will be drained eventually. states_equal() matches ids through idmap, so the same is concluded for an iterator that was destroyed and created again since the old state: bpf_iter_num_new(&it, 0, 10); loop: if (bpf_ktime_get_ns()) goto remake; next: if (!bpf_iter_num_next(&it)) goto out; goto loop; remake: bpf_iter_num_destroy(&it); bpf_iter_num_new(&it, 0, 10); goto next; Such prog is accepted when the call of bpf_iter_num_next() is the first prune point after bpf_iter_num_new() and it never returns. Otherwise it's rejected with "infinite loop detected". Require the iterator to have the same id in both states. Fixes: 06accc8779c1 ("bpf: add support for open-coded iterator loops") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924233130.1213812-8-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 5ec003f05acbc89a24c25d139532357ebf3f174b Author: Kumar Kartikeya Dwivedi Date: Thu Sep 24 18:57:02 2026 +0200 bpf: Add accessors for verifier stack slots [ Upstream commit 3b8da394c289f91242ea8088a65ed2d9a503c8cc ] The verifier indexes a frame's stack state directly through state->stack[spi] and computes the number of tracked slots as allocated_stack / BPF_REG_SIZE in every file that touches stack slots, and so does the nfp offload driver. Route all of these through two helpers, bpf_stack_slot() and bpf_stack_nr_slots(), so the layout of the per-frame stack state is visible in one place. The one lookup that goes the other way, reg_to_target() in the diagnostics code, maps a register pointer back to its slot by address and now says that it relies on the slots forming one contiguous array. Both helpers take a const frame: the slot accessor returns the slot through the frame's stack pointer, so read-only code such as the state printer can use it without giving up its qualifiers. Functions that look up the same slot repeatedly now fetch it once. No functional change. Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924165740.2146806-2-memxor@gmail.com Stable-dep-of: 6f3ee3516305 ("bpf: Don't converge a loop on an iterator that was created anew") Signed-off-by: Sasha Levin commit 65014bb72d9ad73118ca2fe1936e1847b4556762 Author: Alexei Starovoitov Date: Thu Sep 24 23:31:27 2026 +0000 bpf: Fix overflow of jump offset in may_goto expansion [ Upstream commit 8a12a00f6c5dba70a6d908fe27a3c980d42b9515 ] may_goto is expanded into 'if AX == 0 goto off + 5' when it's timed, off + 2 when it's not and off - 1 when it jumps backward. The sum is stored into 16-bit off without a range check, so may_goto +32763 turns into: if r12 == 0x0 goto pc-32768 and the prog jumps backward when may_goto expires. Emit 'if AX != 0 goto +1; gotol' when the offset doesn't fit and compute the offset from the number of insns in the expansion. JITs that don't support gotol will reject such prog. Fixes: 011832b97b31 ("bpf: Introduce may_goto instruction") Fixes: e723608bf428 ("bpf: Add verifier support for timed may_goto") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924233130.1213812-6-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit c4a3a9f737e728fee10a1b9353bbfc89f04040d6 Author: Alexei Starovoitov Date: Thu Sep 24 23:31:25 2026 +0000 bpf: Adjust pc-relative insn copied into its own patch [ Upstream commit 67a3b916a7ae7c1a6bed08555417d444de6f5838 ] bpf_do_misc_fixups() inits may_goto count by patching the first insn of a subprog with [ST, ST, first insn]. bpf_convert_ctx_accesses() patches insn that needs a barrier with [nospec, insn]. bpf_adj_branches() doesn't adjust insns inside the patch, so when the copy is a call, ld_imm64 of a func or a jump that points backward its target is off by the number of insns in front of it: static int A(void) { return 1; } static int A2(void) { return 2; } static int B(void) { int i, ret = A(); for (i = 0; i < 10 && can_loop; i++) ... return ret; } When A is placed in front of B and may_goto is timed 'call A' becomes call of A + 2. B returns 2 when A + 2 is the start of A2. Otherwise the prog is rejected with "verifier bug: No program to jit at insn". Add bpf_adj_moved_insn() and use it for both copies. Fixes: 011832b97b31 ("bpf: Introduce may_goto instruction") Fixes: d6f1c85f2253 ("bpf: Fall back to nospec for Spectre v1") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924233130.1213812-4-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit f430d4a1c8c631a5f264f5d9df41bfe859155679 Author: Alexei Starovoitov Date: Thu Sep 24 23:31:23 2026 +0000 bpf, x86: Fix timed may_goto with private stack [ Upstream commit bb83425b3cdcb7bb3c629598a4d5efad9cc80733 ] arch_bpf_timed_may_goto() computes the address of count and timestamp as rbp + offset. When the prog uses private stack the JIT maps r10 to r9 and nothing is reserved under rbp, so bpf_check_timed_may_goto() reads and writes the timestamp in the kernel stack, where arch_bpf_timed_may_goto() has just saved r0-r5 or further down. The following loop in fentry prog with r0-r5 set to zero: 1: may_goto +2 r6 += 1 goto 1b leaves r3 with ktime in it when the prog has 64 bytes of stack and ends after 65535 iterations when it has 128. Add the frame pointer to the offset in the JIT, where rbp vs r9 is known, and pass the pointer in AX. arm64 and powerpc JITs keep the address of private stack in BPF_REG_FP and are not affected. Fixes: 2fb761823ead ("bpf, x86: Add x86 JIT support for timed may_goto") Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924233130.1213812-2-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 66d30f7c9062e5e5bbd2c6999c371fed0cac5cf6 Author: Myeonghun Pak Date: Sat Sep 12 15:00:56 2026 -0400 spi: rockchip-sfc: skip DMA cleanup in PIO mode [ Upstream commit 926f9c44a76fe9e722180d0804c607c6cf1ebbb4 ] With rockchip,sfc-no-dma, probe skips allocating and mapping the transfer buffer. However, controller registration failure and driver removal still call dma_unmap_single() for that nonexistent mapping. Guard the DMA mapping and buffer cleanup with use_dma. Keep the existing cleanup for allocation and mapping failures on the DMA path. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: ee795e82e101 ("spi: rockchip-sfc: Fix DMA-API usage") Assisted-by: OpenAI:GPT-5.6 Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://patch.msgid.link/20260912190056.42192-1-mhun512@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 913db1282f8d36c70d3588d56866970a5b1ff2fd Author: Jiawen Liu <1298662399@qq.com> Date: Tue Aug 18 17:05:50 2026 +0400 spi: rockchip-sfc: disable runtime PM in remove [ Upstream commit 34e32e9ade58e32daf933974c9b697d066fc5aaa ] rockchip_sfc_probe enables runtime PM and leaves the device active with a usage count held by pm_runtime_get_noresume(). The remove callback only disables the clocks and does not disable runtime PM, leaving the device in an inconsistent state and leaking the runtime PM reference. Add the missing runtime PM teardown in rockchip_sfc_remove to balance the probe's enable and get_noresume calls. Signed-off-by: jiawen <1298662399@qq.com> Link: https://patch.msgid.link/tencent_DD16C0EEDFEF4ACAFAB5A23EC8235D462707@qq.com Signed-off-by: Mark Brown Stable-dep-of: 926f9c44a76f ("spi: rockchip-sfc: skip DMA cleanup in PIO mode") Signed-off-by: Sasha Levin commit e4d1875102188d9192af0c112c563f4484314437 Author: bui duc phuc Date: Thu Sep 17 19:11:36 2026 +0700 ASoC: fsl_asrc_m2m: fix pm_runtime usage counter leak on error [ Upstream commit 5626653a4bdf32812d66b970860677cd9d7a2190 ] pm_runtime_get_sync() leaves the runtime PM usage counter incremented even when it fails, but the error path in fsl_asrc_m2m_comp_open() does not call pm_runtime_put_noidle() to balance it, leaking a reference each time resume fails. Use pm_runtime_resume_and_get() instead, which automatically drops the usage counter on failure, fixing the leak. Fixes: 24a01710f627 ("ASoC: fsl_asrc_m2m: Add memory to memory function") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260917121136.32527-1-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 52e0c44eb72cccddb608438f319ae6dea5eaf0d4 Author: James Clark Date: Tue Sep 22 15:47:01 2026 +0100 perf buildid-list: Fix empty output for AUX data [ Upstream commit 3b364119a9afef9d22b9aee64c96b54553a7117d ] perf record enables buildid_all for AUX trace because buildid-list does not decode AUX data to identify hit DSOs. Historically those build IDs were available in HEADER_BUILD_ID, and buildid-list disabled hit filtering when HEADER_AUXTRACE was present. Build IDs are now carried by MMAP2 records by default and the build-ID header is omitted. perf_session__list_build_ids() forces with_hits when the header is absent so that it processes the event stream. That also filters the result to DSOs referenced by ordinary samples. AUX data has no such samples unless the trace is decoded, so every DSO is dropped and perf archive reports that no build IDs were found. Process the event stream whenever the build-ID header is absent, allowing MMAP2 build IDs to be read, but do not enable hit filtering for AUX data, this ensures that all build-IDs are included for AUX data. Fixes: 6bd89ae7d14788ba ("perf record: Make sure to update build-ID cache") Reviewed-by: Ian Rogers Assisted-by: Codex:GPT-5.6-Sol Signed-off-by: James Clark Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 4272fd1c3fa55def03a74c95d4aad89f650df333 Author: Jens Remus Date: Tue Sep 22 16:43:00 2026 +0200 perf evsel: Improve callchain warning for s390 [ Upstream commit 1eb782d60d9926f0e3c3131c568c3ea0fa69d0fb ] On s390 the kernel uses s390 back chain instead of frame pointers for stack tracing of user space since v6.7 commit aa44433ac4ee ("s390: add USER_STACKTRACE support"). This is because frame pointers on s390 cannot be used for stack tracing. [1] This requires user space to maintain a s390 back chain. For instance user space to be built with compiler option '-mbackchain' (instead of '-fno-omit-frame-pointer' used on other architectures, which should better not be used on s390 [1]). Only few distributions and users build user space with '-mbackchain'. Therefore '--call-graph fp' may in practice not produce the expected results. Commit ca76fb67ebdd ("perf evlist: Improve default event for s390") changed the default '-g' option to 'dwarf' on s390 and added a warning for s390 that wrongly claimed that "Framepointer unwinding lacks kernel support". This warning resulted from a misinterpretation of comments in s390 cpumsf_pmu_event_init(). The restriction in cpumsf_pmu_event_init() applies to callchain sampling with the s390 CPU Measurement Sampling Facility (CPUMSF) hardware PMU. CPUMSF events, such as 'cycles', do not support callchain sampling. This is independent of whether perf uses the 'fp' or 'dwarf' call-graph mode. The CPUMSF PMU provides samples collected asynchronously, making it impossible to associate a callchain to the historic IPs. Therefore callchains can only be used with software events on s390. Remove the incorrect warning. The kernel supports the 'fp' call-graph mode on s390 by walking the back chain. Do not replace it with a hint to use 'dwarf' when the resulting callchain is incomplete. Such a suggestion could imply that 'fp' is inherently inferior. The same general limitation exists on other architectures when user space is not built with frame pointers (i.e. '-fno-omit-frame-pointers'). Instead, warn on s390 when callchain sampling is requested with an event provided by the CPUMCF or CPUMSF hardware PMUs, because that combination is not supported. Update the perf record documentation to state that 'dwarf' is the default call-graph mode on s390 and that 'fp' uses back chain instead of frame pointers on s390. Note that '--call-graph fp' may also be useful for other applications, such as OpenJDK maintaining a s390 back chain (does not require JVM option '-XX:+PreserveFramePointer' on s390): $ perf record --call-graph fp ... -- \ java -XX:+UnlockDiagnosticVMOptions -XX:+DumpPerfMapAtExit ... [1]: s390: Stack tracing using Frame Pointer, Back Chain, and SFrame, https://conf.gnu-tools-cauldron.org/opo25/talk/Y3CVHY/ Fixes: ca76fb67ebdd5e1a ("perf evlist: Improve default event for s390") Reviewed-by: Thomas Richter Signed-off-by: Jens Remus Acked-by: Ian Rogers Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit dfe36860b474ae4636b99ff933bdc1885c60c12e Author: bui duc phuc Date: Mon Sep 7 19:03:10 2026 +0700 ASoC: mediatek: mt8188: fix clk leak on error in audsys_clk_register [ Upstream commit 6cddf6e56d2539fd13c0ee9dd817c4e06a967173 ] devm_add_action_or_reset() is called after the loop that registers gate clocks. If kzalloc() fails mid-loop, the function returns -ENOMEM before that call, so cleanup is never registered and all previously registered clocks leak permanently. Move devm_add_action_or_reset() before the loop so cleanup is always scheduled. The clock from the current (failing) iteration is not yet stored in afe_priv->lookup[i], so it still needs an explicit clk_unregister_gate() call. Fixes: fd67a7a1a22c ("ASoC: mediatek: mt8188: fix use-after-free in driver remove path") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260907120310.135693-8-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 84e873a75c5213623d033721582cee90ae005099 Author: bui duc phuc Date: Mon Sep 7 19:03:08 2026 +0700 ASoC: mediatek: mt8188: mt8188-afe-pcm: Handle runtime resume errors [ Upstream commit f5f6941d92972ba66829a99999fa825e63da5162 ] Errors from clock enable and regcache synchronization are currently ignored during runtime resume. Check the return values from mt8188_afe_enable_reg_rw_clk(), regcache_sync(), and mt8188_afe_enable_main_clock(), and abort the runtime resume if any of them fails. On failure, disable the previously enabled reg_rw clocks and restore the regmap to cache-only mode. Fixes: bf106bf09376 ("ASoC: mediatek: mt8188: add platform driver") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260907120310.135693-6-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 533c1fdcd4513ff603e2b35eaebb05403e7ced16 Author: bui duc phuc Date: Mon Sep 7 19:03:07 2026 +0700 ASoC: mediatek: mt8188: mt8188-afe-clk: Handle clock enable errors [ Upstream commit 1b65c13d1af99170e2a855ca9212a03daa3e7f04 ] Clock enable errors are currently ignored by several AFE clock control functions. Check the return values and roll back previously enabled clocks when a subsequent clock enable fails. Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control") Fixes: 9be0213a6858 ("ASoC: mediatek: mt8188: refine APLL control") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260907120310.135693-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 13b2473f98b6b749a73f412b55d122ff625773de Author: bui duc phuc Date: Mon Sep 7 19:03:06 2026 +0700 ASoC: mediatek: mt8188: mt8188-afe-clk: Propagate regmap update errors [ Upstream commit 60a8112a088aee38d728457a14fa8bfb50f4c87e ] The return values from regmap_update_bits() are currently ignored by the clock and AFE control functions. Propagate the errors to allow callers to handle regmap update failures. Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260907120310.135693-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 1145a74d4a6e51620fb86e790475adddd1844645 Author: bui duc phuc Date: Mon Sep 7 19:03:05 2026 +0700 ASoC: mediatek: mt8188: mt8188-afe-clk: Handle tuner clock enable errors [ Upstream commit a2c3ee3349a7da91e563b9a21a355a28fa754bc7 ] Clock enable errors are currently ignored when enabling the APLL and tuner clocks. Check the return values and roll back the APLL clock if the tuner clock fails to enable. Fixes: f6b026479b13 ("ASoC: mediatek: mt8188: support audio clock control") Signed-off-by: bui duc phuc Reviewed-by: Cezary Rojewski Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260907120310.135693-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 09ccd4ffbc3195a0b99ed5e54a2d6ca279d2d806 Author: Pengpeng Hou Date: Wed Sep 2 09:32:50 2026 +0800 ASoC: rt5665: return cache sync errors from resume [ Upstream commit 9f2933d9a437302d5ae32eb9022efef049d8ab22 ] rt5665_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: 33ada14a26c8 ("ASoC: add rt5665 codec driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-15-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 98400b3ff820aeb16fef75e06f7ac8e9dc671151 Author: Pengpeng Hou Date: Wed Sep 2 09:32:49 2026 +0800 ASoC: rt5660: return cache sync errors from resume [ Upstream commit 70fe8997b03078ff8253d985a161fef310f7c346 ] rt5660_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The power-off resume delay remains ordered before the cache replay. The issue was found by a tool we developed. Fixes: 2b26dd4c1fc5 ("ASoC: rt5660: add rt5660 codec driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-14-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 895f8d1c391f97cc61647b888e124f63c21ade0e Author: Pengpeng Hou Date: Wed Sep 2 09:32:48 2026 +0800 ASoC: rt5659: return cache sync errors from resume [ Upstream commit 3a9b5bce85a1baff95463a2bb021efac64bcf83f ] rt5659_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: d3cb2de2479b ("ASoC: rt5659: add rt5659 codec driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-13-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 83a32d22b5094549499dbbdabcefdc5bb5ac901f Author: Pengpeng Hou Date: Wed Sep 2 09:32:47 2026 +0800 ASoC: rt5616: return cache sync errors from resume [ Upstream commit 8fc9d353d5371a946d9a9952278b96c09070374c ] rt5616_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: b1d15059957d ("ASoC: rt5616: add rt5616 codec driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-12-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 8af9b7448ee87c6bde410e3309c4f2a0261e40a8 Author: Pengpeng Hou Date: Wed Sep 2 09:32:46 2026 +0800 ASoC: rt1318: return cache sync errors from resume [ Upstream commit a5735b341c6e8cff5f5f9480295012a5ceebb665 ] rt1318_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: fe1ff61487ac ("ASoC: rt1318: Add RT1318 audio amplifier driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-11-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b254e32ddfa90512d7c277a8c378bfa2443fa3b5 Author: Pengpeng Hou Date: Wed Sep 2 09:32:45 2026 +0800 ASoC: rt1308: return cache sync errors from resume [ Upstream commit 3db3289178b94056753f7a8c6ee4ab4b232ee6a5 ] rt1308_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: 2b9def8c0d92 ("ASoC: rt1308: Add RT1308 amplifier driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-10-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit cfd8e360b937a27b6c17140f883c1e553854798b Author: Pengpeng Hou Date: Wed Sep 2 09:32:44 2026 +0800 ASoC: rt1305: return cache sync errors from resume [ Upstream commit 30858325aa90380c6bcdde605214f1ebdbec568c ] rt1305_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: 29bc643ddd7e ("ASoC: rt1305: Add RT1305/RT1306 amplifier driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-9-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b6d2d3798f902cfa5e2ca99b62fa6bdfcc0f7298 Author: Pengpeng Hou Date: Wed Sep 2 09:32:43 2026 +0800 ASoC: rt1016: return cache sync errors from resume [ Upstream commit 98ace05793c7b80a9f49d92b78fcc88e0970f8e4 ] rt1016_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: 79a4b670b4b4 ("ASoC: rt1016: Add the rt1016 support") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-8-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9904cfaadcd767de6d6b6f935c0000c644734a0b Author: Pengpeng Hou Date: Wed Sep 2 09:32:42 2026 +0800 ASoC: rt1011: return cache sync errors from resume [ Upstream commit 432734a00bfae17baeff1a83b61bfc9c2ab20c12 ] rt1011_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: d6e65bb7ff0d ("ASoC: rt1011: Add RT1011 amplifier driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-7-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 56f93eef933a21f643a9a92c50fa5c67e6381af1 Author: Pengpeng Hou Date: Wed Sep 2 09:32:41 2026 +0800 ASoC: nau8540: return cache sync errors from resume [ Upstream commit 0bf2b3411537e8e4d9c03702646a9fc87198d4b1 ] nau8540_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: c1644e3de45d ("ASoC: nau8540: new codec driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-6-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit d338a78f5d45bdeb5737a86083cb273125f862e3 Author: Pengpeng Hou Date: Wed Sep 2 09:32:40 2026 +0800 ASoC: es8323: return cache sync errors from resume [ Upstream commit b7c3f95915a9e791fc8721ce1ecc037f7a55d58c ] es8323_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: b97391a604b9 ("ASoC: codecs: Add support for ES8323") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-5-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 2b2c908ef687b6204e2628b091cc0201e962628a Author: Pengpeng Hou Date: Wed Sep 2 09:32:39 2026 +0800 ASoC: es8316: return cache sync errors from resume [ Upstream commit 243d0c47e57a6af89d95aa451ef5fbf453983b1c ] es8316_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: 4bac47a7b2f9 ("ASoC: codecs: add suspend and resume for ES8316") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-4-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit a04c68b5b86d0cd31311b81dca863ce9989da06a Author: Pengpeng Hou Date: Wed Sep 2 09:32:38 2026 +0800 ASoC: ak4642: return cache sync errors from resume [ Upstream commit 7142c34ed92fddca7038787b8695d22c661dc6ec ] ak4642_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The successful resume path is unchanged. The issue was found by a tool we developed. Fixes: a3a83d9a7cb0 ("ASoC: Add ak4642/ak4643 codec support") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-3-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit a3870a8c2c0ac621b0413370aba93bfb93b8847f Author: Pengpeng Hou Date: Wed Sep 2 09:32:37 2026 +0800 ASoC: adau17x1: return cache sync errors from resume [ Upstream commit 8ca84987c11d11e0ba60f202e3199b3b80c87721 ] adau17x1_resume() restores cached registers during component resume but discards the regcache_sync() result and returns success. A failed replay can therefore leave the hardware register state stale without reaching the component error reporting path. Return the cache synchronization result. The ASoC component wrapper reports a negative callback result and retains the established best-effort resume state, so this adds observability without introducing rollback or retry semantics. The optional switch-mode callback remains ordered before the cache replay. The issue was found by a tool we developed. Fixes: 4101866c743a ("ASoC: Add ADAU1X61 and ADAU1X81 CODECs common code") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260902013256.93072-2-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 30e41eb238bf0851a94467b20490fe16b2a7cc52 Author: Slavin Liu Date: Sun Sep 13 20:51:47 2026 +0800 ASoC: fsl_asrc: check the second front-end DMA channel [ Upstream commit b4136c0d69ead737197af741e20edd1c3574f6b4 ] The temporary Front-End DMA request can fail independently of the persistent channel acquired earlier in fsl_asrc_dma_hw_params(). The returned NULL pointer is immediately used to read its private data. Check the temporary channel and release the previously acquired persistent Front-End channel on failure. Clear its slot so a later hw_free cannot release it twice. ASoC marks a component's hw_params only after success and skips unmarked components during rollback, so returning an error alone would leak the earlier channel. Detected by static analysis and reviewed with AI-assisted source auditing. Fixes: 3117bb3109dc ("ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers") Assisted-by: LLM Signed-off-by: Slavin Liu Link: https://patch.msgid.link/20260913125147.109920-1-bolin.liu@seu.edu.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b31fef1d42ddcce4670e172eb9a381fcddbd051c Author: Pu Lehui Date: Wed Sep 23 14:42:16 2026 +0000 bpf: Adjust bpf_func to account for CFI offset in bpf_jit_free on riscv [ Upstream commit 93df8ae3267f19bf0c1135d26a0e21145dd0ea1c ] When CFI is enabled, the actual BPF program entry point is shifted forward by a CFI preamble. During bpf_jit_free(), this shifted pointer causes the wrong ro_header to be fetched, leading to a potential invalid memory free. Fix this by subtracting cfi_get_offset() from prog->bpf_func to correctly restore the original JITed allocation address before freeing. Fixes: e63985ecd226 ("bpf, riscv64/cfi: Support kCFI + BPF on riscv64") Signed-off-by: Pu Lehui Signed-off-by: Alexei Starovoitov Reviewed-by: Björn Töpel Acked-by: Björn Töpel Link: https://patch.msgid.link/20260923144216.934701-1-pulehui@huaweicloud.com Signed-off-by: Sasha Levin commit 7c50df818937b9941f51381971f8f4fbca7e284e Author: Puranjay Mohan Date: Thu Sep 24 09:26:06 2026 -0700 bpf: Look at frame 0 when telling async callback entries apart [ Upstream commit e55220162aae99622d9e80d4700e51c13a6f2a16 ] push_async_cb() sets in_async_callback_fn and async_entry_cnt on the callback's own frame, which is frame 0 of the fresh state it starts, and setup_func_entry() copies neither, so a subprog called by the callback carries neither. Two places read them from the innermost frame instead. is_state_visited() skips the infinite loop check when two states differ in async_entry_cnt, because seeing the same state on a second entry into an async callback is not a loop. A callback which re-arms itself and calls a subprog therefore compares the two entries at a loop inside that subprog, where the innermost frame is the subprog's and has no flag set, and the state is rejected: infinite loop detected at insn 60 push_callback_call() numbers a new entry as the caller's count plus one. When the callback re-arms itself from a subprog, the caller is that subprog's frame with a count of 0, so every entry is numbered 1, the check above never sees a difference, and a loop anywhere in such a callback is rejected the same way. Read the flag and the count from frame 0 in both places. A loop within a single entry still has a matching count and is still caught, and frame 0 of a non-async state does not have the flag set, so nothing else changes. The two other readers are already correct: check_return_code() reads frame[0], and the one in do_check() is reached only after an early return for curframe != 0. Fixes: bfc6bb74e4f1 ("bpf: Implement verifier support for validation of async callbacks.") Signed-off-by: Puranjay Mohan Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260924162609.1746610-2-puranjay@kernel.org Signed-off-by: Sasha Levin commit 7a1cbdcf274ebcefc9448a7ab61aa6c1896d0545 Author: Wei Huang Date: Thu Sep 24 14:05:43 2026 -0500 PCI/TPH: Validate the firmware Steering Tag response [ Upstream commit 5c382ef425c875bf854d411fb0a45909878a233a ] TPH _DSM returns an eight-byte Steering Tag information buffer. Checking only the ACPI object type allows a short firmware response to be read beyond the end of its buffer. For safety, require a non-NULL buffer containing the complete value before copying it. Use memcpy() so that reading the response does not depend on the alignment of the firmware buffer. Fixes: d2e8a34876ce ("PCI/TPH: Add Steering Tag support") Signed-off-by: Wei Huang Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260924190543.3424792-1-wei.huang2@amd.com Signed-off-by: Sasha Levin commit b3488a172a7647b9610644866818ca4cf101a0c5 Author: Chuck Lever Date: Wed Sep 16 16:43:36 2026 -0400 NFS: use TCP for MOUNT when xprtsec= selects TLS [ Upstream commit 72233aabc78cd0415c850641bc2a6e4fea23173f ] An NFSv2 or NFSv3 text mount that specifies xprtsec= but no mountproto= crashes in nfs_init_timeout_values(): RIP: 0010:nfs_init_timeout_values+0x10a/0x110 [nfs] Call Trace: nfs_mount+0x1c3/0x330 [nfs] nfs_try_get_tree+0x1e5/0x460 [nfs] nfs_get_tree+0x64d/0x6d0 [nfs] vfs_get_tree+0x2b/0xe0 vfs_cmd_create+0x5f/0xd0 vfs_fsconfig_locked+0x50/0x130 __se_sys_fsconfig+0x2f9/0x3a0 nfs_validate_transport_protocol() sets nfs_server.protocol to XPRT_TRANSPORT_TCP_TLS when xprtsec= is present, but the switch in nfs_set_mount_transport_protocol() has no case for that value. mount_server.protocol stays zero, and nfs_init_timeout_values() calls BUG() on a transport it does not recognize. mount.nfs always appends mountproto= after probing the server's rpcbind, so only a caller that bypasses it, such as "mount -i" or a program that drives fsconfig() directly, reaches the crash. Select TCP for MOUNT when the NFS transport is XPRT_TRANSPORT_TCP_TLS. nfs_mount() requests no transport security, so MOUNT already runs over plain TCP whenever mount.nfs supplies mountproto=tcp. Fixes: c8407f2e560c ("NFS: Add an "xprtsec=" NFS mount option") Signed-off-by: Chuck Lever Reviewed-by: Prabhakar Pujeri Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin commit ea80d8830b84277158a77074faf5456994cf3748 Author: Danish Khateeb Date: Thu Sep 24 07:09:57 2026 -0500 tools/nolibc: fix verrx() and errx() message formatting [ Upstream commit 6f114ae7b6006ca7cf72e3e3348d263bbfec4525 ] verrx() passes its va_list to warnx() instead of vwarnx(). warnx() is variadic, so it takes the va_list as its first and only argument, and the conversions in the format string print the va_list itself and then whatever is left in the following argument slots. On x86_64, for instance, errx(1, "int args: %d %d %d", 1, 2, 3); prints something like "int args: -1699009032 1 2", where the first number comes from the address of the va_list and changes from run to run, and errx(1, "%d %s", 1234, "foo"); crashes with SIGSEGV, as "%s" takes a leftover argument slot for the string. errx() goes through verrx(), so every message with arguments printed by either of them is wrong. Call vwarnx() from verrx(), as verr() calls vwarn(). Fixes: 9da0f529c089 ("tools/nolibc: add err.h") Assisted-by: LLM Signed-off-by: Danish Khateeb Link: https://patch.msgid.link/20260924120958.23698-2-danishkhateeb03@gmail.com Signed-off-by: Thomas Weißschuh Signed-off-by: Sasha Levin commit 68ad2892b7f0cada43f53882113d698795d90c4a Author: Syed Saba Kareem Date: Thu Sep 24 18:11:52 2026 +0530 ASoC: amd: acp: fix TAS2783 SoundWire codec unmet dependencies [ Upstream commit d06607bafb36abc14ed34c8adfb1239bebcd83d1 ] SND_SOC_AMD_LEGACY_SDW_MACH unconditionally selects SND_SOC_TAS2783_SDW, but that codec depends on SND_SOC_SDCA and EFI in addition to SOUNDWIRE. An unconditional select force-enables the codec even when those dependencies are not met, which the kernel test robot reported as unmet direct dependencies when EFI=n: WARNING: unmet direct dependencies detected for SND_SOC_TAS2783_SDW Depends on [n]: SOUND [=y] && SND [=y] && SND_SOC [=y] && SOUNDWIRE [=y] && SND_SOC_SDCA [=y] && EFI [=n] Selected by [y]: - SND_SOC_AMD_LEGACY_SDW_MACH [=y] && ... The other SoundWire codecs selected by this machine driver only depend on SOUNDWIRE, which the driver already depends on, so they select cleanly. SND_SOC_TAS2783_SDW is the only one that additionally needs the SDCA core and EFI (it reads speaker calibration data from EFI variables). SND_SOC_SDCA cannot simply be selected here, as that introduces a recursive Kconfig dependency (SOUNDWIRE depends on SND_SOC_SDCA_OPTIONAL, whose default pulls in SND_SOC_SDCA), and EFI is a platform feature that must not be selected by a driver. Instead, guard the select with the missing dependencies so the codec is only (and always) built when they are satisfied: select SND_SOC_TAS2783_SDW if SND_SOC_SDCA && EFI This keeps the TAS2783 SoundWire codec built together with the machine driver on platforms that can use it, while avoiding the unmet dependency when SND_SOC_SDCA or EFI is disabled. Fixes: 28114992dd2f ("ASoC: amd: acp: enable TAS2783 and add RT712-VB SoundWire machine") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202609182147.gfofWIXW-lkp@intel.com/ Signed-off-by: Syed Saba Kareem Link: https://patch.msgid.link/20260924124205.3376083-1-syed.sabakareem@amd.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5ce2d26056643df298a5ceedfadf024cbf67e587 Author: Thomas Falcon Date: Wed Sep 23 12:08:58 2026 -0500 perf mem: Fix size tracking for mem_lvl's in perf_script__meminfo_scnprintf() [ Upstream commit 06d5ce78e4fea2cf0738da903aa248a81101c155 ] When printing memory info in perf script, the entire size of the buffer is passed to perf_mem__lvl_scnprintf() instead of the remaining size. Pass the remaining buffer size instead. This issue was detected by sashiko during an internal code review. Fixes: fdefc3750e847a91 ("perf mem: Print memory operation type") Reviewed-by: Dapeng Mi Reviewed-by: Ian Rogers Reviewed-by: Namhyung Kim Cc: Leo Yan Assisted-by: Sashiko:gemini-3.1-pro-preview Signed-off-by: Thomas Falcon Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit b03ec0fd345d4d35c7c09fda3278984d56229b26 Author: Shengjiu Wang Date: Wed Sep 16 17:40:42 2026 +0800 ASoC: fsl_asrc: use regmap_write_bits to update clock source registers [ Upstream commit 92871abc1302b852b88d86114115f8fd6b50b9b9 ] After a warm reboot the REG_ASRCSR register may not be in its hardware reset state. regmap caches the register value as 0 (the assumed default), so when the desired clock source index is also 0, regmap_update_bits() skips the actual hardware write because it believes the register already holds the correct value. This leaves a stale clock source in the hardware. Replace regmap_update_bits() with regmap_write_bits() so that the masked fields are always written to hardware regardless of the cached value. Fixes: 3117bb3109dc ("ASoC: fsl_asrc: Add ASRC ASoC CPU DAI and platform drivers") Signed-off-by: Shengjiu Wang Reviewed-by: Chancel Liu Link: https://patch.msgid.link/20260916094043.1496709-1-shengjiu.wang@oss.nxp.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit f19a6264a62b910332a61523177b3cccf4bab46d Author: Kumar Kartikeya Dwivedi Date: Thu Sep 24 09:53:49 2026 +0200 bpf: Check fastcall stack contract once for all stack accesses [ Upstream commit ec3a69e7c021cd826be8886ba6af4ee3147788fb ] When the verifier inlines a bpf_fastcall helper or kfunc, it removes the spill/fill pairs that clang emitted around the call and lowers the subprogram's stack depth so that their slots are no longer part of the frame. This is only safe if nothing else accesses those slots or any slot below them. check_fastcall_stack_contract() enforces this: an access to that region from outside a fastcall pattern disables the rewrite for the subprogram. It is called from the four stack load and store paths, and two kinds of access escape it. Stack buffers passed to helpers and kfuncs are validated by check_stack_range_initialized(), which does not call it. If such a buffer is the only other access to the region, the rewrite is still applied, the JIT reserves a frame that does not contain the buffer, and the helper reads or writes live kernel stack below the program's frame. For example, without CAP_PERFMON: *(u64 *)(r10 - 8) = r1; call bpf_get_smp_processor_id; r1 = *(u64 *)(r10 - 8); r2 = 0; r3 = r10; r3 += -64; r4 = 8; call bpf_skb_load_bytes; is accepted with a stack depth of 0 instead of 64. Some buffers got the check indirectly. For constant-sized outputs in raw mode, mark_raw_stack() marks the buffer initialized through ordinary byte stores, which call the check. Commit 5da4a9f26fca ("bpf: Preserve stack initialization for generic output buffers") limited raw mode to programs that may read uninitialized stack, so outputs of programs without CAP_PERFMON lost the check, as in the example above. Buffers that never used raw mode have lacked the check since fastcall support was added: helper inputs such as a map key whose only store is a fastcall spill, variable-sized outputs, and buffers at a variable stack offset. check_stack_read_fixed_off() applies the check to the current frame, even when the pointer targets a caller's stack. A callee can therefore read a caller's fastcall spill slot without disabling the caller's rewrite: caller: r1 = 1; *(u64 *)(r10 - 8) = r1; call bpf_get_smp_processor_id; r1 = *(u64 *)(r10 - 8); r1 = r10; r1 += -8; call callee; callee: r0 = *(u64 *)(r1 + 0); The caller's spill and fill are removed and its stack depth drops to 0, but the verifier still tracks the slot as holding the spilled constant. The callee's load then reads kernel stack outside the caller's frame, while the verifier assumes r0 is 1. Every stack access first goes through check_stack_access_within_bounds(): loads and stores from check_mem_access(), helper and kfunc buffers from check_stack_range_initialized(), and the dynptr, iterator and irq flag slots that kfuncs initialize, whose handlers use check_mem_access(). It resolves the frame that owns the slots and the lowest offset the access can touch, and it is the only place where a frame's stack depth grows. Check the contract there, once for every access, and drop the calls from the stack read and write paths. Zero-sized buffers touch no stack and leave the rewrite enabled. Fixes: 5b5f51bff1b6 ("bpf: no_caller_saved_registers attribute for helper calls") Fixes: 5da4a9f26fca ("bpf: Preserve stack initialization for generic output buffers") Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Alexei Starovoitov Link: https://lore.kernel.org/bpf/85f9995a43edb70c76615280e103dc5325742e88330f36c97962ee35f17e3e32@mail.kernel.org Link: https://patch.msgid.link/20260924075352.2343553-2-memxor@gmail.com Signed-off-by: Sasha Levin commit 5964f8c8d9f1e54f0666b75315ad7037f6da9ce2 Author: Dmitrii Tulnov Date: Sat Sep 19 00:34:30 2026 +0300 kconfig: warn about malformed KCONFIG_PROBABILITY values [ Upstream commit 9f01cd3a324390b235c67ae4ca3d35085369ebdd ] randconfig checks the numeric range of each probability but does not validate where strtol() stops. For example, KCONFIG_PROBABILITY=50% is accepted as 50:0:0: the '%' is parsed repeatedly as zero. For the documented value 50, tristate y/m/n probabilities are 25%/25%/50%. With 50%, both y/m probabilities silently become zero, reducing the coverage of random configuration builds. Empty fields and extra fields are also accepted. Warn when the value does not follow the documented decimal format. For malformed inputs whose parsed probabilities are in range, preserve the existing interpretation unless KCONFIG_WERROR is set. In that case, exit with an error before writing the configuration. Leading whitespace and signs are accepted by strtol(), but also trigger the warning because they are outside the documented format. Keep the strtol() result as long until the range check. This rejects out-of-range values that narrowing to int previously made valid, such as 4294967296 becoming zero on a 64-bit host, regardless of KCONFIG_WERROR. Add regression tests for one warning per malformed input, preserved configurations, KCONFIG_WERROR, out-of-range values, the supported probability formats, and the documented empty-value default. Fixes: e43956e60769 ("kconfig: implement KCONFIG_PROBABILITY for randconfig") Assisted-by: LLM Signed-off-by: Dmitrii Tulnov Tested-by: Julian Braha Reviewed-by: Julian Braha Link: https://patch.msgid.link/20260918213430.3-1-tulnov.dl@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit d7957565e05797d1eb3ba7d3c585af17303d4717 Author: Lizhi Hou Date: Wed Sep 23 13:05:01 2026 -0700 accel/amdxdna: Preallocate hardware context schedulers [ Upstream commit f7afecd54296cf7ad6fa36f692d2a7427e32f25d ] The hardware context scheduler fence is exposed through drm_syncobj_add_point(). After a hardware context is destroyed, userspace can still call drm_sched_fence_get_timeline_name() on the fence through SYNC_IOC_FILE_INFO. This results in a use-after-free when accessing fence->sched->name. Preallocate hardware context schedulers and free them during device teardown instead. A destroyed hardware context no longer frees its scheduler, ensuring that the scheduler remains valid while its fences are still accessible. Fixes: aac243092b70 ("accel/amdxdna: Add command execution") Reported-by: Jonghyuk Kim(MalHyuk) Link: https://lore.kernel.org/dri-devel/20260902012712.880520-1-malhyuk97@gmail.com/ Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260923200501.281208-1-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit 0599c72779179a89d533e0de6069973bc84b7980 Author: Matteo Kloiber Date: Sun Sep 13 23:08:28 2026 +0200 rust: scatterlist: honor the device's maximum segment size [ Upstream commit c15c5befd6d6150e92ab7c6c7fde1088e0f543e6 ] SGTable::new() caps segment length at dma_max_mapping_size() only, which limits the DMA mapping path (e.g. swiotlb), not the device itself. The per-device limit from dma_set_max_seg_size() is ignored, so contiguous page segments can be longer than the declared max segment size, potentially causing problems for future drivers that use this abstraction. Fixes: 05aa6fb1c21d ("rust: scatterlist: Add abstraction for sg_table") Signed-off-by: Matteo Kloiber Reviewed-by: Alexandre Courbot Link: https://patch.msgid.link/20260913210828.125655-3-kernel@matt3o12.de Signed-off-by: Danilo Krummrich Signed-off-by: Sasha Levin commit 9676b8560acd5441ba7556f1efaba2a48f1ab2a3 Author: Florian Fainelli Date: Wed Aug 12 10:32:49 2026 -0700 um: Add definition of __NR_close_range for older host OSs [ Upstream commit 03dcf7bd302c9bae0c75a21a3004a44b4940317e ] __NR_close_range was introduced with 278a5fbaed89dacd04e9d052f4594ffd0e0585de ("open: add close_range()") which is present in Linux >= 5.9. Older hosts running a kernel version prior to that range currently fail to build due to that missing system call number definition. Fixes: f82a9e7b9fa9 ("um: fix execve stub execution on old host OSs") Signed-off-by: Florian Fainelli Link: https://patch.msgid.link/20260812173249.98435-1-florian.fainelli@broadcom.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit af461004a5d958de62f8685eb42e7a63b723d47d Author: Myeonghun Pak Date: Tue Sep 22 22:19:36 2026 -0400 mfd: da9150: Balance IRQ wake on teardown [ Upstream commit ef464f82f3aecad4071af71074b2ceb77ffbb609 ] DA9150 enables IRQ wake after registering its regmap IRQ chip, but does not disable it on a later probe failure or driver removal. This leaves the wake depth elevated after the handler is removed, and repeated bind attempts can accumulate the imbalance. Remember whether enabling IRQ wake succeeded and balance only a successful call. Remove MFD children first so their nested IRQ users are gone, then disable wake before removing the regmap IRQ chip. Preserve the existing non-fatal behavior when IRQ wake cannot be enabled. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: b8fce55c09d3 ("mfd: Add support for DA9150 combined charger & fuel-gauge device") Assisted-by: LLM Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://patch.msgid.link/20260923021936.957065-1-mhun512@gmail.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 72ced17fa98c6e8dd68503d060a22dbe1dcffb8d Author: Myeonghun Pak Date: Sat Sep 12 15:12:23 2026 -0400 mfd: intel_quark_i2c_gpio: Manage the fixed-rate clock [ Upstream commit 14a7cf1a3730c7c2393ef5a226e90baf61aa8a9f ] The I2C clock is allocated by clk_register_fixed_rate(), but cleanup uses clk_unregister(), leaving the fixed-rate provider allocation behind. Manage the provider with devm_clk_hw_register_fixed_rate() and its lookup with devm_clk_hw_register_clkdev(). Managed resources release the lookup before the provider, after the MFD children have been removed. Remove the manual clock cleanup and the private structure that only stored the clock and lookup pointers. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 60ae5b9f5cdd ("mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD Driver") Assisted-by: OpenAI:GPT-5.6 Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://patch.msgid.link/20260912191223.46136-1-mhun512@gmail.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 725b4ba6e592b834bf933a324bd571977186b348 Author: Eric Anderson Date: Tue Sep 8 12:20:39 2026 -0700 mfd: rk8xx: Register poweroff handler in atomic phase [ Upstream commit 128115b520c6b61afbffd01809cfc3e8cbb78516 ] This fixes a regression from v6.1 to v6.6 where Google Veyron devices (rk3288) would not power off after being shut down. Prior to commit 4fec8a5a85c4 ("mfd: rk808: Convert to device managed resources"), pm_power_off was called by legacy_pm_power_off() which itself was registered using SYS_OFF_MODE_POWER_OFF. But in that commit the registration of rk808_power_off() moved to SYS_OFF_MODE_POWER_OFF_PREPARE. At the very least, the code should be consistent between SYS_OFF_MODE_POWER_OFF and SYS_OFF_MODE_RESTART; both should be *_PREPARE or both not. It appears interrupt delivery is already shut down (but not disabled) when SYS_OFF_MODE_POWER_OFF_PREPARE is triggered, so regmap_update_bits() in rk808_power_off() does not complete successfully. Registering rk808_power_off() as SYS_OFF_MODE_POWER_OFF runs with interrupts disabled which causes polling I/O to be used instead, and the device to power down. Fixes: 4fec8a5a85c4 ("mfd: rk808: Convert to device managed resources") Signed-off-by: Eric Anderson Assisted-by: Gemini:gemini-3.5-flash Link: https://patch.msgid.link/20260908-veyron-shutdown-v1-1-066ecb80f5f2@gmail.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit f0f44dd03f6e5e6145f5ee448e09d631257e2b54 Author: Charles Keepax Date: Fri Sep 4 14:12:43 2026 +0100 mfd: cs42l43: Move cancel_work_sync() into remove [ Upstream commit 86bcfdc6f1e1f8943fbe12256b3c89a66ebbad03 ] The cs42l43 driver kicks off a work item waiting for the device to appear on the SoundWire bus, once the device appears the MFD children are added and the clean up is then done through devres. As the work is synchronised in from the devres clean up this could lead to new devres items being added after the clean up has started, if the driver is removed before the work has fully completed. The work should be synchronised before any devres clean up is started. Fixes: 0f35dc4bd50d ("mfd: cs42l43: Use devres for remove as well") Signed-off-by: Charles Keepax Link: https://patch.msgid.link/20260904131243.755201-1-ckeepax@opensource.cirrus.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 57ee70b22dc750290dd504d814b952737a0f870b Author: Jiale Yao Date: Thu Sep 24 18:51:23 2026 +0800 ext2: drain in-flight DIO before buffered write fallback [ Upstream commit 1e2ef9f221e142ed19d874a71b2cae7fabbaf138 ] An asynchronous direct write can remain in flight after the inode lock is released. If another direct write falls back to buffered I/O while the first write is still pending, generic_perform_write() can dirty pages before the first write completes its post-I/O page cache invalidation. The invalidation then finds dirty pages, reports a page cache invalidation failure, and records -EIO in the mapping error sequence. A later fsync() therefore returns -EIO. Commit 15cdefd0c0522f9d5e12d947fa04f4c11649b699 ("ext4: drain in-flight DIO before buffered write fallback") fixed the same race in ext4. Ext2 has an equivalent fallback after iomap_dio_rw() returns -ENOTBLK or a short write, but does not drain other in-flight DIO before dirtying the page cache. Wait for in-flight DIO before calling generic_perform_write() in the fallback path. A reproducer using concurrent AIO direct writes and buffered fallback triggered the following warning and made a subsequent fsync() return -EIO: Page cache invalidation failure on direct I/O. Possible data corruption due to collision with buffered I/O! Fixes: fb5de4358e1a ("ext2: Move direct-io to use iomap") Link: https://lore.kernel.org/r/20260629113827.4074335-3-libaokun@linux.alibaba.com Signed-off-by: Jiale Yao Link: https://patch.msgid.link/20260924105125.577714-2-yaojiale02@163.com Signed-off-by: Jan Kara Signed-off-by: Sasha Levin commit c5ebab6a5a935df7a6da392e0451b87f6b6ba29b Author: Karl Mehltretter Date: Sat Sep 12 01:18:50 2026 +0200 iommufd: Fix iommufd_hw_capabilities reference in kernel-doc [ Upstream commit 54dadb030c7e2350957855d3995de05ae02c2e66 ] The kernel-doc comment of struct iommu_hw_info refers to iommu_hw_capabilities, which does not exist. The name is iommufd_hw_capabilities. Say iommufd_hw_capabilities. Fixes: 7623683857e5 ("iommufd: Add capabilities to IOMMU_GET_HW_INFO") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260911231850.20737-1-kmehltretter@gmail.com Reviewed-by: Kevin Tian Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin commit d3678e7f422f3b3b8dabd3d05728e9455f9cd46d Author: Lad Prabhakar Date: Mon Sep 21 12:01:44 2026 +0100 arm64: dts: renesas: r9a09g087: Drop unwired ADC interrupts [ Upstream commit 84cfe37c261eef10ea4030ae75bc038e04ae26a1 ] Remove the compare match and compare mismatch interrupts from the ADC device nodes, as these interrupts are not wired to the GIC according to the hardware manual Rev.1.30. Fixes: 4ed27b4fdeb1 ("arm64: dts: renesas: r9a09g087: Add ADCs support") Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20260921110144.44425-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin commit d8a0c3f93154aeacdc8a89c862effb2184bae82b Author: Lad Prabhakar Date: Mon Sep 21 12:01:43 2026 +0100 arm64: dts: renesas: r9a09g077: Drop unwired ADC interrupts [ Upstream commit b508d6fb28fe406c12e2070c53db79c57143d592 ] Remove the compare match and compare mismatch interrupts from the ADC device nodes, as these interrupts are not wired to the GIC according to the hardware manual Rev.1.30. Fixes: a82a42963c89 ("arm64: dts: renesas: r9a09g077: Add ADCs support") Signed-off-by: Lad Prabhakar Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20260921110144.44425-3-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin commit 523b65e75c7d163dc84a92836c85bb9fd73568ba Author: Marek Vasut Date: Thu Sep 17 00:07:45 2026 +0200 arm64: dts: renesas: ironhide: Align inline ECC carveout sizes with bootloader settings [ Upstream commit 47ecb59d32cd4fd854aa64bf7e08a74fb97a744a ] The DBSC5 DRAM controller protects DRAM content using inline ECC. The current set of carveouts follows SoC documentation, which describes the three trailing carveouts as larger than the rest. Both the downstream IPL and mainline U-Boot on RSIP configure the ECC carveouts to the same size for all eight carveouts. Align the carveout sizes with the controller configuration set by the bootloader. This makes 1638 MiB of DRAM available for each of the three carveouts, which adds up to a total of 4915 MiB of newly accessible DRAM on this platform with this fix. Making this memory available does not pose a danger, since the current set of carveouts were carefully set to a larger size to prevent any possible issues until a confirmation from the hardware team become available, that it is safe to apply these less restrictive settings. Fixes: 6fa6ee724d8d ("arm64: dts: renesas: ironhide: Describe inline ECC carveouts") Signed-off-by: Marek Vasut Tested-by: Geert Uytterhoeven Reviewed-by: Geert Uytterhoeven Link: https://patch.msgid.link/20260916220801.240796-1-marek.vasut+renesas@mailbox.org Signed-off-by: Geert Uytterhoeven Signed-off-by: Sasha Levin commit ff3954ae174b00afb32f9740b32955885bf89671 Author: Rong Zhang Date: Mon Sep 21 03:40:17 2026 +0800 leds: class: Remove hardware control trigger when writing brightness [ Upstream commit 96b4ddd6d2d8c645d672f1f26130685d9f40cf2f ] Since commit b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED"), the brightness attribute becomes write-only when the LED is controlled fully by the hardware. A write-only attribute is very confusing. Moreover, most LED drivers set hardware brightness innocently with the side effect of disabling hardware control, but the hardware control trigger remains active, resulting in the software and hardware being out of sync. Fix it by removing the hardware control trigger when writing the brightness attribute. This should also match the semantics of hardware control: When the LED is in hw control, no software blink is possible and doing so will effectively disable hw control. Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED") Acked-by: Ike Panhc Signed-off-by: Rong Zhang Link: https://patch.msgid.link/20260921-leds-trigger-hw-changed-v7-3-fe3cdb6dec51@rong.moe Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 2d977ceb2ba8506dae02c1f93348aedbe44f5ab6 Author: Rong Zhang Date: Mon Sep 21 03:40:16 2026 +0800 leds: trigger: Move led_trigger_is_hw_controlled() to the right place [ Upstream commit 7879d6277485697cf37eb3c1b89ce260d8c67e4f ] Currently led_trigger_is_hw_controlled() is placed at led-class.c, which is not an right place as it falls into the triggers namespace and does triggers stuff. Move it into led-triggers.c, and split it into locked and unlocked variant for convenience. Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED") Acked-by: Ike Panhc Signed-off-by: Rong Zhang Link: https://patch.msgid.link/20260921-leds-trigger-hw-changed-v7-2-fe3cdb6dec51@rong.moe Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit da9a0890591e37e648a4ca9447d7ac3a5c3aab99 Author: Rong Zhang Date: Mon Sep 21 03:40:15 2026 +0800 leds: class: Always protect brightness_show() with led_access [ Upstream commit 6887f40dadb5a263de1d9e4b5517400c08089d35 ] The led_classdev_register_ext() protects transient states when registering with the led_access mutex and relies on all sensitive sysfs attribute callbacks holding the mutex to prevent exposing transient states. The Fixes: commit broke this as it accessed trigger_lock without holding led_access. Fix it by protecting brightness_show() with led_access in all code paths. Fixes: b819dc7d8fb2 ("leds: core: Report ENODATA for brightness of hardware controlled LED") Signed-off-by: Rong Zhang Link: https://patch.msgid.link/20260921-leds-trigger-hw-changed-v7-1-fe3cdb6dec51@rong.moe Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 35a5c4a49cee825b90df8686223c215dd5b915dc Author: Hui Su Date: Wed Sep 23 09:42:43 2026 +0900 bpftool: Fix sparse CPU IDs in prog profile [ Upstream commit edc071d7b3aaae8047a12c21b02cc537557aacee ] bpftool prog profile currently treats the number of possible CPUs as both the logical CPU ID range and the stride of the perf event array. That misses valid logical CPUs when the possible CPU mask is sparse, such as 0,2-3, and can use incorrect PERF_EVENT_ARRAY keys. Keep the compact possible CPU count for per-CPU result buffers, while enumerating the actual logical CPU IDs when creating per-CPU perf event groups. Use the maximum logical CPU ID plus one as the metric stride in the PERF_EVENT_ARRAY. This keeps the current per-CPU event grouping intact while separating the compact per-CPU buffer index from the logical CPU ID and event-array key. Report the logical CPU ID when a per-CPU event was not counted. Fixes: 47c09d6a9f67 ("bpftool: Introduce "prog profile" command") Signed-off-by: Hui Su Link: https://lore.kernel.org/bpf/20260813160858.1042834-3-sh_def@163.com/ Link: https://lore.kernel.org/bpf/20260923004243.969919-3-sh_def@163.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 435960881a1cd74b0c51f19efe6c44e5591be48b Author: Mykyta Yatsenko Date: Wed Sep 16 12:26:42 2026 -0700 bpftool: Scale counters and report cycles per run [ Upstream commit c2c8bd265627364a8257c413e697fee8f2605197 ] Perf counters undercount when the PMU multiplexes them. Scale each per-CPU value before aggregation. Per-CPU event groups make PMU ratios use matching scheduling intervals. Keep run_cnt as the total number of program executions, independent of counter scheduling. Keep JSON value raw, report the scaled value in value_scaled, and document the output. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260916-bpftool_cyles_per_run-v4-3-f2de02c480d5@meta.com Stable-dep-of: edc071d7b3aa ("bpftool: Fix sparse CPU IDs in prog profile") Signed-off-by: Sasha Levin commit bce942dc7349aae3f89a1571fd053bba506e8670 Author: Mykyta Yatsenko Date: Wed Sep 16 12:26:41 2026 -0700 bpftool: Group profile events by CPU [ Upstream commit 6b5fe4b6d5ae5fac328416b061e5416d68aec762 ] Independently scheduled perf events can cover different intervals, making derived ratios inconsistent. Open one event group per CPU and enable it only after all selected metrics have joined. Fail the profile setup when a selected event cannot join its group. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260916-bpftool_cyles_per_run-v4-2-f2de02c480d5@meta.com Stable-dep-of: edc071d7b3aa ("bpftool: Fix sparse CPU IDs in prog profile") Signed-off-by: Sasha Levin commit 087b2b920c05ecc4558fc7349d4bee8fbdb302a9 Author: Mykyta Yatsenko Date: Wed Sep 16 12:26:40 2026 -0700 bpftool: Accept zero perf counter snapshots [ Upstream commit b2cf39f53478fd4b04d2f04585c21b3d91d7042f ] A perf counter can be zero at fentry when PMU multiplexing has not scheduled the event. Do not reject that sample. Use enabled time to distinguish a successful snapshot. Read directly into the per-CPU map value. Signed-off-by: Mykyta Yatsenko Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260916-bpftool_cyles_per_run-v4-1-f2de02c480d5@meta.com Stable-dep-of: edc071d7b3aa ("bpftool: Fix sparse CPU IDs in prog profile") Signed-off-by: Sasha Levin commit 5215c762a95dfa21f7ac7d43964e5af70899ea98 Author: Hui Su Date: Wed Sep 23 09:42:42 2026 +0900 bpftool: Fix CPU IDs in per-CPU map output [ Upstream commit dbf8cef936c7783ca909c38097a69f73173a19a7 ] bpftool uses dense per-CPU value-buffer slots when printing per-CPU map values. It also uses the slot index as the CPU ID, which produces incorrect labels when the possible CPU mask is sparse, such as 0,2-3. Parse the possible CPU mask and use the corresponding logical CPU ID in plain, JSON, and BTF-formatted output. Keep the dense slot index for accessing the per-CPU value buffer. Pass the parsed CPU count together with the CPU ID array so that the printed CPU IDs and loop bounds come from the same possible-CPU mask. Propagate CPU-ID lookup and map output errors through the shared output path to its callers. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Hui Su Link: https://lore.kernel.org/bpf/20260813155131.1022745-3-sh_def@163.com/ Link: https://lore.kernel.org/bpf/20260923004243.969919-2-sh_def@163.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 6403c2d2503edda61c24b75b178b62b558232a59 Author: Yuan Chen Date: Thu Sep 24 10:37:36 2026 +0800 bpf: Keep target extended until its last freplace link detaches [ Upstream commit c43c348a84460b003fa757dd43d8c89848ae220d ] The is_extended / prog_array_member_cnt protocol introduced by commit d6083f040d5d ("bpf: Prevent tailcall infinite loop caused by freplace") keeps a prog extended by a freplace program out of prog_array maps, and vice versa: once a tail call re-enters an extended subprogram, its tail_call_cnt resets on every execution and the loop never terminates. But is_extended is a plain boolean, while one target prog can carry several freplace links at the same time, one on its entry and one on a global subprogram. __bpf_trampoline_unlink_prog() cleared is_extended whenever *any* freplace link detached, so detaching one of two links re-armed the unbounded loop through the remaining one. Replace the is_extended boolean with a count of the freplace links attached to each target prog, so the target stays extended until its last link detaches. Also rename bpf_freplace_check_tgt_prog() to bpf_freplace_link_tgt_prog(), as the helper has never been a pure check: it reserves the target prog on success. Fixes: d6083f040d5d ("bpf: Prevent tailcall infinite loop caused by freplace") Signed-off-by: Yuan Chen Acked-by: Jiri Olsa Link: https://lore.kernel.org/bpf/20260924023737.1140521-2-chenyuan_fl@163.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 674179ddb1ad7c97b3d99cae098850a69b40cc90 Author: Danish Khateeb Date: Wed Sep 23 15:56:21 2026 -0500 tools/nolibc: fix WIFSIGNALED() for status 0 [ Upstream commit 368fae47c6cae28a312c5dc86e5bdb8f9369fd26 ] WIFSIGNALED() needs the subtraction to wrap around for status 0, so that only 1 to 0xff, a terminating signal with or without the core dump flag, pass the check. But status is an int, and 0 - 1 is -1, which is less than 0xff. A child that exits with 0 is therefore reported as both exited and killed, and a caller that tests WIFSIGNALED() first sees "killed by signal 0". Make the subtraction unsigned, as musl does in the same macro. Fixes: 8c934d4822c7 ("tools/nolibc: add helpers for wait() signal exits") Assisted-by: LLM Signed-off-by: Danish Khateeb Link: https://patch.msgid.link/20260923205622.1123270-2-danishkhateeb03@gmail.com [Thomas: Drop stable@ Cc] Signed-off-by: Thomas Weißschuh Signed-off-by: Sasha Levin commit 8c617d7ebf32a967ce033dd24e87d3424628f920 Author: Srinivas Kandagatla Date: Tue Sep 22 23:11:23 2026 +0100 clk: qcom: fix SM6115 lpasscc register offset [ Upstream commit 689364ac19e4680e09d100c743f8797da127609a ] For some reason we ended with incorrect register offset for soundwire tx controller reset and the regmap register max was also incorrect it was 0x1000 instead of 0x12000 which is full register range for this IP. This was somehow compenseated in DT reg property which got it working so far. Fix this by correcting the actual offset and max registers as per SoC documentation. Fixes: b076b995e225 ("clk: qcom: Add SM6115 LPASSCC") Cc: Konrad Dybcio Signed-off-by: Srinivas Kandagatla Reviewed-by: Alexey Klimov Link: https://patch.msgid.link/3a4e8d1115a46c45cb34193b6ceeb02891fdf716.1790114902.git.srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit d7e9a50bf2e92335d2af021e091cf695ce9a8576 Author: Sivansh Gupta Date: Fri Aug 21 10:22:15 2026 +0530 clk: qcom: Fix CLK_GLYMUR_GPUCC default and CLK_GLYMUR_EVACC duplicate [ Upstream commit 748f9caa7ab158598295f6c195e8a2bcbbace841 ] Commit 6b150572bb76 ("clk: qcom: Add defaults for desired arm64 drivers") missed adding a defaults for CLK_GLYMUR_GPUCC and created a duplicated for CLK_GLYMUR_EVACC instead. The original patch series did't have this problem and was introduced during the merge. Fix this by removing the duplicate and adding a default for CLK_GLYMUR_GPUCC. Fixes: 6b150572bb76 ("clk: qcom: Add defaults for desired arm64 drivers") Signed-off-by: Sivansh Gupta Reviewed-by: Pankaj Patil Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20260821045214.2623299-2-sivansh.gupta@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit ff94db2cd6c99f930e4b53f24b8602a8d8dec2d1 Author: Esteban Urrutia Date: Mon Jul 13 23:28:19 2026 -0400 clk: qcom: alpha-pll: Check Lucid Ole PLL status before configuring [ Upstream commit eb34e2804ce4ea56efb741e23d598469274a2f94 ] On some platforms such as SM8475, not doing this may result in graphical glitches when the mdss driver takes over. This fixes the aforementioned issue. Fixes: 3132a9a11e57 ("clk: qcom: clk-alpha-pll: Add support for lucid ole pll configure") Signed-off-by: Esteban Urrutia Reviewed-by: Konrad Dybcio Suggested-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260713-sm8450-qol-dispcc-v3-3-56fd05822270@proton.me Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 59af935a1de01138c84f65c87efc3b0cd0559a18 Author: Esteban Urrutia Date: Mon Jul 13 23:28:17 2026 -0400 clk: qcom: dispcc-sm8450: Fix disp_cc_mdss_mdp_clk_src ops [ Upstream commit 8464e2284fec42d9fd05f3109d8b209d65864ece ] If the clock frequency is changed at registration time, a flicker will be visible at boot. Switching to clk_rcg2_shared_no_init_park_ops fixes this. Fixes: 16fb89f92ec4 ("clk: qcom: Add support for Display Clock Controller on SM8450") Reviewed-by: Konrad Dybcio Signed-off-by: Esteban Urrutia Link: https://lore.kernel.org/r/20260713-sm8450-qol-dispcc-v3-1-56fd05822270@proton.me Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit e6c6bfda3a3ad59d890557e0c927a5212e9a50c0 Author: Taniya Das Date: Sat Aug 1 19:43:53 2026 +0530 clk: qcom: nwgcc-nord: Add video axi clock resets for Nord [ Upstream commit 6f85eaa506e4b733d9537be85f99f1b14b10727f ] The global clock controller video axi reset clocks are required by the video SW driver to assert and deassert the clock resets during their power down sequence. Hence add these clock resets. Fixes: a4f780cd5c7a ("clk: qcom: gcc: Add multiple global clock controller driver for Nord SoC") Signed-off-by: Taniya Das Reviewed-by: Dmitry Baryshkov Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20260801-nord_videocc_camcc-v2-2-674d7718e41f@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit ccd0960b6a0ecd138e129a9430888f3857d0e4b0 Author: Oualid Derouiche Date: Mon Sep 14 15:46:17 2026 +0200 arm64: dts: imx8mp-kontron: Fix LVDS clock frequency for DL device [ Upstream commit a5f316e602d3f5852fe2f88226fe64c8a495f479 ] The panel needs a pixel clock of 50 MHz, which means the LDB serializer has to run at 50 MHz * 7 = 350 MHz. The LDB rate itself is set by the fsl-ldb driver, but VIDEO_PLL1 needs to be pinned to 700 MHz, so that both the LDB clock (/2) and the pixel clock (/14) can be derived from it exactly. Fixes: 946ab10e3f40 ("arm64: dts: Add support for Kontron OSM-S i.MX8MP SoM and BL carrier board") Signed-off-by: Oualid Derouiche Signed-off-by: Frieder Schrempf Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 236d300c6ba7c93969ae492a84b081040a4427aa Author: Vincent Jardin Date: Mon Sep 14 23:01:34 2026 +0200 dt-bindings: vendor-prefixes: add Free Mobile [ Upstream commit aa906abf611c7f37c0fe9171c1d33c40270aa5fe ] Free Mobile is a French mobile network operator. Add its vendor prefix, used by the Nodebox v3 CPU Module (freemobile,nbxv3). Acked-by: Krzysztof Kozlowski Signed-off-by: Vincent Jardin Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 0165dc37e7a3c76bf1f9f388228254c691f83c8b Author: Georgios Androutsopoulos Date: Tue Sep 8 18:56:15 2026 -0400 rust: clk: document overflow panics in `Hertz` constructors [ Upstream commit 45a68afbd4b632538a0956ba783fca45b8ceb446 ] `Hertz::from_khz()`, `from_mhz()` and `from_ghz()` multiply their argument by 1_000, 1_000_000 and 1_000_000_000 respectively without checking for overflow. When `CONFIG_RUST_OVERFLOW_CHECKS` is enabled, each panics once its argument exceeds `c_ulong::MAX` divided by that factor. None of the three documents this. The panic occurs only at runtime, when the argument is not a constant expression. Add the missing `# Panics` sections stating the bound for each unit. Fixes: d01d70205601 ("rust: clk: Add initial abstractions") Signed-off-by: Georgios Androutsopoulos Reviewed-by: Alexandre Courbot Acked-by: Miguel Ojeda Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit f76834e550a9d937ed5d9089d0eba4f5f89a29c5 Author: Srinivasan Shanmugam Date: Fri Sep 18 10:44:39 2026 -0400 drm/amd/display: Fix null deref of link_enc in dce110_enable_tmds_link_output [ Upstream commit b51576a5d53eaf53e07b07c4841f6981e542b63c ] Smatch reports that link->link_enc is unconditionally dereferenced at the top of dce110_enable_tmds_link_output() while the later setup_ri_pj_check_in_sw_or_hw_mode calls guard against it being NULL, making those checks contradictory. Add an early return when link_enc is NULL and drop the redundant NULL checks from the two call sites that follow, since link_enc is guaranteed non-NULL past the guard Fixes: 992694ad2858 ("drm/amd/display: Enable DCN6 sources compilation") Reported-by: Dan Carpenter Cc: Aurabindo Pillai Cc: Roman Li Cc: Ivan Lipski Cc: Dan Wheeler Cc: Alex Hung Cc: Tom Chung Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Hung Reviewed-by: Fangzhi Zuo Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 69c40b908412f90c501b855304809450531af92c Author: Fangzhi Zuo Date: Wed Sep 9 20:26:03 2026 -0400 drm/amd/display: Restore FreeSync VCP code check for HDMI/PCON sinks [ Upstream commit e4dca268eea60bcae566262daecc5e067799528d ] [WHAT] Folding the MCCS FreeSync checks into the do_mccs block dropped the other half of the original condition: the check that clears freesync_capable for HDMI or PCON-in-whitelist sinks that expose no EDID FreeSync VCP code. That check does not depend on the MCCS caps and must run regardless of do_mccs. As a result, when do_mccs is false such a sink without a FreeSync VCP code is still reported as FreeSync-capable. [HOW] Restore the VCP code check outside the do_mccs block so it is evaluated whether or not MCCS caps were read. Fixes: 115bf5ca318e ("drm/amd/display: Consult MCCS FreeSync cap only if requested & supported") Reviewed-by: Roman Li Reviewed-by: Alex Hung Signed-off-by: Fangzhi Zuo Signed-off-by: George Zhang Tested-by: Dan Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 7ad572dfadd1c4d6b39c0309cb8d300d4982d06b Author: Fangzhi Zuo Date: Mon Jul 27 20:37:30 2026 -0400 drm/amd/display: Force FreeSync range minimum on quirky panels [ Upstream commit 7ea37c0f067875911f3954133fb5ace0bc518ba3 ] [why] Some panels advertise a FreeSync range minimum that does not operate reliably at the low end: - X34GS (EDID panel id ACR 0x08AF) reports a minimum that can flicker or drop out when the refresh rate approaches the reported minimum. - 34w-30 (EDID panel id LEN 0x66F1) reports a 48 Hz minimum over DisplayPort, but the panel fails to light up at that minimum, resulting in a black screen. Forcing the minimum to 60 Hz avoids the black screen and lets the display light up normally. [how] - Add a force_freesync_min_hz field to struct dc_panel_patch. - Add apply_edid_quirks() cases keyed on the affected panel ids that set force_freesync_min_hz (55 Hz for the X34GS, 60 Hz for the G34w-30). - In amdgpu_dm_update_freesync_caps(), when the quirk is set and the sink is otherwise FreeSync capable, clamp the reported VRR range minimum (min_vfreq and monitor_range.min_vfreq) to the quirked value. - Add a KUnit test covering the new quirk. Reviewed-by: George Zhang Signed-off-by: Fangzhi Zuo Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Stable-dep-of: e4dca268eea6 ("drm/amd/display: Restore FreeSync VCP code check for HDMI/PCON sinks") Signed-off-by: Sasha Levin commit 17975e158bfe7f71926a04223ef28d615e4539c5 Author: Linus Walleij Date: Fri Sep 18 00:51:05 2026 +0200 ARM: dts: ux500: Convert HREF audio to audio-graph-card2 [ Upstream commit f9b2262d1edba1b6c0abc12118105f8fa200980a ] Describe the HREF500 and HREF520 sound hardware with two-link audio graph cards in their PMIC-specific HREF DTSIs, and name the card HREF-500. Connect MSP1 to codec DAI 0 for playback and MSP3 to codec DAI 1 for capture. Describe the DSP_A format, codec-provided bit and frame clocks, 16-by-16-bit TDM frame and active slots on the graph endpoints. Keep the clocks running continuously, matching the legacy machine driver's normal one- and two-channel mode. Keep each complete card, including its endpoint graph, connector widgets and routes, in the existing PMIC-specific HREF DTSI. The AB8500 variant exposes six digital microphone endpoints. AB8505 has neither the digital microphone interface nor its VDMIC regulator, so leave these endpoints out of HREF520 and remove its stale regulator and pin configuration nodes. Select ULPCLK as the fixed parent of the codec audio clock in the HREF-specific codec DTSIs. This replaces the machine driver clock control with declarative board policy. Fixes: 4ecae2ae9535 ("ARM: dts: ux500-href: Switch HREF520 to AB8505") Assisted-by: LLM Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit bb6638ff33836fd6fe0c1f645ddedcfa9ba0d05c Author: Lijo Lazar Date: Thu Sep 3 11:22:10 2026 +0530 drm/amdgpu: Move GC v12.1 spm vmid init to hw init [ Upstream commit 52a484f3ef5b36c063d8fca7b8763c1a9676c625 ] GC reset is not released during sw init and hence it shouldn't be accessed. Move spm vmid programming to hw init phase. This programming may later be overridden with the job's vmid. Fixes: ad5f1ee0a9b0 ("drm/amdgpu: Add initial support for gfx v12_1") Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 733c0e0b755f443c676ea635f2b538994fe56a98 Author: Lijo Lazar Date: Tue Jul 21 21:30:34 2026 +0530 drm/amdgpu: Add workaround to enable GCv12.1 MGCG [ Upstream commit 67f7737a13de7fecab9726cff58229af25ffed71 ] A workaround sequence which toggles MGCG override is required to enable hardware MGCG. As this is not the final solution, don't change the CGCG flags. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Stable-dep-of: 52a484f3ef5b ("drm/amdgpu: Move GC v12.1 spm vmid init to hw init") Signed-off-by: Sasha Levin commit e5955de65bf1b6e205f82969014e37a468dab6e4 Author: Le Ma Date: Thu May 7 19:38:44 2026 +0800 drm/amdgpu: disable GFX clockgating for GC 12.1.0 [ Upstream commit 7c00e5859b3bd232b2eceaafad4067fbfa46aeca ] RLC fw disables GFX CGCG and CGLS on GC 12.1.0 by default, so clear the corresponding CG flags and keep GUI idle interrupts disabled during gfx init. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher Stable-dep-of: 52a484f3ef5b ("drm/amdgpu: Move GC v12.1 spm vmid init to hw init") Signed-off-by: Sasha Levin commit bef65ea4418486a5299013bb73f2bc30daa63c42 Author: Even Xu Date: Tue Sep 22 10:54:37 2026 +0800 HID: Intel-thc-hid: Intel-quickspi: Use hid_safe_input_report() [ Upstream commit 291f4f310cc18ff8f5addbc3c9fbe33877283ec7 ] Replace the deprecated hid_input_report() with hid_safe_input_report(), which takes the allocated size of the input report buffer and allows hid-core to validate the reported data length against the actual buffer size. Track the allocated size of qsdev->input_buf in the new input_len field and pass it through quickspi_hid_send_report() to hid_safe_input_report() to prevent potential out-of-bounds reads. Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()") Signed-off-by: Even Xu Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit f011c23a7ed77777ee614c4355703d47e29dd05d Author: Even Xu Date: Tue Sep 22 10:54:36 2026 +0800 HID: Intel-thc-hid: Intel-quicki2c: Use hid_safe_input_report() [ Upstream commit 48c72318ef1e9017b6c34cf73eed453d0dc9c2d4 ] Replace the deprecated hid_input_report() with hid_safe_input_report(), which takes the allocated size of the input report buffer and allows hid-core to validate the reported data length against the actual buffer size. Track the allocated size of qcdev->input_buf in the new input_len field and pass it through quicki2c_hid_send_report() to hid_safe_input_report() to prevent potential out-of-bounds reads. Fixes: 0a3fe972a7cb ("HID: core: Mitigate potential OOB by removing bogus memset()") Signed-off-by: Even Xu Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit d0b0fa806473b0e90d5944ca3e1de0e61b0076b2 Author: Varun Gupta Date: Mon Sep 21 11:56:49 2026 +0530 drm/pagemap: Drop ratelimiting from dev_unhold_work debug trace [ Upstream commit 0a6310dde13dca8252a48ec8e2e65752c0fced86 ] Reference-drop trace in drm_pagemap_dev_unhold_work() was changed from drm_dbg() to drm_dbg_ratelimited() to reduce serial console bottlenecks. However, when the ratelimit kicks in, the kernel's ratelimiting subsystem logs a "callbacks suppressed" notification at the KERN_WARNING level. Revert the trace macro back to drm_dbg() Fixes: b66b036c959f ("drm/pagemap: Prevent CPU stalls during unbounded pagemap teardown") Signed-off-by: Varun Gupta Reviewed-by: Thomas Hellström Acked-by: Maxime Ripard # For merging through drm-xe only. (IRC) Signed-off-by: Thomas Hellström Link: https://patch.msgid.link/20260921062648.1166903-2-varun.gupta@intel.com Signed-off-by: Sasha Levin commit 5c455251ccab8abc7f66f9b54c0491a63fb8b94f Author: Zongmin Zhou Date: Thu Aug 27 09:45:24 2026 +0800 serial: sifive: fix off-by-one in console port bounds check [ Upstream commit bf961847813d9edcb5a9c089714069428d141fa9 ] sifive_serial_console_ports[] is sized SIFIVE_SERIAL_MAX_PORTS (8), so valid indices are 0..7. The bounds check in sifive_serial_probe() uses "id > SIFIVE_SERIAL_MAX_PORTS", which lets id == 8 pass and causes an out-of-bounds write in __ssp_add_console_port() through sifive_serial_console_ports[ssp->port.line]. Fix the check to use >= instead, matching the check already used in sifive_serial_console_setup(). Fixes: 45c054d0815b ("tty: serial: add driver for the SiFive UART") Signed-off-by: Zongmin Zhou Link: https://patch.msgid.link/20260827014524.19375-1-min_halo@163.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 4161d943fe8f28ae31482845a433f253fbde5d63 Author: Malathi A Date: Thu Sep 17 04:05:09 2026 +0000 serial: 8250_uniphier: Use devm_clk_get_enabled() [ Upstream commit 790aacba3fdfd3a227cdd5e4952c596ed66a0ed8 ] uniphier_uart_probe() enables priv->clk by hand and is then responsible for disabling it again on every error path. It misses one: when uart_read_port_properties() fails the function returns directly, leaving the clock prepared and enabled. The neighbouring path, taken when serial8250_register_8250_port() fails, does call clk_disable_unprepare(), which shows the leak is an oversight rather than intent. Rather than adding another manual unwind, switch to devm_clk_get_enabled() so the clock is released by devres. That removes the error path entirely, along with the explicit disables in the register failure path and in uniphier_uart_remove(). The clock is still disabled and re-enabled by hand across system sleep, which stays balanced: only SET_SYSTEM_SLEEP_PM_OPS is used, so the device cannot be unbound while suspended and devres always sees an enabled clock at detach. Found by smatch: drivers/tty/serial/8250/8250_uniphier.c:232 uniphier_uart_probe() warn: 'priv->clk' from clk_prepare_enable() not released on lines: 205. Fixes: 26e8349c0d76 ("serial: 8250_uniphier: Switch to use uart_read_port_properties()") Signed-off-by: Malathi A Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20260917040511.103232-1-malathi.a2000@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 084c328f680811fe65d013d1b09d7f329e256fa4 Author: Myeonghun Pak Date: Thu Sep 10 23:15:00 2026 -0400 serial: sh-sci: Unregister UART on sysfs setup failure [ Upstream commit c5b33c86d86da3ccff8c05e2a28719e3ec933f70 ] sci_probe_single() registers the UART port before sci_probe() creates the RX FIFO tuning attributes. If either device_create_file() call fails, probe returns an error without removing the port from the serial core. Device-managed resources are then released while the port remains registered. Unregister the UART port before returning either sysfs creation error. If the second attribute fails, remove the first attribute before unregistering the port. Keep the existing probe failure policy and leave the successful initialization path unchanged. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 5d23188a473d ("serial: sh-sci: make RX FIFO parameters tunable via sysfs") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://patch.msgid.link/20260911031500.5745-1-mhun512@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit af31e0f6b2105c849fe591d67f855748cc093ac8 Author: Stefan Wahren Date: Mon Sep 7 17:04:17 2026 +0200 dt-bindings: phy: ti,tcan104x-can: Fix property constrains [ Upstream commit c7f2322431cb6d108b18fb4154606b49e2bc50f7 ] Microchip ATA6561 is compatible to TI TCAN1042, so the same property constrains should apply. But they use a strict scalar enum match, which makes Microchip ATA6561 fallthrough. So add a "contains" to cover also all compatibles ones. Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/linux-devicetree/20260902133525.E22DE1F000E9@smtp.kernel.org/ Fixes: 05ace63d0bcf ("dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048") Signed-off-by: Stefan Wahren Reviewed-by: Krzysztof Kozlowski Acked-by: Rob Herring (Arm) Link: https://patch.msgid.link/20260907150420.18787-2-wahrenst@gmx.net Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 4a8216314e864d94cbda0c5212aab3fa2020e64c Author: Li RongQing Date: Fri Sep 18 17:23:37 2026 +0800 RDMA/mlx5: Use DEFINE_RAW_FLEX for leftovers flow attributes [ Upstream commit e43913aabd35eef837edef29e93f15e15bdeeacd ] Commit e91fb8b9d0ed ("RDMA/mlx5: Avoid flexible array warning") split the leftovers_specs[] array into two separate structs to silence the sparse "array of flexible structures" warning, but in doing so reversed the member order: eth_flow was placed before flow_attr. _create_flow_rule() locates the flow specs with: ib_flow = (void *)flow_attr + sizeof(*flow_attr); which expects the spec data to immediately follow the ib_flow_attr. With the reversed order, flow_attr is the last member, so ib_flow points past the end of the struct and the num_of_specs = 1 loop reads out-of-bounds memory (whatever static data follows in the .data section), producing incorrect flow rules or a crash. Rebuild the leftovers attributes with DEFINE_RAW_FLEX(), which declares an on-stack struct ib_flow_attr with a properly sized trailing flows[] array. The ETH spec lives in flows[0].eth at exactly the offset _create_flow_rule() expects, so no layout-dependent composite struct is needed. This also avoids embedding a structure that contains a flexible array member as a non-last member, which would trigger -Wflex-array-member-not-at-end once the warning is enabled. Fixes: e91fb8b9d0ed ("RDMA/mlx5: Avoid flexible array warning") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260918092337.2338-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 54768ab86bb7ff7c315567bd5be8803fe2d69ae4 Author: Linmao Li Date: Tue Sep 1 12:15:19 2026 +0800 serial: 8250_mxpcie: take the line settings from the new termios [ Upstream commit dda3502cf1838f806b90405a127ec2e66c885c9d ] mxpcie8250_set_termios() reads the line settings out of port->state->port.tty, which is only set once the port has been opened. uart_set_options() builds a termios of its own and calls ->set_termios() with no tty behind it, so using such a board as the console (console=ttyS) dereferences a NULL tty during console setup, as does attaching kgdboc to it and resuming a suspended console from uart_resume_port(). Read the settings from the termios the serial core passes in instead. It holds the same values on the normal path - uart_change_line_settings() passes &tty->termios - and it is what serial8250_do_set_termios() right above already uses. Fixes: 55edf8511f47 ("serial: 8250_mxpcie: enable automatic RTS/CTS flow control") Signed-off-by: Linmao Li Tested-by: Crescent Hsieh Reviewed-by: Andy Shevchenko Reviewed-by: Crescent Hsieh Link: https://patch.msgid.link/20260901041519.114737-4-lilinmao@kylinos.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 634489424217836868b6c7c379c8b1470f6f9c61 Author: Linmao Li Date: Tue Sep 1 12:15:18 2026 +0800 serial: 8250_mxpcie: only unregister the ports that were registered [ Upstream commit 39eaa90b6bd1dbe147c90c345796bc042080d80e ] When serial8250_register_8250_port() fails the loop stops and the probe keeps the ports registered so far, like pciserial_init_ports() in 8250_pci.c this driver was split from. What the split lost is that function's priv->nr: mxpcie8250_remove() walks all num_ports entries, but the ones the loop never reached keep the zero devm_kzalloc() left there, and the one that failed keeps a negative error code. serial8250_unregister_port() checks neither, so removal unregisters line 0 - a port this driver does not own - and indexes serial8250_ports[] with a negative line number. Record how many ports were registered and unregister only those. Fixes: 0481a041e956 ("serial: 8250: split Moxa PCIe serial board support out of 8250_pci") Signed-off-by: Linmao Li Reviewed-by: Andy Shevchenko Reviewed-by: Crescent Hsieh Link: https://patch.msgid.link/20260901041519.114737-3-lilinmao@kylinos.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 0f040e2f8a186e008517c7f952de71422b78b607 Author: Linmao Li Date: Tue Sep 1 12:15:17 2026 +0800 serial: 8250_mxpcie: set the driver data before registering ports [ Upstream commit 27ca9a81485f179aac83d25fcc3234bc927fa17a ] mxpcie8250_rs485_config() looks the board up with dev_get_drvdata() on the PCI device, but pci_set_drvdata() only runs after the registration loop. Where mxpcie8250_setup_port() presets rs485.flags to SER_RS485_ENABLED and the flag survives uart_get_rs485_mode() - the device has no firmware node, or its node sets linux,rs485-enabled-at-boot-time - uart_configure_port() calls ->rs485_config() from inside serial8250_register_8250_port(), and the callback dereferences a NULL board pointer. Publish the driver data before the first port is registered. Fixes: d21a1509c623 ("serial: 8250_mxpcie: support serial interface mode switching") Signed-off-by: Linmao Li Reviewed-by: Andy Shevchenko Reviewed-by: Crescent Hsieh Link: https://patch.msgid.link/20260901041519.114737-2-lilinmao@kylinos.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit a56a7fb3a64d1024c95722c6a7452f54bd393f75 Author: Tate Whiteberg Date: Mon Aug 31 16:59:08 2026 +0000 serial: 8250_mid: wait for LSR tx empty before setting termios [ Upstream commit 1c305d5f1daabd317a60b6a2e2ac6b1aff7e05df ] If mid8250_set_termios is called while data is still in transmission, the corresponding register updates will corrupt the transmission. Fix this by locking the port and and waiting for the transmitter to empty before performing updates. It is necessary to wait for both UART_LSR_THRE and UART_LSR_TEMT to ensure the final character is sent. Fixes: f549e94effa1 ("serial: 8250_pci: add Intel Penwell ports") Signed-off-by: Tate Whiteberg Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20260831165911.2029839-3-whiteberg@arista.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 597337c958821ead31f17d13a3d7723e45fcc16d Author: Tate Whiteberg Date: Mon Aug 31 16:59:07 2026 +0000 serial: 8250: export and rename wait_for_xmitr() [ Upstream commit 2c5942fd0300cb966339dd0366890be626b405e8 ] Export wait_for_xmitr() and rename it to follow naming convention. Signed-off-by: Tate Whiteberg Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/20260831165911.2029839-2-whiteberg@arista.com Signed-off-by: Greg Kroah-Hartman Stable-dep-of: 1c305d5f1daa ("serial: 8250_mid: wait for LSR tx empty before setting termios") Signed-off-by: Sasha Levin commit 363a316ebb6838e6c515138ae2ffd3dc8f1c3715 Author: Uwe Kleine-König (The Capable Hub) Date: Fri Aug 14 11:19:32 2026 +0200 serial: 8250: hub6: Add cleanup code [ Upstream commit a300273c458ca32666f5bc6c1b3eb3a7cca206ce ] At module load time a platform device is registered. That should be undone when the module is unloaded. Fixes: ec9f47cd6a14 ("[PATCH] Serial: Split 8250 port table") Acked-by: Andy Shevchenko Signed-off-by: Uwe Kleine-König (The Capable Hub) Link: https://patch.msgid.link/4f1903ff2907f3e8bbabce345f628771e0bbd4e1.1786697789.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit fa48477a7574028ed23ecaca559637f46686972e Author: Uwe Kleine-König (The Capable Hub) Date: Fri Aug 14 11:19:31 2026 +0200 serial: 8250: Fix corner case for port matching [ Upstream commit c526404a4a92dd83b2332446d544eac7cfd3d376 ] In the case CONFIG_SERIAL_8250=y + CONFIG_SERIAL_8250_HUB6=m hub6_match_port() evaluates statically to false in serial8250_match_port() which is a bug and a change in behavior compared to before commit 7ab80d1e7243 ("serial: 8250: fix compile error with hub6_match_port() when compiled as a module"). To make the comparison correct, the dummy implementation of hub6_match_port() must only be used if CONFIG_SERIAL_8250_HUB6 is disabled. Then as there is a bidirectional dependency between 8250_hub6.c and 8250_core.c, put both in the same module. Fixes: 7ab80d1e7243 ("serial: 8250: fix compile error with hub6_match_port() when compiled as a module") Acked-by: Andy Shevchenko Signed-off-by: Uwe Kleine-König (The Capable Hub) Link: https://patch.msgid.link/9ad6983ae584ce9d962f2a841f4d5e90c2012ceb.1786697789.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 629662ffd0f8d20296fe3db6d5d1a95b67aa0166 Author: Uwe Kleine-König (The Capable Hub) Date: Fri Aug 14 11:19:27 2026 +0200 serial: txx9: Drop noop probe function and dangerous remove callback [ Upstream commit 22c6a6ac74c2434735638e7ef1101597ae263aec ] The only platform device that can be bound to the driver is allocated by the driver itself. That device doesn't have platdata, so the probe function only consists of a loop that is never run and thus can be dropped without loss of functionality. The remove function then should better not undo things that were not done in the first place. That happens because serial_txx9_init() calls serial_txx9_register_ports() with the created platform device and so up->dev == &dev->dev evaluates to true and uart_remove_one_port() is called twice for each port. So let serial_txx9_exit() undo exactly what serial_txx9_init() does and remove the useless respectively wrong functions. Fixes: 0970769aceb9 ("[SERIAL] serial_txx9 driver update") Reviewed-by: Atsushi Nemoto Tested-by: Geert Uytterhoeven Acked-by: Andy Shevchenko Signed-off-by: Uwe Kleine-König (The Capable Hub) Link: https://patch.msgid.link/cd4fce2cef14907ebe4713c147f8896924380e44.1786697789.git.u.kleine-koenig@baylibre.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 6194891e43d3474ed8ac4c166f229d076821f4ff Author: Dmitry Sinyavin Date: Sun Aug 30 10:53:40 2026 +0200 serial: msm: select PM_OPP [ Upstream commit 6a8352bb4e4bfcf67fa23c49d2e0d14684ffe2e6 ] Commit 173ebdedcd84 ("serial: msm: Use OPP table for DVFS support") made the MSM serial driver unconditionally configure the core clock through the OPP framework during probe. When CONFIG_PM_OPP is disabled, devm_pm_opp_set_clkname() is a stub that returns -EOPNOTSUPP, so every MSM serial port fails to probe. Select PM_OPP to keep minimal configurations functional. Fixes: 173ebdedcd84 ("serial: msm: Use OPP table for DVFS support") Signed-off-by: Dmitry Sinyavin Link: https://patch.msgid.link/20260830085340.2542624-1-sinyavin@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 07941e3d31c2c61b8368a5e97f05ffe525fa24e8 Author: Guangshuo Li Date: Thu Sep 24 19:03:10 2026 +0800 media: staging/ipu7: release ISYS firmware resources on remove [ Upstream commit 628a575c99e767d6fac81215fca1190b61867148 ] isys_remove() tears down the registered ISYS devices but does not call ipu7_fw_isys_release() after a successful probe. The probe error path already uses this helper after ipu7_fw_isys_init() succeeds. Without the matching release, resources initialized by ipu7_fw_isys_init() remain allocated on normal device removal. Call ipu7_fw_isys_release() after unregistering the ISYS devices to match the cleanup performed by the probe error path. Fixes: a516d36bdc3d ("media: staging/ipu7: add IPU7 input system device driver") Signed-off-by: Guangshuo Li Signed-off-by: Sakari Ailus Signed-off-by: Sasha Levin commit c9fb2b1290076015d70b18c71a4cf8c74fdff084 Author: Ginger Li Date: Wed Sep 23 09:56:31 2026 +0800 media: i2c: ov5648: Fix a data race on state->streaming [ Upstream commit 76c8ffbe1b9bc0ee4c977180e3f498352de0d01e ] ov5648_s_stream() updates state->streaming after it has released sensor->mutex, while ov5648_resume() reads that field with sensor->mutex held. A concurrent resume can therefore observe a stale streaming state and leave the sensor in standby while the software believes that it is streaming, or the other way around. Keep the update inside the sensor->mutex protected section that already programs the standby mode. Fixes: e43ccb0a045f ("media: i2c: Add support for the OV5648 image sensor") Signed-off-by: Ginger Li Reviewed-by: Kieran Bingham Signed-off-by: Sakari Ailus Signed-off-by: Sasha Levin commit 2ad06c97800e4f627b31db2008820a25ff114afd Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Don't search beyond the first data mark [ Upstream commit 79eafa4ccb74be023fd2cae87d75425d6eb903bb ] The ISM chip does an automatic MFM gap/sync search when the Action bit is first set. That search may stop at any of a) post-index gap, b) address field gap or c) data field gap. To find the next sector header, the driver need not search at all. It only has to validate the mark bytes. Once the sector address mark has been validated, swim_read_sector_data() is called to read the sector contents. Between the sector address and data fields lies an intra-sector gap followed by a data field mark. After this mark is validated, the 512-byte data area is read into the IO request buffer. Problem is, if any byte in the data field mark is mis-read, the driver searches the whole sector and then reaches the data field mark in the following sector. The wrong sector is then read into the buffer, and swim_read_sector_data() returns success. The request is silently corrupted. The existing limit on polling loop iterations does constrain the search distance but is inherently tied to CPU speed. This is probably the reason why corruption was only observed on a 68030 system. Discontinue the mark search when the mark bytes fail validation. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/f6c97153faa0aceceffd3a61d85c0a82903a6b3e.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 8f1b80e3134499105291e6c656c97f0d35b8da4f Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Revisit delays [ Upstream commit bbcd3e38a4f355d6b0320f3f6916df96c109f2ad ] AFAIK, timing requirements for the various FDHD drive mechanisms aren't well documented. But we do have the UPD72070 spec and secondary sources like swim3.c and mkLinux source code. This patch is needed to satisfy the requirements in the UPD72070 spec and follows mkLinux. Change the LSTRB pulse to 2 microseconds, because this is what mkLinux does. Inside Macintosh says, "Hold LSTRB high for at least one usec but not more than one msec". When a disk is ejected, pause before de-asserting /ENBL. Wait 150 us after the STEP command for valid signalling. Pause for 1 us after setting the step direction before sending the STEP command. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/af356248a1e6a4fd956f71acf17feead27ba4918.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit f357983798c028fec8f987cdfe1c5fca74dad377 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Check drive ready bit [ Upstream commit abae04f5bed924590e98fe1519566a6e0144e6b5 ] The drive provides a readiness signal that has to be tested before certain commands are issued to the drive. Rename the SEEK_COMPLETE flag as READY because that's how it's known in the documentation as well as the mkLinux source code. Poll for that signal after stepping the heads and also after switching to MFM mode, as that's what mkLinux does. Check for readiness when stepping because testing shows that some drives require this. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/8d6fc833c719de2248b64ee521418b1032b1e509.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 49fcae302b8ffc149d9b0266cd1f2b60ee621fde Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Deduplicate polling loops [ Upstream commit b736189c93c9ad1056521a4229ec2f252b714b5a ] Replace duplicated polling loops with poll_timeout_us(). Change the interruptible sleep to uninterruptible because signal delivery shouldn't be allowed to shorten delays required by the drive hardware. Change the timeout for the !STEP transition to 20 ms in accordance with the maximum interval required by the UPD72070 spec. The existing 1 second timeout is impractical considering the number of steps in a typical seek. Change the return type of swim_readbit() to bool because that way the bit names make sense i.e. the reader doesn't have to remember to invert the active-low logic used for drive signals. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/0ea2d3313dea26f8b4c2abc4d29055ac95aeb74b.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 7476252954b0f0632104709d46a3d8f06c329710 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Remove redundant RELAX actions [ Upstream commit 04cb277e6841b55b950b42063fe11501b5d1676a ] Wherever we have a swim_select() or swim_readbit() call there is an implicit RELAX. That means the caller doesn't have to do it. Remove the redundant code. BTW, Inside Macintosh says, "Be sure [...] that CA0 and CA1 are set high before changing SEL." Hence the RELAX found in swim_select(). The SwimIII driver in mkLinux also has that. But the swim3.c driver in Linux is odd: it scatters RELAX actions around as though SEL was not actually under its control... In anycase, swim.c really does control SEL so there's no need for that here. Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/08ab67c2780c9107b87a1ece8b5f9cb54a8cea70.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Stable-dep-of: b736189c93c9 ("swim: Deduplicate polling loops") Signed-off-by: Sasha Levin commit f0df833802f2ec6f090b17c255eca4b629d46970 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Convert to blocking queue [ Upstream commit 92353a04763726f70fea6be90957c50fc18215e0 ] These drives are slow: completing a request can take hundreds of milliseconds. Delays are managed by disabling interrupts judiciously and sleeping opportunistically. As of commit e3896d77b702 ("swim: convert to blk-mq"), a spinlock is taken in irq mode as soon as a request is issued. That lock is held for the duration of the request. Hence the driver sleeps while holding the lock which is forbidden. Adopt BLK_MQ_F_BLOCKING and remove the spinlock. Use a mutex to serialize requests from the two request queues. (The chip cannot simultaneously process requests on both internal and external drive.) Cc: Omar Sandoval Fixes: e3896d77b702 ("swim: convert to blk-mq") Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/d06b19132ec678d6168d158e10cd63e10da45607.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 759e236477c30e75653dc050f18ab3d1c5127c9c Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Fix buffer overflow [ Upstream commit a54870a4ae4962acf341eb6ca010cae02af1a6ea ] The effect of this bug can be observed as swim_read_sector_data() inexplicably returning -5, or an error flag indicating that a mark byte was read from the data register, or other odd behviour. When copying bytes from the chip FIFO to the read buffer, the driver keeps count of the remaining buffer space using register %d4. A counter in register %d2 serves as a timeout. The driver polls (%a2), the handshake register, until flags indicate that byte(s) have arrived in the FIFO. movel #sector_size-1, %d4 read_new_data: movew #max_retry, %d2 read_data_loop: moveb %a2@, %d5 andb #0xc0, %d5 dbne %d2, read_data_loop beq data_exit moveb %a5@, %a4@+ andb #0x40, %d5 dbne %d4, read_new_data beq exit_loop Note that the exit_loop branch depends upon a flag in the handshake register and not on the remaining buffer space. Hence there may be no branch to exit_loop after %d4 is decremented to -1 (i.e. full buffer). moveb %a5@, %a4@+ dbra %d4, read_new_data exit_loop: Here is a second decrement of %d4 which can now reach -2. But the buffer bounds check is a comparison with -1, which is now ineffective. Hence the loop will continue copying until %d2 eventually reaches -1. Fix this bug by terminating the loop as soon as %d4 or %d2 reach -1. Reset the timeout whenever a byte is copied. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/d8fceda197b840f892d9b511175e824ca2549f01.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 4482187c6a0df3008b049de058900b825f01688b Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Don't use the mark register to read data [ Upstream commit cb7923133ec18e67e2d6718e29426a4423af6b73 ] If an unexpected mark byte were to be read from the data register, an error would be flagged. But no error gets flagged when such a byte is read from the mark register, which is misleading. Always use the data register except when a mark byte is expected. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/fecd77b141bdd8a59ebae5f9efffccb155afdc4c.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit c6e3437bc231e6efeebf8e6d7feecd837af06d6f Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Check error register during sector read [ Upstream commit d66bdef0a3083fed1a0fc4f0ee1c85b26476b21c ] Clear the error register only once before a sector read operation. Don't clear it afterwards -- the caller needs it. Check the error register in swim_read_sector() and return the appropriate error when necessary. Fully validate the sector header. Don't terminate the search loop early just because an erroneous sector header showed up. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/efabd807f4ecf5cbc05b60e91ed69aa4c10691a8.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit c8a84008797b3fad50096027c9d3d6d46d420545 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Simplify return value initialization [ Upstream commit 385a44e78702762e2fce796cf37b6f465d86a87f ] Initialize the error result once only. Update the result only after a successful read. Reviewed-by: Laurent Vivier Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/28322f0cbefd865bdfb679bab4352c111996795b.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Stable-dep-of: d66bdef0a308 ("swim: Check error register during sector read") Signed-off-by: Sasha Levin commit 266069f7895a914c19b82a0922c88d4106279194 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Check for CRC errors [ Upstream commit 01bff87152e6748fbac9ccd645d3d5f490d75ddc ] After reading either the sector header or sector data, examine that flag in the handshake register which holds the result of the CRC calculation. CRC validation has to take place with the last byte still in the FIFO. This flag can't be checked by the caller because by then all bytes will have been retrieved from the FIFO. Return an error code when appropriate. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/9bfcd0414192d1b95803c16701d62732ff6e8f3f.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 3b480bf096f8e86d2c4e5c241a20d6513f8256ed Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Handle FIFO timeout error [ Upstream commit 2e9bcbecee68431b689d16b23bc5529db686f8d4 ] When polling the FIFO for a mark byte in the sector header, don't return zero if the timeout counter has expired, return an error code. Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/aadb674d27d6e6d346d9b525597bf2e339c57e04.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 747ed81be41ef31f51293463301a8f1b7020193e Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Add track zero recalibration delay [ Upstream commit b9c1095048537cc9563f12d0a24f2f0df129e4d5 ] The UPD72070 spec indicates that the track zero sensor can take 3 ms to stabilize following a STEP command so add a call to msleep(). Remove the duplicate swim_readbit() call as there's no need for that once the sensor signal has stabilized. Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/6d17ca20a7286c1d74833b29510c506a66d96e6f.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 9a142b086de00764244e8f668beb859c3c33c5c7 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Recalibrate when drive is probed [ Upstream commit ba087774a1493ade524f8a783461fa8be9c75039 ] Track zero recalibration can be slow and is normally done only once i.e. during system POST or boot-up. Recalibrate once after the drive is probed rather than every time the device is opened. Don't register the drive if recalibration fails. Park the heads before ejecting. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/119e799afcc00d6bd4a479c31e0c960cb1a1d71b.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit f0fa410232a5afb1b4cecbbe38d5553826560d59 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Don't start motor until medium is present [ Upstream commit dbbaaae83cb277d76e70426c0f0ce289e867ed77 ] The spindle motor should not be running when a disk is to be inserted. Don't start the motor while the drive is empty. Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/7ea60e0bf6135b9bcd4be0991a257d4c5de22bb3.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit eabb9ccd46935150ce4c42f1732fe9f4de651f37 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Enable clock divider only where appropriate [ Upstream commit 3c02a14c89962c88ed0abb3cce4101021c63149c ] Some models have a 16 MHz FCLK oscillator and others 32 MHz. Put this information into the swim device platform_data so that the driver can correctly enable the clock divider. When this is enabled incorrectly, nothing can be read and failures from the Error Correction Machine are flagged in the error register. Cc: Joshua Thompson Acked-by: Geert Uytterhoeven Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/483efa2f8ac6beb2a2d4fa2d8b431cb1a8b560c7.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit cb91209dfdc086f0df664d1c197249d7916f14c5 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Refactor SWIM setup [ Upstream commit 62977e8ea98e99dbf86609e65930e6607398e1c5 ] The write to the setup register is really chip initialization, so do it in swim_floppy_init() rather than floppy_open(). Drop the udelay(), which was apparently copied and pasted from swim3.c where it presumably relates to interrupts, of which this chip has none. (See also mkLinux SWIM 3 driver.) Cc: Joshua Thompson Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/e9facb07b20436a6941ec067288e84d8dd9311c0.1788513997.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Stable-dep-of: 3c02a14c8996 ("swim: Enable clock divider only where appropriate") Signed-off-by: Sasha Levin commit 73ed572969f7b9307a4e13e9cce0a79ca657df91 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Configure parameter memory [ Upstream commit 994a778d966592d0e211deaf6e436fcb21413935 ] The original SWIM chip has a 16 byte memory to store parameters which control read/write timing. The SWIM 2 chip retains the last 4 parameters which control write pre-compensation, but omits the first 12. Hence SWIM 2 can perform reads without any parameter memory setup but SWIM 1 cannot. Configure the SWIM parameter memory with the appropriate values so that SWIM 1 can read too. The parameters used here were observed in SWIM chip memory, using Macsbug, while MacOS was reading from an MFM floppy disk. Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/eccb76911fd255330b05eb3174ac15c29bb41a23.1788513996.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 92f76b235d1b6cbc87e75f7b5a725f0900e03412 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Perform ISM/IWM mode switching according to specs [ Upstream commit 52981bb358d1b5c38040b00f81e2cf973f9148ad ] The SWIM spec says, "MOTOREN must be low to switch modes" and "after switching from ISM to IWM, the very first command must be a clear L7". The ISM spec says, MOTOREN "must not be cleared until after the Action bit is cleared". Perform those operations in the correct sequence. When switching to ISM mode, the Mode register has to be selected with a particular sequence of bit flips. Set q7 low then q6 low then mtrOff. Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/75714ecc9a12d59511967dc9e24163dc8f3bbdd8.1788513996.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 52985dc2412410e938a53d58ae39a20fbd1bf83f Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Don't disable drive after every sector [ Upstream commit 05a7c4b197279cfb3ec3df26146ce085a2438aec ] This fixes multi-sector reads on a Sony drive. The Mitsubishi drive doesn't seem to care either way. Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/fc511e72753ae18b6f021701aa00d480335b0caf.1788513996.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 4b0ffd5a0f75b7e4c29a33ad894a0ea61383c6f6 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Enable the drive when probing [ Upstream commit 57d88c8f4ea34a4dd7c5351bd026e225c7283f3f ] According to the ISM spec, the MOTON bit "causes the Enable 1 and Enable 2 signals to be turned on to the drive." It doesn't actually turn on the motor. When selecting a drive, enable MOTON. Disable it upon eject or release. This fixes detection of the Sony FDHD drive. Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/f5bf5b596a33a801faaaaa6dc2844c30d3ee82b2.1788513996.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit e29b9c6e489cac44a0e1f823b37061f1a7c6b1b4 Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Select appropriate drive once only [ Upstream commit a2d22b3f25c388f9fbce7bf36a45a8900dce4aa3 ] Before turning off the spindle motor, call swim_drive() to select the appropriate drive. Remove the swim_drive() call from swim_add_floppy() because it was already called by swim_floppy_init(). Reviewed-by: Laurent Vivier Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/370f73fcceb53ce4860904ce6cf4f06ade0e43d5.1788513996.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 9f1800755885fefb2d4aff9a1f65402aa0d0cadd Author: Finn Thain Date: Fri Sep 4 19:26:36 2026 +1000 swim: Assert strobe with stable outputs [ Upstream commit adcc410bfb41715fef198a0975db4ed594a49bb7 ] Inside Macintosh says, "Be sure that you don't change CA0-CA2 or SEL while LSTRB is high". Unfortunately, those bits do change. The CA0-CA2 outputs become inputs when (LSTRB << 4) | LSTRB gets written to the phase register. Then LSTRB is driven low (with CA0-CA2 bits set). This is a problem because the drive interprets a STEP command as an EJECT command when these pins float high. This occurs intermittently, perhaps because interrupts are disabled and the race condition happens to end well. However, when I add code to step the heads with interrupts enabled, the disk always ejects. Keep the four phase pin directions set to output and hold their levels constant during LSTRB signalling. Introduce the PHASE_PIN_DIRECTION macro to separate the pin configuration from the logic level changes. Fixes: 8852ecd97488 ("m68k: mac - Add SWIM floppy support") Signed-off-by: Finn Thain Tested-by: Stan Johnson Link: https://patch.msgid.link/6da86b9bfd1335fac3ebc8c435fb613d5de4a70c.1788513996.git.fthain@linux-m68k.org Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit eb5d045307b4e1cb1a3235c7c8edbdd45ff45523 Author: Li RongQing Date: Thu Sep 17 16:54:19 2026 +0800 RDMA/mlx5: Guard steering anchor resource destruction on create error [ Upstream commit 193aaf5b57f05d9f0403cfdaff3eda3b8d11ec13 ] The steering anchor resources are shared between anchors with the same priority and are protected by rule_goto_table_ref. When steering anchor creation succeeds but uverbs_copy_to() fails, the error path drops the reference acquired for the new anchor. However, it unconditionally calls mlx5_steering_anchor_destroy_res(), even when other anchors are still using the shared resources. This can destroy the shared flow table, flow groups, and rules while existing anchors still hold references to them, resulting in a use-after-free when those anchors are subsequently cleaned up. Only destroy the shared resources when dropping the reference makes rule_goto_table_ref zero, consistent with the existing cleanup path. Fixes: e1f4a52ac171 ("RDMA/mlx5: Create an indirect flow table for steering anchor") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260917085419.1792-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 209f93071f9a0629f48177c9e2674ece3d86249c Author: Jiale Yao Date: Mon Sep 21 01:34:17 2026 +0800 crypto: ccp - kill v5 IRQ tasklet during teardown [ Upstream commit 67aefeccc4101a93627f36abbd049f191b54f903 ] On PCI devices using MSI-X, ccp5_irq_handler() schedules irq_tasklet. The teardown paths release the IRQ but do not drain a tasklet that was already queued, so it can access ccp after the device-managed allocation has been released. Kill the tasklet after releasing the IRQ in both the initialization error path and ccp5_destroy(). Fixes: 6263b51eb319 ("crypto: ccp - Change ISR handler method for a v5 CCP") Signed-off-by: Jiale Yao Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit f1adaa09e9c15c000a860f2961fb6ce0d5b719af Author: Jiale Yao Date: Mon Sep 21 01:34:07 2026 +0800 crypto: ccp - kill v3 IRQ tasklet during teardown [ Upstream commit b72a639bdee6e07d8091718ac3e451d9c5cba1b5 ] On PCI devices using MSI-X, ccp_irq_handler() schedules irq_tasklet. The teardown paths release the IRQ but do not drain a tasklet that was already queued, so it can access ccp after the device-managed allocation has been released. Kill the tasklet after releasing the IRQ in both the initialization error path and ccp_destroy(). Fixes: 7b537b24e76a ("crypto: ccp - Change ISR handler method for a v3 CCP") Signed-off-by: Jiale Yao Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 6beb23aa2ec4c64f477d1c8e419c7e7da7046f26 Author: Muhammad Bilal Date: Sun Sep 20 00:24:32 2026 +0500 crypto: ccp - fix SFS ioctl race against device teardown [ Upstream commit de4929b47683ed22d8c05f68d2d0f0cfd95b90a1 ] sfs_ioctl() reads psp_master->sfs_data and caches it in sfs_dev before taking sfs_ioctl_mutex, while sfs_dev_destroy() frees sfs_dev->page and sfs_dev->command_buf with no locking at all and only clears psp->sfs_data afterwards. A call to sfs_ioctl() that reads sfs_data just before sfs_dev_destroy() runs will still acquire the mutex and go on to use the now-freed command buffer in send_sfs_cmd(). Have both functions take sfs_ioctl_mutex before touching psp->sfs_data, so a call that is already using sfs_dev completes before teardown can free it, and a call arriving after teardown sees sfs_data cleared and returns -ENODEV instead of racing it. Fixes: 648dbccc03a0 ("crypto: ccp - Add AMD Seamless Firmware Servicing (SFS) driver") Signed-off-by: Muhammad Bilal Reviewed-by: Ashish Kalra Reviewed-by: Thomas Huth Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 0b3ae981c8f95f22f412d2f5933e453529a44ca8 Author: Ahsan Atta Date: Fri Sep 18 13:41:11 2026 +0100 crypto: qat - hold cfg->lock when accessing config sections [ Upstream commit cb3a1364fed9ea7b063e3ae026177a145abb5940 ] adf_cfg_sec_find() walks the per-device section list without holding cfg->lock, and the returned section pointer is used later under the lock. A concurrent section deletion under cfg->lock (adf_cfg_del_all_except() on device down, or adf_cfg_dev_remove() on removal) can free the section first, leading to a use-after-free. The debugfs dev_cfg reader has the same problem: qat_dev_cfg_show() walks both the section list and each section's param_head under the global qat_cfg_read_lock mutex, not the per-device cfg->lock used by the add and delete paths, so the two do not serialise. Updating an existing key frees the old key_val under cfg->lock, so even a config write concurrent with an open dev_cfg read can free an entry mid-walk, a wider window than section deletion alone. Take cfg->lock around the section lookup in adf_cfg_add_key_value_param() and around the lookup and insert in adf_cfg_section_add(), and use down_read()/up_read(&cfg->lock) in the debugfs start/stop callbacks. Remove the now-unused qat_cfg_read_lock. While here, return -ENOENT rather than -EFAULT when the section is not found; EFAULT (bad userspace address) is not meaningful for this case. Fixes: d8cba25d2c68 ("crypto: qat - Intel(R) QAT driver framework") Signed-off-by: Ahsan Atta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 23bb833769679aa5fb8cda7b34111b97b92afcfc Author: Weili Qian Date: Fri Sep 18 20:27:21 2026 +0800 crypto: hisilicon/hpre - remove dma_free_coherent on NULL req->dst in ECDH [ Upstream commit 5b87f619cc5c0a55dcd85ce97974e3f5b9333b7b ] In hpre_ecdh_hw_data_clr_all(), req->dst is always NULL because hpre_ecdh_dst_data_init() sets hpre_req->dst = NULL before mapping the user buffer with dma_map_single(). The dma_free_coherent() call on req->dst is therefore dead code. Remove it. Fixes: 05e7b906aa7c ("crypto: hisilicon/hpre - add 'ECDH' algorithm") Signed-off-by: Weili Qian Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 021eab72ff6681590181408836fbf1b6d246afee Author: Herbert Xu Date: Fri Sep 18 18:27:20 2026 +1000 crypto: api - Fix DUP_FIRST crash on unregister [ Upstream commit 1dfb35de0800967c972eee35e19f3dfc8d50e512 ] The flag CRYPTO_ALG_DUP_FIRST is buggy because upon unregistration it tries to unregister the original algorithm rather than the duplicate which was allocated during registration. Fix this by locating the duplicated algorithm and unregistering that instead of the original. Also remove the duplicate crypto_destroy_alg call. Reported-by: Chenghai Huang Fixes: f1440a90465b ("crypto: api - Add support for duplicating algorithms before registration") Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 2b1baddbcb155516f464363082ae9bc6388831b7 Author: Pengpeng Hou Date: Sun Aug 30 21:48:35 2026 +0800 crypto: starfive - propagate clock and reset errors [ Upstream commit c8acdd77a62374507ed8e70d59e124269d999b75 ] starfive_cryp_probe() publishes the crypto device after enabling its clocks and deasserting its reset without checking whether those operations succeeded. Check each hardware activation step and unwind only the resources that were actually enabled before returning the error. Fixes: 42ef0e944b01 ("crypto: starfive - Add crypto engine support") Signed-off-by: Pengpeng Hou Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 58fffddf0fa0c1afc7d876270bfe2e42a305878d Author: Jiawen Liu <1298662399@qq.com> Date: Tue Aug 18 17:25:44 2026 +0400 crypto: starfive - handle clock enable failures [ Upstream commit 5358248961ae23f7253d010ddfde1cfd2556ce22 ] Return error from failed clock enable. starfive_cryp_probe ignores clk_prepare_enable return for hclk/ahb, then remove/error paths unconditionally clk_disable_unprepare both clocks. Check consecutive clk_prepare_enable(cryp->hclk)/cryp->ahb returns in starfive_cryp_probe. Signed-off-by: Jiawen Liu <1298662399@qq.com> Signed-off-by: Herbert Xu Stable-dep-of: c8acdd77a623 ("crypto: starfive - propagate clock and reset errors") Signed-off-by: Sasha Levin commit c88fe2dd8c288d8370767a463537574f32bcc02b Author: Pengpeng Hou Date: Sun Aug 30 21:17:53 2026 +0800 hwrng: starfive - propagate clock and reset errors [ Upstream commit ace145efdd80cd2eb95e84b1087d0f1fc55bdc0d ] The StarFive TRNG probe and resume paths ignore failures from their clock and reset operations. That lets the driver register or resume while its hardware access prerequisites were not established. Check each transition, unwind only the previously enabled clock on failure, and propagate the error to the probe or PM core. Fixes: c388f458bc34 ("hwrng: starfive - Add TRNG driver for StarFive SoC") Signed-off-by: Pengpeng Hou Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 58f4a4d9a6663df4a1c8f2ceb7f046dd21471cda Author: Jérémy Jean Date: Sat Aug 22 21:27:04 2026 +0000 crypto: asymmetric_keys/pkcs7 - Check all signers before waiving authattrs rejection [ Upstream commit 553c623a12f4928a2889cf1bba0bd8885f0bdd4f ] pkcs7_check_authattrs() only looks at the first SignerInfo when deciding whether rejection of authenticated attributes may be waived. For the remaining signers it checks only that authenticated attributes are either present on all signers or absent from all of them. This means an unmatched ML-DSA signer can be placed first, followed by a trusted RSA, ECDSA, or ECRDSA signer. Verification skips the unmatched signature and accepts the later trusted signer. The first signer still leaves the waiver enabled for the whole message, so the non-ML-DSA signer can use an exception intended only for ML-DSA. Check each SignerInfo's public-key algorithm before leaving the waiver enabled. Fixes: 91db696adea4 ("pkcs7: Allow authenticatedAttributes for ML-DSA") Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 2ce5faae61b98545210e6a6b77f3df0f81656fcf Author: Jérémy Jean Date: Fri Aug 21 19:25:03 2026 +0000 crypto: asymmetric_keys/x509 - copy X.509 TBS for data signature algorithms [ Upstream commit 2618f76b277cef3df8ebdff403b05705f5f8a36d ] For signature algorithms operating on a message rather than a digest, x509_get_sig_params() points sig->m directly into cert->tbs. cert->tbs is the preparsed add_key() payload. The syscall wipes and frees it on return, while the instantiated key retains public_key_signature. A later KEYCTL_LINK into an asymmetric restricted keyring therefore passes a dangling message pointer to ML-DSA. KASAN reports a slab-use-after-free in mldsa_verify(), with allocation and free provenance both leading to __do_sys_add_key(). Reuse is also an integrity issue: bytes occupying the freed object become the authenticated message instead of the certificate's own TBSCertificate. Give the signature object its own copy of the TBS, as is already done for a precomputed digest, and release it through the existing m_free contract. Fixes: f3eccecd782d ("pkcs7: Allow the signing algo to do whatever digestion it wants itself") Signed-off-by: Jérémy Jean Assisted-by: Codex:gpt-5 Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit e781a287eb8841fb2d136b2da8e8392cd5d14a43 Author: Wentao Liang Date: Wed Sep 16 18:44:00 2026 +0000 RDMA/siw: Fix qp use-after-free in siw_get_base_qp() [ Upstream commit ef15197f81ffedf29560edf2221199d92fd83dc2 ] The reference taken by siw_qp_id2obj() is dropped before the address of the embedded ib_qp is taken from the QP. If that reference was the last one the QP is freed and the pointer returned to the iwarp core is dangling; the core only pins the QP with iw_add_ref() after the call has returned. Copy the pointer while the reference is still held. Fixes: 6c52fdc244b5 ("rdma/siw: connection management") Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260916184400.2093106-1-vulab@iscas.ac.cn Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit df010caab99585afa663e5b87dae9fd04c7e155d Author: Wentao Liang Date: Wed Sep 16 18:39:21 2026 +0000 RDMA/mlx5: Fix RQ resource reference leak in mlx5_ib_wq_event() [ Upstream commit 65f3eab431944415bbe5e3af1bbb2736d4bb1523 ] Since commit 312b8f79eb05 ("RDMA/mlx: Calling qp event handler in workqueue context") rsc_event_notifier() expects the event handler to drop the resource reference taken by mlx5_get_rsc(). mlx5_ib_wq_event() was missed by that conversion, so every RQ event leaks one reference, which keeps destroy_resource_common() waiting on the completion. Put the resource reference on all exits of the handler. Fixes: 312b8f79eb05 ("RDMA/mlx: Calling qp event handler in workqueue context") Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260916183921.2092821-1-vulab@iscas.ac.cn Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit abc28da3536a2b78d8ffe84363e361aa2b1b8f0f Author: Wentao Liang Date: Wed Sep 16 18:37:15 2026 +0000 RDMA/cxgb4: Fix skb reference leak in rx_pkt() [ Upstream commit 5eb6ecb612841927b5ede554a0e9d88240934282 ] rx_pkt() takes an extra reference on the received skb so it can be handed to the firmware completion path via req->cookie. When the work request skb allocation in send_fw_pass_open_req() fails the function returns without releasing that extra reference, leaking one skb reference. Free the packet skb before returning when the allocation fails, matching the cxgb4_ofld_send() failure path. Fixes: 1cab775c3e75 ("RDMA/cxgb4: Fix LE hash collision bug for passive open connection") Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260916183715.2092663-1-vulab@iscas.ac.cn Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 6bdf329299deb8c6c40bddf0fd09fb6b2399515f Author: Wentao Liang Date: Wed Sep 16 18:35:30 2026 +0000 RDMA/cxgb4: Fix neigh reference leak in rx_pkt() [ Upstream commit 5fb3051aa4611ae18e304814fb1b74a30065fd85 ] If ip_dev_find() fails on the loopback path the code jumps to free_dst without releasing the neighbour reference taken by dst_neigh_lookup_skb(), leaking one neigh reference. Release the neighbour before jumping to free_dst. Fixes: ef42520240aa ("RDMA/cxgb4: add null-ptr-check after ip_dev_find()") Signed-off-by: Wentao Liang Link: https://patch.msgid.link/20260916183530.2092534-1-vulab@iscas.ac.cn Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 5167b08e1b62c6eae9695b78e72c549aa75fff9c Author: Slavin Liu Date: Fri Sep 11 14:09:09 2026 +0800 RDMA/irdma: check vport device allocation [ Upstream commit 2a770e6a64d66fc3a7317669ecca9773d8339ead ] An existing RDMA function does not guarantee allocation of the new vport device. Return -ENOMEM before initializing a NULL iwdev. Detected by static analysis and reviewed with AI-assisted source auditing. Fixes: 2ad49ae7330b ("RDMA/irdma: Introduce GEN3 vPort driver support") Assisted-by: LLM Signed-off-by: Slavin Liu Link: https://patch.msgid.link/20260911060909.94219-1-bolin.liu@seu.edu.cn Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 4b9b8cf78bc6289a7cfdf41410a73145227175e6 Author: Kim Wooseok <5mghybrid@khu.ac.kr> Date: Mon Sep 21 16:59:51 2026 +0900 wifi: rtl8xxxu: preserve RX requests across recoverable transfer errors [ Upstream commit 2f77c66694108785a1f6ae6c5de06453e7f7a91f ] rtl8xxxu resubmits completed RX requests when more than eight URBs are waiting on the pending list. It starts with 32 URBs, but frees them on completion errors. After enough errors, the remaining pool can no longer reach the submission threshold. Reception then stays stopped even after the errors end. Temporary submission failures can leave a small batch waiting with no further work scheduled, too. Keep the URB when a completion reports EPROTO, EILSEQ, ETIME, EOVERFLOW, ECOMM or ENOSR. Free its receive buffer and return the request to the same pending list used by normal completions. ENOMEM/EAGAIN from startup or worker submission uses this path as well, so a submission failure cannot strand a request during recovery. Use one delayed work item to submit the pending requests. An error queues a retry after 100 ms without moving an existing reservation back. If a normal completion takes the pending count above eight, mod_delayed_work(..., 0) brings the work forward. This limits repeated retries when reception is not progressing, while allowing normal traffic to replenish the pool promptly. The 100 ms delay is therefore not a minimum wait for each failed URB. Keep the shutdown check, queue insertion and scheduling under the RX lock. Stop sets shutdown under that lock, cancels the delayed work synchronously, then drains active and pending requests. Cancellation and device removal continue to free their URBs. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Assisted-by: GPT-6 Astra Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr> Reviewed-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260921-codex-rtl-rx-v3-submit-v4-3-eeb09fe8f791@khu.ac.kr Signed-off-by: Sasha Levin commit d00fde10a30d6501e4756f8481da95fa30f421bd Author: Kim Wooseok <5mghybrid@khu.ac.kr> Date: Mon Sep 21 16:59:50 2026 +0900 wifi: rtl8xxxu: unwind incomplete receive startup [ Upstream commit 4c58fb8944a2cfbe5506534de0cf58646408d31a ] rtl8xxxu_start() allocates and submits RX URBs one at a time. If a later allocation fails, the error path frees the TX pool but leaves earlier RX requests active. A partial TX or RX allocation failure can also leave ret at zero, so start reports success despite the incomplete setup. Allocate the RX pool before submitting any of it, and return ENOMEM whenever a pool allocation fails. Pass start errors through rtl8xxxu_stop(), including interrupt URB submission failures, so the existing stop path cancels work and releases both active requests and partially allocated pools. Share the submission loop with the RX worker. Both callers keep requests that fail with ENOMEM/EAGAIN. For a fatal error during startup, free the rest of the unsubmitted batch and return the error so start can unwind. In the worker, free only the failed request and continue with the rest of the batch. Keep the allocation loop in a small helper so the setup and error paths in start remain easy to follow. On an RTL8192EU, I exercised every error exit in rtl8xxxu_start() except interrupt-URB allocation and submission failures, which this adapter does not use. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Assisted-by: GPT-6 Astra Reviewed-by: Ping-Ke Shih Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr> Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260921-codex-rtl-rx-v3-submit-v4-2-eeb09fe8f791@khu.ac.kr Signed-off-by: Sasha Levin commit d3aee1acbf10dad42246c194cc192ede6b562bf7 Author: Kim Wooseok <5mghybrid@khu.ac.kr> Date: Mon Sep 21 16:59:49 2026 +0900 wifi: rtl8xxxu: free RX skb when URB submission fails [ Upstream commit 9f7edf4e8584c87e3c478c6dd87c08d51b5157c2 ] When usb_submit_urb() fails, rtl8xxxu_submit_rx_urb() unanchors the URB but leaves the newly allocated skb in urb.context. For ENOMEM/EAGAIN, the RX worker puts the request back on the pending list. The next submission allocates another skb and overwrites that pointer, leaking the previous buffer. Stopping before the retry also leaks it, because pending-list cleanup frees only the URB. Free the skb and clear urb.context in rtl8xxxu_submit_rx_urb() when submission fails. This keeps buffer allocation and failure cleanup in the same function, so a request returned for retry or teardown no longer owns an skb. Remove the corresponding cleanup from start and the RX worker; they only need to decide whether to retry or free the URB. Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") Reviewed-by: Ping-Ke Shih Assisted-by: GPT-6 Astra Signed-off-by: Kim Wooseok <5mghybrid@khu.ac.kr> Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260921-codex-rtl-rx-v3-submit-v4-1-eeb09fe8f791@khu.ac.kr Signed-off-by: Sasha Levin commit 44e755a3d699bc5ef48b6c1282e22b4bd0ae0951 Author: Ping-Ke Shih Date: Fri Sep 18 10:11:13 2026 +0800 wifi: rtw89: correct dependency of the multicolor LED [ Upstream commit 398660e43ed9f85e008f967df401ed70f3c41665 ] The rtw89 depends on multicolor LED module, but for the case multicolor LED is module and rtw89 is built-in driver, like CONFIG_LEDS_CLASS_MULTICOLOR=m CONFIG_RTW89=y CONFIG_RTW89_LEDS_MC=y The linker reports error: ld.lld: error: undefined symbol: led_classdev_multicolor_register_ext Avoid this case, and summerize the supported combination as below CONFIG_LEDS_CLASS_MULTICOLOR y m m CONFIG_RTW89 y/m m y support O O X Fixes: 721d90c8509a ("wifi: rtw89: add multicolor LED support for RTL8852CU valve board") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202609172315.ZYoKvKBS-lkp@intel.com/ Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260918021113.25481-1-pkshih@realtek.com Signed-off-by: Sasha Levin commit 562651a8f139726ecc2fdc8d7bdb32d10fd61847 Author: Mauricio Faria de Oliveira Date: Mon Sep 21 22:36:35 2026 -0300 x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs [ Upstream commit b24bc9dec9c89d01ccb675a55cda6831dc048ce9 ] Even with __builtin the compiler may decide to use the out of line function instead of the inline implementation. The existing code is broken with gcc-14/15 but not gcc-12/13 (Ubuntu 25.10) and vmlinux no longer boots with CONFIG_PVH if CONFIG_KASAN_GENERIC is set. The instrumented out of line function performs a memory access to a region not yet initialized by KASAN, as it is still in the PVH kernel entry point. For testing purposes, if the size argument in cpuid_base_hypervisor() is reduced from 12 to 8 the compiler decides to use the inline implementation. In xen_prepare_pvh(), it (still) decides to use the inline implementation (at least in these compiler versions), but it is not guaranteed to remain. Switch the builtin to the inline implementation to address this. [ bp: Massage commit message. ] Fixes: 416a33c9afce ("x86/cpu: fix unbootable VMs by inlining memcmp() in hypervisor_cpuid_base()") Fixes: fbe5a6dfe492 ("xen, pvh: fix unbootable VMs by inlining memset() in xen_prepare_pvh()") Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Juergen Gross Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-4-08da47943d8e@igalia.com Signed-off-by: Sasha Levin commit 7bc9f51c02647624dfa842ad3bb9e3fef5a6b4be Author: Mauricio Faria de Oliveira Date: Mon Sep 21 22:36:34 2026 -0300 x86/asm: Group inline string functions [ Upstream commit 85f11c17b261772cddc4606f98f6c604aded4607 ] Group the __inline string functions in the same header. Use since __inline_memcmp() must remain there for use by arch/x86/boot/string.c. No functional changes. Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-3-08da47943d8e@igalia.com Stable-dep-of: b24bc9dec9c8 ("x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs") Signed-off-by: Sasha Levin commit f8356af751f53e9de5e88fd3fd412f606b4bfe8e Author: Mauricio Faria de Oliveira Date: Mon Sep 21 22:36:33 2026 -0300 x86/asm, x86/boot: Carve out inline memcmp() into a separate header [ Upstream commit 5b6fe00406ce967c556d544a7fc80233341c67c8 ] Move the inline memcmp() function currently only available in boot/string.c into the shared string function header to be reused. This is not done through to avoid pulling unnecessary code in boot/string.c that causes build errors in boot/compressed/string.c and purgatory/purgatory.ro. No functional changes. [ bp: Massage commit message. ] Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-2-08da47943d8e@igalia.com Stable-dep-of: b24bc9dec9c8 ("x86/pvh: Really inline memcmp() and memset() to fix unbootable VMs") Signed-off-by: Sasha Levin commit 504ba2b45ab8d28c29b4ad214d8ee22416067d35 Author: Mauricio Faria de Oliveira Date: Mon Sep 21 22:36:32 2026 -0300 x86/boot: Remove redundant "cc" clobber in memcmp() and document it [ Upstream commit 94509668fccfa098e0a3d57e7093a9afd88aea9f ] The "cc" clobber remains recognized for source compatibility, but it has no meaning anymore; it is automatically generated without condition-code constraints: https://lore.kernel.org/all/57b0d188-b256-bde4-43e6-99dae4f59d60@suse.de Comment out the redundant "cc" clobber for documentation purposes. [ bp: Massage commit message. ] Fixes: a8c171c107c0 ("x86/boot: Add volatile, clobbers and zero-length test in memcmp()") Reported-by: "H. Peter Anvin" Signed-off-by: Mauricio Faria de Oliveira Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260921-pvh-kasan-inline-v10-1-08da47943d8e@igalia.com Signed-off-by: Sasha Levin commit 273d721dc75cf7b9f6870f7f10d3f043ad626765 Author: Hisam Mehboob Date: Tue Aug 25 03:28:47 2026 +0500 vfio: selftests: Include for basename() on non-glibc builds [ Upstream commit e11a07856ba06867a4c0c8aa91770e1b209dea98 ] sysfs.c calls basename() but does not include its declaration. Glibc exposes basename() through with _GNU_SOURCE, while musl declares it in . With musl, this results in an implicit-function-declaration error and subsequent type-mismatch errors at the callers. Include so the declaration is available on both glibc and musl. This is safe at both call sites: the arguments are local writable char[PATH_MAX] buffers filled by readlink_safe(). Link: https://lore.kernel.org/kvm/CALzav=fs4bqMM7BXNPXqhtbqGzA+LW5fgx2-1Q5=sTN5+krYhw@mail.gmail.com/ Fixes: a262fc49e0aa ("KVM: selftests: Build and link selftests/vfio/lib into KVM selftests") Reviewed-by: David Matlack Signed-off-by: Hisam Mehboob Link: https://lore.kernel.org/r/20260824222845.459181-3-hisamshar@gmail.com Signed-off-by: Alex Williamson Signed-off-by: Sasha Levin commit 1175e6d6667642735440c5b2675cb505ed1c455e Author: Cheng-Yang Chou Date: Tue Sep 22 23:50:00 2026 +0800 selftests/sched_ext: Fix rt_stall runner abort [ Upstream commit 6b8d2bc44fbb6d232382141ae70d4ecc28a9dc36 ] rt_stall uses ksft_exit_fail() and friends, which call exit(), so a single rt_stall failure or a fork() error kills the runner and skips the remaining tests. Drop the ksft_* usage, report the handshake failure back from wait_ready(), and let run() return SCX_TEST_FAIL so the runner records the failure and moves on. Since the test now returns rather than exiting, route every path after the forks through one cleanup label, so a failure cannot leave the SCHED_FIFO task spinning on CORE_ID for the tests that follow. Also destroy the struct_ops link before checking the exit kind, so the link is released when that check fails. Fixes: be621a76341c ("selftests/sched_ext: Add test for sched_ext dl_server") Signed-off-by: Cheng-Yang Chou Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 8e18203b5864f6c8dbab35295a49d95e0d9559d7 Author: Xueqin Luo Date: Tue Aug 25 21:14:00 2026 +0800 cpufreq/amd-pstate: Restore previous EPP if profile_name allocation fails [ Upstream commit 50fb9e04c9b1fe822baccba57801e2bc7795552e ] amd_pstate_set_dynamic_epp() first applies the EPP value derived from the current platform profile via amd_pstate_set_epp() and only then allocates the profile name and registers the platform profile handler and the power supply notifier. All failures after the EPP has been programmed jump to the cleanup label, which restores the previously programmed EPP value. However, if the kasprintf() of the profile name fails, the function returns -ENOMEM directly, bypassing the cleanup label, so the EPP value programmed above is never rolled back even though enabling dynamic EPP has failed. Make the allocation failure path jump to the cleanup label as well, so that the previous EPP value is restored consistently on all error paths. Fixes: b7294b627598 ("cpufreq/amd-pstate: Add dynamic EPP as an "energy_performance_preference" mode") Signed-off-by: Xueqin Luo Link: https://lore.kernel.org/r/20260825131400.1509428-1-luoxueqin@kylinos.cn Signed-off-by: Mario Limonciello Signed-off-by: Sasha Levin commit 66cb89aad2b12537369dd61bf1b234aaed37285b Author: Rafael J. Wysocki Date: Mon Sep 21 21:54:29 2026 +0200 ASoC: amd: acp3x-es83xx: Switch to use acpi_bus_get_primary_device() [ Upstream commit aae5bd00ced5b7e42ef3b3aa46923ad72388c60b ] Replace acpi_get_first_physical_node() that is slated for removal with acpi_bus_get_primary_device() that takes a reference to the device it is about to return. This addresses a potential use-after-free that may occur if the device returned by acpi_get_first_physical_node() is removed right after dropping its ACPI companion's physical_node_lock in that function. It also fixes a device reference counting issue that may lead to a premature device release if devm_kzalloc() fails in acp3x_es83xx_probe(). Fixes: 54fcd9dd44b2 ("ASoC: amd: acp: Add machine driver that enables sound for systems with a ES8336 codec") Signed-off-by: Rafael J. Wysocki Acked-by: Mark Brown Link: https://patch.msgid.link/2310746.NgBsaNRSFp@rafael.j.wysocki Signed-off-by: Sasha Levin commit 6ba02f330bedf95bc7d09b2453c48c159ddefd93 Author: Rafael J. Wysocki Date: Mon Sep 21 21:53:51 2026 +0200 ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device() [ Upstream commit 6f50ab7ab1f93e874fa75d18bf98bbca4ce0204f ] Replace acpi_get_first_physical_node() that is slated for removal with acpi_bus_get_primary_device() that takes a reference to the device it is about to return. This addresses a potential use-after-free that may occur if the device returned by acpi_get_first_physical_node() is removed right after dropping its ACPI companion's physical_node_lock in that function. It also fixes a device reference counting issue that may lead to a premature device release if gpiod_get_optional() fails in st_es8336_late_probe(). Fixes: 02527c3f2300 ("ASoC: amd: add Machine driver for Jadeite platform") Signed-off-by: Rafael J. Wysocki Acked-by: Mark Brown Link: https://patch.msgid.link/2063881.yKVeVyVuyW@rafael.j.wysocki Signed-off-by: Sasha Levin commit 5e42da3737b9db8606110b890eedc1a2e20b99a2 Author: Zhijian Han Date: Fri Sep 4 09:23:07 2026 +0800 PCI: imx6: Fix resource leaks in probe error paths [ Upstream commit 1e184f38851ff6fac0b72bfb7f51db47ed6f257f ] imx_pcie_probe() leaks both pwrctrl devices and power domains on failure: - imx_pcie_attach_pd() attaches the "pcie" and "pcie_phy" power domains and adds device links to them, but nothing detaches the domains or removes the links on probe failure or deferral, so they leak. - A failure of devm_pm_runtime_set_active_enabled() returns directly without destroying the pwrctrl devices. - A partial failure inside imx_pcie_attach_pd() leaks the power domains that were already attached. Add imx_pcie_detach_pd_action() to remove the device links and detach the power domains in reverse order of acquisition and register it with devm_add_action_or_reset() so they are released automatically on probe failure. Fixes: 2c5768344f88 ("PCI: imx6: Move pci_pwrctrl_create_devices() to imx_pcie_probe()") Reported-by: sashiko-bot@kernel.org Link: https://lore.kernel.org/all/20260822013640.182C01F000E9@smtp.kernel.org/ Signed-off-by: Zhijian Han [mani: removed the imx_pcie_detach_pd() helper] Signed-off-by: Manivannan Sadhasivam [bhelgaas: update commit log to match inlining of imx_pcie_detach_pd() into imx_pcie_detach_pd_action()] Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20260904012307.3434449-1-hanzhijian1991@gmail.com Signed-off-by: Sasha Levin commit 87c95f17d9b3352c3c8712a863d3a832b02ed247 Author: Pei Xiao Date: Tue Sep 22 11:38:01 2026 +0800 ata: pata_parport: fix parport attach idr_alloc for [ Upstream commit 193f5b84a95c02456f51fe5067750ecf73d213d5 ] idr_alloc() expects an inclusive start and an exclusive end, so passing port->number as both arguments produces an empty range. Because idr_alloc() only falls back to INT_MAX when end <= 0, the allocation succeeds solely for parport0 and returns -ENOSPC for every other port, which pata_parport_attach() silently ignores. As a result only parport0 gets probed and any higher-numbered parports are never attached. Use port->number + 1 as the end so the range [port->number, port->number + 1) contains exactly the desired ID. Fixes: 246a1c4c6b7f ("ata: pata_parport: add driver (PARIDE replacement)") Signed-off-by: Pei Xiao Link: https://lore.kernel.org/r/cee1a15d98cd0d55f41fd65ca9d222b68a74e7d3.1790047457.git.xiaopei01@kylinos.cn Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit 98c6b351fd8ac59bd304c02d1098b7ce27262791 Author: Jeremy Bongio Date: Wed Sep 16 17:32:03 2026 +0000 RDMA/irdma: Use kvzalloc for lvl2 leafmem allocation [ Upstream commit 9c40f13a63a4b87177de3e8c318af25068fc6ab4 ] During VM live migration or when registering large memory regions (e.g., guest memory >= 256 GB backed by 4 KiB pages), get_lvl2_pble() calculates total leaves exceeding ~131,072. The memory required for lvl2->leafmem.va exceeds 4 MiB (sizeof(*leaf) * total > 5.24 MiB). Because kzalloc() requires physically contiguous pages, requests larger than MAX_PAGE_ORDER (4 MiB on x86_64) fail and trigger a warning: WARNING: CPU: 123 PID: 119906 at mm/page_alloc.c:5997 __alloc_frozen_pages_noprof+0x50c/0x1050 Call Trace: alloc_frozen_pages_noprof+0xc0/0x240 ___kmalloc_large_node+0x3d/0xd0 __kmalloc_large_node_noprof+0x1b/0x90 __kmalloc_noprof+0x254/0x660 get_lvl1_lvl2_pble+0xbc/0x270 [irdma] irdma_get_pble+0x44/0xc0 [irdma] irdma_setup_pbles+0x46/0x1d0 [irdma] irdma_reg_user_mr_type_mem+0x41/0x230 [irdma] irdma_reg_user_mr+0x194/0x1c0 [irdma] ib_uverbs_reg_mr+0x1b0/0x2c0 [ib_uverbs] The leafmem array is purely host software tracking structures (struct irdma_pble_info) and does not require physically contiguous memory. Switch the allocation from kzalloc() to kvzalloc() and free it with kvfree() so that requests exceeding MAX_PAGE_ORDER fall back to virtually contiguous memory via vmalloc. Fixes: e8c4dbc2fcac ("RDMA/irdma: Add PBLE resource manager") Assisted-by: LLM Signed-off-by: Jeremy Bongio Link: https://patch.msgid.link/20260916173203.2555458-1-jbongio@google.com Tested-by: Jacob Moroni Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 1863e7479bfc30391d43a5340f89b5263647b58c Author: Francesco Dolcini Date: Mon Sep 14 21:09:42 2026 +0200 arm64: dts: ti: k3-am62-verdin: fix main_gpio0/main_gpio1 line names size [ Upstream commit 11a51e82e1f997975a28358a1dcffec190ea7282 ] gpio-line-names sized main_gpio0/main_gpio1 for 87/88 lines, the SoC's ti,ngpio values before they were corrected to 92/52 in commit 28c8f2189d80 ("arm64: dts: ti: k3-am62-main: Fix GPIO numbers in DT"), four months before this file was written. Resize both arrays to match, keeping every existing label at its original index. Fixes: 316b80246b16 ("arm64: dts: ti: add verdin am62") Assisted-by: LLM Signed-off-by: Francesco Dolcini Link: https://patch.msgid.link/20260914190943.50843-1-francesco@dolcini.it Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit 0dcf2822c9c9dad7bfa251492e1ed34ca4116c89 Author: Francesco Dolcini Date: Mon Sep 14 20:35:15 2026 +0200 arm64: dts: ti: k3-am69-aquila: fix AQUILA_B73 gpio-line-names typo [ Upstream commit 558c01ff1d9dc1961e0e0a91e5d4bc07eb081d56 ] wkup_gpio0's gpio-line-names has "AQUILC_B73" instead of "AQUILA_B73", inconsistent with every other entry in the array. Fixes: 39ac6623b1d8 ("arm64: dts: ti: Add Aquila AM69 Support") Assisted-by: LLM Signed-off-by: Francesco Dolcini Link: https://patch.msgid.link/20260914183516.28865-1-francesco@dolcini.it Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit e10afbdfc59eeef035b8457a27bbbe01e34d6d0e Author: Judith Mendez Date: Wed Sep 9 16:47:30 2026 -0500 arm64: dts: ti: k3-am62l-evm: Remove unnecessary internal pullups for MMC0 [ Upstream commit dfba8329b8ebd49807ed1c1b336992e5791c7e48 ] AM62L EVM has external pullups on MMC0 CMD and D0 pins [0]. Remove internal pullups considering: - Internal pullups are not required, without internal pullups, RDAT and RCMD values of 47K are within spec - having both pullups (stronger pull) results in unnecessary power consumption [0] https://www.ti.com/lit/zip/SPRCAL6 Fixes: 00fb4c73b67d ("arm64: dts: ti: k3-am62l: add initial reference board file") Signed-off-by: Judith Mendez Reviewed-by: Moteen Shah Link: https://patch.msgid.link/20260909214743.899477-3-jm@ti.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit fc396e1824b0650264b704576de9e83c3fbcf7d2 Author: Jisheng Zhang Date: Wed Sep 9 22:39:57 2026 +0800 regulator: mp886x: fix pontential division by zero [ Upstream commit d16ef5debccc4289c1f25309a2cccfbbe879601a ] If the "mps,fb-voltage-divider" 2nd var is 0, there will be division by zero bug. Fixes: 97be82880b61 ("regulator: add support for MP8869 regulator") Signed-off-by: Jisheng Zhang Closes: https://sashiko.dev/#/patchset/20260901043123.5401-1-jszhang@kernel.org?part=1 Link: https://patch.msgid.link/20260909143957.9284-3-jszhang@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b4d053eb3cc7f61a488824d06f18f6c0c9f0008f Author: Jisheng Zhang Date: Wed Sep 9 22:39:56 2026 +0800 regulator: mp886x: check get_voltage_sel() return value [ Upstream commit 87121c42fadc7683469aee96ad833bc560197a55 ] The get_voltage_sel() can fail, resulting in negative error codes stored in unsigned integers and corrupted state logic. Fixes: 97be82880b61 ("regulator: add support for MP8869 regulator") Signed-off-by: Jisheng Zhang Closes: https://sashiko.dev/#/patchset/20260901043123.5401-1-jszhang@kernel.org?part=1 Link: https://patch.msgid.link/20260909143957.9284-2-jszhang@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0b97e4ea132b112ea51e8cfd24eb719e0b3ff011 Author: Dmitry Antipov Date: Wed Sep 16 19:16:06 2026 +0300 leds: flash: Prevent using uninitialized variable in flash_fault_show() [ Upstream commit d229695f2162a41bfa614f175798fa56a5f1c969 ] In flash_fault_show(), address of uninitialized 'fault' variable is passed to device-specific .fault_get callbacks. This is not a problem if such a callback directly assigns the value like rt4505_fault_get(), but results in an undefined behavior if callback just performs bitwise ORs like as3645a_get_fault(). So just initialize 'fault' with zero. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260904054437.461706-1-dmantipov@yandex.ru?part=1 Fixes: 7aea8389a77ab ("leds: Add LED Flash class extension to the LED subsystem") Signed-off-by: Dmitry Antipov Link: https://patch.msgid.link/20260916161607.90106-1-dmantipov@yandex.ru Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 9a3c787e1773da62a25a272db6ffa39f6742d239 Author: Manuel Fombuena Date: Tue Sep 15 13:48:22 2026 +0100 leds: st1202: Cap the channel current in st1202_led_set() [ Upstream commit ca81ea108502817e3841e98f0d3651398d9e1bd9 ] st1202_led_set() writes the requested brightness straight into the 8-bit channel current register. The LED core limits brightness to max_brightness, which comes from the device tree max-brightness property and has no upper bound, so on a board declaring more than 255 a brightness of 256 reaches the register as 0 and turns the LED off, and larger values wrap around. Cap the value at U8_MAX, the width of the register, so anything above it drives the channel at full current. The pattern and blink paths already cap the current they program the same way. Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB8497C60D1D2921DD0384926FC5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit cf9dcbd303be27c5725d83d763e9a58bc352e069 Author: Manuel Fombuena Date: Tue Sep 15 13:47:39 2026 +0100 leds: st1202: Honour max_brightness when blinking [ Upstream commit 865d81a98602c828515fa6ac3c530efc4205f9f6 ] st1202_blink_set() drives the channel current register to U8_MAX, the full scale of the part, regardless of the ceiling the board declared. led_classdev_register_ext() takes max_brightness from the device tree max-brightness property. The driver does not implement led-max-microamp, so that is the only way a board can ask for less than 20 mA. The brightness and pattern paths both respect it. Blinking is the one that does not, so a board that declares a lower ceiling holds it until something enables the timer trigger. Program the same value the other paths use, capped at the width of the current register so an out of range property cannot wrap it to zero. Fixes: 35cbd34a6a05 ("leds: st1202: Add hardware-accelerated blink support") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB84979A5D536C71D319A06808C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 2a1a1845b2ca909fddfe838225a2372aaf6562e7 Author: Manuel Fombuena Date: Tue Sep 15 13:47:16 2026 +0100 leds: st1202: Clear unused pattern slots in blink_set() [ Upstream commit 3268b9e91db16f240ffe07ff6caf963ba8191ce8 ] st1202_blink_set() programs slots 0 and 1 of its own channel and leaves slots 2 to 7 at ST1202_PATTERN_PWM_FULL, the value both st1202_led_set() and st1202_led_pattern_clear() leave behind. Nothing keeps those slots out of the output except the duration registers being zero, and those are shared by all twelve channels. Another channel programming a hardware pattern longer than two steps writes those durations again and re-arms the sequencer, so the blinking channel drives full scale for the extra steps. With two LEDs on one device, blinking one and giving the other a four step pattern, the blinking channel lights during the two steps it never programmed. Zero the channel's own unused slots, the same invariant st1202_led_pattern_set() applies to the slots beyond its pattern length. blink_set() already zeroes durations 2 to 7 when it runs; the slots are exposed only when another channel sets those shared durations again. A channel whose blink is shorter than the active timeline still loses its own timing, because the sequencer has one set of duration registers. This only stops it emitting output it never asked for. Fixes: 35cbd34a6a05 ("leds: st1202: Add hardware-accelerated blink support") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB849770CF6D41F3DFF56B1AC3C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit b6a6e9be5a2bbecc64781f4aed2d410b7164a560 Author: Manuel Fombuena Date: Tue Sep 15 13:46:31 2026 +0100 leds: st1202: Do not set brightness from atomic context [ Upstream commit 1ec35fa181981b4b9581b3dae967bac7ed82c89c ] st1202_brightness_set() takes the chip mutex and performs I2C transfers, both of which can sleep, but it is installed as the brightness_set callback. led_set_brightness_nopm() calls that op directly on the assumption that it never sleeps, including from softirq context, so the driver can sleep in atomic context. The driver also installs brightness_set_blocking, but the core only falls back to it when brightness_set is absent, so st1202_led_set() was never reached. It merely turned the channel on or off and ignored the requested brightness, so dropping brightness_set on its own would have lost brightness control entirely. Move the register programming into st1202_led_set() so the blocking callback honours the brightness value, and drop brightness_set. The core now defers the update to a work queue, where sleeping is allowed. Errors from the register writes are propagated rather than discarded. st1202_led_set() was the last user of the locking st1202_channel_set() wrapper, which is removed. Programming every PWM slot to full scale is kept: it is what makes the brightness visible while the global sequencer is running, without having to stop the sequencer and disturb the other channels. Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB8497CF8FB57A272EB671F0C6C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 9f76fdb33f1ce78d8ef41a0f912f42113c7dd253 Author: Manuel Fombuena Date: Tue Sep 15 13:46:05 2026 +0100 leds: st1202: Take a reference on the LED firmware node [ Upstream commit 5882de94edf7a53812a76a882a95e1e86d7105d9 ] st1202_dt_init() stores each LED's firmware node while walking the device tree with for_each_available_child_of_node_scoped(), which drops its reference to the node at the end of every iteration. The LED class stores the pointer with device_set_node() and does not take a reference of its own, so nothing keeps the node alive for as long as the LED device uses it. That has been the case since the driver was added, when the LED class devices were registered inside that same loop. Commit c72e455b89f2 ("leds: leds-st1202: Fix NULL pointer access on race condition") moved the registration into a separate loop in st1202_probe(), which also leaves the stored pointer unreferenced between the two loops. With CONFIG_OF_DYNAMIC the node can be freed while it is still in use, leaving led->fwnode and the LED device's firmware node dangling. Take a reference when the node is stored and release it through a devm action. The action is registered before the LED class devices are, so it runs after they have been unregistered. Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB849710C564F23C21BDA3EA41C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 0bbbab24054d29e71d9b6ab1778fb4ac3ebfdf8f Author: Manuel Fombuena Date: Tue Sep 15 13:45:30 2026 +0100 leds: st1202: Program the channel current for hardware patterns [ Upstream commit 878eec1475e77ad22059584bc617b6e671a536d9 ] A channel's output is ILED x Pattern_PWM / 4095, so a pattern is only visible while the analog current register holds a non-zero value. st1202_led_pattern_set() programs the PWM slots and starts the sequencer but never writes ILED, so a channel whose current is zero stays dark while pattern_set() reports success. Zero is reached by ordinary use. Writing 0 to brightness sets it, and so does switching away from the pattern trigger, because pattern_trig_deactivate() ends with led_set_brightness(LED_OFF). A sequence as simple as echo none > trigger echo pattern > trigger echo "255 500 0 500" > hw_pattern therefore programs a pattern that never lights up. Program the current in pattern_set() and release it in pattern_clear(), so the pattern path owns ILED for as long as a pattern is loaded. Releasing it matters because the trigger calls pattern_clear() before it parses a new pattern: without that, a rejected or empty hw_pattern write would leave the channel at full current with every PWM slot at full scale, latching the LED on. Clearing before the slots are raised also avoids a brief full-brightness flash on every reprogram. A current of zero is not enough to release the channel, though: the datasheet notes that it does not switch the channel off but leaves a small uncontrolled current, which shows as a faint glow. pattern_clear() therefore also disables the channel, and pattern_set() enables it again. Both are done before the sequencer is stopped, so an I2C error partway through a clear cannot leave the channel lit. Probe clears every channel, so the LEDs now reach user space switched off. Until now they came up lit at the chip's power-on current, because pattern_clear() fills every slot at full scale. Probe no longer enables the channels itself either: st1202_setup() has already disabled them all, and each path that lights a channel enables it when needed. The current is programmed to the same max_brightness the PWM values are scaled against, so a pattern step of N produces the same output as writing N to brightness, and a board declaring a lower ceiling through the max-brightness property keeps it on both paths. Note that this makes a hardware pattern take the channel to its maximum current, so brightness reads back as max_brightness once a pattern is loaded and as zero once it is cleared. The pattern's own values, not the last brightness written, decide what the channel shows while a pattern is running. Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB84978D7C1CC0367D1818093DC5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 006e4779592af8df7c4bf160d85eeb7534105bc1 Author: Manuel Fombuena Date: Tue Sep 15 13:42:52 2026 +0100 leds: st1202: Spell out the phase-shift configuration bit [ Upstream commit 7520fc78c52ea55c2c83d0ecc11ab2355a753b7f ] ST1202_CONFIG_REG_SHFT is abbreviated to the point of being unreadable and, unlike the neighbouring PATS and PATSR bits, carries no comment explaining what it controls. Rename it to ST1202_CONFIG_REG_PHASE_SHIFT and document it in the same style as the other configuration bits, retaining the datasheet name in the comment so it remains searchable. The longer name no longer fits the existing layout in st1202_led_pattern_set(), where the continuation line was already 106 columns wide. Re-wrap that register write to match the layout st1202_blink_set() uses for the same operation and drop the redundant parentheses around the bit mask. No functional change. Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB849716E21E082D3B93B5B683C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Stable-dep-of: 878eec1475e7 ("leds: st1202: Program the channel current for hardware patterns") Signed-off-by: Sasha Levin commit 178f90f4160d49c593636159f65b7a042a1512be Author: Manuel Fombuena Date: Fri Aug 14 10:16:54 2026 +0100 leds: st1202: Add hardware-accelerated blink support [ Upstream commit 35cbd34a6a05cc53882b1b7ca6f338a93ab29fcb ] Implement blink_set() to enable hardware-accelerated blinking via the timer trigger. The LED1202 pattern engine is used to produce a two-step sequence: full brightness for delay_on, off for delay_off, repeating indefinitely. Requested delays are clamped to the hardware range [22ms, 5610ms] then rounded up to the nearest 22ms step. Clamping before rounding prevents integer overflow in roundup() for extreme input values; since ST1202_MILLIS_PATTERN_DUR_MAX is an exact multiple of ST1202_MILLIS_PATTERN_DUR_MIN, rounding a clamped value cannot exceed the maximum. A zero delay is replaced with the default of 500ms independently for each of delay_on and delay_off. The LED1202 pattern sequencer is global and its timing registers are shared across all channels, so only one blink configuration can be active at a time. Other active channels have their PWM slots zeroed for both pattern steps so they remain dark rather than outputting unintended values when the sequencer runs. The target channel's ILED register is set to full brightness and the channel is enabled, since the timer trigger deactivates the current trigger before calling blink_set which would otherwise leave the channel disabled. Signed-off-by: Manuel Fombuena Link: https://patch.msgid.link/GV1PR08MB84973F79E871176EB387C377C5DA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Stable-dep-of: 878eec1475e7 ("leds: st1202: Program the channel current for hardware patterns") Signed-off-by: Sasha Levin commit 59f5b161bdc434189c408ecf58c1cdb3650889d0 Author: Manuel Fombuena Date: Tue Sep 15 13:45:01 2026 +0100 leds: st1202: Scale pattern brightness to the 12-bit PWM range [ Upstream commit 82f8b88d6ac2edf01651bbd84e03ede04b2ca80e ] The LED1202 PWM registers are 12 bits wide, but st1202_led_pattern_set() writes the 8-bit brightness value carried by struct led_pattern into them unscaled. A pattern step asking for full brightness therefore drives the channel at 255 out of 4095, about 6% duty cycle, so a pattern is dimmer than the same brightness set directly. Scale the value to the full PWM range before programming it. Scale against max_brightness rather than the register maximum. The LED core takes max_brightness from the DT max-brightness property, so a board can declare a ceiling below full scale, and the pattern trigger already rejects steps above it. Scaling against a hardcoded 255 would leave such a board unable to reach its own declared maximum from the pattern path while the brightness path reaches it. Scaling divides by max_brightness. The LED core replaces a zero max-brightness from the device tree with LED_FULL, so the divisor should never be zero, but the helper returns zero rather than rely on that. max_brightness is capped at U8_MAX, the driver's own maximum, so a device tree declaring more than the part supports is treated as full scale. struct led_pattern brightness is signed, so clamp both ends and floor a negative value to LED_OFF rather than let it wrap. Document that a step is relative to max_brightness, since the range given in the documentation no longer holds when the device tree sets max-brightness. Fixes: 259230378c65 ("leds: Add LED1202 I2C driver") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB8497B938D3592582E17CB757C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 0b5385aa8679d48f662028c1a7c22c2653dcc62d Author: Manuel Fombuena Date: Tue Sep 15 13:43:17 2026 +0100 leds: st1202: Name pattern index variables consistently [ Upstream commit 0aed225f40613253617ad30a57492043a3448938 ] The driver already names pattern indices "pattern" in the signatures of st1202_pwm_pattern_write() and st1202_duration_pattern_write(), and st1202_blink_set() follows the same convention. The remaining loops abbreviate it to "patt", which matches nothing else in the file. Rename those loop variables to "pattern". In st1202_led_pattern_set() that name is taken by the array of pattern steps, so rename the parameter to "patterns", which also reflects better that it is an array. Two st1202_pwm_pattern_write() calls exceed 100 columns with the longer name and are wrapped accordingly. No functional change. Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB8497AD614B8686BBDA654674C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Stable-dep-of: 82f8b88d6ac2 ("leds: st1202: Scale pattern brightness to the 12-bit PWM range") Signed-off-by: Sasha Levin commit 855682f575729d2a75317ab0b04ae294d61cc6fe Author: Manuel Fombuena Date: Tue Sep 15 13:44:38 2026 +0100 leds: st1202: Clear unused pattern slots in pattern_set() [ Upstream commit 119a7d375e5caedaf252198fa64e7df5d7269ab4 ] The pattern duration registers are chip-wide while the PWM registers are per-channel, so a channel can end up driven by a sequencer timeline it never programmed. st1202_led_pattern_set() programs only the first len slots. The pattern trigger calls pattern_clear() before pattern_set() only once a channel is already in PATTERN_TYPE_HW mode, and activating the trigger resets that mode, so the first hardware pattern written after every activation skips it. If another channel has already programmed a longer pattern, durations [len, 8) are still set, and this channel's PWM for those slots holds whatever was last written there. That used to be LED_OFF, so a channel stayed dark for the slots it had not programmed itself. Since commit d2ca0e2b6d64 ("leds: st1202: Set all pattern PWM slots to full after clearing pattern") pattern_clear() leaves ST1202_PATTERN_PWM_FULL there, and so does the brightness path since commit 7cbe470366bd ("leds: st1202: Fix brightness having no effect while pattern mode is active"). The channel now plays its own steps and then sits at full brightness for the rest of the sequence. Zero this channel's PWM for the unused slots so it stays dark for the remainder of the timeline, as st1202_blink_set() already does for the channels it is not driving. The duration registers are deliberately left alone. All twelve channels share them, so clearing them would truncate a longer pattern still running elsewhere on the same device. A channel whose pattern is shorter than the active timeline therefore keeps the longer period; that follows from having a single hardware sequencer and is not something this can correct. Fixes: d2ca0e2b6d64 ("leds: st1202: Set all pattern PWM slots to full after clearing pattern") Signed-off-by: Manuel Fombuena Assisted-by: LLM Link: https://patch.msgid.link/GV1PR08MB8497E9939E3C0D68401659D0C5BA2@GV1PR08MB8497.eurprd08.prod.outlook.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 2d7679ebe8ab5ccb9e6a21a67e6ee363e15a7f8f Author: Jacob Moroni Date: Tue Sep 15 17:03:17 2026 +0000 RDMA/irdma: Fix erroneous -ENOMEM for large MR registration [ Upstream commit 5bb710151753fe53047b1d34b1b54d0f179cec68 ] Commit cc8997c94bf3 ("RDMA/irdma: Refactor PBLE functions") replaced the explicit level1_only boolean with a bit mask but did not properly convert the "if (level1_only)" check in irdma_get_pble() to be "lvl == PBLE_LEVEL_1" and instead left it as "if (lvl)". User MR registration passes "lvl = PBLE_LEVEL_1 | PBLE_LEVEL_2" so this check always evaluates to true and causes the loop to bail after grabbing a single SD even if the region actually requires more than one SD (as is the case for regions larger than 1 GiB with 4k pages). As a result, these registrations can fail with -ENOMEM even if there are sufficient PBLE resources. Fixes: cc8997c94bf3 ("RDMA/irdma: Refactor PBLE functions") Signed-off-by: Jacob Moroni Link: https://patch.msgid.link/20260915170317.2901672-1-jmoroni@google.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 0800efffa1733593c832557fe669cab9a5c2c73c Author: Li RongQing Date: Wed Sep 16 20:09:26 2026 +0800 RDMA/core: Fix partial copy of IPv6 flow_lbl in LAG hash skb [ Upstream commit b63d21631f836528ef660d7b5a0d84890ff6dbd5 ] rdma_build_skb() constructs a synthetic IPv6 header for LAG slave selection and copies the flow label from the AH attribute: memcpy(&ip6h->flow_lbl, &ah_attr->grh.flow_label, sizeof(*ip6h->flow_lbl)); ipv6hdr.flow_lbl is __u8[3], so sizeof(*ip6h->flow_lbl) dereferences the array to a single __u8 and yields 1. The memcpy therefore copies only the first byte of the flow label, leaving flow_lbl[1] and flow_lbl[2] uninitialised in the skb buffer (alloc_skb() does not zero the data). The resulting LAG hash is computed over one byte of real flow-label data and two bytes of kmalloc residue, so IPv6 RoCEv2 traffic on a bonded interface can be steered to the wrong slave. Use sizeof(ip6h->flow_lbl) (the array, 3 bytes) so the whole flow label is copied. Fixes: bd3920eac1331 ("RDMA/core: Add LAG functionality") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260916120926.1761-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 9bddfa48b33606d9e64b5c99ad73a551aeb8275d Author: Arnaldo Carvalho de Melo Date: Wed Sep 16 08:47:34 2026 -0300 perf annotate-data: Show the sample count in the data-type browser [ Upstream commit 9db4e9d6cc7c7d318fb6d6bb73abe3fed27385a8 ] The data-type browser has a samples view, selected with -n (or with annotate.show_nr_samples), in which browser__write_overhead() prints a local nr_samples variable that is initialized to zero and never updated, so every member is listed as having no samples while the period and percent columns for the same entry are filled in. Print the histogram entry's own count instead. This predates the load/store counter split, so fix it ahead of that patch: the split then only has to adapt a line that is already correct, and this fix can be picked on its own. Fixes: d001c7a7f4736743 ("perf annotate-data: Add hist_entry__annotate_data_tui()") Acked-by: Namhyung Kim Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit e31edb88314d3b0a903483f21462d4ea8c8ae365 Author: Cong Nguyen Date: Tue Sep 15 10:45:15 2026 +0700 leds: lm3692x: Fix regulator/gpio leak and wrong enabled state on last write failure [ Upstream commit 145ca6bca2cc5fd8d9c7af216df58a9c75c0e84c ] Every write in lm3692x_leds_enable() checks its return and jumps to out: on failure -- except the last one, which falls through and sets led->enabled = true regardless of whether it actually succeeded. Leaks the regulator on a failing probe, and short-circuits later brightness_set() calls without retrying. Route it through out: like every other write here, and only set enabled = true once it succeeds. Fixes: 260718b3a35d ("leds: lm3692x: Disable chip on brightness 0") Assisted-by: Claude:claude-opus-4 Signed-off-by: Cong Nguyen Link: https://patch.msgid.link/20260915034515.4147981-1-congnt264@gmail.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 11348160e86057ad37cfbb037416338026c68b6c Author: Ian Rogers Date: Tue Sep 15 23:12:17 2026 -0700 perf build: Remove leftovers of removed build options [ Upstream commit a5cac2df8b4af0410dd6339e6491cb1e4fbc6986 ] NO_LIBDW_DWARF_UNWIND, NO_SYSCALL_TABLE and the embedded clang/LLVM support were all removed, but each removal left the matching entry in the build test suite behind: run += make_no_libdw_dwarf_unwind run += make_no_syscall_tbl run += make_with_clangllvm None of these have a make_* variable defining what to build, so $($@) expands to nothing and each one silently repeats the plain "make_pure" build. The suite therefore spends six builds, as every test is also run with O=, appearing to cover options that no longer exist. Remove them, along with the NO_LIBDW_DWARF_UNWIND comment that is still in Makefile.perf. Fixes: 2e9191573a69ff96 ("perf build: Remove NO_LIBDW_DWARF_UNWIND option") Fixes: 3cc550f5bbcf54ab ("perf tools: Remove dependency on libaudit") Fixes: 56b11a2126bf2f42 ("perf bpf: Remove support for embedding clang for compiling BPF events (-e foo.c)") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Acked-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 904e2356871dede85cf5a3340e8615a8943d79eb Author: Ian Rogers Date: Tue Sep 15 23:12:16 2026 -0700 perf build: Check the version of the compiler that is used [ Upstream commit 4f4387a07f601988e44fc6a4f4663aa1ff264f94 ] The flex and bison flags are adjusted for clang older than 13.0.0, which doesn't grok -Wno-unused-but-set-variable. The test is reached because CC_NO_CLANG says CC is clang, but the version comes from $(CLANG), which defaults to plain "clang" and needn't be the compiler in use: $ make CC=clang-19 CLANG=clang-12 version from $(CLANG) -> 12.0.0, flag stripped version from $(CC) -> 19.1.7, flag kept Dropping the flag lets the warnings it suppresses in the generated flex and bison code through, and those are errors under -Werror. Ask $(CC) instead, as that is what compiles the code. Fixes: 878460e8d0ff84a0 ("perf build: Remove -Wno-unused-but-set-variable from the flex flags when building with clang < 13.0.0") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Acked-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit fbd8647db1e63338af9f9364dd38137a2835eff6 Author: Ian Rogers Date: Tue Sep 15 23:12:15 2026 -0700 perf build: Use the given CC rather than clang in clang builds [ Upstream commit bd874cd8356166d8fb262d32f368c0e460910d5d ] The clang block is entered when CC_NO_CLANG has determined that CC is clang, but it then ignores CC and hard codes $(CLANG), which defaults to plain "clang". Building with a versioned compiler silently switches compiler: $ make CC=clang-19 # actually builds with "clang" Worse, the target triple is probed with $(CLANG) too, so on a machine that only has versioned binaries installed the probe produces nothing and the build stops: $ make CC=clang-19 *** Specify CROSS_COMPILE or add CLANG_TARGET_FLAGS for x86_64 Use $(CC) in both places. Within the block CC is known to be clang, and for "make LLVM=1" CC is already $(CLANG), so nothing changes there. $(CLANG) is left as it is for BPF skeletons, as bpf_skel.mak builds those with "$(CLANG) --target=bpf" whatever CC happens to be. Fixes: 4772e66cb45e0dd2 ("perf build: Support build with clang") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Acked-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 0f99cbf93f04b018d79e95946de196d4b10561e7 Author: Ian Rogers Date: Tue Sep 15 23:12:14 2026 -0700 perf build: Only pass clang flags to CXX when CXX is clang [ Upstream commit c8592f8da838a07ddd0011eeb444771b64193a0f ] Building with "make CC=clang" appends clang's --target= and -fintegrated-as to CXX, but CXX is only set to clang++ by "make LLVM=1". With just CC=clang, CXX is still g++ and every C++ feature test dies: g++: error: unrecognized command-line option '--target=...' g++: error: unrecognized command-line option '-fintegrated-as' The failures are silent, as feature tests are allowed to fail, so the build quietly loses libllvm and C++ demangling support: $ make CC=clang && grep LIBLLVM .config-detected (nothing, whereas a gcc build reports CONFIG_LIBLLVM=y) The block is entered when CC_NO_CLANG says CC is clang, which says nothing about CXX. Probe CXX the same way tools/scripts/Makefile.include probes CC, and only add the flags when CXX really is clang++. Mixing a clang-built C with a g++-built C++ is fine here, the C++ code is linked with -lstdc++ already. Fixes: 4772e66cb45e0dd2 ("perf build: Support build with clang") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Acked-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit f9bfe50de5ceb8906e67a1dd637edd4394f2ad05 Author: Ian Rogers Date: Tue Sep 15 23:12:11 2026 -0700 perf symbol: Fix the build when demangling with libbfd [ Upstream commit ecbc5aac7d9218320f2c734d75798f34c15a9d85 ] cxx_demangle_sym() calls bfd_demangle() with the DMGL_PARAMS and DMGL_ANSI flags, but nothing declares them. The "#define PACKAGE 'perf'", "#include " and the DMGL_ definitions were left behind in symbol-elf.c when the demangling code moved to symbol.c, and libiberty's demangle.h that defines the flags isn't installed by every binutils package. The cplus_demangle() variant is missing a declaration for the same reason. The code is only built when the C++ ABI's __cxa_demangle() is unavailable, so most builds never compile it: $ make BUILD_NONDISTRO=1 NO_DEMANGLE=1 util/symbol.c:2714: error: 'DMGL_PARAMS' undeclared util/symbol.c:2714: error: 'DMGL_ANSI' undeclared util/symbol.c:2716: error: implicit declaration of 'bfd_demangle' Move the libbfd demangling into libbfd.c, which already includes bfd.h, and declare in symbol.c the libiberty interfaces the cplus_demangle() variant needs. Fixes: 4d9b5146f0d91472 ("perf symbol: Move demangling code out of symbol-elf.c") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Acked-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 01b57adb49a599dfe332ad7586e549ce833ffdb8 Author: Ian Rogers Date: Tue Sep 15 23:12:10 2026 -0700 perf libbfd: Fix the clang -Wthread-safety build failure [ Upstream commit c4c43343501bd9fc24ec501ecaf43b7ef2da44d2 ] perf_bfd_lock() and perf_bfd_unlock() are the callbacks given to bfd_thread_init(), so by design they acquire and release the lock on libbfd's behalf and the lock state differs between entry and exit. clang's thread safety analysis, which perf builds with as an error, flags both: util/libbfd.c:56:1: error: mutex 'bfd_mutex' is still held at the end of function [-Werror,-Wthread-safety-analysis] util/libbfd.c:60:2: error: releasing mutex 'bfd_mutex' that was not held [-Werror,-Wthread-safety-analysis] Mark both functions NO_THREAD_SAFETY_ANALYSIS so that libbfd.c compiles with "make CC=clang BUILD_NONDISTRO=1". Fixes: b72b8132d8fd2d6b ("perf libbfd: Ensure libbfd is initialized prior to use") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Acked-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 65ec418e39abc4a9c6862efb98c60e9b8d4df3b0 Author: Chen Pei Date: Mon Sep 14 20:19:03 2026 +0800 perf test: Fix a leaked map reference in the arch dwarf unwind tests [ Upstream commit 1622c9ae39e2882fcbbae7c9d27dda13f1880b93 ] maps__find() has returned a reference to the map it finds since commit 42fd623b58db ("perf maps: Get map before returning in maps__find"), which updated arch/x86/tests/dwarf-unwind.c but missed the arm, arm64 and powerpc copies. Release the map after reading its end, as x86 does. All other callers of maps__find() already release what they get. Fixes: 42fd623b58dbcc48 ("perf maps: Get map before returning in maps__find") Reviewed-by: Ian Rogers Signed-off-by: Chen Pei Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit a6e311a4d520ec9c4bde0104e87e5071ddc05c0a Author: Hui Su Date: Sat Sep 12 14:56:19 2026 +0900 perf synthetic-events: Fix schedstat event lifetime handling [ Upstream commit cf3d239189da0bd5122ae38c62f5fefdb744eb86 ] perf_event__synthesize_schedstat() has two event lifetime issues. After a successful iteration, event is freed but retains its value. If the next iteration starts with an unrecognized schedstat record type, neither synthesizer assigns a new value. The stale pointer then passes the NULL check, may be passed to process(), and is freed again. In addition, when user_requested_cpus filters out a synthesized event, the continue path skips free(event), leaking the event. Make event local to each loop iteration so it always starts as NULL. Also avoid the filter continue and unconditionally free each synthesized event at the end of the iteration. Fixes: c3030995f23b3d35 ("perf sched stats: Add record and rawdump support") Reviewed-by: Ian Rogers Signed-off-by: Hui Su Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 3757f76b45fbed77c10c2b5e44290eee253c327b Author: Haibo Chen Date: Mon Jul 27 17:57:54 2026 +0800 leds: pca9532: Check i2c_smbus_read_byte_data() return value [ Upstream commit 1b75f038e5f71ed32ce6593b5763f9776ec58a25 ] Coverity report INTEGER_OVERFLOW (tainted_data_return -> cast_underflow -> overflow) in pca9532_getled(). pca9532_getled() stored the return value of i2c_smbus_read_byte_data() into a char and used it directly to compute the LED state without checking for an error. i2c_smbus_read_byte_data() returns a negative error code on failure. On an I2C read error the negative value was assigned to an unsigned type, triggering an integer underflow/overflow, and a meaningless LED state was returned to the caller. Read the value into an int, check for the error, and fall back to PCA9532_OFF while emitting a warning when the read fails. Fixes: 28c5fe99016d ("leds: pca9532: Extend pca9532 device tree support") Assisted-by: VeroCoder:vero-1 [cli] Signed-off-by: Haibo Chen Reviewed-by: Frank Li Link: https://patch.msgid.link/20260727-led-fix-v1-1-d635c5037109@nxp.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit c9d6fca13d005dba7d54fadad3f2c8035e1ec29b Author: Christian Brauner Date: Thu Aug 20 01:09:21 2026 +0200 selftests/coredump: discard the right amount after the coredump request [ Upstream commit 73337f1ac1379e31cc37868e5a61e4202f095a88 ] read_coredump_req() gets the leftover wrong twice. It takes the absolute difference of the two sizes, so a test binary that knows a larger struct coredump_req than the kernel sends tries to discard bytes that were never sent. And it hands recv() sizeof(buffer) instead of the number of bytes it wants. So MSG_WAITALL waits for a whole page. Either one blocks until the kernel closes the socket. Which it won't because it is waiting for the coredump ack... It's benign today because struct coredump_req hasn't grown. But let's fix it for the future. Compute the leftover as what the kernel sent beyond what was consumed. Fixes: 59cd658eaf40 ("selftests/coredump: add coredump server selftests") Link: https://patch.msgid.link/20260820-work-coredump-sparse-v2-4-ba32dd718c51@kernel.org Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 61f43fb55e583c4ec723cfe1bbff693364d9d3fb Author: Miles Krause Date: Thu Sep 10 15:43:20 2026 -0400 leds: lp8860: Fix device_node leak in lp8860_probe() [ Upstream commit f9879086c4eb4b3b0f4baa80139a5720b99b229e ] lp8860_probe() looks up the driver's single LED child node with of_get_next_available_child() and hands it to the LED core as init_data.fwnode, but never drops the reference that lookup returned: child_node = of_get_next_available_child(np, NULL); if (!child_node) return -EINVAL; ... init_data.fwnode = of_fwnode_handle(child_node); of_get_next_available_child() returns the node with its refcount incremented, and the LED core does not take a reference of its own: led_classdev_register_ext() only reads properties out of init_data.fwnode and then stores the bare pointer with device_set_node(). The reference therefore stays owned by the driver for as long as it holds the node. Nothing in lp8860_probe() ever releases it, so it is leaked on every error return taken after the lookup - the enable GPIO, the vled regulator, devm_mutex_init(), the regmap allocation, the optional EEPROM programming and the LED class registration - and on a fully successful probe alike. A device that binds and unbinds repeatedly leaks one device_node reference per bind. Sibling drivers already get this right: leds-lm3692x.c, from the same TI LED family, calls fwnode_handle_put(init_data.fwnode) once after devm_led_classdev_register_ext() to cover both outcomes, while leds-ktd2692.c and leds-aat1290.c take the node with __free(device_node). Use __free(device_node) here too. Unlike a single of_node_put() at the end of probe it also covers the intermediate error returns, and it keeps the node alive for the whole function, which the LED core still needs when it reads the child's properties during registration. Fixes: 99ca0ea57309 ("leds: lp8860: Use generic support for composing LED names") Signed-off-by: Miles Krause Link: https://patch.msgid.link/20260910-leds-lp8860-of-node-leak-v1-1-d333cff4345b@gmail.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 4dc46f3c9a44bd1a6ab41d7626abb0992283afb4 Author: Greg Kroah-Hartman Date: Mon Sep 21 11:57:29 2026 +0200 mm/gup: honour FOLL_PIN in NOMMU __get_user_pages_locked() [ Upstream commit da01399b90a73cd00b502f7903fa5acbfac4a103 ] The !CONFIG_MMU implementation of __get_user_pages_locked() takes a bare get_page() reference for each page regardless of foll_flags: if (pages[i]) get_page(pages[i]); This is reached from pin_user_pages*() with FOLL_PIN set. unpin_user_page() is shared between MMU and NOMMU configurations and unconditionally calls gup_put_folio(..., FOLL_PIN), which subtracts GUP_PIN_COUNTING_BIAS (1024) from the folio refcount. This means that pin adds 1, and then unpin will subtract 1024. If a user maps a page (refcount 1), registers it 1023 times as an io_uring fixed buffer (1023 pin_user_pages calls -> refcount 1024), then unregisters: the first unpin_user_page subtracts 1024, refcount hits 0, the page is freed and returned to the buddy allocator. The remaining 1022 unpins write into whatever was reallocated, and the user's VMA still maps the freed page (NOMMU has no MMU to invalidate it). Reallocating the page for an io_uring pbuf_ring then lets userspace corrupt the new owner's data through the stale mapping. Use try_grab_folio() which adds GUP_PIN_COUNTING_BIAS for FOLL_PIN and 1 for FOLL_GET, mirroring the CONFIG_MMU path so pin and unpin are symmetric. Keep supporting the traditional behavior where users specify a pages array but don't set FOLL_GET. While at it, don't return NULL pointers in the page array, as this is really not expected for GUP users; instead, just fail and return -EFAULT. [ david: support traditional behavior with no FOLL_GET, extend description ] Cc: Andrew Morton Cc: David Hildenbrand Cc: Jason Gunthorpe Cc: John Hubbard Cc: Peter Xu Cc: Lance Yang Reported-by: Anthropic Fixes: 3faa52c03f44 ("mm/gup: track FOLL_PIN pages") Assisted-by: gkh_clanker_t1000 Signed-off-by: Greg Kroah-Hartman Tested-by: Lance Yang Link: https://patch.msgid.link/20260921-nommu_gup_pin-v4-1-c410041cc479@kernel.org Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Sasha Levin commit e1e94f812edfdd0fe05b21ce1737763d6e005b3e Author: Yogesh Gaur Date: Sun Sep 20 14:45:33 2026 +0530 md/raid5: give the io_unit slab caches per-array names [ Upstream commit 96858e2308431ff5678e0e6fab1a06e19f3d95da ] Both raid5 log backends create their io_unit slab cache per array but name it after the struct: ppl_conf->io_kc = KMEM_CACHE(ppl_io_unit, 0); log->io_kc = KMEM_CACHE(r5l_io_unit, 0); KMEM_CACHE() passes the stringified type as the cache name, so every array that enables PPL or attaches a journal asks for a cache called "ppl_io_unit" or "r5l_io_unit". With two such arrays live at the same time the second one trips kmem_cache_sanity_check(): kmem_cache of name 'ppl_io_unit' already exists WARNING: mm/slab_common.c:112 at __kmem_cache_create_args+0xae/0x460 ppl_init_log+0x285/0x1310 drivers/md/raid5-ppl.c:1363 log_init drivers/md/raid5-log.h:138 [inline] raid5_change_consistency_policy+0x255/0x740 drivers/md/raid5.c:9141 consistency_policy_store+0x7f/0x230 drivers/md/md.c:5883 md_attr_store+0x3b7/0x640 drivers/md/md.c:6158 which is reachable by any user that can write "ppl" to md/consistency_policy on two arrays, and equally by assembling two journalled arrays. The cache is created and destroyed correctly on every path, so this is a name collision only - duplicate names confuse slabtop and /proc/slabinfo, which is what the check is there to catch. Build the name from the array instead, the way grow_stripes() already does for the stripe_head cache in this driver, and fall back to the mddev pointer for dm-raid where mdname() is the constant "mdX". The buffer is sized like conf->cache_name[] because mdname() can return up to DISK_NAME_LEN bytes. The explicit size/align arguments keep what KMEM_CACHE() expanded to, so object layout does not change. Fixes: 3418d036c81d ("raid5-ppl: Partial Parity Log write logging implementation") Fixes: f6bed0ef0a80 ("raid5: add basic stripe log") Reported-by: syzbot+2ef75c54d0b2ac5d00ba@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=2ef75c54d0b2ac5d00ba Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260920091533.413-1-yogeshgaur.83@gmail.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 6b42f7b2d3e88746ff8038b49437d1160902242a Author: Kees Cook Date: Thu Sep 3 16:24:35 2026 -0700 randstruct: fix container_of() false positives after __mptr removal [ Upstream commit 67beeb5621051eda74ca2171ea576c9602bb6cce ] Commit f9e7a7564834 ("container_of: remove local __mptr variable") dropped the "void *__mptr" temporary from container_of(). The randstruct GCC plugin's find_bad_casts pass recognized the casts container_of() generates by that variable's name: const_tree ssa_name_var = SSA_NAME_VAR(rhs1); /* skip bogus type casts introduced by container_of */ if (ssa_name_var != NULL_TREE && DECL_NAME(ssa_name_var) && !strcmp(DECL_NAME_POINTER(ssa_name_var), "__mptr")) continue; With the variable gone the suppression never fires, so every container_of() whose container type is randomized now emits a note: include/linux/container_of.h:23:9: note: randstruct: casting between randomized structure pointer types (ssa): 'struct ocfs2_triggers' and 'struct jbd2_buffer_trigger_type' fs/ocfs2/journal.c:524:16: note: in expansion of macro 'container_of' The pass runs on GIMPLE, after folding, and for a member at offset 0 the whole expression collapses to a bare copy that is indistinguishable from an unsafe cast: to_ocfs2_trigger (struct jbd2_buffer_trigger_type * triggers) { _2 = triggers_1(D); /* void * cast and subtraction gone */ return _2; } Match the type relationship instead. A cast from A * to B * is a container_of() if B reaches a field of type A at offset 0 through a chain of by-value members. The chain matters: container_of()'s member argument may be a dotted path, as in ceph_inode(), which is container_of(inode, struct ceph_inode_info, netfs.inode) and needs two levels. The search is depth-bounded to 4 just in case, since real paths are generally one or two members deep. Requiring the cast happens at offset 0 is done because any other member offset the subtraction survives folding and the cast's rhs is still void *, which the pass already skips a few lines above. A cast between two randomized types with no containment relationship is still reported. Verified with: struct cred *f(struct file *f) { return (struct cred *)f; } which is still flagged with the patch applied. Clang's implementation is unaffected. It checks the cast as written, and both the old and new macros cast from void *, which is always permitted; a genuinely bad cast is rejected there as a hard error rather than a note. Build tested ARCH=x86_64 defconfig with CONFIG_RANDSTRUCT_FULL=y and GCC 14.2.0: randstruct notes 52 before, 0 after. Fixes: f9e7a7564834 ("container_of: remove local __mptr variable") Assisted-by: Claude:claude-opus-5[1m] Link: https://patch.msgid.link/20260903232438.60394-1-kees@kernel.org Signed-off-by: Kees Cook Signed-off-by: Sasha Levin commit cd54802eb76eeca2f0d0f7a9b108307d645c22df Author: Arnd Bergmann Date: Thu Jun 18 16:29:43 2026 +0200 KMSAN: fix memset() when using fortify-source, again [ Upstream commit 3555409e524a0279845f91273ba714998658c163 ] Both kmsan and fortify-source replace the memset function. When both are enabled at the same time, the kmsan version gets used, which triggers a warning about fortify-source being nonfunctional: warning: unsafe memset() usage lacked '__write_overflow' symbol in /home/arnd/arm-soc/lib/test_fortify/write_overflow-memset.c warning: unsafe memset() usage lacked '__write_overflow_field' symbol in /home/arnd/arm-soc/lib/test_fortify/write_overflow_field-memset.c Commit 78a498c3a227 already tried to address this, but this seems to only have worked for memcpy() and memmove() but not memset(), which is still lacking the macro definition when KMSAN is enabled. Remove the incorrect #ifndef check around the memset() macro. Fixes: ff901d80fff6 ("x86: kmsan: use __msan_ string functions where possible.") Fixes: 78a498c3a227 ("x86: fortify: kmsan: fix KMSAN fortify builds") Signed-off-by: Arnd Bergmann Link: https://patch.msgid.link/20260618142951.1739694-1-arnd@kernel.org Signed-off-by: Kees Cook Signed-off-by: Sasha Levin commit d4af24e6fc57b0ded10bdc20d8d3908a81d9cfb7 Author: Jack Wang Date: Sun Sep 20 12:37:05 2026 +0200 md: fix mddev_unlock() called without holding lock in lbs_store() [ Upstream commit 68dab5c14aaff17686df22ba1f1eea3b3433797a ] lbs_store() jumped to the unlock label on mddev_lock() failure, calling mddev_unlock() on a mutex that was never acquired. Return directly instead. Fixes: 62ed1b582246 ("md: allow configuring logical block size") Signed-off-by: Jack Wang Link: https://patch.msgid.link/20260920103705.23191-1-jinpu.wang@ionos.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit eb871a64b9c1f4da307cc8e7a01d7f0ed1e0c04d Author: Arnd Bergmann Date: Thu Sep 17 17:55:11 2026 +0200 sfc: fix CONFIG_CXL_MEM dependency [ Upstream commit c6219deaee41bf35f7f04073f9ef99609d58bba4 ] A recent patch introduced a call to devm_cxl_probe_mem(), which is only available when CXL_MEM is enabled. If CXL_MEM is in a loadable module, this causes a link failure for a builtin driver: s390-linux-ld: drivers/net/ethernet/sfc/efx_cxl.o: in function `efx_cxl_init': efx_cxl.c:(.text+0x156): undefined reference to `devm_cxl_probe_mem' Adapt the dependency to require CXL_MEM instead of CXL_BUS, which we know is available when CXL_MEM is. Fixes: 0418860ef2ca ("sfc: obtain and map cxl range using devm_cxl_probe_mem") Signed-off-by: Arnd Bergmann Reviewed-by: Alejandro Lucero Link: https://patch.msgid.link/20260917155519.2121486-1-arnd@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 34fd79e5551c756443a13a6dcd1b9eb5de012d1f Author: Andrea Parri Date: Mon Sep 21 22:23:16 2026 +0200 pstore: reject persistent RAM zones too small for the buffer header [ Upstream commit 1b30df8662ac85a6759be4332f3bec7e3cb28efc ] persistent_ram_buffer_map() computes prz->buffer_size = size - sizeof(struct persistent_ram_buffer); without checking that size is large enough to hold the header. A ramoops zone configured with a tiny size (e.g. ramoops.pmsg_size=1) underflows buffer_size to a huge value, which defeats every bounds check in persistent_ram_write() and persistent_ram_write_user(); a write to /dev/pmsg0 then copies user data far past the end of the zone and corrupts kernel memory. Reject zones that are not larger than the buffer header. Fixes: 404a6043385de ("staging: android: persistent_ram: handle reserving and mapping memory") Assisted-by: LLM Signed-off-by: Andrea Parri Link: https://patch.msgid.link/20260921202317.70595-3-parri.andrea@gmail.com Signed-off-by: Kees Cook Signed-off-by: Sasha Levin commit 62a15e3a1da5c9aa6176f7757d61b4fc6610808c Author: Andrea Parri Date: Mon Sep 21 22:23:15 2026 +0200 pstore: don't leave an ERR_PTR in the ramoops zone pointer [ Upstream commit 70fec428c845216da98041b1ae9f16a8f54b3d68 ] ramoops_init_prz() stores the result of persistent_ram_new() in *prz and returns the error without clearing it when initialization fails. ramoops_probe() then cleans up through ramoops_free_przs(), which hands *prz to persistent_ram_free(); that treats the ERR_PTR as a valid zone and dereferences it, crashing the kernel. Clear *prz before returning so that cleanup sees a NULL zone. Fixes: b5d38e9bf1b0c ("pstore/ram: Add console messages handling") Assisted-by: LLM Signed-off-by: Andrea Parri Link: https://patch.msgid.link/20260921202317.70595-2-parri.andrea@gmail.com Signed-off-by: Kees Cook Signed-off-by: Sasha Levin commit d5ac2bcaa6ca19e1694a7b4d1333267c81d91138 Author: Adrian Hunter Date: Sun Sep 20 18:12:46 2026 +0300 i3c: Restrict HDR modes to those supported by the bus and target [ Upstream commit b968be9e719302c6d74beb16224e9d956d26433d ] I3C v1.1.1 Table 9 defines which HDR Modes are permitted for each Bus Configuration. A Mixed Slow / Limited Bus permits no HDR Modes because Legacy I2C Devices without a 50 ns SCL spike filter cannot be shielded from HDR traffic. A Mixed Fast Bus permits HDR-DDR and HDR-TSL, but not HDR-TSP, since of the two Ternary Modes only HDR-TSL is defined for a Bus that also has Legacy I2C Devices. However, both i3c_device_get_supported_xfer_mode() and the transfer validation in i3c_dev_do_xfers_locked() currently consider only the controller's hdr_cap. Since hdr_cap reflects controller capability rather than bus or target constraints, HDR Modes can be advertised and used even when the bus configuration forbids them. Likewise, HDR Modes unsupported by the target may be reported as available. Add i3c_dev_supported_xfer_modes_locked(), which derives the usable transfer modes from the intersection of: - HDR Modes supported by the controller - HDR Modes allowed by the bus configuration - HDR Modes supported by the target Use this helper both when reporting supported transfer modes and when validating transfers, ensuring that the advertised and permitted modes remain consistent. GETHDRCAP is queried only when I3C_BCR_HDR_CAP is set, so a target without that bit is treated as supporting no HDR Modes. i3c_device_get_supported_xfer_mode() now takes the normal-use bus lock in order to access the device descriptor, matching i3c_device_get_info(). Also fix the kernel-doc reference to enum i3c_xfer_mode. Fixes: 256a21743d91 ("i3c: Add HDR API support") Assisted-by: GitHub-Copilot:claude-opus-5 Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-17-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit daa154dea176fa5f95bcc5a989b9b09a06dd8341 Author: Adrian Hunter Date: Sun Sep 20 18:12:41 2026 +0300 i3c: mipi-i3c-hci: Stop rings gracefully when suspending [ Upstream commit 9796ccba1254f6bd3b7e6b650ad28ffc56daf6e9 ] hci_dma_suspend() tore the rings down with a single write of zero to RH_RING_CONTROL, clearing the RS and ENABLE fields together and without waiting for the ring to stop. I3C HCI v1.1 section 6.1.2 separates those steps: clear RS for all running Ring Bundles, and only then clear ENABLE for all enabled Ring Bundles. The ring registers were also written outside hci->lock, while the interrupt handler, which takes that lock, could still be running on another CPU. i3c_hci_sync_irq_inactive() was called only afterwards. Finally, an IBI can still be sitting in the IBI Status Ring when suspend runs. Clearing HC_CONTROL.BUS_ENABLE is deferred: per the description of that field, if a disable request occurs while receiving an IBI, the actual disabling does not occur until reception of the IBI is complete. Instead, clear RS under hci->lock, wait for RING_STATUS_RUNNING to clear, and make the interrupt handler inactive. Only then disable the ring interrupt signals, drain anything left in the IBI ring, and clear ENABLE. Fixes: 816958720443 ("i3c: mipi-i3c-hci: Add DMA suspend and resume support") Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-12-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 293847a06e709dbf1b01b18ccda9fd02bead6668 Author: Adrian Hunter Date: Sun Sep 20 18:12:40 2026 +0300 i3c: mipi-i3c-hci: Move DMA suspend/resume callbacks [ Upstream commit ae307311a69ed65c6219915d978ae322950ba906 ] Relocate hci_dma_suspend() and hci_dma_resume() closer to the DMA IO operations table in preparation for upcoming changes. No functional change. Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-11-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Stable-dep-of: 9796ccba1254 ("i3c: mipi-i3c-hci: Stop rings gracefully when suspending") Signed-off-by: Sasha Levin commit 7fb12c88a6ed09d27ce461dc2897e663bceb4865 Author: Adrian Hunter Date: Sun Sep 20 18:12:39 2026 +0300 i3c: mipi-i3c-hci: Process multiple IBIs per interrupt [ Upstream commit 5fbd0790af9484c251341e3ba2ebbb2887c570c8 ] INTR_IBI_READY indicates that one or more IBI Status Descriptors are present in the IBI ring. After clearing interrupt status, the interrupt handler processes only a single IBI even though additional IBIs may already be queued. The controller does not reassert INTR_IBI_READY solely because entries remain in the ring after interrupt status has been cleared. Consequently, the remaining IBIs are not processed until some later interrupt occurs, and can accumulate if IBIs arrive more often than the interrupt handler runs. Process all IBIs that are pending when the handler runs: capture the IBI enqueue pointer up front and continue until the dequeue pointer reaches that position. Fixes: 9ad9a52cce28 ("i3c/master: introduce the mipi-i3c-hci driver") Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-10-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 447974fad2560e4fb200f407c1a1904aad15d6b2 Author: Adrian Hunter Date: Sun Sep 20 18:12:38 2026 +0300 i3c: mipi-i3c-hci: Fix runtime PM violation in i3c_hci_free_ibi() [ Upstream commit 1570265b225757e3684a7c13c36915823f62675d ] i3c_hci_free_ibi() calls __i3c_hci_disable_ibi(), but the latter requires runtime PM to be resumed. The ->free_ibi() callback does not guarantee that condition. The cases where ->free_ibi() may be called without a preceding ->disable_ibi() do not require re-enabling runtime PM handling: - runtime resume failed in i3c_dev_free_ibi_locked(), so it skips the IBI disable but still proceeds to call ->free_ibi() - the device has been re-enumerated under a new dynamic address in __i3c_master_add_i3c_dev_locked(), which tears down the old device descriptor and deliberately clears olddev->ibi->enabled (to avoid sending a DISEC to the stale old address) before calling i3c_dev_free_ibi_locked(). As a result ->free_ibi() is reached with neither a hardware IBI disable nor runtime PM resumed. In both cases the important requirement is to prevent further IBI processing for the device. That can be done without accessing hardware by removing the device from the ibi_devs[] table. Replace the call to __i3c_hci_disable_ibi() with clearing the corresponding ibi_devs[] entry under the controller lock. Fixes: 650716f23eac4 ("i3c: mipi-i3c-hci: Fix race in i3c_hci_addr_to_dev()") Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-9-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit 37c45cc8d5dfb9d1df67fcf86d1acf62a74e9daf Author: Adrian Hunter Date: Sun Sep 20 18:12:36 2026 +0300 i3c: mipi-i3c-hci: Restore controller state if i3c_hci_enable_ibi() returns an error [ Upstream commit ad869331ac616bf192c04081ef7e206e1d106ad8 ] i3c_hci_enable_ibi() performs controller-side setup before sending the ENEC CCC to enable IBIs on the target. If the ENEC CCC fails, the function returns an error but leaves the controller configured as if IBI enabling had succeeded. Fix the error path by undoing the earlier setup when the ENEC CCC fails, ensuring the controller state remains consistent with the failed enable operation. Fixes: 9ad9a52cce282 ("i3c/master: introduce the mipi-i3c-hci driver") Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-7-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit d4305b5463ccfc272635c0cee3e9aab561a78adf Author: Adrian Hunter Date: Sun Sep 20 18:12:34 2026 +0300 i3c: master: Match ACPI targets to the correct bus controller instance [ Upstream commit 25648fb7cebb7e1963afc31c07e650d703cfc140 ] For ACPI-enumerated I3C targets, _ADR encodes both the zero-based bus controller instance number in bits 51:48 and the Provisioned ID (PID) in bits 47:0, as defined by ACPI 6.6 Table 6.2 and MIPI DisCo for I3C v1.1 section 5.2. However, i3c_master_add_acpi_dev() treats the entire _ADR value as the PID. On multi-instance controllers this folds the instance number into the PID, causing i3c_master_add_i3c_boardinfo() to reject devices on instance 1 and above with -EINVAL. The problem is exposed by the MIPI I3C HCI PCI driver, which creates one MFD child device per bus controller instance. Since the child devices do not have their own ACPI companions, they all inherit the parent's ACPI node and therefore enumerate the same set of child devices. As a result, a target belonging to any instance other than 0 prevents registration of all controller instances. Add an instance number to struct i3c_master_controller, propagate it from the HCI PCI driver, extract the PID from bits 47:0 of _ADR, and ignore ACPI child nodes that belong to a different controller instance. ACPI-enumerated I2C devices are unaffected. Their controller instance is encoded in the Resource Source Index of the I2cSerialBusV2 descriptor rather than in _ADR and will require separate handling. Fixes: b46a4b3c5d1e ("i3c: master: Support ACPI enumeration of child devices") Signed-off-by: Adrian Hunter Reviewed-by: Frank Li Link: https://patch.msgid.link/20260920151248.46936-5-adrian.hunter@intel.com Signed-off-by: Alexandre Belloni Signed-off-by: Sasha Levin commit fa432df02ac5b864efc943e81212e4d0d8138363 Author: Yun Lu Date: Fri Sep 18 10:43:00 2026 +0800 selftests/bpf: Clean up child when task_work__open() fails [ Upstream commit 8715b13c1a800f34f9d8177837e5244ac8288f60 ] task_work_run() forks a child that blocks reading a pipe until the parent wakes it. If task_work__open() fails afterwards, the parent returns without closing either pipe fd or waiting for the child. Because the parent retains the write end, the child remains blocked in read() until test_progs exits. Route this failure through the common cleanup path. At this point cleanup is safe: pe_fd is -1, link is NULL, task_work__destroy() accepts NULL, and the pid > 0 branch closes the read end, wakes the child, closes the write end and waits for it. This is the last early return after a successful fork. The fork failure path already closes both pipe fds after commit 5730dacb3f17 ("selftests/bpf: Task_work selftest cleanup fixes"). Fixes: 39fd74dfd5d2 ("selftests/bpf: BPF task work scheduling tests") Signed-off-by: Yun Lu Signed-off-by: Andrii Nakryiko Acked-by: Mykyta Yatsenko Link: https://lore.kernel.org/bpf/20260918024300.18321-1-luyun_611@163.com Signed-off-by: Sasha Levin commit 76461bd821e3fb59b74fc10f2d222604faa065fd Author: Arnd Bergmann Date: Tue Sep 15 23:30:09 2026 +0200 bpf: Add printf attributes [ Upstream commit 7f2b0b57a8d7dc0772ab998007d5d8e8f1f94966 ] Building with extra warnings enabled shows a missing printf attribute: kernel/bpf/diagnostics.c: In function 'bpf_diag_source': kernel/bpf/diagnostics.c:828:9: error: function 'bpf_diag_source' might be a candidate for 'gnu_printf' format attribute [-Werror=suggest-attribute=format] 828 | msg = bpf_diag_vfmt(env, fmt, args); Add these to shut up the warning and allow the compiler to check the format strings. Fixes: b9c5d822f677 ("bpf: Add source and instruction diagnostic context") Signed-off-by: Arnd Bergmann Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260915213123.2361066-1-arnd@kernel.org Signed-off-by: Sasha Levin commit 2f81905d912b600e0a438b9d6600e1694d527efa Author: Leon Hwang Date: Wed Sep 16 00:14:50 2026 +0800 bpftool: Compute map size of light skeletons at runtime [ Upstream commit a885470df10b1c0dbc011177c19d3fd3bb8af2e9 ] bpftool rounds memory-mapped data map sizes to the host page size when generating a light skeleton. The generated code therefore uses a 64K mapping size when bpftool runs on a 64K-page host, even if the skeleton runs on a 4K-page target. The target rejects the oversized map mmap(), causing failure of loading the light skeleton. When try to run 64K-page selftests on 4K-page VM, the error message does not provide the reason about page size. test_atomics:PASS:atomics skeleton open 0 nsec test_atomics:FAIL:atomics skeleton load unexpected error: -12 (errno 22) #15 atomics:FAIL Pass the original map value size and max entries to the generated code and round mmap size to the runtime page size in the user-space light skeleton helpers. This keeps generated light skeletons independent of the build host page size. Fixes: d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.") Signed-off-by: Leon Hwang Signed-off-by: Andrii Nakryiko Acked-by: Quentin Monnet Link: https://lore.kernel.org/bpf/20260915161450.96249-1-leon.hwang@linux.dev Signed-off-by: Sasha Levin commit bc7942eeec944baabe5bef9d469cb7b8701b8f9a Author: Ovidiu Panait Date: Wed Sep 16 12:00:01 2026 +0000 thermal/drivers/renesas/rzg3e: Fix race between set_trips() and get_temp() [ Upstream commit acd9bf8f9047b03f023514bceab6a00e037977ca ] Datasheet section 7.11.9.2 "Conversion Start Trigger" states that a conversion must only be started while no other conversion is in progress: "Before making the setting to start conversion by software or an ELC trigger, check that the CONV bit of the sensor status register is 0b." set_trips() starts a conversion at the end of the function and returns without waiting for it to finish. A get_temp() call arriving right after that starts a conversion while the CONV bit may still be set, violating the requirement above. Fix this by: - polling for CONV == 0 in get_temp() before starting a conversion - not starting a conversion at the end of set_trips() anymore The conversion started at the end of set_trips() was supposed to check whether the thresholds have been passed, since the hw cannot raise interrupts on its own, but only when the temperature is read. However, the thermal core reads the temperature and computes the trip window from it just before calling into set_trips(), so reading the temperature again straight away is useless. Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC") Signed-off-by: Ovidiu Panait Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260916120003.87018-4-ovidiu.panait.rb@renesas.com Signed-off-by: Sasha Levin commit 77ce51f36530f9a17b2fc79bab510accc852b1cd Author: Ovidiu Panait Date: Wed Sep 16 12:00:00 2026 +0000 thermal/drivers/renesas/rzg3e: Fix runtime PM handling of compare irq [ Upstream commit aa1bc39e45f29a4f56d7e6be7164e100727df465 ] The TSU hw is limited in the sense that lower and upper trip points can be set, but the hw cannot raise interrupts on its own. It can only signal that the thresholds were passed when the temperature is read, either during polling or on a manual read. Therefore, the interrupt enable state configured by set_trips() must remain active for the next read to trigger an event. Currently, runtime PM autosuspend puts the chip to sleep and clears the compare interrupt that was enabled during set_trips(). On power up, the compare interrupt enable is not restored, which means that it won't ever fire. Fix this by caching the contents of the SIER register during runtime power off and restore it during runtime power on. Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC") Signed-off-by: Ovidiu Panait Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260916120003.87018-3-ovidiu.panait.rb@renesas.com Signed-off-by: Sasha Levin commit 78b3e1dda5aa8315100d4920f35361df53fb9aab Author: Ovidiu Panait Date: Wed Sep 16 11:59:59 2026 +0000 drivers/thermal/renesas/rzg3e: Fix signed integer overflow in temp_to_code() [ Upstream commit 84f0e14e6261ef718e6a8583073097ad9ea70e14 ] The thermal core passes -INT_MAX/INT_MAX as low/high trip points, which the driver then converts to code values for programming the registers: numerator = (temp_mc - info->temp_d_mc) * (priv->trmval1 - priv->trmval0); Although 'numerator' is defined as s64, the arithmetic is performed as int. Because of this, the multiplication overflows for -INT_MAX and, because temp_d_mc is negative, the subtraction overflows for INT_MAX. To fix this, cast the temperature to s64, so that the arithmetic is performed as s64. Fixes: dc67521c20b7 ("thermal/drivers/renesas/rzg3e: Fix add thermal driver for the Renesas RZ/G3E SoC") Signed-off-by: Ovidiu Panait Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260916120003.87018-2-ovidiu.panait.rb@renesas.com Signed-off-by: Sasha Levin commit abe070d522068ebd7f9b4ced611ec62d207ff4ed Author: Neil Armstrong Date: Mon Sep 21 11:51:30 2026 +0200 dt-bindings: vendor-prefixes: add vendor prefix for Nexperia B.V. [ Upstream commit 819a3e62d37a2fe73c1e7f241f2ac086042e7757 ] Document the vendor prefix for the semiconductor company Nexperia B.V. The company website is https://www.nexperia.com/ Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20260921-topic-sm8x50-nex10000ub-v2-1-eeeaf9b0c913@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 767e96b4bc77aef963e51acdfea3ce65ac90a0be Author: Geert Uytterhoeven Date: Mon Sep 7 16:32:01 2026 +0200 pmdomain: renesas: r8a78000: Fix lockdep false positive [ Upstream commit ddacdefc38200bafa35e79925bbc1f4b1fdf41a8 ] Lockdep reports a possible circular locking dependency when attaching devices to an MDLC PM domain: - During creation of the singleton PM domain: A. r8a78000_genpd_always_on_singleton() takes r8a78000_mdlc_lock, B. pm_genpd_init() takes gpd_list_lock. - During attachment of devices to PM domains: A. pm_genpd_add_device() takes gpd_list_lock, B. r8a78000_mdlc_attach_dev() takes r8a78000_mdlc_lock. As the former is done only once, before any devices are attached, such a AB-BA deadlock cannot really happen. Fix this false positive by introducing a separate lock to protect the creation of the singleton domain. Fixes: 9f79f93963b0 ("pmdomain: renesas: Add R-Car X5H MDLC driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Abel Vesa Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin commit 90134c8043cabbabe019b23c96759484dd0208a3 Author: Pengpeng Hou Date: Sun Sep 6 11:38:06 2026 +0800 pmdomain: imx: Propagate SCU provider registration failures [ Upstream commit d3efba7921f3ebebd91fc481910a428c78414fd8 ] imx_scu_init_pm_domains() ignores of_genpd_add_provider_onecell() and returns success even when none of the initialized domains are published to DT consumers. Return the provider error and remove the initialized domains in reverse order before devm releases their backing storage on probe failure. The issue was found by our static-analysis tool and manually reviewed. Fixes: c800cd7824bd ("firmware: imx: add SCU power domain driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Signed-off-by: Ulf Hansson Signed-off-by: Sasha Levin commit 4dcebebc651bb2e6af064d464e0b357c77a8800f Author: Xiang Mei Date: Fri Jul 3 14:54:31 2026 -0700 fs/ntfs3: validate $SDH entry size in ntfs_insert_security [ Upstream commit 5b76487f94dacc2884135ce9a7bda61ce7ffa209 ] ntfs_insert_security() walks the $Secure::$SDH index and reads e->sec_hdr.size for every entry returned by indx_find()/indx_find_sort(). Those only guarantee the NTFS_DE envelope (e->size), so a crafted $SDH entry shorter than a full NTFS_DE_SDH at the tail of an index buffer makes the read of e->sec_hdr.size run past the allocation. Triggerable by an unprivileged setxattr(2) on a crafted NTFS image. BUG: KASAN: slab-out-of-bounds in ntfs_insert_security (fs/ntfs3/fsntfs.c:2148) Read of size 4 at addr ffff88800fa1de00 by task exploit/142 ntfs_insert_security (fs/ntfs3/fsntfs.c:2148) ntfs_setxattr (fs/ntfs3/xattr.c:947) __vfs_setxattr (fs/xattr.c:223) __vfs_setxattr_noperm (fs/xattr.c:257) vfs_setxattr (fs/xattr.c:344) filename_setxattr (fs/xattr.c:690) path_setxattrat (fs/xattr.c:734) __x64_sys_setxattr (fs/xattr.c:764) [...] The buggy address is located 0 bytes to the right of allocated 512-byte region [ffff88800fa1dc00, ffff88800fa1de00) Stop the scan when an entry is too small to hold a SECURITY_HDR. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Reported-by: Weiming Shi Signed-off-by: Xiang Mei Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit 5a2cdad7cf53fcae9bb9641b578ec10d3c0dae16 Author: Konstantin Komarov Date: Mon Sep 21 12:35:04 2026 +0200 fs/ntfs3: validate EA entry layout against ef->size in ntfs_read_ea [ Upstream commit 01e56820ef52d14a5560fb7c0c6f2f75ef6f9393 ] In ntfs_read_ea(), the ef->size branch only checks that the declared entry size fits the remaining buffer; unlike the zero-size branch it never verifies that the entry's own name and value fit inside ef->size. A crafted image can thus present an in-bounds ef->size with an arbitrary elength, which find_ea()/ntfs_get_ea() later use as the memcpy length, reading past the allocation and leaking adjacent heap memory: BUG: KASAN: slab-out-of-bounds in ntfs_get_ea (fs/ntfs3/xattr.c:302) Read of size 65535 at addr ffff888010770b0f by task exploit/142 ... __asan_memcpy (mm/kasan/shadow.c:105) ntfs_get_ea (fs/ntfs3/xattr.c:302) ntfs_getxattr (fs/ntfs3/xattr.c:848) __vfs_getxattr (fs/xattr.c:446) vfs_getxattr (fs/xattr.c:479) do_getxattr (fs/xattr.c:808) filename_getxattr (fs/xattr.c:837) path_getxattrat (fs/xattr.c:876) do_syscall_64 (arch/x86/entry/syscall_64.c:94) ... The buggy address is located 15 bytes inside of allocated 20-byte region, cache kmalloc-32 Validate the name/value layout in the ef->size branch too, bounding it against ef->size, as the zero-size branch validates it against the buffer. Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations") Reported-by: Weiming Shi Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Xiang Mei [almaz.alexandrovich@paragon-software.com: remove duplicate check of need > ea_size] Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit a31891fb27859a92058cebd10f9e42c6cfbd2590 Author: Zhan Xusheng Date: Fri Sep 4 14:15:56 2026 +0800 fs/ntfs3: fix valid_size not being updated in attr_allocate_frame() [ Upstream commit a1972501ffb15313f7ae598989bb2cd32829e625 ] At the end of attr_allocate_frame() the on-disk valid_size is meant to be updated to the value passed in via @new_valid: valid_size = le64_to_cpu(attr_b->nres.valid_size); if (new_valid != valid_size) { attr_b->nres.valid_size = cpu_to_le64(valid_size); mi_b->dirty = true; } but it writes back the old valid_size that was just read instead of new_valid, so the field is never actually changed even though the record is marked dirty -- the intended update is a no-op. ni_update_parent() spells the same read-compare-write out correctly a few hundred lines away, storing the newly derived value: valid_le = cpu_to_le64(new_valid); if (valid_le != attr->nres.valid_size) { attr->nres.valid_size = valid_le; In practice that path, reached from ni_write_inode(), re-derives nres.valid_size from ni->i_valid on inode write-back, which normally masks this, so the visible impact is limited. The assignment here is still wrong though; store @new_valid as intended. Fixes: be71b5cba2e6 ("fs/ntfs3: Add attrib operations") Signed-off-by: Zhan Xusheng Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit 1366a00d35950a7f73d9e6a6d9a3c01c0d391f84 Author: Xiang Mei (Microsoft) Date: Tue Jul 7 01:54:40 2026 +0000 fs/ntfs3: check INDEX_ROOT resident size before use in ntfs_read_mft() [ Upstream commit d0ac69ce3af4dbae01d4f064b7482f0c5440dbde ] When ntfs_read_mft() parses an ATTR_ROOT attribute it computes root = Add2Ptr(attr, roff); using the on-disk resident data offset (roff = attr->res.data_off) and then dereferences root->type and root->rule, and later passes root on to indx_init(). Unlike the ATTR_STD and ATTR_NAME cases, which validate that the resident data is large enough (asize >= sizeof(struct X) + roff and rsize >= sizeof(struct X)) before accessing it, the ATTR_ROOT case has no such check. mi_enum_attr() only guarantees data_off + data_size <= attribute size, so a crafted image can set data_off such that root lands at (or past) the end of the MFT record's slab allocation while still passing that check (e.g. data_size == 0). The subsequent read of root->type is then a slab-out-of-bounds read, reported by KASAN when mounting the image: BUG: KASAN: slab-out-of-bounds in ntfs_iget5 (fs/ntfs3/inode.c:283) Read of size 4 at addr ffff88800c06a400 by task exploit/142 Call Trace: ... [KASAN report internals] ntfs_iget5 (fs/ntfs3/inode.c:283 fs/ntfs3/inode.c:542) ntfs_fill_super (fs/ntfs3/super.c:1690) get_tree_bdev_flags (fs/super.c:1634) vfs_get_tree (fs/super.c:1694) fc_mount (fs/namespace.c:1198) path_mount (fs/namespace.c:3765 ...) __x64_sys_mount (fs/namespace.c:4174 ...) do_syscall_64 (arch/x86/entry/syscall_64.c:63) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) The buggy address is located 0 bytes to the right of allocated 1024-byte region [ffff88800c06a000, ffff88800c06a400) which belongs to the cache kmalloc-1k of size 1024 Validate the resident data size in the ATTR_ROOT case the same way the neighbouring cases do, so that a truncated or mis-offset INDEX_ROOT is rejected before root is dereferenced. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Reported-by: AutonomousCodeSecurity@microsoft.com Signed-off-by: Xiang Mei (Microsoft) Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit a542d21ec72eca7590dc3b8ffbef7d9005cae4dc Author: Frank Wunderlich Date: Fri Sep 18 16:38:43 2026 +0200 arm64: dts: mediatek: mt7988a-bpi-r4pro: label gpio-hogs [ Upstream commit bf89276b2db391cbb25d1a0e898280fe85b16fb5 ] GPIO hogs were tagged with name "?" in recent kernel versions (7.1+) due to commit d1d564ec4992 ("gpio: move hogs into GPIO core"). 7.0 showed the unit-name which behaviour is restored by patch [1], but labeling the hog directly makes things easier. gpiochip0: 84 GPIOs, parent: platform/1001f000.pinctrl, pinctrl_moore: gpio-0 ( |tx-disable ) in lo gpio-1 ( |mod-def0 ) in hi IRQ ACTIVE LOW gpio-2 ( |los ) in hi IRQ gpio-12 ( |cd ) in lo IRQ ACTIVE LOW gpio-13 ( |reset ) in hi IRQ ACTIVE LOW gpio-14 ( |WPS ) in hi IRQ ACTIVE LOW gpio-21 ( |tx-disable ) in lo gpio-63 ( |? ) out hi gpio-69 ( |mod-def0 ) in hi IRQ ACTIVE LOW gpio-70 ( |los ) in hi IRQ gpio-79 ( |? ) out lo gpio-82 ( |PHY reset ) out hi ACTIVE LOW gpio-83 ( |PHY reset ) out hi ACTIVE LOW after the change: root@bpi-r4:~# cat /sys/kernel/debug/gpio gpiochip0: 84 GPIOs, parent: platform/1001f000.pinctrl, pinctrl_moore: gpio-0 ( |tx-disable ) in lo gpio-1 ( |mod-def0 ) in hi IRQ ACTIVE LOW gpio-2 ( |los ) in hi IRQ gpio-12 ( |cd ) in lo IRQ ACTIVE LOW gpio-13 ( |reset ) in hi IRQ ACTIVE LOW gpio-14 ( |WPS ) in hi IRQ ACTIVE LOW gpio-21 ( |tx-disable ) in lo gpio-63 ( |pcie3-cn14-hog ) out hi gpio-69 ( |mod-def0 ) in hi IRQ ACTIVE LOW gpio-70 ( |los ) in hi IRQ gpio-79 ( |pcie2-cn15-hog ) out lo gpio-82 ( |PHY reset ) out hi ACTIVE LOW gpio-83 ( |PHY reset ) out hi ACTIVE LOW [1] https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git/commit/?id=d54a489c8c4b627775445d54a6cbd32f209bda8f "gpiolib: use of_node_name if line-name is missing" Fixes: d1d564ec4992 ("gpio: move hogs into GPIO core") Signed-off-by: Frank Wunderlich Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Sasha Levin commit 7e6996a1ce4d34ef4ef02d3938b4f60abd09a0d8 Author: Maciej Strozek Date: Thu Sep 17 11:34:00 2026 +0100 ASoC: SDCA: Check return value on a missing FDL_Set_Index Range [ Upstream commit dfd8940277c9a07193c2d168760e19d054f5047c ] In case of a missing FDL_Set_Index control the return value can be NULL, ensure the functions returns before passing it on to range search. Fixes: 71f7990a34cd ("ASoC: SDCA: Add FDL library for XU entities") Signed-off-by: Maciej Strozek Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20260917103400.2032913-2-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit fe25c45c720bd7d8213d0af601748ca948622603 Author: Maciej Strozek Date: Thu Sep 17 11:33:59 2026 +0100 ASoC: SDCA: Improve scanning the SWFT during FDL [ Upstream commit 4454102d6565afedfcde64b222595f067a5b7e93 ] Walking through SWFT is now improved to verify if it is not reading past the end of the table. Introduce file length checks that are done for SWFs from disk to files from SWFT too. Fixes: 71f7990a34cd ("ASoC: SDCA: Add FDL library for XU entities") Signed-off-by: Maciej Strozek Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20260917103400.2032913-1-mstrozek@opensource.cirrus.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 621dde6718e0b4ab9141689cda4d4c133f0dd33b Author: Andrew Gaylard Date: Wed Sep 16 12:49:19 2026 +0200 pinctrl: fix PINCTRL_SPPCTL=m [ Upstream commit 7dcf87d2dbbe8c9c1efb69fe9be728a3dfd51d3d ] The PINCTRL_SPPCTL option is defined as a tristate in Kconfig, and the help text suggests that the user can build it as a module by setting to 'm'. However, it cannot currently be set to 'm', because SOC_SP7021, the only platform that supports it, is a bool option that uses 'select' on it. Also, the SP7021 requires this driver to be built in, in order to boot. Change the tristate to bool and fix the help text. Tested on linux-next-2026-09-14 on a LTPP3G2 board. This impossible tristate was detected by kconfirm, a static analysis tool for Kconfig, by Julian Braha . Fixes: aa74c44be19c ("pinctrl: Add driver for Sunplus SP7021") Signed-off-by: Andrew Gaylard Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit cd164a71cdfa9c048bbefb800242b10232f5d23e Author: Cristian Ciocaltea Date: Tue Sep 1 21:50:26 2026 +0300 drm/connector: hdmi: Handle reset() state allocation failure [ Upstream commit 54acd0c74eba2a2c9a726856f5fdc6f9e74ea2e1 ] In drmm_connector_hdmi_init(), if the reset callback fails to allocate memory, e.g. inside drm_atomic_helper_connector_reset(), connector->state will remain NULL. This is unconditionally passed to drm_connector_attach_max_bpc_property(), leading to a NULL pointer dereference. Bail out with -ENOMEM if the reset callback leaves connector->state unset. Fixes: aadb3e16b8f3 ("drm/connector: hdmi: Add output BPC to the connector state") Reported-by: Sashiko Closes: https://lore.kernel.org/all/20260723015306.C94241F000E9@smtp.kernel.org/ Link: https://lore.kernel.org/all/20260723015306.C94241F000E9@smtp.kernel.org/ Reviewed-by: Maxime Ripard Tested-by: Igor Paunovic # RK3588 Orange Pi 5 Plus, dual HDMI Tested-by: Robin Räber Link: https://patch.msgid.link/20260901-dw-hdmi-qp-scramb-v11-2-bc12954a0688@collabora.com Signed-off-by: Cristian Ciocaltea Signed-off-by: Sasha Levin commit 63fa671681dc8f10d1f21032bc6da1c3398c782b Author: Daniel Borkmann Date: Tue Sep 15 17:07:33 2026 +0200 bpf, lsm: Reject writes into the BPF LSM program context [ Upstream commit c42da1d3ba9d5067cf3f0676b98bcb3f5f9e3ce1 ] The verifier types a load from a tracing-style context by its offset alone: btf_ctx_access() looks the offset up in the attach hook's prototype, and check_mem_access() stamps the resulting type onto the destination register. Nothing tracks what the slot actually holds. That is sound only as long as the context is read-only, and for BPF LSM it is not. lsm_verifier_ops wires ->is_valid_access() straight to btf_ctx_access(), which never looks at enum bpf_access_type, so a store into the context passes verification. Every other user of the helper either goes through bpf_tracing_btf_ctx_access() or open-codes the same type != BPF_READ test first; BPF LSM is the only one that does neither. A program can therefore store a scalar of its choosing into a context slot, read the slot back, and get a register the verifier believes is a trusted pointer of the hook's argument type. Handing that to a kfunc or helper which dereferences a trusted argument turns it into an arbitrary kernel access. Route BPF LSM through bpf_tracing_btf_ctx_access() like everyone else. Fixes: fc611f47f218 ("bpf: Introduce BPF_PROG_TYPE_LSM") Signed-off-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Link: https://patch.msgid.link/20260915150739.284189-3-daniel@iogearbox.net Signed-off-by: Sasha Levin commit b1d9db85195da5b56a1614b988bad467357319d0 Author: Slavin Liu Date: Sun Sep 13 20:51:12 2026 +0800 clk: starfive: jh7110: reject oscillator lookup errors [ Upstream commit 54d0b6903921d121fa750546f2b38cc3f5c7e64f ] Clock lookup may fail while allocating a consumer reference. Return a notifier error rather than passing ERR_PTR as the new clock parent. Detected by static analysis and reviewed with AI-assisted source auditing. Fixes: 538d5477b252 ("clk: starfive: jh7110-sys: Add notifier for PLL0 clock") Assisted-by: LLM Signed-off-by: Slavin Liu Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 3801243df5f4631612164f87335192075fac95b7 Author: Wentao Liang Date: Tue Sep 15 07:01:03 2026 +0000 clk: versatile: clk-icst: Fix node reference leak in of_syscon_icst_setup() [ Upstream commit c90a50d07f0c38c62ce13a60806ab5e3b841f70f ] of_get_parent() takes a reference on the syscon parent node. The reference is intentionally kept on the success path, but the error paths return without dropping it, leaking the node reference. Release the reference before returning on the error paths. Fixes: d430819d69a5 ("clk: versatile-icst: add device tree support") Signed-off-by: Wentao Liang Reviewed-by: Linus Walleij Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit f7cc8c1c937cfce0b21c94d8f50997e07ddefa23 Author: Triet Hoang Date: Fri Sep 18 11:41:30 2026 +0700 clk: raspberrypi: Handle cpufreq device registration failure [ Upstream commit e98e3d712023859af7cd78bb7fdb87ea3a9ffb83 ] Check the return value of platform_device_register_data() when registering the raspberrypi-cpufreq device and propagate the error if registration fails. This prevents the clock driver from reporting a successful probe when the cpufreq device could not be registered. Signed-off-by: Triet Hoang Reviewed-by: Stefan Wahren Fixes: e2bb18347c8e5 ("clk: raspberrypi: register platform device for raspberrypi-cpufreq") Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit faf004a74bcb9e6254895e9f4cbac55a9a8e2c67 Author: Karl Asseily Date: Fri Sep 18 21:23:14 2026 +0300 dt-bindings: vendor-prefixes: add ESS Technology [ Upstream commit beb56d1d3de522885b30bb97fee83825041d65c2 ] Add the vendor prefix for ESS Technology, Inc., maker of the SABRE family of audio DACs. The prefix follows the company's domain, esstech.com. Assisted-by: Claude:claude-opus-5 Signed-off-by: Karl Asseily Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260918182317.143223-2-karl@asseily.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 8af296955d76911904a4f3bdb4ad7a9537d65ba3 Author: Ian Rogers Date: Wed Sep 16 22:04:50 2026 -0700 perf libbfd: Report success when an address is found [ Upstream commit 3d8fb5a4a1d793f6afdfe6df6868f82e610e447e ] libbfd__addr2line() only reports success when the caller asked for a file name. addr2inlines() passes a NULL file as it just wants the inline_node populating, so libbfd__addr2line() returns 0 for it unless bfd_find_inliner_info() happened to find an inline frame. addr2line() in srcline.c treats 0 as a failure and tries the next addr2line implementation, which appends its own frames to the inline_node libbfd already appended to. Every frame that isn't inlined is then reported twice, which happens by default when perf is built with libbfd but without libdw as the fallback order is then libbfd followed by the addr2line command: $ perf record --call-graph dwarf -- perf test -w inlineloop 1 $ perf script --fields +srcline ... 56051a994f8e parent+0x2e (perf) inlineloop.c:32 56051a99503a inlineloop+0x8a (perf) inlineloop.c:47 56051a99503a inlineloop+0x8a (perf) inlineloop.c:47 56051a95841a cmd_test+0xb7a (perf) ??:0 56051a95841a cmd_test+0xb7a (perf) ??:0 ... Report success whenever the address is found, like libdw__addr2line() does, and clear the frames appended so far when appending fails so that a following implementation starts from an empty node. Fixes: 257046a36750a6db ("perf srcline: Fallback between addr2line implementations") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Cc: Ian Rogers Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 15a23aef942b9b51dbebee6184a2cf339d27fbe4 Author: Ian Rogers Date: Wed Sep 16 22:04:49 2026 -0700 perf dso: Separate libbfd and cmd addr2line caches to fix confusion [ Upstream commit f651c02755af85324ad029cd948a8e570d0769fb ] When a dso executes addr2line via libbfd it instantiates an a2l_data pointer. If the DSO later executes via the command-line fallback due to an inlined bug, the a2l pointer is unconditionally populated with a child_process process wrapper. If libbfd is queried again, the offline reader attempts to cast struct a2l_data into child_process, coercing random arbitrary instruction addresses and causing silent aborts. This cleanly splits the caches. Fixes: 257046a36750a6db ("perf srcline: Fallback between addr2line implementations") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 00b9011f0be625913940f6a854f8d6b885f69aec Author: Ian Rogers Date: Wed Sep 16 22:04:48 2026 -0700 perf libdw: Fix Dwfl discovery with split files [ Upstream commit bf96e296d52d74a1ae5254a341175afede8a1963 ] dso__libdw_dwfl() opens the Dwfl with dso__long_name(), the file the samples came from. When the debug information lives in a separate file, symbol loading finds it and records it as the dso's symsrc filename, but the Dwfl still refers to the original file, so libdw has no DWARF to resolve addresses against. Open the Dwfl with the symsrc filename when one is known and fall back to the long name when it isn't. The symsrc file is found while symbols are loaded, which can happen after the Dwfl has been created and cached, so drop the cached Dwfl and the addr2line cache built from it when the symsrc filename is set. That teardown can run while another thread is using the cache, so take the dso lock across both the teardown and the Dwfl accessors, and re-read dso__symsrc_filename() under the dso lock in libbfd__addr2line() and cmd__addr2line() to prevent a TOCTOU race with cache invalidation. Fixes: b7a2b011e9627ff3 ("perf powerpc: Unify the skip-callchain-idx libdw with that for addr2line") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 8d305caed13bb7e4cddb5402b2df1999060d3676 Author: Zide Chen Date: Wed Sep 16 13:27:40 2026 -0700 perf topdown: Don't require config1==0 for a slots event [ Upstream commit 0824af00a8d2ede0d8bc70bdc0b493ecfd167900 ] arch_is_topdown_slots() requires config1 == 0, so it misidentified "cpu/slots,metrics_clear=1/" as not being the slots event, and an additional slots event gets inserted, which fails event scheduling since the group now needs two fixed counter 3. $ perf stat -e "{cpu/slots,metrics_clear=1/,cpu/topdown-retiring/}" -- sleep 1 WARNING: events were regrouped to match PMUs slots cpu/slots,metrics_clear=1/ cpu/topdown-retiring/ Drop the config1 == 0 check from arch_is_topdown_slots(). This is safe: config1 has no bearing on the event's identifying config value (TOPDOWN_SLOTS, 0x0400). The attr.type == PERF_TYPE_RAW check is what actually matters: only the core PMU is registered with PERF_TYPE_RAW, and on x86, 0x400 is guaranteed to be slots event on core CPU. arch_is_topdown_metrics() keeps its own config1 == 0 check, since genuine metrics events have no "metrics_clear" and config1 remains 0. Add a test verifying that an explicit "slots,metrics_clear=1" event in a group does not trigger an extra slots event injection. Fixes: 5b546de9cc177936 ("perf topdown: Use attribute to see an event is a topdown metic or slots") Reviewed-by: Dapeng Mi Reviewed-by: Ian Rogers Signed-off-by: Zide Chen Cc: Namhyung Kim [ Add missing stdio.h and string.h as noticed by Sashiko ] Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 3e56968aa1ce5de3ab1071db85cecba6eb4da98a Author: Alejandro Lucero Date: Thu Jul 16 19:11:14 2026 +0100 ACPI: HMAT: preserve hmat_adist_nb notifier block [ Upstream commit b1c75a77d494298b8dedf46062f2072239bbc33b ] Remove __meminitdata from hmat_adist_nb declaration preserving it even when CONFIG_MEMORY_HOTPLUG is not set. Otherwise further notifier registrations using register_mt_adistance_algorithm() will find a notifier chain likely corrupted. This is the case when cxl_region_probe() calls register_mt_adistance_algorithm() what can happen when CXL regions are dynamically created at any time from Type3 device(s) or when a Type2 device is initialized at its driver probe. Fixes: 3718c02dbd4c ("acpi, hmat: calculate abstract distance with HMAT") Signed-off-by: Alejandro Lucero Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron [ rjw: Subject tweak ] Link: https://patch.msgid.link/20260716181114.35962-2-alejandro.lucero-palau@amd.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 4e1405f36f2516184d1572784cff53e433ecb3ea Author: Guixin Liu Date: Wed Sep 16 10:54:53 2026 +0800 cxl/memdev: Fix deadlock between poison debugfs and cxl_mem unbind [ Upstream commit 391bc7ab9be6635e77a205591b7d30db797f1a0e ] The poison debugfs handlers take the memdev device lock so that the region lookup sees a stable cxlmd->dev.driver. debugfs holds a reference on the file across the handler, and cxl_mem unbind removes that file while holding the very same device lock, so a handler that waits for the lock deadlocks against a concurrent unbind. The trigger is any teardown that detaches cxl_mem from the memdev while a poison write is in flight: unbinding or unloading cxl_mem or cxl_pci, or removing the endpoint PCI device, including hot-remove. Both tasks then hang. The unbind side is uninterruptible, and it also blocks the memdev detach work, which runs on an ordered workqueue and so stalls every other CXL bus work item. Take the lock with the trylock guard and return -EBUSY instead of waiting. An unbind that wins the race removes the file first and the write fails with -ENOENT. The poison inject and clear files are a debug ABI for expert users, mostly device vendors, to test the poison capabilities of their devices. Mixing a poison write with cxl_mem teardown is not a supported use of the interface, but when it happens anyway the cost should be a failed write, not a hung kernel. Found by code inspection. Reproduced by writing inject_poison in a loop while unbinding and rebinding cxl_mem, and confirmed fixed by the same test. Also reproduced the same deadlock with those writes racing a pciehp hot-remove of the memdev; with this patch the hot-remove flow completes normally. Fixes: 574eda81d0a7 ("cxl/memdev: Hold memdev lock during memdev poison injection/clear") Suggested-by: Shaikh Kamaluddin Reviewed-by: Jonathan Cameron Signed-off-by: Guixin Liu Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20260916025453.3532614-3-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 02c6cad5a78bf759b4304309578beaf278f42e48 Author: Guixin Liu Date: Wed Sep 16 10:54:52 2026 +0800 driver core: Add conditional guard support for device_trylock() [ Upstream commit 18f26958544783b0f30210c41fc0c0da11b8d9a4 ] Introduce a conditional guard version of device_trylock() for scenarios that must not block on the device lock. device_trylock() returns 1 on success like mutex_trylock(), so the default binary condition applies and ACQUIRE_ERR() reports -EBUSY on contention. Suggested-by: Shaikh Kamaluddin Reviewed-by: Jonathan Cameron Signed-off-by: Guixin Liu Acked-by: Greg Kroah-Hartman Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20260916025453.3532614-2-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Stable-dep-of: 391bc7ab9be6 ("cxl/memdev: Fix deadlock between poison debugfs and cxl_mem unbind") Signed-off-by: Sasha Levin commit 1b54b7c47a57df963d55b2b75f5ef25f3ff96762 Author: Felix Gu Date: Wed Sep 2 22:48:09 2026 +0800 spi: mxic: fix ps_clk leak in runtime resume [ Upstream commit 648e3c436032b675b339662ea9c0edd9221add76 ] mxic_spi_runtime_resume() enables ps_clk before calling mxic_spi_clk_enable(). If the latter fails, ps_clk was not disabled. Unwind ps_clk with clk_disable_unprepare() before returning the error. Fixes: b942d80b0a39 ("spi: Add MXIC controller driver") Signed-off-by: Felix Gu Link: https://patch.msgid.link/20260902-mxic-v1-1-76806325826d@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 358fb9ade62556ff225b35b3fce55d3ffee14519 Author: Linus Walleij Date: Fri Sep 18 00:51:02 2026 +0200 ASoC: ab8500: Skip digital microphone support on AB8505 [ Upstream commit 0d46182a1be7ef12f85433d91315d4d7091dd8c8 ] The AB8505 does not have the digital microphone interface, its six input pins or the VDMIC regulator found in AB8500. The shared codec driver nevertheless creates the entire AB8500 DMIC DAPM graph. When an AB8505 sound card binds, the regulator widget requests the nonexistent V-DMIC supply and falls back to a dummy regulator. Split the digital microphone widgets and routes from the common codec graph and add them only when the parent MFD is an actual AB8500. This also removes the DMIC4-only AD_OUT4 path from AB8505. Fixes: 679d7abdc754 ("ASoC: codecs: Add AB8500 codec-driver") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260918-ux500-simple-sound-v2-4-88d29416e3c3@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6e8a2a81e426bb9d98ef84fbad66510193bf7981 Author: Christian Loehle Date: Wed Sep 16 17:27:46 2026 +0100 ACPI: CPPC: Validate the _CPC package header [ Upstream commit fb345025f161d17fe7c8a6048c7e80e467fa8ddf ] The _CPC NumEntries field includes every package element, including NumEntries and Revision. acpi_cppc_processor_probe() nevertheless reads those first two elements before checking that they exist and trusts NumEntries when walking the remaining elements. Reject packages with fewer than two elements and NumEntries values which exceed the package count before accessing Revision or iterating over register descriptors. Although the specification defines NumEntries as the number of package elements, tolerate additional trailing elements because ignoring them is safe and avoids rejecting padded firmware. Revision is specified as a BYTE, but the parser assigns its 64-bit AML Integer to an unsigned int before validating it. Reject values above U8_MAX before conversion so, for example, 0x100000004 cannot truncate to revision 4. Fixes: 337aadff8e45 ("ACPI: Introduce CPU performance controls using CPPC") Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260724134251.1632824-1-christian.loehle%40arm.com Link: https://sashiko.dev/#/patchset/20260808082644.1251332-1-christian.loehle%40arm.com Signed-off-by: Christian Loehle Tested-by: Sumit Gupta Link: https://patch.msgid.link/20260916162805.1039247-2-christian.loehle@arm.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 7259fcafd28c2c4b38978cda23241d4180ca20ad Author: Guixin Liu Date: Tue Sep 15 14:01:38 2026 +0800 cxl/core: Skip einj_inject creation when devm_add_action_or_reset() fails [ Upstream commit b25af6afd2f26b455108bab03dfeba52378e8dd2 ] cxl_debugfs_create_dport_dir() ignores the devm_add_action_or_reset() result and creates the einj_inject file below @dir unconditionally. When the devres allocation fails, remove_debugfs() has already run before devm_add_action_or_reset() returns, i.e. debugfs_remove() has released @dir. The subsequent debugfs_create_file() would then use that dentry as its parent although its final reference was dropped in the removal and its memory is subject to call_rcu() delayed freeing. Skip the file creation in that case, consistent with how the rest of the helper tolerates debugfs failures. Fixes: 9185b1a3043c ("cxl/core: Fix dport use-after-free via the einj_inject debugfs file") Signed-off-by: Guixin Liu Reviewed-by: Li Ming Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20260915060138.2007974-1-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 9e0fe2643597043775f295c7644375089584ea21 Author: Guixin Liu Date: Thu Sep 17 10:46:32 2026 +0800 cxl/region: Create node access attributes for CFMWS-only NUMA nodes [ Upstream commit ef71014055f7b4959e4cb023ca8a18258cb5641c ] A NUMA node that only backs a CXL fixed memory window and is not enumerated by SRAT has no memory_target in the HMAT code, so hmat_callback() exits early at find_mem_target() and never creates the node's accessN attributes: /sys/devices/system/node/nodeX/accessN/initiators/* stays missing. Commit debdce20c4f2 ("cxl/region: Deal with numa nodes not enumerated by SRAT") had the CXL region notifier call node_set_perf_attrs() directly for such nodes, but commit 2e454fb8056d ("cxl, acpi/hmat: Update CXL access coordinates directly instead of through HMAT") replaced it with node_update_perf_attrs(), which only updates attributes that already exist and thus does nothing for these nodes. Create the attributes with node_set_perf_attrs() when the node is not backed by a real SRAT pxm. Tested on a QEMU CXL topology with a CFMWS window not described by SRAT or HMAT: node1/access0/initiators/{read,write}_{bandwidth,latency} appear with the calculated coordinates once the region's first memory block comes online. Fixes: 2e454fb8056d ("cxl, acpi/hmat: Update CXL access coordinates directly instead of through HMAT") Reviewed-by: Jonathan Cameron Signed-off-by: Guixin Liu Reviewed-by: Gregory Price (Meta) Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20260917024632.1397380-1-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 006bf3c1d40c78a893cd954f9712770989803cc2 Author: Varun Gupta Date: Fri Sep 18 13:43:21 2026 +0530 drm/pagemap: Prevent CPU stalls during unbounded pagemap teardown [ Upstream commit b66b036c959f49decd2202db4026d3ae21e01388 ] drm_pagemap_dev_unhold_work() processes an unbatched llist of pagemaps on the system workqueue. This creates potential latency traps during heavy teardown cycles due to two compounding factors: 1. The loop contains a per-item drm_dbg() trace. If dynamic debug is enabled on a slow serial console, synchronous print latency scales linearly with the batch size and can block worker execution. 2. The llist can accumulate large batches during intensive unmap operations, monopolizing worker resources without yielding. This causes below log warning: "workqueue: drm_pagemap_dev_unhold_work [drm_gpusvm_helper] hogged CPU for >10000us 19 times, consider switching to WQ_UNBOUND" Fix this by implementing a latency mitigation strategy: - Move the teardown work to system_unbound_wq to avoid tying up per-CPU bound worker pools. - Add cond_resched() inside the teardown loop to yield the CPU during large batch teardowns, ensuring system responsiveness. - Convert the drm_dbg() trace to drm_dbg_ratelimited() to mitigate serial console bottlenecks while preserving debuggability. v2: - Changed workqueue from deprecated system_unbound_wq to system_dfl_wq. (Arvind Yadav) Fixes: a26084328ac4 ("drm/pagemap, drm/xe: Manage drm_pagemap provider lifetimes") Reviewed-by: Arvind Yadav Reviewed-by: Thomas Hellström Signed-off-by: Varun Gupta Link: https://patch.msgid.link/20260918081320.30389-2-varun.gupta@intel.com Signed-off-by: Himal Prasad Ghimiray Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin commit 02e31eea7c929384b5efe2e80fa22fb42601724a Author: Li RongQing Date: Wed Sep 16 16:55:29 2026 +0800 RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT [ Upstream commit 9dcacdc41083cccff74292851bf9fde999e0731a ] The UVERBS_METHOD_GET_CONTEXT handler allocates the ucontext via ib_alloc_ucontext(), which calls rdma_restrack_new() (initialising the kref to 1) and rdma_restrack_set_name(NULL), the latter attaching the current task and taking a task_struct reference. When ib_init_ucontext() subsequently fails, the error path only does: kfree(attrs->context); attrs->context = NULL; without first calling rdma_restrack_put() on &attrs->context->res. The kref therefore never reaches zero, restrack_release() is never invoked, and put_task_struct() is never called, so the task_struct reference taken during set_name is leaked permanently. A local user with access to an RDMA device can repeat this path (e.g. by hitting an RDMA cgroup limit or supplying invalid ucaps) and leak one task_struct reference per attempt, eventually preventing those processes from being reaped or exhausting memory. The legacy ib_uverbs_get_context() path already handles this correctly at its err_ucontext label, where rdma_restrack_put() precedes kfree(). Mirror that ordering here. Fixes: a1123418ba10 ("RDMA/uverbs: Add ioctl command to get a device context") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260916085529.1838-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 3482493918c832dee9baeabc777bab5f0dbe0c6f Author: Li RongQing Date: Wed Sep 16 15:30:42 2026 +0800 RDMA/restrack: Don't set RESTRACK_DD mark after a failed xa_insert() [ Upstream commit 391c5d826fd0a5dacad54613dbef74c50e966f5c ] When adding a QP to the restrack xarray, rdma_restrack_add() does: ret = xa_insert(&rt->xa, res->id, res, GFP_KERNEL); if (ret) res->id = 0; if (qp->qp_type >= IB_QPT_DRIVER) xa_set_mark(&rt->xa, res->id, RESTRACK_DD); The xa_set_mark() call is not guarded by "!ret". When xa_insert() fails (possible on a qp_num collision or memory pressure), res->id is reset to 0, yet the mark is still applied to index 0. If a legitimate QP whose qp_num is 0 already occupies that slot - e.g. a normal QP or the SMI QP - it is spuriously tagged as driver-private (RESTRACK_DD), and the netlink dump path res_get_common_dumpit() then hides it from "rdma res" output whenever the caller does not request driver details. Only set the mark when the insertion actually succeeded by folding the mark into the non-failure branch. Fixes: e18fa0bbcedf8 ("RDMA/core: Add an option to display driver-specific QPs in the rdmatool") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260916073042.1746-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 6061bdc4f5c7d910de24c033764d36ed64514ef2 Author: Li RongQing Date: Wed Sep 16 14:44:35 2026 +0800 RDMA/core: Fix swapped list_add_tail() arguments in ib_add_sub_device() [ Upstream commit fad7b0dcb0821c0f201df3d85065145857a6f55b ] ib_add_sub_device() links a new sub-device into its parent's sub-device list with: list_add_tail(&parent->subdev_list_head, &sub->subdev_list); list_add_tail(new, head) expects the node to insert as the first argument and the list head as the second, so the call above does the opposite of what was intended: it treats the parent's list head as the new node and the sub-device's node as the list head. Because _ib_alloc_device() initialises subdev_list to a self-referencing empty head, the misplaced insertion does not crash, but it corrupts the parent->subdev_list_head list. After adding two or more sub-devices, only the last one is reachable through the parent's head, and ib_del_sub_device_and_put()'s list_del() on &sub->subdev_list rewrites the head pointers, potentially severing earlier sub-devices from the chain. During parent teardown, the reverse iteration over subdev_list_head then skips the orphaned sub-devices, so their del_sub_dev() callbacks are never invoked and ib_device_put() on the parent is never paired, leaking both the HW sub-devices and a refcount. Swap the arguments to match the documented intent: insert the sub-device node into the parent's list head. Fixes: bca51197620a ("RDMA/core: Support IB sub device with type "SMI"") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260916064435.2180-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 164dc1c0f9b5a2f61096f7b20c4e4c4e2e58e78c Author: Konrad Dybcio Date: Fri Sep 4 13:55:37 2026 +0200 interconnect: qcom: use 64-bit SMD RPM bus votes [ Upstream commit 24e7422ce31189502d07279c083646aaca513311 ] SMD RPM bus bandwidth requests carry a 64-bit bandwidth value. The interconnect proxy declared the KVP payload as u32, truncating votes above 4 GiB/s and advertising the wrong payload size to RPM. Use a little-endian 64-bit payload and accept a u64 value in the proxy API. This has always been the right behavior, even on msm-3.10 and 32-bit SoCs. Fixes: be06f8e7425d ("interconnect: qcom: Add interconnect RPM over SMD driver") Assisted-by: LLM Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Reviewed-by: Gopikrishna Garmidi Link: https://patch.msgid.link/20260904-topic-icc_rpm_64b_req-v1-1-37e24f1991a3@oss.qualcomm.com Signed-off-by: Georgi Djakov Signed-off-by: Sasha Levin commit 1ba4883fc523a2c12c2beee00346f6d500310611 Author: Konrad Dybcio Date: Wed Sep 9 18:41:59 2026 +0200 interconnect: qcom: msm8976: Configure auxiliary GPU QoS port [ Upstream commit cc91c1b99101f2dcd2f624a27bec6f6f557e5421 ] Enable the secondary QoS port used by the MSM8976 GPU node. Assisted-by: LLM Fixes: 6e3ea1f36b10 ("interconnect: qcom: Add MSM8976 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-6-6dc5b5e97626@oss.qualcomm.com Signed-off-by: Georgi Djakov Signed-off-by: Sasha Levin commit 59b8f2609b133257d730ac616550892a7ddb8d73 Author: Konrad Dybcio Date: Wed Sep 9 18:41:58 2026 +0200 interconnect: qcom: msm8996: Configure auxiliary Venus QoS port [ Upstream commit aa4c405d47c54bcf6d62d0f6596aeb555e52ebf7 ] Enable the secondary QoS port used by the MSM8996 Venus node. Assisted-by: LLM Fixes: 7add937f5222 ("interconnect: qcom: Add MSM8996 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-5-6dc5b5e97626@oss.qualcomm.com Signed-off-by: Georgi Djakov Signed-off-by: Sasha Levin commit b3dfcda953483a1698ce4978a8693abd735d18bf Author: Konrad Dybcio Date: Wed Sep 9 18:41:57 2026 +0200 interconnect: qcom: icc-rpm: Program SMD RPM auxiliary QoS ports [ Upstream commit ddbacca26d1db5bd9c477253b0af83b028136a24 ] Some SMD RPM interconnect nodes own two QoS ports. Currently, the code only takes care of one, leaving some endpoints partially unconfigured. Keep qos_port as the primary port and describe the optional second port with aux_qos_port. Assisted-by: LLM Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-4-6dc5b5e97626@oss.qualcomm.com Signed-off-by: Georgi Djakov Stable-dep-of: aa4c405d47c5 ("interconnect: qcom: msm8996: Configure auxiliary Venus QoS port") Signed-off-by: Sasha Levin commit 7a5952c6ef8bb34fbbeb7e3e2ff5c2c7677ca80f Author: Konrad Dybcio Date: Wed Sep 9 18:41:56 2026 +0200 interconnect: qcom: icc-rpm: Handle icc_link_create() failures [ Upstream commit b2079a6b8e8b92c6c45a22930e5b68a9c5c34645 ] icc_link_create() can return errors. Don't ignore them. Assisted-by: LLM Fixes: 30c8fa3ec61a ("interconnect: qcom: Add MSM8916 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-3-6dc5b5e97626@oss.qualcomm.com Signed-off-by: Georgi Djakov Signed-off-by: Sasha Levin commit 59f3e115de01c561e926125dc14fde3d0ab4eba0 Author: Myeonghun Pak Date: Thu Sep 10 23:17:50 2026 -0400 interconnect: exynos: Remove the PM QoS request on unbind [ Upstream commit 601a54f00723b0b653d76caf26a2a78482d95f00 ] The Exynos interconnect provider adds a minimum-frequency PM QoS request to its parent devfreq device. The request is embedded in the provider's device-managed private data. The probe error path removes the request, but the remove callback does not. Unbinding the provider while the parent device remains registered therefore frees the private data with the request still on the parent's QoS list. The child's device cleanup does not remove requests registered against its parent. Remove the request after deregistering the provider, before the private data is released. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 2f95b9d5cf0b ("interconnect: Add generic interconnect driver for Exynos SoCs") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Link: https://patch.msgid.link/20260911031750.8182-1-mhun512@gmail.com Signed-off-by: Georgi Djakov Signed-off-by: Sasha Levin commit 3511253917b63b4504170d97abad970fd4b04599 Author: Slavin Liu Date: Sun Sep 13 20:51:43 2026 +0800 crypto: atmel-sha - reject initialization without a device [ Upstream commit a9a2152d292fd0bc73814eb4a127278ee7dd3f6a ] A transform may be initialized for the first time after the last device has been removed from the driver list. Return -ENODEV when the lookup is empty, before the debug message reads dd->dev. Detected by static analysis and reviewed with AI-assisted source auditing. Fixes: ebc82efa1cd6 ("crypto: atmel - add Atmel SHA1/SHA256 driver") Assisted-by: LLM Signed-off-by: Slavin Liu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit f4d507971c074cd608cf5385c7d77ddf98c04455 Author: Ahsan Atta Date: Wed Sep 9 15:15:21 2026 +0100 crypto: qat - fix active_devs leak on crypto alg registration failure [ Upstream commit 178829f1b5b259938188a10f4103fdb901b6435e ] adf_dev_start() registered both alg sets in a single condition. If qat_algs_register() succeeds but qat_asym_algs_register() fails, ADF_STATUS_CRYPTO_ALGS_REGISTERED is left clear, so adf_dev_stop() skips qat_algs_unregister(): the skciphers and aeads stay registered with active_devs stuck at 1, pinning the module. Both helpers leak active_devs internally as well - they increment it and return without decrementing when a crypto_register_*() call fails, and the asym path also leaves the already-registered akcipher behind. Split the registration in adf_dev_start() so that an asym failure unregisters qat_algs, and unwind active_devs (and the akcipher) on the error paths of both register helpers. While at it, propagate the error code returned by the register helpers instead of a blanket -EFAULT. Fixes: 9b2f33a1bfcd ("crypto: qat - fix unregistration of crypto algorithms") Signed-off-by: Ahsan Atta Reviewed-by: Giovanni Cabiddu Reviewed-by: Thomas Huth Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 3bc3eef991e8e535e180b2b39961912c363d643a Author: Vitaliy Sochnev Date: Tue Sep 15 20:41:28 2026 +0100 thermal/drivers/airoha: Request the EN7581 IRQ after zone registration [ Upstream commit 7efceedd23678cd58e98b2c64d4b2b7be03f6cf9 ] The EN7581 IRQ is requested before the thermal zone is registered, and the handler passes priv->tz to thermal_zone_device_update(). Unbind leaves the monitor interrupt enabled, so an interrupt pending on the next bind fires while priv->tz is NULL. On a Nokia XG-040G-MD this oopses in thermal_zone_device_update(). On unbind, devres also frees the zone before the IRQ. Request the IRQ in post_probe, after zone registration. Fixes: 42de37f40e1b ("thermal/drivers: Add support for Airoha EN7581 thermal sensor") Signed-off-by: Vitaliy Sochnev Signed-off-by: Daniel Lezcano Link: https://patch.msgid.link/20260915194128.42508-1-sochnev.v.74@gmail.com Signed-off-by: Sasha Levin commit 3598c566a93e1036bf69e935ad4c3eeaf34cf563 Author: Greg Ociepka Date: Wed Aug 12 17:40:14 2026 +0200 arm64: dts: qcom: glymur: Mark USB controllers dma-coherent [ Upstream commit e62df36f34949aebe016c5c81e34baa7a9eca427 ] All five USB controller nodes on Glymur (usb_0, usb_1, usb_2, usb_hs, usb_mp) are missing the dma-coherent property, which Hamoa carries on all of its USB controllers. Krishna Kurapati confirmed the Glymur USB controllers are dma-coherent [1]. Without the property the kernel treats USB DMA buffers as non-coherent and performs cache maintenance on every transfer, which coherent hardware makes redundant. Tested on an Asus Zenbook A16 (UX3607OA): all controllers enumerate their devices as before and a 64 MiB write plus two O_DIRECT read-backs over USB mass storage produce identical checksums. [1] https://lore.kernel.org/linux-arm-msm/f92cc91e-6e5c-4375-aaa6-f079a165f4b5@oss.qualcomm.com/ Fixes: 4eee57dd4df9 ("arm64: dts: qcom: glymur: Add USB related nodes") Signed-off-by: Greg Ociepka Assisted-by: Claude:fable-5 Reviewed-by: Abel Vesa Reviewed-by: Gopikrishna Garmidi Reviewed-by: Dmitry Baryshkov Link: https://lore.kernel.org/r/20260812154014.123315-1-greg@ferrisoft.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 08b4602dbac862678d7dafbba7a32de6a97cc863 Author: Guixin Liu Date: Mon Aug 31 14:11:20 2026 +0800 cxl/region: Unregister the pmem region when the bridge is unbound [ Upstream commit bb26797c08d408ea7e8d3625045f0fe28714a425 ] Removing cxl_acpi unbinds the nvdimm bridge before the regions it serves. A region probe can therefore register its cxl_pmem_region and only then find the bridge unbound, which leaves the new device with nothing to remove it. The orphan outlives the teardown and pins its region and its memdevs, so a later cxl_acpi bind renumbers the root port, ports, endpoints, decoders and the memdev. Unregister the cxl_pmem_region when the bridge is unbound. Found by code inspection. Racing a cxl_region bind against a cxl_acpi unbind leaked a pmem_region device on 12 of 12 attempts, and none with this patch. Fixes: f17b558d6663 ("cxl/pmem: Refactor nvdimm device registration, delete the workqueue") Signed-off-by: Guixin Liu Reviewed-by: Richard Cheng Reviewed-by: Li Ming Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20260831061120.200790-1-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 2d646281ef3065ee214a7715846bd0e1a0920267 Author: Guixin Liu Date: Mon Sep 14 20:18:43 2026 +0800 cxl/core: Fix dport use-after-free via the einj_inject debugfs file [ Upstream commit 0de71a1ab211694be7e88d56fc35c9bf72078ad1 ] The per-dport einj_inject debugfs file retains a pointer to the 'struct cxl_dport', but its lifetime is not tied to the dport. Unbinding the dport host frees the dport and leaves einj_inject behind, so writing the file dereferences freed memory. The stale directory also prevents recreation on rebind. Remove the per-dport debugfs directory when the dport host is released. Found by code inspection, then reproduced on a QEMU CXL topology with KASAN (the einj_cxl_is_initialized() guard had to be forced open, as QEMU emits no EINJ table). Unpatched, writing the leftover file after unbind gives a KASAN slab-use-after-free report in cxl_einj_inject(), and rebind hits "already exists in 'cxl'". Patched, the directory goes away with the dport and rebind recreates a working einj_inject. Fixes: 8039804cfa73 ("cxl/core: Add CXL EINJ debugfs files") Signed-off-by: Guixin Liu Reviewed-by: Richard Cheng Reviewed-by: Li Ming Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20260914121843.718493-1-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 3d0d0334dea6c6fe05176ebf80047f55f308cac8 Author: Guixin Liu Date: Mon Aug 31 17:22:16 2026 +0800 cxl/port: Fix uninitialized coordinates reported for RCDs [ Upstream commit 58b2b1ef28024093063de536c05aaea792226e24 ] cxl_endpoint_get_perf_coordinates() returns success for a Restricted CXL Device without calculating coordinates, so the caller's output array is left uninitialized. Callers treat it as valid and can expose the stack residue as access coordinates. Initialize the coordinates to zero before returning for an RCD. Zeroing in the helper rather than at the caller keeps the @coord output contract the exported function documents. Reported by the Sashiko review bot. Fixes: 5d211c709059 ("cxl: Fix cxl_endpoint_get_perf_coordinate() support for RCH") Signed-off-by: Guixin Liu Reviewed-by: Richard Cheng Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20260831092216.540644-3-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 017bf94304e191deddc3100a5328eca6af82b52e Author: Guixin Liu Date: Mon Aug 31 17:22:15 2026 +0800 cxl/cdat: Fix uninitialized stack use in bandwidth gathering [ Upstream commit 97b74de26c81885a6447f5fe87641a2a136f8c7c ] cxl_endpoint_gather_bandwidth() and cxl_switch_gather_bandwidth() declare access_coordinate arrays on the stack and rely on their helpers to fill them. The helpers assign only the bandwidth members, and the combine step assigns even those only when both inputs are non-zero. The latency members are summed from stack residue on every call, and the bandwidth members keep that residue into the region access coordinate sysfs attributes when the endpoint CDAT reports no bandwidth. Zero initialize the arrays. Zero is the value this code already uses for "not reported", so an unset member now reads back as unknown rather than as a plausible number. Found by code inspection. Tested on a QEMU CXL topology with two endpoints sharing a switch upstream link and HMAT generic-port coordinates for the host bridge, which the calculation requires to run at all: with temporary printk at the combine sites, the unpatched kernel summed 0xfefefefe, the CONFIG_INIT_STACK_ALL_PATTERN stack filler, into the latency members, while the patched kernel reports the CDAT latency values there. Fixes: a5ab0de0ebaa ("cxl: Calculate region bandwidth of targets with shared upstream link") Signed-off-by: Guixin Liu Reviewed-by: Richard Cheng Reviewed-by: Dave Jiang Reviewed-by: Jonathan Cameron Link: https://patch.msgid.link/20260831092216.540644-2-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 84bb7a1bfbef155ee4a31004eb3a7dc793261eb1 Author: Guixin Liu Date: Mon Aug 31 19:04:49 2026 +0800 cxl/pci: Skip reset detection for DVSEC emulated decoders [ Upstream commit 17ff3a9fd8669ea53fe83a7013871f30214d5537 ] HDM decoders are emulated from the DVSEC range registers in two cases: (a) the component registers expose no HDM decoder capability, or (b) the capability is present but the DVSEC ranges were the ones in use at driver load. After an FLR or SBR, __cxl_endpoint_decoder_reset_detected() reads the HDM decoder Committed bit for every decoder marked enabled, emulated ones included. In case (a) regs.hdm_decoder is NULL and the read oopses. In case (b) the Committed bit was never set, so a reset gets reported that never happened. Use the absence of cxld->commit to elide the check for emulated decoders. Case (b) tested under QEMU: a reset on an endpoint driven down the DVSEC emulation path no longer reports a reset or strips the decoder flags. Fixes: 934edcd436dc ("cxl: Add post-reset warning if reset results in loss of previously committed HDM decoders") Signed-off-by: Guixin Liu Reviewed-by: Jonathan Cameron Link: https://lore.kernel.org/linux-cxl/20260811113608.2815625-1-kanie@linux.alibaba.com/ Link: https://patch.msgid.link/20260831110449.719086-1-kanie@linux.alibaba.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 496a3e469fe0f879af4eea073a0b892d9ccced10 Author: Jakub Kicinski Date: Tue Sep 15 09:13:39 2026 -0700 netlink: specs: devlink: describe the netns id in the parent-dev nest [ Upstream commit 150079380e4b13c7ed0e738913937e375259172c ] devlink_nl_rate_parent_fill() emits DEVLINK_ATTR_PARENT_DEV via devlink_nl_put_nested_handle(), which adds DEVLINK_ATTR_NETNS_ID whenever the parent rate node lives on a devlink instance in another netns. Now that we defined dl-nested-devlink subset, which unlike dl-parent-dev includes netns-id, let's switch to it. The rate APIs input genuinely does not accept the netns-id, so we need to subset them to stick with dl-parent-dev. Fixes: b5f90fd4580ce7 ("devlink: Add parent dev to devlink API") Link: https://patch.msgid.link/20260915161341.1053476-8-kuba@kernel.org Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit d9a8d1dc40a65f62c27d726688a705db129f0fd8 Author: Jakub Kicinski Date: Tue Sep 15 09:13:35 2026 -0700 netlink: specs: devlink: describe DEVLINK_ATTR_NESTED_DEVLINK [ Upstream commit 6338e31e68551268fa65b5fb1f67eecb3b7a8e3c ] The "# TODO: fill in the attributes in between" gap before selftests (176) hides exactly one attribute, DEVLINK_ATTR_NESTED_DEVLINK (175). devlink_nl_fill() calls devlink_nl_nested_fill() unconditionally, which emits one of these per entry in devlink->nested_rels (mlx5, ice). Unlike the other TODO gaps this is a single attribute of an already modelled type, so just fill it in. Link: https://patch.msgid.link/20260915161341.1053476-4-kuba@kernel.org Signed-off-by: Jakub Kicinski Stable-dep-of: 150079380e4b ("netlink: specs: devlink: describe the netns id in the parent-dev nest") Signed-off-by: Sasha Levin commit 3ba3abea016eb094886ffc0a5ac62c52cb5197ac Author: Julian Braha Date: Sun Aug 30 23:11:29 2026 +0100 kconfig: fix extra output from savedefconfig on out-of-range defaults [ Upstream commit dbe1ae2304a3b02c3bf6ae82895ff232a29f3fee ] The Kconfig interpreter currently allows defaults that are outside of the range bounds. In these cases, the 'sym_validate_range' function will adjust the default value to the nearest range bound. For example, see this example: config A int range 1 2 default 16 Here, since the default value of 16 is greater than the bounds, the effective default value gets adjusted down to the upper bound, 2. However, 'savedefconfig' writes non-default values, and without being aware of the automatic adjustment to the range bound, it would write: A=2 This limitation is also documented in a comment: "The following fails to handle the situation where a default value is further limited by the valid range." To resolve this, let's factor out the default-range adjustment logic from the existing 'sym_validate_range' function into its own 'sym_get_near_range_bound' function for 'savedefconfig' to use too, so that it compares against the effective value. Adds tests, accordingly. Fixes: 7cf3d73b4360 ("kconfig: add savedefconfig") Assisted-by: Codex:gpt-5.6-sol Reported-by: Geert Uytterhoeven Closes: https://lore.kernel.org/lkml/CAMuHMdVyUAA3L4mUkSjmnuE3cvj-+N8z-Bhxsh1wa-FQWc=fjw@mail.gmail.com/ Signed-off-by: Julian Braha Tested-by: Geert Uytterhoeven Reviewed-by: Nathan Chancellor Link: https://patch.msgid.link/20260830221129.2668354-1-julianbraha@gmail.com Signed-off-by: Nathan Chancellor Signed-off-by: Sasha Levin commit 8e0546942c2f78159aa3f9c8c44c296888213d68 Author: Felix Gu Date: Sat Aug 22 23:07:47 2026 +0800 PCI: dra7xx: Fix clock enable leak on probe failure [ Upstream commit 768e5d0936d00d663ce2b8c192cc6ab0b61ad461 ] dra7xx_pcie_probe() enables the optional clock but never disables it when probing fails afterwards. Switch to devm_clk_get_optional_enabled(), which disables the clock automatically on failure. Fixes: 5af9405397bf ("PCI: dra7xx: Get an optional clock") Signed-off-by: Felix Gu Signed-off-by: Manivannan Sadhasivam Signed-off-by: Bjorn Helgaas Reviewed-by: Luca Ceresoli Link: https://patch.msgid.link/20260822-dra7xx-v1-1-23e204d5548b@gmail.com Signed-off-by: Sasha Levin commit 4ff19102aa758cfa2f821d0296d67d8d5cfa3189 Author: vladimir.oltean@nxp.com Date: Sat Sep 12 19:14:39 2026 +0300 PCI: dra7xx: Remove device links to PHY [ Upstream commit 52cd9bb3772e82d792cb0def3c2a5a9b6bd24ffb ] This is a full revert of commit 7a4db656a635 ("PCI: dra7xx: Create functional dependency between PCIe and PHY"). The trouble with this is that a PHY consumer driver dereferences fields from struct phy, which will become no longer possible. Since commit 987351e1ea77 ("phy: core: Add consumer device link support") from 2019, the PHY core also adds a device link to order PHY provider and consumer suspend/resume operations. The reverted functionality is from 2017 and is redundant with the PHY core now. Signed-off-by: Vladimir Oltean Signed-off-by: Bjorn Helgaas Reviewed-by: Aksh Garg Link: https://patch.msgid.link/20260912161440.1032188-3-vladimir.oltean@nxp.com Stable-dep-of: 768e5d0936d0 ("PCI: dra7xx: Fix clock enable leak on probe failure") Signed-off-by: Sasha Levin commit 9e3d2a54f59b97b1c370b5d1487255143ed1f3b3 Author: Longlong Xia Date: Wed Aug 26 16:21:50 2026 +0800 rcu: fix shrink budget underflow in lazy_rcu_shrink_scan [ Upstream commit 4c714f015d9ecc37d7a330b31822ccbcaff5ddc9 ] The lazy RCU shrinker decremented sc->nr_to_scan (unsigned long) and then tested the result with <= 0. When a single CPU's lazy callback count exceeds the remaining budget, the subtraction wraps to a large positive value and the <= 0 comparison, which is equivalent to == 0 for an unsigned type, never fires again. The scan loop then iterates through every nocb CPU instead of honouring the reclaim budget. Accumulate into count and stop once count >= nr_to_scan. Fixes: c945b4da7a448 ("rcu: Shrinker for lazy rcu") Assisted-by: Zcode:GLM-5.2 Signed-off-by: Longlong Xia Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin commit c51e77832416afa6cbc5cf0a7497366eef3ef888 Author: Mingpei CAO Date: Tue Sep 15 16:22:36 2026 +0000 libbpf: Reject local struct_ops bitfields before data access [ Upstream commit 961b8946acb482b6d7a39c266d623e5f9c4e873f ] A local struct_ops type can contain a bitfield absent from the corresponding kernel BTF type. bpf_map__init_kern_struct_ops() checks whether data for an absent local member is zero. For a bitfield, member->offset contains the bit offset and field width. bpf_map__init_kern_struct_ops() used the encoded value to calculate the member data pointer before rejecting the bitfield. The zero-data check could therefore read outside st_ops->data and crash libbpf. Reject local bitfields before calculating the member data pointer. Keep the existing rejection for bitfields in the kernel type. Fixes: c911fc61a7ce ("libbpf: Skip zeroed or null fields if not found in the kernel type.") Signed-off-by: Mingpei CAO Signed-off-by: Andrii Nakryiko Reviewed-by: Amery Hung Link: https://lore.kernel.org/bpf/20260915162252.473044-2-caomingpei@gmail.com Signed-off-by: Sasha Levin commit cccf790cac9fe438212d49063c4ba013b8dcbd5b Author: Geert Uytterhoeven Date: Thu Sep 3 11:06:30 2026 +0200 dt-bindings: interrupt-controller: chrp,open-pic: Fix dangling reference [ Upstream commit 2fb6f1a87cba099b2921fc3e777bf399d4153a39 ] The target of "[1]" was lost during the conversion to json-schema. Replace it by an inline reference. Fixes: a241f1a1b338b714 ("dt-bindings: interrupt-controller: Convert chrp,open-pic to DT schema") Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/86dd3544f7286fc117dc7ad0f6d799761283ec54.1788426169.git.geert+renesas@glider.be Signed-off-by: Rob Herring (Arm) Signed-off-by: Sasha Levin commit 5b3e1c464677ad340af34dfc6f2805afe7755489 Author: Geert Uytterhoeven Date: Thu Sep 3 11:06:29 2026 +0200 dt-bindings: interrupt-controller: chrp,open-pic: Typo s/pci/pic/ [ Upstream commit f0597e96a23b0cc7877581cf907407645ca71c03 ] The device_type for an OpenPIC node is "open-pic", not "open-pci". Fixes: a241f1a1b338b714 ("dt-bindings: interrupt-controller: Convert chrp,open-pic to DT schema") Signed-off-by: Geert Uytterhoeven Link: https://patch.msgid.link/f2cc11922b3e5dd73997ef8c673137951d3fe715.1788426169.git.geert+renesas@glider.be Signed-off-by: Rob Herring (Arm) Signed-off-by: Sasha Levin commit edb436a0c0aeb2f8fee9af1259bf69d5cb4c0c92 Author: Taimuraz Kaitmazov Date: Thu Aug 20 01:44:58 2026 +0300 accel/amdxdna: do not fail a sync for a BO with no debug context [ Upstream commit b1da2a6cc13d66c03c364f7b72d5a343b3ccdb3c ] amdxdna_drm_sync_bo_ioctl() calls amdxdna_hwctx_sync_debug_bo() for every FROM_DEVICE sync, which answers -EINVAL when the BO's assigned_hwctx names no context. Only a BO attached with ATTACH_DEBUG_BO is ever given one, so an ordinary read-back sync reports failure after its flush has already run. Ask for the debug sync only when the BO has a context. An unattached BO carries AMDXDNA_INVALID_CTX_HANDLE and hwctx ids are allocated above it, so the test is exact, -EINVAL keeps meaning that the named context is gone, and the handle is not resolved twice. The field is written under dev_lock and read here without it; the context is still resolved under that lock, so a racing attach only decides whether this sync sees the buffer. Fixes: 7ea046838021 ("accel/amdxdna: Support firmware debug buffer") Suggested-by: Lizhi Hou Signed-off-by: Taimuraz Kaitmazov Reviewed-by: Lizhi Hou Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260819224458.257346-6-taimuraz@kaitmazov.com Signed-off-by: Sasha Levin commit d20afbf0ca28fe92f7665857e10cf89ad36e5f5c Author: Taimuraz Kaitmazov Date: Thu Aug 20 01:44:56 2026 +0300 accel/amdxdna: do not warn when a sync request is rejected [ Upstream commit f2751f8754ae7ca0bba1a9536e153c8cc3aa4aae ] amdxdna_drm_sync_bo_ioctl() answers a failed amdxdna_flush_bo() with drm_WARN(). Both of that function's error returns are decided by the ioctl's arguments, so SYNC_BO with an offset past the end of the BO splats and taints the kernel from an unprivileged caller. Log it at debug level, since the same caller can repeat it. Fixes: dbc8fd7a03cb ("accel/amdxdna: Add expandable device heap support") Signed-off-by: Taimuraz Kaitmazov Reviewed-by: Lizhi Hou Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260819224458.257346-4-taimuraz@kaitmazov.com Signed-off-by: Sasha Levin commit c9e74fedd5507cdf2cea3a5b1126256c8b698176 Author: Lizhi Hou Date: Thu Sep 17 10:19:52 2026 -0700 accel/amdxdna: Set HMM_PFN_REQ_WRITE for writable BO faults [ Upstream commit 2d2c4b248bff9ee1ac06054a9138c1a308e2e7b8 ] When aie2_populate_range() faults in pages, it only sets HMM_PFN_REQ_FAULT. Without HMM_PFN_REQ_WRITE, handle_mm_fault() does not request write permissions and may populate the CPU page tables with read-only PTEs. Check the VMA flags and set HMM_PFN_REQ_WRITE when the VMA has VM_WRITE. Fixes: e486147c912f ("accel/amdxdna: Add BO import and export") Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260917171952.1883974-1-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit c7cdd5b81143da712dbc97ddbacd6c84f866f1e8 Author: Lizhi Hou Date: Thu Sep 17 08:48:24 2026 -0700 accel/amdxdna: Fix race between unmap and free BO [ Upstream commit ac18f34f5927e420ae529be72aec86201a262d04 ] A userspace process can concurrently trigger an unmap, which queues hmm_unreg_work, and free BO. If amdxdna_hmm_unreg_work() executes list_del(&mapp->node) and is preempted before calling amdxdna_umap_put(), amdxdna_hmm_unregister_all() can fail to find the mapping in the list and return without calling cancel_work_sync(). This allows object destruction to proceed while the worker still holds a pointer to the BO in the umap structure. Moving the work item from struct amdxdna_umap to struct amdxdna_gem_obj. The worker no longer holds a pointer to an individual mapping, so there is no longer a window where the umap has been unlinked from umap_list but work is still pending against it. The work item now lives in the BO itself, so use a single cancel_work_sync() in the free path to drain the work. Fixes: 445d20910429 ("accel/amdxdna: Fix unexpected wait when flushing notifier_wq") Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260917154824.1872220-1-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit 153d8ed372bd41b4a522e4a0dc3330aae4001db2 Author: Lizhi Hou Date: Fri Sep 11 09:39:07 2026 -0700 accel/amdxdna: Fully initialize map structure before registering notifier [ Upstream commit 5eee433b5c97821979e7de58476dc245ee168d89 ] The map structure is currently only partially initialized when the notifier is registered. Although holding mmap_write_lock() prevents the notifier callback from running before the remaining initialization is complete, the ordering can be confusing during code review. Fully initialize the map structure before registering the notifier so that the structure is completely constructed before it is published. Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260911163907.1193852-1-lizhi.hou@amd.com Stable-dep-of: ac18f34f5927 ("accel/amdxdna: Fix race between unmap and free BO") Signed-off-by: Sasha Levin commit d254d8ecbcf60dc9b34a27702ed778b511fdf903 Author: Sean Chang Date: Wed Aug 19 23:12:16 2026 +0800 drm: bridge: dw_hdmi: Fix constant truncation warning on phy_mask [ Upstream commit cb6a133bc75bc4c5b25f7c278b6c74bf46a3d71b ] In dw_hdmi_probe(), casting the bitwise complement of (HDMI_PHY_HPD | HDMI_PHY_RX_SENSE) directly to u8 triggers a compiler warning (-Wconstant-conversion). Due to C integer promotion rules, the bitwise OR and bitwise NOT are evaluated as 32-bit signed integers, producing 0xFFFFFF0D before being cast down to u8. Fix this by explicitly masking the inverted 32-bit result with 0xFF to keep only the lower byte and prevent implicit upper-bit truncation. Signed-off-by: Sean Chang Reviewed-by: Luca Ceresoli Link: https://patch.msgid.link/20260819151216.56833-1-seanwascoding@gmail.com Signed-off-by: Luca Ceresoli Stable-dep-of: ac18f34f5927 ("accel/amdxdna: Fix race between unmap and free BO") Signed-off-by: Sasha Levin commit b0af3a1c14ac93c51a3061eabd7f69b3723bdd56 Author: Wentao Liang Date: Thu Sep 17 10:00:10 2026 +0000 media: ivsc: Fix csi_dev use-after-free in mei_ace_setup_dev_link() [ Upstream commit f9be93338c2fbaffdbda4f89045e879932e827ca ] device_link_add() only takes a reference to the supplier when the link is created successfully. When it fails it returns NULL without taking one, so the put_device(csi_dev) before the error check can drop the last reference to csi_dev and dev_name(csi_dev) then dereferences a freed device. Move the put_device() below the error check and release the reference through the existing err_put label on the failure path so that csi_dev is no longer touched after it has been put. Fixes: 765abb76f51f ("media: ivsc: Release csi_dev reference early in mei_ace_setup_dev_link()") Signed-off-by: Wentao Liang Signed-off-by: Sakari Ailus Signed-off-by: Sasha Levin commit 121f7dd795547737a50b4b2a59998e3c74cb8772 Author: Nikolay Borisov Date: Thu Sep 17 18:07:07 2026 +0300 ata: sata_dwc_460ex: Don't enable interrupt if libATA core registration fails [ Upstream commit e137035fcd66cb454c479bb989968561bbc60341 ] Recent 4bbc16a353a9 commit changed the timing when interrupts are enabled. However it didn't account for the libATA registration step. So it's possible that interrupts are enabled when the device is not registered with libATA core. Resolve the issue by failing the entire registration process in case of failure to register with libATA. Fixes: 4bbc16a353a9 ("ata: sata_dwc_460ex: enable SATA interrupts only after IRQ handler is registered") Signed-off-by: Nikolay Borisov Link: https://lore.kernel.org/r/20260917150707.1643330-1-nik.borisov@suse.com Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit 880a082d45a50a8cf90c9071b6e41c2a3ec9ba29 Author: Srinivasan Shanmugam Date: Tue Sep 15 12:46:05 2026 +0530 drm/amd/display: Fix redundant NULL check on dc->clk_mgr in dcn42_prepare_bandwidth [ Upstream commit 346d81ef808ba28465a3f19f2a0d63a758e7409c ] dc->clk_mgr is already dereferenced inside dcn401_prepare_bandwidth(), so the dc->clk_mgr NULL check that follows is redundant and misleading. Drop it. Fixes: 53845307d52e ("drm/amd/display: Register DCN as a PMFW DF C-state client on DCN42") Reported-by: Dan Carpenter Cc: Roman Li Cc: Alex Hung Cc: Tom Chung Cc: Ivan Lipski Cc: Harry Wentland Cc: Aurabindo Pillai Cc: Nicholas Kazlauskas Cc: Wayne Lin Cc: Dan Wheeler Cc: Leo Chen Signed-off-by: Srinivasan Shanmugam Reviewed-by: Alex Hung Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 7c6490b7c26bea152b3945280c09065117e80356 Author: Hari Mishal Date: Tue Sep 15 15:15:48 2026 +0200 drm/amdgpu/atom: bound the VBIOS date, part number, version and build getters [ Upstream commit aee05c455ad3e72df9a0591baf0b60da518800f3 ] atom_get_vbios_date(), atom_get_vbios_pn(), atom_get_vbios_version() and atom_get_vbios_build() all walk the BIOS image using offsets and counts taken from the image itself, checked only against each other and never against ctx->bios_size: - atom_get_vbios_date() reads 14 bytes at a fixed offset that check_atom_bios()'s minimum size (0x49) does not cover. - atom_get_vbios_pn() dereferences an image-supplied u16 string offset unchecked, then walks and copies from it with only a length cap, not an image cap. - atom_get_vbios_version() takes its search bounds from image u16s; atom_find_str_in_rom() already clamps the search itself, but the match is then advanced by a fixed 18 bytes and STRLEN_NORMAL bytes are copied from there with no check that this still lands inside the image. - atom_get_vbios_build() walks from an image-supplied config-string offset toward the ROM header; a config offset at or past the header makes the pointer difference negative, wrapping through the u16 'len' and passing strscpy() a bound far larger than the 32-byte destination. Bound each getter's reads, walks and copies to ctx->bios_size, falling back to an empty string on a malformed image. Fixes: 29b4c589b43d ("drm/amdgpu: Add vbios info ioctl interface") Fixes: d6fa80266178 ("drm/amdgpu: Add vbios build number interface") Assisted-by: gkh_clanker_t1000 Signed-off-by: Hari Mishal Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 21bf975597a11788cd324982181122945de44656 Author: Hari Mishal Date: Mon Sep 14 15:29:20 2026 +0200 drm/amd/pm: bound SCLK FCW range entries to the table size [ Upstream commit f35aa5c77f5fca20fc269d6221df19c7b96704a5 ] atomctrl_get_smc_sclk_range_table() copies ucSclkEntryNum entries from the VBIOS SMU_Info table into pp_atom_ctrl_sclk_range_table. Both the source (asSclkFcwRangeEntry[]) and destination (table->entry[]) arrays are fixed at MAX_SCLK_RANGE (8) entries, but ucSclkEntryNum is an unchecked u8 read straight from the VBIOS, so it can be up to 255. The destination is stack-allocated in both callers (polaris10_get_sclk_range_table(), vegam_get_sclk_range_table()), so a count above 8 overflows a stack buffer, not just a heap read. Reject counts above MAX_SCLK_RANGE rather than clamping to it. Only one version of this VBIOS struct (ATOM_SMU_INFO_V2_1) has ever existed, so a count above 8 corresponds to no legitimate table format and means either a corrupted or a tampered VBIOS. Fixes: a23eefa2f461 ("drm/amd/powerplay: enable dpm for baffin.") Assisted-by: gkh_clanker_t1000 Signed-off-by: Hari Mishal Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 6caf097214b892ef6e033c4a2795297a9633c338 Author: Vitaly Prosyak Date: Wed Sep 9 18:23:14 2026 -0400 drm/amdgpu: reserve eviction-fence slot at WPTR caller [ Upstream commit 5e6b21bce9d939b564e1f1c88a429cfa1fe66d3a ] Root cause analysis showed that the previous workaround was fixing the symptom in the wrong layer. Problem: kernel BUG at drivers/dma-buf/dma-resv.c:319! BUG_ON(fobj->num_fences >= fobj->max_fences) Workqueue: events amdgpu_userq_restore_worker - amdgpu_evf_mgr_attach_fence() had been temporarily taught to reserve/add fence bookkeeping internally as a workaround. - This hid the real contract violation and made reservation policy implicit inside a helper. Review clarification: - The helper-side dma_resv_add_fence-related workaround was only an intended proposal sent for review discussion, not the final direction. - Final fix keeps fence-slot reservation explicit in callers and leaves the helper free of policy decisions. Findings from investigation: - drm_exec_prepare_obj() both locks and reserves fence slots. - drm_exec_lock_obj() only locks and does not reserve slots. - Existing attach_fence callers in the GEM/userq restore flows already reserve TTM_NUM_MOVE_FENCES + 1 before adding the bookkeeping eviction fence. - The WPTR mapping path in mes_userq_create_wptr_mapping() used drm_exec_lock_obj() and then called amdgpu_evf_mgr_attach_fence(), so this specific path could add a fence without pre-reserved space. Fix: - Switch the WPTR mapping path to drm_exec_prepare_obj(..., TTM_NUM_MOVE_FENCES + 1), restoring the caller-side reservation contract. - Remove the helper-side reservation workaround from amdgpu_evf_mgr_attach_fence(). Why this is the right layer: - Reservation policy stays explicit at call sites that define how many fences may be added in that execution context. - The helper only performs validate + add_fence when called with a properly prepared reservation object, matching the existing drm_exec model. Fixes: 7264bc10c7c6 (drm/amdgpu: dont pin wptr bo instead use eviction fence) Cc: Sunil Khatri Cc: Prike Liang Cc: Christian König Cc: Alex Deucher Signed-off-by: Vitaly Prosyak Reviewed-by: Prike Liang Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 6c278e669a9ed2d406e9328a19c9d910f3028ede Author: James Lin Date: Thu Aug 13 16:50:28 2026 +0800 drm/amd/display: Cast DP DTO pixel clock math to avoid overflow and narrowing [ Upstream commit 0575f53925e832fba376583cd18667de8f31b13b ] [Why] Commit 0421fc6ab3a8 ("drm/amd/display: fix __udivdi3 link error") switched get_dp_dto_frequency_100hz() and dcn401_get_dp_dto_frequency_100hz() to div_u64() but dropped the original explicit casts, leaving two issues: - In get_dp_dto_frequency_100hz(), "clock_hz * dp_dto_ref_khz * 10" is computed in 32-bit unsigned arithmetic (both operands are unsigned int) before being stored into the u64 temp, so the product can overflow before it is widened (flagged by Coverity OVERFLOW_BEFORE_WIDEN). - div_u64() returns a u64 that is assigned directly to the unsigned int *pixel_clk_100hz, an implicit narrowing conversion that trips -Wconversion (possible loss of data) on stricter builds. [How] Cast clock_hz to unsigned long long so the multiplication is performed in 64-bit, and make the u64 -> unsigned int narrowing explicit with an (unsigned int) cast on the div_u64() results in both functions. The computed values are unchanged. Fixes: 0421fc6ab3a8 ("drm/amd/display: fix __udivdi3 link error") Reviewed-by: Wayne Lin Signed-off-by: James Lin Signed-off-by: Chenyu Chen Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit d0d4d933477ef1ce7f6e60db6c8ef1e0ebb10f9a Author: Ian Rogers Date: Thu Aug 20 14:37:57 2026 -0700 perf record: Fix unhandled POLLHUP on non_perf_event descriptors [ Upstream commit 3cbb16ccd7d8c7377058195b48c721e99ee158aa ] When processing POLLHUP on a non_perf_event control descriptor, evlist__finalize_ctlfd() is invoked to finalize the setup, correctly setting the core evlist's poll array file descriptor to -1. However, this finalized teardown state is never propagated back to the individual thread's local replica of the pollfd array. Consequently, on the next iteration of the main recording loop, record__update_evlist_pollfd_from_thread() performs a strict equivalence check between the core evlist's array and the thread's localized poll array, detecting that the fd values no longer match. This causes an immediate -EINVAL abort and a premature teardown. Fix the underlying logic within record__update_evlist_pollfd_from_thread() to sustainably propagate the finalized teardown statuses (-1) originating from the core evlist back to the thread's localized poll structure. This correctly maintains synchronization and entirely prevents the unhandled index mismatch crashes. Additionally, add a unit test that explicitly validates that fdarray__filter() preserves its invariants regarding fdarray_flag__nonfilterable items to guard against regressions. Fixes: fb4751e79c45cb48 ("perf record: Fix teardown hang on system-wide multi-threaded sessions") Signed-off-by: Ian Rogers Assisted-by: Gemini:gemini-3.1-pro Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 720130e49398d9cf3dc191cc35b9aee5cf66b5b5 Author: Karl Mehltretter Date: Sun Jul 12 18:03:01 2026 +0200 clk: aspeed: ast2700: select AUXILIARY_BUS [ Upstream commit 4457ee2f99f7286d037ccde8c107481b6105fc15 ] The AST2700 clock driver also exposes the SoC reset controller: it hands its register base to a reset auxiliary device via devm_auxiliary_device_create(), which the separate ASPEED reset driver (RESET_ASPEED) then binds to. That create call needs the auxiliary bus core (AUXILIARY_BUS), not the reset driver itself, but COMMON_CLK_AST2700 does not select AUXILIARY_BUS. It builds today only because RESET_ASPEED selects AUXILIARY_BUS and is normally enabled alongside the clock driver. On a randconfig with COMMON_CLK_AST2700=y and RESET_ASPEED=n, nothing pulls the auxiliary bus in and the kernel fails to link: ld: drivers/clk/aspeed/clk-ast2700.o: in function `ast2700_soc_clk_probe': clk-ast2700.c:(.text+0x147c): undefined reference to `__devm_auxiliary_device_create' Select AUXILIARY_BUS directly, as other clock drivers that create auxiliary devices do, so it builds regardless of the reset driver. Fixes: fdc1eb624ddc ("clk: aspeed: add AST2700 clock driver") Signed-off-by: Karl Mehltretter Reviewed-by: Brian Masney Reviewed-by: Andrew Jeffery Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit c4bc167fc31fbe3a758d1e53718006085cbc2807 Author: Pengpeng Hou Date: Sun Sep 6 11:39:24 2026 +0800 clk: milbeaut: Return divider update timeouts [ Upstream commit 92d0998090d1716ee6b47174c10eb9415a12fca8 ] m10v_clk_divider_set_rate() logs when the hardware does not clear its write-valid request, but still returns success to the clock framework. It also uses the sleeping poll helper while holding the divider spinlock. Use the atomic poll helper under the lock and return its timeout so the rate change is not reported as successful before the hardware accepts it. The issue was found by our static-analysis tool and manually reviewed. Fixes: 6a6ba5b55a72 ("clock: milbeaut: Add Milbeaut M10V clock controller") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit ae486e8e100a18bcc72738b8baf99826e582ec16 Author: Pengpeng Hou Date: Thu Aug 13 23:36:50 2026 +0800 clk: si521xx: correct the SI52147 OF output enable map [ Upstream commit 7a4cc47d715f08309089d40b8c29fb0ba79917db ] The SI52147 data sheet assigns DIFF0 through DIFF3 output-enable bits to 0x17 in control register 1. The OF match data uses 0x15, leaving the DIFF2 bit out of the map, while the I2C ID table already uses the documented value. Use 0x17 for the SI52147 OF entry so both enumeration paths expose the documented outputs. Fixes: edc12763a3a29 ("clk: si521xx: Clock driver for Skyworks Si521xx I2C PCIe clock generators") Assisted-by: Codex:gpt-5 Signed-off-by: Pengpeng Hou Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 4a18fce8ab5e71e2253c0f44270eb8075e1e4cc7 Author: Arnaldo Carvalho de Melo Date: Tue Sep 8 11:03:44 2026 -0300 perf test: Skip data_type_profiling when the PMU cannot record memory events [ Upstream commit 29f320d221c1c4c082c7eafb2251fedf8a4868ec ] The test's only guard matches "failed: no PMU supports the memory events", but a PMU that has memory events and refuses them per-thread, such as AMD IBS on kernels without the swfilt filter, falls through: the script runs under 'set -e' and the bare 'perf mem record' aborts it through the EXIT trap, reporting a signal that never happened and turning "this PMU cannot record these events" into a test failure. Skip when a trivial per-thread 'perf mem record' fails, and put the record and annotate calls in the condition of an 'if', where 'set -e' leaves them alone, so the remaining cases report their own failures instead of the first one aborting the run. Fixes: f60a5c22967b ("perf tests: Test annotate with data type profiling and rust") Acked-by: Namhyung Kim Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 55d230dba0463a3482711e2343b34f7a7e97cc19 Author: Francesco Valla Date: Tue Sep 15 22:24:36 2026 +0200 spi: virtio: fix max frequency setting [ Upstream commit 26f42ca8becd01877e762916865a168c1b6c4ff4 ] The maximum transfer frequency is read from the virtio config space but never propagated to the SPI framework logic. Fix this behavior and drop the useless setting copy from the driver's private data. Fixes: f98cabe3f6cf ("SPI: Add virtio SPI driver") Signed-off-by: Francesco Valla Link: https://patch.msgid.link/20260915-virtio-spi-fix2-v1-1-7a474cb1b13b@valla.it Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3261ad8405e47361220c65f2dc9d4d681a50f52b Author: bui duc phuc Date: Wed Sep 16 12:00:19 2026 +0700 ASoC: mediatek: mt8189: Validate TDM MCLK frequency [ Upstream commit 197ec30e1b608ade5d2eb9271d01c59480a6f9a1 ] mtk_dai_tdm_cal_mclk() accepts zero or negative frequencies. Reject invalid frequencies before configuring the TDM clock. Fixes: 9f202872ba04 ("ASoC: mediatek: mt8189: support TDM in platform driver") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260916050020.14575-13-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 46cd796b902ef1ab6a7e02c22f6553ef929ec5f0 Author: bui duc phuc Date: Wed Sep 16 12:00:18 2026 +0700 ASoC: mediatek: mt8189: Propagate TDM clock errors [ Upstream commit 242d0280eabba05c085a51ad0a9c9a7a3afa7b03 ] mtk_tdm_bck_en_event() and mtk_tdm_mck_en_event() currently ignore errors returned by the MCK enable and disable functions. Propagate these errors. Fixes: 9f202872ba04 ("ASoC: mediatek: mt8189: support TDM in platform driver") Signed-off-by: bui duc phuc Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260916050020.14575-12-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit fa8b70190bba1f92ceb38bc5e2c744faa18e5cc0 Author: bui duc phuc Date: Wed Sep 16 12:00:17 2026 +0700 ASoC: mediatek: mt8189: Validate sysclk frequency [ Upstream commit 9c73b5a43c99f905ebeab4744a8ba0b28232b189 ] A zero frequency causes a modulo-by-zero error when validating the I2S clock frequency. Reject it before performing the validation. Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260916050020.14575-11-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 22651d27e232eb7e51503cc318603c7301c7d818 Author: bui duc phuc Date: Wed Sep 16 12:00:16 2026 +0700 ASoC: mediatek: mt8189: Propagate MCLK errors [ Upstream commit 65b9d4a783cc266d057a64c1f04f690e9abb1bd3 ] mtk_mclk_en_event() currently ignores errors returned by the MCK enable and disable functions. Propagate these errors. Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260916050020.14575-10-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 029999d0431e836d3d2429d82ef70a2926d4ffb2 Author: bui duc phuc Date: Wed Sep 16 12:00:15 2026 +0700 ASoC: mediatek: mt8189: Propagate APLL errors [ Upstream commit 6347f276da8c6c3e6e8262b30b9cd14dfbc48248 ] mtk_apll_event() currently ignores errors returned by the APLL enable functions. Propagate these errors. Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver") Signed-off-by: bui duc phuc Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260916050020.14575-9-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0bfe9712fe62639c9a7eeafd4502dc4d55df86a3 Author: bui duc phuc Date: Wed Sep 16 12:00:13 2026 +0700 ASoC: mediatek: mt8189: Propagate runtime resume errors [ Upstream commit 483e827b005f122755785a3b6094e2bc19eb7685 ] mt8189_afe_runtime_resume() currently ignores errors from regmap operations and mt8189_afe_enable_main_clock(). Propagate these errors and clean up the state before returning the error. Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260916050020.14575-7-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5a2749675c24e407d2975a04aec8379eb748a593 Author: bui duc phuc Date: Wed Sep 16 12:00:11 2026 +0700 ASoC: mediatek: mt8189: Propagate reg_rw clock errors [ Upstream commit 29de6666879997c9dc375344fd046363d0c3bcdb ] mt8189_afe_enable_reg_rw_clk() currently ignores errors from clock enable and parent operations. Propagate these errors and clean up the clocks before returning the error. Fixes: dc637ffeed6c ("ASoC: mediatek: mt8189: support audio clock control") Signed-off-by: bui duc phuc Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260916050020.14575-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e2c4ef9398d5b38f19483ddbec6686590b97774b Author: bui duc phuc Date: Wed Sep 16 12:00:10 2026 +0700 ASoC: mediatek: mt8189: Validate MCK ID [ Upstream commit b6b47040e897f18df1ed53c658ab5159b035b5d1 ] mt8189_mck_disable() only checks for negative MCK IDs. Reject IDs outside the valid MCK range as well. Fixes: dc637ffeed6c ("ASoC: mediatek: mt8189: support audio clock control") Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260916050020.14575-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit f4e65022cf0f051012fb1dd5fd092162edf51b02 Author: bui duc phuc Date: Wed Sep 16 12:00:09 2026 +0700 ASoC: mediatek: mt8189: Propagate MCK enable errors [ Upstream commit bd9a8d9def207a8d7eeaa4dda1c53c5b4fca4008 ] mt8189_mck_enable() currently returns without restoring the clock state when setting the clock parent, enabling the divider, or setting the divider rate fails. Propagate the error and disable clocks enabled by the function. Fixes: dc637ffeed6c ("ASoC: mediatek: mt8189: support audio clock control") Signed-off-by: bui duc phuc Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260916050020.14575-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 76a13fc6f0d69ac7b1dfac30e5967ad62e4930ff Author: bui duc phuc Date: Wed Sep 16 12:00:08 2026 +0700 ASoC: mediatek: mt8189: Propagate APLL enable errors [ Upstream commit 5a3c23d4aa89cdb7a3f2a42465c2cabcb71ebcdd ] mt8189_apll1_enable() and mt8189_apll2_enable() currently ignore errors from regmap_update_bits() and do not clean up resources when clock enable operations fail. Propagate these errors and roll back the clocks and tuner state on errors. Fixes: dc637ffeed6c ("ASoC: mediatek: mt8189: support audio clock control") Signed-off-by: bui duc phuc Reviewed-by: AngeloGioacchino Del Regno Link: https://patch.msgid.link/20260916050020.14575-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 1412283979944cca0a48f04bce63cd7611bf11c2 Author: Vijendar Mukunda Date: Thu Sep 10 18:50:03 2026 +0530 ASoC: SOF: amd: fix amd_sof_acp_probe() error unwind ordering [ Upstream commit b6aaef8ca8c305170de83e621c7e16d56731312a ] Call amd_sof_sdw_exit() after free_irq() in the free_ipc_irq error label of amd_sof_acp_probe(). Without this, an IRQ that fires between sdw context teardown and free_irq() can dereference freed SoundWire resources. Fixes: d948218424bf ("ASoC: SOF: amd: add code for invoking soundwire manager helper functions") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20260910132251.1171943-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b885a3d6fa97519af7dd7cb102efb4a33e7e106e Author: Vijendar Mukunda Date: Thu Sep 10 18:50:02 2026 +0530 ASoC: SOF: amd: fix amd_sof_acp_remove() teardown ordering [ Upstream commit db2167f2e3f72db64d01356cc9f2924d32fd5a51 ] Call free_irq() before amd_sof_sdw_exit() in amd_sof_acp_remove(). amd_sof_sdw_exit() sets adata->sdw to NULL; if an IRQ fires between that point and the subsequent free_irq(), acp_irq_handler() may dereference the now-NULL pdev[] pointer, causing a use-after-free. Fixes: d948218424bf ("ASoC: SOF: amd: add code for invoking soundwire manager helper functions") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20260910132251.1171943-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6264ba27127f1dc75fc9c204c760f7fb0bebed75 Author: Vijendar Mukunda Date: Thu Sep 10 18:50:01 2026 +0530 ASoC: SOF: amd: return -EINVAL for unknown PCI revision in acp7x suspend [ Upstream commit e419e9a6cbfe1d0947dd5ab8dabe9a5ed4b4f572 ] amd_sof_acp7x_suspend() is registered only for ACP7.B and ACP7.F platforms. If an unexpected PCI revision reaches the switch statement the default case previously fell through, leaving ACP_CONTROL with a stale value (enable=false) before writing ZSC_DSP_CTRL=1. Return -EINVAL instead to surface the programming error immediately. Fixes: 1c9646f3180e ("ASoC: SOF: amd: add system and runtime PM ops for ACP7x") Signed-off-by: Vijendar Mukunda Link: https://patch.msgid.link/20260910132251.1171943-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 18972293f131ef82eaf45f44c5599c3998292dfd Author: Shakeel Butt Date: Fri Sep 11 11:28:14 2026 -0700 kernfs: don't hold kernfs_rwsem across dir_emit() [ Upstream commit 341c65579de5b632eb7913bb68b3e375eeeb3ddf ] kernfs_fop_readdir() holds kernfs_rwsem for reading across the whole listing, dir_emit() included. dir_emit() copies to userspace, so it can fault into reclaim while holding the lock that every create, remove and rename in the hierarchy needs. sysfs and cgroupfs have one per machine. Under memory pressure the monitoring daemons fault on their own getdents(2) buffer with it held: below: page allocation stall for 120 secs: order:0, mode:0x140dca(GFP_HIGHUSER_MOVABLE|__GFP_ZERO|__GFP_COMP) nodemask=(null),cpuset=hostcritical.slice,mems_allowed=0 Call Trace: dump_stack_lvl+0x5d/0x80 __alloc_frozen_pages_noprof+0x5f4d/0x6300 ? memcg_list_lru_alloc+0x73/0x320 ? ima_file_check+0xd0/0x7d0 vma_alloc_folio_noprof+0x145/0x560 handle_mm_fault+0x17c9/0x2720 ? find_vma+0x27/0x30 do_user_addr_fault+0x39f/0x6e0 exc_page_fault+0x8f/0x110 asm_exc_page_fault+0x22/0x30 RIP: 0010:filldir64+0xd7/0x1a0 [Code:/RSP:/RAX:..R15: register block elided] kernfs_fop_readdir+0x2de/0x420 iterate_dir+0x8c/0x1f0 __se_sys_getdents64+0x61/0xe0 ? copy_page_from_iter+0x860/0x860 do_syscall_64+0x6a/0x250 entry_SYSCALL_64_after_hwframe+0x4b/0x53 Commit 9aab10a0249e ("kernfs: Don't re-lock kernfs_root::kernfs_rwsem in kernfs_fop_readdir().") took the lock drop out because dir_emit() was handed kernfs_node::name, which a rename can free. The previous patch emits a copy instead, so drop the lock around dir_emit(). A listing is no longer atomic within one getdents(2) call, which for most sysfs and cgroup directories is all of it. POSIX leaves that unspecified for an entry added or removed since opendir(3). Fixes: 9aab10a0249e ("kernfs: Don't re-lock kernfs_root::kernfs_rwsem in kernfs_fop_readdir().") Signed-off-by: Shakeel Butt Link: https://patch.msgid.link/20260911182815.1992483-4-shakeel.butt@linux.dev Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 5b106fd1030d09bfd697f8071ff7f0727485ca6b Author: Shakeel Butt Date: Fri Sep 11 11:28:12 2026 -0700 kernfs: don't repeat or skip an entry when readdir resumes [ Upstream commit 5ebcb578adeec7407dd501108ab2f423ca8e3e55 ] readdir keeps its place as a name hash in ctx->pos and pins the entry in file->private_data. If that entry is gone when the listing comes back, kernfs_dir_pos() searches the rbtree for the hash and keeps whatever node the descent stopped on. That is the entry before or after the missing one, depending on the shape of the tree. Landing before it repeats an entry the previous getdents(2) call already reported. Landing after it, kernfs_dir_next_pos() calls rb_next() and steps over an unreported entry. With children A(10), B(20), C(30): report A, ctx->pos = 10 A removed kernfs_dir_next_pos(10, A) A is gone, the search for 10 stops at B rb_next(B) -> C, so B is never reported Only the repeat happens today, between two getdents(2) calls. The skip needs the pinned entry to go away inside one call, which the next patch allows when it drops kernfs_rwsem around dir_emit(). Before the commit 4e4d6d860b93 the descent kept a node only on the way left, which is a search for the first entry at or after the hash. That commit moved the assignment to the top of the loop, where it runs on right turns too. Restore that search, and step forward only when the pinned entry is still there rather than when the hash matches, since two entries in one directory can share a hash. While here, kernfs_dir_next_pos() called the hash @ino. It is never an inode number, so name it @hash. Fixes: 4e4d6d860b93 ("sysfs: Add s_hash to sysfs_dirent and order directory entries by hash") Acked-by: Tejun Heo Signed-off-by: Shakeel Butt Link: https://patch.msgid.link/20260911182815.1992483-2-shakeel.butt@linux.dev Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 576c326a41e235b0c7fa916201ff8e4637b96e57 Author: Shakeel Butt Date: Wed Sep 9 21:54:06 2026 -0700 kernfs: don't hold kernfs_rwsem across notification delivery [ Upstream commit 23985e2b1f31623468244a2149b2388cda4925eb ] Recently at Meta we noticed that on multi-tenant systems, a workload under extreme memory pressure negatively impacts unrelated workloads and system daemons like below [1] and fb-oomd [2]. Mainly we observed that system daemons were stuck on kernfs_rwsem in cgroup-related interfaces for long periods of time. On further inspection, we found that the workload under pressure had registered inotify watches on its memory.events and was continuously receiving limit-hitting notifications. The cgroup notification is done in kernfs_notify_workfn(), which holds kernfs_supers_rwsem and kernfs_rwsem and calls fsnotify(), which allocates the event with kmalloc(GFP_KERNEL_ACCOUNT|__GFP_RETRY_MAYFAIL) charged to the watching cgroup, which is already under memory pressure. So the notify worker ended up in memory reclaim of a cgroup already under pressure, and itself kept triggering the limit notifications. This notification path takes the locks in read mode, but a waiting writer blocks all future readers. That is exactly what is happening in the Meta fleet, and it leaves daemons that are critical to the reliability of the system stuck for long periods of time. Commit 400188ae361a ("kernfs: Acquire kernfs_rwsem in kernfs_notify_workfn().") added kernfs_rwsem just to safely read kernfs_node::name. Let's sample the name once before the loop and drop the lock. kernfs_supers_rwsem still covers the list, and the removal paths take that one for reading too, so a stalled worker can still hold a removal up once a mount or unmount is queued behind it. Two things change for a watcher. A name longer than NAME_MAX now gives an event with no name, where before it gave one with the full name; fsnotify() takes the name as optional, so the event still arrives. And the name and the parent are no longer sampled under one lock, so a rename between the two would name a file against the directory it moved to. That cannot happen today: kernfs_notify() rejects anything that is not a file, and no caller of kernfs_rename_ns() renames one. [1] https://github.com/facebookincubator/below [2] https://github.com/facebookincubator/oomd Fixes: 400188ae361a ("kernfs: Acquire kernfs_rwsem in kernfs_notify_workfn().") Signed-off-by: Shakeel Butt Link: https://patch.msgid.link/20260910045406.485295-1-shakeel.butt@linux.dev Acked-by: Tejun Heo Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 45df58239521644da57fa99c264ed2f14e8f3f21 Author: Zizhi Wo Date: Wed Sep 16 17:51:36 2026 +0800 md/raid5: reject a per-device size smaller than one chunk [ Upstream commit 370ca0760b18c64592a258bcb057ff0a2531aabf ] Both raid5_run() and raid5_resize() align the per-device size down to a whole multiple of the chunk size: mddev->dev_sectors &= ~(chunk_sectors - 1); Neither checks the result, so a size smaller than one chunk silently becomes zero. In raid5_run() that is harmless: the array size is derived from the same zero, so the disk just ends up with no capacity. In raid5_resize() it leaves the array inconsistent -- mddev->dev_sectors becomes zero, while mddev->array_sectors and the gendisk capacity keep the previous. A later raid4/raid5 -> raid0 takeover copies the zero into every rdev->sectors (raid0_takeover_raid45()), so create_strip_zones() builds a strip zone table whose zone_end is zero. Any read then passes bio_check_eod() against the stale capacity and hits the BUG() in find_zone(): kernel BUG at drivers/md/raid0.c:318! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI Call Trace: raid0_make_request md_handle_request submit_bio_noacct_nocheck block_read_full_folio read_part_sector bdev_disk_changed bdev_open Reject a size smaller than one chunk in both functions, so that a running raid4/raid5 array always has mddev->dev_sectors >= one chunk. The check is done where the value takes effect, not where it is assigned. mddev->dev_sectors is written from several places, and none of them can tell whether the value is usable: the chunk size may still change later. raid5_run() and raid5_resize() are where every input is final, so one check in each covers them all. Fixes: eea136d69f9f ("md: fix buglet in RAID5 -> RAID0 conversion.") Reported-by: syzbot+50f9bc7ab8eb224b7629@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=50f9bc7ab8eb224b7629 Signed-off-by: Zizhi Wo Link: https://patch.msgid.link/20260916095137.1157801-1-wozizhi@huaweicloud.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit e12457f33c3a5bd1270db85b05bf97a75c273680 Author: Zhihao Cheng Date: Tue Sep 15 16:17:31 2026 +0800 md/raid5: setup_conf: Fix null-ptr-def in error handling path [ Upstream commit eba5f518701b1c7f2d883504f89c41611bd2de46 ] For raid5 setup_conf, if an error(eg. bioset_init fails) happens before 'conf->mddev = mddev', following error handling path could trigger a null-ptr-def problem: free_conf log_exit raid5_has_ppl test_bit(MD_HAS_PPL, &conf->mddev->flags) // conf->mddev is NULL ! Fix it by initializing conf->mddev in advance. Fixes: 3418d036c81d ("raid5-ppl: Partial Parity Log write logging implementation") Signed-off-by: Zhihao Cheng Link: https://patch.msgid.link/20260915081731.122933-1-chengzhihao1@huawei.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 14ddbcd6827b0ef354e989d85b36e3e1bb400ec0 Author: Chen Cheng Date: Fri Sep 11 12:15:21 2026 +0800 md/raid5: reject raid4/5 arrays with too few disks [ Upstream commit 0d9bbbb6fafa22659ccd4d7ab94329a43c2632d0 ] raid4 and raid5 require at least two disks, while raid6 requires at least four disks. setup_conf() only rejects raid6 arrays with fewer than four disks. As a result, an invalid raid4 or raid5 array can be assembled with no data disks and later reach raid5_set_limits(). Reject such arrays before the r5conf is created. This prevents the invalid geometry from reaching queue limit setup, where roundup_pow_of_two() can be called with a zero stripe size. Reported-by: syzbot+de94ddbfff0c9e6fe030@syzkaller.appspotmail.com Closes: https://lore.kernel.org/r/6a778c82.01d0871a.3a0d52.006a.GAE@google.com/ Fixes: f63f17350e53 ("md/raid5: use the atomic queue limit update APIs") Signed-off-by: Chen Cheng Link: https://patch.msgid.link/20260911041521.2433222-1-chencheng@fnnas.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit fa4122799a5bff6902848eafa00dc8e245ba261f Author: Yogesh Gaur Date: Thu Sep 10 18:41:03 2026 +0530 md/raid5: don't BUG() on an inconsistent reshape state from the superblock [ Upstream commit 0669c7dbd1d375f279e607a24addc2f1dae2d4f3 ] raid5_run() branches on mddev->reshape_position. When it is MaxSector -- no reshape in progress -- the else branch asserts that nothing else describes one: BUG_ON(mddev->level != mddev->new_level); BUG_ON(mddev->layout != mddev->new_layout); BUG_ON(mddev->chunk_sectors != mddev->new_chunk_sectors); BUG_ON(mddev->delta_disks != 0); Nothing enforces that invariant. Both superblock validators copy the reshape fields straight off disk without cross-checking them against each other: super_1_validate() takes reshape_position, delta_disks, new_level, new_layout and new_chunk from the superblock whenever MD_FEATURE_RESHAPE_ACTIVE is set, and super_90_validate() does the same for minor version 91. A superblock that sets the reshape feature while leaving reshape_position at the MaxSector sentinel therefore reaches the else branch with a non-zero delta_disks, and assembling the array takes the machine down: kernel BUG at drivers/md/raid5.c:8117! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI RIP: 0010:raid5_run+0x11a7/0x1670 drivers/md/raid5.c:8117 Call Trace: md_run+0xc2f/0x2510 drivers/md/md.c:6779 do_md_run+0x36/0x660 drivers/md/md.c:6880 array_state_store+0x9c5/0xcf0 drivers/md/md.c:4765 md_attr_store+0x1c5/0x330 drivers/md/md.c:6158 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 This is reachable by anyone who can present an md superblock, so BUG() is the wrong response. Refuse to start the array instead, the way the reshape_position != MaxSector branch a few lines above already refuses a reshape it cannot resume. Nothing has been allocated at this point -- the journal-and-bitmap check just above returns -EINVAL the same way -- so there is nothing to unwind. Reported-by: syzbot+1f5a7de91d547763f4c8@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=1f5a7de91d547763f4c8 Fixes: 91adb56473fe ("md/raid5: refactor raid5 "run"") Assisted-by: LLM Signed-off-by: Yogesh Gaur Link: https://patch.msgid.link/20260910131103.988-1-yogeshgaur.83@gmail.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 0356cb78b5aa6491c8d227e313527e0787ce8afe Author: Chandradhar Kumar Date: Mon Sep 7 18:59:36 2026 +0530 md/raid0: validate device count before allocating devlist [ Upstream commit cf5963d6781ddee4c59a61debc459fcc7580f7b6 ] create_strip_zones() allocates conf->devlist based on mddev->raid_disks before verifying that number of devices matches raid_disks. Move the existing device count validation before allocation to reject invalid configurations before attempting a potentially excessive allocation. Fixes: 078d1d8e688d ("md/raid0: use kvzalloc/kvfree for strip_zone and devlist allocations") Reported-by: syzbot+a32ff75e417c0f49a8e9@syzkaller.appspotmail.com Closes: https://syzbot.org/bug?extid=a32ff75e417c0f49a8e9 Signed-off-by: Chandradhar Kumar Link: https://patch.msgid.link/20260907132936.6677-1-chandradhar.2003@gmail.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit b8d33418991fa5090962bf73bda68e776bd77e40 Author: Jérémy Jean Date: Thu Aug 20 21:07:03 2026 +0000 md: reject v0.90 arrays with too many devices [ Upstream commit 1a33a379e67853d6d778e6e80b214bdf1208f6f8 ] The v0.90 superblock has room for MD_SB_DISKS device descriptors, but super_90_load() only rejects nonpositive raid_disks values. A crafted superblock can therefore copy a larger value into mddev->raid_disks. When metadata is next updated, super_90_sync() walks sb->disks[] up to that count and reads and writes beyond the 4 KiB superblock buffer. A checksum-valid RAID1 member advertising 64 devices can be assembled by mdadm --incremental --run. The first write to the array then produces out-of-bounds writes from super_90_sync() under KASAN. Reject device counts that cannot be represented by the v0.90 format while loading the superblock. Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Link: https://patch.msgid.link/20260820210703.3035608-2-Jeremy.Jean@oss.cyber.gouv.fr Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 83d0ea5c10242f34a238ee1858161a2634541ce1 Author: Zizhi Wo Date: Mon Aug 17 11:33:40 2026 +0800 md/raid10: fix missing wakeup in wait_barrier_nolock [ Upstream commit f00eb0ff45793383d5a62db2d2aea63ada0ccdbd ] Fuzz testing triggered a hung raid10d thread: INFO: task md0_raid10 blocked for more than 120 seconds. Call Trace: raid10d md_thread kthread wait_barrier_nolock() speculatively increments nr_pending. If a concurrent writer changes resync_lock's sequence, it rolls the count back with atomic_dec_and_test(). The rollback currently wakes wait_barrier only when nr_pending reaches zero. freeze_array() can be waiting for nr_pending == nr_queued + extra while array_freeze_pending is set. If the rollback changes nr_pending from 2 to 1, the condition becomes true but no wakeup is sent, leaving raid10d blocked indefinitely. Also wake wait_barrier when array_freeze_pending is set, matching allow_barrier(). Fixes: b9b083f9044a ("md/raid10: convert resync_lock to use seqlock") Signed-off-by: Zizhi Wo Reviewed-by: Abd-Alrhman Masalkhi Link: https://patch.msgid.link/20260817033340.418119-3-wozizhi@huawei.com Signed-off-by: Yu Kuai Signed-off-by: Sasha Levin commit 3ff89b25b33b91997fc87b2741e181a524b3a93f Author: Alexei Starovoitov Date: Wed Sep 16 23:24:07 2026 +0000 selftests/bpf: Wait for links to come up in lwt_ip_encap [ Upstream commit 71b75648d1a21c0a6379741d00f41086ec95f14a ] lwt_ip_encap creates three fresh netns with veth pairs across them and then immediately pings over IPv6. The peer ends of the first veth pair end up with the same ifindex in their respective netns, so linkwatch does not treat the carrier-on as urgent and may deliver NETDEV_CHANGE up to one second later. Until that happens addrconf considers the link not ready: no ff00::/8 multicast route and no link-local address are installed, and the neighbour solicitation for the next hop is dropped as a no-route packet. The NS retransmit a second later succeeds, but ping -W1 has already given up: check_ping_ok:FAIL:ip netns exec ns-lwt-ip-encap-1-... ping -6 -c 1 -W1 -I veth1 fb04::1 > /dev/null unexpected error: 256 (errno 2) lwt_ip_encap:FAIL:ping OK unexpected error: -1 (errno 2) #226/1 lwt_ip_encap_ipv4/egress:FAIL This reproduces reliably when the test is run standalone on an idle system where setup completes well within a second. The original shell script had a "sleep 1 # reduce flakiness" after setup which was lost in the conversion to test_progs. Instead of sleeping, poll SIOCGIFFLAGS for IFF_RUNNING on all veths at the end of setup_network() so traffic is only sent once every link is operationally up. Fixes: f5e288943e2c ("selftests/bpf: Move test_lwt_ip_encap to test_progs") Signed-off-by: Alexei Starovoitov Reviewed-by: Emil Tsalapatis Link: https://patch.msgid.link/20260916232407.764886-1-alexei.starovoitov@gmail.com Signed-off-by: Sasha Levin commit 96f269ae4b18dd0819d70fab7ddaabf6e28c7de6 Author: Abdelnasser Hussein Date: Tue Sep 15 10:59:39 2026 +0300 staging: iio: adc: ad7816: Fix DMA safety issues in SPI transfers [ Upstream commit 69fa76f0af3414cc189c3b0b807cb59e327ecc00 ] The SPI operations in this driver are not DMA safe: 1. spi_read() uses a stack-allocated buffer. 2. spi_write() in ad7816_spi_read() uses a struct member that shares a cacheline with other variables. 3. spi_write() in ad7816_spi_write() passes a stack parameter by reference. Fix these violations by replacing all spi_read() and spi_write() calls with spi_write_then_read(). This safely handles DMA by internally allocating a bounce buffer for the transfers, avoiding cacheline sharing issues without needing dedicated aligned buffers. This implicitly corrects the size argument in read to sizeof(buf). Fixes: 7924425db04a ("staging: iio: adc: new driver for AD7816 devices") Signed-off-by: Abdelnasser Hussein Reviewed-by: Joshua Crofts Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit d400fcf4c002cd9a4f0eed87a645f11f53d7aba7 Author: Bart Van Assche Date: Mon Aug 31 10:48:21 2026 -0700 scsi: pm8001: Fix SATA FIS offset in struct hw_event_resp [ Upstream commit cdc97921de02a0c1a8324afa03e8b3e30a72bbe6 ] In struct hw_event_resp, sas_identify was defined using struct sas_identify_frame, which is 32 bytes long because it includes a 4-byte CRC field. However, PM8001 and PM80xx hardware does not send the CRC in the event response frame, providing only the 28-byte identify payload. Because sas_identify had a size of 32 bytes, the following sata_fis member was located at byte offset 44 instead of the actual hardware offset 40. In hw_event_sata_phy_up(), this discrepancy was worked around with negative pointer arithmetic: ((u8 *)&pPayload->sata_fis - 4). This triggers a compiler error under Clang with -Wstringop-overread: error: 'memcpy' reading 20 bytes from a region of size 0 [-Werror,-Wstringop-overread] memcpy(phy->frame_rcvd, ((u8 *)&pPayload->sata_fis - 4), Move struct sas_identify_frame_local (28 bytes) into pm8001_defs.h, and update struct hw_event_resp in both pm8001_hwi.h and pm80xx_hwi.h to use struct sas_identify_frame_local followed by sata_fis and a 4-byte padding word. This correctly aligns sata_fis at byte offset 40 while maintaining the 64-byte total payload size. Update hw_event_sata_phy_up() in pm8001_hwi.c and pm80xx_hwi.c to copy directly from &pPayload->sata_fis. Compile-tested only. Both the patch and its description have been generated by Gemini. Fixes: dbf9bfe61571 ("[SCSI] pm8001: add SAS/SATA HBA driver") Fixes: f5860992db55 ("[SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files") Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/31963d53810f42970447e78ef46030ab13d2e91f.1788198434.git.bvanassche@acm.org Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 594e936007055a71b03be5eb5d45d18065c01f27 Author: Ihor Solodrai Date: Wed Sep 16 12:52:03 2026 -0700 x86/cpu: Don't transiently clear the boot CPU's capabilities [ Upstream commit 2711d67bc3a776abcfc651ad87be5d29ada19166 ] On the boot CPU, identify_cpu() runs from arch_cpu_finalize_init(), with interrupts enabled and before alternatives are patched. So cpu_feature_enabled() still evaluates against boot_cpu_data. identify_cpu() rebuilds c->x86_capability from scratch: the reset zeroes the array and the CPUID rescan fills it in again. An interrupt delivered in that window finds X86_FEATURE_LA57 clear in boot_cpu_data, so pgtable_l5_enabled() is false and KASAN checks a 5-level address against the 4-level addressability limit. The result is a bogus "wild-memory-access" report, and under kasan_multi_shot a report storm that wedges the boot. The boot CPU has already been scanned by early_identify_cpu(), with interrupts disabled, and its capabilities cannot have changed since. Reset only the CPUs which have not been scanned yet. The window is as old as identify_cpu() rebuilding the capabilities. Commit 39b9552281ab ("x86/mm: Optimize boot-time paging mode switching cost") merely let KASAN notice it by making pgtable_l5_enabled() read the feature bit. So no Fixes: tag. Closes: https://lore.kernel.org/bpf/20260610175651.647515-1-ihor.solodrai@linux.dev/ Signed-off-by: Ihor Solodrai Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260916195203.1099646-6-ihor.solodrai@linux.dev Signed-off-by: Sasha Levin commit 6ecdbbac2c7fcd728f294fae2405f1eb35d10f1e Author: Ihor Solodrai Date: Wed Sep 16 12:52:01 2026 -0700 x86/cpu: Inline generic_identify() into identify_cpu() [ Upstream commit ad86fe2134ccdc97a967693d2723a731c99fb7bc ] generic_identify() has exactly one call site: at the top of identify_cpu(). Fold it into identify_cpu() so that a single function does the job for both the boot CPU and the secondary CPUs. While at it, fix up both copies of the Cyrix comment. No functional changes. Signed-off-by: Ihor Solodrai Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260916195203.1099646-4-ihor.solodrai@linux.dev Stable-dep-of: 2711d67bc3a7 ("x86/cpu: Don't transiently clear the boot CPU's capabilities") Signed-off-by: Sasha Levin commit 6621d3ab37f03a78da10ac50035465a207963ba1 Author: Ihor Solodrai Date: Wed Sep 16 12:51:59 2026 -0700 x86/cpu: Factor init_cpu_info() out of identify_cpu() [ Upstream commit 54a2882ab9f75ab8a77a4f113145d4d709d2387c ] identify_cpu() unconditionally resets the struct cpuinfo_x86 fields to their default values and clears the capability arrays with memset() before rescanning the CPU to fill it in again. However the boot CPU capabilities have already been scanned by early_identify_cpu(), with interrupts disabled. Introduce init_cpu_info() helper in preparation for letting the callers decide whether the reset is needed. No functional changes. Signed-off-by: Ihor Solodrai Signed-off-by: Borislav Petkov (AMD) Link: https://patch.msgid.link/20260916195203.1099646-2-ihor.solodrai@linux.dev Stable-dep-of: 2711d67bc3a7 ("x86/cpu: Don't transiently clear the boot CPU's capabilities") Signed-off-by: Sasha Levin commit 7e79f0a2da50e167b4ddb6b800a9a83a4b0a1585 Author: Ștefan Ghețu Date: Tue Sep 8 20:07:40 2026 +0300 ASoC: SOF: imx: Prevent stack OOB read in DSP panic dump [ Upstream commit 48ed992bfbe53537ad1cbc8ad68f7031e7ac0af3 ] Commit 58bb5081cba1 ("ASoC: SOF: Xtensa: dump ar registers to restore call stack") added a shared Xtensa helper that iterates over a flexible array of AR registers (`ar[]`) controlled by `plat_hdr.numaregs`. While Intel IPC4 allocates dynamic storage for the AR block, the i.MX IPC3 path reads the oops message into a stack-allocated struct without backing storage for `ar[]`, while leaving `numaregs` unvalidated. This causes a stack out-of-bounds read when printing a DSP panic. Clear `numaregs` to 0 on i.MX since the AR block is not fetched or supported on this platform, preventing unsafe out-of-bounds memory accesses in the shared Xtensa helper. Fixes: 58bb5081cba1 ("ASoC: SOF: Xtensa: dump ar registers to restore call stack") Signed-off-by: Ștefan Ghețu Link: https://patch.msgid.link/20260908170740.276800-1-stefanghetu9@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6fac281f491a6dfbc663820c154f60082b311ab9 Author: Pengpeng Hou Date: Sun Aug 30 22:21:18 2026 +0800 ASoC: rt1015: make control calibration failures observable [ Upstream commit 98fe8aab04cec6fcadeb10a757235225d550be36 ] The bypass-boost control runs a hardware calibration while bypassing the register cache. It ignores every register access and cache restore failure, then publishes both the requested mode and calibration completion. Return failures from the complete calibration sequence, always restore normal cache operation and unlock DAPM, and only publish the control state after the calibration and final mode write both succeed. The mixer control callback is an effective error consumer, independent of deferred component resume. Fixes: da145172b236 ("ASoC: rt1015: Fix DC calibration on bypass boost mode") Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260830142118.36668-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b4ef56f7ebf617d2ca92360f816a12ddb25e5860 Author: Karl Mehltretter Date: Sat Sep 5 10:02:35 2026 +0200 pinctrl: stm32: Drop the nonexistent CONFIG_MACH_STM32MP25 from the STM32MP257 default [ Upstream commit 01f20711d044f35a7a89ceec33df30e097147e8a ] Commit 619f8ca4a73d ("pinctrl: stm32: add stm32mp257 pinctrl support") made CONFIG_PINCTRL_STM32MP257 default to MACH_STM32MP25, following the MACH_* pattern of the arm32 entries above it, but no Kconfig symbol of that name exists and git log -S finds no Kconfig file that ever defined one: the STM32MP25 family is arm64 only, where CONFIG_ARCH_STM32 covers it. Commit dba0aff2b89b ("pinctrl: stm32: Allow compile as module for stm32mp257") added "|| (ARCH_STM32 && ARM64)" next to it, so the first half now evaluates to n and changes no configuration. Drop the first half. Fixes: 619f8ca4a73d ("pinctrl: stm32: add stm32mp257 pinctrl support") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Antonio Borneo Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit 0c50f040324429c49ace4125fcd3abb21f61048a Author: Alison Schofield Date: Fri Aug 7 17:05:51 2026 -0700 cxl/port: Bound switch decoder target array access by nr_targets [ Upstream commit 4e42c398af136d62fac8c19c9f410ec83a8dd34a ] Switch decoder target lookups walk the target array using interleave ways as the bound. The array is allocated with nr_targets entries, so a decoder whose interleave ways exceeds nr_targets reads and writes past the end of it. That happens during dport activation, during decoder target population, and when userspace reads the target_list attribute. Bounding by nr_targets alone is not correct either. Commit d6488fee6647 ("cxl/port: Fix decoder initialization when nr_targets > interleave_ways") moved target population to interleave ways precisely so that targets a decoder does not use are left unpopulated. Neither field alone is a safe bound, so add a helper that returns the minimum of the two and use it at every walk of the target array. Valid configurations keep interleave ways within nr_targets, so this is not a behavior change for them. Fixes: 40ba17afdfab ("cxl/acpi: Introduce cxl_decoder objects") Fixes: d6488fee6647 ("cxl/port: Fix decoder initialization when nr_targets > interleave_ways") Signed-off-by: Alison Schofield Reviewed-by: Li Ming Link: https://patch.msgid.link/d7577652cc6d414e1de0ee4045d4d6b2808172ce.1786143520.git.alison.schofield@intel.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 7d1469c8ff0a3e59e6b51bc2199a0ddca259c66d Author: Alison Schofield Date: Fri Aug 7 17:05:50 2026 -0700 cxl/hdm: Restore commit_end when decoder enumeration fails [ Upstream commit 7dae18c39e99813461db6ef3fc13f077452109ce ] commit_end tracks the highest committed decoder on a port. It gets advanced before decoder enumeration is complete, so a later failure leaves it pointing at a decoder that was never added. The next probe then rejects decoder0 as out of order and enumeration fails. Reset commit_end to the uncommitted baseline once the decoders are torn down, so a subsequent probe rebuilds it from scratch. Register the reset before the decoders are added so that on unwind it runs after every decoder has been unregistered. This prevents commit_end from dropping below the highest committed decoder still registered and exposing an inconsistent value to a concurrent reader. Protect the commit_end advance in the DVSEC emulation path against concurrent readers, matching the register-programmed path. Fixes: 176baefb2eb5 ("cxl/hdm: Commit decoder state to hardware") Fixes: b777e9bec960 ("cxl/hdm: Emulate HDM decoder from DVSEC range registers") Reviewed-by: Jonathan Cameron Reviewed-by: Dave Jiang Reviewed-by: Li Ming Reviewed-by: Richard Cheng Signed-off-by: Alison Schofield Link: https://patch.msgid.link/4802c5abc906b858a4754bfc4fa3e4c2c455d0c3.1786143520.git.alison.schofield@intel.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit b8d7a27c745e233feb34e3d235aad7f8a727a240 Author: Alison Schofield Date: Fri Aug 7 17:05:49 2026 -0700 cxl/hdm: Make switch decoder target parsing endian-safe [ Upstream commit 3f846646b3d3b5699139e686e1107d231a725860 ] Switch decoder target IDs are stored one per byte, starting with target 0 in the least significant byte. The current code accesses those bytes in memory order, which only matches register order on little-endian hosts. On big-endian hosts, the target IDs are reversed and the decoder is associated with the wrong downstream ports. Place the register values in a byte array in little-endian order and index the target IDs from there, so the target mapping is independent of host endianness. Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core") Signed-off-by: Alison Schofield Reviewed-by: Li Ming Link: https://patch.msgid.link/b0526825b3c3ffdb78837563e178d9aa27b6bbb8.1786143520.git.alison.schofield@intel.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 32833685fe18f9de96bf3ae674a5123c750245f8 Author: Alison Schofield Date: Fri Aug 7 17:05:48 2026 -0700 cxl/hdm: Reject switch decoder interleave ways that overflow targets [ Upstream commit 3696326ca14cf018788d64232a068fdf26b1ff31 ] Switch decoder enumeration validates that the interleave ways encoding is legal, but not that the resulting number of ways fits the available targets. This can overrun the target array (target_list.target_id[]) during enumeration of 12 or 16 way interleaves. Bound the target count where it is established rather than at each use. Reject an HDM capability whose reported target count is zero or exceeds the target list register capacity, and reject a zero target switch decoder allocation in cxl_switch_decoder_init(). Enumeration is then left with a single check: reject a decoder whose interleave ways exceed the targets it has. Add a clarifying comment that target_count is a direct count, not 0-based like decoder_count. Link: https://sashiko.dev/#/patchset/20260711180755.1779002-1-alison.schofield@intel.com?part=1 Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core") Tested-by: Davidlohr Bueso Reviewed-by: Davidlohr Bueso Reviewed-by: Richard Cheng Signed-off-by: Alison Schofield Reviewed-by: Li Ming Link: https://patch.msgid.link/af094094813d7f51d86cbf608936270b7d85526e.1786143520.git.alison.schofield@intel.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit f8ec25238b41dea62f5a4efabda25cb390221053 Author: Slavin Liu Date: Sun Sep 13 20:51:23 2026 +0800 ACPI: tables: handle failed initrd override mappings [ Upstream commit 047c834d939df75386cfc0603c7ddeaa23a349a4 ] The runtime AML table-loading path can invoke initrd override after permanent mappings are enabled. Mapping bookkeeping can then fail. Return AE_NO_MEMORY in that case to prevent a NULL pointer dereference when attempting to read the table length. Detected by static analysis and reviewed with AI-assisted source auditing. Fixes: b2a35003dfbc ("ACPI: Implement physical address table override") Assisted-by: LLM Signed-off-by: Slavin Liu [ rjw: Added empty code line after conditional, changelog edits ] Link: https://patch.msgid.link/20260913125123.109803-1-bolin.liu@seu.edu.cn Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 4c848b796baf2d8c67b8de1337d190764fa372b0 Author: Chen-Yu Tsai Date: Wed Sep 16 11:59:51 2026 +0800 arm64: dts: mediatek: mt8173: Fix MFG_ASYNC power domain clock [ Upstream commit c9b3c82c9f1f86cdb2449d47e4ca66a19159ee12 ] The MFG_ASYNC domain, which is likely associated to the whole MFG block, currently specifies clk26m as its domain clock. This is bogus, since the clock is an external crystal with no controls. Also, the MFG block has a independent CLK_TOP_AXI_MFG_IN_SEL clock, which according to the block diagram, gates access to the hardware registers. Having this one as the domain clock makes much more sense. This also fixes access to the MFGTOP registers. Change the MFG_ASYNC domain clock to CLK_TOP_AXI_MFG_IN_SEL. Fixes: 8b6562644df9 ("arm64: dts: mediatek: Add mt8173 power domain controller") Reviewed-by: AngeloGioacchino Del Regno Tested-by: Icenowy Zheng Signed-off-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Sasha Levin commit b698b133d521ae029588fa5dd553e6e9d291d197 Author: Aleksander Jan Bajkowski Date: Wed Sep 2 22:54:28 2026 +0200 crypto: eip93 - fix ssl mac bit field definition [ Upstream commit 8f808c8f32b67d42ba97457a7054bd5954d02856 ] Checked the register definitions with the documentation[1]. Turns out that the EIP93_SA_CMD_SSL_MAC bit field has a bad value. It's used in SSL offload mode. This driver doesn't support SSL offload yet, so this causes no problems. 1. MT7621 ProgrammingGuide DMA Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support") Signed-off-by: Aleksander Jan Bajkowski Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 39de0852969d962ab8bfedba6b080a3b224021fc Author: Konrad Dybcio Date: Wed Sep 9 18:41:55 2026 +0200 interconnect: qcom: icc-rpm: Don't skip small votes [ Upstream commit 40ea86fa389cf7fbc2280bebef353c36b1ec9b94 ] Small votes (such as 1 or 100) can end up being rounded down to 0 midway through the calculations. Use qcom_bw_div() when dividing to prevent that. Assisted-by: LLM Fixes: 30c8fa3ec61a ("interconnect: qcom: Add MSM8916 interconnect provider driver") Signed-off-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-2-6dc5b5e97626@oss.qualcomm.com Signed-off-by: Georgi Djakov Signed-off-by: Sasha Levin commit 4f2e46660cb5c13967b7d259862525861dfc57a2 Author: Konrad Dybcio Date: Wed Sep 9 18:41:54 2026 +0200 interconnect: qcom: Move bcm_div() to common code [ Upstream commit 51797517fab74cba616b4932cbc2348c0fc04192 ] This helper is useful for both SMD_RPM and RPMH code, extract it. Assisted-by: LLM Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Reviewed-by: Dmitry Baryshkov Link: https://patch.msgid.link/20260909-topic-icc_rpm_smd_qol-v1-1-6dc5b5e97626@oss.qualcomm.com Signed-off-by: Georgi Djakov Stable-dep-of: 40ea86fa389c ("interconnect: qcom: icc-rpm: Don't skip small votes") Signed-off-by: Sasha Levin commit 1696da5b9b1a1911f6fb6e6efe3be1fa9c36a7f7 Author: Sarthak Sharma Date: Tue Sep 1 14:04:52 2026 +0530 mm/gup_test: report actual pinned bytes [ Upstream commit 65a79b9b693d8c7bd7e5e4865c02cce922a7cc50 ] __gup_test_ioctl() advances addr to the end of the current batch before checking if GUP pinned the entire requested batch. If GUP pins more than 0 pages but less than the requested batch size, addr still advances by the requested batch size. The next iteration detects the partial pinning and breaks out of the loop. Again gup->size is calculated using addr - gup->addr, so it also includes the unpinned pages of the requested batch. Calculate gup->size using the actual number of pages pinned multiplied by PAGE_SIZE. Fixes: 64c349f4ae78 ("mm: add infrastructure for get_user_pages_fast() benchmarking") Reviewed-by: Kiryl Shutsemau (Meta) Signed-off-by: Sarthak Sharma Link: https://patch.msgid.link/20260901083452.115365-3-sarthak.sharma@arm.com Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Sasha Levin commit 4f5193b18a91a7efd224187c5ac49955f7f008c8 Author: Sarthak Sharma Date: Tue Sep 15 15:55:24 2026 +0530 mm/gup_test: safely calculate GUP batch size [ Upstream commit 44817a536aaa5bfac0d316242e93e489d0a69d5f ] __gup_test_ioctl() calculates the end of a GUP batch using: next = addr + nr * PAGE_SIZE; If nr is too large, it can cause next to overflow and wrap around. If it wraps, the next > end check is bypassed and a large value of nr is passed to the GUP call, even though the pages array was allocated according to gup->size. This can lead to out of bounds writes. Also, when fewer than PAGE_SIZE bytes remain, the calculated batch contains zero pages. The code still calls GUP functions with pages + i, which can point past the allocated array. Calculate nr by taking the minimum of the number of pages per call and the pages remaining in the address range. Reject zero sized and non page aligned gup->size values and zero nr_pages_per_call value. Fixes: 64c349f4ae78 ("mm: add infrastructure for get_user_pages_fast() benchmarking") Reviewed-by: Kiryl Shutsemau (Meta) Signed-off-by: Sarthak Sharma Link: https://patch.msgid.link/20260915102524.125758-1-sarthak.sharma@arm.com Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Sasha Levin commit 739d980d2c28c14715e75f94d31676f7de09475f Author: Baolin Liu Date: Tue Jun 30 08:59:55 2026 +0800 fs/ntfs3: reject FS_IOC_SETFSLABEL on readonly mounts [ Upstream commit 5d3e03b70d05162ca49830efcd8b1cd2746a86a3 ] FS_IOC_SETFSLABEL does not check for readonly mounts and can report success without persisting the label change. Return -EROFS on readonly mounts. Fixes: 21dc07ac9c25 ("ntfs3: add FS_IOC_SETFSLABEL ioctl") Signed-off-by: Baolin Liu Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit 5193cdc5e113df0198d1074fd268fc3c8e912284 Author: Weiming Shi Date: Thu Jun 25 05:07:42 2026 -0700 ntfs3: fix out-of-bounds read in ntfs_read_mft() [ Upstream commit 7a374d9be8267834dc534e55f01e5e01765cab4c ] ntfs_read_mft() walks the attributes of an MFT record and, for each FILE_NAME attribute, compares the resident on-disk name with the name being looked up. The only size check before the compare is rsize >= SIZEOF_ATTRIBUTE_FILENAME, which covers the fixed header up to and including name_len, but not the variable-length name that follows it. name_len comes straight from disk and is not validated against the resident data_size. A crafted image can set name_len large while keeping data_size at the header size, so ntfs_cmp_names_cpu() reads name_len le16 characters past the end of the MFT record buffer: BUG: KASAN: slab-out-of-bounds in ntfs_cmp_names_cpu (fs/ntfs3/upcase.c:84) Read of size 2 at addr ffff888031879c00 by task a.out ntfs_cmp_names_cpu (fs/ntfs3/upcase.c:84) ntfs_iget5 (fs/ntfs3/inode.c:209) dir_search_u (fs/ntfs3/dir.c:265) ntfs_lookup (fs/ntfs3/namei.c:85) __lookup_slow (fs/namei.c:1915) lookup_slow (fs/namei.c:1932) path_lookupat (fs/namei.c:2278) vfs_statx (fs/stat.c) vfs_fstatat (fs/stat.c) __do_sys_newfstatat (fs/stat.c) Allocated by task: mi_init (fs/ntfs3/record.c) ntfs_iget5 (fs/ntfs3/inode.c) dir_search_u (fs/ntfs3/dir.c) ntfs_lookup (fs/ntfs3/namei.c) Check that the name fits in the resident data before using it. Fixes: 82cae269cfa9 ("fs/ntfs3: Add initialization of super block") Reported-by: Xiang Mei Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Weiming Shi Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit de195f053386fb9f8b3defacb2a95cb38a9ca008 Author: Nitesh Venkatesh Date: Mon Aug 31 06:32:33 2026 +0000 crypto: qat - allow KPT disable when service is not asym [ Upstream commit f66452a888e60fec5046c7fbdea1da1fcdaff98b ] The KPT (Key Protection Technology) enable sysfs attribute rejects any write when the currently enabled service is not 'asym', including writes that disable KPT. This blocks a legitimate recovery flow: 1. Configure the 'asym' service and enable KPT. 2. Bring the device up, then down. 3. Reconfigure the service to 'sym' and bring the device up. 4. KPT is still reported as enabled, but is not active because the asymmetric service is no longer configured. 5. Bring the device back down so the KPT enable attribute becomes writable. 6. Writing '0' to the KPT enable attribute to clear the stale flag fails with: "KPT can only be enabled when the asymmetric service is enabled" The asym-service check is only meaningful when enabling KPT; disabling must always be permitted so a stale enable flag can be cleared after the service configuration has changed. Parse the user-supplied boolean before the service check and gate the check on the enable direction. Disable requests are now accepted regardless of the currently configured service, provided the device is in the down state (which the attribute already requires for any write). Fixes: fb98254a5eb9 ("crypto: qat - add KPT support for GEN6 devices") Signed-off-by: Nitesh Venkatesh Reviewed-by: Giovanni Cabiddu Reviewed-by: Ahsan Atta Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 3c4b0c3f8cb95dff1366a215172670623e2e60e4 Author: Luka Gejak Date: Wed Sep 9 09:45:53 2026 +0200 wifi: rtw88: sdio: zero the padding added to a TX transfer [ Upstream commit b81ead28aeb1fd9bc3b0de4e20342b6b538ac658 ] rtw_sdio_write_port() rounds the transfer up with sdio_align_size() and then hands that length to sdio_memcpy_toio() while the skb still only holds skb->len bytes. The difference, between one and 511 bytes, is read from beyond the end of the frame and transmitted. Whether it stays inside the skb's allocation depends on how much tailroom the skb happens to have, so this is at best sending uninitialised memory over the air. Pad the skb up to the transfer size first. __skb_pad() zeroes the added bytes, reallocates a cloned skb rather than writing into a buffer a clone still shares, and leaves skb->len alone, so nothing else in the transmit path has to change. It must not free the skb on failure: rtw_sdio_write_data() frees the skb itself and rtw_sdio_process_tx_queue() requeues it, so both callers still own it and would double free. Found while reworking this path for the RTL8723BS. Measured on RTL8723BS hardware, padding the transfer costs about 2% observable over transfer: uplink is 19.5 to 19.8 Mbit/s padded against 20.9 to 21.1 Mbit/s unpadded in an interleaved A/B, with scans, reconnection and a UDP flood clean in both. The other SDIO parts sharing this path are untested; I have only the RTL8723BS. Fixes: 65371a3f14e7 ("wifi: rtw88: sdio: Add HCI implementation for SDIO based chipsets") Signed-off-by: Luka Gejak Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260909074556.55709-5-luka.gejak@linux.dev Signed-off-by: Sasha Levin commit 112ca76f4b121af9733c915acc526efa5462294a Author: Xueqin Luo Date: Tue Aug 11 10:21:15 2026 +0800 platform/x86: Add ACPI_COMPANION() NULL check in topstar_acpi_probe [ Upstream commit 17d0f874b1f8774c61ad495a4ad20ed8c829dfae ] Add NULL check for ACPI_COMPANION() in topstar_acpi_probe() to prevent NULL pointer dereference when driver_override matches a device without ACPI companion. Fixes: 3471415c8186 ("platform/x86: topstar-laptop: Convert ACPI driver to a platform one") Signed-off-by: Xueqin Luo Reviewed-by: Rafael J. Wysocki Link: https://patch.msgid.link/20260811022115.338595-1-luoxueqin@kylinos.cn Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 100c0e14fdbb2f89019167b8ab0462cc12a26a93 Author: Marco Scardovi Date: Wed Aug 5 20:28:08 2026 +0200 platform/x86: asus-armoury: Prevent disabling dGPU when in use [ Upstream commit b3f06a74fea6f1ddec192dfece8e52053d0b6c57 ] Check ASUS_WMI_DEVID_DGPU_POWER_STATE before attempting to disable the discrete GPU in dgpu_disable_current_value_store(). Return -EBUSY if the dGPU is currently active and in use. Fixes: f99eb098090e ("platform/x86: asus-armoury: move existing tunings to asus-armoury module") Suggested-by: Denis Benato Signed-off-by: Marco Scardovi Link: https://patch.msgid.link/20260805183131.3075-4-scardracs@disroot.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit 42a3967f295c484c0bd683d33a0123ba949319e9 Author: Marco Scardovi Date: Wed Aug 5 20:28:06 2026 +0200 platform/x86: asus-wmi: Add ASUS_WMI_DEVID_DGPU_POWER_STATE define [ Upstream commit b39c54c59e4e9afaac37d0370b776660ba86cbae ] Add WMI device ID 0x00120097 (ASUS_WMI_DEVID_DGPU_POWER_STATE) to the asus-wmi platform header. This device ID is used on ASUS ROG laptops to query the discrete GPU (dGPU) power state level. Suggested-by: Denis Benato Signed-off-by: Marco Scardovi Link: https://patch.msgid.link/20260805183131.3075-2-scardracs@disroot.org Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Stable-dep-of: b3f06a74fea6 ("platform/x86: asus-armoury: Prevent disabling dGPU when in use") Signed-off-by: Sasha Levin commit 50b91bfc694f5ddd0dba69e09021fe9840c89323 Author: Guangshuo Li Date: Wed Jul 8 11:26:47 2026 +0800 platform/x86/intel/vsec: reset state before re-enumerating [ Upstream commit ee26050614d02397eb743854d718689dcaf1889b ] The change referenced by the Fixes tag split the VSEC enumeration logic out of intel_vsec_pci_probe() and made PCIe error recovery call intel_vsec_pci_init() directly. This avoids another pcim_enable_device() devm action and another devm allocation during slot reset, but it also means that error recovery reuses the priv structure allocated by probe. On the initial probe, priv is zeroed by devm_kzalloc(), so state[], suppliers[] and found_caps start from their initial values. During slot reset, the existing aux devices are removed before re-enumerating, but the reused priv still records the old devices as registered and the old capabilities as found. The next intel_vsec_pci_init() call can therefore short-circuit in intel_vsec_register_device() with -EEXIST, or stop early because found_caps already matches info->caps. The aux devices removed during slot reset are then not recreated, leaving VSEC functionality missing after PCIe error recovery. Reset the VSEC registration state after removing the old aux devices and before re-enumerating them. Fixes: 348ccc754d89 ("platform/x86/intel/vsec: Fix enable_cnt imbalance on PCIe error recovery") Signed-off-by: Guangshuo Li Link: https://patch.msgid.link/20260708032647.712412-1-lgs201920130244@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin commit cee9e9fde42806e0480b7b694bb777a0c4c11554 Author: Karl Mehltretter Date: Sat Sep 5 03:36:55 2026 +0200 loadpin: Fix stale KEXEC_VERIFY_SIG reference in documentation [ Upstream commit eb0b0d222a832b6ec851e56d4922a775ac762955 ] Commit 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE") removed CONFIG_KEXEC_VERIFY_SIG but left the LoadPin documentation pointing at it. Refer to CONFIG_KEXEC_SIG instead. While at it, clean up the grammar of the sentence. Fixes: 99d5cadfde2b ("kexec_file: split KEXEC_VERIFY_SIG into KEXEC_SIG and KEXEC_SIG_FORCE") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Randy Dunlap Signed-off-by: Jonathan Corbet Message-ID: <20260905013655.58665-1-kmehltretter@gmail.com> Signed-off-by: Sasha Levin commit 493949e28a12a79a6c2e0fd6876fcf9cd5543d9e Author: Rosen Penev Date: Wed Sep 9 16:46:01 2026 -0700 dmaengine: mv_xor: kill tasklet on channel add error path [ Upstream commit bcb4d469b19d53dc21e4a1da12d4438e7489e150 ] If request_irq() succeeds but a later step (self-test or device registration) fails, the error path at err_free_irq frees the IRQ but does not kill the tasklet. A previously scheduled tasklet can still run after the channel is freed, accessing freed memory. Add tasklet_kill() after free_irq() on the error path. Fixes: ff7b04796d98 ("dmaengine: DMA engine driver for Marvell XOR engine") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Reviewed-by: Frank Li Link: https://patch.msgid.link/20260909234601.101883-1-rosenp@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 485e6bfd103a4feaf9f78e4347974f29368a105f Author: Yonghao Zhang Date: Fri Sep 11 16:18:10 2026 +0800 remoteproc: core: Set trace buffer name for diagnostics [ Upstream commit e23eab619b0d2dd796618406ba25da62f4d539a2 ] rproc_trace_read() (in remoteproc_debugfs.c) prints the name of a trace buffer whose device address could not be resolved, but nothing ever assigns trace_mem.name, so that the diagnostics always prints an empty string: Trace not available Copy the generated "trace%d" name into the memory entry, so the diagnostics identifies the buffer failed to translate. Fixes: a987e6b91a5a ("remoteproc: fix trace buffer va initialization") Assisted-by: Claude-Code:glm-5.3 Signed-off-by: Yonghao Zhang Link: https://lore.kernel.org/r/20260911081810.740028-1-hyz3367@gmail.com Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin commit 8b0a34d4c5cc048453645344ec74c00d4adf4cd6 Author: Mika Penttilä Date: Mon Sep 14 07:07:23 2026 +0300 drm/tests: hdmi: fix infoframes tests [ Upstream commit d5c34a384305e05a2d463dd2094e0ec449643bd4 ] drm_atomic_commit() calls drm_atomic_check_only() internally. Calling drm_atomic_check_only() explicitly before the commit leaves the state marked as checked and triggers drm_WARN_ON(state->checked) when the commit checks the state again. Remove the redundant explicit checks. Fixes: 7436a87db99d ("drm/tests: hdmi: check the infoframes behaviour") Cc: Maxime Ripard Signed-off-by: Mika Penttilä Link: https://patch.msgid.link/20260914040723.2593700-1-mpenttil@redhat.com Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin commit 2b60a68b17605068bedcacd955922709743c9893 Author: Junxian Huang Date: Mon Sep 14 10:48:00 2026 +0800 RDMA/hns: Fix the use of uninitialized variable [ Upstream commit 653c5b4605f65355d3b3f1059784e56c77f146b3 ] The variable 'i' is used without being initialized in active-backup mode. Fixes: d9023e461b73 ("RDMA/hns: Implement bonding init/uninit process") Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20260914024800.132429-1-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 3d849f3fff6f8b979547aee51d727e24bc86ff34 Author: Karl Mehltretter Date: Sat Sep 12 01:34:14 2026 +0200 block: Fix the thaw_bdev reference in bdev_freeze() kernel-doc [ Upstream commit e14c3379be86854c203de1e0fdfdeaa0b45509df ] The kernel-doc comment of bdev_freeze() refers to thaw_bdev, which was renamed to bdev_thaw by commit 982c3b305843 ("bdev: rename freeze and thaw helpers"). Say bdev_thaw. Fixes: 982c3b305843 ("bdev: rename freeze and thaw helpers") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: "Darrick J. Wong" Reviewed-by: Christian Brauner (Amutable) Link: https://patch.msgid.link/20260911233415.31271-1-kmehltretter@gmail.com Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 764e633507310d7c2920a6d8ea283dda9555f6f5 Author: Guangshuo Li Date: Tue Sep 15 17:19:20 2026 +0800 media: i2c: t4ka3: drop unmatched runtime PM put [ Upstream commit 2695038ac43cf63b95580544a4e9d1031660aa99 ] t4ka3_probe() marks the device runtime active and enables runtime PM, but does not increment the runtime PM usage counter. Nevertheless, the probe failure path calls pm_runtime_put_noidle(), which has no matching runtime PM get operation. pm_runtime_put_noidle() currently does not decrement usage_count when it is already zero, so the call is ineffective. Remove the unmatched put to keep the runtime PM reference handling balanced and avoid misleading cleanup code. This issue was found by manual code inspection. Fixes: fd55319692151 ("media: Add t4ka3 camera sensor driver") Signed-off-by: Guangshuo Li Signed-off-by: Sakari Ailus Signed-off-by: Sasha Levin commit 8a0a0f704694bbd1bb7d6928c275a145bb254327 Author: Guangshuo Li Date: Tue Sep 15 15:55:20 2026 +0800 media: i2c: ar0521: remove duplicate media entity cleanup [ Upstream commit 069a0343581bfcaee44bc598e2b95be2e2789807 ] The error path taken when ar0521_power_on() fails calls media_entity_cleanup() at the disable label and then falls through to the entity_cleanup label, where media_entity_cleanup() is called again. There is no need to clean up the media entity twice. Remove the first call and let all error paths converge on the common entity_cleanup label. This issue was found by manual code inspection. Fixes: 852b50aeed15 ("media: On Semi AR0521 sensor driver") Signed-off-by: Guangshuo Li Signed-off-by: Sakari Ailus Signed-off-by: Sasha Levin commit e0d5fa640e6a39d31d16bb424dca378a4272faac Author: Maxime Ripard Date: Tue Sep 8 16:46:59 2026 +0200 drm/atmel-hlcdc: Drop spurious csc_init call from reset [ Upstream commit 4699bb3b1dbd8ccd25cd678acb4ca12da7bd45dd ] The lcdc_csc_init callback was introduced in commit aa71584b323a ("drm: atmel-hlcdc: add driver ops to differentiate HLCDC and XLCDC IP") and called only once, at init time, from atmel_hlcdc_plane_init_properties(). commit 81af99cbd9e4 ("drm/atmel-hlcdc: destroy properly the plane state in the reset callback") then reworked the reset hook to use atmel_hlcdc_plane_atomic_destroy_state() instead of duplicating the code. However, it also introduced a new call to lcdc_csc_init in the reset path that wasn't there before and wasn't mentioned in the commit log. Since CSC coefficients are hardware constants that only need to be written once at init time. This also prevents the conversion to atomic_create_state, which must not have any hardware side-effect. Fixes: 81af99cbd9e4 ("drm/atmel-hlcdc: destroy properly the plane state in the reset callback") Acked-by: Thomas Zimmermann Link: https://patch.msgid.link/20260908-drm-no-more-plane-reset-v4-28-a31b3fcfc989@kernel.org Signed-off-by: Maxime Ripard Signed-off-by: Sasha Levin commit 8ea9ed46b383781c8a4a8c4f7a94006a037556ce Author: Li RongQing Date: Fri Sep 11 10:15:57 2026 +0800 RDMA/uverbs: Make CQ handle mandatory for WQ creation [ Upstream commit f7d28791433d373ecdab7b00f60ddb504e858e0a ] UVERBS_ATTR_CREATE_WQ_CQ_HANDLE is declared UA_OPTIONAL in the ioctl method definition, so the mandatory attribute bitmap does not enforce its presence. When userspace omits it, uverbs_attr_get_obj() returns ERR_PTR(-ENOENT) and the handler stores that error pointer into wq_init_attr.cq without validation. The bogus cq pointer is then passed to the driver's create_wq callback. In the mlx5 case, create_rq() calls to_mcq(init_attr->cq) which applies container_of to the ERR_PTR value, producing a near-NULL pointer. The subsequent access in get_rq_ts_format() triggers a kernel NULL pointer dereference: BUG: kernel NULL pointer dereference, address: 0000000000000296 RIP: 0010:create_rq+0x32/0x550 [mlx5_ib] Call Trace: mlx5_ib_create_wq+0x14a/0x210 [mlx5_ib] ib_uverbs_handler_UVERBS_METHOD_WQ_CREATE+0x1f0/0x320 [ib_uverbs] ib_uverbs_run_method+0x296/0x320 [ib_uverbs] ib_uverbs_cmd_verbs+0x1a0/0x260 [ib_uverbs] ib_uverbs_ioctl+0xa8/0x120 [ib_uverbs] A WQ without a CQ was never valid; the legacy write path always required one via uobj_get_obj_read() in ib_uverbs_ex_create_wq(). Declare the attribute UA_MANDATORY so the uverbs framework rejects the ioctl early when the CQ handle is missing, before the handler ever runs. Fixes: ef3bc084a8ed ("IB/uverbs: Introduce create/destroy WQ commands over ioctl") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260911021557.2113-1-lirongqing@baidu.com Reviewed-by: Kalesh AP Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit d53a8bf76833bdd93f643b0a715eb5b2b4ff06d6 Author: Nicolas Morey Date: Wed Sep 9 18:01:31 2026 +0200 RDMA/rxe: Use validated num_sge in local buffer [ Upstream commit a4368022a3ac5324356ae8d88e3a42d115956fd6 ] For both SRQ and non-SRQ receive paths, the WQE is copied into a local buffer to provide a kernel-owned, validated copy. While calculating the memcpy size from the validated num_sge prevents overflow during the copy, memcpy() itself still copies num_sge from shared memory. A concurrent userspace modification before or during memcpy() leaves an unvalidated num_sge in the local buffer, leading to potential out-of-bounds reads in rxe_resp_check_length() and copy_data() causing: BUG: KASAN: slab-out-of-bounds in rxe_receiver+0x8109/0x9ec0 [rdma_rxe] Read of size 4 at addr ffff88812c4867f8 by task kworker/u9:6/361 Workqueue: rxe_wq do_work [rdma_rxe] Call Trace: rxe_receiver+0x8109/0x9ec0 [rdma_rxe] do_work+0x149/0x610 [rdma_rxe] process_one_work+0x726/0x10a0 The buggy address belongs to the object at ffff88812c486000 which belongs to the cache kmalloc-part-13-2k of size 2048 The buggy address is located 0 bytes to the right of allocated 2040-byte region [ffff88812c486000, ffff88812c4867f8) Explicitly assign the validated num_sge to the local buffer after the copy to prevent this race. Fixes: 22b8fbded65b ("RDMA/rxe: Fix TOCTOU heap overflow in get_srq_wqe") Fixes: d6ab440240a0 ("RDMA/rxe: Copy WQE to local buffer in non-SRQ receive path") Reviewed-by: Zhu Yanjun Signed-off-by: Nicolas Morey Link: https://patch.msgid.link/20260909160132.1491248-1-nmorey@suse.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 9d1dc3324099c42c9ca682a49e72c0a6cb16799b Author: Miles Krause Date: Wed Sep 9 19:26:26 2026 -0400 memory: emif: fix device_node reference leak on np_ddr [ Upstream commit 314ef67d673284d4c070455bd62d332f6d0f8634 ] of_get_memory_device_details() takes a reference on the DDR device node via of_parse_phandle() and stores it in emif->np_ddr for later use, but drops that reference without calling of_node_put() on two error paths: the devm_kzalloc() allocation-failure check and the is_dev_data_valid() check. Both return NULL immediately, leaking the node reference each time either failure triggers. The same reference is also never released on the success path: it is kept for the life of the bound device (compared against a later instance's np_ddr in the duplicate-DDR-geometry check) but emif_remove() never calls of_node_put() on it, leaking it every time an EMIF device unbinds. of_node_put() on a NULL pointer is a no-op, so this is also safe for the non-DT get_device_details() path, where np_ddr is left NULL by devm_kzalloc(). Fixes: e6b42eb6a66c ("memory: emif: add device tree support to emif driver") Signed-off-by: Miles Krause Link: https://patch.msgid.link/20260909-master-v1-1-8800f5647ab2@gmail.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin commit 176faa35b76a92e331d4b72be96d6e316f0271e9 Author: Pengpeng Hou Date: Tue Jun 23 21:53:49 2026 +0800 phy: samsung: usbdrd: propagate GS101 PIPE3 lock failures [ Upstream commit 2ef1e78ef7223eb16d9cf20814a1b2873456f671 ] The GS101 PIPE3 initialization checks the PMA PLL lock and then checks the CDR lock. The PLL helper returns an error, but the GS101 PIPE3 init path dropped that result. The CDR helper only logged a timeout. PHY initialization could therefore still return success after either the PLL or the selected receive lane had not locked. Make the in-file SoC-specific phy_init hook return an int so helpers with real failure results can propagate them through the existing PHY init paths. Keep the register-only helpers returning success and use the new return path to report the GS101 CDR wait failure. Other SoC helper paths keep their previous success behavior. Fixes: 32267c29bc7d ("phy: exynos5-usbdrd: support Exynos USBDRD 3.1 combo phy (HS & SS)") Signed-off-by: Pengpeng Hou Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260623135349.42739-1-pengpeng@iscas.ac.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 5c46ffbd603753deea1243beb6f187e539fa52f3 Author: Gregory CLEMENT Date: Fri Mar 6 11:23:58 2026 +0100 phy: cadence: Sierra: Do not modify register when getting parent clock [ Upstream commit 955e68eb3067842067b7b5395a3f8c278428802a ] The get_parent() callback for the PLL_CMNLC1 clock was incorrectly writing to the register while determining the parent clock index. This unintended register access forces the PHY back into training mode. If the PHY is already configured, this unexpected change prevents it from exiting training mode. Remove the register write operation to ensure the PHY remains stable during the get_parent() callback. Fixes: da08aab940092 ("phy: cadence: Sierra: Fix to get correct parent for mux clocks") Signed-off-by: Gregory CLEMENT Reviewed-by: Manivannan Sadhasivam Reviewed-by: Neil Armstrong Link: https://patch.msgid.link/20260306-fix_sierra_get_parent-v2-1-cafe89ee5382@bootlin.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 66bfe8ff51241359efb1829365ffce34439735f8 Author: Haotian Zhang Date: Fri Feb 20 00:38:43 2026 +0800 phy: hisilicon: hi3670: Fix OF node and device reference leaks [ Upstream commit 1499f3d3407f5310731bcdf324387c321258fd75 ] hi3670_pcie_get_resources_from_pcie() leaks two references: 1) The OF node returned by of_get_child_by_name() is never released. 2) The device returned by bus_find_device_by_of_node() is never put. Fix both leaks by calling of_node_put() right after bus_find_device_by_of_node(), and put_device() after dev_get_regmap() when the temporary pcie_dev reference is no longer needed. Fixes: 73075011ffff ("phy: HiSilicon: Add driver for Kirin 970 PCIe PHY") Suggested-by: Vladimir Oltean Signed-off-by: Haotian Zhang Reviewed-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260219163843.1571-1-vulab@iscas.ac.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit c12d41fc89cfbee55544d119a669fd827cc76d77 Author: Nemesa Garg Date: Wed Sep 9 16:33:32 2026 +0530 drm/i915/psr: Clear stale sel fetch enable bits on sel fetch disable [ Upstream commit a4c0e7f80429eda6990960971aebd4e4b9533cc6 ] Selective fetch is dropped while pipe CRC is active, and the planes keep their SEL_FETCH_PLANE_CTL / SEL_FETCH_CUR_CTL enable bit set in hardware over that. A plane disabled while selective fetch is off never gets the bit cleared, as the disable path is guarded by enable_psr2_sel_fetch. Once selective fetch comes back the hardware resumes fetching for a plane that is no longer enabled and keeps its DDB range reserved. Clear the bits as selective fetch is turned off instead. Atomic check has both the old and the new crtc state, so record the transition there and let the plane and cursor arm paths write the registers to 0 for that commit. v2: Drop the old_crtc_state->hw.active check. [Jouni] Fixes: b1f5279b5981 ("drm/i915/psr: Move plane sel fetch configuration into plane source files") Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8739 Assisted-by: Copilot:Claude-Opus-5 Signed-off-by: Nemesa Garg Reviewed-by: Jouni Högander Signed-off-by: Suraj Kandpal Link: https://patch.msgid.link/20260909110332.3528029-3-nemesa.garg@intel.com Signed-off-by: Sasha Levin commit 3e0667a0a342d61bdf36355b8723a1c57095dd37 Author: Sang-Heon Jeon Date: Sat Sep 5 23:15:24 2026 +0900 memblock: reject non-page-aligned reserve_mem regions [ Upstream commit 5728d3523f12826a2b180c1c5738f74e33197e14 ] When map->start or map->size is not page aligned, reserved_mem_preserve() does not preserve the last one or two pages of the region from map->start to map->start + map->size. After kexec the new kernel reserves only the preserved pages, so those pages are released to the buddy allocator. But reserve_mem_find_by_name() still returns the whole region including them, so they can be allocated while the subsystem is still using them. So reject a reserve_mem= size or alignment that is not a multiple of PAGE_SIZE to keep both map->start and map->size page aligned. Fixes: 8375b76517cb ("kho: replace kho_preserve_phys() with kho_preserve_pages()") Signed-off-by: Sang-Heon Jeon Link: https://patch.msgid.link/20260905141526.1546478-1-ekffu200098@gmail.com Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Sasha Levin commit b9f58df2889680e9f07071d16be415c8407e1ef4 Author: Linkai Gong Date: Thu Aug 13 17:58:18 2026 +0800 firmware: imx: dsp: fix mailbox channel leak on kasprintf failure [ Upstream commit e3631d0242842940f9e902afaea98202e56277e8 ] If kasprintf() fails while setting up mailbox channels, already requested channels from earlier iterations were never freed. Route the failure through the existing cleanup path. Fixes: ffbf23d50353 ("firmware: imx: Add DSP IPC protocol interface") Signed-off-by: Linkai Gong Reviewed-by: Frank Li Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit a5055b4865f510b02e97dbac31408244785739d4 Author: Zhiguo Niu Date: Thu Sep 10 11:02:43 2026 +0800 f2fs: fix to record both APPEND and UPDATE ino entries [ Upstream commit 06768d77ed956b4bf0b588fcff2fae8cfcb67269 ] In f2fs_post_evict_inode(), record_bits is assigned with BIT(APPEND_INO) and BIT(UPDATE_INO) respectively, so the second assignment overwrites the first one: when both FI_APPEND_WRITE and FI_UPDATE_WRITE are set, only the UPDATE_INO entry is recorded. The two flags are not mutually exclusive.Once the APPEND_INO entry is lost after the inode eviction, the shortcut in f2fs_do_sync_file() can take the flush_out path in the next fsync(), skipping f2fs_fsync_node_pages(). As a result, the dnodes holding the newly allocated blocks are not fsync-marked, and after a sudden power loss, the data appended before the eviction is silently lost. This restores the previous behavior where the two ino entries were added independently. Fixes: 314c9e476ffc ("f2fs: call __add_ino_entry out of the eviction path") Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin commit f69b6cbb7f9bdc681d5b11bcd8c5ba133f8ab3d6 Author: Jianan Huang Date: Wed Sep 9 19:46:14 2026 +0800 f2fs: quota: fix stale lock holder on remount failure [ Upstream commit 3f140a60c92a5e2e9885adac70cd3686ba4ee19a ] F2FS remount can fail while duplicating a journalled quota file name. f2fs_remount() - sbi->umount_lock_holder = current - kstrdup(F2FS_OPTION(sbi).s_qf_names[i]) : fails - free previously duplicated names - return -ENOMEM The direct return leaves umount_lock_holder pointing at the failed remount context. A later checkpoint may then wrongly treat another context as the s_umount lock holder. Add a restore_holder cleanup path and use it before returning -ENOMEM. Fixes: eb85c2410d6f ("f2fs: quota: fix to avoid warning in dquot_writeback_dquots()") Signed-off-by: Jianan Huang Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin commit 5435c507d45de6930e9754ce7b66a51b242741e7 Author: Jérôme Pouiller Date: Sun Sep 6 22:47:28 2026 +0200 wifi: wfx: fix use-after-free of the cooling work on device removal [ Upstream commit 17402a869778f6c17b88fd360d7a96378779f97c ] When the device reports that it is too hot, wfx_suspend_hot_dev() blocks the Tx queues and arms cooling_timeout_work with a 10s delay. If the device recovers a normal temperature before the delay expires, the work is canceled. Else, the work declares the chip frozen and unblocks the Tx queues. However, this work is never canceled when the device is removed. cooling_timeout_work is queued on the system workqueue, while struct wfx_dev is released by wfx_free_common() (through ieee80211_free_hw()). So, if the device is unbound during this 10s window, the work fires after struct wfx_dev has been freed and dereferences it. Cancel the work during the teardown. It has to be done after wfx_bh_unregister(): the "device too hot" indication is processed by the bh, so canceling the work earlier would allow the bh to rearm it. On the other hand, the work calls wfx_tx_unlock(), which may in turn call wfx_bh_request_tx(). So it has to be canceled before bh_wq is destroyed. Note that the Tx queues are intentionally left blocked: the device is going away, so there is nothing to unblock. The issue was reported by the Sashiko review bot and the fix has been written by Copilot (including the commit log). The use-case is difficult to reproduce, so this code has not been tested. However, I don't believe this patch could cause any regression. Fixes: 1d52d29983e5d ("staging: wfx: add support for 'device too hot' indication") Assisted-by: Sashiko:gemini-3.1-pro-preview Assisted-by: Copilot:claude-opus-5 Signed-off-by: Jérôme Pouiller Tested-by: Alexander Sverdlin Reviewed-by: Alexander Sverdlin Link: https://patch.msgid.link/20260906204831.949692-2-jerome.pouiller@silabs.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 9ee66c6ccaca7f640b6ed1a0e12f78d3989e6fab Author: Takahiro Kuwano Date: Mon Sep 14 13:50:36 2026 +0900 mtd: spi-nor: spansion: Remove s25fs256s0 [ Upstream commit f917d9edf54c3dd578efc231b8fbcd35744f99cd ] The Spansion ID table lists s25fs256s0 and s25fs256s1 as variants distinguished by id[4] (0x00 for 256 KB sectors and 0x01 for 64 KB sectors), following an incorrect statement in the datasheet. The sector size of s25fs256s is configurable between 256 KB and 64 KB. The factory default is 64 KB, and id[4] is always 0x01 regardless of the configured sector size. Remove the invalid s25fs256s0 entry from the ID table. Fixes: 075fd6dff24a ("mtd: spi-nor: spansion: Differentiate between s25fl256s and s25fs256s") Signed-off-by: Takahiro Kuwano Signed-off-by: Michael Walle Signed-off-by: Sasha Levin commit 9d72fac7102ce47917b21957a810f29492961ed2 Author: Julius Bairaktaris Date: Tue Sep 8 16:41:55 2026 +0200 wifi: mac80211: don't reset the TXQ scheduling round number [ Upstream commit 8ea81827d3537db7cfcc82c008f052bb1bbe7567 ] A round is ended when ieee80211_next_txq() meets a txq whose remembered round number is the current one, meaning it has gone full circle. When the AC exceeds the airtime limit, ieee80211_txq_schedule_start() sets the round number to 0 to close the round. The next open round is 1. A txq from an earlier round 1 still remembers the "1", so the next round stops on it and serves nothing. Fix: use a separate open/closed flag and let the round number keep counting. Testing: ~4200 skipped selections per 20s without the fix and 20 skipped selections per 20s with the fix on ath11k (with my AQL series applied) at BE 500/1000. Fixes: 8e4bac067105 ("wifi: mac80211: add a per-PHY AQL limit to improve fairness") Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris Reviewed-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20260908144155.756569-1-julius@bairaktaris.de Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 2da2e11ff151bbb7e23fc0b2902cdd64fcafd343 Author: Karl Mehltretter Date: Sat Sep 12 09:28:40 2026 +0200 wifi: mac80211: Fix the return value in mesh_path_add() kernel-doc [ Upstream commit 5c7b043cb1ef4bca9aa2e793dab862c0989d59c3 ] mesh_path_add() has returned the new (or the already existing) struct mesh_path, or an ERR_PTR(), since commit ae76eef027f7 ("mac80211: return new mpath from mesh_path_add()"), but its kernel-doc still says "Returns: 0 on success". Describe the pointer. Fixes: ae76eef027f7 ("mac80211: return new mpath from mesh_path_add()") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260912072840.50710-1-kmehltretter@gmail.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 7852ba58e31d386ea6abf383a6ab7ec1f26ecf6a Author: Christoph Hellwig Date: Wed Sep 9 09:08:58 2026 +0300 block,iomap: fix protection information verification with initial bvec offset [ Upstream commit 7de79a5ffe338b959be8cd862292596ac9f7848b ] When reconstructing a bvec_iter from an ioend for protection information verification, iomap currently ignores the offset into the initial bio_vec. This can't happen for buffered I/O or direct I/O to user addresses, but is exercised by splice on O_DIRECT file descriptors or when using the loop driver in direct I/O mode. Fortunately the only file system PI user (XFS) currently always bounce buffers, so this can't actually be triggered yet. But we'll want to make the bounce buffering conditional soon, for which this needs to be fixed. Store the initial offset in struct iomap_ioend, and pass a pre-constructed bvec_iter to fs_bio_integrity_verify. For the synchronous read case the fix is even simpler as this path can simply stash away the original bvec_iter. Fixes: 0bde8a12b554 ("block: add fs_bio_integrity helpers") Signed-off-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Link: https://patch.msgid.link/20260909060924.1102037-10-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit d9561b0627eeee4378914363a19b4111acbc836b Author: Karl Mehltretter Date: Sat Sep 12 00:11:00 2026 +0200 dma-fence: Fix dma_fence_enable_signaling() reference in kernel-doc [ Upstream commit 65221358b6a6ea5128accbaa6117565ab8e24aa1 ] The kernel-doc comment of dma_fence_is_signaled_locked() refers to dma_fence_enable_sw_signaling, which was renamed to dma_fence_enable_signaling by commit 9370a5c664e8 ("dma-buf: rename dma_fence_enable_sw_signaling"). Say dma_fence_enable_signaling. Fixes: 9370a5c664e8 ("dma-buf: rename dma_fence_enable_sw_signaling") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Christian König Signed-off-by: Christian König Link: https://lore.kernel.org/r/20260911221100.7079-1-kmehltretter@gmail.com Signed-off-by: Sasha Levin commit 51c858b6246b4a66bf0c8cbdc9dedd16e55b1c73 Author: Conor Dooley Date: Mon Aug 31 11:50:57 2026 +0100 pinctrl: mpfs-mssio: fix whitespace in debugfs output [ Upstream commit d6a27168cce7339c633bce88df00444489dbb5b7 ] The printout from mpfs_pinctrl_pinconf_dbg_show() is appended to information from the core, so a leading space is required or the world will end. Fixes: 488d704ed7b7 ("pinctrl: add polarfire soc mssio pinctrl driver") Signed-off-by: Conor Dooley Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin commit 6f6fe512c121cab28b312a5ae925623c8c7c1237 Author: Fuad Tabba Date: Tue Sep 1 15:03:21 2026 +0100 arm64: pi: Run the source checker on the libfdt objects under C=2 [ Upstream commit 44b14ff4aebeae98663d0fd424b4ef88237ee981 ] The custom lib-%.o rule reuses rule_cc_o_c, which hooks the source checker only for C=1, and that only when the object is rebuilt. The C=2 hook, cmd_force_checksrc, hangs off the standard %.o rule, so "make C=2" silently skips the two libfdt objects. Call cmd_force_checksrc after the compile rule, as the standard rule does. Fixes: aacd149b6238 ("arm64: head: avoid relocating the kernel twice for KASLR") Reviewed-by: Marc Zyngier Signed-off-by: Fuad Tabba Link: https://patch.msgid.link/20260901140326.3812068-7-fuad.tabba@linux.dev Signed-off-by: Marc Zyngier Signed-off-by: Sasha Levin commit 304c418db3a76d78dfd63509c2b0a8fc5039001e Author: Thomas Weißschuh Date: Mon Sep 14 01:50:09 2026 +0200 microblaze: Pass -m{big,little}-endian through KBUILD_CPPFLAGS [ Upstream commit b9eababe8c0b9f71ce7f35f903879a7fcb6daebe ] These parameters are also necessary for preprocessed files which do not contain code. One example is arch/microblaze/kernel/vmlinux.lds.S which inspects __MICROBLAZEEL__ for the definition of 'jiffies_64'. As currently the endianness is not passed from the build system for this file, the preprocessor will instead use the default endianness of the toolchain. When a default big-endian toolchain is used to build a little-endian kernel, that kernel will hang during delay calibration as 'jiffies' never changes. Make sure all preprocessor invocations know about the correct endianness by passing it through KBUILD_CPPFLAGS. This will also be inherited by CFLAGS and AFLAGS. Fixes: 02b08045a030 ("microblaze: Add support for little-endian Microblaze") Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20260914-kunit-microblaze-v2-2-7d5756e858f8@weissschuh.net Signed-off-by: Michal Simek Signed-off-by: Sasha Levin commit 39e5e4d762e6a4837dcf02bc203e76ef461fed9b Author: Thomas Weißschuh Date: Mon Sep 14 01:50:08 2026 +0200 microblaze: uaccess: Zero out destination on failed get_user() [ Upstream commit 54c35131e628e1a18f02365495a24a73a1fb515e ] On failure get_user() is supposed to zero out the destination variable. This is documented in the kdoc of the microblaze get_user() implementation and validated in lib/tests/usercopy_kunit.c. Currently that zeroing is missing. Add it. Fixes: 0d6de9532663 ("microblaze_mmu_v2: uaccess MMU update") Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow Link: https://patch.msgid.link/20260914-kunit-microblaze-v2-1-7d5756e858f8@weissschuh.net Signed-off-by: Michal Simek Signed-off-by: Sasha Levin commit 4d9c54cff28386ce761b5d54e210acef74d3e39d Author: Weiming Shi Date: Thu Jun 25 01:52:58 2026 -0700 fs/ntfs3: zero frame pages on read error [ Upstream commit a32e893a077a4b0d3b04c86cb7f69e354a187995 ] ni_read_frame() marks every frame page uptodate at the 'out:' label regardless of the return value. The pages come from ntfs_lock_new_page() and are not zeroed, and several error paths reach 'out:' before anything is written to them (e.g. a failed decompress_lznt()/decompress_lzx_xpress() on a corrupted chunk, or an allocation failure). A page marked uptodate is served directly from the page cache, so a later read() of the file returns the uninitialized page contents to userspace. On a crafted compressed image this leaks kernel memory, including pointers. Zero each page on the error path before marking it uptodate. The success path is unchanged. Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Reported-by: Xiang Mei Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Weiming Shi Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit ddfdaaed4e30760a44181312004bfb02c07458a0 Author: Baolin Liu Date: Fri Jun 26 17:49:14 2026 +0800 fs/ntfs3: update ctime only on successful setxattr [ Upstream commit bfa6296bb6a0e2333796a9507beb4605b92a9fdf ] ntfs_setxattr() updates ctime and marks the inode dirty even when the xattr operation fails. Do that only on success. Fixes: 2d44667c306e ("fs/ntfs3: Update i_ctime when xattr is added") Signed-off-by: Baolin Liu Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit b7d33425b951b7a14bb8bb4b3ef52f942bffc4f7 Author: Weiming Shi Date: Fri Jun 26 03:23:43 2026 -0700 fs/ntfs3: take run_lock when freeing offs_folio in ni_decompress_file [ Upstream commit ad39d8d90fa0fd99b2714d4c84c6f4e1c399f1f4 ] attr_wof_frame_info() allocates, caches and dereferences ni->file.offs_folio under down_write(&ni->file.run_lock). ni_decompress_file() frees the same folio with folio_put() without taking run_lock. When a WOF externally-compressed file is opened for write, ni_decompress_file() can drop the last reference while a concurrent O_RDONLY reader is dereferencing the folio in attr_wof_frame_info(), leading to a use-after-free: BUG: KASAN: use-after-free in attr_wof_frame_info (fs/ntfs3/attrib.c:1619) Read of size 4 at addr ffff8880120c9000 by task exploit Call Trace: attr_wof_frame_info (fs/ntfs3/attrib.c:1619) ni_read_frame (fs/ntfs3/frecord.c:2421) ni_read_folio_cmpr (fs/ntfs3/frecord.c:1916) ntfs_read_folio (fs/ntfs3/inode.c:648) read_pages (mm/readahead.c:181) page_cache_ra_unbounded (mm/readahead.c:292) force_page_cache_ra (mm/readahead.c:364) page_cache_sync_ra (mm/readahead.c:573) filemap_get_pages (mm/filemap.c:2688) filemap_read (mm/filemap.c:2806) generic_file_read_iter (mm/filemap.c:2994) ntfs_file_read_iter (fs/ntfs3/file.c:842) vfs_read (fs/read_write.c:574) __x64_sys_pread64 (fs/read_write.c:773) Take run_lock around the folio_put(), as is done for every other access to ni->file.offs_folio. Fixes: 4342306f0f0d ("fs/ntfs3: Add file operations and implementation") Reported-by: Xiang Mei Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Weiming Shi Signed-off-by: Konstantin Komarov Signed-off-by: Sasha Levin commit ad60225d9958e49fef0c429afbb5bce2a258d1c3 Author: Mahe Tardy Date: Mon Sep 7 17:05:36 2026 +0000 libbpf: fix log level propagation for light skeleton loaders [ Upstream commit e18e82ba9ed53f60acce5f9995ee357a9f7ab91d ] bpftool's -d option is documented to enable bpf_trace_printk() messages from the generated syscall loader when used with -L as specified in commit d510296d331a ("bpftool: Use syscall/loader program in "prog load" and "gen skeleton" command.") However commit b59e4ce8bcaa ("bpftool: Switch bpf_object__load_xattr() to bpf_object__load()") changed bpftool to use bpf_object__load() which call the internal bpf_object_load with extra_log_level to 0 instead of bpf_object__load_xattr with the user request log_level. All the plumbing was still there to generate the bpf_trace_printk() instructions from the generator but was now unreachable because bpf_gen__init() was called with extra_log_level to 0, leaving gen->log_level at 0. This uses the obj->log_level field introduced in commit e0e3ea888c69 ("libbpf: Allow passing user log setting through bpf_object_open_opts") set from reading verifier_logs in do_skeleton(). This preserves both object-level and explicit load-time logging settings. Fixes: b59e4ce8bcaa ("bpftool: Switch bpf_object__load_xattr() to bpf_object__load()") Acked-by: Daniel Borkmann Signed-off-by: Mahe Tardy Link: https://lore.kernel.org/r/20260907170536.9996-1-mahe.tardy@gmail.com Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin commit a6cafb722b764f8fa4fe43e77386167aad2fa833 Author: Karl Mehltretter Date: Sat Sep 12 02:06:06 2026 +0200 regulator: qcom-rpmh: Fix the return value in rpmh_regulator_vrm_get_optimum_mode() kernel-doc [ Upstream commit 51d6888b51e0c962250311b2cbfe5666da31dc0e ] rpmh_regulator_vrm_get_optimum_mode() returns REGULATOR_MODE_NORMAL or REGULATOR_MODE_IDLE and cannot fail, but its kernel-doc says "0 on success, or a negative error number on failure", which was never true. Describe the mode. Fixes: efb0cb50c427 ("regulator: qcom-rpmh: Implement get_optimum_mode(), not set_load()") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260912000606.34614-1-kmehltretter@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 6fe2edfe97674e872a106fa7c307f6b179f48b42 Author: Ian Rogers Date: Thu Sep 10 14:12:19 2026 -0700 perf header: Fix potential memory corruption in cpu_cache_level__read [ Upstream commit d964ffba01f5d0935dd6bc850029958a62c74491 ] strim() may advance the pointer assigned to cache->size which causes later frees to crash. Fix by performing the strim and then memmove-ing the potentially shifted string back over the original string. The bug was introduced by the transition from rtrim() to strim(), as rtrim() wouldn't move on the left. Fixes: 13c230ab6e56c6ae ("perf tools: Ditch rtrim(), use strim() from tools/lib") Signed-off-by: Ian Rogers Assisted-by: Antigravity:gemini-3.1-pro Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 35f31e800b8ec87c7934aafe25f0832cf86125a7 Author: Junhui Liu Date: Sun Sep 6 15:06:41 2026 +0800 clk: sunxi-ng: sun55i-a523-r-ccu: Use P-only clocks for timers [ Upstream commit 1002cc9d60942f8f294d8de7f2805f82f4ebdda0 ] The R timer clocks only have a P divider, but are currently modeled as MP clocks with a zero-width M divider. ccu_mp_set_rate() generates an invalid mask for the zero-width M divider, clearing unrelated register fields. Model these clocks as P-only clocks to avoid accessing a nonexistent M divider. Fixes: 8cea339cfb81 ("clk: sunxi-ng: add support for the A523/T527 PRCM CCU") Signed-off-by: Junhui Liu Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-4-cbde21c9fe69@pigmoral.tech Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin commit 9cfb208487c90c9aaad8634d093fb1ca537b5fc2 Author: Junhui Liu Date: Sun Sep 6 15:06:40 2026 +0800 clk: sunxi-ng: sun55i-a523-ccu: Use P-only clocks for high-speed timers [ Upstream commit f2aee33d06d5e1363596ae166459aa4354a8b5ae ] The high-speed timer clocks only have a P divider, but are currently modeled as MP clocks with a zero-width M divider. ccu_mp_set_rate() generates an invalid mask for the zero-width M divider, clearing unrelated register fields. Model these clocks as P-only clocks to avoid accessing a nonexistent M divider. Fixes: 74b0443a0d0a ("clk: sunxi-ng: a523: add system mod clocks") Signed-off-by: Junhui Liu Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-3-cbde21c9fe69@pigmoral.tech Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin commit 41094c466542fb512066b614dd74518f70abc5fc Author: Junhui Liu Date: Sun Sep 6 15:06:39 2026 +0800 clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM [ Upstream commit 59dced16a82d1ec685b88365c64dde27a0a0b46a ] The MBUS, IOMMU, and DRAM clocks only have an M divider, but are currently modeled as MP clocks with a zero-width P divider. ccu_mp_set_rate() generates an invalid mask for the zero-width P divider, clearing unrelated register fields. It also ignores CCU_FEATURE_UPDATE_BIT, so the new divider value does not take effect. Model these clocks as M-only clocks instead. This avoids accessing a nonexistent P divider and uses ccu_div_set_rate(), which handles the update bit. Fixes: 74b0443a0d0a ("clk: sunxi-ng: a523: add system mod clocks") Signed-off-by: Junhui Liu Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-2-cbde21c9fe69@pigmoral.tech Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin commit 58c88290f6db67fa8de0ba25792c8399610272b4 Author: Junhui Liu Date: Sun Sep 6 15:06:38 2026 +0800 clk: sunxi-ng: div: Add feature support to M clock macro [ Upstream commit f43bed1fb1ddf7b350ceb7c371c624795a7820e8 ] Add a variant of SUNXI_CCU_M_DATA_WITH_MUX_GATE() that accepts CCU feature flags, such as CCU_FEATURE_UPDATE_BIT. Signed-off-by: Junhui Liu Link: https://patch.msgid.link/20260906-sunxi-clk-no-p-v1-1-cbde21c9fe69@pigmoral.tech Signed-off-by: Chen-Yu Tsai Stable-dep-of: 59dced16a82d ("clk: sunxi-ng: sun55i-a523-ccu: Use M-only clocks for MBUS, IOMMU and DRAM") Signed-off-by: Sasha Levin commit ce79452baea748fa1078afdb7a307541f8bef263 Author: Karl Mehltretter Date: Sat Sep 12 00:08:33 2026 +0200 cgroup/dmem: Fix eviction helper reference in dmem_cgroup_try_charge() [ Upstream commit e8f69fe59a104b4a97a3365dbb43c72996c2acde ] The kernel-doc comment of dmem_cgroup_try_charge() refers to dmem_cgroup_evict_valuable, which does not exist. The name is dmem_cgroup_state_evict_valuable. Say dmem_cgroup_state_evict_valuable. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 2cf2473318045dd805e85f7c955f97cd8cb78be4 Author: Yonghong Song Date: Sat Sep 12 12:52:01 2026 -0700 bpf: Read a kfunc's __sz argument only when it is in a register [ Upstream commit afe897e89918434be8600250dbdda977aa99f53d ] Commit e0b7b91c72db ("bpf: Support stack arguments for kfunc calls") supported stack arguments for kfunc's. In bpf_kfunc_stack_access_bytes(), the size of a ptr + __sz pair is read from const_reg_vals[] at index 'BPF_REG_1 + arg + 1'. Past the fifth argument that index leaves the argument registers and reaches 6 through 9, which are the callee saved registers R6 through R9. The verifier does record constants for those, so a __sz argument passed on the stack can take the value of an unrelated register as its size. Fix it by guard size_reg which has to be less than or equal to MAX_BPF_FUNC_REG_ARGS. Fixes: e0b7b91c72db ("bpf: Support stack arguments for kfunc calls") Signed-off-by: Yonghong Song Link: https://lore.kernel.org/r/20260912195201.982215-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin commit f0de36889ed8c6535c0cbf58746cf7534c78dfa1 Author: Rafael J. Wysocki Date: Fri Sep 11 15:01:30 2026 +0200 ACPI: video: Fix backlight unregistration ordering [ Upstream commit 46577d36611953d1b99e86493289cfc824116ad2 ] In acpi_video_dev_unregister_backlight(), the sysfs interface of the cooling class device may access the brightness object under the backlight device's ACPI companion, so that object cannot be freed before unregistering the cooling class device. Adjust the code to take that into account. Fixes: 67b662e189f4 ("ACPI / video: seperate backlight control and event interface") Signed-off-by: Rafael J. Wysocki Reviewed-by: Armin Wolf [ rjw: Fixed the Fixes: tag ] Link: https://patch.msgid.link/3429468.aeNJFYEL58@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 755c4d87215134d00d66355ab1f36c4c53c629e4 Author: Rafael J. Wysocki Date: Fri Sep 11 15:00:51 2026 +0200 ACPI: fan: Fix memory leak due to leftover devm_kcalloc() argument [ Upstream commit 2cf65d00347005eccf9a24801783377d7f920021 ] An ACPI device object's dev field in passed as the first argument to devm_kcalloc() in acpi_fan_get_fps() which is incorrect and leads to a memory leak on driver probe errors and removal because the driver is not bound to that ACPI device. Address this by replacing that pointer with a pointer to the device the driver is actually bound to. While at it, drop a redundant error message after a memory allocation failure (that also gets printed relative to the ACPI device). Fixes: d91a1d129b63 ("ACPI: fan: Use platform device for devres-related actions") Signed-off-by: Rafael J. Wysocki Reviewed-by: Armin Wolf Link: https://patch.msgid.link/14089663.uLZWGnKmhe@rafael.j.wysocki Signed-off-by: Sasha Levin commit 07a9ca155334566805c2901837642333aa7a0f59 Author: Karl Mehltretter Date: Sat Sep 12 12:05:48 2026 +0200 ALSA: control: Fix virtual master creation reference in kernel-doc [ Upstream commit a347cc458d97ecd8adb5462b91559682a70aced6 ] The snd_ctl_add_follower() comment refers to snd_ctl_create_virtual_master(), but virtual master controls are created with snd_ctl_make_virtual_master(). Correct the helper name. Fixes: 79c7cdd5441f ("ALSA: Add kernel-doc comments to vmaster stuff") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260912100548.86134-1-kmehltretter@gmail.com Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 91a626e5479464fb4fa6c5bd649568458c5c588f Author: Michael S. Tsirkin Date: Sat Sep 12 06:30:18 2026 -0400 virtio_pci_modern: move avq cleanup from reset to del_vqs [ Upstream commit 2a12d96dd863cb23eadf07d8845e961580b5fcdf ] vp_modern_avq_cleanup() detaches unused buffers from the admin virtqueue. Calling it from vp_reset() is incorrect: virtqueue_get_buf in the avq interrupt handler can race with virtqueue_detach_unused_buf in cleanup, and get_buf after detach is not documented as valid. The root cause is that detaching buffers does not belong in reset at all - reset quiesces the device, while cleanup belongs where the virtqueue is about to be destroyed, from del_vqs. Reported-by: Sashiko Link: https://lore.kernel.org/virtualization/20260911125745.E0A2F1F00899@smtp.kernel.org/ Fixes: 4c3b54af907e ("virtio_pci_modern: use completion instead of busy loop to wait on admin cmd result") Cc: Jiri Pirko Assisted-by: LLM Signed-off-by: Michael S. Tsirkin Message-ID: <21fe35ad7b66e2c30dbdba6fe4df4824d1c0db66.1789204858.git.mst@redhat.com> Signed-off-by: Sasha Levin commit 098ef0ee55ebfef467d2a20fdc835e90c36d6e5c Author: Michael S. Tsirkin Date: Sat Sep 12 06:30:14 2026 -0400 virtio: synchronize callbacks after device reset [ Upstream commit dd75508e6fe77116589c49658d0d18897688dc0b ] virtio_reset_device says: Note: this guarantees that vq callbacks are not in progress but in practice, only virtio pci correctly synchronizes the cbs. On other transports, a callback that is already executing, keeps running while the driver tears down the state it uses. Add virtio_synchronize_cbs to virtio_reset_device fixing this for all transports that correctly implement synchronize_cbs(). Reported-by: Karl Mehltretter Link: https://lore.kernel.org/all/20260818040433.66986-1-kmehltretter@gmail.com/ Fixes: c46eccdaadab ("virtio: document virtio_reset_device") Tested-by: Karl Mehltretter Acked-by: Karl Mehltretter Assisted-by: LLM Signed-off-by: Michael S. Tsirkin Message-ID: <8ae2995ee649adcfe1398f7f1c4fc9f7028c3db1.1789204858.git.mst@redhat.com> Signed-off-by: Sasha Levin commit 65b0b200f6b06985c9a8bf0c7224359700176e1c Author: Karl Mehltretter Date: Sat Sep 12 08:26:14 2026 +0200 gfs2: Fix the return value in gfs2_get_link() kernel-doc [ Upstream commit 700a0a6892f7c0c541d5d23837cfab98cc744d17 ] gfs2_get_link() returns the link target or an error pointer, but its kernel-doc still describes an integer status. The mismatch dates back to when gfs2_readlink() was replaced by generic_readlink() and persisted across the removal of nd_set_link(). Describe the returned pointer and error value. Fixes: c177c2ac8c5a ("Switch gfs2 to nd_set_link()") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Andreas Gruenbacher Signed-off-by: Sasha Levin commit 2452a28c9415e07930e86e3240d81624c3cf6dc5 Author: Karl Mehltretter Date: Sat Sep 12 12:12:15 2026 +0200 ata: libata-scsi: Fix ata_scsi_hotplug() reference in kernel-doc [ Upstream commit 5915ab523e33057224a0240e27b88c6c2798b919 ] The ata_scsi_remove_dev() comment misspells its caller as ata_eh_scsi_hotplug(). The caller is ata_scsi_hotplug(). Correct the reference, which predates libata's move from drivers/scsi to drivers/ata. Fixes: 580b2102327a ("[PATCH] libata-hp: implement SCSI part of hotplug") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Damien Le Moal Link: https://lore.kernel.org/r/20260912101215.86413-1-kmehltretter@gmail.com Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit eca3e6864d96204735bb09eb970e80e64fd58013 Author: Karl Mehltretter Date: Sat Sep 12 01:02:11 2026 +0200 spi: Fix the return value in spi_new_ancillary_device() kernel-doc [ Upstream commit 3742867ce96539100ed5f4c754f04273d8aa00d7 ] spi_new_ancillary_device() returns the new struct spi_device, or an ERR_PTR() on failure, but its kernel-doc says "0 on success; negative errno on failure", which was never true. Describe the pointer. Fixes: 0c79378c0199 ("spi: add ancillary device support") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260911230211.11755-1-kmehltretter@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit cc8a7f45c55509f221ba5ea76bb3bdc0ee8ae496 Author: Pengpeng Hou Date: Sun Sep 6 11:36:04 2026 +0800 clk: s2mps11: Propagate OF provider registration failures [ Upstream commit 276741aac3b56ba50bef59715ba18ba3f0b953a2 ] s2mps11_clk_probe() ignores of_clk_add_hw_provider() failures, stores driver data and returns success even though DT consumers cannot acquire the registered clocks. Return the provider error through the existing lookup cleanup path. Skip empty lookup slots while unwinding because S2MPS14 omits its CP clock. The issue was found by our static-analysis tool and manually reviewed. Fixes: b228fad50c00 ("clk: s2mps11: Migrate to clk_hw based OF and registration APIs") Assisted-by: LLM Signed-off-by: Pengpeng Hou Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 8c3ba5ac2930a2a54d8396d6013f7ec8b071e891 Author: Geert Uytterhoeven Date: Thu Sep 3 12:09:25 2026 +0200 clk: rs9: Add clock index range check to rs9_of_clk_get() [ Upstream commit a2ef401bdfd19aa41d0e3e1b630a12fbc01ac184 ] rs9_of_clk_get() does not validate the clock index in the passed DT clock specifier. If DT specifies an incorrect and out-of-range index, this will access memory beyond the end of the clk_dif[] array. Fix by this adding a range check to rs9_of_clk_get(). Fixes: 892e0ddea1aa6f70 ("clk: rs9: Add Renesas 9-series PCIe clock generator driver") Signed-off-by: Geert Uytterhoeven Reviewed-by: Marek Vasut Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 80f03131429d7c2f99f32e5216accfa1821614a4 Author: Karl Mehltretter Date: Thu Sep 10 05:30:00 2026 +0200 clk: mediatek: reset: Fix device registration kernel-doc [ Upstream commit 8d5fa37307ac1f0612cf17ac0ccabcc258cc1526 ] The comment for mtk_register_reset_controller_with_dev() names the older helper and documents np rather than dev. The new helper takes a struct device and obtains its device node internally. Use the actual function and parameter names and clarify that failures return negative error codes. Fixes: 761bc64003e3 ("clk: mediatek: reset: Add new register reset function with device") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 6293a8b9f8f38214a573cf11534fb9b3980633b1 Author: Chaithanya Lagisetty Date: Tue Sep 8 05:37:22 2026 +0000 x86/svm: Avoid sign extension of SVM_EVTINJ_VALID in 64-bit expressions [ Upstream commit c5991239b148d40d4981901968b3a6a838ff517b ] SVM_EVTINJ_VALID is defined as (1 << 31), i.e. as an int with the sign bit set. Whenever it is used in a 64-bit expression the int is sign extended, so bits 63:32 end up set as well. Two 64-bit users are affected. verify_exception_info() uses the macro as a mask against a 64-bit value when it sanity checks hypervisor supplied exception information: u64 info = ghcb->save.sw_exit_info_2; ... if ((info & SVM_EVTINJ_VALID) && The mask is 0xffffffff80000000, so the check also passes when any bit of the error code in 63:32 is set while the valid bit itself is clear. svm_vmgexit_inject_exception() builds the value that KVM hands to an SEV-ES guest in GHCB SW_EXITINFO2: u64 data = SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_EXEPT | vector; For vector == X86_TRAP_GP this yields 0xffffffff8000030d instead of 0x000000008000030d. The field uses the EVENTINJ format, which holds the error code in bits 63:32, so KVM asks the guest to inject #GP with an error code of 0xffffffff. Linux guests only consume the error code when SVM_EVTINJ_VALID_ERR is set, which it is not here, so they are not affected in practice, but the value KVM writes is not the one it intends. Use BIT() instead, as is already done for most single bit definitions in this header. Every other user applies the macro to a u32, where the resulting bits are unchanged. Opportunistically give SVM_EVTINJ_VALID_ERR the same treatment, there's zero reason to open code BIT(). Fixes: 597cfe48212a ("x86/boot/compressed/64: Setup a GHCB-based VC Exception handler") Fixes: c3392d0ab714 ("KVM: SVM: Provide helpers to set the error code") Signed-off-by: Chaithanya Lagisetty Link: https://patch.msgid.link/20260908053722.3917934-1-nagachaithanya9911@gmail.com [sean: use BIT() for SVM_EVTINJ_VALID_ERR as well] Signed-off-by: Sean Christopherson Signed-off-by: Sasha Levin commit 2afa00e9497432da5a6976c8babddc4e5335ffc4 Author: Jared McArthur Date: Tue Sep 8 13:59:03 2026 -0500 arm64: dts: ti: k3-j784s4-j742s2-evm-common: Set ACSPCIe refclk to MAIN_PLL2_HSDIV4 for pcie1 [ Upstream commit 7e4b4f799bd043cb5b30176ddbe690a0fb5788bc ] Commit e3dfcf482d07 ("arm64: dts: ti: k3-j784s4-j742s2-evm-common: Enable ACSPCIE0 output for PCIe1") enabled the ACSPCIE0 buffers to provide the PCIe refclk for PCIe1, but introduced a bug where the clock is remporarily disabled during initialization. The ACSPCIe reference clock is muxable between multiple sources: SERDESx_REF_DER_OUT_CLK, MAIN_PLL2_HSDIV4_CLKOUT, and SERDESx_REF_OUT_CLK [0]. On reset, the refclk is set to the SERDESx_REF_DER_OUT_CLK. In the J742S2 and J784S4, "the SerDes PCIe Reference Clock Output will be temporarily disabled when changing Data Rates to or from 8.0 GT/s in Derived Refclk mode" [1]. Some external PCIe devices cannot tolerate the reference clock being disabled and will therefore fail to link. This advisory is described in more detail as: i2242 of the J784S4 Silicon Revision 1.0 (Rev. B) document [1]. The refclk for devices connected to PCIe1 is provided by the ACSPCIe buffers in the J742S2XH01EVM [2] and J784S4XEVM [3]. Work around the advisory by setting the ACSPCIe reference clock source to MAIN_PLL2_HSDIV4_CLKOUT. Use the TI SCI clock controller to assign the clock's source [4]. [0] https://www.ti.com/lit/zip/spruj52 [1] https://www.ti.com/lit/pdf/SPRZ536 [2] https://www.ti.com/lit/zip/SPAC001 [3] https://www.ti.com/lit/zip/SPRR458 [4] https://software-dl.ti.com/tisci/esd/latest/5_soc_doc/j784s4/clocks.html Fixes: e3dfcf482d07 ("arm64: dts: ti: k3-j784s4-j742s2-evm-common: Enable ACSPCIE0 output for PCIe1") Reviewed-by: Siddharth Vadapalli Signed-off-by: Jared McArthur Link: https://patch.msgid.link/20260908185903.404451-1-j-mcarthur@ti.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit a4eb4f32dbc935c3b6eb5dcb73ac0388b79aad68 Author: Nora Schiffer Date: Wed Sep 2 10:05:37 2026 +0200 ARM: dts: imx7-tqma7: correctly specify PMIC voltage constraints [ Upstream commit f322f8f68c2c3291633ead663effa3b25c18f7b1 ] regulator-(min|max)-microvolt refer to the supported voltages according to board design, not the possible range of the regulators themselves. Update the configuration for the TQMa7x's PMIC and also add a comment regarding the PMIC's VCC_SD switching feature. Fixes: a80a1af6ec8a ("ARM: dts: tq imx7 common board support") Signed-off-by: Nora Schiffer Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 9fd8d945e4ff7effb0d6408d2bd4038854e2264c Author: Roshan Kumar Date: Fri Sep 11 00:55:26 2026 +0530 drm/pl111: drop alpha formats the hardware cannot scan out [ Upstream commit 9d4c98219598e77ca7044c453ae6994519ac0a96 ] The PL110/PL111 controller scans out a single framebuffer and never blends its alpha channel with anything. In every pixel-format table each alpha-carrying entry (ARGB/ABGR in 8888, 1555 and 4444) maps to exactly the same register configuration as its XRGB/XBGR counterpart, so the alpha byte was never used by the hardware. Commit 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") added validation that warns when a plane exposes alpha formats without a pixel blend mode property, and PL111 does exactly that. With panic_on_warn enabled the warning prevents the syzkaller vexpress-a15 manager from booting. Drivers should not report formats they do not support, so remove the alpha formats from all variant tables: the generic PL110, PL111 and Nomadik tables in pl111_drv.c and the board-specific Integrator, IM-PD1, Versatile and RealView/Versatile-Express tables in pl111_versatile.c, plus the now dead case labels in the display setup and the Versatile syscon connector switch, instead of advertising a blend mode property. Behavior is unchanged for userspace that picks an XRGB/XBGR/RGB format; alpha-picking clients fall back to the identical X variant. Link: https://github.com/google/syzkaller/issues/7805 Fixes: 860e748bddcc ("drm: ensure blend mode supported if pixel format with alpha exposed") Signed-off-by: Roshan Kumar Changes in v2: drop the alpha formats entirely instead of advertising a DRM_MODE_BLEND_PIXEL_NONE property, per review feedback from Thomas Zimmermann. Leandro's Reviewed-by from v1 is not carried as the approach changed. Changes in v3: v2 missed the board-specific variant tables in pl111_versatile.c (Integrator, IM-PD1, Versatile, RealView and Versatile Express), which still exposed alpha formats and would fall through to the WARN_ONCE default in pl111_display_enable() on those boards. Pointed out by the sashiko AI reviewer. Reviewed-by: Thomas Zimmermann Link: https://github.com/google/syzkaller/issues/7805 Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260910192526.137057-1-roshaen09@gmail.com Signed-off-by: Sasha Levin commit d18f1ea4c71eb9a714c258249b14177be1856c35 Author: Sanghyun Park Date: Tue Sep 1 10:48:29 2026 +0900 bpf: Fix program BTF use-after-free in sleepable programs [ Upstream commit 88c9c6d0a766dd146545990053e8a04422ccb367 ] Object kfunc calls embed metadata owned by the program BTF. A sleepable program can remain active under Tasks Trace RCU after its last reference is dropped, while program teardown releases the BTF through ordinary RCU. The invocation can then dereference freed metadata in bpf_obj_new(). Move btf_put() into __bpf_prog_put_rcu(), the callback that frees the program. When teardown is deferred, that callback runs after the program's own grace period (Tasks Trace RCU for sleepable programs and ordinary RCU otherwise), so the BTF outlives every active invocation. The non-deferred path invokes the callback synchronously, so load-error cleanup stays direct. Fixes: 958cf2e273f0 ("bpf: Introduce bpf_obj_new") Signed-off-by: Sanghyun Park Signed-off-by: Andrii Nakryiko Reviewed-by: Sun Jian Reviewed-by: Emil Tsalapatis Link: https://lore.kernel.org/bpf/20260901014829.3504342-2-sanghyun.park.cnu@gmail.com Signed-off-by: Sasha Levin commit e2701d4a5151c5e748757be8b67c34e83c484c40 Author: Fabrice Gasnier Date: Fri Aug 21 16:57:40 2026 +0200 ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp135f-dk [ Upstream commit 2f92d900f262a16c8ae02daf53ae2910d07185f5 ] stm32mp135f-dk uses Microchip USB2514 HUB. Since vdda supply has been added, the regulator framework wrongly associates the 'vdda' supply dedicated to ADC, so the wrong regulator is referenced. Only the 3v3 regulator is used to supply both the digital and the analog part of the HUB. Fixes: 673655f7944f ("usb: misc: onboard_dev: add vdda support for Microchip USB2514") Signed-off-by: Gabriel Fernandez Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20260821-usb_fixes_vdda-v1-v2-3-23cc919b59fb@foss.st.com Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit 5acac42aa3e8c6243ece89dbac632c17373b92c3 Author: Fabrice Gasnier Date: Fri Aug 21 16:57:39 2026 +0200 ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp157c-ev1 [ Upstream commit dae62eda0c987f3b80d622d00a45fb0cec854054 ] stm32mp157c-ev1 uses Microchip USB2514 HUB. Since vdda supply has been added, the regulator framework wrongly associates the 'vdda' supply dedicated to ADC, so the wrong regulator is referenced. Only the 3v3 regulator is used to supply both the digital and the analog part of the HUB. Fixes: 673655f7944f ("usb: misc: onboard_dev: add vdda support for Microchip USB2514") Signed-off-by: Gabriel Fernandez Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20260821-usb_fixes_vdda-v1-v2-2-23cc919b59fb@foss.st.com Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit c555a53a2f5d288753825b62996d2900789f7b2d Author: Fabrice Gasnier Date: Fri Aug 21 16:57:38 2026 +0200 ARM: dts: stm32: fix vdda supply for onboard hub on stm32mp15 DK boards [ Upstream commit 8d8f88e0f3e602cd967bdd8d7bc218ac7613650a ] stm32mp15 DK boards use Microchip USB2514 HUB. Since vdda supply has been added, the regulator framework wrongly associates the 'vdda' supply dedicated to ADC, so the wrong regulator is referenced. Only the 3v3 regulator is used to supply both the digital and the analog part of the HUB. Fixes: 673655f7944f ("usb: misc: onboard_dev: add vdda support for Microchip USB2514") Signed-off-by: Gabriel Fernandez Signed-off-by: Fabrice Gasnier Link: https://lore.kernel.org/r/20260821-usb_fixes_vdda-v1-v2-1-23cc919b59fb@foss.st.com Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit a0d647d6f1f8d9978a60968de80ed8ea7ef3b5e7 Author: Justin Yeh Date: Tue Sep 8 09:38:40 2026 +0800 HID: i2c-hid: Unfollow the panel on shutdown [ Upstream commit 59fc35a1edbfa5405122d749cf8843da131fd796 ] i2c_hid_core_shutdown() sends SET_POWER(SLEEP) even for panel followers, but nothing in device_shutdown() guarantees whether the panel, and hence our own power, is still on by the time we get there. Do what i2c_hid_core_remove() does and just unfollow the panel. drm_panel_remove_follower() calls panel_unpreparing() only while the panel is still prepared, which powers us down properly; if it is already unprepared no transfer is attempted at all. On MT8196 the panel is unprepared long before us, so this also drops the ~2s i2c bus timeout from every reboot. Fixes: 96a37bfd232a ("HID: i2c-hid: Support being a panel follower") Suggested-by: Douglas Anderson Signed-off-by: Justin Yeh Reviewed-by: Douglas Anderson Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit 80a35fed108577d545cdd000bebb8e5617a7454c Author: Marek Vasut Date: Fri Aug 28 17:00:52 2026 +0200 ARM: dts: stm32: Drop bias-disable from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a [ Upstream commit 3572825773791f4258b553391f4e2187df321731 ] Drop bias-disable property from STM32MP15xx DHCOM SoM sdmmc1_b4_pins_a to fix the following DT checker warning. The bias-pull-up property is the only bias-related property that has to be present in those pinctrl node subnodes. " arch/arm/boot/dts/st/stm32mp153c-dhcom-drc02.dtb: pinctrl@50002000 (st,stm32mp157-pinctrl): sdmmc1-b4-0:pins1: {'pinmux': [10253, 10509, 10765, 11021, 12813], 'slew-rate': 1, 'drive-push-pull': True, 'bias-disable': True, 'bias-pull-up': True} is valid under each of {'required': ['bias-pull-up']}, {'required': ['bias-disable']} " Fixes: 7cd8567d988a ("ARM: dts: stm32: Enable internal pull-ups for SDMMC1 on DHCOM SoM") Signed-off-by: Marek Vasut Link: https://lore.kernel.org/r/20260828150111.173089-1-marex@nabladev.com Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit bb90936b3d3e181e1fc470db38b25a05e19ce7b5 Author: Lizhi Hou Date: Thu Sep 10 14:13:38 2026 -0700 accel/amdxdna: Fix unsafe use of handle_mm_fault() [ Upstream commit df4d5352063ac48e1d3566f64ec94baa8b5af94f ] handle_mm_fault() must not be called from the mmap callback because the VMA has not yet been linked. The handle_mm_fault() API contract assumes that the VMA is already linked. Remove the handle_mm_fault() call from the mmap callback. For imported BOs, mark the mapping as invalid and rely on the first command submission to fault in the pages. For shmem BOs, set the VM_MIXEDMAP flag and use vm_insert_pages(). Implement amdxdna_gem_mixed_vm_ops to handle the page faults. Fixes: e486147c912f ("accel/amdxdna: Add BO import and export") Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260910211338.1102315-1-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit d2d4408e6d980ceddd2c801d85ca60dbac4e6835 Author: Lizhi Hou Date: Wed Sep 2 11:09:55 2026 -0700 accel/amdxdna: Fix potential deadlock in BO open and close callbacks [ Upstream commit 1bc13a9d9366d68ebf7aa12137b362d539b4f0d0 ] In amdxdna_gem_obj_open(), abo->lock is held when calling amdxdna_gem_add_bo_usage(), which then acquires client->mm_lock. However, the heap update path may acquire these locks in the reverse order, creating a potential deadlock. Fix this by saving the client pointer locally before acquiring abo->lock, and releasing abo->lock before calling amdxdna_gem_add_bo_usage(). Apply the same change to amdxdna_gem_obj_close(). Fixes: 1f513a3ec3a9 ("accel/amdxdna: Add per-process BO memory usage query support") Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260902180955.3999242-2-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit 7a9f8974c4c6f1f4f4277e49f8c232e6e88bbe7b Author: Lizhi Hou Date: Wed Sep 2 11:09:54 2026 -0700 accel/amdxdna: Disable BO import via flink [ Upstream commit d0c0ffdba93a589f78a67c264f8a4b4998e103c3 ] Accessing abo->client in amdxdna_gem_del_bo_usage() may result in a use-after-free when the BO is imported via flink. Disable flink import by verifying that filp->driver_priv matches the client stored in abo->client before accessing the client. Fixes: 3cc5d7a59519 ("accel/amdxdna: Add carveout memory support for non-IOMMU systems") Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260902180955.3999242-1-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit 8e3690dae9404a61328da018e513c56855aeb1c9 Author: Brian Norris Date: Mon Aug 31 18:23:22 2026 -0700 PM: runtime: Only queue an idle check for RPM-linked suppliers [ Upstream commit be5755f023e7e02ec90bbd1d4ca63a0abe594733 ] When a device RPM-suspends, it queues up an idle check for all of its suppliers, in case that device was the last consumer, and those suppliers are now able to suspend. Today, we do this for all suppliers, and not only for those suppliers that are marked for use by runtime PM. This isn't directly harmful, but it is a bit wasteful, and also may induce unexpected suspend attempts (e.g., if a device was purposely last touched with pm_runtime_put_noidle()). To avoid excess idle checks, only call pm_request_idle() on linked suppliers that opted into runtime PM. Noticed by inspection of trace logs. This is not expected to have a functional impact on systems that are using device links properly, and should only be considered an optimization. Fixes: 5244f5e2d801 ("PM: runtime: Defer suspending suppliers") Signed-off-by: Brian Norris Link: https://patch.msgid.link/20260901013341.1417232-1-briannorris@chromium.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 9f81d36db94f3df65b6fa76c170032581024b3fb Author: Xueqin Luo Date: Fri Aug 28 11:24:57 2026 +0800 cpuidle: teo: Do not return a disabled idle state [ Upstream commit 60d5fca628f94f8f23398ad62d80aa284dae6571 ] If idle state 0 is disabled and none of the enabled idle states satisfies the PM QoS latency constraint, constraint_idx in teo_select() stays at its initial value of 0, because the loop that updates it starts at state 1, and so the candidate state index is capped at state 0, which is disabled, and that state is returned to the caller. The cpuidle core does not validate the returned state index against the per-state disable flags, so the CPU ends up entering the disabled state 0. To address this, ensure that constraint_idx is at least equal to the index of the first enabled idle state (idx0), so that the candidate state is never capped to a disabled one. Fixes: c410a9a142f1 ("cpuidle: teo: Change the main idle state selection logic") Signed-off-by: Xueqin Luo Reviewed-by: Christian Loehle Link: https://patch.msgid.link/20260828032457.2317326-1-luoxueqin@kylinos.cn Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 9b619eeabc733e5ee245a0d0039010834395d6df Author: Aiman Najjar Date: Sat Aug 15 14:58:01 2026 -0400 HID: nintendo: add support for PDP Afterglow controller [ Upstream commit 3774b1dd8cbce8dd75dd677fd68c5a2dc70860c6 ] Add support for the PDP Afterglow (0e6f:018c), a licensed pro controller. Commit 9146038120a6 ("HID: nintendo: add support for HORI Wireless Switch Pad") applied X/Y button swap to all Licensed Pro controllers which caused the North/West buttons to come up swapped for PDP Afterflow. The swapped layout seems to be specific to HORI, so restrict the quirk to HORI devices and use the standard mapping for all other licensed pro controllers. Fixes: 9146038120a6 ("HID: nintendo: add support for HORI Wireless Switch Pad") Link: https://lore.kernel.org/all/20260527-hori-support-v2-1-195c2f832112@hectorzelaya.dev/ Signed-off-by: Aiman Najjar Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin commit 88dee93cf353b022db97f4cbf2c35f110bba397b Author: Alain Volmat Date: Tue Jul 21 19:00:27 2026 +0200 ARM: dts: stm32: add LTDC / DCMIPP access controller for STM32MP135 [ Upstream commit 0c354b85cc95b5d563a581c8dbca57b4942bfae7 ] Add ETZPC as an access controller for the LTDC and DCMIPP found on the stm32mp135. Fixes: a06b9560eb6c ("ARM: dts: stm32: add ETZPC as a system bus for STM32MP13x boards") Signed-off-by: Alain Volmat Link: https://lore.kernel.org/r/20260721-etzpc-mp13-ltdc-dcmipp-fix-v1-1-a969f2ab8da1@foss.st.com Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit b9d8bbefdc243ae1500596346617f167748d6735 Author: Ahmad Fatoum Date: Thu Jun 11 20:12:35 2026 +0200 ARM: dts: stm32: fairytux2: change stdout-path baud rate from 9600 to 115200 [ Upstream commit 5404275bc121a7b06676777c3362d85fb75356fc ] The default baud rate when none is specified is up to the DT consumer. In the case of the Linux STM32 serial driver, it defaults to 9600 baud, which differs from the 115200 baud that this board's barebox bootloader configured. This went unnoticed, because barebox automatically fixes up a console= command-line option that looks like this on the LXA boards: console=ttySTM0,115200n8 This had precedence over the 9600 fallback baud rate. But when EFI booting a kernel via GRUB, we run into this issue, because the barebox-provided command-line is disregarded by GRUB. Fix this by explicitly setting the baud rate to the correct 115200. Fixes: 8c6d469f5249 ("ARM: dts: stm32: lxa-fairytux2: add Linux Automation GmbH FairyTux 2") Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20260611-lxa-stdout-path-baudrate-v1-3-59b60a5069ff@pengutronix.de Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit 983248c1055b3c5a13b081622a95fcaab9b9e114 Author: Ahmad Fatoum Date: Thu Jun 11 20:12:34 2026 +0200 ARM: dts: stm32: lxa-tac: change stdout-path baud rate from 9600 to 115200 [ Upstream commit 85bb59fc12ef439b248d5f4faf846d5566b701fe ] The default baud rate when none is specified is up to the DT consumer. In the case of the Linux STM32 serial driver, it defaults to 9600 baud, which differs from the 115200 baud that this board's barebox bootloader configured. This went unnoticed, because barebox automatically fixes up a console= command-line option that looks like this on the LXA boards: console=ttySTM0,115200n8 This had precedence over the 9600 fallback baud rate. But when EFI booting a kernel via GRUB, we run into this issue, because the barebox-provided command-line is disregarded by GRUB. Fix this by explicitly setting the baud rate to the correct 115200. Fixes: 518272af37b2 ("ARM: dts: stm32: lxa-tac: add Linux Automation GmbH TAC") Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20260611-lxa-stdout-path-baudrate-v1-2-59b60a5069ff@pengutronix.de Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit fa3721ae3208ba24cdbbc1a1370a0c8ea57c4e72 Author: Ahmad Fatoum Date: Thu Jun 11 20:12:33 2026 +0200 ARM: dts: stm32: lxa-mc1: change stdout-path baud rate from 9600 to 115200 [ Upstream commit fc3c0ffefc169719316eddb8c36e2427e11ce713 ] The default baud rate when none is specified is up to the DT consumer. In the case of the Linux STM32 serial driver, it defaults to 9600 baud, which differs from the 115200 baud that this board's barebox bootloader configured. This went unnoticed, because barebox automatically fixes up a console= command-line option that looks like this on the LXA boards: console=ttySTM0,115200n8 This had precedence over the 9600 fallback baud rate. But when EFI booting a kernel via GRUB, we run into this issue, because the barebox-provided command-line is disregarded by GRUB. Fix this by explicitly setting the baud rate to the correct 115200. Fixes: 666b5ca85cd3 ("ARM: dts: stm32: add STM32MP1-based Linux Automation MC-1 board") Signed-off-by: Ahmad Fatoum Link: https://lore.kernel.org/r/20260611-lxa-stdout-path-baudrate-v1-1-59b60a5069ff@pengutronix.de Signed-off-by: Alexandre Torgue Signed-off-by: Sasha Levin commit bb865c04c2cd318b5f9f46ad9f65f9b70549db05 Author: Xueqin Luo Date: Thu Aug 27 17:48:19 2026 +0800 cpuidle: menu: Do not return a disabled idle state [ Upstream commit d594187cafd5ad65afc5f00242f8fa20e1d8c0f1 ] When idle state 0 is disabled and the PM QoS latency constraint is zero (latency_req == 0), the first branch of the || in the early-return condition of menu_select() is taken immediately, so state 0 is returned regardless of its disable flag. Address this by making the !disable check a prerequisite for the entire early-return condition, so that when state 0 is disabled the normal state selection loop is used instead, which already skips disabled states. Fixes: 53812cdc9100 ("cpuidle: menu: Move the latency_req == 0 special case check") Signed-off-by: Xueqin Luo Link: https://patch.msgid.link/20260827094820.3900062-1-luoxueqin@kylinos.cn Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 3eda328cc6983baa89958bbfbd8a268b1ce34672 Author: Takashi Sakamoto Date: Fri Sep 11 23:16:02 2026 +0900 firewire: core: remove unused link field in fw_packet structure [ Upstream commit 00d4d31e4fdfe51312f0184f8d162b8d4de172dc ] The link field in fw_packet structure has never been used since it was added. Fixes: 3038e353cfaf ("firewire: Add core firewire stack.") Link: https://lore.kernel.org/r/20260911141602.3288806-1-o-takashi@sakamocchi.jp Signed-off-by: Takashi Sakamoto Signed-off-by: Sasha Levin commit 8f60ca56e73aeec011c281f5cbc3e65f8147b76e Author: Karl Mehltretter Date: Sat Sep 12 00:28:07 2026 +0200 firewire: cdev: Fix FW_CDEV_IOC_CREATE_ISO_CONTEXT references in kernel-doc [ Upstream commit 0a6cf2b7adcbd362039e9d282f73aff3f24022ca ] The fw_cdev_event_iso_interrupt and fw_cdev_event_iso_interrupt_mc comments refer to FW_CDEV_CREATE_ISO_CONTEXT, but the ioctl is named FW_CDEV_IOC_CREATE_ISO_CONTEXT. Correct both references. The misspellings were introduced separately with the userspace interface documentation and multichannel reception support. Fixes: 7ada60e36764 ("firewire: Document userspace ioctl interface.") Fixes: 872e330e3880 ("firewire: add isochronous multichannel reception") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://lore.kernel.org/r/20260911222807.7673-1-kmehltretter@gmail.com Signed-off-by: Takashi Sakamoto Signed-off-by: Sasha Levin commit fc28db21ba3f6d449fa93fe1ededa3ca90310f28 Author: Sumeet Pawnikar Date: Sat Aug 22 17:12:36 2026 +0530 thermal: gov_power_allocator: Fix NULL pointer dereference in update_tz() [ Upstream commit d3515092f1bff9cfb4d99ea82dcd4ac66f32f50d ] power_allocator_update_tz() unconditionally derives the trip descriptor of params->trip_max as below, const struct thermal_trip_desc *td = trip_to_trip_desc(params->trip_max); and then walks td->thermal_instances. However, params->trip_max is allowed to be NULL and in that case the list walk dereferences a bogus pointer derived from NULL which oops the kernel. get_governor_trips() picks trip_switch_on and trip_max out of the trip table of the zone. When the zone has neither a passive nor an active trip point, last_active is NULL and params->trip_max is left NULL. This is an explicitly supported configuration, as documented in the function get_governor_trips() as below, If there are no passive or active trip points, then the governor won't do anything. In fact, its throttle function won't be called at all. Return early from power_allocator_update_tz() when params->trip_max is NULL and only compute the trip descriptor after that check. There is nothing to update in that case anyway, with no trip_max and there are no thermal instances for the governor to account for, num_actors stays zero and total_weight is irrelevant. Fixes: 912e97c67cc3 ("thermal: gov_power_allocator: Move memory allocation out of throttle()") Signed-off-by: Sumeet Pawnikar Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/20260822114236.15998-1-sumeet4linux@gmail.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 0c41e39dd700bbabbbebc401b6a737068071bfa1 Author: Rafael J. Wysocki Date: Thu Sep 10 19:56:16 2026 +0200 ACPI: glue: Fix up and adjust acpi_unbind_one() [ Upstream commit 693546852656075e0247ac637b05625ead134eff ] Since none of the acpi_unbind_one() callers check its return value and it always returns 0 anyway, make it void. Also notice that unlocking physical_node_lock for the given ACPI device should be carried out before dropping the reference to it in case that reference is the last one (highly unlikely), so rearrange the code to make that happen. Fixes: 3e3327837c18 ("ACPI: Use list_for_each_entry() in acpi_unbind_one()") Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/10940500.nUPlyArG6x@rafael.j.wysocki Signed-off-by: Sasha Levin commit 93b0fb3fd6d0b1acf70ff587df5570ddb09a0293 Author: Rafael J. Wysocki Date: Thu Sep 10 19:56:10 2026 +0200 ACPI: glue: Rearrange acpi_bind_one() to avoid breakage [ Upstream commit fcfb2b562115632e0a60a0928dca495f98eb335c ] Rearange the code in acpi_bind_one() to avoid situations in which the existing ACPI companion of the given device would be replaced with NULL due to a memory allocation error or because somebody tries to bind a physical device with an ACPI companion to a different ACPI device erroneously. Fixes: 7b1998116bbb ("ACPI / driver core: Store an ACPI device pointer in struct acpi_dev_node") Signed-off-by: Rafael J. Wysocki [ rjw: Merged two conditionals to avoid redundant check ] Link: https://patch.msgid.link/3465482.44csPzL39Z@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit c2f751ac0a4b878c8869939e6a4d239c3de45786 Author: Rafael J. Wysocki Date: Thu Sep 10 19:56:04 2026 +0200 ACPI: glue: Carry out companion lookup under bus_type_sem [ Upstream commit c94619c8a5b5d3b980433d247ac87a2d1c827cb6 ] When acpi_device_notify() looks up an ACPI companion for the given device, it invokes callbacks from struct acpi_bus_type() without synchronization which may lead to a use-after-free if the driver module containing those callbacks is unloaded at the same time. Address this by holding bus_type_sem throughout the entire ACPI companion lookup and the execution of the .setup() callback in struct acpi_bus_type (if present) instead of dropping the semaphore (prematurely) after finding a matching struct acpi_bus_type. For this purpose, rename acpi_get_bus_type() to acpi_companion_lookup(), make it return a struct acpi_device pointer, and move the relevant code from acpi_device_notify() to it. Also notice that the only case in which the .bind() callback from an ACPI scan handler may need to be invoked is when the given device is a platform one, so adjust acpi_device_notify() accordingly and drop the "done" label that is not used any more from it. Fixes: 2ef5236660b6 ("ACPI: glue: Look for ACPI bus type only if ACPI companion is not known") Signed-off-by: Rafael J. Wysocki Link: https://patch.msgid.link/3089807.e9J7NaK4W3@rafael.j.wysocki Signed-off-by: Sasha Levin commit fc76fdff4bd74775e4f7cba755ed2645cd2bde73 Author: Christoph Hellwig Date: Mon Sep 7 10:40:54 2026 +0300 block: improve aligning down bios in bio_iov_iter_bounce_write [ Upstream commit 9dd2351aef70512373f79ace94097a32e5ed0f70 ] Sashiko complained about bio_iov_iter_align_down potentially dropping bvecs, and thus losing bounce folios. While losing bio_vecs is real, bio_iov_iter_bounce_write allocates all segments and thus the entire bio in multiples of the minsize, thus making the rounding down redundant. Replace it with a safety rounding down of this_len in case something odd happens to the greedy folio allocation helper. Fixes: e7b8b3c5b2a6 ("block: align down bounces bios") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://patch.msgid.link/20260907074111.721054-4-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit be85af995be54ed3a8584ca9fd2a98b43ec90d99 Author: Christoph Hellwig Date: Mon Sep 7 10:40:53 2026 +0300 block: cap atomic write size by PI buffer size constraints [ Upstream commit 1418b5633ca973723fd20db5c394e5b031f2bd85 ] As Sashiko points out, limiting the I/O size by the size of the available PI buffer can cause inconsistencies for atomic writes. This also limit atomic_write_max_sectors in blk_validate_integrity_limits. Fixes: ec7f31b2a2d3 ("block: make bio auto-integrity deadlock safe") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://patch.msgid.link/20260907074111.721054-3-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit 6519a6aad3f481434c0433d68f089df1956b661e Author: Christoph Hellwig Date: Mon Sep 7 10:40:52 2026 +0300 block: avoid integer overflows in max_integrity_io_size [ Upstream commit d952f6acb7acc9b94c8c25014b1f468a680c6c00 ] Sashiko reports that the calculation in max_integrity_io_size could overflow a u32 when using 16kiB or larger LBA sizes. Fix this by evaluating the maximum size as a 64-bit integer. Fixes: ec7f31b2a2d3 ("block: make bio auto-integrity deadlock safe") Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Link: https://patch.msgid.link/20260907074111.721054-2-hch@lst.de Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin commit e33759a1f4f50a2acd609acff81c0e855df111ba Author: Jan Kara Date: Wed Sep 2 16:36:57 2026 +0200 gfs2: Fix journaled truncate range end offset [ Upstream commit a52652efd8f985397e87669f505af83f06e335cf ] The third argument to truncate_pagecache_range() is the inclusive end offset, but gfs2_journaled_truncate_range() passes the length of each chunk. A hole punch at an offset larger than its length therefore creates an inverted range. Commit 86066914edff ("gfs2: Don't support fallocate on jdata files") disables fallocate for jdata files. Otherwise, the following bug could occur: The MM truncation path then underflows the unsigned partial-folio length and passes an oversized range to folio_zero_range(), triggering a BUG. Pass the last byte of the chunk so page-cache invalidation covers the intended range. Fixes: 4e56a6411fbc ("gfs2: Implement fallocate(FALLOC_FL_PUNCH_HOLE)") Reported-by: VEGA Assisted-by: LLM Signed-off-by: Jan Kara Signed-off-by: Andreas Gruenbacher Signed-off-by: Sasha Levin commit 048df7bc00734d53f7c7d9dfaf7604d811fadae1 Author: Jiawen Liu <1298662399@qq.com> Date: Fri Sep 4 14:01:35 2026 +0400 memory: exynos5422-dmc: handle clock enable failures [ Upstream commit cce46902ea9fcd585cd200fffa3166f63bc571f1 ] Check the return values of clk_prepare_enable() for fout_bpll and mout_bpll. If enabling fout_bpll fails, propagate the error. If enabling mout_bpll fails, disable fout_bpll before returning. This keeps the clock enable count balanced on probe error paths. Fixes: 6e7674c3c6df ("memory: Add DMC driver for Exynos5422") Signed-off-by: Jiawen Liu <1298662399@qq.com> Reviewed-by: Lukasz Luba Link: https://patch.msgid.link/tencent_B0189529F550458590E3BA614EAB800FBF08@qq.com Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin commit 2a89f5dc03e22e1481a3a2b3860320c4fde386a8 Author: Karl Mehltretter Date: Sat Aug 29 21:43:14 2026 +0200 crypto: lskcipher - preserve state across unaligned chunks [ Upstream commit ba871255f796d1f599ba710f03e1803d1b374a75 ] crypto_lskcipher_crypt_unaligned() splits a request into page-sized chunks but never sets CRYPTO_LSKCIPHER_FLAG_CONT, so a stateful algorithm restarts from its keyed state at every page boundary. It also marks every chunk CRYPTO_LSKCIPHER_FLAG_FINAL, which is wrong but harmless: chunks are trimmed to a multiple of the chunk size, so the trailing partial block that FINAL guards against is caught after the loop instead. ARC4 is the only lskcipher with internal state, and cbc, the other in-tree user of the direct API, never passes more than one block, so this went unnoticed. bpf_crypto_crypt() however hands __bpf_dynptr_data() to crypto_lskcipher_encrypt() unchecked, leaving both alignment and length to the BPF program. An 8192-byte ARC4 request offset by one byte comes back with its second page identical to its first: the keystream is reused. Set FINAL only on the last chunk and CONT after the first, mirroring the progression used by crypto_lskcipher_crypt_sg(). Fixes: 0ae4dcc1ebf6 ("crypto: skcipher - Add internal state support") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 7e7ec8c8b16138e592e2a441ec3afa2f17607e56 Author: Linmao Li Date: Fri Aug 28 17:32:09 2026 +0800 crypto: mxs-dcp - handle zero-length skcipher requests [ Upstream commit ac1d6a65a1e1f069f119df42c6b57dbdff5f6be8 ] Zero-length skcipher requests are valid no-ops, but MXS-DCP queues them. When such a request reaches the worker, last_out_len remains zero. The CBC completion path then subtracts AES_BLOCK_SIZE from this unsigned value when updating the IV, causing the offset to underflow. On decryption, the resulting source address precedes aes_in_buf. Return success before enqueueing zero-length requests. This avoids the invalid source access and leaves the IV unchanged for a no-op. Fixes: fadd7a6e616b ("crypto: mxs-dcp - Fix AES issues") Signed-off-by: Linmao Li Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 9c35f7d27ef103ce8f3ec60bcfc39a138cca7ea7 Author: Jérémy Jean Date: Wed Aug 26 10:37:44 2026 +0000 crypto: rsassa-pkcs1 - reject undersized keys when verifying [ Upstream commit 364e520095b26fa551a8e92f52119d0f38a4177b ] rsassa_pkcs1_verify() accepts any nonzero key size. With a one-byte key and a zero RSA result, the leading-zero handling decrements dst_len to zero and advances out_buf past the allocation. The next out_buf[0] access reads out of bounds. KASAN reports: BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_verify+0x79d/0x900 Read of size 1 at addr ... The buggy address is located 0 bytes to the right of allocated 73-byte region [...] Reject keys shorter than the minimum PKCS#1 v1.5 encoded message size. Fixes: 3d5b1ecdea6f ("crypto: rsa - RSA padding algorithm") Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean Reviewed-by: Sudhakar Kuppusamy Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit ec2a9b7252fce1d140445d24ac4557ba34bea244 Author: Jérémy Jean Date: Wed Aug 26 10:37:43 2026 +0000 crypto: rsassa-pkcs1 - reject undersized keys when signing [ Upstream commit 4cf50332b5384ea13f6f896d5cf84e05b5b6484a ] rsassa_pkcs1_sign() subtracts 11 from the unsigned key size before checking that the key is large enough for PKCS#1 v1.5 padding: if (slen + hash_prefix->size > ctx->key_size - 11) return -EOVERFLOW; If the RSA modulus is shorter than 11 bytes, the subtraction wraps. With a one-byte key and hash=none, the padding memset() writes past the output buffer. KASAN reports: BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_sign+0x1ad/0x3b0 Write of size 4294967294 at addr ... The buggy address is located 0 bytes to the right of allocated 1-byte region [...] Reject keys shorter than the minimum encoded message size. Fixes: 3d5b1ecdea6f ("crypto: rsa - RSA padding algorithm") Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean Reviewed-by: Sudhakar Kuppusamy Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 873b44f8121cf83aee1782959fa371d74bb0928e Author: Ahsan Atta Date: Wed Aug 26 10:39:31 2026 +0100 crypto: qat - release instance on DH fallback allocation failure [ Upstream commit 307e27d3e07f58b6d42a8c64d31304aa614ab7d2 ] qat_dh_init_tfm() acquires a QAT crypto instance before allocating the software fallback transform. If fallback allocation fails, the instance reference is leaked and the device remains permanently in use. Release the instance before returning the allocation error. Fixes: 5d5bd24f4155 ("crypto: qat - implement dh fallback for primes > 4K") Signed-off-by: Ahsan Atta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 39634fe8cee9833891290cf5174cf06472ecef83 Author: Ahsan Atta Date: Mon Aug 24 11:17:44 2026 +0100 crypto: qat - avoid OOB read when stripping RSA leading zeros [ Upstream commit ac508238898058f0b09b18a7891fb31279617781 ] The logical AND operator uses short-circuit evaluation: the first operand is always evaluated, while the second is evaluated only if the first is true. Because the first operand dereferences a pointer, it may cause an out-of-bounds access before the bounds check in the second operand is evaluated. Resolve this by checking the vlen prior to the pointer being dereferenced. Fixes: a990532023b9 ("crypto: qat - Add support for RSA algorithm") Signed-off-by: Ahsan Atta Reviewed-by: Giovanni Cabiddu Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit e6183d63aa60f31a4d2b6dea4ad52a62cd4cfffc Author: Mohamad Raizudeen Date: Sat Aug 22 14:15:08 2026 +0530 crypto: amlogic - Fix DMA memory leak in cipher error path [ Upstream commit 6c2373dd818b777d0a81eb02acebc03940552dcd ] A DMA memory leak occurs in meson_cipher() on the mapping error paths. The driver jumps to the end of the function without unmapping the previously mapped source scatterlist and key/IV buffer when the destination apping fails. Additionally, a memory leak occurs when a scatterlist mapping succeeds but the returned count exceeds the driver's MAXDESC limit. In this case, the driver rejects the mapping without unmapping it. The BIDIRECTIONAL mapping branch also lacks the required 'MAXDESC -3' upper bound check. Fix this by introducing proper error labels, error_src and error_keyiv and unmap resources immediately inside the calidation checks to ensure all successfully mapped resources are cleaned up before returning the error. Fixes: 48fe583fe541 ("crypto: amlogic - Add crypto accelerator for amlogic GXL") Signed-off-by: Mohamad Raizudeen Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 542299e66294748425179ddf7338b6e01a8eac77 Author: Thomas Huth Date: Wed Aug 19 17:18:45 2026 +0200 crypto: inside-secure - Zeroize temporary arrays on stack with sensitive data [ Upstream commit 5c87bcb2f98dbfe08efa016af037b0f9701ba381 ] key_tmp[] in safexcel_xcbcmac_setkey() and consts[] / _const[] in safexcel_cmac_setkey() contain crypto key material that should not get exposed to the outside once the function is done. Scrub the arrays with memzero_explicit() to avoid that the data could leak via the stack. Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260813134953.979481-1-thuth%40redhat.com Fixes: 38f21b4bab11f ("crypto: inside-secure - Added support for the AES XCBC ahash") Fixes: 7a627db9cafdb ("crypto: inside-secure - Added support for the AES-CMAC ahash") Acked-by: Antoine Tenart Signed-off-by: Thomas Huth Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 2689a09278cace122a3965c447a15fec91bef1b4 Author: Eric Dumazet Date: Mon Sep 7 07:58:40 2026 +0000 ip_tunnel: use WRITE_ONCE in ip_tunnel_encap_setup [ Upstream commit 88b84cae6b94087d3a9679845fe28ad19c7bef8b ] Update ip_tunnel_encap_setup() to use WRITE_ONCE() when writing to encap fields (type, sport, dport, flags) and hlen fields. This ensures that concurrent lockless readers (like fill_info) do not see torn writes. Also remove the unsafe memset() on t->encap which could cause concurrent readers to transiently see zeroed fields. Removing it also fixes a bug where t->encap was left cleared even if ip_encap_hlen() failed, resulting in partial configuration. Fixes: 56328486539d ("net: Changes to ip_tunnel to support foo-over-udp encapsulation") Signed-off-by: Eric Dumazet Acked-by: Lorenzo Bianconi Link: https://patch.msgid.link/20260907075846.2913645-4-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit b1653742c1ad7313959aa0f4e8508192360b7059 Author: Eric Dumazet Date: Mon Sep 7 07:58:39 2026 +0000 sit: charge ip_tunnel_prl_entry allocations to memcg [ Upstream commit 40a2b90f5190fcc7b083809fa93f2799abefeeb1 ] ipip6_tunnel_add_prl() allocates struct ip_tunnel_prl_entry for each potential router entry added via SIOCADDPRL. An unprivileged user with CAP_NET_ADMIN in a user namespace can add an unbounded number of entries, consuming uncharged kernel memory. Commit 1b51d8271973 ("memcg: ipv6/sit: account and don't WARN on ip_tunnel_prl structs allocation") added accounting to the temporary buffer in ipip6_tunnel_get_prl(), but missed the entry allocations in ipip6_tunnel_add_prl(). Use GFP_KERNEL_ACCOUNT when allocating struct ip_tunnel_prl_entry. Fixes: 1b51d8271973 ("memcg: ipv6/sit: account and don't WARN on ip_tunnel_prl structs allocation") Signed-off-by: Eric Dumazet Acked-by: Lorenzo Bianconi Link: https://patch.msgid.link/20260907075846.2913645-3-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 4c543d838bde3faec52bd762d8469b9d1ad2ed2d Author: Eric Dumazet Date: Mon Sep 7 07:58:38 2026 +0000 sit: fix UAF in ipip6_tunnel_del_prl() [ Upstream commit 5145bb6a2c2683d541828f86d5321e0565f2e30c ] When flushing all potential router list (PRL) entries, ipip6_tunnel_del_prl() called call_rcu(&x->rcu_head, prl_list_destroy_rcu) before clearing t->prl. A concurrent reader in isatap_chksrc() could enter an RCU read-side critical section after call_rcu() but before t->prl is set to NULL, allowing prl_list_destroy_rcu() to free nodes while the reader traverses them. Clear t->prl using RCU_INIT_POINTER() before invoking call_rcu(). Also use rcu_assign_pointer() when unlinking individual entries. Fixes: ef9a9d1183b3 ("ipv6 sit: RCU conversion phase I") Signed-off-by: Eric Dumazet Link: https://patch.msgid.link/20260907075846.2913645-2-edumazet@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 3775aeb07f40f932e055aaeb82c6619e9f5418bf Author: Jeff Johnson Date: Thu Aug 13 10:41:02 2026 -0700 wifi: ath9k: use rcu_dereference_bh() for sta->rates in ath_merge_ratetbl() [ Upstream commit 93de43318ecdf0ff5f0e6125fe33a8b30fd10c66 ] Commit c4f518736472 ("wifi: ath9k: Remove redundant rcu_read_lock/unlock() in spin_lock") removed the explicit rcu_read_lock()/rcu_read_unlock() pair from ath_txq_schedule(), relying on spin_lock_bh() to provide an implicit RCU read-side critical section. That is correct on kernels without CONFIG_DEBUG_LOCK_ALLOC, where rcu_read_lock_any_held() falls back to !preemptible() as a proxy, and spin_lock_bh() disables preemption. However, rcu_dereference() in ath_merge_ratetbl() checks rcu_read_lock_held(), which under CONFIG_DEBUG_LOCK_ALLOC only returns true when lock_is_held(&rcu_lock_map) — set exclusively by an explicit rcu_read_lock(). A spin_lock_bh() does not set rcu_lock_map, so on a CONFIG_DEBUG_LOCK_ALLOC + CONFIG_PROVE_RCU kernel, any call path that reaches ath_merge_ratetbl() with a non-NULL sta will produce a lockdep splat. The correct fix is to use rcu_dereference_bh(), whose validity check calls rcu_read_lock_bh_held(), which returns true whenever BH is disabled (in_softirq() || irqs_disabled()). This matches the actual protection at all callers of ath_set_rates() that pass a non-NULL sta: they all hold a spin_lock_bh() (either sc->chan_lock or txq->axq_lock). Fixes: c4f518736472 ("wifi: ath9k: Remove redundant rcu_read_lock/unlock() in spin_lock") Assisted-by: LLM Acked-by: Toke Høiland-Jørgensen Link: https://patch.msgid.link/20260813-ath9k-rcu-fix-v1-1-424665a1ce60@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 57cd52b573d0ace3ac1bbc1c61e012255e95f06b Author: Abel Vesa Date: Wed Aug 26 11:35:56 2026 +0300 arm64: dts: qcom: eliza: Connect USB3 PHY pipe clock to GCC [ Upstream commit 1c34e5dd83217f8952c8d96f9851981999acc8b7 ] The GCC USB3 primary PHY pipe clock is sourced by the USB3 pipe output of the USB/DP QMP PHY. The corresponding GCC clock input was left as an empty clock specifier when the USB nodes were added. Connect the QMP PHY USB3 output to GCC so the USB3 PHY pipe clock can propagate to the USB controller. Fixes: 88ddafb01ec0 ("arm64: dts: qcom: eliza: Describe the ADSP and USB related nodes") Reviewed-by: Konrad Dybcio Signed-off-by: Abel Vesa Reviewed-by: Taniya Das Link: https://lore.kernel.org/r/20260826-dts-qcom-eliza-add-missing-usb-dp-phy-clk-to-gcc-v2-1-bf6746a849ba@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 3af7d42fd14fe4f0aad7a256920a0ef74714ae12 Author: Luca Weiss Date: Tue Sep 1 11:06:13 2026 +0200 arm64: dts: qcom: sm7225-fairphone-fp4: Disable PMK8350 PON [ Upstream commit 5c088a33e3a9bb236c475b7230df275fc1e51eda ] Two PMICs on this phone have a PON block, the PM6350 and PMK8350. Only one should be enabled at one time, so disable PMK8350 PON and keep the PM6350 PON. Fixes: 582e7c1026fa ("arm64: dts: qcom: sm7225-fairphone-fp4: Add pmk8350 PMIC") Signed-off-by: Luca Weiss Reviewed-by: Abel Vesa Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260901-fp4-pmk8350-pon-v1-1-e05937e9c860@fairphone.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 00ceb9d0a16a3ca36c3db9c2ee3edd7e4ebc9eef Author: Karl Mehltretter Date: Sat Sep 5 03:07:06 2026 +0200 cpufreq/amd-pstate: Remove obsolete amd_dynamic_epp documentation [ Upstream commit c8663e0457e6e6c72006478f4b6da99060030ec1 ] The amd_dynamic_epp command-line parameter was removed. Dynamic EPP is now selected through the per-policy energy_performance_preference attribute, which is already documented. Fixes: 32692fcf61ed ("cpufreq/amd-pstate: Remove "amd_dynamic_epp" cmdline and "dynamic_epp" sysfs") Assisted-by: LLM Signed-off-by: Karl Mehltretter Reviewed-by: K Prateek Nayak Reviewed-by: Randy Dunlap Link: https://lore.kernel.org/r/20260905010706.57380-1-kmehltretter@gmail.com Signed-off-by: Mario Limonciello Signed-off-by: Sasha Levin commit b7af038d60f7fc5a441a116c93d9d9288a3fd02b Author: Linus Walleij Date: Tue Sep 1 22:02:11 2026 +0200 regulator: ab8500: Propagate mode enable read errors [ Upstream commit 71ac8878573058e2b85210760ccaeaac90796c35 ] For regulators whose enable and mode share a state field, set_mode() first reads that field so changing the requested mode does not enable a disabled rail. A register read error is currently treated as true and the driver proceeds to write the new mode, potentially enabling a rail whose state is unknown. Return the read error without changing the register or cached mode. References: AB8500 User Manual, UM0836 Rev 3, p. 227; AB8505 User Manual, DM00046744 Rev 3, p. 237 Fixes: 438e695b87e0 ("regulator: ab8500: Get rid of is_enabled from struct ab8500_regulator_info") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-6-fe88b01829bf@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 1e8ee4d94ab531d0abaecb5a630561a297cd4bc4 Author: Linus Walleij Date: Tue Sep 1 22:02:10 2026 +0200 regulator: ab8500: Test dedicated enable bits only [ Upstream commit a5ee78846015512b4d3d32f8aa463024a23234ce ] Some regulator control registers have independent enable and low-power bits. is_enabled() currently tests their combined update mask, so an off regulator with its low-power bit set is incorrectly reported as enabled. Add an optional enable mask and use it for VINTCORE, AB8500 TVOUT, AB8505 ADC, and AB8505 VAUX5/6. Regulators whose two-bit field encodes the complete operating state continue to test the full update mask. References: AB8500 User Manual, UM0836 Rev 3, p. 214; AB8505 User Manual, DM00046744 Rev 3, pp. 171-172 and 223 Fixes: 65e03ed2d0cd ("regulators: Fixed errors in ab8500 register mapping") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-5-fe88b01829bf@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 30bae6c90e201fc08b37c3cddc2a3d6378fd4252 Author: Linus Walleij Date: Tue Sep 1 22:02:09 2026 +0200 regulator: ab8500: Treat cut 1.0 VAUX3 as fixed [ Upstream commit b9fc8a8d31b914b09329240f532ff0e9c00cd727 ] The early-cut workaround currently gives AB8500 cut 1.0 the 16 programmable VAUX3 settings introduced with cut 1.1. On cut 1.0 the selector is not programmable and VAUX3 is fixed at 1.2 V. Register VAUX3 as a fixed-voltage regulator on cut 1.0 and retain the 16-value workaround only for cut 1.1. Reference: AB8500 User Manual, UM0836 Rev 3, p. 240 Fixes: 2b75151a1041 ("regulators: Added ab8500 v2 support") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-4-fe88b01829bf@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 5dbeca5c7ff74bbe9c33a790ae74b102d48d75f5 Author: Linus Walleij Date: Tue Sep 1 22:02:08 2026 +0200 regulator: ab8500: Handle AB8505 VINTCORE selector 7 [ Upstream commit 4ec4df7e54182edb6955caace37684e535e462dc ] The AB8505 VINTCORE table exposes only selectors 0 through 6. The hardware also accepts selector 7 and maps it to 1.35 V, just like selector 6. Omitting it can make an OTP-programmed selector 7 appear invalid to the regulator core. Give AB8505 its own eight-entry selector table while leaving the AB8500 table unchanged. Reference: AB8505 User Manual, DM00046744 Rev 3, p. 223 Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-3-fe88b01829bf@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b5cd0db75a1a2abfcbd36ce2fa1fdd0863c3b230 Author: Linus Walleij Date: Tue Sep 1 22:02:07 2026 +0200 regulator: ab8500: Add AB8505 VAUX3 3.05 V setting [ Upstream commit ac72c091a9810493ccd9209414d4f859276727ab ] AB8505 has an additional VAUX3 voltage setting which is not encoded in the normal three-bit selector. ArmRegu2.Vaux3Sel3 overrides that selector and selects 3.05 V. Add the missing voltage and use the override bit as an extended selector. Program the ordinary selector before clearing the override so VAUX3 does not briefly switch to a stale voltage. Reference: AB8505 User Manual, DM00046744 Rev 3, pp. 229 and 254 Fixes: 547f384f33db ("regulator: ab8500: add support for ab8505") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-2-fe88b01829bf@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 8dd6fc2a14dfe4d815039e337ee6425231989e19 Author: Linus Walleij Date: Tue Sep 1 22:02:06 2026 +0200 regulator: ab8500: Fix AB8505 VANA voltage selectors [ Upstream commit dfdfda2a95843706428a9d95ab546cb10983e684 ] The AB8505 VANA voltage table assumes selector 0 represents 1.05 V and all eight selectors increase linearly. Selector 0 actually represents 1.2 V. Selectors 1 through 6 cover 1.05 V through 1.175 V, and selector 7 represents 1.225 V. Correct the table so each selector reports and programs the documented voltage. Reference: AB8505 User Manual, DM00046744 Rev 3, p. 257 Fixes: 8a3b1b8703fe ("regulator: ab8500: Add voltage selection for AUDIO and ANA on AB8505") Assisted-by: LLM Signed-off-by: Linus Walleij Link: https://patch.msgid.link/20260901-ux500-dts-snowball-regulator-v2-1-fe88b01829bf@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 573c288af791063b77533edbc4f94f2562cbb8db Author: Fangzhi Zuo Date: Thu Aug 27 13:12:46 2026 -0400 drm/amd/display: Exit IPS before connector detection on resume [ Upstream commit 86420fe3093161971b4064e05be11ffff1df76aa ] [Why & How] On resume, dm_resume() walks the connector list and, for each connector, calls dc_link_detect_connection_type() at the top of the loop iteration before the per-connector dc_exit_ips_for_hw_access() that sits in the detection branch. There is no dc_exit_ips_for_hw_access() before the loop, so the very first HW access relies on an earlier connector having already taken the display out of IPS. Commit d1d51519bc3b ("drm/amd/display: Skip eDP detection when no sink") skips the eDP connector when no panel is present. On a DCN3.5 APU whose eDP link has no sink, the eDP iteration - which used to bring the HW out of IPS first - is now skipped, so a downstream DP connector becomes the first one processed. Its initial DDC/AUX access then runs while the HW is still idle, the AUX transfers time out (-ETIMEDOUT), and the EDID read fails: [drm:dm_helpers_read_local_edid [amdgpu]] *ERROR* EDID err: 2, on connector: DP-1 amdgpu: [drm] *ERROR* No EDID read. Take the display out of IPS once before the detection loop so the first connector processed no longer touches the AUX/DDC engine while the HW is still in idle power state. This keeps the eDP-skip boot/resume optimization while fixing the DP EDID read failure. Fixes: d1d51519bc3b ("drm/amd/display: Skip eDP detection when no sink") Reviewed-by: Roman Li Signed-off-by: Fangzhi Zuo Signed-off-by: Ray Wu Tested-by: Dan Wheeler Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit 5e2809a2887d44f5a18b76fc826ebf55c868b71e Author: Koichiro Den Date: Tue Sep 1 15:32:37 2026 +0900 PCI: endpoint: pci-epf-vntb: Serialize virtual PCI bus scan [ Upstream commit 84c3520c9e8c14b09a5cf645cc4fa7c6d9d61127 ] The virtual PCI bus is scanned without holding the PCI rescan/remove lock. This can race with other PCI topology changes. Hold the lock across the bus scan and device addition. Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Suggested-by: Manivannan Sadhasivam Signed-off-by: Koichiro Den Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://lore.kernel.org/r/3tgrcel5fl55ulf3zjya4fkz4t2ms7iwwjif5rnzn2rafsydd6@i4e5etm7uqvz/ Link: https://patch.msgid.link/20260901063238.631166-2-den@valinux.co.jp Signed-off-by: Sasha Levin commit 85e130f2f181cc5b3b735e6adf4f3c96d68b6f35 Author: Konrad Dybcio Date: Thu Sep 10 10:15:42 2026 +0200 arm64: dts: qcom: glymur-asus-zenbook-a16: Fix up the mic sample rate [ Upstream commit 73f0a1026210c008ba4414b3181fa679096ef968 ] Set the correct value for the hardware, matching the readout from Windows during audio recording. The microphone seems to work fine either way. Fixes: e8fbbca94db7 ("arm64: dts: qcom: glymur: Add Asus Zenbook A16 (UX3607OA)") Signed-off-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20260910-topic-zenbook_mic_sampling-v1-1-2532136d5a9b@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 85650843146b0a59253f835d1202121922367766 Author: Jia Wang Date: Wed Sep 2 17:26:13 2026 +0800 dmaengine: dw-axi-dmac: Fix CH_CFG2 channel priority position [ Upstream commit 2a9013c20c46216b92ff09e2283b5244a91c59da ] The CH_CFG2 channel priority field occupies bits 51:47 of the 64-bit channel configuration register, corresponding to bits 19:15 of CH_CFG2_H. The driver currently shifts the priority value by 20, programming the wrong bits. Use bit 15 as the field position. Fixes: 824351668a41 ("dmaengine: dw-axi-dmac: support DMAX_NUM_CHANNELS > 8") Signed-off-by: Jia Wang Reviewed-by: Frank Li Link: https://patch.msgid.link/20260902-dma-fix-v3-3-414c6449fbcc@ultrarisc.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit d2b7be468af9304ac39bcbaf3fe343dbe2380b34 Author: Jia Wang Date: Wed Sep 2 17:26:12 2026 +0800 dmaengine: dw-axi-dmac: Fix LLI dump out-of-bounds access [ Upstream commit e6b49f8016ee8b642e8e495d1704342ee0b35d72 ] axi_chan_list_dump_lli() uses the channel-wide descs_allocated count to walk the hw_desc[] array of a single transaction. If multiple transactions have allocated LLIs, the channel count can exceed the transaction-local nr_hw_descs and make the DMA error path read past the end of hw_desc[]. Use the descriptor-local nr_hw_descs count when dumping LLIs. Fixes: ef6fb2d6f1ab ("dmaengine: dw-axi-dmac: simplify descriptor management") Signed-off-by: Jia Wang Reviewed-by: Frank Li Link: https://patch.msgid.link/20260902-dma-fix-v3-2-414c6449fbcc@ultrarisc.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 663b0345886d8f31039f45426f8aab1c3b22c0af Author: Jia Wang Date: Wed Sep 2 17:26:11 2026 +0800 dmaengine: dw-axi-dmac: Fix AXI burst length encoding [ Upstream commit 0d59891c42e11c3840276d8a632dbc355d6ddc4f ] The snps,axi-max-burst-len property describes the number of beats in an AXI burst, while the ARLEN and AWLEN fields encode that value minus one. The driver keeps axi_rw_burst_len as the actual burst length so that dma_device.max_burst reports the correct value. However, it also programs that unencoded value directly into the hardware fields. A value of 256 therefore overflows the 8-bit fields and can cause AXI decode errors. Subtract one only when constructing hardware descriptors, while keeping the actual value for dma_device.max_burst. Fixes: c454d16a7d5a ("dmaengine: dw-axi-dmac: Burst length settings") Signed-off-by: Jia Wang Reviewed-by: Frank Li Link: https://patch.msgid.link/20260902-dma-fix-v3-1-414c6449fbcc@ultrarisc.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 8e0aa84ea62b80119d8841706ae4d2172edc747b Author: Rosen Penev Date: Wed Aug 19 20:16:54 2026 -0700 dmaengine: fsl_raid: zero CF descriptor pool allocations [ Upstream commit 26d48e9fb6997f4026dd86daecf8d2c12258f698 ] The compound frame descriptors and embedded CDBs are allocated from the cf_desc_pool with dma_pool_alloc(), which does not zero the memory. Only cdb32, the gfm coefficients and the frame address/length fields are programmed; the dpi_dest_spec/dpi_src_spec fields in the CDBs and the rbro32 field of each frame are left uninitialized. The hardware reads the whole block (frame 0 length is sizeof(struct fsl_re_xor_cdb) or sizeof(struct fsl_re_pq_cdb)), so uninitialized heap contents are exposed to the device on each new descriptor. Use dma_pool_zalloc() in both fsl_re_chan_alloc_desc() and fsl_re_alloc_chan_resources() so the descriptor and CDB memory is zeroed before it is handed to the RAID engine. Fixes: ad80da658bbc ("dmaengine: Driver support for FSL RaidEngine device.") Assisted-by: opencode:deepseek-v4-flash-free Signed-off-by: Rosen Penev Reviewed-by: Frank Li Link: https://patch.msgid.link/20260820031654.28450-1-rosenp@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 80f82ad5c4d12fda0570b9e5e791df15269ee74b Author: Keisuke Tsukuda Date: Tue Sep 8 20:33:54 2026 +0000 usb: gadget: f_mass_storage: ignore class requests while inactive [ Upstream commit e84caed6e7f58d96ea2e4aaa0b947ab05faa451b ] SET_CONFIGURATION is handled asynchronously by the mass-storage thread. A class request can arrive after the composite core selects the function but before the thread installs common->fsg, or while the function is being disabled. fsg_setup() already rejects this state with -EOPNOTSUPP, but checking it through fsg_is_set() also emits a warning. Check the active function directly so normal requests during a configuration transition are rejected without hiding fsg_is_set() warnings from other internal paths. Fixes: 8876f5e7d3b2 ("USB: gadget: f_mass_storage: added eject callback") Reported-by: syzbot+d31109047baed8f3b590@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=d31109047baed8f3b590 Signed-off-by: Keisuke Tsukuda Acked-by: Alan Stern Link: https://patch.msgid.link/20260908203348.95825-3-tkdkei@outlook.jp Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 6704b98a1d381a675825cbf1a8eca982dd8dab8c Author: Keisuke Tsukuda Date: Tue Sep 8 20:33:53 2026 +0000 usb: gadget: composite: avoid warning on aborted delayed status [ Upstream commit 048884b782b137229399b9f727b6437d9b4f1071 ] A SET_CONFIGURATION request that disables the current configuration, or a disconnect, can abort a control transfer whose status stage was delayed by a function driver. The asynchronous function work can nevertheless finish later and call usb_composite_setup_continue() after reset_config() has cleared delayed_status. This is an expected consequence of aborting the old control transfer, and does not require a kernel warning. Keep the diagnostic available under dynamic debug and ignore the obsolete completion as before. Fixes: 2bac51a1827a ("usb: gadget: composite: reset delayed_status on reset_config") Reported-by: syzbot+a83a5a1ba9ff57935171@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=a83a5a1ba9ff57935171 Signed-off-by: Keisuke Tsukuda Link: https://patch.msgid.link/20260908203348.95825-2-tkdkei@outlook.jp Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit ae062eb10ca617969193ef0e939ed8a25514ad67 Author: Roland Dreier Date: Wed Sep 9 17:58:59 2026 +0000 firmware: arm_scmi: Fix error path leak in scmi_raw_message_send() [ Upstream commit 1adabdce41b93ee6f72f29daa1d3e1750e7b7bd1 ] When the is_transport_polling_capable() check fails in scmi_raw_message_send(), it returns -EINVAL without doing scmi_xfer_raw_put(), which will leak a struct scmi_xfer. Reported-by: Sashiko Link: https://sashiko.dev/#/patchset/20260909-scmi-async-done-race-v2-0-cc5dec25c6be%40rivian.com Fixes: 07cb8c324b63 ("firmware: arm_scmi: Add polling support to raw mode") Signed-off-by: Roland Dreier Link: https://patch.msgid.link/20260909-scmi-raw-v1-1-de3fa75d2c6f@rivian.com Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin commit 8b72a3be1b9523f5ca73704cfe2ed8ef69103ed0 Author: Roland Dreier Date: Wed Sep 9 04:32:28 2026 +0000 firmware: arm_scmi: Don't reuse raw xfers with async_done still armed [ Upstream commit 0543fc1443de1a0b04ec64684fb920d79e15de2f ] In SCMI raw mode, scmi_xfer_raw_worker() releases the xfer before releasing the waiter that disarms xfer->async_done, and scmi_xfer_get() does not clear async_done when it hands out a recycled xfer. A concurrent transaction can therefore pick up the xfer while it still points at the old waiter's completion, so: - a delayed response arriving for the new transaction can be signalled on the old waiter's completion, which may already be re-armed for yet another unrelated transaction, making that transaction's wait return early; and - the old waiter's disarm, which still runs after the xfer has been released, clobbers the arming just installed by the new transaction, so the new waiter times out even if its delayed response arrives. Release the waiter first, while the worker still holds a reference on the xfer, so that an xfer can never reach the free list still armed. Track whether a delayed response is expected in the waiter itself instead of peeking at xfer->async_done outside xfer->lock, and wait on the waiter's own embedded completion. (The new async flag is not strictly needed but it makes the logic easier to reason about) Finally, harden scmi_xfer_get() to clear async_done when handing out an xfer, so that no future release-ordering change can leak a stale arming into a new transaction. Fixes: 3c3d818a9317 ("firmware: arm_scmi: Add core raw transmission support") Signed-off-by: Roland Dreier Reviewed-by: Cristian Marussi Tested-by: Cristian Marussi Link: https://patch.msgid.link/20260909-scmi-async-done-race-v2-2-cc5dec25c6be@rivian.com Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin commit 93099612462eb34cf811233f6a9262ae0428751a Author: Roland Dreier Date: Wed Sep 9 04:32:27 2026 +0000 firmware: arm_scmi: Protect xfer->async_done with xfer->lock [ Upstream commit 49fc5bc04eec2b7687d49ccceb7adf6ace640a3b ] Asynchronous SCMI commands are completed by a delayed response. The RX path signals the response with complete(xfer->async_done). Unlike xfer->done, xfer->async_done is a pointer to a completion owned by whoever is waiting for the delayed response, and it stays valid only for as long as that waiter is still waiting. In do_xfer_with_response() it is a DECLARE_COMPLETION_ONSTACK() in the caller's stack frame. Nothing serialises the RX path against a waiter that gives up on a timeout. scmi_msg_response_validate() does read xfer->async_done under xfer->lock, and documents that as a requirement, but the lock is dropped again before scmi_handle_response() dereferences the pointer, and neither the arming nor the disarming side takes it at all. So a delayed response arriving just as the wait times out can be signalled on a completion that is already gone: waiter RX path (IRQ context) ------ --------------------- do_xfer_with_response(): xfer->async_done = &async_response do_xfer(xfer) wait_for_completion_timeout(xfer->async_done, tmo) /* returns 0, gives up */ /* response receive interrupt */ scmi_handle_response(): scmi_xfer_command_acquire() lock xfer->lock validate: async_done != NULL unlock xfer->lock xfer->async_done = NULL return -ETIMEDOUT /* async_response goes out of scope */ complete(xfer->async_done) That last complete() has two possible bad outcomes: it either dereferences the NULL just stored by the waiter or - if that store is not yet visible on the RX CPU - it takes a lock and writes to a stack frame that the waiter may already have returned from. Fix this by making xfer->lock cover xfer->async_done end-to-end. Add helpers to arm and disarm it under the lock, use them on both the regular and the raw paths, and have the RX path read and signal the completion under that same lock. A waiter that is timing out then either completes its disarm before the RX path looks, in which case the delayed response is dropped, or blocks in the disarm until the RX path is done with the completion, in which case the completion is still alive. Log the dropped case, so every path where a delayed response that was matched to a pending xfer and then discarded produces an error. (This is the same treatment scmi_msg_response_validate() already gives a delayed response that arrives after the waiter has disarmed the xfer) Fixes: 58ecdf03dbb9 ("firmware: arm_scmi: Add support for asynchronous commands and delayed response") Signed-off-by: Roland Dreier Reviewed-by: Cristian Marussi Tested-by: Cristian Marussi Link: https://patch.msgid.link/20260909-scmi-async-done-race-v2-1-cc5dec25c6be@rivian.com Signed-off-by: Sudeep Holla Signed-off-by: Sasha Levin commit f169bcae0c0446428211aefe83599e635ed77f5c Author: Chaithanya Lagisetty Date: Wed Aug 19 05:35:18 2026 +0000 dmaengine: sprd: use clk_bulk API to fix clock imbalance [ Upstream commit d09cd5e8bbc98969b5333015b45c525078ac0f6f ] sprd_dma_enable() enabled sdev->clk and then the optional ashb_clk. If enabling ashb_clk failed, sdev->clk was left enabled: both callers (probe and resume) treat a non-zero return as "nothing was enabled" and bail out, leaking sdev->clk. Convert the driver to the clk_bulk API. clk_bulk_prepare_enable() enables all clocks and unwinds them on failure, and clk_bulk_disable_unprepare() disables them, which fixes the imbalance and simplifies the enable/disable paths. Both clocks are fetched with devm_clk_bulk_get_optional(); the optional ashb_eb clock simply becomes a NULL entry that the bulk helpers treat as a no-op, while the mandatory enable clock is still checked explicitly. Fixes: 9b3b8171f7f4 ("dmaengine: sprd: Add Spreadtrum DMA driver") Signed-off-by: Chaithanya Lagisetty Reviewed-by: Frank Li Link: https://patch.msgid.link/20260819053518.2825514-1-nagachaithanya9911@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit be6629558196d6cd591a2c6080705890931bbb9f Author: Pengpeng Hou Date: Thu Aug 13 23:32:30 2026 +0800 usb: musb: da8xx: depopulate OF children on probe failure [ Upstream commit 8d70a378e702141424e27e0b8341e421f058635d ] da8xx_probe() creates the CPPI child devices before registering the MUSB platform device. If population partially succeeds or the later MUSB registration fails, the probe path unregisters the generic PHY but leaves the OF children registered under a parent whose probe failed. Depopulate the OF children before unregistering the PHY on both failure paths. Use one cleanup label so each resource is unwound in reverse publication order without introducing an unused label. Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx") Assisted-by: Codex:gpt-5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260813153230.40421-1-pengpeng@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit a9c1021b4ed3ce9ddfa30712f1a64b1519fa0cd1 Author: Pengpeng Hou Date: Thu Aug 13 23:33:53 2026 +0800 usb: musb: da8xx: depopulate OF children on remove [ Upstream commit 4b30c89fb36924983be652bb24fc49e20390bf27 ] da8xx_probe() creates CPPI platform devices with of_platform_populate(), but da8xx_remove() unregisters only the separately created MUSB device and the generic PHY. The OF children therefore remain registered after the glue driver is unbound. Pair the successful population with of_platform_depopulate() during remove. Unregister the MUSB device first because it reuses the parent DT node but was not created by of_platform_populate(). Fixes: d6299b6efbf6 ("usb: musb: Add support of CPPI 4.1 DMA controller to DA8xx") Assisted-by: Codex:gpt-5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260813153353.42817-1-pengpeng@iscas.ac.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit f83f896d3d78d4adf85a932c9dffae88da8a4f26 Author: Arka Mondal Date: Tue Sep 1 15:58:31 2026 +0900 usb-storage: alauda: fix out-of-bounds zone index [ Upstream commit c4542993c071fcafe7335698bf52650dee7e3555 ] MEDIA_INFO(us).lba_to_pba and .pba_to_lba are arrays of num_zones pointers, allocated by kcalloc() in alauda_init_media(). alauda_ensure_map_for_zone() reads lba_to_pba[zone] and pba_to_lba[zone], and when either is NULL alauda_read_map() writes a pointer back to both. Two separate errors let zone reach num_zones, one element past the end. max_lba is capacity >> (blockshift + pageshift), which counts physical blocks, but zone is lba / uzonesize and uzonesize is 125/128 of zonesize. On a 16 MB card (alauda_card_ids id 0x73) num_zones is 1 and uzonesize is 1000, so lba 1000 to 1023 pass the bounds check and index element 1 of a one-element array. alauda_read_data() also calls alauda_ensure_map_for_zone() before it compares lba against max_lba, so any larger lba is used as an index before the check rejects it. alauda_write_data() already checks first. Bound lba by num_zones * uzonesize on both paths and move the read side's call below the check. alauda_transport() reports num_zones * uzonesize * blocksize for READ_CAPACITY, so the new bound is exactly the range the device advertises and no block becomes unreachable. sd never issues an lba past the reported capacity; an SG_IO READ_10 can. Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support") Suggested-by: Alan Stern Signed-off-by: Arka Mondal Acked-by: Alan Stern Link: https://patch.msgid.link/20260901065831.43567-4-arka@arkamondal.net Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 777cb1f8d2876ff6ee5baff19afc119699563b57 Author: Arka Mondal Date: Tue Sep 1 15:58:30 2026 +0900 usb-storage: alauda: check the return value of alauda_read_map() [ Upstream commit eb882419790c6710646904c6b25132189152cf33 ] alauda_ensure_map_for_zone() ignores the value alauda_read_map() returns. On failure lba_to_pba[zone] and pba_to_lba[zone] are left NULL, and both callers dereference them immediately: pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset]; alauda_read_map() returns USB_STOR_TRANSPORT_ERROR when either kcalloc() fails or an alauda_get_redu_data() transfer fails, so one failed bulk transfer is enough to reach the NULL dereference. Return that value from alauda_ensure_map_for_zone() and check it in alauda_read_data() and alauda_write_lba(). Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217862 Signed-off-by: Arka Mondal Acked-by: Alan Stern Link: https://patch.msgid.link/20260901065831.43567-3-arka@arkamondal.net Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 03ecd8c3b2bc3515623106827341b32b31255929 Author: Arka Mondal Date: Tue Sep 1 15:58:29 2026 +0900 usb-storage: alauda: do not do DMA from the stack [ Upstream commit ec67dacb75ebd11fbe6d727e6f37c0ef5e3d3431 ] alauda_check_status2(), alauda_get_redu_data(), alauda_erase_block(), alauda_read_block_raw() and alauda_write_block() build their commands in stack arrays and pass them to usb_stor_bulk_transfer_buf(). alauda_check_status2() and alauda_erase_block() also read the reply back into a stack array. usb_stor_msg_common() sets URB_NO_TRANSFER_DMA_MAP only when the buffer is us->iobuf. Every other buffer reaches usb_hcd_map_urb_for_dma(), which has warned and returned -EAGAIN for a buffer on the stack since commit 4568136620c6 ("usb: core: Check URB setup_packet and transfer_buffer sanity"). On a host controller that uses DMA, all of these commands fail. Use us->iobuf, as alauda_reset_media() in this driver and the other usb-storage subdrivers already do. The command is sent before the reply is read, so both can use it; sddr09_read_status() does the same. Fixes: e80b0fade09e ("[PATCH] USB Storage: add alauda support") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217862 Signed-off-by: Arka Mondal Acked-by: Alan Stern Link: https://patch.msgid.link/20260901065831.43567-2-arka@arkamondal.net Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 120230b1a9c34cf35325333dcc06c7f40837d246 Author: Binbin Zhou Date: Tue Aug 18 17:34:48 2026 +0800 dmaengine: loongson: loongson2-apb-cmc: Fix signedness bug in irq handling [ Upstream commit bf27ec04a888d4f1301a8da040719f2c332da681 ] Storing that negative value into an unsigned variable makes the check `if (lchan->irq < 0)` always false, so probe errors are not correctly detected and propagated. Fix this by changing the type of `irq` to `int`, which allows proper signed comparison and error handling. Fixes: 1c0028e725f1 ("dmaengine: loongson: New driver for the Loongson Multi-Channel DMA controller") Reported-by: Julia Lawall Reported-by: kernel test robot Closes: https://lore.kernel.org/r/202608152230.p20WPlS0-lkp@intel.com/ Signed-off-by: Binbin Zhou Reviewed-by: Frank Li Reviewed-by: Huacai Chen Link: https://patch.msgid.link/20260818093448.3597016-1-zhoubinbin@loongson.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 75242c61612aa245e4768231b0ede848857deb2c Author: Yuho Choi Date: Thu Aug 6 22:43:04 2026 -0400 USB: pci-quirks: Release EHCI device reference [ Upstream commit e93731c29f749d5b2495a67109d1f0804ab3b89d ] for_each_pci_dev() holds a reference to the current device. The Intel EHCI lookup breaks as soon as it finds a match, so the iterator does not get a chance to drop that reference on its next iteration. Release the reference before leaving the loop. Fixes: 26b76798e050 ("Intel xhci: refactor EHCI/xHCI port switching") Signed-off-by: Yuho Choi Reviewed-by: Alan Stern Link: https://patch.msgid.link/20260807024304.928708-1-dbgh9129@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 8286e4bb78bf302ba741c2a7ae95b4c1d6fb8a2f Author: Jiangong.Han Date: Sat Aug 1 17:51:28 2026 +0800 USB: usbmon: fix null-ptr-deref in mon_bus_remove() when mon_bus_init() fails [ Upstream commit 0c6cae0f56239e3274b30dbe5b362cd297ccacc7 ] When mon_bus_init() fails to allocate the mon_bus struct, it returns without setting ubus->mon_bus, so mbus->mon_bus remains NULL. mon_bus_add() intentionally ignores this failure because the USB core does not require monitoring to be established for normal operation. However, when the HCD is later removed, usb_remove_hcd() fires the USB_BUS_REMOVE notifier which calls mon_bus_remove(), it dereferences ubus->mon_bus without checking for NULL, causing a null-ptr deference. Fix this by adding a NULL check for mbus at the top of mon_bus_remove(). If mon_bus_init() failed, ubus->mon_bus is NULL, meaning the bus was never tracked by the monitor, so there is nothing to clean up and returning early is correct. Reported-by: syzbot+5f4b29d9fe710a964482@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=5f4b29d9fe710a964482 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Jiangong.Han Link: https://patch.msgid.link/20260801095128.46322-1-jiangong.han@windriver.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit d2b4dc64fac9eabe55cb77c7f765b232ff1d11ae Author: Diego Fernando Mancera Gomez Date: Thu Jul 23 13:56:54 2026 -0600 usb: image: microtek: stop SG processing after transfer errors [ Upstream commit d937ca39cc44a01ce64865dd25b1e205a05ae3a0 ] When an SG URB completes with an error, mts_do_sg() calls mts_transfer_cleanup(), which completes the SCSI command through scsi_done(). However, the callback continues advancing the scatterlist and may submit another URB for a command that has already been completed. Return immediately after the cleanup so that no further processing is performed on the completed command. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Diego Fernando Mancera Gomez Acked-by: Oliver Neukum Link: https://patch.msgid.link/20260723195654.152104-1-diegomancera.dev@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 96e464cdf64b96d9f168c5022ae1f74d2b567915 Author: Junxian Huang Date: Mon Sep 7 16:49:01 2026 +0800 RDMA/hns: Fix GID capacity loss in 64K system [ Upstream commit 95761b8736c938759032e8d4eb42074d39d13007 ] Our HW always handles GMV BT pages with a fixed 4K size, but the driver calculates the needed GMV BT pages number with PAGE_SIZE, which is 64K in 64K system. Only the first 4K (GMV index 0-127) can be reached by HW, causing GID capacity loss and memory waste. Split a single 64K BT page into multiple 4K pages and register them to HW per 4K block so that HW can correctly reach all GMV entries. Fixes: 32053e584e4a ("RDMA/hns: Add support for filling GMV table") Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20260907084901.2420703-4-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 129d0bb3082bad96a6e88744b2101dbdb46dcc58 Author: Junxian Huang Date: Mon Sep 7 16:49:00 2026 +0800 RDMA/hns: Limit gmv_entry_num to avoid memory waste [ Upstream commit bb464eeadd301c3a53e9f92a2a472b73c42b74c4 ] The GMV entry is a HW object corresponding to a GID. Since gid_table_len is already limited to a maximum of 256, there is no need to allocate memory for those extra GMV entries as they will never be touched. Fixes: 7243396aaf12 ("RDMA/hns: Add a max length of gid table") Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20260907084901.2420703-3-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit ab25fcb68090849cf78322c25b432f31b039e179 Author: Yuho Choi Date: Sun Aug 2 18:11:46 2026 -0400 PCI: xgene: Use managed clock for PCIe controller [ Upstream commit b9022584ebbae81f7bbe4a61bd1df0d0a95e1a99 ] xgene_pcie_init_port() obtains and enables the controller clock manually. When xgene_pcie_setup() or pci_host_probe() fails, probe returns without disabling, unpreparing, or releasing the clock. A failed enable also leaves the clk_get() reference unreleased. Use devm_clk_get_enabled() so the clock is unwound automatically on probe failure and device removal. Fixes: 5f6b6ccdbe1c ("PCI: xgene: Add APM X-Gene PCIe driver") Signed-off-by: Yuho Choi Signed-off-by: Manivannan Sadhasivam Link: https://patch.msgid.link/20260802221146.573233-1-dbgh9129@gmail.com Signed-off-by: Sasha Levin commit 2645033a40fdd4e89a8444e9305c8074e2d4b42c Author: Justin Yeh Date: Mon Aug 24 17:04:00 2026 +0800 arm64: dts: mediatek: mt8188-geralt: Enlarge SCP core0 memory region [ Upstream commit 868297e3ebcc5c9b0e7cada19c82b11068faf4bf ] The SCP firmware in linux-firmware for this platform (mediatek/mt8188/scp_c0.img) supports MDP, which the mdp3-rdma node drives through scp_c0. On top of the segments it loads, the firmware allocates a 1 MiB DMA region at 0x50800000 at run time. That lies outside the 8 MiB reserved for SCP core0, so Linux is free to allocate over memory the firmware uses. Enlarge the region to 9 MiB. apu_mem starts at 0x55000000, so no other reserved region has to move. Fixes: e36be19823f0 ("arm64: dts: mediatek: mt8188-geralt: Enable first SCP core") Signed-off-by: Justin Yeh Reviewed-by: Chen-Yu Tsai Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Sasha Levin commit bfeaef4cebd16c8a37e58b75124a24f23e915726 Author: Shakeel Butt Date: Sat Sep 5 12:16:13 2026 -0700 kernfs: fix up the unlocked attribute reads on the creation paths [ Upstream commit 81bdc85b4c086502f4446a58eb5d25f29bb5e9f7 ] Two creation paths read a live node's attributes without holding kernfs_iattr_rwsem, which kernfs_iop_setattr() takes for writing. They need different fixes. kernfs_create_link() copies the target's ia_uid and then its ia_gid into the new link. A chown of the target between the two reads leaves the link with the old uid and the new gid, an owner the target never had. Read both under the rwsem. kernfs_new_node() reads the parent's mode and ia_gid for S_ISGID inheritance. Either value is fine there: the node does not exist yet, so nothing orders a racing chmod or chown against the creation. Taking the rwsem would only pick between two answers that are both right. Mark the reads with READ_ONCE() instead. The pointer that leads to them is already fine: __kernfs_iattrs() publishes kernfs_node::iattr with try_cmpxchg(), and both sides read it with READ_ONCE(), like the rest of fs/kernfs. The Fixes tag is for the symlink half. kernfs_create_link() has read the pair unlocked since it started copying the target's owner; only the name of the lock its writer takes has changed. The READ_ONCE() markings are not a fix. Fixes: 488dee96bb62 ("kernfs: allow creating kernfs objects with arbitrary uid/gid") Acked-by: Tejun Heo Signed-off-by: Shakeel Butt Link: https://patch.msgid.link/20260905191613.3143937-5-shakeel.butt@linux.dev Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 685b963d9b51ff8b645e2f5bb0240ba389b25ddd Author: Karl Mehltretter Date: Thu Sep 10 05:18:53 2026 +0200 efi/libstub: Fix efi_set_event_at() parameter documentation [ Upstream commit c12a3a4b35e47fd511fbd550d3637318be41c4eb ] efi_set_event_at() documents ids although its array index argument is named idx. This produces missing and excess parameter warnings. Match the argument name and fix the adjacent spelling of array. Fixes: 8c0a839c2bcc ("efi/libstub: Descriptions for stub helper functions") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Ard Biesheuvel Signed-off-by: Sasha Levin commit c8517aa14f439aeb3325ed5f0d5bcb182977904f Author: Salah Triki Date: Thu Sep 3 13:27:33 2026 +0100 iio: imu: adis16400: Check return value of spi_setup() [ Upstream commit a7c07602e00596a45de8a4a700af96392953ed38 ] In adis16400_initial_setup(), the return value of spi_setup() was ignored. If SPI configuration fails, the driver would proceed with the initialization anyway, leading to undefined behavior or silent failures during device setup. Check the return value of spi_setup() and return the error code immediately if it fails. Fixes: cd888a17f95f ("staging:iio:adis16400: Use adis library") Signed-off-by: Salah Triki Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit 056f2fa9329f8a400cc6c0cae0946fe20d745b46 Author: Matti Vaittinen Date: Wed Sep 2 11:49:18 2026 +0300 iio: accel: kionix-kx022a: Fix IPOL macro name [ Upstream commit 4a4b0d75622f7d911c96045b328fe2e88be05072 ] The "interrupt polarity high"-macro for KX022A variant is defined as: "#define KX022A_MASK_IPOL KX022A_MASK_IPOL1" However, the KX022A_MASK_IPOL1 is not defined anywhere, so actually using the KX022A_IPOL_HIGH would produce a compile error. Fix the define by using correct mask. Fixes: 7c1d1677b322 ("iio: accel: Support Kionix/ROHM KX022A accelerometer") Signed-off-by: Matti Vaittinen Reviewed-by: Mehdi Djait Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit 503a28f2d80229dcda54abda53df976a19b9b658 Author: Chandrakanth Patil Date: Wed Aug 26 02:34:11 2026 +0530 scsi: mpi3mr: Fix NULL pointer dereference on PCI error recovery [ Upstream commit 2ba1d12b2629827fdb1116eb3c9f8566911f2034 ] On a frozen PCI channel the driver unmaps the register window and frees the interrupts, but leaves the firmware event workqueue running. An event handler that is already in flight can still reach the register window after it has been unmapped. Stop event processing and drain the queue first, and start it again when the channel resumes. Fixes: 30bafe1774f0 ("scsi: mpi3mr: Support PCI Error Recovery callback handlers") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-18-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit ea349c98f52037d2f73a27893096d41a0a8428b0 Author: Chandrakanth Patil Date: Wed Aug 26 02:34:10 2026 +0530 scsi: mpi3mr: Fix use-after-free of the firmware event workqueue [ Upstream commit c94c746e6c80439a4a9a0e1e20f2dae62a4d57ef ] The enqueue path reads the workqueue pointer before taking the event lock, while the remove path clears that pointer and destroys the workqueue while holding it. The enqueue can therefore reach queue_work() after the workqueue is gone. Move the check inside the lock. Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-17-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit bd2f9ad2294ed5852a9a9ac78987e55395569eff Author: Chandrakanth Patil Date: Wed Aug 26 02:34:09 2026 +0530 scsi: mpi3mr: zero out diagnostic buffer status memory [ Upstream commit 052aea807cfbcefaf5b6ed8202f65da1fc65f4a0 ] Memory allocated for the BSG diagnostic buffer status is not zeroed before it is copied back to user space. Several fields in this structure are reserved and never written by the driver. Use kzalloc() instead of kmalloc() to zero out the allocated memory. Fixes: 78b506984ebe ("scsi: mpi3mr: Add ioctl support for HDB") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-16-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 635ae43d78c56441fcb118f1d6ef3266bbf29ab2 Author: Chandrakanth Patil Date: Wed Aug 26 02:34:08 2026 +0530 scsi: mpi3mr: Fix out-of-bounds read in PCIe topology change events [ Upstream commit 7d572b4dc4ed0494e67097d4b7368666655f5c99 ] The number of entries in a PCIe topology change event is used to walk the entry array without being compared against the amount of event data that was received. Bound the entry count to the received event data before use. Fixes: 8e653455547a ("scsi: mpi3mr: Add support for PCIe device event handling") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-15-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit fe81812af36bad609d233f11ba989dedcde41ca3 Author: Chandrakanth Patil Date: Wed Aug 26 02:34:07 2026 +0530 scsi: mpi3mr: Fix buffer overflow in the BSG target device map [ Upstream commit 203b3072e7aa10d98b3f2b766693ea925cfc571d ] The size of the target device map buffer is held in a u16 while the number of devices it is derived from is not bounded to fit. With enough devices the size wraps, a short buffer is allocated, and the loop that fills it writes past the end. Do the calculation in size_t. Fixes: fb428a2005fc ("scsi: mpi3mr: Fix issues in mpi3mr_get_all_tgt_info()") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-14-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 8547adf828026d313f336bfdaa13c42f4cd39d0d Author: Chandrakanth Patil Date: Wed Aug 26 02:34:06 2026 +0530 scsi: mpi3mr: Fix out-of-bounds phy array access on link change [ Upstream commit f67caaa2521a3c8f931d1e679d831ba5ca654794 ] The phy number that comes with a link change is used to index the node's phy array without being compared against the number of phys allocated for that node. Check it first. Fixes: 42fc9fee116f ("scsi: mpi3mr: Add helper functions to manage device's port") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-13-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 08224d19be876d5ce30c52f2f7ef0b8eb1bef5a2 Author: Chandrakanth Patil Date: Wed Aug 26 02:34:05 2026 +0530 scsi: mpi3mr: Fix out-of-bounds read of event data [ Upstream commit 77554f01187d91c20f04d2a8e28270943ed64cca ] The event data length from the reply is used as is, both when caching log data and when sizing the buffer handed to the bottom half. A length larger than the frame makes both of them read past the end of it. Clamp the length to what the frame can hold. Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling") Fixes: d0d19250ed81 ("scsi: mpi3mr: Rename log data save helper to reflect threaded/BH context") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-12-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit fd4493d51b5907014e315268b102481be9482c5f Author: Chandrakanth Patil Date: Wed Aug 26 02:34:04 2026 +0530 scsi: mpi3mr: Fix out-of-bounds read in SAS topology change events [ Upstream commit 9e220ce4bd0468e47cc9eea07e40799ebae6eda8 ] The number of entries in a SAS topology change event is used to walk the entry array without being compared against the amount of event data that was received, so the walk can run past the end of the buffer. Work out how many entries the payload can hold and skip the event if it claims more. Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-11-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit eb5da5496d4e637ae40d6d7707cc12f92f3555af Author: Chandrakanth Patil Date: Wed Aug 26 02:34:03 2026 +0530 scsi: mpi3mr: Fix target device reference leak in device removal handshake [ Upstream commit a04b0f3a17e32aa449fd896163a7b40efc29c4f5 ] The device removal handshake looks up the target device to update its state but never drops the reference that the lookup takes. Drop it once the state has been updated. Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-10-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 24ac1ae4a045add3d624f918413340064af7a975 Author: Chandrakanth Patil Date: Wed Aug 26 02:34:02 2026 +0530 scsi: mpi3mr: Fix out-of-bounds bitmap access during device removal [ Upstream commit 5dade59551d344d0308256edfef6bc3fb4202eb3 ] Device handles reported by the controller are used to index the remove pending bitmap and to build a task management request without being compared against the maximum handle the controller reported. Check the handle before using it. Fixes: 13ef29ea4aa0 ("scsi: mpi3mr: Add support for device add/remove event handling") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-9-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 5cf2a4a4c7864971942bfd37ba965215f06f36cb Author: Chandrakanth Patil Date: Wed Aug 26 02:34:01 2026 +0530 scsi: mpi3mr: Fix out-of-bounds sense buffer access [ Upstream commit 7fea128f6b829ad834f21834d2605d28a45b903d ] The sense buffer address reported on completion is turned into a virtual address with no range check, so an address outside the pool resolves to memory that does not belong to it. Check that it lies within the pool and is correctly aligned. Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-8-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit d5a68ed207f5342fede0aef96f797edda945ecb2 Author: Chandrakanth Patil Date: Wed Aug 26 02:34:00 2026 +0530 scsi: mpi3mr: Fix out-of-bounds reply frame access [ Upstream commit bcf0a5bed59acd5ae19d80e1f617c1a5b355af0b ] The reply frame address reported on completion is only checked against the start and the end of the pool. An address near the top can pass the check while leaving less than a full frame, and an unaligned one resolves into the middle of a frame instead of the start of one. Require a whole frame to fit and the address to be frame aligned. Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-7-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 27b51ecdd2258bc261f5330eda0694bdc2685fd1 Author: Chandrakanth Patil Date: Wed Aug 26 02:33:59 2026 +0530 scsi: mpi3mr: Fix buffer overflow when caching log data [ Upstream commit 9ff1af19c488efad66f2b803eefa0abd5fdac8f4 ] Each log data slot holds a header followed by the payload, but the copy was sized against the whole slot and so wrote one header length past the end of it. Subtracting the header on its own is not enough either, because the entry size is derived from the controller reply size and can be smaller than the header. Work out the payload room first and clamp the copy to it. Fixes: 43ca11005098 ("scsi: mpi3mr: Add support for PEL commands") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-6-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit a4ec0cf39f966ba650f4fead24600bdfb01eeda4 Author: Chandrakanth Patil Date: Wed Aug 26 02:33:58 2026 +0530 scsi: mpi3mr: Fix target device reference leak in BSG task management [ Upstream commit f0ec04bdf6156ed2ae7d86a8819dafdd9383b705 ] The target device lookup takes a reference, but it is only dropped inside a branch that also requires the SCSI target data to be set up. When it is not, the reference is leaked. Drop the reference whenever the lookup succeeded. Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-5-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit dd725cdf11653eae2908cc00c1336fddf75191e5 Author: Chandrakanth Patil Date: Wed Aug 26 02:33:57 2026 +0530 scsi: mpi3mr: Fix I/O block counter leak on admin request post failure [ Upstream commit 37e7d274272bc5e545e2d5f9261afa7f33f1cf49 ] The per device I/O block counter is raised before a task management request is posted and only lowered once the request completes. If the post itself fails the counter stays raised and I/O to that device remains blocked. Lower it on the failure path as well. Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-4-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit 993acf0d2b3553012da3c8d8375b3996c55614a8 Author: Chandrakanth Patil Date: Wed Aug 26 02:33:56 2026 +0530 scsi: mpi3mr: Fix out-of-bounds read when copying BSG MPI requests [ Upstream commit 9fac4cbd66d852958e8a8d0952eb57f8554ce83b ] The MPI request is copied out of the caller supplied payload without first checking that the requested amount is actually present, so the copy can read past the end of the payload buffer. Check the range before copying. Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-3-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit fb62bd53bd7aac2b0714ce5617ef64860dae91c9 Author: Chandrakanth Patil Date: Wed Aug 26 02:33:55 2026 +0530 scsi: mpi3mr: Fix buffer overflow in BSG passthrough request copy [ Upstream commit 896abdd4d81f40575b05d593f7fe004935a6cf97 ] The size of an incoming BSG request is checked using a variable that is narrower than the field it is read from, so large values wrap and pass the check. The copy that follows then uses the full value and writes past the request buffer. Widen the variable and copy only the amount that was checked. Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands") Signed-off-by: Chandrakanth Patil Link: https://patch.msgid.link/20260825210411.301535-2-chandrakanth.patil@broadcom.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Sasha Levin commit cd45cf4740cfe6b13d3112d7d14bc608f38b86f2 Author: Linmao Li Date: Mon Aug 24 16:42:17 2026 +0800 power: supply: bq2515x: Propagate charge-enable read errors [ Upstream commit 4a35810a847411c466a15d1737d11e8e818dc197 ] bq2515x_get_charge_disable() returns bool even though reading the charger-disable state can fail. A negative error is therefore converted to true, so POWER_SUPPLY_PROP_STATUS reports NOT_CHARGING with success instead of propagating the failure. The GPIO read is not checked for errors either. Return an int from the helper, check both reads, and only convert a valid charger-disable state to the charging-status boolean. Fixes: 44908459275e ("power: supply: bq25150 introduce the bq25150") Signed-off-by: Linmao Li Link: https://patch.msgid.link/20260824084217.670213-1-lilinmao@kylinos.cn Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 7763d28b0403d05f684e7bfc99ad8dd3aa25ed89 Author: Henrik Grimler Date: Tue Aug 18 11:48:20 2026 +0200 dt-bindings: power: bq27xxx: bq27z561: allow interrupts property [ Upstream commit c3a6ff174c98f2c7ea213765ff6969140c381e90 ] According to the technical reference manual for bq27z561 it has support for an interrupt on an INT pin. Remove it from the list of devices without interrupt support to better describe the hardware. Fixes: b4f7a727c29c ("dt-bindings: power: supply: bq27xxx: document optional interrupt") Signed-off-by: Henrik Grimler Acked-by: Krzysztof Kozlowski Link: https://patch.msgid.link/20260818-bq27z746-v2-1-0371e206665f@axis.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 69cbb5e4d1e8c756350d24e6b71cc3f4933e3b8b Author: Ryan Brue Date: Tue Sep 8 00:35:58 2026 -0500 power: supply: bq24190_charger: use the wake irq API [ Upstream commit ece9baab2a6e79224d3f591893be23b540b1625f ] bq24190_probe() calls enable_irq_wake() on the charger interrupt and never calls disable_irq_wake(). That is wrong in three ways. It is unbalanced. free_irq() does not touch desc->wake_depth -- only irq_set_irq_wake() does -- so after the driver is unbound the descriptor is still one wake reference deep and the irqchip is still configured for wake, forever, for an interrupt nobody owns any more. It ignores the device's wakeup policy. The chip is made a system wake source whether or not anyone asked for it, and because device_init_wakeup() is never called there is no power/wakeup attribute for userspace to say otherwise. A board that would rather not be woken by its charger has no way to express that. And it arms the interrupt for wake permanently, from probe onwards, rather than for the sleep it is meant to cover. Use the wake irq API instead: devm_device_init_wakeup() to make the device wakeup-capable and enabled -- preserving today's behaviour -- and devm_pm_set_wake_irq() to hand the interrupt to the PM core, which arms it in dpm_suspend_noirq() (only if device_may_wakeup(), immediately before suspend_device_irqs()) and disarms it on resume. Both are unwound by devm, so the reference is balanced on unbind, and userspace gets the power/wakeup control it should have had. No intended change in behaviour: charger events still wake the system by default. The same conversion was made to another charger driver for the same reason, in commit 6c5393771c50 ("power: supply: qcom_pmi8998_charger: fix wakeirq"). Fixes: f385e6e2a153 ("power: bq24190_charger: Use PM runtime autosuspend") Assisted-by: LLM Signed-off-by: Ryan Brue Link: https://patch.msgid.link/20260908-rbrue-suez-upstreaming-bq24190_charger-use-wake-irq-api-v1-1-c3f10ae2a34a@gmail.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 0464eae124cab04618e22dcf6052ae8a4148c512 Author: hpp.iscas Date: Sat Sep 5 21:45:00 2026 +0800 power: supply: mm8013: Publish the OF module alias [ Upstream commit f265940e54d749c77507da083a3c16a481f5f5c5 ] The MM8013 driver matches mitsumi,mm8013 Device Tree clients, but exports only its legacy I2C ID table. The I2C core emits an OF modalias for these clients rather than i2c:mm8013. Publish the existing OF match table without changing gauge operations. Fixes: c75f4bf6800b ("power: supply: Introduce MM8013 fuel gauge driver") Signed-off-by: hpp.iscas Link: https://patch.msgid.link/20260905134500.67832-1-hppiscas@163.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 60450c30ecc5594d8d1bce40a038d11a6750d90f Author: Karl Mehltretter Date: Sat Sep 5 12:18:49 2026 +0200 power: supply: mp2629: Use the full batt_impedance_compensation name in the ABI document [ Upstream commit 1101833121a447999309a01f03d5b35bc1652e09 ] drivers/power/supply/mp2629_charger.c creates the attribute with DEVICE_ATTR_RW(batt_impedance_compensation). The ABI file documents it under the truncated name batt_impedance_compen, which does not exist in sysfs. Use the full name. Fixes: fe27f04e0cdc ("power: supply: mp2629: Add impedance compensation config") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260905101849.42830-1-kmehltretter@gmail.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 6e8dd7e9ff33e2b29c372088906dfa7cd51fc170 Author: Zongmin Zhou Date: Thu Aug 27 10:05:39 2026 +0800 power: supply: s2mu005-battery: return errors from dev_err_probe() in probe [ Upstream commit 38c8b37600b63db724c9c21d18d9989359353cc4 ] s2mu005_fg_i2c_probe() calls dev_err_probe() when devm_mutex_init() or devm_request_threaded_irq() fails, but drops the return value and carries on, finally returning 0. A failed probe is then reported as a success: the device stays registered with an uninitialized mutex and without its IRQ handler installed. Return the error from dev_err_probe() in both places so that the probe fails and the driver core logs the error state properly. Fixes: aa2132799817 ("power: supply: add support for S2MU005 battery fuel gauge device") Cc: Yassine Oudjana Cc: Kaustabh Chakraborty Cc: Sebastian Reichel Signed-off-by: Zongmin Zhou Link: https://patch.msgid.link/20260827020539.22837-1-min_halo@163.com Signed-off-by: Sebastian Reichel Signed-off-by: Sasha Levin commit 23534ad32967a1cca18d2b9ed212f44d8748d3c4 Author: K Prateek Nayak Date: Wed Sep 9 10:26:50 2026 +0000 cpufreq/amd-pstate-ut: Fix amd_pstate_ut_check_freq failure with 'Requested CPU Min frequency' BIOS option [ Upstream commit a23fca4ae137ec8e7620cc4f00b468b89cf5a7bd ] Since commit 608a76b65288 ("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option"), amd-pstate driver sets policy->min to frequency corresponding to bios_min_perf if a valid BIOS programmed min frequency value is detected. amd_pstate_ut_check_freq expects policy->min to always match lowest_nonlinear_freq which does not hold true on platforms with user configured BIOS min freq. Update the test case to compare policy->min to bios_min_freq on platforms that set it. Final comparison is adjusted to account for insane values by clamping the result within the supported frequency range. While at it, move freq_to_perf() and perf_to_freq() helpers to internal header to allow their use from amd-pstate-ut. Reviewed-by: Mario Limonciello Fixes: 608a76b65288 ("cpufreq/amd-pstate: Add support for the "Requested CPU Min frequency" BIOS option") Signed-off-by: K Prateek Nayak Link: https://lore.kernel.org/r/20260909102650.4582-1-kprateek.nayak@amd.com Signed-off-by: Mario Limonciello Signed-off-by: Sasha Levin commit 781f1375270ef720c74d5532506da3fed8a4fc9e Author: Willem de Bruijn Date: Tue Sep 8 11:54:29 2026 -0400 selftests: net: csum: filter packets by source address and port [ Upstream commit 8342c68435dd34b1ecd65b02fff9745cadab2616 ] Add source address and port verification in recv_verify_packet_* and recv_udp: non-matching packets are skipped. The receiver reads from PF_PACKET and UDP sockets to verify incoming packets to test hardware checksum offload. It did not validate the packet source address or source port. During tests expecting an invalid checksum (-E) or zero checksum (-Z), background packets can fail the test. For -Z, build_packet_udp chooses a specific source port that causes the checksum to sum to zero. When running in receive-only mode (-R), call build_packet in do_rx to compute the expected source port so that source port filtering can be applied to -Z as well. Also - add an inter-packet delay to avoid drops from bursts. - remove a comment that is no longer correct. Fixes: 91a7de85600d ("selftests/net: add csum offload test") Signed-off-by: Willem de Bruijn Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260908155537.813889-1-willemdebruijn.kernel@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 0c552cdae6ef91f395fa88a38319d7044da72c61 Author: Kang Yang Date: Fri Aug 28 14:55:34 2026 +0800 wifi: ath12k: preserve PPDU state across monitor status buffers [ Upstream commit 69b2d06dafa4a61b718704d655dd370ba660052a ] A monitor PPDU may span multiple status buffers. However, __ath12k_wifi7_dp_mon_process_ring() clears mon_ppdu_info before processing every buffer. As a result, continuation buffers lose PPDU state collected from earlier buffers, including ppdu_id and PHY metadata. This can cause monitor RX processing to fail when ath12k_wifi7_dp_rx_mon_dest_process() observes a PPDU ID mismatch between status and destination rings, preventing MSDUs from being delivered. It can also produce incomplete EHT metadata that triggers warnings from mac80211: Rate marked as an EHT rate but data is invalid: MCS:0, NSS:0 ath12k_wifi7_dp_mon_srng_process() already tracks status TLV continuations via ppdu_continuation. Apply the same logic here and only reinitialize mon_ppdu_info when starting a new PPDU. mon_ppdu_info persists across ar->monitor_started transitions. If monitor mode stops while a PPDU is mid-continuation, ppdu_continuation stays set and could leak into the next monitor session. Reset it when monitor mode starts. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 78d3d907d0f1 ("wifi: ath12k: add support to reap and process monitor status ring") Signed-off-by: Kang Yang Reviewed-by: Baochen Qiang Reviewed-by: Tamizh Chelvam Raja Link: https://patch.msgid.link/20260828065534.1537-1-kang.yang@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit d779364e7672126274d8b8c1725e9b8af160e0e2 Author: Aaradhana Sahu Date: Wed Aug 19 16:32:15 2026 +0530 wifi: ath12k: Free allocated external IRQs on request_irq() failure [ Upstream commit 9a78703ec4a895bd2e99bf43bd18d76683126c19 ] When external IRQ configuration fails, the driver does not release all IRQs that were successfully requested before the failure. This can leak IRQ resources during probe failure. Free previously requested external IRQs when external IRQ configuration fails. Also remove the NAPI instance with netif_napi_del() before freeing the associated netdev to properly clean up the NAPI resources. Store the IRQ number only after request_irq() succeeds to avoid recording an IRQ that was not successfully requested. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Aaradhana Sahu Reviewed-by: Rameshkumar Sundaram Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20260819110215.2485514-3-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 26d07f536fd8620cddf3e2b12acac99d31afdc29 Author: Aaradhana Sahu Date: Wed Aug 19 16:32:14 2026 +0530 wifi: ath12k: Free allocated CE IRQs on request_irq() failure [ Upstream commit 12ca935af2e68447e9218a615ebbb5ff7faf1554 ] When CE IRQ configuration fails, the driver does not release all IRQs that were successfully requested before the failure. This can leak IRQ resources during probe failure. Free the previously requested CE IRQs before returning from the error path to ensure that partially initialized IRQ resources are properly cleaned up during probe failure. Factor out the CE IRQ cleanup into a helper to reuse the cleanup logic during both error handling and driver teardown. Also free CE IRQs when external IRQ configuration fails, before returning from the error path. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Aaradhana Sahu Reviewed-by: Rameshkumar Sundaram Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20260819110215.2485514-2-aaradhana.sahu@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 317f460e6d63df3df7a7364d38cf692dc043418b Author: Baochen Qiang Date: Tue Aug 18 10:03:41 2026 +0800 wifi: ath12k: fix truncated TX buffer DMA address in MSDU ext descriptor [ Upstream commit 979ecb88ed3528e08dd7f87b90b029374226ca84 ] ath12k_wifi7_hal_tx_cmd_ext_desc_setup() programs the low 32 bits of the TX buffer physical address into HAL_TX_MSDU_EXT_INFO0_BUF_PTR_LO but hardcodes the high bits field HAL_TX_MSDU_EXT_INFO1_BUF_PTR_HI to 0x0. dma_addr_t is 64-bit on platforms with CONFIG_ARCH_DMA_ADDR_T_64BIT, so whenever a TX buffer is mapped above the 4 GB boundary the upper bits of paddr are dropped and the firmware is handed a truncated address, leading to potential TX failures. Write the upper bits of paddr into BUF_PTR_HI to fix this issue. Issue found during code review, compile tested only. Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Signed-off-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260818-ath12k-truncated-tx-dma-addr-v1-1-ead978969371@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 77bb18fff9241f306f9d2950432900f2e35db28f Author: Baochen Qiang Date: Tue Aug 18 09:44:48 2026 +0800 wifi: ath12k: fix stale skb pointers after aligned TX payload shift [ Upstream commit 6c40719489c8d799798989b15bc07b0700c132f8 ] ath12k_wifi7_dp_tx() caches hdr, eth, and skb_cb from the skb before calling ath12k_dp_tx_align_payload(). That function may shift skb->data in place (when headroom or tailroom is sufficient) or reallocate the buffer entirely via skb_realloc_headroom(), freeing the original skb. In either case hdr, eth, and skb_cb are left pointing into stale memory. After alignment, only hdr is refreshed, leaving eth and skb_cb stale. skb_cb is written immediately after (storing DMA addresses), and eth is re-read on every TCL ring retry via the tcl_ring_sel goto, so both accesses are use-after-free or stale-pointer bugs depending on which alignment path was taken. Refresh eth (conditionally, to preserve the encap-mode distinction) and skb_cb alongside hdr after ath12k_dp_tx_align_payload() returns, so all three point into the live skb for all subsequent accesses. Issue found during code review, compile tested only. Fixes: 38055789d151 ("wifi: ath12k: use 128 bytes aligned iova in transmit path for WCN7850") Signed-off-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260818-ath12k-uaf-for-aligned-tx-v1-1-d6ae195b15e7@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit b065c82703ac354b44bcab7ee9de9697b576172e Author: Rameshkumar Sundaram Date: Thu Aug 13 23:09:20 2026 +0530 wifi: ath12k: fix DMA unwind for ext MSDU descriptor retry [ Upstream commit 4de5a8a0edddc453f1a4c93b6d9f09013a23b72e ] ath12k_wifi7_dp_tx() maps the original MSDU into ti.paddr and stores the address in skb_cb->paddr. When an extended MSDU descriptor is used, the function later maps the ext descriptor and overwrites ti.paddr and ti.data_len with the ext-desc DMA address and length. If TCL ring allocation then fails, the error path first unmaps the ext-desc DMA address from skb_cb->paddr_ext_desc. It then falls through to fail_unmap_dma, which uses ti.paddr/ti.data_len for the original MSDU unmap. At that point ti.paddr still refers to the ext-desc mapping, so the ext descriptor is unmapped twice and the original MSDU mapping is left mapped. Fix the original MSDU unwind to use skb_cb->paddr and skb->len instead of ti.paddr/ti.data_len. The ti fields cannot be used after the ext descriptor is mapped because they are intentionally reused for the buffer submitted to TCL. Also clear skb_cb->paddr_ext_desc after the ext-desc unmap so a TCL ring retry cannot observe stale ext-desc DMA state from the previous attempt. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.6-01243-QCAHKSWPL_SILICONZ-1 Fixes: 37a068fc9dc4 ("wifi: ath12k: Handle error cases during extended skb allocation") Signed-off-by: Rameshkumar Sundaram Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20260813-ext-msdu-fix-v1-1-c5e80ccd061a@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 9dc08436954cd1f2cf0120405d3f2e9a12077235 Author: Nicolas Escande Date: Thu Aug 13 14:15:28 2026 +0200 wifi: ath11k: fix locking problem in ath11k_dp_rx_tid_del_func() [ Upstream commit c7555d47b1d051e0406474349deccf74b491ae01 ] In this function, we iterate over dp->reo_cmd_cache_flush_list using list_for_each_entry_safe(), under dp->reo_cmd_lock for concurrent access, and for each expired entries we : - drop the lock - call ath11k_dp_reo_cache_flush() - kfree() the entry - retake the lock to keep on iterating list_for_each_entry_safe() protects us from deleting the entry during iteration but doesn't protect for concurrent access. So another thread can take the lock and modify the list in between and crash like below. To fix the issue, move all entries that needs to be freed to a local list while under the lock and then iterate over the list to free the entries without holding the lock. BUG: Unable to handle kernel paging request at virtual address 00000010ddbeef8c Call trace: ath11k_dp_rx_tid_del_func+0x164/0x3c8 ath11k_dp_process_reo_status+0x1d4/0x2fc ath11k_dp_service_srng+0x334/0x338 ath11k_pcic_ext_grp_napi_poll+0x30/0xc0 __napi_poll+0x34/0x184 napi_threaded_poll+0xb4/0x1d8 kthread+0xdc/0xe0 ret_from_fork+0x10/0x20 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1 Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Suggested-by: Baochen Qiang Signed-off-by: Nicolas Escande Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260813-ath11k-locking-v2-1-f4113a0bd0f4@gmail.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit cc12d59b9a263c592b98e48baebcb23ff8ff93bd Author: Mikhail Lobanov Date: Mon Sep 9 11:08:20 2024 -0400 wifi: ath11k: modify null check logic in ath11k_ce_rx_post_pipe() [ Upstream commit 52953d149ab4da0432d54b09f3c8add42b4d4a82 ] The previous logic in ath11k_ce_rx_post_pipe() incorrectly required both dest_ring and status_ring to be NULL in order to exit the function. This caused the function to continue even if only one of the pointers was NULL, potentially leading to null pointer dereferences in ath11k_ce_rx_buf_enqueue_pipe(). Fix the condition by modifying the logic so that the function returns early if either dest_ring or status_ring is NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Signed-off-by: Mikhail Lobanov Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Acked-by: Jeff Johnson Link: https://patch.msgid.link/20240909150824.28195-1-m.lobanov@rosalinux.ru Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 598f4ba4f38afbd832a7eb7041185653f3271784 Author: Shuming Fan Date: Wed Sep 9 17:18:06 2026 +0800 ASoC: rt1320: avoid re-initialize in advanced mode [ Upstream commit 04c3ee0f5d158f6e2027c7ef617044cb649ab4ab ] On some machines, speaker protection is enabled. We call this advanced mode, which loads the DSP firmware and changes settings based on the basic mode, including blind writes. The amplifier can retain the advanced mode settings until a POR or power loss occurs. Therefore, the driver does not need to switch from basic mode to advanced mode when the system performs a warm reboot. We only need to check the function_status to determine whether the system has undergone a cold or warm reboot. Fixes: 9b30521074f0 ("ASoC: rt1320: run the initialisation preset on the first hardware init") Signed-off-by: Shuming Fan Reviewed-by: Pierre-Louis Bossart Link: https://patch.msgid.link/20260909091806.872977-1-shumingf@realtek.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c65d0a2e807c89090858cb7276f8c78347c82eee Author: Qinyun Tan Date: Wed Sep 2 16:54:14 2026 +0800 iommufd/selftest: Return dmabuf fd from IOMMU_TEST_OP_DMABUF_GET again [ Upstream commit 1d56f4d6db3d2b2c93017a80c4f9c4cfffa9d193 ] The selftest helper reads the new dmabuf fd from the ioctl return value: *out_fd = ioctl(fd, IOMMU_TEST_CMD, &cmd); Commit dba4254e216d ("iommufd/selftest: Fix dmabuf leak in iommufd_test_dmabuf_get()") fixed the dmabuf leak on dma_buf_fd() failure, but the applied version also changed the success path to return 0, so userspace no longer receives the fd. Note the patch as posted on the list returned rc here; the change to return 0 appeared when it was applied: https://lore.kernel.org/all/20260707030635.221577-1-seven.yi.lee@gmail.com/ Every test using test_cmd_get_dmabuf() then operates on fd 0 instead of the dmabuf, and the dmabuf_simple and dmabuf_revoke selftests fail across all fixtures: # iommufd.c:1595:dmabuf_simple:Expected -1 (-1) == _test_ioctl_ioas_map_file(...) (0) Keep the dma_buf_put() on failure but return the fd on success. Fixes: dba4254e216d ("iommufd/selftest: Fix dmabuf leak in iommufd_test_dmabuf_get()") Signed-off-by: Qinyun Tan Link: https://patch.msgid.link/20260902085414.549830-1-qinyuntan@linux.alibaba.com Tested-by: Yi Lai Signed-off-by: Jason Gunthorpe Signed-off-by: Sasha Levin commit 886a0d14818b8b8223dfbb53be17948dbda3b778 Author: Rafael J. Wysocki Date: Sun Sep 6 17:56:56 2026 +0200 ACPI: utils: Adjust message printing macros for ACPI objects [ Upstream commit 78ddbfaa72d68acc98cd5ba12eca071d452702c4 ] The majority of acpi_handle_() macros use neither pr_fmt() nor dev_fmt() and acpi_handle_debug() uses pr_fmt() like dev_fmt(), but only if dynamic debug is compiled in. For more consistency, redefine all of the macros in question to use dev_fmt() because they are more similar to the analogous dev_*() family of macros than to the pr_*() ones and make all of them use it in the same way. While at it, rephrase the comment documenting those macros for more clarity. Fixes: 45fef5b88d1f ("ACPI: add dynamic_debug support") Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/2300525.irdbgypaU6@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 7a79029ea8af4fa939ded51b972a7be6ff5e84fa Author: Rafael J. Wysocki Date: Sun Sep 6 17:54:10 2026 +0200 ACPI: glue: Rework the success message in acpi_device_notify() [ Upstream commit aef7792cddcac7ab400912c2947a595401d4a7e8 ] Using an ACPI handle in the acpi_device_notify() success message is somewhat misleading because the "physical" device is not bound to an ACPI namespace object in that function, but to an ACPI device object attached to it. Moreover, the message is outright confusing for the "physical" devices bound to ACPI devices without ACPI namespace objects (for example, fixed event buttons). Address this by turning that message into a dev_dbg() one printed for the "physical" device and mentioning the name of the ACPI companion. Fixes: ab06eb920401 ("ACPI: scan: Register platform devices for fixed event buttons") Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/2448150.ElGaqSPkdT@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit b755192c51c02d22dbdf145acb014ad62a8b8a4c Author: Rafael J. Wysocki Date: Sun Sep 6 17:51:23 2026 +0200 ACPI: glue: Reduce debug noise from acpi_device_notify() [ Upstream commit 5bc1e72f80da4c20ce8b57851be4fad67e855ebd ] When debug is enabled in the ACPI glue code that handles binding devices to ACPI companions, acpi_device_notify() produces a lot of message noise related to devices that have no ACPI companions. Reduce that noise by checking the most obvious case, ACPI device objects, directly and returning from acpi_device_notify() in that case without printing any debug messages. Also avoid printing a debug message when there is no matching ACPI bus type definition for the given device, which is the case for the vast majority of devices. Additionally, make the debug messages that get printed more informative. Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/6325978.lOV4Wx5bFT@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki Stable-dep-of: aef7792cddca ("ACPI: glue: Rework the success message in acpi_device_notify()") Signed-off-by: Sasha Levin commit d201427d03190ab92582689f4829503e4ee7bd25 Author: Rafael J. Wysocki Date: Thu Sep 3 19:05:37 2026 +0200 ACPI: scan: Stop calling acpi_bus_init_power() early [ Upstream commit 2f4ddf2bd1baf0ee3c8542ec6f382a3585cae607 ] There is a problem, introduced by commit 9d9bcae47fd5 ("ACPI: delay enumeration of devices with a _DEP pointing to an INT3472 device") inadvertently, that devices with missing dependencies may be put into power state D0 prematurely [1]. Namely, acpi_bus_init_power() called by acpi_bus_get_power_flags() during the early initialization of ACPI device objects, may discover that all of the power resources needed by the given device to be in power state D0 are initially on, so it will reference count those power resources and transition the device into D0. Later, if acpi_bus_attach() running for that device notices that it has missing dependencies, the enumeration of it will be deferred and its power_manageable flag will be cleared, even though it is still in D0 at that point. After the dependencies in question have been met, acpi_bus_attach() runs again for the device and now it calls acpi_bus_init_power() that takes additional references to the power resources used by the device in D0. These additional references prevent the power resources from being turned off when the device goes into D3hot/D3cold. Another problem, related to the previous one, is that ACPI power state initialization may be carried out for devices whose parents are not ready for enumeration which may lead to initialization ordering issues. To address both, stop calling acpi_bus_init_power() from acpi_bus_get_power_flags(), but also take the initialization of PCI devices into account, which needs to be done because they are initialized and bound to their ACPI companions before acpi_bus_attach() is called for the latter. To that end, notice that acpi_power_up_if_adr_present() is used for powering-up PCI devices in D3cold before walking the bus in order to discover them and the initial ACPI power state of those devices needs to be known for this purpose, so add an acpi_bus_init_power() invocation to that function. [The debug statement printed by it duplicates the debug statements printed during the acpi_bus_init_power() execution, so drop it.] Moreover, since the ACPI companions of PCI devices are associated with the corresponding PCI devices found on the bus before acpi_bus_attach() is called for them, it is not necessary or even useful to skip them in acpi_bus_attach() due to an ACPI status mismatch, so avoid doing that and complain if the ACPI status does not match the observed situation. Also use the ACPI power state tracking to decide whether or not the device's power state needs to be initialized in acpi_bus_attach() instead of using the "initialized" flag of the ACPI device object for this purpose, which is fragile and inconvenient, and clear the power_manageable flag on failure in acpi_bus_init_power() (additionally, poison the device ACPI power state as "invalid" if the initialization of it fails). That allows the clearing of the power_manageable flag for devices with unmet dependencies to be dropped. While at it, add a debug message pringing statement to acpi_bus_init_power() to facilitate diagnostics. Fixes: 9d9bcae47fd5 ("ACPI: delay enumeration of devices with a _DEP pointing to an INT3472 device") Link: https://lore.kernel.org/linux-acpi/20260820-acpi-power-resource-ref-fix-v2-1-29818173ea13@linux.spacemit.com/ [1] Signed-off-by: Rafael J. Wysocki Tested-by: Peixin Xie Tested-by: Sakari Ailus Link: https://patch.msgid.link/2295263.irdbgypaU6@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 9870a63f6e02620edd9b46c062827b301c794124 Author: Rafael J. Wysocki Date: Thu Sep 3 18:58:34 2026 +0200 ACPI: PM: Drop parent state update from acpi_device_get_power() [ Upstream commit 5636eebb7bb1c6f06f0058d48353686304d4bb47 ] The parent state update in acpi_device_get_power(), that occurs when the child device turns out to be in D0 and the parent's power state is still unknown, is highly questionable because it may cause the reference counters of the power resources used by the parent in D0 (if any) to underflow when the parent goes into a low-power state later. Moreover, there is no reason to do it on reads from the real_power_state sysfs attribute of the child. That check had been added by commit 8f7412a792bc ("ACPI / PM: Infer parent power state from child if unknown, v2") before starting to handle the "missing _PSC and no power resources" case directly in acpi_bus_init_power(), as of commit b3785492268f ("ACPI / PM: Do not power manage devices in unknown initial states"). It is not necessary any more and commit b3785492268f should have removed it. Drop it now. Fixes: b3785492268f ("ACPI / PM: Do not power manage devices in unknown initial states") Signed-off-by: Rafael J. Wysocki Tested-by: Peixin Xie Tested-by: Sakari Ailus Link: https://patch.msgid.link/5147279.31r3eYUQgx@rafael.j.wysocki Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 12435a9e702793ab7c4a0f4d124e8e92485b6512 Author: Ian Gallagher Date: Sun Aug 30 13:19:24 2026 +1200 ACPI: button: Add lid_init_state quirk for Razer Blade Stealth 13 (Early 2020) RZ09-0310 [ Upstream commit f16c512a07b954aa3b0b3c580e7abb5dd4f5e703 ] This patch adds a quirk mapping for the "Blade Stealth 13 (Early 2020) - RZ09-0310" laptop, which exhibits the same issue as the following two related products already accounted for in this file. - Razer Blade Stealth 13 Late 2019 - Blade Pro 17 (Early 2020) - RZ09-0329 Summary of the issue this fixes: The firmware's _LID method still returns "closed" after resume when the lid was opened during S3, causing systemd-logind to suspend the system again within several seconds (15-40) after waking. Signed-off-by: Ian Gallagher Link: https://patch.msgid.link/90ab9b58-da8b-4ffc-bd4b-adf7590545a9@app.fastmail.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 4967290897545bc75307e8499becb3765a059086 Author: Pengpeng Hou Date: Sun Aug 30 22:18:28 2026 +0800 ASoC: nau8822: keep regcache offline while supplies are off [ Upstream commit 9c343445b349422bddebb4cb9668c246bc6f08de ] nau8822_suspend() disables all codec supplies and marks the register cache dirty, but leaves regmap in live I/O mode. Resume then attempts the cache replay without first leaving a corresponding cache-only state. Enter cache-only mode after the regulators have been disabled successfully, leave it after the supplies are restored, and stop the local resume sequence if cache replay fails. Do not power the codec back down on a resume error, because deferred component resume remains best effort and continues after the callback. regulator_bulk_disable() restores regulators already disabled by the same bulk operation if a later disable fails. Only publish cache-only state after the whole power-off operation succeeds, so the regmap state continues to match the hardware state on either outcome. Fixes: 1e3cb6c321be ("ASoC: nau8822: new codec driver") Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260830141828.34419-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3ccd8b91a214d4b8c12619e048ea50deb498da21 Author: Vinod Koul Date: Thu Sep 3 22:33:57 2026 +0530 dmaengine: zynqmp_dma: drop redundant label [ Upstream commit 08f04d5ab868bc28d3115f7406499e8e5d1d1765 ] Commit 3f30db282c28 ("dmaengine: zynqmp_dma: Fix chan probe/remove error handling") dropped the use of err_disable_pm label causing warning: drivers/dma/xilinx/zynqmp_dma.c: In function ‘zynqmp_dma_probe’: drivers/dma/xilinx/zynqmp_dma.c:1171:1: error: label ‘err_disable_pm’ defined but not used [-Werror=unused-label] 1171 | err_disable_pm: Drop it Fixes: 3f30db282c28 ("dmaengine: zynqmp_dma: Fix chan probe/remove error handling") Reviewed-by: Radhey Shyam Pandey Reviewed-by: Frank Li Link: https://patch.msgid.link/20260903170357.1711462-1-vkoul@kernel.org Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit a4c863dab7f9a0bdfd814d8594a2543f799b2f7d Author: Srinivas Neeli Date: Tue Aug 18 23:11:49 2026 +0530 dmaengine: xilinx_dma: Move descriptors to done list based on completion bit [ Upstream commit 5b585cc8778185ae7a7c9903f8cd70d562b91282 ] In AXI MCDMA, xilinx_dma_complete_descriptor() walks the channel's active_list and unconditionally moves every entry to the done_list. The MCDMA IOC interrupt handler invokes this function on every interrupt-on-completion, but with interrupt coalescing (IRQThreshold > 1) an IOC interrupt may fire after only a subset of the queued descriptors have actually been processed by the hardware. As a result, descriptors whose completion bit is not yet set in the BD status were being reported as completed to client drivers. Add a check for the descriptor completion bit before moving entries from the active list to the done list, using the appropriate direction- specific status field (s2mm_status for DMA_DEV_TO_MEM, mm2s_status for DMA_MEM_TO_DEV). This mirrors the AXIDMA fix in commit 7bcdaa658102 ("dmaengine: xilinx_dma: Freeup active list based on descriptor completion bit"). Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support") Reviewed-by: Radhey Shyam Pandey Signed-off-by: Srinivas Neeli Reviewed-by: Frank Li Link: https://patch.msgid.link/20260818174151.1608971-3-srinivas.neeli@amd.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 78642c1ad28896c4279065318599678dbad0c796 Author: Srinivas Neeli Date: Tue Aug 18 23:11:48 2026 +0530 dmaengine: xilinx_dma: Fix MCDMA descriptor fields based on DMA direction [ Upstream commit b70ab341088b2114dcbc7be868588f3e97893e6a ] The MCDMA BD format differs between memory-to-device (MM2S) and device-to-memory (S2MM) directions, but the driver was using generic 'status' and 'sideband_status' fields for both. This led to incorrect residue calculations when the hardware updates direction-specific fields. Refactor the descriptor structure to use unions with direction-specific field mappings, and update the residue calculation logic to select the correct status field based on DMA direction. This matches the hardware descriptor layout and fixes incorrect residue reporting. Fixes: 6ccd692bfb7f ("dmaengine: xilinx_dma: Add Xilinx AXI MCDMA Engine driver support") Reviewed-by: Radhey Shyam Pandey Signed-off-by: Srinivas Neeli Reviewed-by: Frank Li Link: https://patch.msgid.link/20260818174151.1608971-2-srinivas.neeli@amd.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit d08b37b065b405d0e3ca84bfdf65c073b4ea2e82 Author: Chaithanya Lagisetty Date: Sun Aug 16 05:48:58 2026 +0000 dmaengine: dw-axi-dmac: convert clock handling to clk_bulk API [ Upstream commit c843417e6d6b55e24318e2edf405566e70786d3b ] The driver managed its two mandatory clocks (core-clk and cfgr-clk) individually. This was error prone: axi_dma_resume() enabled cfgr_clk and then core_clk, and if enabling core_clk failed it returned the error without disabling cfgr_clk, leaving the clock refcount unbalanced. Convert the driver to the clk_bulk API. The two clocks are always acquired, enabled and disabled together, so a clk_bulk_data array expresses this naturally and shrinks the get/enable/disable paths. clk_bulk_prepare_enable() also unwinds any clock it already enabled when a later one fails, which fixes the resume imbalance. Fixes: 1fe20f1b8454 ("dmaengine: Introduce DW AXI DMAC driver") Signed-off-by: Chaithanya Lagisetty Link: https://lore.kernel.org/all/20260813105432.2577322-1-nagachaithanya9911@gmail.com/ Reviewed-by: Frank Li Link: https://patch.msgid.link/20260816054858.2667380-1-nagachaithanya9911@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit c91df62a47c87a50d40faaf4380518d81f88065f Author: Golla Nagendra Date: Fri Aug 14 10:26:11 2026 +0530 dmaengine: zynqmp_dma: Fix chan probe/remove error handling [ Upstream commit 0266dac57019201a14a81245d22750ab221d6c66 ] Keep the real platform_get_irq() error by returning ret directly, stage IRQ setup via a local ret variable, and assign chan->irq only after devm_request_irq() succeeds. Initialize chan->irq to -1 and initialize chan->common.device_node before it may be touched by teardown. In channel remove, free IRQ only for valid IRQ numbers and delete the channel node only when it is linked. Register the channel node only after successful IRQ setup. On channel probe failure in zynqmp_dma_probe(), route cleanup through the existing free_chan_resources teardown path. Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support") Signed-off-by: Golla Nagendra Reviewed-by: Frank Li Link: https://patch.msgid.link/20260814045616.1661199-4-nagendra.golla@amd.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit dd0d85dfcf77b9925a6341c876d9b6e799f38267 Author: Golla Nagendra Date: Fri Aug 14 10:26:10 2026 +0530 dmaengine: zynqmp_dma: Free sw_desc_pool on desc_pool_v alloc failure [ Upstream commit 4ea99b14b3bd955d768666941e2e03ba186b52f5 ] In zynqmp_dma_alloc_chan_resources(), sw_desc_pool is allocated before desc_pool_v. If dma_alloc_coherent() for desc_pool_v fails, the function currently exits through the runtime PM rollback path but leaves the already allocated sw_desc_pool behind. Add a dedicated err_free_sw_desc_pool label for the desc_pool_v failure path, free sw_desc_pool there, then fall through to err_pm for pm_runtime_put_autosuspend(). This keeps the error unwind symmetric and avoids leaking the software descriptor pool on coherent descriptor allocation failure. Fixes: b0cc417c1637 ("dmaengine: Add Xilinx zynqmp dma engine driver support") Signed-off-by: Golla Nagendra Reviewed-by: Frank Li Link: https://patch.msgid.link/20260814045616.1661199-3-nagendra.golla@amd.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 1af5e66d6bb246330243d965b6863100ebc13441 Author: Golla Nagendra Date: Fri Aug 14 10:26:09 2026 +0530 dmaengine: zynqmp_dma: Fix PM rollback on sw_desc_pool alloc failure [ Upstream commit f2f44b952ea6e0c600e92ea21fcaa83cafeedf6e ] If sw_desc_pool allocation fails after pm_runtime_resume_and_get() succeeds in zynqmp_dma_alloc_chan_resources(), the error path returns without dropping the runtime PM reference. Route that failure path through err_pm so the runtime PM reference is balanced before returning the error. Fixes: 8982d48af36d ("dmaengine: zynqmp_dma: Fix PM reference leak in zynqmp_dma_alloc_chan_resourc()") Signed-off-by: Golla Nagendra Reviewed-by: Frank Li Link: https://patch.msgid.link/20260814045616.1661199-2-nagendra.golla@amd.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit ddbe1fc0e324fdb4df33c329cf8e7b724c2358ad Author: Ruoyu Wang Date: Thu Aug 13 23:31:43 2026 +0800 dmaengine: img-mdc: Fix runtime PM usage counter leak [ Upstream commit 4a1a2d8b8529cc569b769b92fcd71c53805cbeb2 ] pm_runtime_get_sync() leaves the IMG MDC device's usage counter incremented when runtime resume fails. mdc_alloc_chan_resources() returns that error to the DMA core, so the channel's client count is not incremented and mdc_free_chan_resources() is not called to drop the reference. Repeated allocation attempts can therefore accumulate usage references and prevent runtime suspend. Use pm_runtime_resume_and_get() so a failed resume does not retain a usage reference while successful allocations remain paired with mdc_free_chan_resources(). DMA core only treats negative return values as allocation failures, so the helper's zero success return preserves behavior. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 56d355e6f586 ("dmaengine: img-mdc: Add runtime PM") Signed-off-by: Ruoyu Wang Reviewed-by: Frank Li Link: https://patch.msgid.link/20260813153143.3953303-1-ruoyuw560@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit f5dd626e106c31634ee8950ac038a404d87aac64 Author: Myeonghun Pak Date: Wed Aug 5 00:39:24 2026 +0900 dmaengine: mediatek: hsdma: fix runtime PM leak on init failure [ Upstream commit f10d96b1c549a2f43506e9bf847196839808b8dc ] mtk_hsdma_hw_init() enables runtime PM and gets a runtime PM reference before enabling the HSDMA clock. It currently ignores failures from pm_runtime_get_sync(); if runtime resume fails, the usage count remains held. If clk_prepare_enable() then fails, the usage count remains held. Use devm_pm_runtime_enable() to manage runtime PM enablement, and use pm_runtime_resume_and_get() so resume failures do not leak the usage count. If clk_prepare_enable() fails after a successful runtime resume, drop the runtime PM reference before returning. The probe path also ignores the return value from mtk_hsdma_hw_init(), so a failed hardware init can continue as a successful probe. Propagate mtk_hsdma_hw_init() failures from probe, while keeping a separate unwind label so mtk_hsdma_hw_deinit() is only called after hardware init succeeds. Fixes: 548c4597e984 ("dmaengine: mediatek: Add MediaTek High-Speed DMA controller for MT7622 and MT7623 SoC") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Reviewed-by: Frank Li Link: https://patch.msgid.link/20260804153924.49627-1-mhun512@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 48156abf1f13519242ab96e89d6871cff6fbeedb Author: Hongling Zeng Date: Mon Jul 27 14:17:05 2026 +0800 dmaengine: at_hdmac: Fix use-after-free by proper tasklet cleanup [ Upstream commit 13f2d32a09609d083ace2d589fbdc68e970ae34c ] Current cleanup paths have a use-after-free vulnerability: - vchan_init() creates tasklets that access at_dma_chan memory - free_irq() only waits for IRQ handler, NOT tasklets - atdma is devm-managed and freed after probe/remove - Running tasklets accessing freed memory → Use-After-Free! The fix requires careful ordering: - free_irq() FIRST to synchronize with running IRQ handlers and prevent them from scheduling new tasklets - Then kill tasklets to wait for already-scheduled ones to complete - Only then free other resources Fixes: ac803b56860f ("dmaengine: at_hdmac: Convert driver to use virt-dma") Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/all/20260604073945.54B311F00898@smtp.kernel.org/ Signed-off-by: Hongling Zeng Suggested-by: Frank Li Reviewed-by: Frank Li Link: https://patch.msgid.link/20260727061705.45169-1-zenghongling@kylinos.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 67045b9cd61abc008223580e652f87d46239918f Author: Hongling Zeng Date: Mon Jul 27 14:11:42 2026 +0800 dmaengine: sun6i-dma: Fix use-after-free in error handling paths [ Upstream commit f472919f4c0650d7fb22bb230eacaada0c6ee951 ] In error handling paths, the for loop frees v_lli in the loop body, then accesses v_lli->v_lli_next and v_lli->p_lli_next in the increment expression, which is use-after-free. Fix by refactoring the cleanup into a helper function sun6i_dma_free_desc() that saves both the next virtual and physical pointers before freeing the current node, preventing the use-after-free. Fixes: 555859308723 ("dmaengine: sun6i: Add driver for the Allwinner A31 DMA controller") Signed-off-by: Hongling Zeng Suggested-by: Jernej Skrabec Reviewed-by: Jernej Skrabec Reviewed-by: Frank Li Link: https://patch.msgid.link/20260727061142.44195-1-zenghongling@kylinos.cn Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 458592ad015038c5425db40285484c8a5087ac8f Author: Li Youhong Date: Mon Aug 31 17:45:53 2026 +0800 spi: amlogic-spisg: check clk_prepare_enable() return value [ Upstream commit c595dcbce20f55c98cd9b0003c26db3787e0ddee ] The driver ignored clk_prepare_enable() failures for sclk during probe and for core/sclk during runtime resume. Propagate the errors and, on resume, disable core if enabling sclk fails, so probe/resume do not continue with clocks disabled or report success falsely. Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver") Signed-off-by: Li Youhong Link: https://patch.msgid.link/20260831094553.2247003-1-dayou5941@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 0979cfd1b9a14442ce209b2e5fd5a259190db302 Author: Pengpeng Hou Date: Sun Aug 30 22:15:21 2026 +0800 ASoC: sta32x: make power restoration transactional [ Upstream commit 3e71dc4508bc84862dc3644e3b6a5b966bff22ad ] sta32x_set_bias_level() enables the codec supplies, restores the coefficient and register state, and then starts the watchdog. Register access errors in the mute and coefficient helpers and the cache replay are discarded, allowing DAPM to publish STANDBY for a partially restored codec. Propagate every operation in the local restore transaction, including the final standby-state write. Start the watchdog only after that write succeeds. On failure, hold reset, mark the cache dirty, disable the supplies and report a cleanup failure while preserving the primary error. The DAPM bias callback consumes the returned error independently of component resume handling. Fixes: 54dc6cabe684 ("ASoC: sta32x: preserve coefficient RAM") Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260830141521.33246-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit f63c7d479ca893dd0744105e62c560a159830d51 Author: Pengpeng Hou Date: Sun Aug 30 21:44:28 2026 +0800 ASoC: codecs: sma1307: validate setting firmware layout [ Upstream commit af0f4f7a042e39bf70fa7406351b26efead18dff ] sma1307_setting_loaded() checks a byte count against an element count, then reads an eight-int header and a fixed default table from the firmware. It also trusts the mode count while indexing a five-entry mode_set array. Validate the byte-to-int conversion, fixed header/default extent, mode count, and exact mode table layout before parsing the setting file. Fixes: 576c57e6b4c1 ("ASoC: sma1307: Add driver for Iron Device SMA1307") Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260830134428.9550-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 02d008eedacfff2ee61393ebb283fe4652fecc77 Author: Ian Rogers Date: Tue Sep 8 15:07:20 2026 -0700 perf stat: Avoid uninitialized memory read on error [ Upstream commit 93fd7adf1a47c61ef81b33c8fdd9cb4e4ea0bdcb ] If has_supported_counters fails then msg was passed to ui__error regardless of whether an error was written into msg leading to reading uninitialized memory. Avoid this by always terminating msg at initialization. Opportunistically reduce the scope of msg to make its use clearer. Fixes: c9a8c343ef2f ("perf stat: When no events, don't report an error if there is none") Signed-off-by: Ian Rogers Link: https://lore.kernel.org/r/20260908220720.564614-1-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit f3a6582dbc87a155ebd46065c6e967712af5abec Author: Karl Mehltretter Date: Wed Sep 9 08:40:55 2026 +0200 mtd: spinand: Fix spinand_manufacturer_ops kernel-doc [ Upstream commit 7e874b1750a40f3dc9a629aeb72eba09c77f77e9 ] The kernel-doc heading for struct spinand_manufacturer_ops misspells and truncates its name as manufacurer_ops. As a result, kernel-doc cannot match the comment to the structure declaration. Use the structure's actual name. Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Miquel Raynal Signed-off-by: Sasha Levin commit 29cf2485d5896a13756d8b6472dd48f042d7461b Author: Mingpei CAO Date: Tue Sep 8 16:49:19 2026 +0000 libbpf: Fix array comparison in BTF dedup [ Upstream commit e62c5b97d6c4c657d6fad7dd3523fda33a936979 ] btf_dedup_identical_types() reads both array descriptors from t1, skipping comparisons of their referenced types. This can incorrectly merge distinct structs and corrupt CO-RE relocation metadata. Read the second descriptor from t2. Fixes: 62e23f183839 ("libbpf: Improve BTF dedup handling of "identical" BTF types") Closes: https://lore.kernel.org/bpf/CABzjXVz3iBuump-pXFkefZ5v+2uu4fG61zqRyWD4xmz3PuBycw@mail.gmail.com/ Signed-off-by: Mingpei CAO Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260908164920.108074-2-caomingpei@gmail.com Signed-off-by: Sasha Levin commit 2ac6601fbc2a55cfd10e9d7fa04f9d6769e09385 Author: Ian Rogers Date: Fri Sep 4 12:49:54 2026 -0700 perf test: Avoid call to missing cleanup function [ Upstream commit 4bbcb0fb9b866d05a2dd2db8bccd78be9d0476a9 ] Cleanup function was removed by writing to /dev/null rather than temporary files. The exit path still had a call. Fixes: 44f6b44027910eb9 ("perf test: Fix hybrid testing of event fallback test") Reviewed-by: Dapeng Mi Signed-off-by: Ian Rogers Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 5ef4a5afdd87c8a7a16861aa06435169f4213ff6 Author: Matt Turner Date: Sat Sep 5 18:54:11 2026 -0400 perf thread: Fix live-session detection in thread__e_machine() [ Upstream commit 15917a3a1ce0695f824892c8f9d0dc51408ee580 ] When the per-thread e_machine cannot be determined from the DSOs in the thread's maps, thread__e_machine_endian() decides between reading /proc//exe and falling back to the recorded session environment: bool is_live = machine->machines == NULL; if (!is_live) { /* Check if the session has a data file. */ struct perf_session *session = container_of(...); is_live = !!session->data; } Neither half of that works. The back pointer added by commit a088031c4998 ("perf tools: Add machine to machines back pointer") is set by machines__add(), which only ever adds guests; the host machine never gets one. Host-machine threads, which is to say almost all of them, therefore see machine->machines == NULL and are declared live before the session is consulted at all. The session test is also inverted. A session with a perf_data attached is one being read from a perf.data file, i.e. exactly the case that is not live, while a live session such as 'perf top' passes data=NULL to __perf_session__new(). So a file-based session takes the live path and reads /proc//exe on the analysing host, which at best describes an unrelated process that has since been given the recorded pid, and normally just fails, leaving e_machine as EM_NONE. The perf_env fallback that would have supplied the recorded architecture is never reached, and thread__e_machine() returns EM_HOST. For a same-architecture recording this is invisible, since EM_HOST is the right answer anyway. Cross-architecture it is not: annotating an Alpha perf.data on an x86_64 host selects the x86 struct arch, so the Alpha disassembly is matched against the x86 instruction table. Alpha's 'ret' collides with x86's and gets ret_ops, while its calls and branches match nothing and are left unparsed, so no call target is resolved and no jump arrows are drawn. Set the back pointer for the host machine and correct the session test. The new back pointer does not disturb the other reader of the field, machine__findnew_guest_code(), which machine__resolve() only calls when !machine__is_host(machine). Fixes: 70351029b55677eb ("perf thread: Add support for reading the e_machine type for a thread") Reviewed-by: Ian Rogers Signed-off-by: Matt Turner Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit a38d65159e74ed64a3655011e02c3b9853e2a03f Author: Thomas Richter Date: Thu Sep 3 09:35:53 2026 +0200 perf test: perf stat tests fails on s390 [ Upstream commit 454e049a3f6528a04f96afb4cbef1fcbb49c2d0f ] The test case 'perf stat tests' fails on s390 z/VM machines. The root cause is the unsupported CPU measurement facility on z/VM. Therefore the events cycles and instructions do not exist and are unsupported. This cause the subtest Hide zero events stat test to fail. Output before: # perf test 116 116: perf stat tests : FAILED! === Test Summary === Passed main tests : 0 Passed subtests : 0 Skipped tests : 0 Failed tests : 1 List of failed tests: 116: perf stat tests # Output after: # ./perf test 116 116: perf stat tests : Ok === Test Summary === Passed main tests : 1 Passed subtests : 0 Skipped tests : 0 Failed tests : 0 # Fixes: 64724095a33fbee8 ("perf stat: Add --hide-zero-events option to suppress zero-count events") Reviewed-by: Aaron Tomlin Reviewed-by: Ian Rogers Signed-off-by: Thomas Richter Cc: Aaron Tomlin Cc: Ian Rogers Cc: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 2a29c799661047d1805c254e7a3d2b6fe114616d Author: Qiuxu Zhuo Date: Wed Aug 19 10:52:59 2026 +0800 EDAC/i10nm: Fix Granite Rapids ADXL MC mapping [ Upstream commit ba71d9b4e9dd83c1614b3b5cec6c82a39d290f7e ] ADXL reports memory errors using memory-controller physical indices, while the EDAC driver identifies memory controllers using logical indices. On Granite Rapids systems, BIOS may disable some memory controllers, causing the physical and logical indices to differ. As a result, ADXL memory errors may be associated with the wrong memory controller, preventing EDAC from reporting errors for some DIMMs. Maintain a physical-to-logical MC mapping so that ADXL memory errors are decoded correctly regardless of the BIOS memory-controller configuration. Fixes: ba987eaaabf9 ("EDAC/i10nm: Add Intel Granite Rapids server support") Reported-by: Yanhua Wu Signed-off-by: Qiuxu Zhuo Signed-off-by: Tony Luck Link: https://patch.msgid.link/20260819025259.266201-1-qiuxu.zhuo@intel.com Signed-off-by: Sasha Levin commit 67757cbc8a5371e804a8229c41bf0f5bf767ff4a Author: Tejun Heo Date: Wed Sep 2 13:03:13 2026 -1000 cgroup: Make the offline drain interruptible [ Upstream commit c367ce5b31ffd4d958f3f6c5fe1c9e820dc9f526 ] cgroup_subtree_control_write() and cgroup_type_write() drain dying csses from the subtree before re-applying control, so that a controller being re-enabled gets a fresh css instead of adopting one that is still dying. The drain waits for offline_css() in TASK_UNINTERRUPTIBLE. Since 1dffd95575eb ("cgroup: Defer kill_css_finish() in cgroup_apply_control_disable()"), a disabled css offlines only after every task that still pins it has finished exiting. The root cause of the hang is an indefinite wait in a place where indefinite waits should not happen: a task past exit_signals() can block in its exit path for as long as, say, a FUSE daemon takes to answer a flush, and nothing can interrupt it because prepare_signal() drops every signal for an exiting group. The drain then escalated that into an uninterruptible wait for the writer, which sits in D state for as long as the exiting task does. That is the hang syzbot reports as "task hung in cgroup_subtree_control_write". Make the drain interruptible. Nothing has been modified when it runs, so the write restarts or fails with EINTR without side effects. cgroup1 mount and remount drain the same way and become interruptible too. cgroup_destroy_root() drains from a workqueue where no signal is ever pending and keeps waiting as before. This only stops the escalation. The write still waits for the exiting tasks, and the indefinite wait in the exit path remains a separate problem. Fixes: 1dffd95575eb ("cgroup: Defer kill_css_finish() in cgroup_apply_control_disable()") Reported-by: syzbot+bb2e19a1190a556c01b1@syzkaller.appspotmail.com Link: https://lore.kernel.org/all/6a23a4b4.e4db5ad2.3b7dfb.0000.GAE@google.com/ Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 91786b2e13d81f742ffef8880851c2f7a90a03cd Author: Tejun Heo Date: Wed Sep 2 13:03:12 2026 -1000 cgroup: Return ERR_PTR from cgroup_kn_lock_live() [ Upstream commit 67499cd07ba93dc643ca5624b7dc947f0354ace2 ] cgroup_kn_lock_live() returns NULL when the cgroup is dead and the callers translate that into an errno themselves. Return ERR_PTR(-ENODEV) instead and have the callers pass the errno through, so that failures other than a dead cgroup can be reported through the same return value. No functional change. Signed-off-by: Tejun Heo Stable-dep-of: c367ce5b31ff ("cgroup: Make the offline drain interruptible") Signed-off-by: Sasha Levin commit b868e75d1c69a421be1c9c7c3ebd3b48da22e243 Author: Tejun Heo Date: Wed Sep 2 13:03:11 2026 -1000 cgroup: Return -ENODEV consistently for a dead cgroup [ Upstream commit 22098e3b6f7260860d61523a8dc2964b40559763 ] cgroup_kn_lock_live() returns NULL when the cgroup behind a kernfs node has already been removed. Most callers turn that into -ENODEV, but the cgroup.type, cgroup.max.descendants, cgroup.max.depth, cgroup.pressure, cgroup.freeze and cgroup.kill writers return -ENOENT. The divergence is accidental. Return -ENODEV from all of them, matching cgroup.procs and cgroup.subtree_control. Signed-off-by: Tejun Heo Stable-dep-of: c367ce5b31ff ("cgroup: Make the offline drain interruptible") Signed-off-by: Sasha Levin commit cfbecad7e2094f14f24afdf8bc0e2c3ec53a1022 Author: Tianyi Chen Date: Sun Sep 6 21:55:22 2026 +0800 selftests/sched_ext: Handle CPU hotplug write failures [ Upstream commit 49c64ffb2fd996af4c82007196c61e17d74cb1ab ] toggle_online_status() logs failed CPU state changes but discards the write result. The hotplug tests can consequently wait indefinitely for a scheduler exit that the failed operation never triggered. Return the write result and stop both hotplug tests when a required CPU state change fails. Release the acquired scheduler resources on these paths and let the existing cleanup callback retry restoring CPU1. Also fail the test when its normal CPU restoration fails. Tested in a two-vCPU VM running a kernel built from the same source as the selftests. Injecting EIO with strace into each of the ten CPU state writes makes the fixed test return 1, with CPU1 online and sched_ext disabled after cleanup. The original test does not finish within three seconds when either of the first two writes fails. Normal hotplug tests pass before and after the change. Making the online file read-only also produces a failure without hanging. Fixes: a5db7817af78 ("sched_ext: Add selftests") Assisted-by: LLM Signed-off-by: Tianyi Chen Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit ff2f68ca3510839a1fedcbab0737fe031e679653 Author: Tianyi Chen Date: Sun Sep 6 21:54:55 2026 +0800 selftests/sched_ext: Fail interrupted test runs [ Upstream commit 7036264dcd46ab641768ef97ab74f91bce5701c8 ] SIGINT and SIGTERM set exit_req, causing the runner to stop before executing the remaining tests. However, the exit status only reflects the number of failed tests, so an interrupted run returns success when none of the completed tests failed. Include exit_req in the failure condition so callers can distinguish an interrupted run from a successful run. Keep the result counts limited to the tests that actually ran. Tested the actual runner under GDB, delivering each signal before the first test and after the example test passed. The original runner returns 0 in all four cases; the fixed runner returns 1. Normal -h, -l and -t example invocations still return 0. Fixes: 9d851afa4826 ("selftests/sched_ext: Abort test loop on signal") Assisted-by: LLM Signed-off-by: Tianyi Chen Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 3c5cc1ac12dc62fc3007b04aaec4ea9c0fffeda3 Author: Manush Prajwal Date: Sun Sep 6 17:11:58 2026 +0530 pwm: lp3943: fix NULL pointer dereference for an unconfigured channel [ Upstream commit 17dbb6938d3ab444cd6be1c95506450595a8800d ] lp3943_pwm_probe() unconditionally registers a pwmchip with LP3943_NUM_PWMS(2) hwpwm channels, but lp3943_pwm_parse_dt() only populates pdata->pwms[i] for the channels whose ti,pwm0/ti,pwm1 property is actually present in the devicetree (the binding explicitly allows each PWM generator to drive zero or more outputs, and lp3943_pwm_parse_dt() only fails outright with -ENODATA if *neither* property is present). A devicetree that configures only one of the two channels leaves pdata->pwms[] NULL for the other. lp3943_pwm_request_map() dereferences pdata->pwms[hwpwm] with no NULL check: pwm_map->output = pdata->pwms[hwpwm]->output; pwm_map->num_outputs = pdata->pwms[hwpwm]->num_outputs; so requesting the unconfigured channel (e.g. exporting it from sysfs) crashes with a NULL pointer dereference instead of failing cleanly. Return -ENODEV from lp3943_pwm_request_map() when the channel was never configured, before the pointer is dereferenced. The caller, lp3943_pwm_request(), already propagates an ERR_PTR return correctly (it does so today for the existing -EBUSY case). Reported-by: Sashiko AI review Closes: https://sashiko.dev/#/patchset/6a9d4c6b.79b5ea6e.147aa1.5883@mx.google.com?part=1 Signed-off-by: Manush Prajwal Link: https://patch.msgid.link/6a9d5187.d63de05c.175391.a17c@mx.google.com Fixes: af66b3c0934e ("pwm: Add LP3943 PWM driver") Signed-off-by: Uwe Kleine-König Signed-off-by: Sasha Levin commit bb0a33e1271a6e0c1041b8bfb88526fd54805e80 Author: bui duc phuc Date: Fri Aug 21 19:28:38 2026 +0700 ASoC: mediatek: mt6797: fix wrong unwind order and error code in enable_clock [ Upstream commit e967d479b65c778cd2394ab185e289beefcf996d ] The error paths in mt6797_afe_enable_clock() use incorrect goto labels, causing clocks that failed to enable to be disabled during cleanup. Fix the goto labels to only unwind clocks that were successfully enabled, and return the actual error code. Fixes: c5e7fca928d3 ("ASoC: mt6797: add structure define and clock control function for 6797") Reviewed-by: Cezary Rojewski Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260821122840.41266-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit fe2a3170e88115d5b55262f374c23a3f27315918 Author: bui duc phuc Date: Thu Sep 3 12:11:47 2026 +0700 ASoC: mediatek: mt8186: Fix MCK error handling [ Upstream commit 996469c1092e8fa81fac98d819174ce56baff821 ] The mt8186_mck_enable() function returns immediately when a clock operation fails, leaving previously enabled clocks active. Add error paths to disable previously enabled clocks before returning the error. Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903051150.178057-6-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b843c2c5b25ee35bd57ac115004a40122c86cbbe Author: bui duc phuc Date: Thu Sep 3 12:11:46 2026 +0700 ASoC: mediatek: mt8186: Fix APLL enable error handling [ Upstream commit cb552c6b9abe02f254d44d8c29d0dce1ae21f69f ] Currently, the mt8186_apll*_enable() functions call mux_setting(afe, true) but do not check its return value to handle failures. In addition, the cleanup paths of mt8186_apll*_enable() do not call mux_setting(afe, false) when the enable operation fails, while the mt8186_apll*_disable() functions do. Add error handling for apll*_mux_setting() and call mux_setting(afe, false) in the cleanup paths when mt8186_apll*_enable() fails. Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903051150.178057-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 46b0c92e5532cc6bd814e251261fe7cf902e4c94 Author: bui duc phuc Date: Thu Sep 3 12:11:45 2026 +0700 ASoC: mediatek: mt8186: Fix AFE clock error handling [ Upstream commit eb72060a1966baf9a6ed753186621ee6e39dc889 ] The error paths in mt8186_afe_enable_clock() do not consistently undo the clock operations performed before an error. Fix the goto targets and cleanup order so that the audio internal bus parent is restored to CLK26M and all previously enabled clocks are disabled before returning the error. Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903051150.178057-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit db698964c389cad79a62d927db4aaee166a603dc Author: bui duc phuc Date: Thu Sep 3 12:11:44 2026 +0700 ASoC: mediatek: mt8186: Fix clock handling in mux disable path [ Upstream commit d70109f5510b423e72894dadfbab27087a7b26b0 ] In the disable path of the appl*_mux_setting() functions, clk_disable_unprepare() is called after clk_set_parent(). If clk_set_parent() fails, clk_disable_unprepare() is skipped, potentially leaving one of the clocks enabled. Remove the goto exit paths so that all teardown steps are attempted and any errors are only reported. Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903051150.178057-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e8f3631de08c7ac00214558f12a288b960173b77 Author: bui duc phuc Date: Thu Sep 3 12:11:43 2026 +0700 ASoC: mediatek: mt8186: Fix APLL mux setting error handling [ Upstream commit 5ee5987fadf6ae15678a654b4d909225c97f0299 ] The APLL mux setup functions return immediately when a clock operation fails, without undoing the clock changes already made. This can leave clocks enabled or muxes configured to an unexpected parent. Restore the affected muxes to CLK26M and disable previously enabled clocks on error before propagating the original error. Fixes: 55b423d5623c ("ASoC: mediatek: mt8186: support audio clock control in platform driver") Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260903051150.178057-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit af738cf3e56a81ff70d49aa67b3f1512544689da Author: Bert Karwatzki Date: Tue Sep 8 11:43:40 2026 +0200 mac80211: tx: Use info->flags in ieee80211_tx_h_select_key() [ Upstream commit 5f2530a4df8e0573e54cc0f4175c06ecb810a4dd ] Without this ieee80211_select_key_8023() is never called and wifi never connects. Fixes: 0e80db08668b ("wifi: mac80211: fix key selection for encap offload frames") Signed-off-by: Bert Karwatzki Link: https://patch.msgid.link/20260908094341.12196-1-spasswolf@web.de Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 96b4045f506ea4b420334054d2511ba8c436cc0b Author: Chen-Yu Tsai Date: Thu Aug 27 18:57:36 2026 +0800 pwm: mtk-disp: Fix period readback [ Upstream commit c5b29baad42b2b02389cc6a716697a8a63209930 ] The period value stored in the register is the number of clock cycles - 1. Account for the offset when calculating the period in nanoseconds. This fixes the discrepancy reported by the pwm core when CONFIG_PWM_DEBUG=1: mediatek-disp-pwm 1100e000.pwm: .apply is not idempotent (ena=1 pol=0 281500/499875) -> (ena=1 pol=0 281500/499750) Calculation discrepancy in the driver was found by AI run by a colleague while debugging another PWM related issue. Check against SoC datasheet and fix done by the author. Fixes: 3f2b16734914 ("pwm: mtk-disp: Implement atomic API .get_state()") Cc: Jitao Shi Signed-off-by: Chen-Yu Tsai Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Fei Shao Link: https://patch.msgid.link/20260827105738.8570-1-wenst@chromium.org [ukleinek: Adapt comment accordingly] Signed-off-by: Uwe Kleine-König Signed-off-by: Sasha Levin commit 707cb4908186ca50836b0201692ecf3d0eb94bde Author: Karl Mehltretter Date: Tue Sep 8 07:38:13 2026 +0200 virtio_ccw: always take irq_lock in the classic interrupt handler [ Upstream commit 48a355cf5b382570975e60857450ff3d42f268e9 ] virtio_ccw_int_handler() takes vcdev->irq_lock around its vring_interrupt() calls only when VIRTIO_HARDEN_NOTIFICATION is enabled. The virtio shutdown path calls synchronize_cbs() even when notification hardening is disabled. virtio_reset_device() now does so after the transport reset too. For classic interrupts, synchronize_cbs() takes vcdev->irq_lock for writing, but the interrupt handler does not take the matching read lock in that configuration. synchronize_cbs() can return while a callback is still running. Take the read lock unconditionally so the write side can synchronize with the callbacks. Fixes: 8bd2fa086a04 ("virtio: break and reset virtio devices on device_shutdown()") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Michael S. Tsirkin Message-ID: <20260908053817.26065-3-kmehltretter@gmail.com> Signed-off-by: Sasha Levin commit 395c923d3946db7eacb82bb98262c257b4952c08 Author: Karl Mehltretter Date: Tue Sep 8 07:38:12 2026 +0200 virtio_ccw: fix synchronize_cbs() after interrupt fallback [ Upstream commit 6e484b870b71eb6acb3fa7a10b8e71098e242033 ] virtio_ccw_synchronize_cbs() assumes the device uses adapter interrupts when vcdev->airq_info is not NULL. If registering adapter indicators fails, virtio_ccw_find_vqs() falls back to classic interrupts but can leave airq_info set. With VIRTIO_HARDEN_NOTIFICATION enabled, virtio_ccw_int_handler() invokes callbacks under vcdev->irq_lock. synchronize_cbs() instead takes the indicator area lock, so it does not synchronize with those callbacks. Use vcdev->is_thinint, which the fallback clears, to select the lock. Keep the airq_info check because is_thinint can be set before the first find_vqs() call, when airq_info is still NULL. Fixes: 3a232277c1ac ("virtio-ccw: implement synchronize_cbs()") Assisted-by: LLM Signed-off-by: Karl Mehltretter Signed-off-by: Michael S. Tsirkin Message-ID: <20260908053817.26065-2-kmehltretter@gmail.com> Signed-off-by: Sasha Levin commit 1e94612cc7544b9911568cfe236b8710dd32cabf Author: Igor Belwon Date: Fri Aug 28 15:52:47 2026 +0200 arm64: dts: mediatek: mt6893-pinfunc: Fix pinctrl header path [ Upstream commit 863d48714194bfcdb917b2ec35531e40df40cb87 ] The header resides in the dt-bindings directory and not in the dts/mediatek directory. Fix it as to avoid a build failure. Fixes: c0f1fd9eeb317 ("arm64: dts: mediatek: Add MT6893 pinmux macro header file") Signed-off-by: Igor Belwon Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Sasha Levin commit 20d7f010bb762d83eca5ec581d3e33bda371a59d Author: Igor Belwon Date: Fri Aug 28 15:52:46 2026 +0200 arm64: dts: mediatek: mt6878-pinfunc: Fix pinctrl header path [ Upstream commit 9b9c33336d2c25b6ef8758af3ce3c1802d26ca25 ] The header resides in the dt-bindings directory and not in the dts/mediatek directory. Fix it as to avoid a build failure. Fixes: 07a9bd3079e30 ("arm64: dts: mediatek: Add MT6878 pinmux macro header file") Signed-off-by: Igor Belwon Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Sasha Levin commit 68c868a58fe90b3b1e800c5cb4df700520696931 Author: Brian Norris Date: Fri Sep 4 16:31:44 2026 -0700 arm64: dts: mediatek: Add #{address,size}-cells to Chromium-based /firmware [ Upstream commit 69c1a4fd5272df1d745d6bcc3c613843ebecec61 ] Chromium/Depthcharge bootloaders may dynamically add a few device nodes to a system's DTB under a /firmware node. A typical DT looks something like the following: / { firmware { ranges; coreboot { compatible = "coreboot"; reg = <...>; ...; }; }; }; Notably, the /firmware node has an empty 'ranges', but does not have address/size-cells. Commit 6e5773d52f4a ("of/address: Fix WARN when attempting translating non-translatable addresses") started requiring #address-cells for a device's parent if we want to use the reg resource in a device node. This leads to errors like the following: [ 7.763870] coreboot_table firmware:coreboot: probe with driver coreboot_table failed with error -22 Add appropriate #{address,size}-cells to work around the problem. Note that Google has also patched the Depthcharge bootloader source to add {address,size}-cells [1], but bootloader updates are typically delivered only via Google OS updates. Not all users install Google software updates, and even if they do, Google may not produce updated binaries for all/older devices. [1] https://lore.kernel.org/all/20241209092809.GA3246424@google.com/ https://crrev.com/c/6051580 ("coreboot: Insert #address-cells and #size-cells for firmware node") Closes: https://lore.kernel.org/all/aeKlYzTiL0OB1y3g@google.com/ Fixes: 6e5773d52f4a ("of/address: Fix WARN when attempting translating non-translatable addresses") Signed-off-by: Brian Norris Reviewed-by: Chen-Yu Tsai Reviewed-by: Douglas Anderson Signed-off-by: AngeloGioacchino Del Regno Signed-off-by: Sasha Levin commit c28b2d411492fe0ce4e8a9d09ca8d39cca212990 Author: Pengpeng Hou Date: Sun Sep 6 11:42:17 2026 +0800 ASoC: fs210x: report register restore errors [ Upstream commit aa7d985d85529049fc8c39c168b300f59de4fdf8 ] fs210x_init_chip() marks the register cache dirty and replays it after reset and scene setup, but ignores a replay failure and publishes is_inited. Its resume caller already returns the helper status. Keep is_inited clear and return a cache replay failure so the ASoC component wrapper can report the incomplete restoration. The issue was found by our static-analysis tool and manually reviewed. Fixes: 756117701779 ("ASoC: codecs: Add FourSemi FS2104/5S audio amplifier driver") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260906034217.85696-5-hppiscas@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e588e2a1bab058ca34badcc57e761de503135edb Author: Pengpeng Hou Date: Sun Sep 6 11:42:16 2026 +0800 ASoC: es8389: report resume restore errors [ Upstream commit 8f7d23eb8ffb817ba69049577ab8ca55b93c77cf ] es8389_resume() ignores the reset-register read, bias restoration and register-cache replay. A failed read can leave regv uninitialized before it selects the initialization path. Check those operations and always leave cache bypass before returning an error. The ASoC component wrapper reports callback failures while retaining its best-effort resume contract. The issue was found by our static-analysis tool and manually reviewed. Fixes: 0319c26889f7 ("ASoC: codecs: add support for ES8389") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260906034217.85696-4-hppiscas@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit c729f41b2fa8f19914a3338723b334780a0ff498 Author: Pengpeng Hou Date: Sun Sep 6 11:42:15 2026 +0800 ASoC: es8375: report resume restore errors [ Upstream commit 8f43acfd3addf10fbde8d21dd44b1a61e1936ba7 ] es8375_resume() ignores the clock-status read, bias restoration and register-cache replay. A read failure can leave reg uninitialized before it selects the initialization path, and later resume processing cannot observe a failed restore. Return the fallible operation results to the ASoC component wrapper, which reports callback failures while retaining its best-effort resume contract. The issue was found by our static-analysis tool and manually reviewed. Fixes: de2b3119f9f7 ("ASoC: codecs: add support for ES8375") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260906034217.85696-3-hppiscas@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 1969ee5fe2626bdcc317c7e3945aa56b6558460a Author: Pengpeng Hou Date: Sun Sep 6 11:42:14 2026 +0800 ASoC: es8326: report resume restore errors [ Upstream commit 349e94679968785803cc32c1d2e41e000e8afd5f ] es8326_resume() ignores the status-register read, the direct clock-state write and the register-cache replay. A read failure can also leave reg uninitialized before it selects the reset path, and a cache failure is followed by jack IRQ processing. Return these errors before later resume work. The ASoC component wrapper reports the callback failure while retaining its best-effort resume contract. The issue was found by our static-analysis tool and manually reviewed. Fixes: 5c439937775d ("ASoC: codecs: add support for ES8326") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260906034217.85696-2-hppiscas@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit aba40e988b10a0dc847894e62d6b9ab6929bdff3 Author: Karl Mehltretter Date: Tue Aug 11 11:55:32 2026 +0200 irqchip/gic-v3-its: Don't WARN on LPI free allocation failure [ Upstream commit 135d9e67f7ab4f261c2157ee2de1f93a4de39a41 ] free_lpi_range() cannot give LPIs back to the allocator without allocating a struct lpi_range to describe the freed range, so it returns -ENOMEM (its only failure mode) when that allocation fails, and its_lpi_free() turns this into a WARN_ON(). syzbot triggers the WARN_ON() by injecting a slab allocation failure on device teardown, which with panic_on_warn becomes a panic: WARNING: drivers/irqchip/irq-gic-v3-its.c:2251 at its_msi_teardown+0x3a4/0x424 its_msi_teardown+0x3a4/0x424 msi_remove_device_irq_domain+0x16c/0x27c msi_device_data_release+0x38/0x9c The failure is transient and the consequence benign: the freed range is simply never returned to the allocator. This does not warrant a WARN_ON() backtrace, so log a rate-limited error instead. Fixes: 880cb3cddd16 ("irqchip/gic-v3-its: Refactor LPI allocator") Reported-by: syzbot+229d761b8a110e6de517@syzkaller.appspotmail.com Signed-off-by: Karl Mehltretter Signed-off-by: Thomas Gleixner Assisted-by: Claude:claude-fable-5 Link: https://patch.msgid.link/20260811095532.48454-1-kmehltretter@gmail.com Closes: https://syzkaller.appspot.com/bug?extid=229d761b8a110e6de517 Signed-off-by: Sasha Levin commit 3fde0b4401e35cb0ba8ad423e987485b9a2f49af Author: Linkai Gong Date: Mon Sep 7 10:47:32 2026 +0800 drivers/base/node: fix UAF on device_register() failure [ Upstream commit 6d7e9bc51d8f2d73b3403c759c769f880082f9ae ] node_init_node_access() frees the access node with kfree() if device_register() fails. After device_register() the embedded device is initialized and must be released with put_device() so that node_access_release() can free it. Fixes: 08d9dbe72b1f ("node: Link memory nodes to their compute nodes") Signed-off-by: Linkai Gong Link: https://patch.msgid.link/20260907024732.1452228-1-gonglinkai@kylinos.cn Signed-off-by: Danilo Krummrich Signed-off-by: Sasha Levin commit 252b9a19395e1e79154098f8baf06e708b307b63 Author: Miquel Raynal Date: Fri Sep 4 18:15:11 2026 +0200 spi: ma35d1-qspi: Allow DTR operations with the regular SPI API [ Upstream commit 2448f25cc839739fe576d31d85c7d0df4844bb3a ] The feature was implemented but not actually enabled for regular SPI operations (as opposed to spi-mem operations). Make sure the missing capability is actually set. Reported-by: Mark Brown Closes: https://lore.kernel.org/all/09c3928f-4b58-4ac6-8e1a-84dfe3ff6b92@sirena.org.uk/ Fixes: 15e9362f6190 ("spi: ma35d1-qspi: Add DTR support") Signed-off-by: Miquel Raynal Link: https://patch.msgid.link/20260904-perso-ma35d1-master-v1-2-b6936e8c6fa1@bootlin.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 86c8109f58812e583308aedc748f2686d5cad554 Author: Varun Gupta Date: Mon Sep 7 10:30:12 2026 +0530 drm/xe: Guard page-fault worker with runtime PM check [ Upstream commit fcc2431d2213dc4d04250c4f1ae87d9c3ae0d455 ] During VM teardown, the VM's runtime PM reference is dropped asynchronously, allowing the device to autosuspend while stale page faults belonging to the now-dead VM are still queued. When the page-fault worker later tries to ack one of these, it calls into guc_ct_send_locked() on an already-suspended device, tripping:   Assertion `!xe_pm_runtime_suspended(xe)` failed!   WARNING at xe_device.c:1267 xe_device_assert_mem_access+0x11c/0x140 [xe] A live VM/exec queue always holds a PM reference while it has outstanding work, so if the device is suspended at ack time, the owning context is already gone and the fault is stale. Take a runtime PM reference across the entire pagefault queue worker to safely deliver acks for torn-down VMs. v3: - Move PM ref to the generic xe_pagefault_queue_work using guard(xe_pm_runtime)(xe) instead of tracking it in the GuC backend(Matt Brost). v2: - Hold PM ref across the entire batch (begin/end) instead of per-ack. This prevents the device from autosuspending mid-batch, which would leave write_only acks written but the end flush skipped, and skip counter++, desyncing the cadence check.(Himal) - Add a comment explaining stale faults.(Himal) Fixes: f289f7807119 ("drm/xe: Add xe_guc_pagefault layer") Signed-off-by: Varun Gupta Reviewed-by: Matthew Brost Reviewed-by: Tejas Upadhyay Link: https://patch.msgid.link/20260907050011.497181-2-varun.gupta@intel.com Signed-off-by: Tejas Upadhyay Signed-off-by: Sasha Levin commit 8c38b8c94520879c83fd03d92742f6c1d8d4744a Author: Surendra Singh Chouhan Date: Fri Jul 24 10:18:54 2026 +0530 pwm: ipq: Prevent potential 32-bit integer overflow in hi_div calculation [ Upstream commit a662d944da1e9236a99355aa3e8a93735d8b3521 ] In ipq_pwm_get_state(), hi_div was calculated as: hi_div = hi_dur * (pre_div + 1); hi_dur and (pre_div + 1) are both unsigned int (32-bit) values. Evaluating their multiplication using 32-bit arithmetic before assigning to the 64-bit u64 hi_div variable can overflow 32-bit unsigned math. While effective_div explicitly uses (u64)(pwm_div + 1) * (pre_div + 1) to prevent overflow, hi_div was missing the (u64) cast. Fix this by casting hi_dur to (u64) before multiplication, matching the precision used for effective_div. Fixes: c436e3e9c265 ("pwm: Driver for qualcomm ipq6018 pwm block") Signed-off-by: Surendra Singh Chouhan Link: https://patch.msgid.link/20260724044854.33274-1-kr494167@gmail.com Signed-off-by: Uwe Kleine-König Signed-off-by: Sasha Levin commit 3886e094628696a5f94f7bf5ce42a3bf4027df47 Author: Keguang Zhang Date: Wed Jul 15 19:05:24 2026 +0800 pwm: loongson: Reload PWM configuration through counter reset [ Upstream commit 0de9b836a3bc1cd30578ae2c4463d09afd85ed3d ] The Loongson PWM controller latches the LOW and PERIOD registers only at the start of each PWM period. After disabling and re-enabling the PWM, the controller resumes from the previous counter value and completes the current period before re-latching the updated LOW and PERIOD values. Reset the PWM counter when disabling the PWM and release it when enabling the PWM so that the updated LOW and PERIOD values are latched before the PWM starts running again. Fixes: 2b62c89448dd ("pwm: Add Loongson PWM controller support") Signed-off-by: Keguang Zhang Link: https://patch.msgid.link/20260715-pwm-loongson-fix-v3-2-0aab2847eaa7@gmail.com [ukleinek: Note LOW refers to the register currently named LOONGSON_PWM_REG_DUTY. That name is wrong, the fix is still under discussion.] Signed-off-by: Uwe Kleine-König Signed-off-by: Sasha Levin commit bf3c335d4a96748b47ca71fe75f971b22c23b9b6 Author: Junhui Liu Date: Wed Jul 29 00:40:15 2026 +0800 riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC [ Upstream commit 01e2f07c44fc46180bdb10e70506f8acf44a53dd ] The mimsic node describes the machine-level IMSIC, whose MMIO region is 0x10000 (64 KiB) for all 8 harts. However, the node also specifies riscv,guest-index-bits = <6>, and per the AIA specification the per-hart stride is 2^(guest-index-bits + 12) bytes when guest interrupt files exist, i.e. 2^(6 + 12) = 256 KiB per hart and 2 MiB for all 8 harts. The described region cannot hold even a single hart's files, so the node contradicts itself. OpenSBI enforces exactly this constraint in imsic_data_check() and rejects the node with -EINVAL, preventing the M-level IMSIC from initializing: fdt_driver_init_by_offset: interrupt-controller@f1000000 (riscv,imsics) init failed: -3 init_coldboot: irqchip init failed (error -3) Moreover, guest interrupt files exist to act as the supervisor-level interrupt files of virtual harts; there is no machine-level counterpart. riscv,num-guest-ids is equally meaningless for the machine-level IMSIC. Drop both "riscv,guest-index-bits" and "riscv,num-guest-ids" properties from the mimsic node so the node matches the actual hardware layout. Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC") Signed-off-by: Junhui Liu Reviewed-by: Yixun Lan Link: https://patch.msgid.link/20260729-k3-mimsic-fix-v1-1-368c0aec04b9@pigmoral.tech Signed-off-by: Yixun Lan Signed-off-by: Sasha Levin commit 91fdf28c43190ea7136c8698757e77568a0c46cd Author: Karl Mehltretter Date: Sat Sep 5 11:20:57 2026 +0200 ABI: sysfs-class-infiniband: Drop the entries of the removed qib driver [ Upstream commit 63367df6e7255067ad6a83abe0d2799dfa491876 ] Commit 24baad32b710 ("RDMA/qib: Remove outdated driver") removed the qib driver but left its /sys/class/infiniband/qibX/* entries in the stable ABI file. Nothing creates those files any more. Remove the block. Fixes: 24baad32b710 ("RDMA/qib: Remove outdated driver") Assisted-by: LLM Signed-off-by: Karl Mehltretter Link: https://patch.msgid.link/20260905092057.41306-1-kmehltretter@gmail.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 439f6aca02b8d52adb1db1dd138bd773a57c4f44 Author: Dmitry Torokhov Date: Sat Sep 5 02:12:39 2026 -0700 gpio: crystalcove: add missing MODULE_ALIAS() [ Upstream commit 32c7f7f80e5f7f2764682fd456054478fc11c8d9 ] The crystalcove GPIO driver lacks a MODULE_ALIAS() to allow it to be auto-loaded. Fix this by adding the missing platform alias. Fixes: 104fb1d5153c ("gpio: Add support for Intel Crystal Cove PMIC") Assisted-by: LLM Signed-off-by: Dmitry Torokhov Reviewed-by: Linus Walleij Signed-off-by: Andy Shevchenko Signed-off-by: Sasha Levin commit 29ca373e95bdbeb32c7f8fbabc7c38a7939b7974 Author: Leon Romanovsky Date: Sun Sep 6 03:52:38 2026 -0400 RDMA/irdma: Preserve fast-registration IOVA on 32-bit [ Upstream commit c470050f2a7a7748ce35367e828885a8e658d712 ] ib_mr::iova is u64, but the fast-registration path passes it through void * and uintptr_t. These conversions truncate the upper 32 bits on 32-bit kernels before the WQE is built. Store the IOVA as u64 and write it directly to the WQE. The sole caller always uses VA-based addressing, so remove the unused FBO selection and set the VA-based bit unconditionally. Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs") Link: https://patch.msgid.link/20260903-64-bit-iova-is-silently-truncated-to-v1-1-96e878ea6873@nvidia.com Reviewed-by: Jacob Moroni Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 6e982ab4daefc97d057293645b7478110c427f46 Author: Li RongQing Date: Thu Sep 3 16:25:50 2026 +0800 RDMA/nldev: Put the device when dellink fails [ Upstream commit 0ff7fcd6aac16dd149ad322687a10c8ea7d806b2 ] nldev_dellink() takes a device reference through ib_device_get_by_index() and normally hands it over to ib_unregister_device_and_put(). The error path of the ->dellink callback returns without releasing it, so the reference is leaked. Once that happens, any later unregistration of the device blocks forever, because disable_device() drops its own reference and then waits for the refcount to drain. No in-tree driver returns an error from ->dellink today, so the leak is currently latent. Put the device before returning the error. Fixes: a60e3f3d6fba ("RDMA/nldev: Add dellink function pointer") Signed-off-by: Li RongQing Link: https://patch.msgid.link/20260903082550.2257-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 7f769ef310b30357319353673c0264db3605d945 Author: Mark Amirkan Date: Thu Sep 3 04:04:21 2026 -0700 perf evsel: Validate RAW sample before byte swapping [ Upstream commit 02f6847e1822714a4201b87e42f92b0d43e8549d ] For an opposite-endian RAW sample, __evsel__parse_sample() passes the input-controlled size to mem_bswap_64() before checking whether the payload fits in the event. A truncated record can therefore make the helper read and write past the event boundary. A crafted perf.data file makes perf report crash with SIGSEGV. ASan reports the out-of-bounds access. A regression test puts backed data past the declared end and shows that it is changed before the parser returns -EFAULT. Move the bounds checks before mem_bswap_64(). Check the rounded length too, because the helper accesses complete 64-bit words. Complete records are handled as before. Fixes: f9d8adb345d7adbb ("perf evsel: Fix swap for samples with raw data") Reviewed-by: Ian Rogers Assisted-by: Symbolic Signed-off-by: Mark Amirkan Cc: Jiri Olsa Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 60ace20970a89b01f4b90366a93e5ae7f809ebda Author: Mark Amirkan Date: Thu Sep 3 04:04:20 2026 -0700 perf evsel: Validate branch stack before byte swapping [ Upstream commit 2148e094671b0f6a44f033787b7da4ed14e96c27 ] When perf reads an opposite-endian branch stack, __evsel__parse_sample() swaps each entry before checking whether all entries fit in the event. A truncated sample can therefore make the swap loop read and write past the event boundary. A truncated perf.data file makes perf report crash with SIGSEGV. ASan reports an out-of-bounds read. A regression test puts an entry just past the declared end and shows that its flags are changed before the parser returns -EFAULT. Move the bounds check before the byte-swap loop. Valid samples are handled as before. Fixes: 63c12ae2f246dcdc ("perf evsel: Add bitfield_swap() to handle branch_stack endian issue") Reviewed-by: Ian Rogers Assisted-by: Symbolic Signed-off-by: Mark Amirkan Cc: Madhavan Srinivasan Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 17d4763d888e9c8fa263b0ac9976e8f56306c89d Author: Aaron Tomlin Date: Mon Aug 24 09:31:18 2026 -0400 perf trace: Fix error checking in btf_struct_scnprintf() [ Upstream commit 02241f791aa28802cc05223a740e163e14cd5ea2 ] btf_dump__dump_type_data() returns the positive number of bytes dumped on success, or a negative error code (e.g., -EINVAL) on failure. Currently, btf_struct_scnprintf() checks if btf_dump__dump_type_data() returns 0. When a negative error code is returned on failure, this check evaluates to false, causing the function to proceed down the success path and advance arg->augmented.args past the unprinted struct data before returning 0. Consequently, when syscall__scnprintf_args() falls back to the default argument beautifier upon receiving 0 from trace__btf_scnprintf(), the fallback beautifier or subsequent arguments read from an erroneously advanced augmented arguments buffer. Fix this by checking for '<= 0' ensuring that on any failure or 0-byte dump, 0 is returned without modifying the augmented arguments pointer. Fixes: cb32035214b9a09d ("perf trace: Pretty print struct data") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Signed-off-by: Aaron Tomlin Tested-by: Ian Rogers Cc: Howard Chu [ Restored that call to be a single line ] Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 070e864a0bd349664307b88f6b4416689070e4ea Author: Marcel Hofmann Date: Thu Aug 27 14:31:36 2026 +0200 remoteproc: imx_rproc: Allow mappings ending at region boundary [ Upstream commit 749eed0c7178c8d53ce4c9acdda4a545721c494b ] The address range checks in imx_rproc_da_to_sys() and imx_rproc_da_to_va() use a strict comparison for the exclusive end address of the requested range. As a result, a valid request that ends exactly at the end of an address translation or mapped memory region is rejected. For a region [start, start + size), a request [addr, addr + len) is contained when: addr >= start && addr + len <= start + size This occurs when a loadable ELF segment fills an entire mapped memory region. This can be produced by a linker script that extends the resource table section to the end of its designated region: .resource_table : { . = ALIGN(8); KEEP(*(.resource_table)) /* Resource table */ . = ALIGN(8); . = ORIGIN(m_rsc_tbl) + LENGTH(m_rsc_tbl); } > m_rsc_tbl =0x00 This produces a ELF program header like: LOAD 0x010000 0xa4220000 0xa4220000 0x01000 0x01000 R 0x1000 In this case, the segment size matches the mapped region size exactly, causing the address translation to fail with: bad phdr da 0xa4220000 mem 0x1000 Rework the upper-bound checks to allow ranges ending exactly at the region boundary while guarding against integer overflow. Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver") Signed-off-by: Marcel Hofmann Tested-by: Peng Fan #i.MX95-19x19-EVK Link: https://lore.kernel.org/r/20260827123136.438798-1-marcel@hofmania.de Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin commit a139358237253ca90f8f89b3e6b441820bb4cb2b Author: Felix Gu Date: Fri Sep 4 23:51:29 2026 +0800 spi: mtk-nor: fix runtime PM usage count leak in probe error path [ Upstream commit 4cee1ed13e2687f1a9fec7dd50e31eb179506d75 ] mtk_nor_probe() takes a runtime PM reference with pm_runtime_get_noresume() before registering the controller, but the error path never drops it. Balance the get with pm_runtime_put_noidle() in the error path. Fixes: 3bfd9103c7af ("spi: spi-mtk-nor: Add power management support") Signed-off-by: Felix Gu Link: https://patch.msgid.link/20260904-mtk-nor-v1-1-cefdca098f83@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 293037dcbe3926184729ab59126d7a7c1fcb768b Author: Dave Jiang Date: Fri Sep 4 10:23:36 2026 -0700 ACPI: APEI: GHES: Bound AER info copy and sanitize software metadata [ Upstream commit 9c3ad3bfff20d2d7a0c9614db2a58e78123bf0ce ] ghes_handle_aer() copies sizeof(struct aer_capability_regs) out of the fixed 96-byte pcie_err->aer_info. The struct is larger, so the copy reads past the section, and it fills the software-only header_len and flit fields of the embedded struct pcie_tlp_log from firmware bytes. pcie_print_tlp_log() uses both to bound a loop over dw[], so a large value walks past the array. Nothing checks the section can hold a struct cper_sec_pcie either. Validate error_data_length, zero the destination, and map aer_info onto the struct as extlog_print_pcie() does: copy up to the four Header Log DWORDs, then place the TLP Prefix Log from its own offset. The rest stays zero, covering header_len and flit. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=3 Fixes: 7e077e6707b3 ("PCI/ERR: Handle TLP Log in Flit mode") Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-13-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 874ccda81e6d117368dd5d1c2d5f784b2081482d Author: Dave Jiang Date: Fri Sep 4 10:23:35 2026 -0700 ACPI: APEI: GHES: Validate memory error section length before payload access [ Upstream commit 10338c9085b4939a428a8dc78d2bbf62c161278b ] ghes_do_proc() hands the CPER_SEC_PLATFORM_MEM payload to the report chain, arch_apei_report_mem_error() and ghes_handle_memory_failure() without checking gdata->error_data_length. All three read validation_bits and physical_addr, at offsets 0 and 16, so a shorter section reads past the record. Check the length once in ghes_do_proc(), before any consumer runs. Take the 73-byte struct cper_sec_mem_err_old as the floor: older firmware legitimately emits that UEFI 2.1/2.2 layout, and it makes validation_bits safe to read. The fields from "extended" on are absent from that layout, so also require whatever length the validation bits claim. Derive it per field rather than demanding the full 80 bytes: rank needs only 76, and the BANK_GROUP and BANK_ADDRESS bits describe "bank" at offset 38, which every record carries. Testing the whole mask against one size, as cper_print_mem() does, gets it wrong both ways. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=7 Fixes: ca104edc1784 ("ACPI, APEI, GHES: Cleanup ghes memory error handling") Reviewed-by: Hanjun Guo Reviewed-by: Shuai Xue Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-12-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit b824024d2c8a2dcb3fca591c671153ad1e931691 Author: Dave Jiang Date: Fri Sep 4 10:23:34 2026 -0700 efi/cper: Read only validated fields in cper_mem_err_pack() [ Upstream commit 92480a2b00a15b0add512b6fc474151ec5340a8e ] cper_mem_err_pack() copies extended, rank, mem_array_handle and mem_dev_handle unconditionally. Those live at offsets 73 to 79, past the end of struct cper_sec_mem_err_old, the 73-byte UEFI 2.1/2.2 layout that older firmware still emits and that cper_estatus_print_section() admits. On such a record the copy reads up to seven bytes past the payload, and off the end of the error status block when that section is the last one. Copy each of the four only when its validation bit is set, and zero it otherwise. Nothing is lost: a 2.1/2.2 record leaves those bits clear, and every consumer of struct cper_mem_err_compact already gates the fields on the same bits. Zeroing also stops callers reading them back out of the uninitialised on-stack struct they pass in. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=7 Fixes: 2dfb7d51a61d ("trace, RAS: Add eMCA trace event interface") Reviewed-by: Hanjun Guo Reviewed-by: Shuai Xue Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-11-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit e5875694b1cd493b77da0c5cfe804a92281a6195 Author: Dave Jiang Date: Fri Sep 4 10:23:33 2026 -0700 ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy [ Upstream commit 8bf58815315aeb60125d26404d6fa7d576d5d518 ] cxl_cper_setup_prot_err_work_data() locates the RAS Capability block at prot_err + sizeof(*prot_err) + dvsec_len and copies it, but dvsec_len is firmware controlled and never validated, so it can point the copy outside the section. Extend cxl_cper_sec_prot_err_valid() to check that the section can hold the header, and that the header, DVSEC and RAS Capability block together fit the reported section length. Reported-by: sashiko-bot@kernel.org Link: https://sashiko.dev/#/patchset/20260617-topics-ahmtib01-ras_ffh_arm_internal_review-v6-0-91f725174aa0@arm.com?part=6 Link: https://lore.kernel.org/linux-cxl/20260709165457.8BA181F000E9@smtp.kernel.org/ Fixes: 315c2f0b53ba ("acpi/ghes, cper: Recognize and cache CXL Protocol errors") Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Ben Cheatham Reviewed-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-10-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 09887055566017e35d2dbc4af4db83f6ec2e5969 Author: Dave Jiang Date: Fri Sep 4 10:23:28 2026 -0700 ACPI: extlog: Defer CXL protocol error handling to avoid lock inversion [ Upstream commit 179ef6d7f971d72a0f54b7c499daed1b244ee1a5 ] extlog_print() calls cxl_cper_handle_prot_err() synchronously while the MCE notifier chain rwsem is held, and that path takes the PCI device_lock via guard(device)(). The probe path takes the two in the opposite order, holding device_lock while mce_register_decode_chain() takes the rwsem, so they can deadlock AB-BA. ghes.c already avoids this by posting protocol errors to a kfifo and handling them from a workqueue via cxl_cper_post_prot_err(). Export that function and call it instead. Declare it with the other CONFIG_ACPI_APEI_GHES exports rather than at the end of the header. No #else stub: ACPI_EXTLOG selects ACPI_APEI_GHES, so the only caller cannot exist without it. Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/linux-cxl/20260709165457.8BA181F000E9@smtp.kernel.org/ Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-5-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Stable-dep-of: 8bf58815315a ("ACPI: APEI: GHES: Validate CXL protocol error section length before RAS cap copy") Signed-off-by: Sasha Levin commit 10e4b0b26cc2951b16eba75bf87e415118538450 Author: Dave Jiang Date: Fri Sep 4 10:23:32 2026 -0700 ACPI: APEI: GHES: Bound CXL event record copy to the firmware section length [ Upstream commit b7a4915a2b43d47f0bbb0b2a4c30e722fa0d3191 ] cxl_cper_post_event() copies a fixed sizeof(struct cxl_cper_event_rec) out of the firmware CPER section without checking how long the section actually is, so a short one reads past the record. Pass gdata->error_data_length in and reject a section too small to hold the record before the copy. Reported-by: sashiko-bot@kernel.org Link: https://sashiko.dev/#/patchset/20260617-topics-ahmtib01-ras_ffh_arm_internal_review-v6-0-91f725174aa0@arm.com?part=6 Fixes: 5e4a264bf8b5 ("acpi/ghes: Process CXL Component Events") Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-9-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit b730ddf178c43f3962162a2f007b651f4977dd1f Author: Dave Jiang Date: Fri Sep 4 10:23:31 2026 -0700 ACPI: extlog: Fix CONFIG_ACPI_APEI_PCIEAER guard typo [ Upstream commit 44a8d464d79b60883f7bd386049a1ffff32ca690 ] The guard reads "#ifdef ACPI_APEI_PCIEAER" rather than "#ifdef CONFIG_ACPI_APEI_PCIEAER". That symbol is never defined, so the extlog PCIe AER handling is always compiled out. Use the CONFIG_ prefixed symbol. Fixes: e778ffefa34d ("ACPI: extlog: Trace CPER PCI Express Error Section") Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Ben Cheatham Reviewed-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-8-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 37133859331b67bea6cf23c8b6bf55968d8c9f85 Author: Dave Jiang Date: Fri Sep 4 10:23:30 2026 -0700 ACPI: extlog: Validate PCIe error section length before payload access [ Upstream commit 5eefd849e26506170552e614496d094230650e78 ] extlog_print_pcie() reads pcie_err->validation_bits and device_id and copies the 96-byte aer_info buffer without checking that gdata->error_data_length is big enough for a struct cper_sec_pcie. The cper_estatus_check() call added earlier keeps the read inside the estatus block, but a short section still gets stale adjacent bytes treated as PCIe error data. Reject a section too small to hold the record before touching any field, and warn: a truncated section means firmware is emitting malformed records. Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/linux-cxl/20260709165457.8BA181F000E9@smtp.kernel.org/ Fixes: e778ffefa34d ("ACPI: extlog: Trace CPER PCI Express Error Section") Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Jonathan Cameron Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-7-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 44aee78542454dbe03e1c4c5a71b8e997a684292 Author: Dave Jiang Date: Fri Sep 4 10:23:29 2026 -0700 ACPI: extlog: Avoid populating software AER metadata from raw hardware buffer [ Upstream commit 31333d134afb13e3942867d48efbcf8d6b88c849 ] extlog_print_pcie() casts pcie_err->aer_info straight to struct aer_capability_regs *. That struct embeds struct pcie_tlp_log, whose software-only header_len and flit fields sit at offset 84 - inside the 96-byte aer_info buffer - so the cast fills them with raw firmware bytes. pcie_print_tlp_log() uses both to bound a loop over dw[], and a large header_len walks past the end of the array. Copy into a zeroed local struct, and only as far as aer_info maps onto it: the leading registers and the four Header Log DWORDs. Place the TLP Prefix Log separately, from the offset the hardware keeps it at. The rest stays zero, which covers header_len and flit and keeps the Root Error registers out of the prefix log, where pcie_print_tlp_log() would print them as end-to-end prefixes. Reported-by: sashiko-bot@kernel.org Closes: https://lore.kernel.org/linux-cxl/20260709165457.8BA181F000E9@smtp.kernel.org/ Fixes: e778ffefa34d ("ACPI: extlog: Trace CPER PCI Express Error Section") Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-6-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 1dc57e62aeb8e770810fd00f3a29a6a9791c3fa5 Author: Dave Jiang Date: Fri Sep 4 10:23:27 2026 -0700 ACPI: extlog: Validate elog record length before walking sections [ Upstream commit e1fd582a8134150aa10c1f0286dbce00cf63b086 ] extlog_print() copies a fixed ELOG_ENTRY_LEN (4096) bytes from the elog record into elog_buf, then walks the sections using the firmware-controlled data_length. Nothing keeps data_length inside the buffer, so a malformed record walks the section pointer past elog_buf and reads adjacent memory. Unlike the GHES paths, extlog never calls cper_estatus_check(). Reject a record longer than ELOG_ENTRY_LEN and run cper_estatus_check() before walking the sections. The length test alone is not enough: a wrapped length reads back short and passes it, which cper_estatus_check() catches via the header check added earlier. Drop a malformed record with NOTIFY_DONE and without MCE_HANDLED_EXTLOG, since extlog did not consume it. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=6 Fixes: f6ec01da40e4 ("ACPI: extlog: Handle multiple records") Reviewed-by: Alison Schofield Reviewed-by: Shuai Xue Reviewed-by: Hanjun Guo Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-4-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 029b9fd14ef034a1d36e0208b272f0886ded8526 Author: Dave Jiang Date: Fri Sep 4 10:23:26 2026 -0700 efi/cper: Reject an error status block length that wraps a u32 [ Upstream commit 41e25ef5e417c62eb7bf39b187242b283b3ef9f1 ] cper_estatus_len() sums the firmware-controlled data_length (or raw_data_offset plus raw_data_length) into a u32. A data_length of 0xffffffec wraps that sum to 0, and a length that reads back short defeats every bound built on it: bert_print_all() passes its "remain < estatus_len" check, then advances "estatus += estatus_len" by zero and loops forever. GHES survives only because __ghes_check_estatus() rejects a length below sizeof(*estatus) first. Reject a length that cannot be expressed in a u32 in cper_estatus_check_header(), which both of today's callers reach: GHES via __ghes_check_estatus() and BERT via cper_estatus_check(). extlog reaches neither yet; a later patch routes it through cper_estatus_check(), whose ELOG_ENTRY_LEN bound needs this to hold. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=1 Fixes: 06d65deade9a ("ACPI, APEI, UEFI Common Platform Error Record (CPER) header") Reviewed-by: Jonathan Cameron Reviewed-by: Hanjun Guo Reviewed-by: Shuai Xue Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-3-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 92ce77092a2c310295be90a8e53cc654d73ad872 Author: Dave Jiang Date: Fri Sep 4 10:23:25 2026 -0700 efi/cper: Reject CPER records with an out-of-range error_data_length [ Upstream commit a5a612cd3eecbadf135df1e9b2b40bc9f4c28f1c ] cper_estatus_check() sizes each section with acpi_hest_get_record_size(), which adds the firmware-controlled u32 error_data_length to the header size as a signed int (see ). A value in the top sizeof(*gdata) bytes of the u32 range wraps the sum small rather than large, so it slips past the "record_size > data_len" check: against the 72-byte v300 header, 0xffffffb9 sizes the record at 1 and acpi_hest_get_next() walks it a byte at a time, off the end. 0xffffffb8 sizes it at 0 and loops forever. Use check_add_overflow() to reject a sum that will not fit the int those helpers return, since the walk advances by that value. That subsumes the "acpi_hest_get_size(gdata) > data_len" test above it, because record_size is never smaller than the header. The later "len < sizeof(*foo)" guards rely on this per-section upper bound; they are lower bounds only. Reported-by: sashiko-bot@kernel.org Closes: https://sashiko.dev/#/patchset/20260714231835.303081-1-dave.jiang@intel.com?part=1 Fixes: 45b14a4ffcc1 ("efi: cper: Fix possible out-of-bounds access") Reviewed-by: Hanjun Guo Reviewed-by: Shuai Xue Signed-off-by: Dave Jiang Link: https://patch.msgid.link/20260904172337.1409775-2-dave.jiang@intel.com Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 787fa82f976342c83b0fd8568721f47d9e0b3043 Author: Li Youhong Date: Tue Sep 1 10:51:29 2026 +0800 spi: ma35d1-qspi: assert reset on probe error paths [ Upstream commit 8992169e7ac6b216f881cb373bb2c6bff0c6162a ] nuvoton_qspi_probe() pulses the exclusive reset and leaves it deasserted for normal operation. Later probe failures returned without re-asserting the reset, leaving the controller out of reset after a failed probe. Assert the reset on those error paths. Fixes: 78b16af159ae ("spi: ma35d1-qspi: Add Nuvoton MA35D1 QSPI controller support") Signed-off-by: Li Youhong Link: https://patch.msgid.link/20260901025129.359960-1-dayou5941@163.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 9b27c91d5df3c16cfdaec4dcb8098dd0402d67ca Author: Jisheng Zhang Date: Tue Sep 1 12:31:21 2026 +0800 regulator: mp886x: fix vsel_mask [ Upstream commit 24fa0eadc2e3c7e9397924197dca7777ec08b8d7 ] The MP886X vsel is 7bits, fix the vsel_mask. Fixes: 97be82880b61 ("regulator: add support for MP8869 regulator") Signed-off-by: Jisheng Zhang Link: https://patch.msgid.link/20260901043123.5401-2-jszhang@kernel.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3cbd191a96a7e6be73122da8f907c82a5325e680 Author: James Hilliard Date: Tue Aug 11 00:02:01 2026 -0600 mtd: rawnand: sunxi: use a stack buffer for BBM randomization [ Upstream commit a8596bb7148136b9e83980900d508d0ef86507ef ] Variable protected user-data lengths replaced the original four-byte stack buffer with a heap allocation before compensating the bad block marker. The allocation is unchecked, and a zero length returns ZERO_SIZE_PTR which sunxi_nfc_randomize_bbm() dereferences. The controller supports at most 32 protected user-data bytes per ECC step, so use a zero-initialized buffer of that bounded size. This removes the allocation failure path and keeps zero-sized invalid layouts from dereferencing ZERO_SIZE_PTR. Fixes: 54dcd6aa69db ("mtd: rawnand: sunxi: introduce maximize variable user data length") Signed-off-by: James Hilliard Signed-off-by: Miquel Raynal Signed-off-by: Sasha Levin commit d2ccb0cb7a85c4c748e31acd8b466bc50b567bf3 Author: James Hilliard Date: Tue Aug 11 00:02:00 2026 -0600 mtd: rawnand: sunxi: reserve a full user-data word for BBM [ Upstream commit bde8fd880d84627072c224729c818306c4b30d58 ] H6/H616 protected user-data lengths are encoded in four-byte units, but ECC maximization reserves only the two bad block marker bytes. A strength leaving fewer than four bytes therefore selects a zero-byte first user-data section. The OOB layout then subtracts the two marker bytes from that unsigned zero length, and the controller has no protected user-data word in which to store the marker. Reserve one complete user-data word while maximizing ECC, reject configurations which produce no ECC sectors or a shorter first section, and make the OOB iterator bounds-safe. Fixes: 54dcd6aa69db ("mtd: rawnand: sunxi: introduce maximize variable user data length") Signed-off-by: James Hilliard Signed-off-by: Miquel Raynal Signed-off-by: Sasha Levin commit 2decfc16d01654abd066cf356aecdde7aa281093 Author: James Hilliard Date: Tue Aug 11 00:01:59 2026 -0600 mtd: rawnand: sunxi: propagate user-data allocation errors [ Upstream commit 8696502b0aa96bcbb1f1e78ae117726378823ae8 ] sunxi_nfc_maximize_user_data() returns -ENOMEM when its per-step length array cannot be allocated, but the caller ignores that error. The NULL array then makes sunxi_nfc_user_data_sz() report the fixed four-byte fallback, which is not the layout that the variable-length setup calculated. Return the setup error so an allocation failure cannot silently select and validate a different OOB layout. Fixes: 54dcd6aa69db ("mtd: rawnand: sunxi: introduce maximize variable user data length") Signed-off-by: James Hilliard Signed-off-by: Miquel Raynal Signed-off-by: Sasha Levin commit 6603aa9a975675ab61d0313ee4ca8f286d5be59e Author: Sunny Luo Date: Fri Jul 31 09:08:27 2026 +0000 spi: amlogic: spisg: Fix the incorrect keep_ss of the last descriptor [ Upstream commit 253dfb1839c6bc357aebe8aac4f1b4dcc20ee322 ] The driver currently unconditionally clears CFG_KEEP_SS on the last descriptor, causing the last transfer's cs_change setting to be ignored. Record the cs_change value of the last SPI transfer and use it to program CFG_KEEP_SS on the final descriptor. When a null descriptor is inserted to implement the cs-hold delay, keep CFG_KEEP_SS set on the preceding transfer descriptor and apply the recorded value to the final descriptor instead. This ensures the controller handles chip select correctly for the last transfer regardless of whether a cs-hold delay is required. Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver") Signed-off-by: Sunny Luo Signed-off-by: Xianwei Zhao Link: https://patch.msgid.link/20260731-a9-spisg-v3-3-a15da3f70029@amlogic.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit fac2c0c331901317fcd3bed30ef2c91bfd2c7ffc Author: Xianwei Zhao Date: Fri Jul 31 09:08:26 2026 +0000 spi: amlogic: spisg: Fix transfer size limit and timeout handling [ Upstream commit 754d2bbd92f5ecef0eb4f5b1ac7b1417320a56ca ] The CFG_BLOCK_NUM field can encode at most 20 bits, so reduce SPISG_BLOCK_MAX to 0xfffff to avoid programming a zero-length transfer. Perform the delay calculation in 64-bit arithmetic to avoid overflow when converting nanoseconds to SPI clock cycles. Stop the controller on transfer timeout by clearing the descriptor list register before returning an error. Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver") Signed-off-by: Xianwei Zhao Link: https://patch.msgid.link/20260731-a9-spisg-v3-2-a15da3f70029@amlogic.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit cffb3a81d751a6cb5fa64576d1267555b602050e Author: Alexis Lothoré (eBPF Foundation) Date: Thu Sep 3 15:51:35 2026 +0200 selftests/bpf: make cmdline_contains stricter [ Upstream commit 040ef1f8b02e57b78081581d490ceec04ef5f7c0 ] cmdline_contains is used by BPF selftests to check the presence of specific kernel commandline parameters, but it currently suffers from two issues: - the read commandline isn't NULL terminated right after the read data but only at the end of the buffer, leaving uninitialized bytes that are then possibly tokenized - the comparison of found tokens is done based on the size of found token. This could lead to too-short-but-matching tokens to wrongly match the search pattern. Enforce stricter checks in cmdline_contains to avoid accidental matches. Fixes: 399f6185a1c0 ("selftests/bpf: Fix selftests broken by mitigations=off") Signed-off-by: Alexis Lothoré (eBPF Foundation) Link: https://lore.kernel.org/r/20260903-kasan-v9-6-2407fe99255a@bootlin.com Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin commit 5c95ab80c6819c6aac598908ac266eb4f4f30429 Author: Richard Cheng Date: Wed Sep 2 13:38:39 2026 +0800 cxl/fwctl: Propagate feature RPC delivery errors [ Upstream commit 51493ff66ad6b1c8e904cf3ab8c69e9c59aaba0f ] FWCTL_RPC requires delivery failures to be returned as ioctl errors, while device errors are reported in the output. Get and Set Feature instead converted all failures into normal responses, sometimes with a SUCCESS device status. Initialize the return code to SUCCESS. When the helper fails without a device error code, return its errno. Continue reporting actual device errors through rpc_out->retval. CXL permits Get Feature to return a nonzero short payload when Offset + Count runs past the end of the Feature. cxl_internal_send_cmd() reports that response as -EIO, so preserve the returned bytes as a successful partial transfer. Fixed-format EDAC callers still require complete attribute structures, so reject partial payloads before consuming them. Map an unexpected zero-length result with a SUCCESS device status to -EIO. Fixes: 5908f3ed6dc2 ("cxl: Add support to handle user feature commands for get feature") Fixes: eb5dfcb9e36d ("cxl: Add support to handle user feature commands for set feature") Signed-off-by: Richard Cheng Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20260902053839.25595-8-icheng@nvidia.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit e153abbc81e6538ba4934e6647a816a34617a472 Author: Richard Cheng Date: Wed Sep 2 13:38:33 2026 +0800 cxl/features: Reject feature offset that overflows 16-bit field [ Upstream commit 3eb3376944ace574bf7ae299e944a2a3c30c93ba ] cxl_get_feature() and cxl_set_feature() build each mailbox command's offset from the starting offset plus the amount of data already transferred, then store it in a 16-bit field. A user-controlled fwctl offset and transfer size can exceed the feature extent, allowing a later offset to be truncated by cpu_to_le16() and target the wrong feature data. Reject requests whose transfer size exceeds the remaining 16-bit feature range. Express the check as "size > U16_MAX - offset" so the validation itself cannot wrap on 32-bit systems. Change cxl_get_feature() to return ssize_t so invalid input and mailbox failures are reported as negative errno rather than being conflated with a zero-byte result. Update the EDAC callers to handle negative results. Keep fwctl behavior unchanged by translating helper failures to the same header-only RPC response carrying the CXL mailbox return code. Fixes: 5e5ac21f629d ("cxl/mbox: Add GET_FEATURE mailbox command") Fixes: 14d502cc2718 ("cxl/mbox: Add SET_FEATURE mailbox command") Reviewed-by: Dave Jiang Signed-off-by: Richard Cheng Reviewed-by: Alison Schofield Link: https://patch.msgid.link/20260902053839.25595-2-icheng@nvidia.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 4e47f06aa4decb5ba18d82b19be1294ab0800b5e Author: Jared McArthur Date: Tue Aug 4 16:05:58 2026 -0500 arm64: dts: ti: k3-j722s-evm: Switch audio codec clock from audio_refclk1 to external clock [ Upstream commit 432bfc86fe62b654c74d9376b03cbe4d3513ac5f ] In revision PROC170E1 of the J722SXH01EVM [0], the audio codec's (TLV320AIC3106IRGZT [1]) MCLK was provided by the AUDIO_EXT_REFCLK1 (96MHz). Revisions PROC170E2 and later switched the MCLK's source to an external LMK6CE012288CDLFT [2] oscillator (12.288MHz). The PROC170E1 revision of the board is not publicly available. Fix the audio codec's clock by creating a new fixed clock node with a frequency of 12.288MHz, and switch the audio codec's clock from the audio_refclk1 to the new fixed clock. Remove pinmuxing and clock muxing for the audio_refclk1. [0] https://www.ti.com/lit/zip/SPRR495 [1] https://www.ti.com/lit/gpn/TLV320AIC3106 [2] https://www.ti.com/lit/gpn/lmk6c Fixes: 3a36c535dfd2 ("arm64: dts: ti: k3-j722s-evm: Enable analog audio support") Signed-off-by: Jared McArthur Tested-by: Moteen Shah Tested-by: Sen Wang Link: https://patch.msgid.link/20260804210558.1455777-1-j-mcarthur@ti.com Signed-off-by: Nishanth Menon Signed-off-by: Sasha Levin commit 86a17079ee7539979921b7f33c06987a6bbddee0 Author: Maulik Shah Date: Thu Aug 6 14:26:29 2026 +0530 arm64: dts: qcom: purwa: Drop the Hamoa workaround for PDC [ Upstream commit 13ca1c0b7d8a3ab1e59cb3e780c1dd7441e22515 ] X1P42100 (Purwa) shares the X1E80100 (Hamoa) PDC device, but the hardware register bug addressed in commit e9a48ea4d90b ("irqchip/qcom-pdc: Workaround hardware register bug on X1E80100") is already fixed in X1P42100 silicon. X1E80100 compatible forces the software workaround. Use the X1P42100 specific compatible string for the PDC node to remove the workaround. Fixes: f08edb529916 ("arm64: dts: qcom: Add X1P42100 SoC and CRD") Signed-off-by: Maulik Shah Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Reviewed-by: Abel Vesa Link: https://patch.msgid.link/20260806-purwa-pdc-v4-3-62467f4b4ddc@oss.qualcomm.com Signed-off-by: Sasha Levin commit cd125fe5d5596aea0ebbc354df595d636b855c3c Author: Pengpeng Hou Date: Sat Aug 15 21:45:59 2026 +0800 memory: brcmstb_dpfe: validate firmware section sizes [ Upstream commit e61c1a1103e2617e8f86288368911a8591e35c1e ] The firmware header is read before the image has been shown to contain a complete header. In addition, the final size check adds two firmware-provided u32 section lengths before comparing the result with fw->size, so the addition can wrap. Reject images shorter than the fixed header and checksum before reading the header. Then derive the available payload length with subtraction and require the two declared sections to fill it exactly. Fixes: 2f330caff577 ("memory: brcmstb: Add driver for DPFE") Assisted-by: Codex:gpt-5 Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260815134559.47888-1-pengpeng@iscas.ac.cn Signed-off-by: Krzysztof Kozlowski Signed-off-by: Sasha Levin commit 014360fe1e1a17cc00e7decbdbe8d5e4ba8163ed Author: Pengpeng Hou Date: Sat Jul 18 12:34:36 2026 +0800 irqchip/riscv-imsic: Use GENMASK for base address masks [ Upstream commit bd7d57a03c4b0fa3b0291ec64d688ebfed5edffc ] The IMSIC DT binding allows riscv,guest-index-bits up to 7 and riscv,hart-index-bits up to 15. On RV32, guest-index-bits=7 and hart-index-bits=13, together with the 12-bit IMSIC page offset, is a binding-valid layout that consumes a 32-bit low-address mask. The parser accepts this equality case because it rejects only values larger than the remaining bit budget. The base address canonicalization then builds the low-address mask with BIT(sum) - 1. When sum is 32 on RV32, that expression shifts an unsigned long by its full width. Keep the legal equality layout and express the mask with GENMASK(sum - 1, 0) instead. The existing parser bounds guarantee that sum - 1 is below BITS_PER_LONG at both mask sites. Fixes: 21a8f8a0eb35 ("irqchip: Add RISC-V incoming MSI controller early driver") Signed-off-by: Pengpeng Hou Signed-off-by: Thomas Gleixner Reviewed-by: Anup Patel Link: https://patch.msgid.link/20260718040000.004.929c1ef2-caplitmus-rv@iscas.ac.cn Signed-off-by: Sasha Levin commit c6ffb9514f516631e4994d4809899137b34e84ac Author: Julius Bairaktaris Date: Fri Sep 4 11:06:26 2026 +0200 wifi: mac80211: fix swapped fq_overlimit/fq_overmemory in aqm debugfs [ Upstream commit 25f3f2ff88ae604a3b473b501fc55d58fcb0f5eb ] The two scnprintf arguments for fq_overlimit and fq_overmemory are in the wrong order, which results in the aqm debugfs file showing the overmemory count under the fq_overlimit label and vice versa. Fixes: 2a4e675d887b ("mac80211: Export fq memory limit information in debugfs") Reviewed-by: Toke Høiland-Jørgensen Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris Link: https://patch.msgid.link/20260904090626.92727-1-julius@bairaktaris.de Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 3937b14049f4117c152a4b0e86fb39a3737489bf Author: Fabrice Derepas Date: Sat Aug 15 16:00:19 2026 +0200 crypto: asymmetric_keys - fix OOB read in pefile_parse_binary [ Upstream commit 37d550172c2d3cdb3a5ace3e6cb0625967d86349 ] pefile_parse_binary() reads the size field of the certificate table's data-directory entry, which sits at fixed index 4 of the PE optional header's data directory: ctx->certs_size = ddir->certs.size; but nothing ensures index 4 is present. n_data_dirents (the untrusted NumberOfRvaAndSizes) is only upper-bounded against header_size and may be 0, and header_size need only satisfy cursor < header_size < datalen. A crafted PE with n_data_dirents = 0 and a tiny header_size therefore causes the ddir->certs.size read to land past the end of the image (CWE-125). The chkaddr() that bounds the certificate blob runs only after this read. verify_pefile_signature() is reached from kexec_file_load() (the lockdown/secure-boot enforced PE-image signature path), and the image is parsed before its signature is checked. The trigger needs CAP_SYS_BOOT and the access is out-of-bounds read only (no write). Require the certificate table's data-directory entry (index 4) to be present; the existing upper-bound check then keeps ddir->certs within [cursor, header_size). Fixes: 26d1164be37f ("pefile: Parse a PE binary to find a key and a signature contained therein") Assisted-by: copilot-cli:claude-opus-4-6 frama-c Signed-off-by: Fabrice Derepas Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit 5b0b07fe244c1b5a8c45e11adeb162fe360212d1 Author: Ruoyu Wang Date: Fri Aug 14 21:39:33 2026 +0800 hwrng: cctrng - Fix runtime PM usage counter leak [ Upstream commit 58d27c41542be6c40edac4f91f35a1dd8bf0d2c2 ] pm_runtime_get_sync() increments the device usage counter even when runtime resume fails. cctrng_read() propagates errors from cc_trng_pm_get() without scheduling the work that later drops the counter, so a clock or reset-completion failure in cctrng_resume() leaves the counter elevated. Use pm_runtime_resume_and_get(), which drops the usage counter when resume fails and returns zero on success. This preserves the existing success path while balancing the error path. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: a583ed310bb6 ("hwrng: cctrng - introduce Arm CryptoCell driver") Signed-off-by: Ruoyu Wang Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin commit e34a0974d62282757bf59392ff7d7b1509ee2966 Author: Jérôme Pouiller Date: Tue Sep 1 10:33:19 2026 +0200 wifi: wfx: fix possible device hang during init [ Upstream commit 102f54dc47be198e9310b18d41305a78d70a0796 ] The WFxxx device provides an SDIO interface. In addition to the usual in-band SDIO IRQ, the device also supports out-of-band IRQ line. OOB IRQ requires a specific initialization described in commit f00dc1d789e1c ("staging: wfx: poll IRQ during init"): When the chip starts in SDIO mode, the external IRQ (aka Out-Of-Band IRQ) cannot be used before to configure it. Therefore, the first exchanges with the chip have to be done without the OOB IRQ. This patch allow to poll the data until the OOB IRQ is correctly setup. In order to keep the code simpler, this patch also poll data even if OOB IRQ is not used. Commit 57aa557f110d9 ("staging: wfx: introduce a way to poll IRQ") announce some limitation about the data polling mechanism: This function [wfx_bh_poll_irq()] must used with care: if an IRQ fires while the host reads control register, the IRQ can be lost. However, with last analysis, it seems it does not only impact the IRQ. When this condition happen the hardware is lost and won't reply the next commands. The only way to recover the error is to pull the reset pin and bind the device again. Currently wfx_bh_poll_irq() is only used during the two first exchanges with the hardware. Therefore, it has been reported to only happen after a few hours of bind/rebind in a loop. This explain why it has not been reported before. Fortunately, wfx_bh_poll_irq() is only required for OOB IRQ, which is probably very marginal. The In-Band IRQ case also uses this function, but only to simplify the code. This patch limits the use of wfx_bh_poll_irq() to the OOB IRQ. The bus driver now tells wfx_probe() whether polling is necessary. When it is not (in-band SDIO IRQ and SPI), the IRQ is subscribed before the first exchange with the device and wfx_bh_poll_irq() is never called. When it is (SDIO with OOB IRQ), the behavior is unchanged: the control register is polled until the PDS file has configured the IRQ line. To conclude, In-Band users are now safe. Users of OOB IRQ will be still impacted by the bug, but there is nothing we can do (and nobody complained during the last 6 years). Fixes: f00dc1d789e1c ("staging: wfx: poll IRQ during init") Reported-by: Gerard Salvatella Reported-by: Lukas Stockmann Signed-off-by: Jérôme Pouiller Reviewed-by: Alexander Sverdlin Tested-by: Alexander Sverdlin Link: https://patch.msgid.link/20260901083548.113131-2-jerome.pouiller@silabs.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 8acd050a98bd1cd8c3577391d037d13a086a4146 Author: Johannes Berg Date: Mon Aug 3 16:08:37 2026 +0200 wifi: mac80211: fix IEEE80211_TX_CTL_REQ_TX_STATUS mixup [ Upstream commit e035900ffe9e8978f7c0d7b61811b6b578751697 ] In ieee80211_build_hdr(), IEEE80211_TX_CTL_REQ_TX_STATUS is checked in ctrl_flags, which is wrong - IEEE80211_TX_CTL_REQ_TX_STATUS is in info->flags, so the check is for IEEE80211_TX_CTRL_PORT_CTRL_PROTO instead. This works out OK because the only place setting _that_ at a point before this gets called is in fact ieee80211_tx_control_port() which was intended here. This is actually needed for correctness, if jt were checking info->flags instead, TDLS would fill/leak the status frames created here. However, we can just fix it by using the cookie instead, that'll be set for PREAUTH frames via ieee80211_tx_control_port() as well, and no other frames. Additionally, the code also erroneously set it, but that just caused preauth frames to get it set, since storing the ACK SKB will also set the correct flag. Drop this assignment entirely. Fixes: a7528198add8 ("mac80211: support control port TX status reporting") Link: https://patch.msgid.link/20260803141309.292711-10-johannes@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit c99b67a271d67a9ae3d4b0531f798ce385288164 Author: Johannes Berg Date: Sun Aug 2 10:57:21 2026 +0200 wifi: mac80211: drop encap offload frames with a tainted key [ Upstream commit c8ddbe1e8c43f6d008591c50f8be8de39cdce267 ] When a key is tainted, which happens in some WoWLAN and extended key ID scenarios, frames that would use it should be dropped. Fix that for encapsulation offload frames. Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support") Link: https://patch.msgid.link/20260802105818.870b6ef31374.Ib87175b55b9fd94c16ba6d9cd816b7a09248df87@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit ccbd54d3a687d65f8067491aa0542f471d70de32 Author: Johannes Berg Date: Sun Aug 2 10:57:20 2026 +0200 wifi: mac80211: don't send encap offload frames unencrypted [ Upstream commit a48daf145fed445d41ef422573411500785415c8 ] For 802.11 frames, ieee80211_tx_h_select_key() drops a data frame that ended up without a key if the station requires encryption, so that traffic can never leak out unprotected. Encapsulation offload erroneously didn't get this code path. Fix that. Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support") Link: https://patch.msgid.link/20260802085818.1336616-7-johannes@sipsolutions.net Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit cbbd83385584fb1d99f512625637c6cc76b8b3df Author: Johannes Berg Date: Sun Aug 2 10:57:19 2026 +0200 wifi: mac80211: fix key selection for encap offload frames [ Upstream commit 0e80db08668b560b3522849cb705623148bcd4b5 ] ieee80211_tx_h_select_key() assumes the frame is in 802.11 format for picking the key, at least when there's no pairwise TK for the STA to transmit with. For unicast this is likely not relevant because if there's no pairwise TK for the STA there's probably not going to be any other key either. But multicast encapsulation offload frames have no STA, so it looks at the ethernet header as if it was 802.11. This may not matter very much since multicast encapsulation offload is likely to ignore the key selection, but it's still wrong. Create a separate selection function that doesn't (need to) look at the frame header - it's data anyway, so either unicast to a station (with sta pointer) or multicast. For MLO, the driver has to duplicate the frame and select the key anyway, so just skip it in that case entirely. Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support") Link: https://patch.msgid.link/20260802105818.0feb7ad61047.Ia506ca211176a3c466bc60e4cc3e506df34a4a67@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 481e7aefc2eb7c79c0732c74f4b814eb186d4ab9 Author: Johannes Berg Date: Sun Aug 2 10:57:18 2026 +0200 wifi: mac80211: fix unauthorised port check for encap offload [ Upstream commit d59b9bf7df49367e01b06e82dd0f6e7ad3be493c ] The check in ieee80211_tx_dequeue() reads frame_control, addr1 and addr2 out of the skb, but for encapsulation offload that's just a random part of the ethernet addresses, so dropping depends on bits in the destination address. This is obviously wrong. Refactor the check and short-circuit for ethernet format frames, it only needs the port-control flag check since those are locally generated and not forwarded frames. Fixes: 50ff477a8639 ("mac80211: add 802.11 encapsulation offloading support") Link: https://patch.msgid.link/20260802105818.dd5da579813d.I51ed0121154bb652bebc97bb0597b1fae9ac978f@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit da53e3cd7a4b09cd9846981bb12da0a52a84afc3 Author: Lachlan Hodges Date: Thu Aug 27 15:44:56 2026 +1000 wifi: mac80211: don't seed an S1G sta's last_rate [ Upstream commit 00f623647c331d31df8629af958f7582a7fc874c ] When initialising the rate control system, ieee80211_s1g_sta_rate_init() is called for S1G stations during association where it initialises a last rate of type STA_STATS_RATE_TYPE_S1G but does not initialise nss, mcs bw etc. Since the last_rate no longer has a value equivalent to STA_STATS_RATE_INVALID, the invalid rate will be decoded and the NL80211_STA_INFO_RX_BITRATE flag will be set. As a result, there is a period during association before the first data frame is rx'ed where the seeded value is overwritten by ieee80211_rx_h_sta_process() while this invalid last_rate lives. If the sta is desroyed during this process, nl80211_put_sta_rate() will call into cfg80211_calculate_bitrate() and attempt to calculate the bitrate using the invalid last_rate leading to a WARN: 4,336,675067400,-;------------[ cut here ]------------ 4,337,675067524,-;WARNING: net/wireless/util.c:1960 at cfg80211_calculate_bitrate+0x4d8/0x8b0 [cfg80211], CPU#3: kworker/u16:3/874 4,338,675068176,-;invalid rate bw=0, mcs=0, nss=0 [snip loaded modules] 4,341,675068954,-;Hardware name: BCM2711 4,342,675068961,-;Workqueue: events_unbound cfg80211_wiphy_work [cfg80211] 4,343,675069386,-;Call trace: 4,344,675069392,-; unwind_backtrace from show_stack+0x10/0x14 4,345,675069440,-; show_stack from dump_stack_lvl+0xa8/0xb8 4,346,675069475,-; dump_stack_lvl from __warn+0x90/0x224 4,347,675069517,-; __warn from warn_slowpath_fmt+0x130/0x1a8 4,348,675069559,-; warn_slowpath_fmt from cfg80211_calculate_bitrate+0x4d8/0x8b0 [cfg80211] 4,349,675070005,-; cfg80211_calculate_bitrate [cfg80211] from nl80211_put_sta_rate+0x48/0x590 [cfg80211] 4,350,675070819,-; nl80211_put_sta_rate [cfg80211] from nl80211_put_sta_info_common+0x4f4/0xd50 [cfg80211] 4,351,675071616,-; nl80211_put_sta_info_common [cfg80211] from nl80211_send_station.constprop.0+0x114/0x424 [cfg80211] 4,352,675072427,-; nl80211_send_station.constprop.0 [cfg80211] from cfg80211_del_sta_sinfo+0xc4/0x368 [cfg80211] 4,353,675073222,-; cfg80211_del_sta_sinfo [cfg80211] from __sta_info_destroy_part2+0x108/0x2c0 [mac80211] 4,354,675074178,-; __sta_info_destroy_part2 [mac80211] from sta_info_destroy_addr+0x4c/0x88 [mac80211] 4,355,675075243,-; sta_info_destroy_addr [mac80211] from ieee80211_destroy_assoc_data+0x194/0x2d8 [mac80211] 4,356,675075920,-; ieee80211_destroy_assoc_data [mac80211] from ieee80211_rx_mgmt_assoc_resp+0x220/0x1d4c [mac80211] 4,357,675076558,-; ieee80211_rx_mgmt_assoc_resp [mac80211] from ieee80211_iface_work+0x1c0/0x5d0 [mac80211] 4,358,675077187,-; ieee80211_iface_work [mac80211] from cfg80211_wiphy_work+0x110/0x368 [cfg80211] 4,359,675077763,-; cfg80211_wiphy_work [cfg80211] from process_one_work+0x260/0x868 4,360,675078022,-; process_one_work from worker_thread+0x1bc/0x3ec 4,361,675078042,-; worker_thread from kthread+0x120/0x154 4,362,675078060,-; kthread from ret_from_fork+0x14/0x20 4,363,675078074,-;Exception stack(0xf0ac1fb0 to 0xf0ac1ff8) 4,364,675078081,-;1fa0: 00000000 00000000 00000000 00000000 4,365,675078088,-;1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 4,366,675078093,-;1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 4,367,675080226,-;irq event stamp: 15780967 4,368,675080287,-;hardirqs last enabled at (15780975): [] __up_console_sem+0x50/0x60 4,369,675080395,-;hardirqs last disabled at (15780982): [] __up_console_sem+0x3c/0x60 4,370,675080497,-;softirqs last enabled at (15780966): [] handle_softirqs+0x398/0x650 4,371,675080608,-;softirqs last disabled at (15780939): [] __irq_exit_rcu+0x150/0x1f0 4,372,675080715,-;---[ end trace 0000000000000000 ]--- To fix, we can simply not seed this psuedo rate. It was originally implemented to avoid errornous paths that S1G shouldn't take, but those have since been fixed / cleaned up. While we are here, we also don't need to initialise the tx side's last rate with IEEE80211_TX_RC_S1G_MCS (which is equivalent to IEEE80211_TX_RC_VHT_MCS). The entire tx reporting side does not support S1G widths and is assumed to be handled by the driver so we can just remove the entire function. Fixes: 12bf8fad4ca3 ("mac80211: initialize last_rate for S1G STAs") Signed-off-by: Lachlan Hodges Link: https://patch.msgid.link/20260827054456.254573-1-lachlan.hodges@morsemicro.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin commit 72e4eea17a937829e3a5657d86e24af5f0653026 Author: Paul Dolan Date: Wed Sep 2 17:26:15 2026 +0100 selftests/pidfd: fix PPID values in error message [ Upstream commit b4ad6eb49532a43ad06c4d59ec5d8c80a012eb3f ] The PIDFD_GET_INFO PPID check compares info.ppid against getppid(), but its failure message prints pid and info.pid from the preceding PID check. Print the PPID values being compared so that a failure reports the correct information. Fixes: cdda1f26e74b ("pidfd: add ioctl to retrieve pid info") Signed-off-by: Paul Dolan Link: https://patch.msgid.link/20260902162615.11531-1-paul.dolan.dev@gmail.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 1939f935c5e8941d5aeadf66e671b1cba92a60f2 Author: Paul Dolan Date: Wed Sep 2 18:49:39 2026 +0100 selftests/clone3: tighten CLONE_CLEAR_SIGHAND conflict test [ Upstream commit aeebb4884f0e8feb9929f013067488b7f2081f33 ] The CLONE_CLEAR_SIGHAND test intends to verify that CLONE_CLEAR_SIGHAND and CLONE_SIGHAND are mutually exclusive. However, CLONE_SIGHAND without CLONE_VM is independently invalid, so the test input has another reason to fail with EINVAL. Add CLONE_VM so that CLONE_SIGHAND is otherwise valid, and require clone3() to fail with EINVAL. This ensures the test exercises the intended flag conflict and does not accept an unrelated failure. Fixes: de5287235631 ("tests: test CLONE_CLEAR_SIGHAND") Signed-off-by: Paul Dolan Link: https://patch.msgid.link/20260902174939.15135-1-paul.dolan.dev@gmail.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 680f99a005e85a74a0ecda59d4042192caa41ff9 Author: Donggeun Yoo Date: Thu Sep 3 17:20:09 2026 +0900 regulator: pf1550: fix division by zero in the ramp rate selection [ Upstream commit f0c54cc56a9a21047b1afa209baea8ea931f2e92 ] set_machine_constraints() calls the set_ramp_delay() op when either constraints->ramp_delay or constraints->ramp_disable is set. The regulator binding documents regulator-ramp-delay = <0> as the way to disable ramp control, and of_get_regulation_constraints() turns that into ramp_disable = true while leaving ramp_delay at 0, so the op is called with a ramp_delay of 0. The range check rejects negative values and values above 6250 but not zero, and the value is then used as a divisor. The mapping is also wrong for the values that do pass the check. The hardware offers two rates, 6250 uV/us and 3125 uV/us, selected by SWx_DVSSPEED in SWx_CTRL1. Dividing 6250 by the requested rate and taking bit 1 of the quotient does not map monotonically onto them: a request for 1500 uV/us selects 6250 uV/us, while a request for the faster 2000 uV/us selects 3125 uV/us. Replace the division with a direct mapping onto the two supported rates. Requests at or below 3125 uV/us get the slower rate and anything above it gets the faster one. A ramp_delay of 0 asks for ramp control to be disabled, which this hardware cannot do, so it gets the fastest rate; pfuze100 handles the disabled case the same way. Fixes: 7320d41c29bb ("regulator: pf1550: Add support for regulator") Signed-off-by: Donggeun Yoo Link: https://patch.msgid.link/20260903082010.4024603-1-donggeunyoo.kernel@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e5038c8f50074feb431992c6d5749f88027363f2 Author: Gregor Herburger Date: Mon Aug 10 13:46:34 2026 +0200 arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible [ Upstream commit ef76568f51914937d22e5efd05874bd42f478903 ] The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping and in a c Stepping. There are two separate dts files. The bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for the d Stepping. The d stepping does not set its own compatible/model string but uses "raspberrypi,5-model-b" through its include. These two steppings are not compatible. Booting with the wrong dtb file causes a crash at boot. Add a compatibles string "raspberrypi,5-model-b-d0" together with a "bcm2712-d0" string to allow us to distinguish between those two steppings. Fixes: 44839e2ac8ec ("arm64: dts: broadcom: Add DT for D-step version of BCM2712") Signed-off-by: Gregor Herburger Reviewed-by: Stefan Wahren Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20260810-bcm2712-d-stepping-compatible-v4-2-73f74479539c@linutronix.de Signed-off-by: Florian Fainelli Signed-off-by: Sasha Levin commit 379d0702209008e39b5f25d06ab3c71f750ebb6e Author: Peter Robinson Date: Sat Aug 1 17:54:26 2026 +0100 arm64: dts: broadcom: bcm2712: adjust display status [ Upstream commit 1cda59c6790be4ae93c76bffd81a003b88083ae9 ] Typically non critical IP in a SoC are disabled by default in the SoC .dtsi and enabled on board specific configs. There are usecases, such as some CM5 carrier boards, where display output may not be desired or connected. So disable them on the SoC .dtsi and enable them on the RPi5 board. Signed-off-by: Peter Robinson Cc: Florian Fainelli Cc: Dave Stevenson Cc: Andrea della Porta Fixes: 25d77bdd7df2 ("arm64: dts: broadcom: Add display pipeline support to BCM2712") Link: https://lore.kernel.org/r/20260801165430.598302-1-pbrobinson@gmail.com Signed-off-by: Florian Fainelli Signed-off-by: Sasha Levin commit b215d8cf036e39a2b3da5eba64299dc2256e0ad1 Author: Abel Vesa Date: Tue Aug 25 14:41:31 2026 +0300 PCI/pwrctrl: tc9563: Allow RESX reset assertion to sleep [ Upstream commit 028f86457e822ab9de5b0d6d23efddc1b8b54ae1 ] The RESX GPIO may be provided by a sleeping GPIO controller, such as an I2C or SPI I/O expander. Calling gpiod_set_value() for such a GPIO triggers the following warning: WARNING: ... drivers/gpio/gpiolib.c:4030 at gpiod_set_value() The TC9563 power-on and power-off callbacks already sleep while enabling or disabling regulators and while waiting for oscillator stabilization. Use gpiod_set_value_cansleep() for RESX so it can be driven without triggering the warning. Fixes: 4c9c7be47310 ("PCI: pwrctrl: Add power control driver for TC9563") Signed-off-by: Abel Vesa Signed-off-by: Bjorn Helgaas Reviewed-by: Manivannan Sadhasivam Reviewed-by: Bartosz Golaszewski Link: https://patch.msgid.link/20260825-pci-pwrctl-tc9563-use-cansleep-for-resx-v1-1-0dbe7cfd8200@oss.qualcomm.com Signed-off-by: Sasha Levin commit ff47a322f7fd34c2c2f2fa9b9b2843215c648e5a Author: Miaoqing Pan Date: Thu Aug 6 18:13:31 2026 +0800 wifi: ath11k: unregister PM notifier on QMI init failure path [ Upstream commit 1d8e73163ef933624341075f576e2f36ef9133f7 ] ath11k_core_init() registers a PM notifier before the QMI server becomes available. If the QMI server never arrives, the device remove() path can take the early-exit path introduced for QMI initialization failures, skipping ath11k_core_deinit(). As a result, the PM notifier remains registered after the ath11k base object has been freed. A subsequent suspend or resume event may invoke the stale notifier and trigger a use-after-free. Fix this by explicitly unregistering the PM notifier in the QMI failure cleanup path before releasing ath11k resources. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1 Fixes: 32d93b51bc7e ("wifi: ath11k: choose default PM policy for hibernation") Signed-off-by: Miaoqing Pan Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260806101331.484063-4-miaoqing.pan@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 586807b340e4463bdd5bcfe5f91cff2c3c275711 Author: Miaoqing Pan Date: Thu Aug 6 18:13:30 2026 +0800 wifi: ath11k: fix NULL dereference in ahb remove when QMI init incomplete [ Upstream commit 1a7bcf5324c8e2de6512eca5b028b6b283181d3f ] On WCN6750, if QMI messages never arrive (for example when qrtr_smd is not ready), WLAN initialization stops before the device is fully registered. In this case ATH11K_FLAG_QMI_FAIL is not set because no QMI event handler is executed. When the driver is removed, ath11k_ahb_remove() still calls ath11k_core_deinit(), which eventually triggers ath11k_ce_cleanup_pipes() on uninitialized CE pipes and results in a NULL pointer dereference in ath11k_hal_srng_access_begin(): ath11k_hal_srng_access_begin+0x14/0x68 [ath11k] ath11k_ce_cleanup_pipes+0x184/0x190 [ath11k] ath11k_pcic_stop+0x24/0x38 [ath11k] ath11k_core_deinit+0xfc/0x1c0 [ath11k] ath11k_ahb_remove+0x38/0xa0 [ath11k_ahb] Fix this by invoking ath11k_ahb_remove_prepare() before the state check and skipping ath11k_core_deinit() if ATH11K_FLAG_REGISTERED is not set, core initialization did not complete and CE pipes may remain uninitialized, making ath11k_core_deinit() unsafe. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1 Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device") Signed-off-by: Miaoqing Pan Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260806101331.484063-3-miaoqing.pan@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 6df442b2abc676789f7f987941591ca1f79c676d Author: Miaoqing Pan Date: Thu Aug 6 18:13:29 2026 +0800 wifi: ath11k: fix sporadic WLAN initialization failures [ Upstream commit 32ec8488d75d122768b1977501bcb5ec799230c4 ] On WCN6750 platforms, reboot stress testing occasionally results in WLAN initialization failures after boot. The WPSS firmware reaches the running state successfully, but no WLAN interface is created. Analysis shows that ath11k_ahb depends on the QRTR SMD transport for QMI communication with WPSS firmware. However, this dependency is not currently expressed in Kconfig, allowing qrtr_smd and ath11k_ahb to load in either order when built as modules. If ath11k_ahb is loaded before qrtr_smd becomes available, WLAN initialization may not complete successfully. Make the QRTR and QRTR_SMD dependencies explicit and add a soft dependency to ensure qrtr_smd is loaded before ath11k_ahb. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.2.0.c2-00204-QCAMSLSWPLZ-1 Fixes: 00402f49d26f ("ath11k: Add support for WCN6750 device") Signed-off-by: Miaoqing Pan Reviewed-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260806101331.484063-2-miaoqing.pan@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 42f6ed71606f9ff1302b4b036417cb7d5ff306f4 Author: Julius Bairaktaris Date: Mon Jul 27 00:19:08 2026 +0200 wifi: ath11k: disable interrupts during firmware crash recovery [ Upstream commit f7a74e131d3f0de04335dbe278bfb82bdafcdb3e ] On IPQ8074 a firmware assert reboots the SoC: Unable to handle kernel read from unreadable memory at virtual address 0 pc : ath11k_hal_srng_access_begin+0xc/0x60 [ath11k] lr : ath11k_dp_rx_process_mon_status+0x15c/0xd84 [ath11k] Call trace: ath11k_hal_srng_access_begin+0xc/0x60 [ath11k] ath11k_dp_rx_process_mon_rings+0xa0/0x5d4 [ath11k] ath11k_dp_service_srng+0x1f4/0x348 [ath11k] ath11k_ahb_ext_grp_napi_poll+0x34/0xd4 [ath11k_ahb] __napi_poll+0x38/0x188 net_rx_action+0x120/0x2c0 ath11k_core_reconfigure_on_crash() tears the data path down with ath11k_dp_pdev_free(), ath11k_dp_free() and ath11k_hal_srng_clear(), which memsets the ring list. The DP NAPI is still running while that happens, so it services a ring whose address pointer has just been cleared. That function used to disable the interrupts first, until commit d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path") moved the disable into ath11k_core_reset(). reset_work is only queued from mhi.c and from the debugfs hw-restart handler, so AHB parts never run it on a real firmware crash. Their recovery goes QMI server exit -> restart_work -> ath11k_core_reconfigure_on_crash() -> ath11k_core_qmi_firmware_ready(), and nothing disables the interrupts anywhere along it. Disable them again on the crash path. The reset path has already done so by the time it gets here, hence the ab->is_reset check. This is also why the debugfs hw-restart trigger never showed the problem: it goes through ath11k_core_reset(), the one path that still had the disable. Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.12-01460-QCAHKSWPL_SILICONZ-1 Fixes: d455e805de70 ("wifi: ath11k: rearrange IRQ enable/disable in reset path") Assisted-by: Claude:claude-opus-5 Signed-off-by: Julius Bairaktaris Reviewed-by: Rameshkumar Sundaram Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20260726221908.104873-3-julius@bairaktaris.de Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 4e566abff51273acce564f02509b4cb8b93c91bc Author: Baochen Qiang Date: Wed Jul 29 15:18:11 2026 +0800 wifi: ath12k: signal regd update completion when reg event is dropped [ Upstream commit f2576dc0f894ef33045ba7ed057ec417988bba8a ] During driver bring-up, ath12k_mac_hw_register() reinitializes ar->regd_update_completed and sends a set current country command to firmware. It then relies on the regulatory event from firmware to signal that completion via ath12k_reg_chan_list_event(). However, when the country being set is identical to the one already applied at boot time, ath12k_reg_validate_reg_info() returns ATH12K_REG_STATUS_DROP through the "Avoid multiple overwrites to default regd" path. In that case ath12k_reg_chan_list_event() jumps to mem_free before assigning pdev_idx, so pdev_idx stays at its initial value of 255, 'ar' remains NULL and complete_all() is never called. As a result the reinitialized completion is left unsignalled and the next ath12k_regd_update() waits the full timeout, printing: Timeout while waiting for regulatory update Fix this by assigning pdev_idx from the event's phy_id right after it is extracted, before validation, so that the drop and fallback paths still reach complete_all(). Change the guard at the end to check the index against ab->num_radios so that an out-of-range phy_id does not lead to an invalid pdevs[] access. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: 906619a00967 ("wifi: ath12k: handle regulatory hints during mac registration") Signed-off-by: Baochen Qiang Reviewed-by: Rameshkumar Sundaram Link: https://patch.msgid.link/20260729-ath12k-regd-wait-timeout-v1-1-504aa6e7e93c@oss.qualcomm.com Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin commit 3d272d2666032e18bbf9908605fb09e6034b1fca Author: Miquel Raynal (Schneider Electric) Date: Fri Aug 7 17:24:06 2026 +0200 clk: Use the generic OF phandle parsing in only one place [ Upstream commit 57d728b4ab15a8af890013bb0f302e7733f7c1c6 ] Ideally, there should be one single entry in the OF world. This way, the DT parsing logic is always identical. At this stage, we call of_parse_phandle_with_args() in: - of_parse_clkspec() - of_clk_get_parent_name() which kinds of defeats the above statement. Furthermore, when this call is done from of_clk_get_parent_name(), we fail to parse the 'clock-ranges' property. Make sure DT world is entered only once by calling of_parse_clkspec() from of_clk_get_parent_name(). Doing so implies that we do not try the "clock-ranges" path if we already found a "clocks" property. Suggested-by: Stephen Boyd Fixes: 4472287a3b2f5 ("clk: Introduce of_clk_get_hw_from_clkspec()") Signed-off-by: Miquel Raynal (Schneider Electric) Reviewed-by: Brian Masney Reviewed-by: Frank Li Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit bdfa382b99b41d4bbcd2601cfe3805319f475cb7 Author: Wenjie Qi Date: Wed Sep 2 17:06:11 2026 +0800 f2fs: wait for inode record work before clearing ino bitmaps [ Upstream commit 56bcda97b38a54b18df380ca928120a05d2a269a ] APPEND/UPDATE inode state recording was moved to the inode eviction workqueue. These entries were later converted to bitmap values stored in XArrays, but the workqueue drain was left behind in the list cleanup loop where it is now a no-op. During unmount, inode eviction work can therefore remain queued when f2fs_release_ino_entry() destroys the bitmap XArrays. A delayed worker can repopulate them before the workqueue is finally destroyed, leaking newly allocated XArray nodes when the F2FS superblock is freed. Wait for APPEND/UPDATE inode record work before destroying each bitmap XArray, restoring the required ordering. Fixes: 9a9ee7408a1f ("f2fs: reduce memory footprint of ino management") Signed-off-by: Wenjie Qi Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin commit 27d0f654e7937201a89b4991e50a07e38b2a99ba Author: Chengchang Tang Date: Mon Aug 31 10:03:23 2026 +0800 RDMA/hns: Fix missing CQE when UD QP use different SL [ Upstream commit 3547f46c31993d41748f0f7936f9d4dc5b5d4b12 ] Due to the hardware contraint, CQEs may be dropped when a UD QP sends with multiple SLs. Pin the SL to the value from the first post_send on the QP to avoid this issue. Fixes: 66d86e529dd5 ("RDMA/hns: Add UD support for HIP09") Signed-off-by: Chengchang Tang Signed-off-by: Junxian Huang Link: https://patch.msgid.link/20260831020324.3540901-2-huangjunxian6@hisilicon.com Signed-off-by: Leon Romanovsky Signed-off-by: Sasha Levin commit 20d33fb39af11785f40f4bee585559df3d434099 Author: Manush Prajwal Date: Fri Aug 28 14:30:13 2026 +0530 leds: max77705: Use fwnode_for_each_child_node_scoped() in max77705_add_led() [ Upstream commit 4805e5ec50d0b355370e3d1ea906af4fc758accf ] Rework the subled loop in max77705_add_led() around fwnode_for_each_child_node_scoped() instead of adding a manual fwnode_handle_put(child) before the early return on a max77705_parse_subled() failure, so the reference on the current child fwnode is released automatically on every exit path from the loop. child is never used outside the loop, so the now-unused outer child declaration is dropped along with it. Suggested-by: Krzysztof Kozlowski Fixes: 3b6eaa3db567 ("leds: Use fwnode_for_each_child_node() instead") Signed-off-by: Manush Prajwal Reviewed-by: Krzysztof Kozlowski Link: https://patch.msgid.link/6a914e1e.7d702ed2.1273e8.2a52@mx.google.com Signed-off-by: Lee Jones Signed-off-by: Sasha Levin commit 896aa4369ac16d837a4a45521d53e155dbd4d313 Author: Alex Elder Date: Wed Sep 2 16:43:20 2026 -0500 arm64: dts: qcom: qcs8550-rb5gen2: clean up PCI function nodes [ Upstream commit 3f7d46aaf5565471f65b2e21fbb649cedc55e6b8 ] The Qualcomm RB5gen2 devicetree source file defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions. The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes. In addition, only PCI bridge nodes should be named "pci@" (or "pcie@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes. Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used. Fixes: 33cae252054a6 ("arm64: dts: qcom: qcs8550: add QCS8550 RB5Gen2 board support") Reviewed-by: Abel Vesa Reviewed-by: Manivannan Sadhasivam Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20260902214321.1721477-7-elder@riscstar.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 9a8a68f051de213f0de060bc77e3c9b013d1e472 Author: Alex Elder Date: Wed Sep 2 16:43:19 2026 -0500 arm64: dts: qcom: qcs6490-thundercomm-minipc-g1iot: clean up PCI function nodes [ Upstream commit 55580d234cec123e9b2964cab30fbfad10774b26 ] The Thundercomm AI Mini PC G1 IoT devicetree source file defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions. The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes. In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes. Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Fixes: 1cde54c54b83b ("arm64: dts: qcom: qcs6490: Add Thundercomm AI Mini PC G1 IoT") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20260902214321.1721477-6-elder@riscstar.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 6d9e00316f6e1955025758210cb0618edea47704 Author: Alex Elder Date: Wed Sep 2 16:43:18 2026 -0500 arm64: dts: qcom: monaco-evk-ifp-mezzanine: clean up PCI function nodes [ Upstream commit 0f8cbe572057b0ef98c651fbd6da1877983c7165 ] The monaco-evk-ifp-mezzanine overlay defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions. The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes. In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes. Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Fixes: 5a67924d2fc57 ("arm64: dts: qcom: monaco-evk: Add IFP Mezzanine") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20260902214321.1721477-5-elder@riscstar.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 99960713789ebb09cd069795ece71d85530cf824 Author: Alex Elder Date: Wed Sep 2 16:43:17 2026 -0500 arm64: dts: qcom: lemans-evk-ifp-mezzanine: clean up PCI function nodes [ Upstream commit ca3027cfe8c7ef612910d2f04e58d75ec8a9b427 ] The lemans-evk-ifp-mezzanine overlay defines a node representing a TC956x chip which contains a PCIe switch and an embedded endpoint that implements two PCIe functions. The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes. In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes. Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Fixes: b64abb26a2916 ("arm64: dts: qcom: lemans-evk: Add IFP Mezzanine") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20260902214321.1721477-4-elder@riscstar.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 5a14b54329c5ab1a2a33510ebbd1f46d967fddf1 Author: Alex Elder Date: Wed Sep 2 16:43:16 2026 -0500 arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: clean up PCI function nodes [ Upstream commit aaedd4ea312d6fd70dfc5cf430edf5106c5b3382 ] The qcs6490-rb3gen2-industrial-mezzanine overlay defines two nodes representing TC956x chips, each of which contains a PCIe switch and an embedded endpoint that implements two PCIe functions. The devicetree nodes erroneously include a "pci" device_type property for the two PCIe functions. That property should only be used for a PCI device "that implements a PCI bus". Remove this property for the two function nodes. In addition, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes. Finally, these nodes define #address-cells, #size-cells, and ranges properties, which are not normally defined for PCIe endpoints. Remove these properties as well; they can be added back once they are actually needed/used. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Fixes: 4559b435f741b ("arm64: dts: qcom: qcs6490-rb3gen2-industrial-mezzanine: Add TC9563 PCIe switch node for PCIe0") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20260902214321.1721477-3-elder@riscstar.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 9c12c4309069dcea75ce886821c8d9dd3960a61c Author: Alex Elder Date: Wed Sep 2 16:43:15 2026 -0500 arm64: dts: qcom: qcs6490-rb3gen2: clean up PCI function nodes [ Upstream commit df4107fc729e3bffce27fe0ed06fc6a64dd675cd ] The TC9564 SoC contains a PCIe switch with three downstream ports. The third downstream port connects to an embedded PCI endpoint, and that endpoint implements two PCI functions. The devicetree node describing those functions incorrectly includes this property: device_type = "pci"; That property should only be used for a PCI device "that implements a PCI bus", but not a PCIe function. So remove the device_type property from the nodes representing the two embedded PCI functions. Additionally, only PCI bridge nodes should be named "pcie@" (or "pci@"). PCI endpoint nodes are typically named based on the functionality they implement (e.g., "ethernet@"). In this case, the role of these PCI functions is not (yet) specified, and furthermore they will be used with PCI endpoint buses. Rename these to use "dev@", following the convention used in of_pci_make_dev_node() for dynamically-created devicetree nodes. Finally, those properties contain #address-cells, #size-cells, and ranges properties. And although these properties *will* be appropriate for these functions on an RB3gen2, they are not normally used for PCI functions. So remove these properties as well; we'll include them in the commit that actually adds a pci-ep-bus sub-node to these PCI function nodes. Reviewed-by: Manivannan Sadhasivam Reviewed-by: Konrad Dybcio Reviewed-by: Abel Vesa Fixes: aa7b4bbcb3a1d ("arm64: dts: qcom: qcs6490-rb3gen2: Add TC9563 PCIe switch node") Signed-off-by: Alex Elder Link: https://lore.kernel.org/r/20260902214321.1721477-2-elder@riscstar.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 2a0b71b0f9a43fd98e883e9834b46ba2d2dfc875 Author: Rosen Penev Date: Fri Jul 24 15:59:58 2026 -0700 dmaengine: at_hdmac: fix sparse '__iomem' cast warning in memset helpers [ Upstream commit fdae0d0f096c92dd05d3722759fd614ea341e0dc ] Both atc_prep_dma_memset() and atc_prep_dma_memset_sg() declare vaddr as 'void __iomem *' but assign the return of dma_pool_alloc(), which returns 'void *' (not iomem memory). This causes sparse to warn about a cast removing the __iomem address space at the dereference site. The struct field memset_vaddr is also typed as 'int *', which is neither the type returned by dma_pool_alloc() nor the type used for the actual writes. Fix by declaring vaddr as 'u32 *' in both functions and changing memset_vaddr in struct at_desc from 'int *' to 'u32 *'. This matches the actual usage and eliminates the need for the (u32 *) cast. Fixes: 5d8c5bea0da9 ("dmaengine: at_hdmac: add COMPILE_TEST support") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202607231110.8MqNRj0Q-lkp@intel.com/ Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Link: https://lore.kernel.org/oe-kbuild-all/202607231110.8MqNRj0Q-lkp@intel.com/ Reviewed-by: Frank Li Link: https://patch.msgid.link/20260724225958.43925-1-rosenp@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit a34cead1e2391f9e090d9dc3bef97b61e16e6d20 Author: Rosen Penev Date: Sat Jul 18 16:52:27 2026 -0700 dmaengine: fsl_raid: avoid free_q underflow in free_chan_resources [ Upstream commit d805aa5b6088b193debabaa80cc0991bfa2bd057 ] fsl_re_free_chan_resources() loops alloc_count times calling list_first_entry() on free_q without checking whether the list still has entries. If descriptors remain un-acked or pending in submit_q / active_q / ack_q when the channel resources are freed, free_q becomes smaller than alloc_count and list_first_entry() returns the list head, causing list_del() to corrupt the list head and dereference a bogus pointer. Walk free_q with list_for_each_entry_safe() until it is empty, decrementing alloc_count per freed descriptor, instead of relying on the alloc_count count. Fixes: ad80da658bbc ("dmaengine: Driver support for FSL RaidEngine device.") Assisted-by: opencode:hy3-free Signed-off-by: Rosen Penev Reviewed-by: Frank Li Link: https://patch.msgid.link/20260718235227.385108-1-rosenp@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 6140664888745dd3a7714b9ec022f243bb7f8141 Author: Rosen Penev Date: Fri Jul 17 22:30:10 2026 -0700 dmaengine: fsl_raid: don't invoke client callback under desc_lock [ Upstream commit 62c267ce97444f8a381f2bb3cd5d534eb362c540 ] fsl_re_dequeue() holds re_chan->desc_lock while calling fsl_re_desc_done(), which synchronously invokes the DMA client completion callback via dmaengine_desc_get_callback_invoke(). If that callback submits new work (e.g. fsl_re_tx_submit()), it tries to reacquire the same desc_lock and deadlocks on the spinlock. Collect completed descriptors into a local list under the lock, then release the lock and invoke the callbacks before moving the descriptors to the ack queue. Fixes: ad80da658bbc ("dmaengine: Driver support for FSL RaidEngine device.") Assisted-by: opencode:hy3-free Signed-off-by: Rosen Penev Reviewed-by: Frank Li Link: https://patch.msgid.link/20260718053010.3074329-1-rosenp@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 200ceb1683465eacc8f3bb3f7218f4a15215ad41 Author: Koichiro Den Date: Wed Jul 29 02:23:04 2026 +0900 PCI: endpoint: pci-epf-vntb: Pass PF/VF number when BAR programming [ Upstream commit afe2aa9dc93d904730bab63f5ccb514a318e6464 ] vntb_epf_mw_set_trans() programs the memory-window BAR through pci_epc_set_bar() with hardcoded function numbers (0, 0), so the BAR lands on the wrong function whenever the vNTB EPF is bound to anything but PF0. The other BAR programming sites in the vNTB driver already pass the EPF's own numbers. Pass the EPF's own func_no/vfunc_no here as well. Fixes: e35f56bb0330 ("PCI: endpoint: Support NTB transfer between RC and EP") Signed-off-by: Koichiro Den Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://patch.msgid.link/20260728172306.2751813-2-den@valinux.co.jp Signed-off-by: Sasha Levin commit 8e6889497b8823d5f2e7462b19d22fa1a99fb964 Author: David Yang Date: Mon Aug 31 12:38:54 2026 +0800 net: dsa: yt921x: Check lock status with lockdep_assert_held_once() [ Upstream commit b1950d0426aabdda485c86b504106b1d7b11f325 ] mutex_is_locked() was used to check the lock status. While it should not be triggered unless a bug is introduced, it does not warn on lock being held by another thread. Fix it with lockdep helpers. Fixes: 186623f4aa72 ("net: dsa: yt921x: Add support for Motorcomm YT921x") Signed-off-by: David Yang Reviewed-by: Andrew Lunn Link: https://patch.msgid.link/20260831044818.4103477-2-mmyangfl@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit 3dd0740fe4b1dd26c1e1c2f7ca047badb9742713 Author: Toke Høiland-Jørgensen Date: Tue Sep 1 10:46:56 2026 +0200 libbpf: Move section-defined program flags to prog_flags [ Upstream commit d6b633b585f348053dd27044b1b39972c748c1fa ] The libbpf section definition modifiers for XDP frags support and sleepable programs stores the flags bits only in the private section definition cookie from object open to load time. This has the unfortunate consequence that API consumers cannot see (or manipulate) the flag between object open and program load. In particular, libxdp has special handling of frags-enabled programs to make them compatible with the dispatcher. This doesn't work on XDP programs that enable frags through the 'xdp.frags' section definition because the flag is not visible through bpf_program__flags()[0]. Fix this by changing how libbpf loads the program flags from section definitions: instead of using the private section definition cookie, add a setup function to the default section definitions that stores the flags for sleepable and XDP frags programs in the prog_flags field of struct bpf_program. Exposing the flags this way means that any use of bpf_program__set_flags() will override the flags unless the caller takes care of updating flags in a non-destructive way. This is unavoidable with the set-only API, and any user setting flags unconditionally is already broken in the sense that they will also override any other current and future flags. In addition, prog_flags survives program type changes through bpf_program__set_type(). It is the responsibility of the caller to ensure the flags are cleared if they are incompatible with the new program type. [0] https://github.com/xdp-project/xdp-tools/issues/587 Fixes: 082c4bfba4f7 ("libbpf: Add SEC name for xdp frags programs") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260901-libbpf-frags-flags-v3-3-4eb6f14968b0@redhat.com Signed-off-by: Sasha Levin commit f112594fadbd1de8b1446aab9698a09a6e33224c Author: Toke Høiland-Jørgensen Date: Tue Sep 1 10:46:54 2026 +0200 bpftool: Set BPF_F_XDP_DEV_BOUND_ONLY flag non-destructively [ Upstream commit 06d6f845c4bda857a6ae864690f35321b878e827 ] When setting the XDP hints ifname, bpftool would set the BPF_F_XDP_DEV_BOUND_ONLY without looking at the existing program flags, overriding any other flag values. This was always a destructive action, but after we change libbpf to carry the frags section flag in prog_flags, this can impact bpftool loading of XDP frags programs. Change the flag setting to be non-destructive by OR'ing it with the existing flags. Fixes: f46392ee3dec ("bpftool: Specify XDP Hints ifname when loading program") Signed-off-by: Toke Høiland-Jørgensen Signed-off-by: Andrii Nakryiko Reviewed-by: Larysa Zaremba Link: https://lore.kernel.org/bpf/20260901-libbpf-frags-flags-v3-1-4eb6f14968b0@redhat.com Signed-off-by: Sasha Levin commit 57bf08bb0ba1480bfb7913062cacfa00371c1eed Author: Ionut Nechita Date: Tue Sep 1 10:10:40 2026 +0300 x86/crash: Reserve elfcorehdr for CONFIG_NR_CPUS, not CONFIG_NR_CPUS_DEFAULT [ Upstream commit 6664ad1026b558563702f9a1ce637df33e7c001e ] NR_CPUS_DEFAULT is purely a Kconfig thing. Its entire purpose in life is to start NR_CPUS at a sane value. There is precisely one (buggy) reference to it outside of Kconfig in the whole kernel: the x86 crash code. That code undersizes the elfcorehdr reservation whenever NR_CPUS exceeds NR_CPUS_DEFAULT, because the header carries one phdr per possible CPU and num_possible_cpus() is bounded by NR_CPUS. kexec_file_load(2) then fails with -EINVAL from sanity_check_segment_list(), and kexec_load(2) silently truncates the elfcorehdr, which surfaces later as a bad or unusable dump. Size the elfcorehdr reservation with NR_CPUS instead. Fixes: ea53ad9cf73b ("x86/crash: add x86 crash hotplug support") Signed-off-by: Ionut Nechita Signed-off-by: Dave Hansen Reviewed-by: Jinjie Ruan Reviewed-by: Bradley Morgan Reviewed-by: Sourabh Jain Acked-by: Baoquan He Link: https://patch.msgid.link/20260901071041.16311-2-ionut.nechita@windriver.com Signed-off-by: Sasha Levin commit b64421bdb594a930744fe7e9e91fbe85e3792eb2 Author: Melissa Wen Date: Thu Aug 20 11:26:38 2026 +0200 drm/amd/display: use translate_curve_to_degamma_hw_format on DCN30 [ Upstream commit e377716b9863fb79c59e0f1f7612a1ebf160f8cc ] DCN3.01 presents the same banding issue as reported in the link below, but the previous fix doesn't cover this hw. Change the helper used to translate degamma/blend curves to HW points for DCN30, DCN 301, DCN31 and DCN314 similar to what was done for DCN32+ by commit 3719314af322 ("drm/amd/display: use a separate helper to translate degamma curves"). Link: https://lore.kernel.org/amd-gfx/20260623160112.1636801-1-mwen@igalia.com/ Fixes: 222e63bddae5 ("drm/amd/display: use a separate helper to translate degamma curves") Reviewed-by: Alex Hung Signed-off-by: Melissa Wen Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit b19d10fb24aadd0085a68350954cb50e4f522680 Author: Tomasz Siemek Date: Mon Aug 10 17:00:27 2026 +0200 drm/amd/display: Refactor DPP_SET_INPUT_TRANSFER_FUNC to drop pipe_ctx [ Upstream commit 43bee2ff0d78f4f470062c4b7e6b20c9db92a4bf ] [Why] Pipe_ctx shouldn't be passed as block sequence block parameter. [How] - Adjust arguments for: - set_input_transfer_func, - populate_mcm_luts, - set_mcm_location_post_blend, - set_mcm_luts, - program_rmcm_luts. - Remove const qualifier from plane_state in set_mcm_luts since it is mutated. Reviewed-by: Alvin Lee Signed-off-by: Tomasz Siemek Signed-off-by: Ivan Lipski Tested-by: Dan Wheeler Signed-off-by: Alex Deucher Stable-dep-of: e377716b9863 ("drm/amd/display: use translate_curve_to_degamma_hw_format on DCN30") Signed-off-by: Sasha Levin commit 30416a715e3340b47fc58d6a023b0fd3810baa46 Author: Tomasz Siemek Date: Thu Aug 6 12:32:53 2026 +0200 drm/amd/display: Refactor HUBP_WAIT_FOR_DCC_META_PROP to drop pipe_ctx [ Upstream commit 36a749820850e002e73c030cc59d88c43ec6735d ] [why] Pipe_ctx shouldn't be passed as block sequence block parameter. [how] Precalculate delay during building stage instead during execution. Reviewed-by: Alvin Lee Signed-off-by: Tomasz Siemek Signed-off-by: James Lin Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Stable-dep-of: e377716b9863 ("drm/amd/display: use translate_curve_to_degamma_hw_format on DCN30") Signed-off-by: Sasha Levin commit 9c145bc56df33b75e5b81be509ae3b57829121ea Author: Gaghik Khachatrian Date: Thu Jul 23 22:14:02 2026 -0400 drm/amd/display: gate DCE ASIC code behind CONFIG_DRM_AMD_DC_DCE [ Upstream commit cd2cfe4d1504342b37c3170d290aa8168deff6d7 ] [Why&How] Refactor to make DCE support optional. Reviewed-by: Dillon Varone Signed-off-by: Gaghik Khachatrian Signed-off-by: Tom Chung Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher Stable-dep-of: e377716b9863 ("drm/amd/display: use translate_curve_to_degamma_hw_format on DCN30") Signed-off-by: Sasha Levin commit 1d123165f08153ab7ccd21a8ccb91511e4d59be0 Author: Richard Zhu Date: Fri Aug 21 13:43:34 2026 +0800 arm64: dts: imx943: Avoid 32-bit PCIe window System RAM overlap [ Upstream commit fff67007ad5403966092006867fe9926aaedda0d ] Move the PCIe non-prefetchable memory PCI bus address from 0xe0000000 to 0x10000000 to avoid overlap with DRAM. Avoid hit this as a P2P transfer[1]. The 0x10000000 range is reserved and safe to use. Link: https://lore.kernel.org/imx/753fca23-c3eb-45e3-aeac-b7b248fa723a@app.fastmail.com/ [1] Fixes: 6de3a7d7a4f65 ("arm64: dts: imx943: Correct PCIe outbound address space configuration") Signed-off-by: Richard Zhu Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 78ff9bfdf93ee86e6cd04610910132ef0b778e01 Author: Richard Zhu Date: Fri Aug 21 13:43:33 2026 +0800 arm64: dts: imx94: Avoid 32-bit PCIe window System RAM overlap [ Upstream commit 775ebd246092294432895f8e9bd48e3f0a56714a ] Move the PCIe non-prefetchable memory PCI bus address from 0xe0000000 to 0x10000000 to avoid overlap with DRAM. Avoid hit this as a P2P transfer[1]. The 0x10000000 range is reserved and safe to use. Link: https://lore.kernel.org/imx/753fca23-c3eb-45e3-aeac-b7b248fa723a@app.fastmail.com/ [1] Fixes: ffccbd6804e88 ("arm64: dts: imx94: Correct PCIe outbound address space configuration") Signed-off-by: Richard Zhu Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit 676047e86d4412bf080e6aff918a488303665e9d Author: Richard Zhu Date: Fri Aug 21 13:43:32 2026 +0800 arm64: dts: imx95: Avoid 32-bit PCIe window System RAM overlap [ Upstream commit 9094eb07b3e236233dbaac61ed30cc65be9e9c6c ] Move the PCIe non-prefetchable memory PCI bus address from 0xe0000000 to 0x10000000 to avoid overlap with DRAM. Avoid hit this as a P2P transfer[1]. The 0x10000000 range is reserved and safe to use. Fixes: dbecf38e60d4e ("arm64: dts: imx95: Correct PCIe outbound address space configuration") Signed-off-by: Richard Zhu Link: https://lore.kernel.org/imx/753fca23-c3eb-45e3-aeac-b7b248fa723a@app.fastmail.com/ [1] Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit ba1763f958334520207c1e189cabd86b163f33ef Author: Pengpeng Hou Date: Sun Aug 30 21:33:10 2026 +0800 remoteproc: imx_dsp: Acquire runtime PM before adding carveouts [ Upstream commit 13df1fa4f1a30571442eda64c73d6cac7b9b5c95 ] The prepare callback publishes DSP carveouts before acquiring the runtime-PM reference that establishes required clocks and mailbox state. A PM failure therefore leaves the prepare transaction partially published. Acquire runtime PM first and drop that reference if carveout construction fails, so a failed prepare does not add resources before its hardware prerequisite. Fixes: ec0e5549f358 ("remoteproc: imx_dsp_rproc: Add remoteproc driver for DSP on i.MX") Signed-off-by: Pengpeng Hou Link: https://lore.kernel.org/r/20260830133310.6926-1-pengpeng@iscas.ac.cn Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin commit e69546ab5e3ba0ce231b6834b804005457cf510d Author: Alexander Aring Date: Tue Sep 1 13:47:15 2026 -0400 dlm: fix variable key length lookup [ Upstream commit b4e6ae7ba711758c38d5eb7d5a7a0712273bdf6f ] Before commit 6c648035cbe7 ("dlm: switch to use rhashtable for rsbs") the rsb hashtable was dynamic key length. Accidentally it was changed to switch to static key length which can end in different results. We fixing this back to the original behaviour by adding the necessary functionality to rhashtable to handle the objects and lookups as dynamic key lengths. Fixes: 6c648035cbe7 ("dlm: switch to use rhashtable for rsbs") Signed-off-by: Alexander Aring Signed-off-by: David Teigland Signed-off-by: Sasha Levin commit 69beb43cd143f63078e569d9d90c6c401c866695 Author: Joseph Qi Date: Tue Sep 1 13:47:11 2026 -0400 dlm: fix buffer overflow from negative len in dlm_search_rsb_tree [ Upstream commit d785f7d92f197b72d496bbcf54a160cd54f00263 ] commit 080e5563f878c ("dlm: validate length in dlm_search_rsb_tree") only checks for len > DLM_RESNAME_MAXLEN, which does not catch negative values. While the input 'len' can be negative and a negative int passed to memcpy() is implicitly converted to a large size_t, causing a stack buffer overflow on the key[] array. Fix this by changing the 'len' parameter type from int to unsigned int. This ensures negative values from callers are implicitly converted to large unsigned values that are caught by the existing len > DLM_RESNAME_MAXLEN check. Acked-by: Alexander Aring Signed-off-by: Joseph Qi Signed-off-by: Alexander Aring Signed-off-by: David Teigland Stable-dep-of: b4e6ae7ba711 ("dlm: fix variable key length lookup") Signed-off-by: Sasha Levin commit 7f076bf4adcf05fccff650122dfbe9fdff79ec2b Author: Danila Chernetsov Date: Tue Sep 1 13:47:13 2026 -0400 dlm: fix NULL pointer dereference in dlm_dump_rsb_name() [ Upstream commit 19982c99a302ab544c69f95d37ca3070c89762d3 ] The function dlm_dump_rsb_name() is called from receive_rcom_lookup() when a debug dump is requested via a special RCOM_LOOKUP message with rc_id == 0xFFFFFFFF. The resource name passed to dlm_dump_rsb_name() comes from the received message. There is no guarantee that an RSB with this name exists in the local hash table. dlm_search_rsb_tree() returns 0 when the RSB is found and stores a valid pointer in r. When the lookup fails, it returns -EBADR and leaves r NULL. The current error handling is inverted: if (!error) goto out; As a result, dlm_dump_rsb() is called only when the lookup fails and r is NULL, resulting in a NULL pointer dereference. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 2d90354027ad ("dlm: merge toss and keep hash table lists into one list") Acked-by: Alexander Aring Signed-off-by: Danila Chernetsov Signed-off-by: Alexander Aring Signed-off-by: David Teigland Signed-off-by: Sasha Levin commit 754b20172f449755816c4def9437b4c938a7c6fe Author: Danila Chernetsov Date: Tue Sep 1 13:47:12 2026 -0400 dlm: validate lock modes in recovery messages [ Upstream commit 7bf1aca6d626944091a5cb218b4e487547edff0a ] The DLM recovery path restores lock state from rcom_lock messages received from remote nodes. The lock modes in these messages are copied directly into the local lkb state without validating that they are within the valid DLM lock mode range. The rest of the DLM code assumes that lkb_rqmode and lkb_grmode contain valid lock modes. In particular, LVB callback handling in dlm_may_skip_callback() uses lock modes as indexes into the dlm_lvb_operations array: dlm_lvb_operations[prev_mode + 1][mode + 1] An invalid lock mode received during recovery could therefore result in an out-of-bounds read during subsequent LVB callback processing. Validate rl_rqmode and rl_grmode before storing them into the local LKB state. This preserves the lock mode invariant required by the rest of the DLM code. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: e7fd41792fc0 ("[DLM] The core of the DLM for GFS2/CLVM") Acked-by: Alexander Aring Signed-off-by: Danila Chernetsov Signed-off-by: Alexander Aring Signed-off-by: David Teigland Signed-off-by: Sasha Levin commit a0e1efc77bef6ccf8a326a411f003fa5edf89d09 Author: Linmao Li Date: Wed Aug 12 14:07:38 2026 +0800 wifi: mm81x: do not discard a failed firmware segment write [ Upstream commit dc1936211335eca00acca53d058dc94fbab02028 ] When mm81x_dm_write() fails while downloading a PT_LOAD segment, mm81x_fw_load_fw() sets ret to -EIO and breaks out of the loop. The boot address write at the end of the function then overwrites ret, so a partially downloaded image is reported as loaded and the chip is triggered on it instead of the load being retried. Leave the function as soon as a segment fails. Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Linmao Li Link: https://patch.msgid.link/20260812060740.1275280-3-lilinmao@kylinos.cn Signed-off-by: Lachlan Hodges Signed-off-by: Sasha Levin commit 3d80571f71eb996677d179e1347e973725cd97ad Author: Linmao Li Date: Wed Aug 12 14:07:37 2026 +0800 wifi: mm81x: free the firmware scratch buffer on parse failures [ Upstream commit 87230a514d2ca128c3fcd96126bb18162459640f ] mm81x_fw_load_fw() allocates fw_buf before it inspects the image, but releases it only on the success path. The two early returns taken for a malformed image leave one firmware-sized allocation attached to the device, and mm81x_fw_flash() retries the load three times. Release it on those paths too, the way mm81x_fw_load_bcf() already does. Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Linmao Li Link: https://patch.msgid.link/20260812060740.1275280-2-lilinmao@kylinos.cn Signed-off-by: Lachlan Hodges Signed-off-by: Sasha Levin commit fbf0df89a1bb426a48d332f59c22193c52532d22 Author: John Stultz Date: Fri Aug 7 03:52:11 2026 +0000 sched: Switch rq->next_class in proxy_reset_donor() [ Upstream commit 1f880513859336b1d4f9731d3a67d22d0b3b6aad ] Similar to commit 04f80f8b12a0 ("sched: Switch rq->next_class on proxy_resched_idle()"), we should also set the rq->next_class when we call proxy_reset_donor(). Fixes: f13beb010e4a ("sched: Have try_to_wake_up() handle return-migration for PROXY_WAKING case") Signed-off-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260807035232.1881495-6-jstultz@google.com Signed-off-by: Sasha Levin commit 4d993ab757a372fb8db57c68448697c425a53429 Author: Vasily Gorbik Date: Fri Aug 7 03:52:10 2026 +0000 sched/core: Don't proxy-exec unmatched cookie lock owners [ Upstream commit 09351db90a28ee6a82dc873609edfde02da5415d ] Core scheduling chooses a core-wide cookie before __schedule() installs the next task. With proxy-exec enabled, that task becomes the donor/scheduling context, and find_proxy_task() may then replace the execution context with the runnable mutex owner. If its cookie differs from the selected core cookie, running it would bypass core scheduling's cookie selection. When the final mutex owner found by find_proxy_task() does not match the selected core cookie, stop proxying the donor. If the current execution context is already in the blocked chain, fall back to idle like the existing proxy-exec retry paths do. Otherwise deactivate the donor and let __schedule() pick again. The mutex owner can be picked later under its own cookie. Fixes: 7de9d4f94638 ("sched: Start blocked_on chain processing in find_proxy_task()") [jstultz: Added tweak to ensure we deactivate donor, not runnable owner] Reported-by: K Prateek Nayak Signed-off-by: Vasily Gorbik Signed-off-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Link: https://lore.kernel.org/lkml/10282ce9-f4ae-498f-9b57-f4e1e61fffbc@amd.com/ Link: https://patch.msgid.link/20260807035232.1881495-5-jstultz@google.com Signed-off-by: Sasha Levin commit 6ba6f1a7927034d50262f507d8d0076b7712e014 Author: Vasily Gorbik Date: Fri Aug 7 03:52:08 2026 +0000 sched/core: Don't steal a proxy-exec donor [ Upstream commit 3dd95f077371f5def65a91c4bb13bd574a62bc3a ] try_steal_cookie() avoids stealing src->core_pick and src->curr before moving a task with the same cookie via move_queued_task_locked(). With proxy-exec, src->donor is the current scheduling context and may differ from src->curr. Stealing it migrates a task that the source rq still treats as current, leaving src's scheduler state for that task stale. For CFS this means cfs_rq->curr points at the stolen entity, and the next pick on the source rq hits the WARN_ON_ONCE in put_prev_entity(). Commit 7de9d4f94638 ("sched: Start blocked_on chain processing in find_proxy_task()") tweaked the fair class logic so that the donor task isn't migrated away while we're running the proxy. Do it similarly for try_steal_cookie() and skip src->donor as well. Fixes: 7de9d4f94638 ("sched: Start blocked_on chain processing in find_proxy_task()") Signed-off-by: Vasily Gorbik Signed-off-by: John Stultz Signed-off-by: Peter Zijlstra (Intel) Link: https://patch.msgid.link/20260807035232.1881495-3-jstultz@google.com Signed-off-by: Sasha Levin commit 7fb9247f5a8f482630dcf53e840312fb625e096f Author: Miklos Szeredi Date: Wed Aug 26 16:11:59 2026 +0200 fuse: fall back to copy_splice_read() on FOPEN_DIRECT_IO [ Upstream commit 10bd6b32965265688fa277d166ab224de8e86eb2 ] Yafang Shao reports: "After upgrading the kernel from 6.1.y to 6.18.y on production servers, some containers failed to read lxcfs data. The root cause is that our lxcfs is still at the old v3.0.4, which does not include commit 25982f5 ("Set the file size to 4k") [0]. Between 6.1.y and 6.18.y, the FUSE splice_read path was converted from generic_file_splice_read() to filemap_splice_read() by commit 2cb1e08985e3 ("splice: Use filemap_splice_read() instead of generic_file_splice_read()"). Unlike generic_file_splice_read(), filemap_splice_read() strictly checks i_size and refuses to read from zero-size files, which breaks virtual FUSE filesystems like the old lxcfs." Fix by using copy_splice_read() for the FOPEN_DIRECT_IO case, just like the VFS does for DAX and O_DIRECT files. Reported-by: Yafang Shao Closes: https://lore.kernel.org/all/20260706025705.58301-1-laoar.shao@gmail.com/ Reported-by: Changyuan Lyu Closes: https://lore.kernel.org/all/20260901213412.1763253-1-changyuanl@google.com/ Fixes: 2cb1e08985e3 ("splice: Use filemap_splice_read() instead of generic_file_splice_read()") Tested-and-acked-by: Yafang Shao Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin commit 6c0121495206b45136f62000b31696657586e10b Author: Jingbo Xu Date: Fri Jul 17 22:29:32 2026 +0800 fuse: don't bump attr_version for async direct read completion [ Upstream commit fc60668db85584da911e5d0a65c8698628f98bba ] The attr_version counter should only be incremented when cached attributes are actually modified (as documented in commit 1fb69e781729 ("fuse: fix race between getattr and write")). Async direct reads do not modify any cached inode attributes (size, mtime, ctime), so bumping attr_version in fuse_aio_complete() for reads is incorrect. This unconditional bump causes a livelock when auto_inval_data is enabled together with writeback_cache: fuse_cache_read_iter() issues a FUSE_GETATTR before every read, but by the time the response arrives, an async DIO read completion has already incremented fi->attr_version past the snapshot taken before the request. The GETATTR result is then discarded (attr_version race), fi->i_time is never refreshed, and every subsequent read triggers yet another GETATTR -- creating an infinite loop of useless round-trips. Fix this by only bumping attr_version for write completions, consistent with the synchronous DIO write path (fuse_write_update_attr) and the cached write path. Fixes: 01e9d11a3e79 ("fuse: add support of async IO") Reviewed-by: Horst Birthelmer Signed-off-by: Jingbo Xu Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin commit caa9d5b62426498bfbd2b51db4d492d1cf6b8ddd Author: Miklos Szeredi Date: Tue Aug 25 17:05:09 2026 +0200 fuse: don't fill in.h.pid in case args->nocreds is set [ Upstream commit 1642e6b6a6ae0dcf61280e1c3110eba62582d4d2 ] Commit 794e811d1443 ("fuse: split out filesystem part of request sending") alters the pid sent on force && nocreds requests. Previously these allocated a zeroed request and skipped fuse_force_creds(), so they went out with in.h.pid == 0. In fuse_fill_creds(), args->pid is now set before the nocreds early return, and fuse_args_to_req() copies it unconditionally - so writeback, release, and DESTROY requests now report the triggering (often kernel-worker) pid instead of 0. Move the nocreds check above setting args->pid. Also remove the WARN_ON(!args->nocreds) from the !args->force branch, since it's obviously not going to be triggered. Reported-by: David CARLIER Closes: https://lore.kernel.org/all/CA+XhMqye_NBihcadRTU=w4xAfrdY9rsMB3oHF5+bwHukkjHMoQ@mail.gmail.com/ Fixes: 794e811d1443 ("fuse: split out filesystem part of request sending") Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin commit 1de51e9071f989e3b6d1bb991bc75857b78e61df Author: Tao Cui Date: Wed Sep 2 10:48:12 2026 +0800 sched_ext/scx_flatcg: Make cgv_node_less() wraparound-safe [ Upstream commit bf2f23dc5a36237c0d4738966829e5cbde973c8a ] cgv_node_less() compares cvtimes with a plain <, which misorders once cvtime wraps: the wrapped node lands at the front of the tree while the unwrapped ones get stuck behind it. Each CPU picking a cgroup charges it a full slice, making wrap occur earlier than a naive estimate might suggest. Use time_before() instead. cgrp_cap_budget() bounds the lag behind cvtime_now, while the lead is bounded by the slice charge plus pending cvtime_delta on re-insertion, so the cyclic ordering assumptions of time_before() hold. Fixes: a4103eacc2ab ("sched_ext: Add a cgroup scheduler which uses flattened hierarchy") Reported-by: Sashiko Link: https://lore.kernel.org/r/3f1ce004-e259-4e72-a5f7-14a5050053bd@linux.dev Signed-off-by: Tao Cui Signed-off-by: Tejun Heo Signed-off-by: Sasha Levin commit 9ea7bdefe05019a5c7e835ac19031b9ec056e351 Author: Abdurrahman Karadag Date: Thu Aug 27 16:12:44 2026 +0300 wifi: rtw88: debugfs: don't vzalloc(0) when rsvd_page is read unconfigured [ Upstream commit 81510c3d6f2199889a4a936d8cf8b9e05911b10e ] Reading the rsvd_page debugfs entry before writing a page offset and count to it calls vzalloc() with a size of zero, because rsvd_page.page_num defaults to 0. vmalloc warns about this: WARNING: mm/vmalloc.c:4019 at __vmalloc_node_range_noprof+0x9ac/0xa30 ... Call Trace: __vmalloc_node_noprof+0x4c/0x70 rtw_debugfs_get_rsvd_page+0x4c/0x110 [rtw88_core] seq_read_iter+0x132/0x4b0 seq_read+0x12e/0x1c0 full_proxy_read+0x6f/0xc0 vfs_read+0xdd/0x490 rtw_fw_dump_fifo() would reject the zero size anyway, but only after the allocation. Check for a zero buffer size first and print a short usage hint instead of allocating. Fixes: e3037485c68e ("rtw88: new Realtek 802.11ac driver") Signed-off-by: Abdurrahman Karadag Acked-by: Ping-Ke Shih Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260827131244.35623-1-abdurrahmankaradag19@gmail.com Signed-off-by: Sasha Levin commit 079d882beb2f3be0416427fa098c28b4b461b20d Author: Dan Carpenter Date: Thu Aug 20 11:30:22 2026 +0300 wifi: mm81x: fix type bugs handling sdio_readl/writel() [ Upstream commit 37f018809909dfc99646b1b1f79c2b3968e7890a ] The sdio_readl() and sdio_writel() functions, instead of returning kernel error codes, instead stores the error codes in a parameter. These caller functions pass should pass an int pointer to store the error code but instead pass a signed long. This will not work on big endian systems. On little endian systems passing a ssize_t means negative error codes are converted to positive values near UINT_MAX. This doesn't cause a problem at runtime because in mm81x_sdio_reg32_write() the error codes are discarded and we always return -EIO. In mm81x_sdio_reg32_read() the high bits are truncated away so the positive value is re-converted back to negative and the code works as intended. Either way, passing an int is the correct thing and is a cleanup. Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Dan Carpenter Link: https://patch.msgid.link/aoa7Hj1W7ETOrOzO@stanley.mountain Signed-off-by: Lachlan Hodges Signed-off-by: Sasha Levin commit 9c749a763bee03b0ad4c4515cc54a3429f9266f9 Author: Gongwei Li Date: Wed Aug 26 11:19:59 2026 +0800 wifi: rtw89: coex: Fix wrong constant check of GPIO MUX signal [ Upstream commit fc17fd87d9f210850f81e547ee88eba89d6f2d50 ] In _fw_set_gpio(), the check for an invalid GPIO signal uses `sig == 0xff`. However, _get_gpiosig_for_ver() never returns 0xff. Both of its failure branches return BTC_DBG_NUM (defined as 32) when the requested signal is unsupported for the current firmware version. Check the result against BTC_DBG_NUM instead, the same as _show_gpio_dbg() already does. Fixes: 5c90259b9748 ("wifi: rtw89: coex: complete GPIO debug configuration handler") Signed-off-by: Gongwei Li Signed-off-by: Ping-Ke Shih Link: https://patch.msgid.link/20260826031959.2555359-1-13875017792@163.com Signed-off-by: Sasha Levin commit c60c79c7811226dd0bf91acd40536cd451dc23f9 Author: Dave Jiang Date: Fri Aug 28 14:57:26 2026 -0700 cxl/ras: Pass the PCI device's struct device to match_memdev_by_parent() [ Upstream commit 977eaad352bad4c4aac7cd15683800196c2ead57 ] cxl_cper_handle_prot_err() hands bus_find_device() the 'struct pci_dev' where match_memdev_by_parent() expects the embedded 'struct device'. The comparison never matches. The lookup always fails and CXL endpoint protocol errors reported via CPER are dropped without a trace event, leaving only the root port, downstream and upstream cases reporting. Pass &pdev->dev, and rename the callback parameter to match what it is. Fixes: 3c70ec71abda ("cxl/ras: Fix CPER handler device confusion") Reviewed-by: Alison Schofield Reviewed-by: Terry Bowman Link: https://patch.msgid.link/20260828215726.1077498-1-dave.jiang@intel.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 7de7bf8c7f8aeb67b2802337fb5485015c1de619 Author: Chris Morgan Date: Fri Aug 28 15:53:31 2026 -0500 arm64: dts: rockchip: Correct Device Orientation on Gameforce Ace [ Upstream commit 0d170ee38e7a943248082cdb4b3e40b45a96e2f6 ] The display, touchscreen, and IMU are currently not oriented consistently. The touchscreen is 90 degrees offset and the IMU is using the default mount matrix which is 180 degrees offset. Fix the touchscreen alignment and add a mount matrix for the IMU. When the device is held vertically relative to the display hardware, the touchscreen 0,0 position is in the top left corner of the display (next to the home button), and the IMU reads the correct orientation. Fixes: 4e946c447a04 ("arm64: dts: rockchip: Add GameForce Ace") Signed-off-by: Chris Morgan Link: https://patch.msgid.link/20260828205331.78185-1-macroalpha82@gmail.com Signed-off-by: Heiko Stuebner Signed-off-by: Sasha Levin commit c5b28fa97ba089db6a892e2af4bc6200ce451723 Author: Lizhi Hou Date: Tue Sep 1 09:01:29 2026 -0700 accel/amdxdna: Fix possible use-after-free when freeing device BO [ Upstream commit 6a1f6cb7593aebcdb4f9022410622128fb23b1a1 ] When the DRM file descriptor is closed, amdxdna_client_cleanup() frees the client structure. If device BOs are still alive, freeing them may access abo->client and result in a use-after-free. Move amdxdna_gem_heap_free(), which accesses abo->client, before clearing abo->client in the BO close callback. Also track the heap BOs referenced by device BOs so they can be accessed without dereferencing abo->client. Fixes: dbc8fd7a03cb ("accel/amdxdna: Add expandable device heap support") Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260901160129.3812405-1-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit b72123b1c3e750fe5c23c1639f55fe68d8e521cd Author: Lizhi Hou Date: Thu Aug 13 13:50:16 2026 -0700 accel/amdxdna: Fix unexpected wait when flushing notifier_wq [ Upstream commit 445d20910429b41e88768624b914344658991a5b ] In amdxdna_gem_obj_free(), flush_workqueue(xdna->notifier_wq) waits for all pending work items on the device-global notifier workqueue, rather than only the work items associated with the BO being freed. If another BO has a pending hmm_unreg_work, freeing an unrelated BO can be unnecessarily blocked until that work completes. mmu_interval_notifier_remove() is deferred to a workqueue because it cannot be called from the MMU notifier callback itself. The BO free path is not a notifier callback, so call mmu_interval_notifier_remove() directly there and avoid the workqueue. Fixes: e486147c912f ("accel/amdxdna: Add BO import and export") Reviewed-by: Max Zhen Signed-off-by: Lizhi Hou Link: https://patch.msgid.link/20260813205016.941743-1-lizhi.hou@amd.com Signed-off-by: Sasha Levin commit 55dc0a6e319ebe0034c4e669e02f46e846e09f91 Author: Boris Faure Date: Thu Aug 20 21:22:57 2026 +0000 soundwire: intel: initialise quirk_mask before reading it [ Upstream commit ee8a8cfe4e8d3c67456e554c988017c252710a25 ] sdw_master_read_intel_prop() declares quirk_mask without an initialiser and ignores the return value of fwnode_property_read_u32(). When a BIOS does not describe "intel-quirk-mask" for a link, the property read leaves the variable untouched and stack garbage decides whether SDW_INTEL_QUIRK_MASK_BUS_DISABLE is honoured, so the link may be marked hw_disabled at random. Initialise it to 0, matching is_link_enabled() in sound/hda/core/intel-sdw-acpi.c. Found by code inspection, not observed at run time. Fixes: 395713d8ca43 ("soundwire: intel: handle disabled links") Signed-off-by: Boris Faure Link: https://patch.msgid.link/20260820212220.226912-1-boris@fau.re Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin commit 6a949b38a3e42797e5e0fd511a2023be454cb16a Author: Davidlohr Bueso Date: Mon Aug 31 10:51:19 2026 -0700 cxl/test: Map mock device nodes to an online node [ Upstream commit 6f057dea152574dd044382fd0ba5ed19e3ecba25 ] cxl_type3_mem_init() and cxl_type2_mem_init() assign alternating NUMA nodes to the mock memdevs to model multi-node topologies. On a single-node host node 1 has no pgdat, and the first node-aware allocation in an odd device's probe faults on a NULL zonelist: Oops: general protection fault, probably for non-canonical address 0xdffffc00000006e3 KASAN: probably user-memory-access in range [0x0000000000003718-0x000000000000371f] Workqueue: async async_run_entry_fn RIP: __alloc_frozen_pages_noprof+0x288 new_slab ___slab_alloc __kmalloc_node_track_caller_noprof devm_kmalloc cxl_mock_mem_probe Map the requested node to an online one, as dax_hmem already does for its target node. Fixes: cf1f6877b088 ("cxl/memdev: Add numa_node attribute") Signed-off-by: Davidlohr Bueso Reviewed-by: Dave Jiang Reviewed-by: Alison Schofield Tested-by: Alison Schofield Tested-by: Shaikh Kamaluddin Reviewed-by: Gregory Price (Meta) Link: https://patch.msgid.link/20260831175119.3247915-1-dave@stgolabs.net Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit 412ff91ed136103bc87cd027f3c8893ad255add4 Author: Hans Zhang <18255117159@163.com> Date: Fri Aug 21 07:23:05 2026 +0800 PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs [ Upstream commit ce8034bb9c5c50f9f5c305856aff5d1c3efe3a30 ] Fix Clang -Wenum-compare-conditional warning by using a single u32 variable to hold the LTSSM status value, replacing two separate enum variables of different types. Fixes: d70e964dc099 ("PCI: cadence: Add LGA IP debugfs for LTSSM status") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202608201933.w2579mwx-lkp@intel.com/ Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam Reviewed-by: Aksh Garg Link: https://patch.msgid.link/20260820232305.80596-1-18255117159@163.com Signed-off-by: Sasha Levin commit b65017801ed2cae46af8af16d91b6bb9eccbcd55 Author: Jérémy Jean Date: Fri Aug 21 10:30:27 2026 +0000 microblaze: prevent ptrace writes to MSR and pt_mode [ Upstream commit 8518fd17ccef4a7d77877ccb0403b722106ad1a4 ] arch_ptrace() accepts PTRACE_POKEUSR for every aligned offset below PT_SIZE. This includes the saved machine status register and pt_mode, which are kernel-owned execution state rather than general registers. On return from an exception, rtbd copies MSR_UMS to the live MSR_UM bit. An unprivileged same-UID tracer can therefore clear MSR_UMS in its tracee's saved register frame and make the tracee resume in supervisor mode. pt_mode also controls whether later entry paths classify the frame as kernel or user state. Reject PTRACE_POKEUSR writes to both fields while retaining read access. Fixes: 2b4384542691 ("microblaze_v8: ptrace support") Assisted-by: Codex:gpt-5 Signed-off-by: Jérémy Jean Link: https://patch.msgid.link/20260821103026.3627292-2-Jeremy.Jean@oss.cyber.gouv.fr Signed-off-by: Michal Simek Signed-off-by: Sasha Levin commit abbb1324d352c6e194c3beb5032f1e5f66fb51f3 Author: Alexander A. Klimov Date: Tue May 26 20:40:59 2026 +0200 microblaze: CCF: fix refcount leak [ Upstream commit aeedf85beac51c7cd8f7bf4c918a0104dfdb8b78 ] Every value returned from of_clk_get() is supposed to be cleaned up via clk_put() once not needed anymore. Fixes: c1120542b99a ("microblaze: Add support for CCF") Signed-off-by: Alexander A. Klimov Link: https://patch.msgid.link/20260526184105.18962-4-grandmaster@al2klimov.de Signed-off-by: Michal Simek Signed-off-by: Sasha Levin commit 3fd0ae03bd0a2679d23516697a56c1b55bc0d09d Author: Jerome Brunet Date: Thu Jul 23 15:00:51 2026 +0200 clk: fix self-consuming provider module pinning [ Upstream commit a1c8d531c694e193dc48ef2428877d5ea2e35134 ] clk_hw_get_clk() lets a provider get a struct clk for one of its own struct clk_hw. When a struct clk is created, the module usage count of the provider is unconditionally increased. For a self-consuming provider, this means it pins itself and the module can never be unloaded. Increasing the module usage count should only be done when the consumer lives in a different module from the provider. Use THIS_MODULE to capture caller's module and increase the module usage count accordingly. It is OK for consumer-only APIs such as clk_get() or of_clk_get() to pass a NULL owner. As a result, any provider module will get pinned, same as before. Fixes: 30d6f8c15d2c ("clk: add api to get clk consumer from clk_hw") Signed-off-by: Jerome Brunet Signed-off-by: Brian Masney Signed-off-by: Sasha Levin commit 9e771e45fc5b29bc170bb8ae55d76d60987bfecd Author: Orgad Shaneh Date: Thu Aug 20 14:32:39 2026 +0300 staging: octeon: schedule the TX cleanup tasklet every 1024th packet [ Upstream commit db57f6517bf65523968ae29cd34a790bfa7d32af ] cvm_oct_xmit() means to schedule the cleanup tasklet once every 1024 packets, as its comment says, to cover the pathological case of heavy traffic on one port delaying the cleanup of another port blocked waiting for it. The test is inverted: total_to_clean & 0x3ff is true for 1023 of every 1024 values, and false only on the multiples of 1024. So the tasklet is scheduled on nearly every packet, and skipped on exactly the packet the comment wants. That costs one TASKLET softirq per transmitted packet, each walking every port and doing an FAU fetch-and-add per non-empty queue, and it buys nothing for this port, which already frees its completed skbs inline from the skb_to_free value it reads out of the FAU. Test the mask against zero. On a CN50XX board (2 cores at 300MHz) carrying ~6.9k transmitted packets/s, TASKLET softirqs drop from 7133/s to 597/s with no throughput change; the freeing work is conserved, so this removes softirq entries, not work. Fixes: 4898c560103f ("Staging: Octeon: Free transmit SKBs in a timely manner") Signed-off-by: Orgad Shaneh Reviewed-by: Dan Carpenter Link: https://patch.msgid.link/20260820113239.8169-1-orgads@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 590abeb642029b50aa427f7ef2ae59b881d63336 Author: Myeonghun Pak Date: Sat Aug 1 01:17:10 2026 +0900 staging: rtl8723bs: disable SDIO function on block size failure [ Upstream commit baa84b1bb1648506333fde3e66b6540f9d7d73cc ] sdio_init() enables the SDIO function before configuring the block size. If sdio_set_block_size() fails, the function jumps to the release path and returns the error without disabling the SDIO function. The caller then frees the dvobj directly, so the enabled SDIO function is left active on that probe failure path. Disable the SDIO function before releasing the host when block size configuration fails. This issue was identified during our ongoing static-analysis research while reviewing kernel code. Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Co-developed-by: Ijae Kim Signed-off-by: Ijae Kim Signed-off-by: Myeonghun Pak Reviewed-by: Dan Carpenter Link: https://patch.msgid.link/20260731161710.44828-1-mhun512@gmail.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin commit 924d9d9b23c21497fab541b5465b441e514efb6f Author: Rob Barnes Date: Mon Aug 31 18:51:26 2026 -0600 platform/chrome: cros_ec_proto: Fix deferred response [ Upstream commit c55749415623a58eba3eb527da023d29b43fbf5d ] When cros_ec_wait_until_complete() succeeds after an EC_RES_IN_PROGRESS status, it previously returned the 4-byte transfer size of EC_CMD_GET_COMMS_STATUS. For 0-byte payload commands (such as EC_CMD_FLASH_ERASE), userspace received 4 bytes instead of 0, causing response size validation errors. For commands expecting non-zero response payloads, the kernel exited without issuing EC_CMD_RESEND_RESPONSE, leaving response buffers uninitialized. Refactor cros_ec_wait_until_complete() to pass orig_msg, issue EC_CMD_RESEND_RESPONSE into orig_msg->data when insize > 0, and return 0 for 0-byte response commands. Fixes: 2c7589af3c4d ("mfd: cros_ec: add proto v3 skeleton") Signed-off-by: Rob Barnes Link: https://lore.kernel.org/r/20260901005126.3344929-1-robbarnes@google.com Signed-off-by: Tzung-Bi Shih Signed-off-by: Sasha Levin commit 5254160d7b6a72607297b66627a85e445c0c4e7a Author: Hongyan Xu Date: Thu Aug 6 14:05:40 2026 +0800 soc: qcom: apr: clean up failed service registrations [ Upstream commit 7dc14f37ca4ee35040c67c4b0180dd7b32079caf ] apr_add_device() publishes a service in svcs_idr before parsing the optional protection domain and registering the device. If device registration fails, put_device() frees the apr_device while its service remains in the IDR. A received packet can then dereference that stale entry. The property error path also leaves the service and allocation behind. Split device_register() into device_initialize() and device_add() so every pre-registration error can safely drop the device reference. Remove the service from the IDR on all failures after publication, then drain the RX workqueue before dropping the device reference. This prevents an in-flight lookup from outliving the device. Fixes: 6adba21eb434 ("soc: qcom: Add APR bus driver") Signed-off-by: Hongyan Xu Link: https://lore.kernel.org/r/20260806060541.820-1-getshell@seu.edu.cn Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit f743075ccd58791c4b33ce2d0391cefa79ac0e5e Author: Dan Carpenter Date: Thu Aug 13 10:09:21 2026 +0300 soc: qcom: smem: Fix signedness bug in smem_dram_parse() [ Upstream commit 22f129fedb153a17d80b1d883a7c4dd2417cf38e ] The "ver" variable is type "enum ddr_info_version". Enum types are dependent on the compiler but in practical terms here, "ver" is basically an unsigned int. It needs to be signed for the -EINVAL to be handled correctly. Fixes: 1d234eeafc56 ("soc: qcom: smem: Expose DDR data from SMEM") Signed-off-by: Dan Carpenter Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/an1toQ-acGR0kOWj@stanley.mountain Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit bacb95a608944137da05e53affc6e3ef57887cfd Author: Felix Gu Date: Wed Aug 26 01:08:40 2026 +0800 spi: omap2-mcspi: Remove unbalanced pm_runtime_put_sync() calls [ Upstream commit 5f01cb141169fe422c42279f7d502479b1ff9fd2 ] pm_runtime_put_sync() is called in the probe error path and in remove when nothing holds a runtime PM reference anymore, so it underflows the usage count. Fixes: 0e6f357a5deb ("spi: omap2-mcspi: Fix PM regression with deferred probe for pm_runtime_reinit") Signed-off-by: Felix Gu Link: https://patch.msgid.link/20260826-mcspi-v1-1-0a8dd7f6dd56@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit b8a72adc74e5a921f9188f879eb9b2a7dab5f829 Author: Ruoyu Wang Date: Fri Aug 14 21:41:43 2026 +0800 pwm: renesas-tpu: Fix runtime PM reference leak [ Upstream commit 62cff15fbf2b12ebbb0b01ca720030c2bc12aed1 ] tpu_pwm_timer_start() used pm_runtime_get_sync() without checking its return value before touching the TPU clock. A failed runtime resume was therefore ignored, and the callback continued into register access. Use pm_runtime_resume_and_get() and propagate a failed resume. Keep the matching put when clock preparation fails after a successful resume. tpu_pwm_disable() also needs to propagate a failed start so that the PWM apply callback does not access registers while runtime PM is inactive. This issue was found by a static analysis checker and confirmed by manual source review. Fixes: 99b82abb0a35 ("pwm: Add Renesas TPU PWM driver") Signed-off-by: Ruoyu Wang Link: https://patch.msgid.link/20260814134143.1388120-1-ruoyuw560@gmail.com Signed-off-by: Uwe Kleine-König Signed-off-by: Sasha Levin commit a4432b1398480edea04132e0e10f3d70a80cc0cd Author: David Heidelberg Date: Sun Aug 23 11:09:55 2026 +0200 ASoC: wcd-mbhc-v2: Fix incorrect properties names and typos [ Upstream commit 17bca5d55446c1e21944d47354ee2f0b80db36d6 ] Improves debugging experience. Fixes: 0e5c9e7ff899 ("ASoC: codecs: wcd: add multi button Headset detection support") Signed-off-by: David Heidelberg Link: https://patch.msgid.link/20260823-wcd-dt-typo-fix-v1-1-a71b458e0d31@ixit.cz Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 48181cf79f2a86658b687631e0ef84c913446a30 Author: Cai Xinchen Date: Tue Jul 7 08:06:15 2026 +0000 lsm: don't call security_backing_file_free() multiple times [ Upstream commit 3a84fc1a21577dbc8da7e4b6a49c9d8b07c07000 ] I found the following path: alloc_empty_backing-file init_file(&ff->file, xxx) -> file_ref_init(&f->f_ref, 1); // only 1 error = init_backing_file -> security_backing_file_alloc -> rc = call_int_hook(backing_file_alloc, ...) if (unlikely(rc)) security_backing_file_free(backing_file); // first call if (unlikely(error)) { fput(&ff->file); -> if (unlikely(file_ref_put(&file->f_ref))) // zero __fput_deferred(file); -> ____fput -> __fput -> file_free(file); -> backing_file_free(backing_file(f)); -> security_backing_file_free(&ff->file); // second call Currently, only SELinux has the lsm backing_file_alloc hook, and it always return 0. When security_backing_file_free is called for the first time, the blobs pointer is set to NULL. Therefore, double free will not occur in the code. Fixes: 6af36aeb147a ("lsm: add backing_file LSM hooks") Signed-off-by: Cai Xinchen [PM: subject line tweaks] Signed-off-by: Paul Moore Signed-off-by: Sasha Levin commit 450cde789b4b8e994371fc0514f54e0434f94c7e Author: Taniya Das Date: Sat Aug 1 19:43:52 2026 +0530 dt-bindings: clock: qcom: Add GCC video axi reset clocks for Nord [ Upstream commit 348a2ae162e5ec2dbab12c226b8240b8271ca444 ] The NW_GCC video axi reset clocks are required by the video SW driver to assert and deassert the clock resets during their power down sequence. Hence add these clock resets. Fixes: 06498d59bb4e ("dt-bindings: clock: qcom: Add Nord Global Clock Controller") Signed-off-by: Taniya Das Acked-by: Krzysztof Kozlowski Link: https://lore.kernel.org/r/20260801-nord_videocc_camcc-v2-1-674d7718e41f@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 267b476865d516ac5f80656b241ac1c9b56fd94f Author: Taniya Das Date: Thu Aug 6 16:04:08 2026 +0530 arm64: dts: qcom: milos: Add power-domains for camcc and videocc [ Upstream commit a21b23f7ec4d849db9044f83787a7939acb639dd ] The Milos camera and video clock controllers operate on the CX and MX power rails, and require these power domains along with their associated performance state votes to be specified for accessing the clock controller and its GDSC. Add the 'power-domains' and 'required-opps' properties to the camcc and videocc nodes. Fixes: d9d59d105f98 ("arm64: dts: qcom: Add initial Milos dtsi") Reviewed-by: Jagadeesh Kona Reviewed-by: Abel Vesa Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20260806-eliza-mm-cc-v9-v10-3-6ba52dd14343@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 700b2975b5cf62a179fd2d80931fa494cb773651 Author: Taniya Das Date: Thu Aug 6 16:04:07 2026 +0530 dt-bindings: clock: qcom,milos-videocc: Add missing power-domains support [ Upstream commit 3da90acddd2f211549032e9fdad40a5879803442 ] The Milos video clock controller requires the CX and MX power domains, along with their performance state votes, to be enabled before the clock controller can be accessed. Document the 'power-domains' and 'required-opps' properties and add them to the required properties list and example. Since these properties become required for the already-documented qcom,milos-videocc compatible, this is an ABI break for any devicetree using this binding without specifying them. Fixes: a4937e974186 ("dt-bindings: clock: qcom: document the Milos Video Clock Controller") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20260806-eliza-mm-cc-v9-v10-2-6ba52dd14343@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit aa628b1d776a4cf56d58e00cdeef0af0f4429c3f Author: Taniya Das Date: Thu Aug 6 16:04:06 2026 +0530 dt-bindings: clock: qcom,milos-camcc: Add missing power-domains support [ Upstream commit e0f335a4e17f5c80b24b8bd2060802bac072775c ] The Milos camera clock controller requires the CX and MX power domains, along with their performance state votes, to be enabled before the clock controller can be accessed. Document the 'power-domains' and 'required-opps' properties and add them to the required properties list and example. Since these properties become required for the already-documented qcom,milos-camcc compatible, this is an ABI break for any devicetree using this binding without specifying them. Fixes: dbb9d53b7197 ("dt-bindings: clock: qcom: document the Milos Camera Clock Controller") Reviewed-by: Krzysztof Kozlowski Signed-off-by: Taniya Das Link: https://lore.kernel.org/r/20260806-eliza-mm-cc-v9-v10-1-6ba52dd14343@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 206fabdec2299f3f5d5109fec7cc9584c14673d5 Author: Runyu Xiao Date: Tue Aug 18 18:12:01 2026 +0800 remoteproc: xlnx: Initialize mailbox work before requesting channels [ Upstream commit 5ca7dea7cb2e47f42c15ac7206c5e0cba23d292d ] zynqmp_r5_setup_mbox() installs zynqmp_r5_mb_rx_cb() as the mailbox RX callback before requesting the mailbox channels, but initializes ipi->mbox_work only after both channels have been requested. Once the RX channel is active, a notification delivered before the late INIT_WORK() would make the callback queue an uninitialized work item. Initialize the work item before requesting channels. Also drain the work before freeing the mailbox state, after the channels have been released so no new callbacks can queue it. Use the same drain before freeing ipi from the channel request error paths, since the callback is already published there as well. This issue was found by our static analysis tool and then confirmed by manual review of the mailbox setup sequence. The callback is published before the channel requests complete, so the work item should be ready before the mailbox provider can invoke it. A QEMU PoC modeled a mailbox notification delivered after the RX callback became reachable but before the delayed INIT_WORK(). DEBUG_OBJECTS reported queueing an uninitialized work item from the zynqmp_r5_setup_mbox() path. This is sent as an RFC because the practical trigger depends on the ZynqMP IPI mailbox provider and firmware delivery timing. If the provider cannot invoke the RX callback until after setup returns, this is a defensive lifecycle cleanup rather than a reachable race on current systems. Fixes: 5dfb28c257b7 ("remoteproc: xilinx: Add mailbox channels for rpmsg") Signed-off-by: Runyu Xiao Link: https://lore.kernel.org/r/20260818101201.1603947-1-runyu.xiao@seu.edu.cn Signed-off-by: Mathieu Poirier Signed-off-by: Sasha Levin commit 2850d37994f6036e3cd59ea616c73bb94da71a7b Author: Shaikh Kamaluddin Date: Mon Aug 24 19:19:57 2026 +0530 cxl/mce: Avoid alias page retirement for corrected errors [ Upstream commit 04a7b330c8b60dfff200d9a32dd6615f97b59d07 ] cxl_handle_mce() offlines the aliased page of an Extended Linear Cache (ELC) region for any MCE with a usable address in the region. This includes corrected errors, needlessly reducing usable memory. Skip ELC alias retirement when mce_is_correctable() identifies the reported error as corrected. Uncorrected errors with a usable address in the ELC region continue to retire the aliased page as before. mce_usable_address() already implements the per-vendor checks that determine whether the reported address is usable, so no separate memory-error classification is needed. On AMD, a corrected legacy bank 4 DRAM ECC error (XEC 8) reports a usable address and retired the aliased page before this change. Tested under QEMU with Intel Skylake-Server and AMD EPYC-Milan models. Fixes: 516e5bd0b6bf ("cxl: Add mce notifier to emit aliased address for extended linear cache") Signed-off-by: Shaikh Kamaluddin Reviewed-by: Alison Schofield Reviewed-by: Dave Jiang Link: https://patch.msgid.link/20260824134957.11085-1-shaikhkamal2012@gmail.com Signed-off-by: Dave Jiang Signed-off-by: Sasha Levin commit d0fa45cb8dc06c5f8f297490d070774c38dd731f Author: Shujath Mohd Date: Mon Aug 24 15:15:07 2026 +0530 arm64: dts: qcom: sdm845-sony-xperia-tama: Fix Bluetooth UART pinctrl [ Upstream commit cd0f33393882e2554d46e8e068ab95d00593f385 ] Use the 4-pin UART6 pinctrl configuration for the WCN3990 Bluetooth controller on Sony Xperia Tama devices. This enables the UART hardware flow control required for reliable Bluetooth communication at higher baud rates. Fixes: d54331131cde ("arm64: dts: qcom: sdm845-sony-xperia-tama: Add bluetooth") Fixes: 30a7f99befc6 ("arm64: dts: qcom: Add support for SONY Xperia XZ2 / XZ2C / XZ3 (Tama platform)") Signed-off-by: Shujath Mohd Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/PUZPR01MB51413F6FF89A8FA82A9B2755C3A02@PUZPR01MB5141.apcprd01.prod.exchangelabs.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 8c5908e76e2e235fcdc6e2618cf7c8ed1572e079 Author: Greg Ociepka Date: Wed Aug 12 10:35:22 2026 +0200 arm64: dts: qcom: glymur: Add missing USB clock, power and bandwidth votes [ Upstream commit 0f8d35f04a126fb17134728ec441a177a35babb5 ] The four USB3 controller nodes on Glymur (usb_0, usb_1, usb_2, usb_mp) are missing three property groups that Glymur's own usb_hs node at a200000 already carries, and that Hamoa (x1e80100) carries on all five of its USB controllers: - assigned-clocks / assigned-clock-rates - required-opps - interconnects / interconnect-names Without required-opps the controllers place no performance state vote on their power domain. Measured on an Asus Zenbook A16 (UX3607OA) with a SuperSpeed device enumerated, CX aggregates to SVS while the controllers run their master clock at 200 MHz: $ grep -E "^cx " /sys/kernel/debug/pm_genpd/pm_genpd_summary cx on 128 $ grep "usb30.*master_clk " /sys/kernel/debug/clk/clk_summary gcc_usb30_sec_master_clk ... 200000000 gcc_usb30_prim_master_clk ... 200000000 gcc_usb30_mp_master_clk ... 200000000 128 is RPMH_REGULATOR_LEVEL_SVS; rpmhpd_opp_nom is 256. With this patch applied the same measurement reads 256 while a controller is active. Without interconnects, dwc3_qcom_interconnect_init() silently does nothing: of_icc_get() returns NULL rather than an error pointer for a device without the property, so probe succeeds and icc_set_bw() on a NULL path is a no-op. No USB-DDR bandwidth is ever requested. Without assigned-clock-rates nothing programs the master clock RCG, which keeps whatever the bootloader left behind. On this machine that happens to be the correct 200 MHz, but ftbl_gcc_usb30_mp_master_clk_src also allows 66.67 and 133.33 MHz, neither of which sustains SuperSpeed. Add all three groups to the four nodes, mirroring usb_hs. The interconnect paths follow the provider layout in drivers/interconnect/qcom/glymur.c: usb_0/usb_1 sit on aggre4_noc, usb_mp on aggre3_noc and usb_2 on aggre2_noc. Fixes: 4eee57dd4df9 ("arm64: dts: qcom: glymur: Add USB related nodes") Assisted-by: Claude:fable-5 Signed-off-by: Greg Ociepka Reviewed-by: Konrad Dybcio Tested-by: Konrad Dybcio Reviewed-by: Abel Vesa Link: https://lore.kernel.org/r/20260812083522.774711-1-greg@ferrisoft.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 7571c0c4b9b438f7e074ae45a4e9bc11905f9af2 Author: Linmao Li Date: Thu Aug 27 10:04:47 2026 +0800 soc: qcom: smem: Fix byte order in v3 14-frequency parser [ Upstream commit 9f3136c0c5bcb26d5c864f8a5658c1a6f449d351 ] smem_dram_parse_v3_14freqs_data() uses the little-endian freq_khz field directly when scaling the frequency from kHz to Hz. This produces byte-swapped values on big-endian systems. Convert freq_khz to CPU byte order before using it, as the other DDR data parsers do. Fixes: 1d234eeafc56 ("soc: qcom: smem: Expose DDR data from SMEM") Signed-off-by: Linmao Li Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260827020447.2642830-1-lilinmao@kylinos.cn Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit a06c6604538ff6918d163cb2d5095ab001a57083 Author: Gopikrishna Garmidi Date: Thu Aug 27 01:13:17 2026 -0700 soc: qcom: smem: fix 32-bit overflow in DDR frequency calculation [ Upstream commit 7bb5f186784074f2a91d83e191e305238be47103 ] The DDR frequency in SMEM is reported in kHz and converted to Hz by multiplying it by 1000. Since the SMEM frequency value is a u32, using an unsuffixed integer constant causes the multiplication to be performed with 32-bit arithmetic. This overflows for DDR frequencies above 4294967 kHz, resulting in an incorrect frequency being reported through the SMEM DRAM interface. Use an unsigned long constant for the multiplication so the calculation is performed with 64-bit arithmetic on the supported Qualcomm platforms. Apply the fix consistently to the v3, v3.1, v4, v5, and v7 SMEM parsers. Fixes: 1d234eeafc56 ("soc: qcom: smem: Expose DDR data from SMEM") Signed-off-by: Gopikrishna Garmidi Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260827-glymur_dramc-v1-1-eba358d504b8@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 535f46e416829c8b6b0e96bc3e3b26b03d3c53cb Author: Anup Vishwakarma Date: Mon Aug 31 18:09:08 2026 +0530 remoteproc: qcom_q6v5_adsp: Fix double jiffies conversion in adsp_start() [ Upstream commit f559ef6316971fe39dc5f5edd6a483429ba03768 ] adsp_start() computes 5 * HZ, an already-converted jiffies count, and passes it into msecs_to_jiffies(), which expects milliseconds -- reinterpreting the value and shrinking the intended timeout. Every other caller (q6v5_start() in qcom_q6v5_mss.c, qcom_pas_start() in qcom_q6v5_pas.c) passes msecs_to_jiffies(5000) directly, matching qcom_q6v5_wait_for_start()'s kerneldoc, which documents @timeout as already being in jiffies. On CONFIG_HZ=250 this shrinks the intended 5 second timeout to ~1.25 seconds, causing a DSP that legitimately takes 2-3 seconds to signal ready to be spuriously torn down as a boot failure. Fix by passing msecs_to_jiffies(5000) directly, matching every other caller. Signed-off-by: Anup Vishwakarma Fixes: dc160e449122 ("remoteproc: qcom: Introduce Non-PAS ADSP PIL driver") Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20260831-b4-adsp_start_jiffies_fix_upstream-v1-1-9f8cf85ea220@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit 30480ba72602d4ee1708053881b9e3999d804dfc Author: Primoz Fiser Date: Mon Aug 31 07:12:22 2026 +0200 arm64: dts: imx8mp-phyboard-pollux-peb-av-10: Fix SAI master assignment [ Upstream commit 1c3f5701bc0ff5cbe56bdae76157047d47051d44 ] The dailink_master label was placed on the codec sub-node instead of the CPU sub-node, configuring the codec as I2S bitclock/frame master with SAI2 as slave. On this board, BCLK and LRCLK are wired the other way around: SAI2 must be bus master, with the codec as I2S slave. Move dailink_master to the CPU sub-node so SAI2 drives BCLK and LRCLK, fixing broken audio on the PHYTEC phyBOARD-Pollux-i.MX8MP board with PEB-AV-10 Audio/Video expansion board. Also remove the spurious clocks property from the codec sub-node, which had no effect in this topology. Fixes: 7012f551081f ("arm64: dts: imx8mp pollux: add expansion board overlay") Signed-off-by: Primoz Fiser Reviewed-by: Chancel Liu Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit f88f405a5fd50f3662424925e59bd7f94131843b Author: Abel Vesa Date: Mon Aug 31 12:11:36 2026 +0300 arm64: dts: qcom: glymur-crd: Mark the EC reset gpio as reserved [ Upstream commit 8ab228ebf968fe43afa55630fb98f1069828988e ] GPIO 65 from TLMM is used by the Embedded Controller as its reset line. Reserve it to prevent Linux from requesting or reconfiguring it. Fixes: 9314c6ecace1 ("arm64: dts: qcom: glymur: Enable Glymur CRD board support") Signed-off-by: Abel Vesa Link: https://lore.kernel.org/r/20260831-dts-qcom-glymur-crd-reserve-ec-reset-gpio-v1-1-4a9da88755d4@oss.qualcomm.com Signed-off-by: Bjorn Andersson Signed-off-by: Sasha Levin commit c1799966d70f59bbc692864784f81a67ec00e5b9 Author: Haibo Chen Date: Thu Jul 30 12:33:28 2026 +0800 arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names [ Upstream commit 47580f0648398f837aaa3019ba3b7437ed1dea1b ] Both the flexcan2 and flexcan5 CAN transceiver PHY nodes use the same node name "can-phy", which results in a node name collision. Distinguish them by using unit-less unique names "can-phy0" and "can-phy1". These two CAN PHYs share their silent pin, this shared GPIO can be handled by GPIO shared proxy. Signed-off-by: Haibo Chen Fixes: 9bdfeed989b1 ("arm64: dts: freescale: imx95: Add support for i.MX95 15x15 FRDM board") Signed-off-by: Frank Li Signed-off-by: Sasha Levin commit def2cf36a4101c4f4fe06caaae5f214d3bf88227 Author: Sven Peter Date: Sun Aug 30 16:22:09 2026 +0200 arm64: dts: apple: t6032: Fix cpus node indentation [ Upstream commit db6fccb5a4222ceb9c102a68f0e98a1e40b299af ] Drop the extra space indentation of the closing brace of the cpus node. Fixes: 67d9574cf8ed ("arm64: dts: apple: Initial T603[124] (M3 Max and Ultra) device trees") Reviewed-by: Janne Grunau Link: https://patch.msgid.link/20260830-b4-apple-dts-fixes-v1-3-cc20f8445754@kernel.org Signed-off-by: Sven Peter Signed-off-by: Sasha Levin commit 20bb93ab5a5fe81f6093d7937f23f794c9493a81 Author: Sven Peter Date: Sun Aug 30 16:22:08 2026 +0200 arm64: dts: apple: t6030: Fix cpus node indentation [ Upstream commit 1c7e2a0cfc902932da41a93202f196a2dab18b71 ] Drop the extra space indentation of the closing brace of the cpus node. Fixes: e81af013dbdd ("arm64: dts: apple: Initial T6030 (M3 Pro) device trees") Reviewed-by: Janne Grunau Link: https://patch.msgid.link/20260830-b4-apple-dts-fixes-v1-2-cc20f8445754@kernel.org Signed-off-by: Sven Peter Signed-off-by: Sasha Levin commit e917ae61e4c70fa6c4f2c4bb292501fecfacdd8c Author: Konrad Dybcio Date: Tue Aug 18 16:00:56 2026 +0200 dt-bindings: display: panel: samsung,s6e8aa5x01: Allow common properties [ Upstream commit c3fd78f0f3624fff3dcf55d89326f90000367596 ] Change additionalProperties to unevaluatedProperties to allow inheriting properties from panel-common.yaml, preventing this warning: qcom/sm6125-xiaomi-laurel-sprout.dtb: panel@0 (samsung,s6e8fc0-m1906f9): 'port' does not match any of the regexes: '^pinctrl-[0-9]+$' from schema $id: http://devicetree.org/schemas/display/panel/samsung,s6e8aa5x01-ams561ra01.yaml Fixes: f3e1caef597e ("dt-bindings: display: panel: document Samsung AMS561RA01 panel with S6E8AA5X01 controller") Signed-off-by: Konrad Dybcio Acked-by: Rob Herring (Arm) Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20260818-topic-sprout_panel_warn_fix-v1-1-ded1e8d5f121@oss.qualcomm.com Signed-off-by: Sasha Levin commit 4b72fd358d73186a1c8b81638c0109204dd884cc Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 14:00:22 2026 -0300 perf jitdump: Validate unwinding sizes against record payload [ Upstream commit 92d50319b4f0c0bbee8a236a09063272cd22faab ] jit_repipe_unwinding_info() copies unwinding_size and eh_frame_hdr_size from the jitdump record into jd-> fields without checking them against the actual payload size. Downstream, jit_add_eh_frame_info() in genelf.c computes unwinding_table_size = unwinding_size - eh_frame_hdr_size, which underflows when eh_frame_hdr_size > unwinding_size. The result is passed as d->d_size to libelf, causing an OOB heap read into the output ELF file. Validate that unwinding_size fits within the record payload and that eh_frame_hdr_size does not exceed unwinding_size before allocating or storing the values, so a bogus record cannot force a large allocation that is then discarded. mapped_size is likewise taken from the record and was narrowed into an int for the mmap2 len computation in jit_repipe_code_load() and jit_repipe_code_move(); values above INT_MAX would turn negative, producing a wrong mmap2 length. Use uint64_t for usize so the value cannot truncate. Fixes: 0284fecd13b6db3e ("perf jit: Add unwinding support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stefano Sanfilippo Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 127af7a937212ed1393e2e3761a1d9ae7f5e82a1 Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 13:59:06 2026 -0300 perf jitdump: Validate sym string NUL-termination in code load [ Upstream commit 98bfe1142ccbaa5ffdca5dcdddd26f238ad33585 ] jit_repipe_code_load() computes sym = (void *)jr + sizeof(jr->load) and passes it to jit_emit_elf() which calls strlen(sym) via jit_write_elf(). If code_size equals total_size - sizeof(jr->load), the sym pointer aliases the code blob with no NUL terminator, and strlen() scans past the buffer into adjacent heap memory. Add a memchr() check to verify the symbol name is NUL-terminated within the region between the load header and the code blob before use. Fixes: 598b7c6919c7bbcc ("perf jit: add source line info support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 3d82773b590738e2353727cebacab56097df4e93 Author: Arnaldo Carvalho de Melo Date: Wed Jun 17 13:52:15 2026 -0300 perf jitdump: Validate debug entries on native (non-swap) path [ Upstream commit 51e14e495f0cea061bbad33e7635f7fd857113ad ] The bounds-checking and nr_entry clamping added for the byte-swap path only runs when jd->needs_bswap is true. On native-endian files, nr_entry passes through unvalidated to jit_repipe_debug_info(), which stores it as jd->nr_debug_entries. Downstream, jit_process_debug_info() in genelf_debug.c iterates nr_debug_entries times via debug_entry_next(), which calls strlen() on each entry's name field — a crafted nr_entry causes OOB reads and writes. Add bounds-checked iteration in jit_repipe_debug_info() that validates each debug_entry fits in the payload and its name is NUL-terminated before calling debug_entry_next(). Clamp nr_debug_entries to the count of valid entries. Fixes: 598b7c6919c7bbcc ("perf jit: add source line info support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit b7935984bf9420c9af30e0200bfd11b343d2c51e Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:41:33 2026 -0300 perf jitdump: Use dirname() return value in jit_open() [ Upstream commit 4eddf7d9e341eb8c41704b8aa27b4a91f4e2c7c9 ] jit_open() calls dirname(jd->dir) but ignores the return value. POSIX says dirname() may return a pointer to internal static storage — glibc does this when the path has no '/', returning "." from a static buffer and leaving jd->dir unchanged with the original filename. Capture the return value and copy it back to jd->dir when dirname() returns a different pointer. Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit fefa1fdfe1957b09beb46456c7531da7f55f7c10 Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:39:32 2026 -0300 perf jitdump: Free event in jit_repipe_code_move() [ Upstream commit 7fc5851aac606b9e4143f6857710cc5f346770c5 ] jit_repipe_code_move() allocates a perf_event with calloc but never frees it — the 'out' label exits with only perf_sample__exit(). The sibling function jit_repipe_code_load() correctly calls free(event) at its out label. Add the same free(event) to jit_repipe_code_move(). Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 788ae653f201a427b17b1165a68dc0dda00d3074 Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:35:55 2026 -0300 perf jitdump: Fix funlockfile on unlocked stream in jit_open() error path [ Upstream commit bfde6848c1e24fd979d0138c57c1cc28c35093c3 ] If the malloc() for the initial read buffer fails, jit_open() jumps to the error label which calls funlockfile(jd->in). However, flockfile() is called later in the function, so at this point the stream was never locked. Calling funlockfile() on an unlocked stream is undefined behavior per POSIX. Split the error path into two labels: 'error' (after flockfile) calls funlockfile before cleanup, 'error_noflock' (before flockfile) skips the unlock. Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 958654a91f266c60c7bab310da89f0c712bb5934 Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:27:43 2026 -0300 perf jitdump: Check snprintf return before computing header size [ Upstream commit 0155f05ea6e133c18a04b8b5945cac59870da156 ] snprintf() returns the would-have-been length on truncation. When the jitted filename exceeds PATH_MAX, the unclamped 'size' value inflates sizeof(event->mmap2.filename) - size into a massive underflow, causing the header.size computation to write an oversized header. The subsequent write to 'id = event + header.size - idr_size' then corrupts the heap. Clamp size to PATH_MAX - 1 after snprintf in both jit_repipe_code_load() and jit_repipe_code_move(). Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit f64bf94dc7bf04c6d6a8ba3f5b35f65afee42842 Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:26:31 2026 -0300 perf jitdump: Bounds-check debug entry byte-swap loop [ Upstream commit ede3cd8151675c2983cd49104b1e9b25a3712ed8 ] The byte-swap loop for JIT_CODE_DEBUG_INFO uses array indexing (jr->info.entries[n]) to iterate debug entries. struct debug_entry has a flexible array member name[], so each entry has a different size. Array indexing computes offsets assuming fixed-size elements, landing inside variable-length name strings after the first entry and byte-swapping garbage. Additionally, nr_entry is read from untrusted jitdump input without validation against total_size, so a crafted value causes OOB reads. Replace the array indexing with debug_entry_next() pointer arithmetic (which correctly accounts for the variable-length name) and bounds-check each entry against the record's total_size before byte-swapping. Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit b729d4d73c825605e864e88da618bef3ce770148 Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:23:36 2026 -0300 perf jitdump: Prevent integer underflow in debug info size calculation [ Upstream commit dfe8fe96efca3c32979dc0859f88e15b677d25f1 ] jit_repipe_debug_info() and jit_repipe_unwinding_info() compute payload sizes by subtracting the fixed header size from total_size: sz = jr->prefix.total_size - sizeof(jr->info); When total_size is smaller than the header struct (from a truncated or corrupted jitdump record), the subtraction underflows to a massive value, causing an oversized allocation followed by an OOB memcpy. Validate that total_size covers at least the fixed header before the subtraction in both functions. Fixes: 598b7c6919c7 ("perf jit: add source line info support") Fixes: 0284fecd13b6 ("perf jit: Add unwinding support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Cc: Stefano Sanfilippo Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 1df4da456292d2e7296b5d4d6102cd6662eafb93 Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:22:12 2026 -0300 perf jitdump: Validate code_size against total_size in code load [ Upstream commit 06c7cf7a072fcd52e68471628c56630d2bdcc650 ] jit_repipe_code_load() reads code_size from the jitdump record and uses it to compute a pointer to the code blob: code = (unsigned long)jr + jr->load.p.total_size - csize; An oversized code_size underflows the pointer arithmetic, causing OOB reads into earlier heap memory. Validate that code_size fits within the record (total_size - sizeof(jr->load)) before the pointer computation. code_size is uint64_t but csize is int; values above INT_MAX wrap negative when narrowed into csize, which defeats the bounds check and sends the code pointer past the end of the record. Reject those too. Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 8ce6e33370071a82cce2b9af7a3b609b011b1049 Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 20:40:42 2026 -0300 perf jitdump: Fix debug_data and unwinding_data leaks [ Upstream commit 2bd967f3adcba1d3e54f10b0d8b25f950e4f03fd ] jit_repipe_debug_info() overwrites jd->debug_data without freeing the previous allocation. If two consecutive JIT_CODE_DEBUG_INFO records appear without an intervening LOAD record consuming the data, the first allocation leaks. The sibling jit_repipe_unwinding_info() already frees the old jd->unwinding_data before reassignment — add the same pattern to jit_repipe_debug_info() using zfree(). Also add cleanup of both buffers in jit_close() so they are freed when the jitdump session ends, even if no LOAD record consumed them. Fixes: 9b07e27f88b9 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 513c0b71080b9015667b550e8fdd3ad2ef56ddbe Author: Arnaldo Carvalho de Melo Date: Mon Jun 15 19:49:45 2026 -0300 perf jitdump: Fix extended header read that always fails [ Upstream commit 598e905931380f0714d5fd50cecfac615a1ec742 ] jit_open() sets bsz = bs before the fread() that uses bs - bsz as the read size, making the expression always evaluate to zero. fread() with size 0 returns 0, which triggers the ret != 1 error path — so extended jitdump headers (total_size > sizeof(header)) have been silently broken since the original implementation. Additionally, when 0 < bs <= bsz the if (bs > bsz) block is skipped entirely, leaving extended header bytes unread in the stream. Subsequent jit_get_next_entry() calls then parse those leftover bytes as a jr_prefix, corrupting the record stream. Fix by separating the buffer growth from the read: realloc only when bs > bsz, then unconditionally fread bs bytes when bs > 0. Fixes: 9b07e27f88b9cd78 ("perf inject: Add jitdump mmap injection support") Reported-by: sashiko-bot Reviewed-by: Ian Rogers Cc: Stephane Eranian Cc: Ian Rogers Cc: Namhyung Kim Assisted-by: LLM Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin commit 61407fe57765ca0517a2530958a49fdc1d120038 Author: Breno Leitao Date: Wed Aug 12 04:31:51 2026 -0700 kexec_file: stop the top-down search before it underflows [ Upstream commit c711461303af9f796b293b5ac06f49a885e46e71 ] locate_mem_hole_top_down() walks candidates downwards by subtracting PAGE_SIZE whenever the window conflicts with an existing segment or with an architecture exclude range. Nothing stops that subtraction at zero, so a search that reaches the bottom of the address space wraps temp_start around and continues. The walk starts inside the range being scanned and only moves down, so bail out once a candidate ends up above end. That covers every step in the loop rather than the subtractions alone, and it matches locate_mem_hole_bottom_up(), which already bounds its candidate on both sides. This is a better check than subtracting with check_sub_overflow(), given that we would have 3 subtractions in this block, and this single fix would take care of them all (instead of three check_sub_overflow()). Fixes: cb1052581e2b ("kexec: implementation of new syscall kexec_file_load") Signed-off-by: Breno Leitao Reviewed-by: Bradley Morgan Link: https://patch.msgid.link/20260812-kexec_posioned-v6-1-e477887086f0@debian.org Signed-off-by: Mike Rapoport (Microsoft) Signed-off-by: Sasha Levin commit ec8a653bd58841b3bff73f9225106ab08bdfb4d1 Author: Rosen Penev Date: Sat Aug 29 13:37:20 2026 -0700 ARM: dts: helios4: fix spi1 location [ Upstream commit 5df4320a30a87f9bb918ace7b389026917c8d896 ] This spi node is specified in armada-38x.dtsi with proper compatible strings whereas they are not present here. Instead of copy and pasting various lines, just reference the node in the dtsi. This dts seems to predate the move of spi from internal-regs to the soc node so this moves it in line there. Allows proper probing of SPI at runtime. Remove the microsom_spi1_cs_pins pinctrl group and its reference in &spi1. The group only muxed mpp59 to the "spi1" function, but that pin (SPI1 cs0) is already covered by spi1_pins, which selects the same function for mpp56-59 in armada-38x.dtsi. Fixes: ced8025b569e ("ARM: dts: armada388-helios4") Signed-off-by: Rosen Penev Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit b370db1cd69a1a734370545bf2d1d416c99a9e69 Author: Rosen Penev Date: Fri Aug 28 19:11:03 2026 -0700 ARM: dts: helios4: fix vbus-supply for USB2 PHY [ Upstream commit a132798a133e76a7bb575ba95b2b64eadd245438 ] The usb-nop-xceiv binding and driver use "vbus-supply"; the driver acquires the VBUS regulator via devm_regulator_get_exclusive("vbus") (phy-generic.c). The stale "vbus-regulator" name is never read by the driver and dtbs_check rejects it as an unknown property. Rename the property so reg_5p0v_usb is honored. Fixes: ced8025b569e ("ARM: dts: armada388-helios4") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit 63475d4c2487fe27f87f79ae82f95a66f22cea16 Author: Mahad Ibrahim Date: Wed Aug 19 16:17:38 2026 +0000 selftests/filesystems: Add .gitignore for fscontext_ns_test [ Upstream commit b573f7966695470dd9f5659d32681e7e2821d426 ] fscontext_ns_test is listed in TEST_GEN_PROGS and is built in the fscontext_ns directory, but the directory has no .gitignore. The binary is thus left untracked by git after being compiled. git status lists: Untracked files: (use "git add ..." to include in what will be committed) tools/testing/selftests/filesystems/fscontext_ns/fscontext_ns_test Every test directory must include a .gitignore which contains all the generated objects, as per the documentation and convention. Add .gitignore to ignore fscontext_ns_test. Fixes: d64ba78b749a ("selftests/filesystems: test completing a context from another user namespace") Signed-off-by: Mahad Ibrahim Link: https://patch.msgid.link/20260819161738.3517-1-mahad.ibrahim.dev@gmail.com Signed-off-by: Christian Brauner (Amutable) Signed-off-by: Sasha Levin commit 12eddb6d00650ed2a6e83bb6d22f25a156799b1a Author: Rosen Penev Date: Sun Aug 23 17:05:21 2026 -0700 ARM: dts: armada-388-helios4: fix vmmc property name [ Upstream commit 008e9faadef8c0aaa9b8a3ff05a2126e3c5b08b7 ] The sdhci@d8000 node references the 3.3V regulator through a bare "vmmc" property, which is not part of the mmc controller DT binding. The binding requires supply properties in the form "vmmc-supply", so the current entry is ignored by the driver. Rename the property to "vmmc-supply" so the fixed regulator is correctly wired up as the card power supply. Fixes: ced8025b569e ("ARM: dts: armada388-helios4") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit 76f2d68e2b950baf9985c31ff908c2889752a869 Author: Rosen Penev Date: Sun Aug 23 17:03:56 2026 -0700 ARM: dts: armada-395-gp: drop unsupported SDHCI clock-frequency [ Upstream commit a56183c7f15215d804290808a2b5a1fa997aa9cd ] The SDHCI node carries a "clock-frequency" property, but the marvell,armada-380-sdhci binding does not define it and dtbs_check rejects the node as a result. No driver consumes it either: only a few other sdhci-pltfm based drivers (imx, mcf, iproc, arasan, dwcmshc, xenon) read that property, while sdhci-pxav3 derives the maximum clock from the io clock rate. Remove the property. Fixes: 356645123581 ("ARM: dts: mvebu: armada-395-gp: add support for the Armada 395 GP Board") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit def451e2ce72322ba39c445e5b1cc8c6774c79e4 Author: Rosen Penev Date: Sun Aug 23 16:45:35 2026 -0700 ARM: dts: armada-385-clearfog-gtr: fix vmmc property name [ Upstream commit 337d10963f601d5a3dfb4b7aa273ca8c0b4d5172 ] The SDHCI node references the 3.3V regulator through a bare "vmmc" property, which is not part of the mmc controller DT binding; the correct property is "vmmc-supply". Fixes: aecc313490ae ("ARM: dts: mvebu: add support for SolidRun Clearfog GTR") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit c1ecba8bc9de66cd31c320b26cb3f92f5f2f131b Author: Rosen Penev Date: Sun Aug 23 16:43:26 2026 -0700 ARM: dts: helios4: fix lm75 supply name [ Upstream commit ef473a83c63e3173ac472e42727e990b923b99db ] The lm75 driver requests a regulator named "vs" (the +VS power pin of the chip). The Helios4 DTS incorrectly used vcc-supply instead of vs-supply, causing the regulator core to emit: lm75 0-004c: supply vs not found, using dummy regulator Fix the property name to match the binding and the driver. Fixes: ced8025b569e ("ARM: dts: armada388-helios4") Assisted-by: opencode:big-pickle Signed-off-by: Rosen Penev Signed-off-by: Gregory CLEMENT Signed-off-by: Sasha Levin commit 41ed49b8e341c4f1681da648fb4984662defc469 Author: Pei Xiao Date: Thu Jul 30 11:16:29 2026 +0800 ata: pata_parport: Fix use-after-free in new_device_store [ Upstream commit bd46a0b22933fb45f4ff009fa4a3836124df34b3 ] The function new_device_store() calls driver_find() without any protection against concurrent driver unregistration. This can lead to a use-after-free (UAF) when a driver is unloaded (via rmmod) in parallel with a new device addition via sysfs. The race window exists because driver_find() returns a pointer to the driver's private data, but does not increase its reference count. The caller is responsible for ensuring the driver remains valid, but new_device_store() did not hold any lock or reference during the lookup and subsequent use. Concurrently, pata_parport_unregister_driver() releases the pi_mutex before calling driver_unregister(), allowing new_device_store to proceed with a stale pointer after the driver has been freed. Fix this by expanding the critical section protected by pi_mutex in both functions: - In new_device_store(): acquire pi_mutex before calling driver_find(), and keep it held until all uses of the found driver pointer are completed. - In pata_parport_unregister_driver(): hold pi_mutex throughout the entire unregistration process, including the driver_unregister() call, so that no concurrent lookup can see a partially removed driver. Thread A (new_device_store) | Thread B (pata_parport_unregister_driver) driver_find("ate") | | mutex_lock(&pi_mutex) | idr_remove(&protocols, id) | mutex_unlock(&pi_mutex) | driver_unregister(&pr->driver) | (frees driver_private) /* continues using stale driv */| -> UAF! | Logs: BUG: KASAN: slab-use-after-free in driver_find+0xd0/0xd4 Read of size 8 at addr ffffff9f970dc690 by task sh/4737 Call trace: show_stack+0x14/0x1c (C) dump_stack_lvl+0x70/0x84 print_report+0xf4/0x5a4 kasan_report+0xa0/0xe4 __asan_report_load8_noabort+0x18/0x20 driver_find+0xd0/0xd4 new_device_store+0x140/0x30c [pata_parport] bus_attr_store+0x5c/0x94 sysfs_kf_write+0x1c4/0x25c ... Allocated by task 4734: kasan_save_stack+0x28/0x4c kasan_save_track+0x1c/0x34 kasan_save_alloc_info+0x3c/0x4c __kasan_kmalloc+0x98/0xac __kmalloc_cache_noprof+0x158/0x3cc bus_add_driver+0x70/0x4d8 driver_register+0xf0/0x3b0 pata_parport_register_driver+0xb8/0x1c4 [pata_parport] 0xffffffc07f5ce014 do_one_initcall+0xb8/0x36c do_init_module+0x230/0x6d4 ... Freed by task 4737: kasan_save_stack+0x28/0x4c kasan_save_track+0x1c/0x34 kasan_save_free_info+0x48/0x8c __kasan_slab_free+0x5c/0x84 kfree+0x174/0x3e0 driver_release+0x1c/0x7c kobject_put+0x178/0x47c driver_find+0x78/0xd4 new_device_store+0x140/0x30c [pata_parport] bus_attr_store+0x5c/0x94 sysfs_kf_write+0x1c4/0x25c ... Fixes: 246a1c4c6b7f ("ata: pata_parport: add driver (PARIDE replacement)") Reported-by: Shuangpeng Bai Closes: https://lore.kernel.org/lkml/20260728024015.2014674-1-shuangpeng.kernel@gmail.com/ Signed-off-by: Pei Xiao Link: https://lore.kernel.org/r/77dad1184ebd0e1e7ea541d4207568f8bc5ec01f.1785381141.git.xiaopei01@kylinos.cn Signed-off-by: Niklas Cassel Signed-off-by: Sasha Levin commit dd79f72d206aa69332cc16cd0e4680c3d98b01d7 Author: Lucas Tanure Date: Sat Aug 29 10:47:55 2026 +0100 clk: meson: t7: keep the memory fabric clocks running [ Upstream commit 43e1705ecab981c66baee89041e6f728c0436f19 ] Four clocks feed the bus that moves data between the peripherals and memory. Nothing in Linux claims them, so they were switched off shortly after boot, and any device that started a transfer after that point simply stopped. The SD card, which comes up about two seconds in, never finished reading its identification. There is no device these clocks belong to, so mark them as always needed. Fixes: fab4d651b592 ("clk: meson: t7: add t7 clock peripherals controller driver") Assisted-by: Claude:claude-opus-5 Signed-off-by: Lucas Tanure Link: https://patch.msgid.link/20260829094758.23248-2-tanure@linux.com Signed-off-by: Jerome Brunet Signed-off-by: Sasha Levin commit a4a85a3bdd57fc5f01810fdcd50fb77ffd727601 Author: Matti Vaittinen Date: Mon Aug 10 10:53:07 2026 +0300 iio: pressure: rohm-bm1390: Fix AVE_NUM initialization [ Upstream commit 64f4173ad1a7f1b247296c84e624f5095be170c7 ] The BM1390 tries to initialize the AVE_NUM to 110b at the start-up. The field location is not taken into account, and value is written unsifted. This causes the AVE_NUM to be initialized to zero. Use FIELD_PREP() to shift the intended AVE_NUM value to correct field. Signed-off-by: Matti Vaittinen Fixes: 81ca5979b6ed ("iio: pressure: Support ROHM BU1390") Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit ca437a784322ad306f6433bb894fb2c20a13ea5e Author: Salah Triki Date: Sun Aug 23 05:23:00 2026 +0100 iio: temperature: tmp117: fix calibbias cache update on I2C write failure [ Upstream commit 61fff9cebbfdf39bbd04d366882476d1def14047 ] The calibbias cache (data->calibbias) was updated before the I2C write to TMP117_REG_TEMP_OFFSET was known to succeed. If the write failed, the function correctly returned an error, but the driver's internal cache had already been updated to the new value. This causes the cache and the actual hardware register to go out of sync: a subsequent write of the same value would be silently skipped by the early "if (off == data->calibbias) return 0;" check, since the cache matches even though the register was never successfully updated. Update data->calibbias only after confirming the I2C write succeeded, so the cache always reflects the actual state of the device. Found by code inspection. Fixes: df041e737a38 ("iio: temperature: add driver support for ti tmp117") Signed-off-by: Salah Triki Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit e78b2c1b9e5c60ffaa2b4f6a6e57fe8997f4b37f Author: Esben Haabendal Date: Mon Aug 17 19:08:51 2026 +0200 dt-bindings: iio: light: ltr501: Add missing ltr303 compatible [ Upstream commit 198ed7962e42f1e45b7f48b9abc70aad9e3185f8 ] When support for ltr303 was back in 2021, the bindings documentation was not updated accordingly. Fixes: 7d71d289e1ba ("iio: light: ltr501: Added ltr303 driver support") Acked-by: Krzysztof Kozlowski Acked-by: Kuppuswamy Sathyanarayanan Signed-off-by: Esben Haabendal Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit e1d4ab77c172bb1d39fddf321cd4790452e7c1f4 Author: Esben Haabendal Date: Mon Aug 17 19:08:50 2026 +0200 dt-bindings: iio: light: ltr501: Sort compatible enum array [ Upstream commit 6c430006fbcb63dc8baee3c3bf356b264ba7f61e ] Restore alphabetical sorting of the properties.compatible.enum array. Acked-by: Krzysztof Kozlowski Acked-by: Kuppuswamy Sathyanarayanan Signed-off-by: Esben Haabendal Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron Stable-dep-of: 198ed7962e42 ("dt-bindings: iio: light: ltr501: Add missing ltr303 compatible") Signed-off-by: Sasha Levin commit 64bc7075c11e0eb5e1285c8f2cfa9aeec3d892de Author: Adi Nata Date: Thu Aug 13 23:31:25 2026 +0800 iio: humidity: hts221: report available values via read_avail() [ Upstream commit 003e99cf33e344a380ba10b3e04ccb862f3d9dc3 ] Replace the custom oversampling_ratio_available sysfs attributes with the standard IIO read_avail() callback. This lets the IIO core create and format *_available attributes and exposes the lists to in-kernel consumers. As a consequence, the incorrectly named in_humidity_oversampling_ratio_available attribute is replaced by the standard in_humidityrelative_oversampling_ratio_available name for the IIO_HUMIDITYRELATIVE channel. The temperature oversampling and sampling frequency available attribute names are unchanged. Fixes: e4a70e3e7d84 ("iio: humidity: add support to hts221 rh/temp combo device") Signed-off-by: Adi Nata Reviewed-by: Andy Shevchenko Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin commit 6c10280701b8c839c75fa187520f2c32c911ccd6 Author: Pengpeng Hou Date: Sun Aug 30 22:01:33 2026 +0800 spi: sh-msiof: propagate setup runtime-PM errors [ Upstream commit 152867998da9f331d6235d76aae1c7e1650708a9 ] sh_msiof_spi_setup() ignores pm_runtime_get_sync() before programming native chip-select registers and marking the configuration initialized. Use the checked runtime-PM helper and return failure before register access. Fixes: 7ff0b53c4051 ("spi: sh-msiof: Avoid writing to registers from spi_master.setup()") Signed-off-by: Pengpeng Hou Link: https://patch.msgid.link/20260830140133.24156-1-pengpeng@iscas.ac.cn Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 8eb49d677eeedc90470514fcf0f3d03db87480ce Author: Chandradhar Kumar Date: Sat Aug 22 12:25:19 2026 +0530 regulator: fixed: reject incompatible platform devices [ Upstream commit f7396c2dbbc1bed6c2c554d1ddf80d16e4780a7d ] The fixed regulator driver expects non-DT platform devices to provide their configuration through platform_data as a struct fixed_voltage_config. An explicitly bound driver can bypass the normal platform device/driver matching and attach the fixed regulator driver to an unrelated platform device. This causes the driver's platform_data to be interpreted as a struct fixed_voltage_config even though it contains data for a different device. Reject non-DT platform devices whose name does not match the fixed regulator driver before accessing their platform data. Fixes: 4b74ff651249 ("regulator: add support for fixed regulators.") Reported-by: syzbot+bfc9e55cf4f98183c636@syzkaller.appspotmail.com Closes: https://syzbot.org/bug?extid=bfc9e55cf4f98183c636 Signed-off-by: Chandradhar Kumar Link: https://patch.msgid.link/20260822065519.112441-1-chandradhar.2003@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit 3f95b74099f61c74f13d9d2fc381894edb28afc0 Author: Ihor Solodrai Date: Fri Aug 28 14:52:07 2026 -0700 bpftool: Don't drop a type in the sorted C dump [ Upstream commit ff01f88a91368c264efb071c13f2b27b4d5c1d2b ] The C dump sorts types by default, so that generated headers are diffable. The sorted dump emits one type fewer than the unsorted dump of the same BTF. dump_btf_c() starts its loop at index 1 to skip the void type at BTF type ID 0. That holds for the unsorted dump, where the array index is the type ID, but not after qsort(): position 0 is then the lowest ranked type, and btf_type_rank() ranks an anonymous enum 0 while void takes the default rank of 10. So the enum is skipped, and void is emitted instead as a no-op. Fixes: 94133cf24bb3 ("bpftool: Introduce btf c dump sorting") Acked-by: Eduard Zingerman Signed-off-by: Ihor Solodrai Link: https://lore.kernel.org/r/20260828215207.3105313-7-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin commit 3acb86bdf4d7087824e91dc4f6a6c7fd88542f54 Author: Ihor Solodrai Date: Fri Aug 28 14:52:06 2026 -0700 selftests/bpf: Add tests for bpftool btf dump format c [ Upstream commit 438147f7f60104a228fb506352bc8bbae53b1efd ] "bpftool btf dump format c" generates the vmlinux.h that BPF programs are built against, and it has no test coverage at all. The only in-tree consumers are build systems. Building against the header only catches what a compiler rejects, which is insufficient. Introduce a bpftool_btf_dump selftest. Dump a small hand-built BTF and compare the output against committed expectations. The BTF is assembled with btf__add_*() rather than compiled from BPF C because the fixture needs a 4-byte "long int". That is what makes bpftool render the hole in struct holey as a pair of "long: 32;" bitfields. A BPF target is always 64-bit, so a compiled fixture could not supply it. Comparing the whole dump makes every change to a generated header show up in a patch. Signed-off-by: Ihor Solodrai Link: https://lore.kernel.org/r/20260828215207.3105313-6-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov Stable-dep-of: ff01f88a9136 ("bpftool: Don't drop a type in the sorted C dump") Signed-off-by: Sasha Levin commit 7f738b9380334c970825377549cdec0c2ae0c491 Author: Ihor Solodrai Date: Fri Aug 28 14:52:05 2026 -0700 selftests/bpf: NUL-terminate bpftool command output [ Upstream commit 4f8a4c76f6704667111d76404bdea4fef0373358 ] run_command() writes a bpftool command's output into a caller-supplied buffer, and every caller treats that buffer as a C string. However fread() reports a byte count and doesn't terminate the string. The helper does not terminate either, so callers have to zero the buffer first. prog_tests/bpftool_metadata.c does not, for example. Read one byte less and terminate in the helper. Fixes: f21fae577446 ("selftests/bpf: Add a few helpers for bpftool testing") Acked-by: Eduard Zingerman Signed-off-by: Ihor Solodrai Link: https://lore.kernel.org/r/20260828215207.3105313-5-ihor.solodrai@linux.dev Signed-off-by: Alexei Starovoitov Signed-off-by: Sasha Levin commit 88b7cfa2a0d07bf129eb4c5a7d0518052fbfbf0f Author: Raag Jadav Date: Tue Aug 18 19:22:05 2026 +0530 drm/ras: Cancel and free message on get counter failure [ Upstream commit 9cc19bb8f2f6886392b9185b96bbef91b2f1a50f ] doit_reply_value() directly returns on get counter failure, which results in stale sk_buff and genetlink header that aren't cleaned up. Fix it and while at it, consolidate error handling using goto. Fixes: c36218dc49f5 ("drm/ras: Introduce the DRM RAS infrastructure over generic netlink") Signed-off-by: Raag Jadav Reviewed-by: Riana Tauro Link: https://patch.msgid.link/20260818135304.497098-2-raag.jadav@intel.com Acked-by: Maarten Lankhorst Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin commit 22bbee9a777a1a7baf344c3dc69329c72d0453e0 Author: Leon Hwang Date: Wed Aug 26 22:56:13 2026 +0800 selftests/bpf: Avoid flaky resize value test for percpu data [ Upstream commit 5e875ae9e9ffd5c76c6bdf8982f99de340dd46af ] The bpf_map__set_value_size() test for percpu data relies on the tail 'cpu_id' field in the ".percpu" map. The test would fail, when 'cpu_id' is not the last field in the map. To avoid the flaky test, factor out a subtest to use a dedicated ".percpu.arr" map that only has one field 'int arr[1]'. And, skip the subtest when fail to load skel with errno E2BIG and the new value size is larger than ALIGN(32KiB, PAGE_SIZE). And, drop 'args' in test_percpu_data_on_cpus(), which isn't used in bpf prog side. And, enhance the test to cover 'set' and 'nums[6]'. Fixes: 4c9241bd731a ("selftests/bpf: Add tests to verify global percpu data") Signed-off-by: Leon Hwang Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260826145613.34182-1-leon.hwang@linux.dev Signed-off-by: Sasha Levin commit 987e6bef2b4a82be8c6f698161bc5170d6a5de23 Author: Yuan Chen Date: Mon Aug 24 17:26:56 2026 +0800 bpftool: Fix spurious batch file read error [ Upstream commit 713c02b59e21840f623a3e31c43d967026c75181 ] do_batch() checks errno after the read loop to detect read failures, but fgets() does not clear errno on success, so a stale errno left by a previously executed command (e.g. map dump's EBADF from a double close) makes bpftool report a batch file read failure and exit with an error even though every command succeeded. Clear errno before each fgets() call, so the post-loop check only sees the outcome of the last read: zero on success or EOF, E2BIG for an overlong line, and a genuine errno when fgets() fails. Since errno is now reset before every read in batch mode, drop the USE_LIBCAP errno reset in main() that existed only to keep errno clean for the batch mode. Fixes: 71bb428fe2c1 ("tools: bpf: add bpftool") Signed-off-by: Yuan Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260824092657.1789956-2-chenyuan_fl@163.com Signed-off-by: Sasha Levin commit 72fbd88a0ac489a593b6bb54f37ae1f4d110cff6 Author: Harry Wentland Date: Fri Aug 14 17:18:08 2026 -0400 drm/vkms: Fix limited-range YCbCr to RGB conversion scaling [ Upstream commit 8af5fccd9e8af443efd6f0fec5ba56366f57309a ] The limited-/studio-range YCbCr to RGB conversion matrices were generated with colour.matrix_YCbCr(is_legal=True, bits=8), which normalises the narrow range by 2^bits (256 for 8-bit) rather than by the full-range maximum 2^bits - 1 (255). As a result the luma scale was 256/219 and the chroma scale 256/224 instead of the correct 255/219 and 255/224. This over-scales every limited-range conversion by a factor of 256/255, producing an error of up to ~3/255 (8-bit) and causing IGT tests that compare software-computed surfaces against VKMS-processed ones to fail. Recompute the three limited-range matrices from first principles rather than relying on colour's is_legal scaling: 1. Start from the standard ITU-R YCbCr -> RGB relations for the luma weights Kr, Kb (Kg = 1 - Kr - Kb) of each encoding (BT.601, BT.709 and BT.2020 non-constant luminance). These are the same relations that produce the existing full-range matrices. 2. Expand the studio input range to full range relative to a full-range maximum of 2^n - 1: the luma coefficient by 255/(235 - 16) and the chroma coefficients by 255/(240 - 16). This matches the DRM UAPI definition and IGT's igt_ycbcr_to_rgb_matrix(). 3. Convert each coefficient to S31.32 fixed point (round(coeff * 2^32)). Update the limited-range reference values in the vkms-format KUnit test accordingly. Provide a python script to show how the kunit test value are calculated. Fixes: fe22d21e9342 ("drm/vkms: Add YUV support") Assisted-by: Copilot:claude-opus-4.8 Signed-off-by: Harry Wentland Reviewed-by: Alex Hung Tested-by: Robert Mader Link: https://patch.msgid.link/20260814211816.1219597-3-harry.wentland@amd.com Signed-off-by: Sasha Levin commit 4ed1307c0554510ba6ac4227c7b0b5c25c5dfc3f Author: Tapio Reijonen Date: Tue Aug 25 04:15:57 2026 +0000 gpio: pcf857x: implement get_direction() [ Upstream commit ed14364ae8c310cc3f3f649ffcbc7f82befe1579 ] The GPIO core warns (and taints the kernel) when a gpiochip lacks .get_direction() and a consumer queries a line's direction, for example via /sys/kernel/debug/gpio. pcf857x provided direction_input/output but no get_direction. These quasi-bidirectional expanders cannot report direction in hardware, and the 'out' software latch alone is ambiguous - a released (input) line and an output driven high both read back as a set bit. Track the direction explicitly in a 'dir' latch updated by the direction_input(), direction_output() and set_multiple() paths, and return it from get_direction(). Initialise it from the same reset state as 'out': released lines are inputs, lines flagged in the power-on latch are driven-low outputs. Fixes: 15fae37d9f5f ("gpiolib: pcf857x i2c gpio expander support") Signed-off-by: Tapio Reijonen Reviewed-by: Linus Walleij Link: https://patch.msgid.link/20260825-b4-gpio-pcf857x-get-direction-v1-1-de15996ae354@vaisala.com Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin commit b38ed9f0fbb1cb67e7d1316956225a9957e126f6 Author: Srinivasan Shanmugam Date: Mon Aug 10 11:08:15 2026 +0530 drm/amd/pm: Remove unused functions in smu_v15_0 [ Upstream commit f65ae77aac72caed6d99c7d73f16b71cebbc6753 ] smu_v15_0_load_microcode() and smu_v15_0_set_single_dpm_table() are not called anywhere; the latter is a carry-over from a previous version. The static helpers smu_v15_0_get_dpm_freq_by_index(), smu_v15_0_get_dpm_level_count() and smu_v15_0_get_fine_grained_status() were only called from smu_v15_0_set_single_dpm_table(), so remove those as well. Remove all functions along with their declarations from the header. Fixes: c7fc0f372374 ("drm/amd: Enable SMU 15_0_0 support") Fixes: f7bee962d92a ("drm/amd/pm: Update dpm table structs for smu_v15_0") Reported-by: Dan Carpenter Suggested-by: Lijo Lazar Cc: Alex Deucher Cc: Christian König Cc: Asad Kamal Signed-off-by: Srinivasan Shanmugam Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin commit a97614f8cd83bf24405b7f1d79377896eb379db3 Author: Jiayuan Chen Date: Tue Aug 25 23:04:33 2026 +0800 libbpf: Fix usdt attach failure when nop10 crosses page boundary [ Upstream commit 8b94878b2572f0f41e6002d0fe2cc4086ddc2a47 ] The kernel refuses to attach to a nop10 that crosses a page boundary, since it can't be atomically rewritten: /* can_optimize(), arch/x86/kernel/uprobes.c */ /* We can't do cross page atomic writes yet. */ return PAGE_SIZE - (vaddr & ~PAGE_MASK) >= OPT_INSN_SIZE; Whether the nop10 crosses a page is purely up to the binary layout, so this does happen in practice. libbpf doesn't check for it and blindly shifts the uprobe onto the nop10, and the attach then fails with -ENOTSUPP. Just keep the uprobe on the preceding 1-byte nop in that case, it works everywhere as a regular int3 uprobe. Fixes: ee2862439e5c ("libbpf: Change has_nop_combo to work on top of nop10") Signed-off-by: Jiayuan Chen Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260825150444.31603-1-jiayuan.chen@linux.dev Signed-off-by: Sasha Levin commit 589278b9f5b5a9d16357f9dc703d5911165e43a9 Author: Kumar Kartikeya Dwivedi Date: Sun Aug 23 21:32:00 2026 +0200 bpf: Reject oversized stream read buffers [ Upstream commit ea0b60fae724aa1147d4a07eda5131d3a9a9977e ] BPF_PROG_STREAM_READ_BY_FD exposes stream_buf_len as a u32, but the internal stream reader accepts an int. Values above INT_MAX therefore become negative before bpf_stream_read(), producing negative consumption lengths. The generic usercopy size check prevents the oversized copy, but emits a warning and reports EFAULT for an unchecked argument. Change bpf_prog_stream_read() to accept u32 and reject values that the signed reader cannot represent. Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams") Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Daniel Borkmann Link: https://lore.kernel.org/bpf/20260823193202.2389715-2-memxor@gmail.com Signed-off-by: Sasha Levin commit 4ce468e1f979bdfd478c05a365924ac0f63725c7 Author: Nicolas Frattaroli Date: Wed Aug 12 16:07:20 2026 +0200 drm/panthor: Take reqs_lock in soft_reset for clearing pending_reqs [ Upstream commit 2d354adc5bbabe2e818be09bbe13f6bfde4a30c7 ] panthor_gpu_soft_reset() sets pending_reqs to 0 without taking the requisite reqs_lock. Fix this by taking the lock for the duration of the modification. Fixes: 5cd894e258c4 ("drm/panthor: Add the GPU logical block") Reviewed-by: Boris Brezillon Signed-off-by: Nicolas Frattaroli Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Signed-off-by: Liviu Dudau Link: https://patch.msgid.link/20260812-panthor-cache-flush-fix-v4-3-751e32901898@collabora.com Signed-off-by: Sasha Levin commit b10fbd1cf431b98b2b9166dae14ac153fea6f1c8 Author: Nicolas Frattaroli Date: Wed Aug 12 16:07:19 2026 +0200 drm/panthor: Revisit reqs_lock handling in flush/reset paths [ Upstream commit 4fd08b3d1da78e33cb5939f0086e61f9d660cd6c ] panthor_gpu_flush_caches() and panthor_gpu_soft_reset() acquire their reqs_lock spinlock with the IRQ-disabling variants of the spinlocking functions. This isn't necessary, as the lock is never taken from an atomic context, as Panthor uses threaded interrupt handlers. The result of this overly strict locking is that IRQs may be disabled more frequently and for longer than they should be, resulting in increased system latency. Switch the locking to use non-IRQ-disabling scoped_guard statements for locking. The wait_event_timeout read of pending_reqs outside of the spinlock is fine as wait_event_timeout is a memory barrier according to the Linux Memory Model. Fixes: 5cd894e258c4 ("drm/panthor: Add the GPU logical block") Reviewed-by: Boris Brezillon Signed-off-by: Nicolas Frattaroli Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Signed-off-by: Liviu Dudau Link: https://patch.msgid.link/20260812-panthor-cache-flush-fix-v4-2-751e32901898@collabora.com Signed-off-by: Sasha Levin commit 04271f3e569eb8aaf86d3c1e8a60b01c98c9a281 Author: Nicolas Frattaroli Date: Wed Aug 12 16:07:18 2026 +0200 drm/panthor: Add tracepoint for cache flushing [ Upstream commit 3fc4721629c40bb5f7bc7696875a9df633e6a35a ] Add a new event tracepoint: gpu_cache_flush to be emitted after a GPU cache flush completes, with duration and return status arguments. This allows debugging the duration a flush takes irrespective of initial function entry lock contention, and communicates information about whether the flush timed out or errored out in other ways, and which caches were flushed. Signed-off-by: Nicolas Frattaroli Reviewed-by: Liviu Dudau Reviewed-by: Steven Price Reviewed-by: Boris Brezillon Signed-off-by: Liviu Dudau Link: https://patch.msgid.link/20260812-panthor-cache-flush-fix-v4-1-751e32901898@collabora.com Stable-dep-of: 4fd08b3d1da7 ("drm/panthor: Revisit reqs_lock handling in flush/reset paths") Signed-off-by: Sasha Levin commit 324809336f2873c61bf6d8c9a5af4de6eea564c0 Author: Jianlin Shi Date: Sun Aug 23 22:17:27 2026 +0800 bpf: Reject oversized bpf_stream_vprintk output with -E2BIG [ Upstream commit 41c0348f6e65c26df4866d5dc96c57b1995fe36c ] bstr_printf() returns the would-be length excluding the trailing NUL. When that value is >= MAX_BPRINTF_BUF the message was truncated, but bpf_stream_push_str() still tried to allocate with the inflated length and failed with -ENOMEM. The boundary case of exactly MAX_BPRINTF_BUF could also copy the trailing NUL into the stream element. Reject such lengths with -E2BIG before charging stream capacity, and tighten bpf_stream_elem_alloc() to accept only payloads strictly shorter than the bprintf buffer. Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams") Signed-off-by: Jianlin Shi Link: https://lore.kernel.org/r/74387ae5024d7e2996095e97211430285095b525.1787492521.git.shijianlin11@foxmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 66e4312c629dde0555119360fe15c43ff302208b Author: Jianlin Shi Date: Sun Aug 23 22:17:26 2026 +0800 bpf: Return partial progress from bpf_stream_read on fault [ Upstream commit 16790357a50baae10de1f619b608a85145d54bc2 ] bpf_stream_read() pops and frees stream elements after a successful copy_to_user(). If a later copy_to_user() fails, it currently restores only the current element's consumed_len and returns -EFAULT, hiding bytes already delivered to userspace and making the consumed data unrecoverable on retry. On a short copy, keep the successfully copied prefix of the current element and return the number of bytes copied. Return -EFAULT only when no bytes were copied for the call. Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams") Signed-off-by: Jianlin Shi Link: https://lore.kernel.org/r/7668c5838c6beafeea719df8d55319e2fe08cfef.1787492521.git.shijianlin11@foxmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit df43243b0eecfb8477f428c124c172eb703e5031 Author: Jianlin Shi Date: Sun Aug 23 22:17:25 2026 +0800 bpf: Fix stream capacity leak in staging path [ Upstream commit effa6370ba89e7839c9bfeb802d8f05d6843ddf1 ] bpf_stream_stage_printk() increments ss->len before pushing the formatted string to the staging log. If element allocation fails, ss->len remains inflated and bpf_stream_stage_commit() permanently charges the stream capacity for data that was never queued. Only account the string length after a successful push, and use vscnprintf() so the staged length is the truncated payload without the trailing NUL. Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams") Signed-off-by: Jianlin Shi Link: https://lore.kernel.org/r/46898fb1ae482b2f8b1da459922b187378dfdc1d.1787492521.git.shijianlin11@foxmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit c650ee4c21257b3e5b32ba3485f0bddb61c0568a Author: Jianlin Shi Date: Sun Aug 23 22:17:24 2026 +0800 bpf: Roll back stream capacity when allocation fails [ Upstream commit bd2466ed8fc2ee54408bfe433e75f9f46bfa04f7 ] bpf_stream_push_str() accounts the string length before allocating a stream element. If the allocation fails, the length remains charged even though no element is queued and therefore cannot be released by a reader. Repeated failures can exhaust the stream capacity permanently until the BPF program is freed. Refactor bpf_stream_release_capacity() to take a length so the consume and release sides are symmetric, and use it to roll back the charge when creating the stream element fails. Fixes: 5ab154f1463a ("bpf: Introduce BPF standard streams") Signed-off-by: Jianlin Shi Link: https://lore.kernel.org/r/c0ad7b18c59be6695fcc9e4e1200b2f4d5cbbea2.1787492521.git.shijianlin11@foxmail.com Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 6eaaa743e3cc8cad33b59f533018db6370b1bcd5 Author: Timur Tabi Date: Mon Aug 10 13:12:43 2026 -0500 gpu: nova-core: write initial RPCs before booting GSP-RM [ Upstream commit 6556f7556d622dbbc5c936df9d39c2f33600adfb ] Make sure that the two setup RPCs, SetSystemInfo and SetRegistry, are in the command queue before booting GSP-RM. These message are expected to already be present, because GSP-RM will process the queue early in boot but will silently ignore the error if absent. GSP-RM then continues booting, but since the registry is not set up, it fails to initialize. Fixes: 0e42ec83d46a ("gpu: nova-core: gsp: shuffle boot code a bit to keep chipset-specific parts close") Signed-off-by: Timur Tabi Reviewed-by: Alexandre Courbot Reviewed-by: John Hubbard Link: https://patch.msgid.link/20260810181243.3036669-1-ttabi@nvidia.com Signed-off-by: Alexandre Courbot Signed-off-by: Sasha Levin commit 11a980c6606be4a55a2b6724592aea5799aa84be Author: Alexis Lothoré (eBPF Foundation) Date: Tue Aug 18 20:43:00 2026 +0200 selftests/bpf: Allocate a larger timeout for connection [ Upstream commit 669e4fa766000ae4137bb02eb22ce75ba78ad32d ] Some tests, like tc_tunnel or tc_edt, sporadically fail in CI with the following logs: (network_helpers.c:309: errno: Operation now in progress) \ Failed to connect to server send_and_test_data:FAIL:connect to server unexpected error: -115 This is due to SO_RCVTIMEO and SO_SNDTIMEO being set on the client socket (see settimeo() in client_socket()), allowing connect() to return an error and to set errno to EINPROGRESS instead of ETIMEDOUT. Increasing the timeout value for those tests is likely not a good solution (and it has already been done by commit 2790db208b44 ("selftests/bpf: Improve tc_tunnel test reliability")): some tests expect some data transfer to fail, and so the timeout value would increase overall test execution duration again (not only the connection, but any socket operation). Another solution is to allocate a timeout budget specific to the connection: we can apply a larger timeout only for connections, and once the connection is established, set back the timeout configured through opts->timeout_ms; this would allow connection to succeed under heavy CI load, while keeping timeout reasonable for the rest of the test traffic. Create a dedicated connect helper that sets a large timeout for the connect step, tries to connect, and if successful, finally sets the timeout value to the one configured by the test. Fixes: 99126abec5e5 ("bpf: selftests: A few improvements to network_helpers.c") Signed-off-by: Alexis Lothoré (eBPF Foundation) Signed-off-by: Andrii Nakryiko Acked-by: Ihor Solodrai Link: https://lore.kernel.org/bpf/20260818-tc_tunnel_flaky-v7-1-aec161e74ef2@bootlin.com Signed-off-by: Sasha Levin commit e0f4b20e1c670f46aa1d447e3620eb811f57f7d1 Author: Darren Carreras Date: Thu Aug 13 20:43:18 2026 -0400 libbpf: Avoid overflow in BTF.ext bounds check [ Upstream commit e40f61a31688898e7cf81e91074a42f805883e4d ] A malformed BTF.ext subsection length in an ELF input can wrap the pointer addition used by btf_ext_parse_sec_info() on 32-bit builds. The wrapped pointer passes the bounds check and parsing then reads beyond the copied BTF.ext data. Ensure the header fits in the copied data, then validate the subsection offset and length with subtraction before forming its pointer. Fixes: ae4ab4b4117d ("btf: expose API to work with raw btf_ext data") Closes: https://issues.oss-fuzz.com/issues/477315119 Signed-off-by: Darren Carreras Signed-off-by: Andrii Nakryiko Link: https://lore.kernel.org/bpf/20260813-b4-libbpf-v6-send-20260813-v6-1-56be61c52758@gmail.com Signed-off-by: Sasha Levin commit c5723a314ba649b6f95c00c6c784e5e1e5c2d6c9 Author: Marek Vasut Date: Thu Mar 5 21:58:15 2026 +0100 drm: of: Fix drm_of_get_data_lanes_count_ep() return value documentation [ Upstream commit e3eca845ef7d6cd8c407f9b42beb45af94ff096b ] Update drm_of_get_data_lanes_count_ep() return value documentation to match the drm_of_get_data_lanes_count() return value documentation. The drm_of_get_data_lanes_count_ep() is only a wrapper around the drm_of_get_data_lanes_count() and therefore returns the same error codes. Simplify the return code description of drm_of_get_data_lanes_count() and drm_of_get_data_lanes_count_ep() to -ENODATA and -EINVAL. Fixes: fc801750b197 ("drm: of: Add drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep") Reported-by: Geert Uytterhoeven Signed-off-by: Marek Vasut Reviewed-by: Maxime Ripard Link: https://patch.msgid.link/20260305205840.95978-1-marek.vasut+renesas@mailbox.org Signed-off-by: Tomi Valkeinen Signed-off-by: Sasha Levin commit 87748376b812e2c8ea105ae164ce5ecb343b8008 Author: Andreas Kemnade Date: Tue Aug 4 10:37:00 2026 +0200 drm/omap: dsi: avoid sending bta sync all the time in writes [ Upstream commit 20207f78382ff339f3a7f7c5db2c0219b157d32a ] Some chips need configuration commands to be sent first, before they can send data. TC358762 for example needs PPI_LPTXTIMECNT configured and PPI_STARTPPI set to 1 to be able to transmit anything. To be able to configure such chips, do not send bta sync during writes if no acks are requested. Instead just wait for the packet to be sent to avoid FIFO overflows. There might be more to do about acks, but there seem to be virtually no users of that flag. This came to light when fiddling with the Epson Moverio BT-200 display which consists of 2 TC358762 bridges with SPI funneled through to the unknown display chip. With that patch the bridge can be accessed, Reading back registers works, when the above-mentioned registers are set. In Command-Mode update, there was a nop sent, apparently the most relevant part was the bta sync to actually force low power mode. Video mode panel at OMAP4 (BT-200) and video mode at OMAP5 was tested. Fixes: e70965386353e ("drm/omap: dsi: simplify write function") Signed-off-by: Andreas Kemnade Link: https://patch.msgid.link/20260629-vm-upstr-v4-1-9f0c62d8808e@kemnade.info Link: https://patch.msgid.link/20260628-vm-upstr-v3-1-9e9add93378b@kemnade.info Link: https://patch.msgid.link/20260529-vm-upstr-v2-1-24c30671719f@kernel.org Link: https://lore.gitlab.freedesktop.org/drm-ai-reviews/review-patch1-20260529-vm-upstr-v2-1-24c30671719f@kernel.org/ Link: https://patch.msgid.link/20260528-vm-upstr-v1-1-fb93ef8cbe47@kernel.org Link: https://patch.msgid.link/20260804-vm-upstr-v6-1-1bf3748b2fa3@kemnade.info Signed-off-by: Tomi Valkeinen Signed-off-by: Sasha Levin commit d2a14efdee817de4365950f05d183a4c3692ca3c Author: Tejun Heo Date: Wed Aug 19 19:20:21 2026 -1000 bpf: sched_ext: Mark ops argument container pointer fields as trusted [ Upstream commit aed1bf1a352acd4f5ffd2a81e23d2bb6e8e9b636 ] Walking an unannotated pointer field of a trusted struct yields a bare PTR_TO_BTF_ID in non-sleepable programs, which kfuncs and helpers accept, but PTR_UNTRUSTED in sleepable programs, which they reject. This gets in the way of making ops.init_task() sleepable, which schedulers want for allocations. For example, passing args->cgroup into bpf_cgrp_storage_get() then fails verification and the only recourse is round-tripping through the cgroup ID with bpf_cgroup_from_id(). The pointer fields in the sched_ext ops argument containers are all pinned by the callers for the duration of the ops calls and are never NULL. Add them to the verifier's trusted-fields whitelist so that they are PTR_TRUSTED in both sleepable and non-sleepable programs. Fixes: 8195136669661 ("sched_ext: Add cgroup support") Signed-off-by: Tejun Heo Acked-by: Kumar Kartikeya Dwivedi Link: https://lore.kernel.org/bpf/95d7ccc17681aa3a4a2eeb1b073f00f7@kernel.org Signed-off-by: Kumar Kartikeya Dwivedi Signed-off-by: Sasha Levin commit 43de77336f07d808910ca00e8954b3406c9cab57 Author: Adrián Larumbe Date: Thu Aug 20 15:04:48 2026 +0100 drm/panfrost: Prevent division by 0 [ Upstream commit fd4227f03546c323b5b21568f727233e9792d298 ] When updating and debug-printing devfreq stats, in the very unlikely off-chance that total device time is less than 100 ns, division by 0 would happen. Fix the divisor when relevant and rearrange operands. Reported-by: Claude Closes: https://gitlab.freedesktop.org/panfrost/linux/-/work_items/88 Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver") Reviewed-by: Steven Price Reviewed-by: Boris Brezillon Link: https://patch.msgid.link/20260820-b4-panfrost-fixes-v1-2-1b2c2376f4bc@collabora.com Signed-off-by: Adrián Larumbe Signed-off-by: Sasha Levin commit f2491aa56ba40ef12d73b430439400f51bbc0b09 Author: Adrián Larumbe Date: Thu Aug 20 15:04:47 2026 +0100 drm/panfrost: Check another bo field for cache option query [ Upstream commit a34340574bad0e3280d8b43b3836147bf2149abc ] When querying the properties of a BO, whether it was created in Writeback caching mode for userspace mappings, is recorded in a Panfrost BO's wb_mmap field. Reported-by: Claude Closes: https://gitlab.freedesktop.org/panfrost/linux/-/work_items/88 Fixes: 62eedf1ccba5 ("drm/panfrost: Add flag to map GEM object Write-Back Cacheable") Reviewed-by: Steven Price Reviewed-by: Boris Brezillon Link: https://patch.msgid.link/20260820-b4-panfrost-fixes-v1-1-1b2c2376f4bc@collabora.com Signed-off-by: Adrián Larumbe Signed-off-by: Sasha Levin commit e48e131830e370ffc0682bcea6af99e6f5c51a54 Author: Chen-Yu Tsai Date: Thu Aug 13 14:51:26 2026 +0800 drm/verisilicon: Switch to drm_fb_dma_get_addr() for framebuffer addresses [ Upstream commit 063019ac51afffda4ab3d658701b086caa0c8e9e ] The verisilicon driver has a custom framebuffer address calculating helper that the common drm_fb_dma_get_addr() can substitute. Differences from drm_fb_dma_get_addr(): - Uses drm_format_info_min_pitch() to calculate the horizontal offset; however the driver does not support any of the blocked formats, so this just ends up being the same as in drm_fb_dma_get_addr(): "cpp[plane] * y" - Uses clipped source coordinates instead of non-clipped coordinates as in drm_fb_dma_get_addr(); For the primary plane this doesn't matter, since the primary plane must match the output, i.e. it cannot be clipped. Also this driver doesn't support scaling. For the cursor plane this seems wrong, as the clipping seems to be done by the hardware, and thus the buffer address should be unclipped. As such, it should be fine to use the common helper and drop the custom code. Tested-by: Icenowy Zheng Reviewed-by: Icenowy Zheng Fixes: 8c4ae2189125 ("drm: verisilicon: add support for cursor planes") Link: https://patch.msgid.link/20260813065127.341349-1-wenst@chromium.org Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin commit 06250e507fd8d15497f54a0e4127b846bf7fae7b Author: Icenowy Zheng Date: Wed Aug 12 23:48:29 2026 +0800 drm: verisilicon: fix cursor offset field update [ Upstream commit 6575bb5d0d3c7db0d7d293428ecc07cb38e46ecc ] The 4th argument of regmap_update_bits() expects a pre-shifted register value instead of the field value when it's used to set a single field, however I forgot this when writing the code setting the cursor X/Y offset fields, thus the write operation doesn't happen at all (because of the non-shifted values being masked by regmap_update_bits()). Fix this problem so the cursor is correctly clipped. The framebuffer address is also clipped so the cursor offset problem was previously not discovered, and the framebuffer address deserves another fix for proper cursor behavior when it's clipped. Fixes: 8c4ae2189125 ("drm: verisilicon: add support for cursor planes") Signed-off-by: Icenowy Zheng Reviewed-by: Chen-Yu Tsai Link: https://patch.msgid.link/20260812154829.671777-1-zhengxingda@iscas.ac.cn Signed-off-by: Chen-Yu Tsai Signed-off-by: Sasha Levin commit 96870da722f92a3a6e5ac764a342435a174330c3 Author: Hao-Qun Huang Date: Wed Jul 8 11:19:59 2026 +0800 accel/qaic: reject BO sizes that overflow page count [ Upstream commit 568d4cb5dcc5ec4e22975699b6ea67a30806884c ] create_sgt() receives the BO size as a u64 but stores the number of pages in an int. qaic_create_bo_ioctl() page-aligns the user-supplied size without an upper bound, so DIV_ROUND_UP(size, PAGE_SIZE) can exceed INT_MAX and truncate when assigned to nr_pages. When the page count wraps to a small positive value (for example a BO larger than 16 TiB on a 4 KiB page kernel), create_sgt() succeeds after allocating only a handful of pages while the GEM object still records the full size, so the request never fails with -ENOMEM. The temporary pages array and the allocation loop both use the truncated count, so the backing SG table ends up smaller than obj->size. Later slice operations validate against obj->size and then clone ranges from this short sgt. Compute the page count as a u64 and reject sizes that do not fit in nr_pages before the narrowing conversion. Fixes: ff13be830333 ("accel/qaic: Add datapath") Assisted-by: Claude:claude-fable-5 Signed-off-by: Hao-Qun Huang Reviewed-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patch.msgid.link/20260708031959.966009-1-alvinhuang0603@gmail.com Signed-off-by: Sasha Levin commit 453c3497772bbbb8214e590a97f07f5dacec86e0 Author: Youssef Samir Date: Mon Jul 27 19:33:26 2026 +0200 accel/qaic: Add to qaic_ssr.c [ Upstream commit f29ab62f7ed55eae7b246bb535ede56d3b338674 ] qaic_ssr.c uses mhi_device_id implicitly. Include . Fixes: 9675093acea0 ("accel/qaic: Implement basic SSR handling") Signed-off-by: Youssef Samir Reviewd-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patch.msgid.link/20260727173326.2219191-6-youssef.abdulrahman@oss.qualcomm.com Signed-off-by: Sasha Levin commit 088e7aa153c0f066a4e8eb1f9d28c482b8b9b728 Author: Youssef Samir Date: Mon Jul 27 19:33:25 2026 +0200 accel/qaic: Add to qaic_ras.c [ Upstream commit 7de023a5a251b6599ca767415e07a0ea79fc2dcb ] qaic_ras.c uses mhi_device_id implicitly. Include . Fixes: c11a50b170e7 ("accel/qaic: Add Reliability, Accessibility, Serviceability (RAS)") Signed-off-by: Youssef Samir Reviewd-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patch.msgid.link/20260727173326.2219191-5-youssef.abdulrahman@oss.qualcomm.com Signed-off-by: Sasha Levin commit a2df85e8c066c7af73e9a4605c55385cb99339ea Author: Youssef Samir Date: Mon Jul 27 19:33:24 2026 +0200 accel/qaic: Add to qaic_debugfs.c [ Upstream commit cef139aa5394844f61fdb81d9fb07e71ba4e2407 ] qaic_debugfs.c uses mhi_device_id implicitly. Include . Fixes: 5f8df5c6def6 ("accel/qaic: Add bootlog debugfs") Signed-off-by: Youssef Samir Reviewd-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patch.msgid.link/20260727173326.2219191-4-youssef.abdulrahman@oss.qualcomm.com Signed-off-by: Sasha Levin commit 267ff6f946c8b9e9e9977780437d22daadc99f2b Author: Youssef Samir Date: Mon Jul 27 19:33:23 2026 +0200 accel/qaic: Add to qaic_drv.c [ Upstream commit c8e6229a81d0400a8347c70b89ff363ec08c816f ] qaic_drv.c uses mhi_device_id implicitly. Include . Fixes: c501ca23a6a3 ("accel/qaic: Add uapi and core driver file") Signed-off-by: Youssef Samir Reviewd-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patch.msgid.link/20260727173326.2219191-3-youssef.abdulrahman@oss.qualcomm.com Signed-off-by: Sasha Levin commit c6c4e8ea50af67ab9d53312d0886a58428e0c269 Author: Youssef Samir Date: Mon Jul 27 19:33:22 2026 +0200 accel/qaic: Add missing to sahara and timesync [ Upstream commit 0fb9e5faa8220db6b3268b3c8a39e31e0a963743 ] qaic_timesync.c and sahara.c use struct mhi_device_id implicitly since commit 995832b2cebe ("Replace by more specific (c files)") removed . Explicitly include in qaic_timesync.c and sahara.c. Fixes: 995832b2cebe ("Replace by more specific (c files)") Signed-off-by: Youssef Samir Reviewed-by: Jeff Hugo Signed-off-by: Jeff Hugo Link: https://patch.msgid.link/20260727173326.2219191-2-youssef.abdulrahman@oss.qualcomm.com Signed-off-by: Sasha Levin commit ffe01b8069f019bd86bc99c2fc6ede063446d37a Author: Raveendra Talabattula Date: Mon Aug 3 15:21:21 2026 +0100 drm/komeda: Fix bits parsing of GLB_CORE_ID [ Upstream commit ec902de0221747094f9ccbb61454e9633fbf282f ] GLB_CORE_ID contains the product and version information returned by the hardware. The current macros parses VERSION_MINOR as a 4-bit field and VERSION_STATUS as an 8-bit field, which does not match the register layout. As a result, the driver reports an incorrect version number. Fix the parsing macros to match the hardware specification: - VERSION_MINOR is 8 bits at [11:4] - VERSION_STATUS is 4 bits at [3:0] Fixes: bd628c1bed79 ("drm/komeda: komeda_dev/pipeline/component definition and initialzation") Signed-off-by: Raveendra Talabattula Reviewed-by: Liviu Dudau Signed-off-by: Liviu Dudau Link: https://patch.msgid.link/20260803142122.4127851-2-raveendra.talabattula@arm.com Signed-off-by: Sasha Levin commit c317b5b857fad929f8dbf9daee9c8bb0b17a4314 Author: Tapio Reijonen Date: Thu Oct 8 09:48:30 2026 +0000 serial: max310x: schedule tx_work directly from the IRQ handler commit c06fcc258db0c0c7f607e64a7ce6a157bb2414b1 upstream. The TXEMPTY interrupt asks for a FIFO refill, and start_tx() does nothing beyond scheduling tx_work, so going through it makes no functional difference. It does conflate two distinct events, though: start_tx() is the serial core starting a new transmission, while TXEMPTY can only fire for a transmission that is already running - the bit latches on the FIFO's non-empty to empty transition, and the IRQ handler's read of IRQSTS consumes the latch, so a stale TXEMPTY cannot exist on an idle port (if the bit were level-triggered, the handler's read-until-clear loop would never terminate). Schedule tx_work directly, keeping the interrupt path a pure FIFO refill. This is preparation for a following patch that adds software-timed RS485 RTS control, where start_tx() also starts the RTS envelope and a refill must not restart it. No functional change. Assisted-by: Claude:claude-fable-5 Signed-off-by: Tapio Reijonen Link: https://patch.msgid.link/20261008-max310x-rs485-sw-delay-v8-7-6ba881f81e1f@vaisala.com Signed-off-by: Greg Kroah-Hartman commit 4718239d17c9b9b43d3345e5fc12de5c39167a08 Author: Pei Xiao Date: Mon Nov 16 14:19:13 2026 +0000 comedi: dt2811: fix shift-out-of-bounds in IRQ check [ Upstream commit 471ce96a9c415b8a67bd5081ac2089a458cacc2f ] The IRQ number passed via comedi_devconfig->options[1] is a signed int that comes from userspace. The check `it->options[1] <= 7` does not reject negative values, so a negative IRQ number reaches `BIT(it->options[1])`, which is undefined behavior and triggers a UBSAN shift-out-of-bounds warning: UBSAN: shift-out-of-bounds in drivers/comedi/drivers/dt2811.c:570:31 shift exponent -251 is negative Add an explicit lower bound check (`it->options[1] >= 0`) so that only valid IRQ numbers 0..7 are accepted before the shift. Fixes: f2975a9b2ab9 ("staging: comedi: dt2811: add async command support for AI subdevice") Reported-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/6ab21240.e548f532.1ca396.0018.GAE@google.com/#R Signed-off-by: Pei Xiao Reviewed-by: Ian Abbott Tested-by: syzbot+a4cedab706d0a8a3f988@syzkaller.appspotmail.com Link: https://patch.msgid.link/02c46315293a26169d2a3862a2047959a1651ef4.1790061387.git.xiaopei01@kylinos.cn Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ian Abbott Signed-off-by: Sasha Levin commit 0d903b068e85848347f8641c0e51c45636ee4f60 Author: Yang Zi <2959243019@qq.com> Date: Mon Nov 16 13:48:12 2026 +0000 comedi: addi_apci_3xxx: fix subdevice count underallocation [ Upstream commit 3de5aa458dede472a253266d02902bd95af8e849 ] In apci3xxx_auto_attach(), the number of subdevices is computed with     n_subdevices = (board->ai_n_chan ? 0 : 1) + board->has_ao + ... The ternary is inverted: when the board has analog input channels (ai_n_chan != 0), it counts 0 instead of 1, so the AI subdevice that is actually created is not accounted for. As a result comedi_alloc_subdevices() allocates one entry too few, and the later subdevice initialization (notably the TTL Digital I/O subdevice, which is populated last) writes past the end of the allocated array, causing a slab out-of-bounds write. Flip the ternary to count 1 when ai_n_chan is non-zero and 0 otherwise, matching the subdevice creation order in the function. Signed-off-by: Yang Zi <2959243019@qq.com> Reviewed-by: Ian Abbott Link: https://patch.msgid.link/20261014101803.11036-1-abbotti@mev.co.uk Signed-off-by: Greg Kroah-Hartman Fixes: 656e39fedcf0 ("staging: comedi: addi_apci_3xxx: only allocate needed subdevices") Signed-off-by: Ian Abbott Signed-off-by: Sasha Levin commit 0f2826c8db7e40a423bb0afc06e748341eef70e7 Author: Amir Goldstein Date: Thu Nov 12 15:43:12 2026 -0500 ovl: inherit FMODE_NONOTIFY when reading directory layers [ Upstream commit 9ff338af0e002fe217cfa16b1289b76f6b21fc72 ] Listing a merged or impure overlay directory opens the real layer directories from ovl_dir_read(), when the readdir cache is filled. Those opens use plain ovl_path_open(), so when the directory fd is one that fanotify created for a permission event, they can still raise FS_OPEN_PERM. A listener that also marks the backing filesystem and calls getdents() on the event fd before answering then deadlocks the same way as with the directory open fixed by the previous commit. Store the overlay user file in struct ovl_readdir_data and pass it to ovl_path_open_realfile() from ovl_dir_read(), for both the merged and the impure cache. Internal readers such as ovl_check_empty_dir() and the mount-time workdir cleanup still pass no user file. A note about severity and real world impact: The FAN_OPEN_PERM event is traditionally used by anti-malware protection agents and security/audit agents. The scope that is often used in those use cases is FAN_MARK_MOUNT and agents typically monitor multiple mounts in a mount namespace. FAN_OPEN_PERM from directory open requires user opt-in with FAN_ONDIR. It is often not the case that anti-malware agents monitor open of directories. Security/audit engines are more likely to opt-into FAN_OPEN_PERM on directories, but are less likely to list the content of a directory within the scope of FAN_OPEN_PERM event, so the real world impact of this bug is likely not significant. Reported-by: Edvard Conrad Closes: https://lore.kernel.org/all/P5Qu3co--N-9@tuta.io/ Cc: stable@vger.kernel.org Tested-by: Edvard Conrad Link: https://lore.kernel.org/ltp/P5WKBbq--F-9@tuta.io/ Co-developed-by: Edvard Conrad Signed-off-by: Edvard Conrad Signed-off-by: Amir Goldstein Signed-off-by: Sasha Levin commit 22e48294fde7ca1a88e0dcd8b3e2bfa7461235fa Author: Amir Goldstein Date: Thu Nov 12 15:43:11 2026 -0500 ovl: add assertions in dir cache code [ Upstream commit ba227ed05b385926094741e2d566789525c36085 ] Overlayfs may keep two different types of directory cache merged (refcounted) and impure (not refcounted) in the inode. They are mutually exclusive and an overlayfs directory is never expected to switch between merged and impure modes. Nevertheless it is hard to prove that races in the code are not possible, so add assertions to fortify the code accessing the directory cache to make sure it does not free the unexpected cache type. If an assertion fires the code may leak dir cache memory but it will not access freed cache memory. Suggested-by: Nirmoy Das Link: https://lore.kernel.org/r/20260511062057.2365769-1-nirmoyd@nvidia.com/ Signed-off-by: Amir Goldstein Stable-dep-of: 9ff338af0e00 ("ovl: inherit FMODE_NONOTIFY when reading directory layers") Signed-off-by: Sasha Levin commit 1b289b08de93766bfc3dac37ecfad5ddc0fc97eb Author: Ajay Kumar Nandam Date: Wed Sep 23 22:03:38 2026 +0530 ASoC: qcom: q6apm: clear g_apm on driver removal [ Upstream commit be2172758f2b7c801ae80b9c8d1510b31eeffdaa ] The global g_apm pointer is set during apm_probe() but never cleared in apm_remove(). After the driver is removed the devm-managed struct q6apm is freed, leaving g_apm dangling. A subsequent call to q6apm_is_adsp_ready() dereferences the freed pointer. Clear g_apm in apm_remove() before the component is unregistered so that q6apm_is_adsp_ready() returns false instead of triggering a use-after-free. Fixes: 5477518b8a0e ("ASoC: qdsp6: audioreach: add q6apm support") Signed-off-by: Ajay Kumar Nandam Link: https://patch.msgid.link/20260923-vmid-v4-v6-1-3d61a0319b1c@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit e909dc6296e57886de640bbbc7591dc026c1f72a Author: Lorenzo Stoakes (ARM) Date: Fri Nov 13 23:27:48 2026 -0500 fs/proc/task_mmu: fix missed VMAs when reading /proc/PID/maps and friends [ Upstream commit ee1afc5539b6fe03569a5855b6041b13343b0993 ] Reading /proc/PID/maps under per-VMA locks can skip continuously mapped address ranges during concurrent VMA splits or merges. This violates the guarantee in Documentation/filesystems/proc.rst: "If there is something at a given vaddr during the entirety of the life of the smaps/maps walk, there will be some output for it." lock_next_vma() reuses a tree iterator across calls under RCU. The iterator remembers the range of its last entry. When its node is replaced, mas_next_slot() walks the tree again at the last index of that range, then advances past the entry containing that index. If VMA boundaries changed, this can skip a range that has not been reported: - A lookup finds [A, C), then mprotect() splits it into [A, B) and [B, C) before vma_start_read() locks the first VMA. The reader reports [A, B), but the iterator still covers [A, C). The next call starts from B yet advances past C, omitting [B, C). - The reader reports [A, B) and unlocks it. A concurrent mprotect() then merges it with [B, C). On the next call, the iterator resumes at B - 1, which now belongs to [A, C), and advances past C. Again, [B, C) is lost. Checking the mmap_lock sequence only within the next call misses writers that completed before that call began. Also, a NULL result is currently accepted without validation, so a race can terminate the walk early. Even a fresh lookup can skip a mapping. Suppose it finds a gap before [B, C). A writer inserts an adjacent VMA at the end of that gap, then merges it into [B, C), replacing the node. The lookup resumes at the old gap's last index, now inside the merged VMA, and steps past it. The original [B, C) remains mapped throughout. Repeating the forward lookup is insufficient: another merge can make it skip the same mapping again, returning the same later VMA or NULL. The fresh-lookup race also affects /proc/PID/smaps, numa_maps and smaps_rollup. Resetting the iterator after gathering each VMA's statistics does not prevent a merge during the next lookup. Fixing lock_next_vma() also prevents omitted entries and incomplete rollup statistics. Tie VMA iterator state with the current mm and the write generation at the point of last mm speculation in vma_rcu_iter, whose values we call 'rvmi'. This allows us to neatly abstract the existing priv->iter logic alongside query_vma_find_by_addr() which uses its own VMA iterator. Then, provide helpers that act on the rvmi - vma_rcu_iter_[maybe_changed, may_have_skipped]() to determine whether any VMAs may have been altered since last mm speculation. Additionally introduce vma_range_is_empty(), used by vma_rcu_iter_may_have_skipped(), to determine conclusively whether VMAs exist in a set range, needing to be traversed. Original fix generated by an LLM and sent by Josef Bacik in private, then amended by David Hildenbrand, and Lorenzo Stoakes added additional abstraction. Link: https://lore.kernel.org/20261027-fix-proc-pid-maps-missing-vmas-v2-1-2791cc9fc95f@kernel.org Fixes: 5631da56c9a8 ("fs/proc/task_mmu: read proc/pid/maps under per-vma lock") Fixes: ea3085dd7a4e ("fs/proc/task_mmu: read proc/pid/{smaps|numa_maps} under per-vma lock") Fixes: 0e985559d72a ("proc/task_mmu: read proc/pid/smaps_rollup under per-vma lock") Fixes: d9d1c2d81797 ("fs/proc/task_mmu: execute PROCMAP_QUERY ioctl under per-vma locks") Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Andrew Morton Co-developed-by: David Hildenbrand (Arm) Reviewed-by: Suren Baghdasaryan Reviewed-by: Jose A. Perez de Azpillaga Tested-by: Jose A. Perez de Azpillaga Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Jann Horn Cc: Pedro Falcato Cc: Shakeel Butt Cc: SJ Park Cc: [ sashal: Retained mmap_lock-based show_smaps_rollup() initialization while moving vma_rcu_iter_init() outside CONFIG_PER_VMA_LOCK. ] Signed-off-by: Sasha Levin commit a62cd0e3741535b650ace9f96f82992d4e447956 Author: YouYou Yu Date: Fri Nov 13 14:46:50 2026 -0500 quota: initialize dquot cache before mounting rootfs [ Upstream commit e21a6f39aa6d0336ffbf5f34e5fa20ff8de36773 ] On some systems, a tmpfs backed rootfs is extensively used throughout system's lifecycle. tmpfs quotas are needed to limit per user rootfs usage. However, booting with CONFIG_TMPFS_QUOTA=y, an initramfs, no root= and "initramfs_options=usrquota" panics at boot: BUG: kernel NULL pointer dereference, address: 0000000000000000 RIP: 0010:dqget+0x1ac/0x490 Call Trace: __dquot_initialize dquot_initialize shmem_get_inode shmem_fill_super ... mnt_init vfs_caches_init start_kernel The rootfs is mounted from mnt_init(), but the dquot hash table and cache are only set up later by dquot_init(), an fs_initcall. Creating the root inode of a quota enabled rootfs thus dereferences the NULL dquot_hash in dqget(). Rename dquot_init() to dquot_cache_init() and call it from vfs_caches_init() before mnt_init(). The slab, percpu and early workqueue code it relies on is available there, and the workqueue rescuer and shrinker debugfs entries are set up later by their own subsystems. Keep the sysctl registration in an fs_initcall, as done for the dcache, inode and mount sysctls. This only moves existing allocations earlier in boot. Fixes: 278033a225e1 ("fs: Add 'initramfs_options' to set initramfs mount options") Cc: stable@vger.kernel.org Assisted-by: LLM Co-developed-by: Dylan Johnson Signed-off-by: Dylan Johnson Signed-off-by: YouYou Yu Reviewed-by: Gunnar Kudrjavets Link: https://patch.msgid.link/20261021181217.20171-1-youyouyu@amazon.com Signed-off-by: Jan Kara [ sashal: Adjusted include-list context because the neighboring namei header is absent. ] Signed-off-by: Sasha Levin commit 18539dac92970bb01688c633c9a6f29c031fb07c Author: Srinivas Kandagatla Date: Fri Nov 13 14:36:18 2026 -0500 ASoC: SDCA: re-enable IRQ on pm_runtime_force_suspend failure [ Upstream commit d34a818a331f7e270fa9dc3db3d96f6a0d4fa7ab ] The SoundWire IRQ was disabled before pm_runtime_force_suspend() but never re-enabled when the force suspend failed, leaving the codec unable to receive interrupts. Fixes: 2d877d0659cb ("ASoC: SDCA: Add basic SDCA class driver") Cc: stable@vger.kernel.org Reviewed-by: Charles Keepax Assisted-by: LLM Signed-off-by: Srinivas Kandagatla Link: https://patch.msgid.link/20261020073856.1177749-4-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin commit fb6f0f9311637425ffed0689370db69e40ad3f5d Author: Srinivas Kandagatla Date: Fri Nov 13 14:36:17 2026 -0500 ASoC: SDCA: export PM helpers keyed on sdca_class_drv [ Upstream commit 0985313a2a9d2e84d6a6b1041c88b5c57ee46dfa ] The class PM callbacks pull sdca_class_drv out of drvdata, so the built-in class_sdw_driver owns the drvdata slot. That works for the generic case but blocks codec drivers that want to embed sdca_class_drv in their own private struct -- they need drvdata for their codec priv. Split the four callbacks into exported helpers that take a struct sdca_class_drv * directly: sdca_class_system_suspend() sdca_class_system_resume() sdca_class_runtime_suspend() sdca_class_runtime_resume() Codec drivers can now compose these into their own dev_pm_ops without going through drvdata. For the built-in class_sdw_driver, add small dev_pm_ops wrappers that fetch drv from drvdata and wire them into sdca_class_pm_ops. The ops struct itself stays private to this file; codec drivers build their own dev_pm_ops from the four exported helpers above. No functional change: the built-in class_sdw_driver keeps the same PM semantics; only the internal plumbing shifts to operate on sdca_class_drv instead of struct device *dev. Signed-off-by: Srinivas Kandagatla Reviewed-by: Charles Keepax Link: https://patch.msgid.link/20260925161049.758913-3-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown Stable-dep-of: d34a818a331f ("ASoC: SDCA: re-enable IRQ on pm_runtime_force_suspend failure") Signed-off-by: Sasha Levin commit 7a2c846b417cd3521369ffd6ff0bc4cd336462d0 Author: David Hildenbrand (Arm) Date: Fri Nov 13 14:15:36 2026 -0500 mm/madvise: preserve VMA_SOFTDIRTY_BIT when changing anonymous names [ Upstream commit 652f15be3c11415725694ccea317c51e35c0b582 ] When changing the anonymous VMA name, madvise_update_vma() calls vma_modify_name() to possibly merge with adjacent VMAs. We don't call vma_modify_flags() and consequently don't obtain the new VMA flags. Later in the function we update the VMA flags to the stale new_vma_flags we obtained before. This can result in us losing the VMA_SOFTDIRTY_BIT flag set on a VMA we just merged with. There is no need to update the VMA flags at all, so just exit early. This skips calling khugepaged_enter_vma(), but since the flags didn't change this is fine. [ljs@kernel.org: minor edit of commit message, rebased] Link: https://lore.kernel.org/20261023-fix-vma-atomic-v1-3-8ff4fae1fc85@kernel.org Fixes: 9a10064f5625 ("mm: add a field to store names for private anonymous memory") Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Andrew Morton Reviewed-by: Lorenzo Stoakes (ARM) Reviewed-by: Pedro Falcato Tested-by: Gregory Price (Meta) Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Michal Hocko Cc: Jann Horn Cc: Davidlohr Bueso Cc: SJ Park Cc: Kees Cook Cc: Colin Cross Cc: Signed-off-by: Sasha Levin commit 54b29a37539f6f6649a135ba55565360dd0ea569 Author: Lorenzo Stoakes (ARM) Date: Fri Nov 13 09:49:47 2026 -0500 mm/vma: avoid losing atomic VMA flags when setting sticky VMA flags [ Upstream commit c386d799f423685952138cab8d89f0331825bdee ] vma_merge_existing_range() merges an existing VMA (middle) when its attributes have changed to match those of one or both adjacent VMAs. Sticky flags are propagated if they are set in any of the merged VMAs. They are initialised from vmg->vma_flags, which is assumed to contain middle's sticky flags when the function is invoked. However, the VMA write lock is not held for middle when they are first populated, so concurrent updates to atomic VMA flags may occur, which will be lost upon merge. This can result in fork failing to propagate guard region markers and (if file-backed) THP collapse discarding them. Resolve this by propagating the sticky flags after middle is locked. Make life easier by factoring this into propagate_sticky_flags(), which treats vmg->vma_flags as its base (in case any sticky flags are set there), updating it as sticky flags are accumulated from merged VMAs. Also update vma_expand() to use propagate_sticky_flags() so all merge paths utilise it. propagate_sticky_flags() also asserts that the VMA write lock is held for the VMA whose sticky flags are being read, with a comment explaining why. Another means by which atomic VMA flags can fail to be observed is when the merge is finalised in commit_merge(). rmap locks are dropped in vma_complete() before the sticky flags are written, meaning an rmap walker can observe the VMA without sticky flags set, which can also result in retract_page_tables() discarding guard markers. Resolve this by assigning the sticky flags before dropping rmap locks, factored into commit_sticky_flags() with a write assert on the VMA being written to. Also remove the vma_set_flags_mask() invocation at the end of vma_merge_existing_range() as this was introduced by commit 64212ba02e66 ("mm: implement sticky VMA flags") to propagate sticky flags, which is now redundant with the introduction of commit_sticky_flags(). The vma_set_flags_mask() invocation at the end of vma_expand() setting sticky flags only is also removed for the same reason. Also update vma_merge_existing_range()'s comment to reflect the fact that vmg->vma_flags gets updated. Finally, update the userland VMA tests to reflect a previously missed const-ification in vma_assert_write_locked() which would otherwise cause a warning when building them. Link: https://lore.kernel.org/20261023-fix-vma-atomic-v1-4-8ff4fae1fc85@kernel.org Fixes: 2ab7f1bbafc9 ("mm/madvise: allow guard page install/remove under VMA lock") Fixes: 49e14dabed7a ("mm: set the VM_MAYBE_GUARD flag on guard region install") Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Andrew Morton Suggested-by: David Hildenbrand (Arm) Acked-by: David Hildenbrand (Arm) Reviewed-by: Pedro Falcato Tested-by: Gregory Price (Meta) Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Michal Hocko Cc: Jann Horn Cc: Davidlohr Bueso Cc: SJ Park Cc: Kees Cook Cc: Colin Cross Cc: [ sashal: Removed const from the propagate_sticky_flags() VMA parameter to match vma_assert_write_locked()'s non-const pointer requirement. ] Signed-off-by: Sasha Levin commit aabf39de59e49f1a7e8c4d418eaa0c40ed1288fc Author: Guenter Roeck Date: Thu Nov 12 12:35:16 2026 -0500 hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp() [ Upstream commit 9a6aa085c94c7f2817c4d50a7264e6fb51286f40 ] show_temp() rate-limits MSR reads by storing tdata->last_updated as an unsigned long and comparing it against jiffies using time_after(jiffies, tdata->last_updated + HZ). time_after() relies on signed long subtraction, which only produces the expected result while the two timestamps are within LONG_MAX jiffies of each other. On 32-bit kernels, if tempX_input is not read for more than LONG_MAX jiffies (~24.85 days at HZ=1000), the signed difference flips sign and time_after() evaluates to false. Because tdata->last_updated is only refreshed when time_after() succeeds, subsequent reads remain blocked from refreshing for another ~24.85 days until jiffies wraps past tdata->last_updated + HZ again, returning either a stale cached temperature or -ENODATA if the sensor had never been read since initialization. Store tdata->last_updated as a u64 and use get_jiffies_64() with time_after64(), which does not wrap in any practical uptime. Reported-by: Sashiko Fixes: bebe467823c0 ("hwmon: New coretemp driver") Cc: stable@vger.kernel.org Tested-by: Asaf Nuri Bertizlioğlu Signed-off-by: Guenter Roeck Signed-off-by: Sasha Levin commit 9babb67f84a9d8ea890e73887a313f7ed0810a9e Author: Ricardo Neri Date: Thu Nov 12 12:35:15 2026 -0500 hwmon: (coretemp) Read TjMax only when refreshing the temperature [ Upstream commit 5407d2b7d5279b7100621d92f2181184c8f00d62 ] show_temp() reads TjMax before checking whether the cached temperature is still fresh, but consumes it only when recomputing that temperature. On a cache hit the value is discarded. Discarding it is not free. On CPUs that report TjMax in MSR_IA32_TEMPERATURE_TARGET, get_tjmax() returns the value it just read without storing it in tdata->tjmax, so every call reads the MSR again. That is a cross-CPU call whenever the CPU owning the sensor is not the current one, and it is made while holding tdata->update_lock. Read TjMax where it is used. The value cannot go stale in the meantime: bits 23:16 of MSR_IA32_TEMPERATURE_TARGET are read-only, and the register is package-scoped, so every CPU of the package reads the same value. The temperature reported to userspace does not change. Signed-off-by: Ricardo Neri Link: https://patch.msgid.link/20260924-coretemp-temp-fault-v1-2-1884f0ff97d5@linux.intel.com Signed-off-by: Guenter Roeck Stable-dep-of: 9a6aa085c94c ("hwmon: (coretemp) Fix 32-bit jiffies wraparound in show_temp()") Signed-off-by: Sasha Levin commit 1a0b5660087189a322dd3b8f548701b887809d72 Author: Lorenzo Stoakes (ARM) Date: Sat Nov 14 17:52:38 2026 +0000 mm/vma: avoid spurious write locks when mm->mm_lock_seq overflows [ Upstream commit 7135a05838e85845e1bbf6caa6596a7e3b791a40 ] So far the assumption has been that mm->mm_lock_seq overflow is benign, resulting only in readers spuriously falling back to the mmap lock, however it turns out that this was an unsafe assumption. If a VMA can be spuriously considered write locked that means read lock exclusion does not take place, and thus a VMA can end up write-locked with concurrent readers. Since overflow only occurs every 2^31 write lock/unlock cycles, resolve the issue by resetting every VMA's vma->vm_lock_seq each time such an overflow occurs. This is done in vma_end_write_all(), which is called when the mmap write lock is released, i.e. in mmap_write_unlock() and mmap_write_downgrade(). Care must be taken, as resetting the sequence count at overflow means changing the seqcount of VMAs which are already attached and observable. The mm's seqcount is guaranteed to be odd when a write lock is held, and thus any write locked VMA will have an odd seqcount assigned. Therefore resetting to an even value prevents spurious write locks, since these can only occur with the mmap write lock held, at which point the mmap seqcount will be odd. However, vma_start_read() also checks vma->vm_lock_seq == mm->mm_lock_seq, bailing if so (indicating a write lock). This would cause any even reset value chosen to prevent VMA read locks from being taken - avoid this by also checking whether the VMA seqcount is odd before bailing on the read lock. So far, vma->vm_lock_seq has defaulted to UINT_MAX, but this has been unnecessary since commit e5e7fb278e59 ("mm: convert mm_lock_seq to a proper seqcount"), since this is assigned when the VMA is still detached, and cannot be observed. Therefore perform both reset and initialisation of vma->vm_lock_seq by simply setting vma->vm_lock_seq to zero. The reset, performed in __mm_reset_vma_seqcounts(), only needs to WRITE_ONCE() the value. However the read of vma->vm_lock_seq in vma_start_read() needs to have acquire semantics to pair with the smp_wmb() in do_raw_write_seqcount_end() so a reader reading a reset value also observes VMA modifications made under the write lock. Since all VMA write locks were just released and the mmap write lock is still held, there are no concurrent VMA writers. Concurrent VMA readers are unaffected. New VMA readers observe either zero, never a write lock, or the prior seqcount, behaving as before the reset. Since this only occurs every 2^31 write lock/unlock cycles, the time taken to update all VMAs is considered to be acceptable. Also update comments, documentation and VMA userland tests to reflect the change. User facing effects are - dangerous races that could cause memory corruption or NULL pointer derefences (especially on page table traversal) are avoided. Link: https://lore.kernel.org/20261016-fix-vma-lock-overflow-v2-1-9eb778b79b58@kernel.org Fixes: 5e31275cc997 ("mm: add per-VMA lock and helper functions to control it") Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Andrew Morton Reported-by: Daehyeon Ko <4ncienth@gmail.com> Closes: https://lore.kernel.org/all/20261015143735.1630957-1-4ncienth@gmail.com/ Reviewed-by: Jose A. Perez de Azpillaga Tested-by: Jose A. Perez de Azpillaga Cc: Suren Baghdasaryan Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Shakeel Butt Cc: David Hildenbrand Cc: Mike Rapoport Cc: Michal Hocko Cc: Jonathan Corbet Cc: Randy Dunlap Cc: Jann Horn Cc: Pedro Falcato Cc: # 7.3.x [ ljs - Placed the seqcount reset under CONFIG_PER_VMA_LOCK to fix the build without it. ] Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Sasha Levin commit 5f702934c09c36b03bc3ca94540e34cc1285942e Author: Christian Aurich Zanettini Martins Date: Fri Oct 30 14:01:51 2026 -0300 nvme-tcp: fix use-after-free in nvme_tcp_free_ctrl() [ Upstream commit b1d1f6b1ee03285690f12c2ebf23616416e6d881 ] nvme_tcp_free_ctrl() reads ctrl->ctrl.opts to know how many queue mutexes to destroy. When creating the controller fails, nvmf_create_ctrl() frees opts as soon as nvme_tcp_create_ctrl() returns, but a concurrent open of the character device can hold the last reference to the controller. With CONFIG_DEBUG_KOBJECT_RELEASE, which delays the release, every failed connect reads freed memory: BUG: KASAN: slab-use-after-free in nvme_tcp_free_ctrl+0x38b/0x430 Read of size 4 at addr ffff888005b93740 by task kworker/2:1/51 Keep the size of the queue array in the controller and use it instead. Fixes: 2eeeaa9c1ff0 ("nvme-tcp: Validate the queue state under the queue lock in the address attribute") Cc: stable@vger.kernel.org Reviewed-by: Nilay Shroff Signed-off-by: Christian Aurich Zanettini Martins Signed-off-by: Keith Busch [ sashal: adapted to a tree without the netns/init_queue refactor, so the fix edits the mutex_init/mutex_destroy queue loops instead of nvme_tcp_init_queue()/exit_queue() and has no net member context. ] Signed-off-by: Sasha Levin commit d888b40c859fd71cc0c571d84cff6285ca69073d Author: Jann Horn Date: Fri Nov 6 22:40:31 2026 +0100 cipso: stop modifying live ip_options_rcu [ Upstream commit 1f2c5183fc0902892648f0453e38c0951cef3fec ] cipso_v4_delopt() operates on the ip_options_rcu of a socket or a request socket, and tries to remove CIPSO options from the middle by moving all subsequent options. That's not allowed - ip_options_rcu can be read locklessly and must always be consistent. For example, ip_options_undo() reads trusted offsets and length values from the options buffer. Fix it by doing the modification in a copy. The core change is in cipso_v4_delopt(), the rest is ugly plumbing to propagate memory allocation failures. Triggering this bug requires that the system is configured to use CIPSO. (Setting up CIPSO requires privileges in init_user_ns.) Fixes: f6d8bd051c39 ("inet: add RCU protection to inet->opt") Cc: stable@vger.kernel.org Signed-off-by: Jann Horn Reviewed-by: Eric Dumazet Acked-by: Paul Moore Link: https://patch.msgid.link/20261106-cipso-rcuopts-v1-1-31ae931d7a0f@google.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin commit ec98a2b751f9a79afc6183c00c5f6528c3661309 Author: Qu Wenruo Date: Fri Nov 13 09:05:01 2026 -0500 btrfs: raid56: do not verify the content if there is no data checksum [ Upstream commit d00b85308abee300dfb7e1ac642f38bab9ec7492 ] [BUG] There is a bug report that fio can fail to sync the data on a degraded RAID56 mount: # mkfs.btrfs -m raid1 -d raid5 -f $dev1 $dev2 $dev3 # mount $dev1 $mnt # btrfs balance start -d $mnt # umount $mnt # btrfs dev scan -u $dev2 # wipefs -fa $dev2 # mount -o degraded $dev1 $mnt # fio --name=degraded-write --directory=$mnt --rw=randwrite --fdatasync=4 \ --bs=4k --size=512M --randrepeat=1 The run will fail at fsync: fio: io_u error on file /mnt/btrfs/degraded-write.0.0: Input/output error: datasync offset=142254080, buflen=0 fio: pid=2064, err=5/file:io_u.c:2008, func=io_u error, error=Input/output error [CAUSE] With extra debug output, it shows the problem pretty well: rbio=2876243968 faila=0 sectornr=0 rbio=2876243968 error=0-15 csum=2 bio=15 The first line shows the rbio's full stripe logical, and stripe/sector number when verify_one_sector() failed. The second line shows more detail about the rbio, the sector range [0, 16) is corrupted, which indicates the first data stripe is corrupted, matching the missing device. The important part is that the csum bitmap shows the data csum is only for sector number 2, meanwhile the failed verification is at sector number 0. This means we did the checksum verification even if no corresponding checksum is populated. [FIX] There is already a similar check at verify_bio_data_sectors(), but unfortunately there is no such check at verify_one_sector(). Add the missing check to skip the csum verification if there is no corresponding data checksum. Reported-by: Bartosz Fenski Link: https://lore.kernel.org/linux-btrfs/a72409af-45ef-45df-9970-2e38bcb22ea6@fenski.pl/ Fixes: 7a3150723061 ("btrfs: raid56: do data csum verification during RMW cycle") CC: stable@vger.kernel.org Reviewed-by: Filipe Manana Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Signed-off-by: Sasha Levin commit 3ec853bb1b9a42b2fa7e0aa5a7dc618b2fdd6705 Author: Qu Wenruo Date: Fri Nov 13 09:05:00 2026 -0500 btrfs: remove on-stack paddrs[] array usage [ Upstream commit f41f4dcddea1b9eb41fc3a5491b2a8dd1f7c21ff ] Since the bs > ps support, we have to handle cases where a data block is inside several discontiguous pages. Thus we need a local paddrs[] array to assemble a data block for bs > ps cases. However to handle all possible bs/ps combinations, we have to declare such array using the max block size vs page size, no matter the current block size and page size. This adds 128 bytes on-stack memory usage for several call sites, and also introduced several duplicated helpers to calculate checksum for a data block: - btrfs_calculate_block_csum_folio() - btrfs_calculate_block_csum_pages() - btrfs_check_block_csum() The differences are mostly in how the data is passed. The first one accepts a contiguous paddr range. The second one accepts an array of paddrs[]. The last one is just a simple wrapper of the first one. However the most common interface to iterate a data block is through bio, and we have already converted most callers to use the bio based interface, e.g. btrfs_bio_data_csum_ok() and btrfs_csum_one_bio_block(). Convert the remaining two call sites to address the remaining paddrs[] usage: - btrfs_calculate_block_csum_pages() inside verify_bio_data_sectors() This can be switched to btrfs_csum_one_bio_block(). This removes the 128 bytes on-stack memory usage. - btrfs_calculate_block_csum_pages() inside verify_one_sector() This call site doesn't use on-stack memory for paddrs[], but reuses the existing btrfs_raid_bio::bio_paddrs[] or btrfs_raid_bio::stripe_paddrs[]. So implement a local version called calculate_block_csum_paddrs(). Now there is no fixed on-stack paddrs[] usage anymore. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Stable-dep-of: d00b85308abe ("btrfs: raid56: do not verify the content if there is no data checksum") Signed-off-by: Sasha Levin commit bba5cb8bde01d68333f890bc2d3d9bc4693a8857 Author: Qu Wenruo Date: Fri Nov 13 09:04:59 2026 -0500 btrfs: use a shared helper to calculate data checksum for a bio [ Upstream commit 64978a4eced2b8f769cdfc27d68c6710e9c92627 ] Since we are already calculating data checksum using bio interface, extract the generation part into btrfs_csum_one_bio_block(), and use that to replace the paddrs[] array based solution in csum_one_bio(). This will reduce 128 bytes on-stack memory usage for csum_one_bio(). Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Stable-dep-of: d00b85308abe ("btrfs: raid56: do not verify the content if there is no data checksum") Signed-off-by: Sasha Levin commit 50c746ac6c0c0ffaea0123e21142fa4eb631aedc Author: Qu Wenruo Date: Fri Nov 13 09:04:58 2026 -0500 btrfs: enhance btrfs_data_csum_ok() to use bio for page iteration [ Upstream commit 3e4a083bf0c8bb727517ae781052b80167443077 ] Currently btrfs_data_csum_ok() requires a @paddr[] array to iterate all possible pages for bs > ps cases. However for all btrfs_data_csum_ok() call sites, we already have a btrfs_bio, and the bio infrastructure has many flexible ways to iterate multiple pages already. Change btrfs_data_csum_ok() to make full use of btrfs_bio by: - Change the parameter list to require a @bvec_iter pointer And remove @bio_offset, which can be calculated through @bvec_iter and bbio->saved_iter. Also remove paddrs[], we will iterate all the pages using bio interfaces. - Make the same parameter changes to repair_one_sector() - Use bio interfaces to iterate pages from a bio - Rename the function to btrfs_bio_data_csum_ok() - Remove on-stack paddrs[] array usage Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Stable-dep-of: d00b85308abe ("btrfs: raid56: do not verify the content if there is no data checksum") Signed-off-by: Sasha Levin commit fbac7e1b9ee12bf5e2b21b963a57c185a92ba112 Author: Qu Wenruo Date: Fri Nov 13 09:04:57 2026 -0500 btrfs: replace btrfs_repair_io_failure() to use bio for page iteration [ Upstream commit 15ed4a938b30fcb72e96187f36e2c4ff0e6e2227 ] Currently btrfs_repair_io_failure() uses a @paddrs[] array to iterate pages. Such a parameter is required for bs > ps cases, as one fs block crosses several pages. However there is a much simpler and existing way to iterate pages: bio and bvec_iter. This changes btrfs_repair_io_failure() by: - Use a const @bvec_iter pointer to locate where the pages are - Extract file offset/logical from the @bbio - Require no @step parameter Above features allow us to shorten the parameter list. - Rename the function to btrfs_repair_bbio_failure() - Change the caller in btrfs_repair_eb_io_failure() to allocate a bbio Unlike the data read path, we do not have a handy bbio in that case. So we need to allocate one just for btrfs_repair_bbio_failure(). - Change the error reporting in btrfs_repair_bbio_failure() to include root id and use inode number directly Now for btree inode we will report a proper inode number (1). Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo Signed-off-by: David Sterba Stable-dep-of: d00b85308abe ("btrfs: raid56: do not verify the content if there is no data checksum") Signed-off-by: Sasha Levin commit 119d89c16ac257a1e1272392635a86e0d52357ab Author: Eva Kurchatova Date: Thu Nov 12 20:04:20 2026 -0500 hugetlbfs: enforce F_SEAL_EXEC in setattr [ Upstream commit b7f570e7cea761ec7eb4a3a9557a3a082d14e88c ] F_SEAL_EXEC is enforced by shmem_setattr(), but hugetlbfs_setattr() does not check it. As a result, fchmod() can change the execute bits of a sealed hugetlbfs memfd. Use memfd_check_seals_mode() in hugetlbfs_setattr() to reject changes to execute bits when F_SEAL_EXEC is set. This also fixes the memfd_test hugetlbfs SEAL-EXEC subtest, where fchmod() incorrectly succeeded after applying F_SEAL_EXEC. Fixes: 6fd7353829ca ("mm/memfd: add F_SEAL_EXEC") Cc: stable@vger.kernel.org Signed-off-by: Eva Kurchatova Link: https://patch.msgid.link/20260629180247.2343229-1-eva.kurchatova@virtuozzo.com Acked-by: Pedro Falcato Acked-by: Kiryl Shutsemau (Meta) Acked-by: Zi Yan Tested-by: Gregory Price (Meta) Reviewed-by: Muchun Song [ david: use common helper; fixup Fixes:; check only regular files ] Acked-by: Oscar Salvador Link: https://patch.msgid.link/20261029-fixes_shmem-v4-5-392fc715d8f6@kernel.org Signed-off-by: David Hildenbrand (Arm) [ sashal: Replaced the unavailable memfd_check_seals_mode() helper with an equivalent inline check. ] Signed-off-by: Sasha Levin commit 1276491ff0b796b70d119b3151728410ec6abdd8 Author: Leo Liu Date: Thu Nov 12 12:47:06 2026 -0500 drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg [ Upstream commit a56c2536c399d57a9bb1c02fd411e0c25859af3b ] When hw_init() fails, amdgpu_device_ip_fini_early() skips hw_fini() because status.hw was never set. For VCN, UVD (including UVD ENC), VCE, and JPEG, hw_fini() is where cancel_delayed_work_sync() is called. Any idle work queued during the partial hw_init() is therefore left pending after sw_fini() frees the adev state the handler touches. Cancel the idle work in each hw_init() error path, immediately before returning the error, so that hw_fini() remains the sole cancel site on the normal teardown path with no duplication. Link: https://github.com/ROCm/amdgpu/issues/234 Fixes: 416e1fab4752 ("drm/amdgpu: drop redundant cancel_delayed_work_sync call") Assisted-by: Claude:Claude-Sonnet-4.6 Signed-off-by: Leo Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher (cherry picked from commit 7ff2327fde029e97d0050fcb94e3f4063c318547) Cc: stable@vger.kernel.org [ sashal: Adjusted context and indentation in vcn_v5_0_2_hw_init() to account for the missing SR-IOV conditional. ] Signed-off-by: Sasha Levin commit 4c6974c76ce44c74059a18a8da4c4efddda02324 Author: Sonny Jiang Date: Thu Nov 12 12:47:05 2026 -0500 drm/amdgpu: VCN 5_0_2 disable VCN_RRMT [ Upstream commit 400af1fb41676c25966624b8ce0f5c09aee2a9b3 ] When RRMT is enabled, VCN firmware's register access is remapped so that VCN instances on different dies (VCN0/1 on MID0, VCN2/3 on MID1) require different target addresses for the same logical register. Remove the RRMT capability detection so the driver always assumes RRMT is disabled, using local-die SMN addresses for all instances. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher Stable-dep-of: a56c2536c399 ("drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg") Signed-off-by: Sasha Levin commit 89369989a55ef471b5bb4974c986984fbacb03a9 Author: Sonny Jiang Date: Thu Nov 12 12:47:04 2026 -0500 drm/amdgpu: Correct VCN V5_0_2 doorbell index setting [ Upstream commit 66421e37897ddd29c03a3290cd559f7c72622f80 ] Each VCN 5.0.2 instance has 11 doorbells. Use an 11-doorbell when calculating the per-instance VCN ring doorbell index. Signed-off-by: Sonny Jiang Reviewed-by: Boyuan Zhang Signed-off-by: Alex Deucher Stable-dep-of: a56c2536c399 ("drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg") Signed-off-by: Sasha Levin commit a42feb388bfe88dde719b36931c0933fae529a04 Author: Sonny Jiang Date: Thu Nov 12 12:47:03 2026 -0500 drm/amdgpu: Config VCN instance for soc_v1_0" [ Upstream commit ab2fb550bc1fabd96c948fdbebbc05f61a9810d6 ] Set up the default VCN instance mask and related instance counts during soc_v1_0 SOC configuration, before IP discovery is enabled. Signed-off-by: Sonny Jiang Reviewed-by: Leo Liu Signed-off-by: Alex Deucher Stable-dep-of: a56c2536c399 ("drm/amdgpu: cancel idle work in hw_init failure paths for vcn/uvd/vce/jpeg") Signed-off-by: Sasha Levin commit a235cad7d38d64cbaead131c178138bf00b43289 Author: Calvin Owens Date: Wed Nov 11 18:30:41 2026 -0500 Revert "drm/amd/display: Allocate DCN32/1 dmub memory to GTT" [ Upstream commit 5b3717a14ef602c961a4abeb2ce8039f0394bebb ] After commit a637a140ab860310 ("drm/amd/display: Allocate DCN32/1 dmub memory to GTT"), a machine with a Radeon RX 7900 shows random garbage on the screen. It reproduces sporadically, but at times it is so bad the machine is more or less unusable. The garbage is always horizontal bars extending across the entire screen, always approximately 200 pixels tall on a 3840x2160 screen, for what looks like a single frame. The bars are mostly black, but will sometimes exhibit striping and periodic artifacts which smell like non-framebuffer data is being rendered to the screen. It took some patience on the "good" side, but I was able to nail it down to commit a637a140ab860310818a14fb4d37e39e51a06be4 with this bisect: bad: [cee9395acd8043be0644b25c34bfa86623f2b935] Linux 7.3-rc1 good: [8d3ae59288f1e7d58d76558a6ee96d533bc5019f] Linux 7.2 good: [55ab7e14222e5f0b0fd9f7711ca391d2924b35e3] Merge tag 'for-7.3/block-20260819' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux bad: [df51bdc5e80dae43cab81f6cc641e98638303c88] Merge tag 'mtd/for-7.3' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux bad: [29daacacf4cd84e6917f09de6a99fb170071c14c] Merge tag 'drm-rust-next-2026-08-08' of https://gitlab.freedesktop.org/drm/rust/kernel into drm-next good: [fff648aec5e2790d117a0ec5c849a284d9d33d70] drm/amdgpu: include amdgpu_video_codecs.h only where needed bad: [336e0cd576817ac64a4b394ca2b3680029f3e37f] Revert "drm/amdgpu: fix aperture mapping leak" bad: [789f7486a384ca58b9d7a76abba5efa0e80e8dab] drm/amd/display: Test plane colorop helper walkers good: [e0e426f10ad653c5e9dd33fb4a76d55f06101992] drm/amd/display: Test helper_check_state rejects bad: [982b2a43682b55e7d9800000f2592832ff2865ba] drm/amdgpu: Fix IP block NULL check during soft reset bad: [9102b39fa924dcc3dc75a3137bfa9633c40b88c0] drm/amdgpu/userq: fix indefinite fence wait during GPU reset bad: [b23470a026afe64de5c1df4ad181587b49c22923] drm/amd/display: Exit LS for ISHARP before coefficient write bad: [f02b2e47355e9d381a7f34acc997e1c47879ca21] drm/amd/display: Add KUnit test for wb jobs bad: [c6a13d145cc811b19c8a0620f25868cf7d5700c0] drm/amd/display: remove unused dcn42 socbb values good: [1d8327353de6f1f34063840f362c208c84064f54] drm/amd/display: Fix VABC Init and OLED Support bad: [a637a140ab860310818a14fb4d37e39e51a06be4] drm/amd/display: Allocate DCN32/1 dmub memory to GTT first 'bad' commit: [a637a140ab860310818a14fb4d37e39e51a06be4] drm/amd/display: Allocate DCN32/1 dmub memory to GTT Sure enough, reverting a637a140ab860310818a14fb4d37e39e51a06be4 on top of v7.3 completely and totally eliminates the problem for me. Mikhail has separately reported this regression: https://lore.kernel.org/all/20260829010525.29935-1-mikhail.v.gavrilov@gmail.com/ ...but it seems to be much more consistent for me than for Mikhail, it's never taken more than 30 minutes even when the machine is completely idle. I've also never been able to reproduce any artifact one single time without commit a637a140, despite a lot of effort. I'm not sure reverting this is the right way forward, since presumably this would re-regress the timing issue Fangzhi alluded to in the original commit. But nobody has proposed anything concrete yet... so let's start the discussion here. I'm happy to help test other better ideas as well :) Fixes: a637a140ab86 ("drm/amd/display: Allocate DCN32/1 dmub memory to GTT") Closes: https://lore.kernel.org/all/20260829010525.29935-1-mikhail.v.gavrilov@gmail.com/ Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/5714 Reviewed-by: Alex Deucher Signed-off-by: Calvin Owens Signed-off-by: Alex Deucher (cherry picked from commit 899489d2e2aa854cf5e933677d6561dfcbb94529) Cc: stable@vger.kernel.org Signed-off-by: Sasha Levin commit 019739e177c18fb940a1247e2a0520f632abe1c3 Author: Maxime Chevallier Date: Fri Nov 13 14:01:23 2026 -0600 net: Use a dedicated flag to track disabled napi instances commit 8dc87fc5d6a0eb337744737008177342a708bf36 upstream. Trying to disable the napi threaded state while the napi instance is disabled will hang forever in napi_stop_kthread(), as it waits for NAPIF_STATE_SCHED_THREADED to clear. This won't happen until the next ____napi_schedule() call, which won't happen as it's disabled. This happens in 2 instances : - Drivers that create but don't use napi instances (stmmac's rxtx napi for AF_XDP for example), here it's a driver bug - Drivers that create their napi instances in .probe(). Here, setting threaded off while the interface is down will hang : ip link set eth0 down echo 1 > /sys/class/net/eth0/threaded echo 0 > /sys/class/net/eth0/threaded -> hang Checking on netif_running() isn't enough, as napi instances may be transiently disabled when changing the MTU for example, let's use a dedicated flag to track if the instance is disabled. This allows immediately disabling the kthread when the instance is disabled. This was tested on mvpp2 (probe-time napi_add) and stmmac. [ Backport: place the disabled state after the threaded busy-poll state; the adjacent per-CPU NAPI state is not present in 7.3.y. ] Fixes: 689883de94dd ("net: stop napi kthreads when THREADED napi is disabled") Tested-by: Daniel Machon Signed-off-by: Maxime Chevallier Link: https://patch.msgid.link/20261029153130.121204-1-maxime.chevallier@bootlin.com Signed-off-by: Jakub Kicinski Signed-off-by: Chris J Arges Signed-off-by: Sasha Levin commit b15cb2a3c074f6b240fd71d3f27850c4ca9af475 Author: Takashi Iwai Date: Thu Nov 12 20:00:31 2026 -0500 ALSA: pcm: Prevent O_APPEND open on OSS streams [ Upstream commit 9017bc3d13da0ea4e63be618c87143a7b69185e6 ] ALSA PCM core accepts to re-use the existing stream when O_APPEND is passed, and it's been used for dmix, etc. However, this mode isn't supposed to be used for OSS: the OSS stream allows re-configuration via its hw_params/hw_refine procedure even while it's being mmapped, so it implies the usage of only a single stream. Because of this assumption, the sanity check is skipped for OSS streams, and if user may attach to an existing OSS stream with O_APPEND, it may result in a UAF of the mapped pages which could be used as a privilege escalation exploit. For addressing it, this patch simply prohibits the O_APPEND behavior on the OSS stream. O_APPEND is never used for OSS layer itself, so this can't break for the right applications. Fixes: 0df63e44c3e3 ("[ALSA] Add O_APPEND flag support to PCM") Cc: stable@vger.kernel.org Reported-by: Bo Cao Link: https://lore.kernel.org/tencent_E90BB4F086165FAA3313723567A5C675EA06@qq.com Link: https://patch.msgid.link/20261103155844.120838-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin commit 6e6d0293b3898ae3a2530d1cf2df23e39d1ab9fe Author: Takashi Iwai Date: Thu Nov 12 20:00:30 2026 -0500 ALSA: pcm: Optimize cpu_latency_qos_*() calls [ Upstream commit 9f6f4e97fd53908aecb0979507d9ff10a22288eb ] We have a few cpu_latency_qos_*() calls in PCM callbacks, but they seem suboptimal in a few aspects: - We call them at each time when the hw_params changed, but explicitly do remove and (re-)add; this could be cpu_latency_qos_update_request(), instead - The setup of cpu_latency_qos_*() doesn't have to be in hw_params at all; it's not the place where the actual parameters are set up, but rather better at the prepare callback. - The hw_free calls cpu_latency_qos_remove_request() unconditionally, which may be poking a WARNING when it wasn't queued. For addressing the issues above, this patch cleans up and reorganize the cpu_latency_qos_*() calls in the PCM core by a couple helper functions. Now, they are set up at prepare callback, and cleared at hw_free and release callbacks via the new helpers. Link: https://patch.msgid.link/20261002150420.879056-1-tiwai@suse.de Signed-off-by: Takashi Iwai Stable-dep-of: 9017bc3d13da ("ALSA: pcm: Prevent O_APPEND open on OSS streams") Signed-off-by: Sasha Levin commit 7c63ce91ceadf078b35162a2648a495a12f1cb5c Author: Junjie Cao Date: Thu Nov 12 12:50:42 2026 -0500 Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728 [ Upstream commit df5e35f1663abc2702cf9f9e7eba024129ac5df1 ] Commit 5ead2063611a ("Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan") set HCI_QUIRK_BROKEN_EXT_SCAN on every RTL8761B, and commit ca0583c24661 ("Bluetooth: btusb: limit RTL8761B BROKEN_EXT_SCAN quirk to 0bda:a728") kept it on 0bda:a728 on the assumption that the USB id separates dongles with broken extended scan from those with a broken legacy scan path. It does not. An 0bda:a728 unit (RTL8761BUV, fw 0xdfc6d922) on 6.18.51 fails the same way the UB500 and 0bda:8771 did: LE Set Scan Enable (0x200c) times out with -110 and btusb resets the device. With the flag removed from the table entry, scanning works on that unit. Two dongles with the same USB id need opposite settings, so the device table cannot key the quirk either. The costs are not symmetric. Without the quirk, the unit it was written for gets -EBUSY on LE Set Extended Scan Enable (0x2042) while a connection is up. With it, 0x200c times out and btusb resets the device on three reported units, two of them in a re-enumeration loop. Remove the flag and the table entry. 0bda:a728 matches the generic Realtek entry again and runs without the quirk, as before v7.2. Reported-by: Andy Tsvetinskiy Closes: https://lore.kernel.org/all/CAE4bxw+ofDFVx0aTHqCrzns9oP1CRQDm_wzeyHPeMBYOhSpcuA@mail.gmail.com/ Fixes: 5ead2063611a ("Bluetooth: btrtl: fix RTL8761B/BU broken LE extended scan") Fixes: ca0583c24661 ("Bluetooth: btusb: limit RTL8761B BROKEN_EXT_SCAN quirk to 0bda:a728") Cc: stable@vger.kernel.org Signed-off-by: Junjie Cao Signed-off-by: Luiz Augusto von Dentz [ sashal: Adjusted context to account for the missing BTUSB_QUALCOMM definition. ] Signed-off-by: Sasha Levin commit 10ed5a995f9f8594f5f78d7c72ce054979e37378 Author: Zijun Hu Date: Thu Nov 12 12:50:41 2026 -0500 Bluetooth: btusb: Build the driver from multiple source files [ Upstream commit be58267a34ae562a4a6932f68f1487bceb0345d7 ] Allow the driver to include vendor USB-transport-specific source files by: - renaming btusb.c to btusb_main.c - making btusb.o a composite object Used by Qualcomm QCC2072 support. Signed-off-by: Zijun Hu Signed-off-by: Luiz Augusto von Dentz Stable-dep-of: df5e35f1663a ("Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728") Signed-off-by: Sasha Levin commit b987759650685f441531529e2f1d1f7c1ae8eb38 Author: Luiz Augusto von Dentz Date: Thu Nov 12 12:50:40 2026 -0500 Bluetooth: Move H:4 reassembly into the Bluetooth core [ Upstream commit 5299db91df03894253e8fa08627cfb9ec1429e89 ] h4_recv_buf() is currently implemented in hci_h4.c which is only built as part of the hci_uart module, and only when CONFIG_BT_HCIUART_H4 is enabled. That makes the H:4 reassembly logic unusable by drivers which do not depend on hci_uart, e.g. btusb which needs it to implement Bulk Serialization Mode. Move the transport agnostic part into the Bluetooth core as h4_recv_skb(), which takes a struct hci_dev instead of a struct hci_uart, along with struct h4_recv_pkt and the H4_RECV_* helpers, and keep h4_recv_buf() as a thin wrapper for the hci_uart protocols. Since every Bluetooth driver already depends on the bluetooth module this introduces no new module dependency and no new Kconfig symbol. Signed-off-by: Luiz Augusto von Dentz Stable-dep-of: df5e35f1663a ("Bluetooth: btusb: drop BROKEN_EXT_SCAN quirk for 0bda:a728") Signed-off-by: Sasha Levin commit 196f1110b8e1c277e6609184c9e25d7edf8d02af Author: Matt Turner Date: Sat Sep 5 15:29:38 2026 -0400 alpha: select SYSCTL_EXCEPTION_TRACE [ Upstream commit e517a172b77601839e1c52ac4303602e285804bb ] Report unhandled user faults the way other architectures do, and hook up the debug.exception-trace sysctl that controls the reporting. The message gives the faulting address, the PC and the user stack pointer, and is rate limited. Assisted-by: Claude:claude-opus-5 Signed-off-by: Matt Turner Tested-by: Magnus Lindholm Reviewed-by: Magnus Lindholm Link: https://lore.kernel.org/r/20260905-arch-kconfig-options-v2-v2-17-83e8245761a2@gmail.com Signed-off-by: Magnus Lindholm Signed-off-by: Sasha Levin commit f2d6e461217960754e3225b951527adba4ac437c Author: Gregory Price Date: Sat Oct 31 10:39:55 2026 +0100 mm/userfaultfd: compare exact registration modes before skipping [ Upstream commit 05f64f211a25f7d9771d4fde109aad97174a1cf3 ] Changing registration from MISSING|WP to WP returns success but leaves MISSING enabled. The no-op check sees that WP is already set and skips the update, so later accesses to missing pages still wait for userspace. Skip the update only when the current and requested UFFD modes match exactly. Fixes: 63b2d4174c4a ("userfaultfd: wp: add the writeprotect API to userfaultfd ioctl") Cc: stable@vger.kernel.org Signed-off-by: Gregory Price (Meta) [ david: apply fixup from Lorenzo ] Tested-by: Muhammad Usama Anjum Link: https://patch.msgid.link/20261031-fixes_core-v3-26-d6437171ecc3@kernel.org Signed-off-by: David Hildenbrand (Arm) Signed-off-by: Sasha Levin commit 38f0414192e7ed0a7f250a64d5dfacd6d6139098 Author: Eric Dumazet Date: Wed Nov 4 13:29:27 2026 +0100 inet: frags: bound the wmem charge of the socket completing a reassembly [ Upstream commit b71c101bbb9814d163c00234d43c41f0a17907d4 ] When a socket owned fragment completes a reassembly queue, inet_frag_reasm_prepare() and inet_frag_reasm_finish() charge the truesize of all other fragments to its sk_wmem_alloc. These fragments were orphaned when queued, and might have been sent by someone else, for instance padded TUN packets. Commit 3ae20e4697eb ("inet: frags: limit the truesize of a reassembly queue") bounds this charge to INT_MAX / 2 per queue, but a socket can complete several queues while the reassembled skbs are still alive, for instance held in a qdisc. sk_wmem_alloc can then go past INT_MAX, refcount_add() saturates it with a WARN, and the socket is leaked. This is reachable from an unprivileged user/network namespace, by raising ipfrag_high_thresh. Refuse the reassembly if the charge would push sk_wmem_alloc above 2 * sk_sndbuf, the bound ip_append_data() uses, plus 4MB of slack for fragments inflated by a refragmentation with a small MTU, and never above INT_MAX / 2. The cap matters for tun sockets, which use sk_sndbuf = INT_MAX, and whose skbs are still owned when act_ct or openvswitch reassemble them at ingress. Several queues can complete at the same time on different cpus for the same socket, so the charge is reserved with a cmpxchg() loop in inet_frag_reasm_prepare(), before it modifies the queue, and settled in inet_frag_reasm_finish(). Move the size checks of ip_frag_reasm(), ip6_frag_reasm() and nf_ct_frag6_reasm() before inet_frag_reasm_prepare(), using the first fragment which becomes the head, so that a successful inet_frag_reasm_prepare() is always followed by inet_frag_reasm_finish(). All callers already kill the queue when inet_frag_reasm_prepare() returns NULL. Found by code inspection (AI review), not reproduced. Fixes: 18685451fc4e ("inet: inet_defrag: prevent sk release while still in use") Reported-by: Paolo Abeni Closes: https://lore.kernel.org/netdev/24feda7d-ae49-45af-9596-2cc5f149f28e@redhat.com/ Signed-off-by: Eric Dumazet Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20261104122927.1033747-1-edumazet@kernel.org Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit b49027f1701710647a5cdf34727b8d1fedc6d143 Author: Ciro Pedrini Date: Wed Nov 11 21:05:35 2026 -0500 platform/x86: hp-wmi: Add OMEN board 8A17 thermal profile support [ Upstream commit d35a1ea827a2efaea7fb059ffafefae7c13b9556 ] The HP OMEN 17-ck1xxx (board 8A17) isn't in omen_thermal_profile_boards, so hp-wmi uses the generic thermal profile query. The firmware only stores that value and never acts on it, so the EC stays in its default mode and the CPU is held at 45 W whatever profile is selected. The board uses the OMEN interface (mode byte at EC 0x95, thermal policy v1) and also needs the timed profile quirk: without it, the EC drops back to the default mode about two minutes after each profile change. Add 8A17 to omen_thermal_profile_boards and omen_timed_thermal_profile_boards. With this, all three profiles work and sustained package power under load goes from 45 W to 56-79 W. Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Ciro Pedrini Link: https://patch.msgid.link/20260925205226.883724-1-ciro.pedrini@gmail.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen [ sashal: Adjusted board-list context to account for the missing neighboring 8A18 entry. ] Signed-off-by: Sasha Levin commit 8ebfb42150d5e93f1647378d93ad238ed6bc4bf4 Author: Lorenzo Stoakes (ARM) Date: Wed Nov 11 22:10:50 2026 -0500 mm/vma: fix expansion of VMA_MIXEDMAP_BIT VMAs [ Upstream commit 8146c6478224d8f6395c6b08a19c344a56d79867 ] Commit ca3d76b0aa80 ("mm: add merging after mremap resize") combined merging with expansion of mremap()'d VMAs, however it also unintentionally disallowed the expansion of unmergeable VMAs. Previously it was possible to expand a mixed mapping which mremap() had already ensured was a legal expansion. This is clearly seen in the mremap() logic, as it checks vma_is_fixed_mapping() to determine legality of an expansion rather than vma_can_merge(). Additionally, copy_vma() allows for a failed merge to result in a new VMA being instantiated if MREMAP_MAYMOVE is specified. However, this is not attempted, as a failure in vma_merge_extend() is assumed to be an -ENOMEM failure. Since vma_merge_extend() is used exclusively by mremap() to perform a merge and/or expansion, resolve the issue by invoking vma_expand() for unmergeable VMAs there. Explicitly assert that the VMA is both non-fixed and a mixed mapping. This provides double insurance against broken changes in future. Note that khugepaged_enter_vma() (which vma_merge_new_range() runs) is redundant in this case, as a mixed mapping is not subject to khugepaged. Also update the VMA userland tests to add a required predicate. Link: https://lore.kernel.org/20261023-vma-expansion-fix-v1-1-6142baf1f46b@kernel.org Fixes: ca3d76b0aa80 ("mm: add merging after mremap resize") Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Andrew Morton Reported-by: Luiz Capitulino Closes: https://lore.kernel.org/all/20261023023106.515365-1-luizcap@redhat.com/ Acked-by: Vlastimil Babka (SUSE) Reviewed-by: Pedro Falcato Cc: Liam R. Howlett Cc: Jann Horn Cc: Jakub Matěna Cc: [ sashal: Replaced vma_can_merge() and vma_is_fixed_mapping() with equivalent flag checks and is_vm_hugetlb_page(). ] Signed-off-by: Sasha Levin commit 23799d77a244aaa9c3c5f7d505d5cf76325729c6 Author: Chao Yu Date: Wed Nov 11 21:52:55 2026 -0500 f2fs: fix to fetch ino via ino_of_node() under cache lock [ Upstream commit cd6d8b1891395b681f2060916a4b83880b765698 ] In f2fs_writeback_node_caches(), it's better to fetch ino via ino_of_node() under cache lock, otherwise, node cache content may become stale after cache is unlocked due to racing w/ truncation. Commit 493b9dc8b52c ("f2fs: cache: use node cache") fixes similar issue in f2fs_flush_inline_data() introduced in commit 34c061ad85a2 ("f2fs: Avoid double lock for cp_rwsem during checkpoint"). Cc: stable@kernel.org Fixes: 2049d4fcb057 ("f2fs: avoid multiple node page writes due to inline_data") Signed-off-by: Chao Yu Signed-off-by: Jaegeuk Kim [ sashal: adapted cache-entry operations in f2fs_writeback_node_caches() to folio operations in f2fs_sync_node_pages() ] Signed-off-by: Sasha Levin commit d2594e1a49c1cb45561cb7543d139627beb47f43 Author: Sahil Chandna Date: Wed Nov 11 21:23:45 2026 -0500 net: mana: Add support to process throttled EQEs [ Upstream commit 684603842b78f75835d21fdf5c19ae717ed8eb1a ] When an event queue nears full, the hardware coalesces the per-CQ GDMA_EQE_COMPLETION notifications into a single throttle EQE (type 4) that carries no cq_id. The driver does not handle this event type, so it falls through to the default case and is dropped. Any CQ whose completion notification was replaced by the throttle EQE can remain unserviced, causing its queue to stall. This was observed internally as a TX stall: ens1: NETDEV WATCHDOG: CPU: 45: transmit queue 1 timed out 15133 ms mana 7870:00:00.0: HWC: Request timed out: 60000 ms mana 7870:00:00.0: Gf stats wk handler: gf stats query timed out. ens1: NETDEV WATCHDOG: CPU: 20: transmit queue 0 timed out 15859 ms ens1: NETDEV WATCHDOG: CPU: 15: transmit queue 0 timed out 31731 ms ens1: NETDEV WATCHDOG: CPU: 21: transmit queue 0 timed out 47603 ms ens1: NETDEV WATCHDOG: CPU: 42: transmit queue 0 timed out 62451 ms Handle the throttle EQE: - Record up to two child CQs per EQ when a CQ is created with a parent EQ. A mana_en EQ serves one TX CQ and one RX CQ, and the HWC EQ serves the HWC CQ. - On a throttle EQE, call the callback of each child CQ that is still in cq_table[]. - Before a child CQ is freed, unlink it from its parent EQ and from cq_table[] in mana_gd_detach_cq(), then wait for an RCU grace period, because mana_gd_intr() reads both under rcu_read_lock(). mana_destroy_txq() and mana_destroy_rxq() detach the CQ before deleting its NAPI, so the synchronize_net() that NAPI deletion already needs also covers the CQ. mana_hwc_destroy_channel() detaches the HWC CQ and waits for a grace period before freeing the HWC queues. - Advertise the capability bit for throttled EQE. - Add a throttle eqe counter per queue. Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)") Cc: stable@vger.kernel.org Signed-off-by: Sahil Chandna Link: https://patch.msgid.link/20261028084020.2051254-1-sahilchandna@linux.microsoft.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin commit 1fa999eb8391f5c70ce5f5fd163499e00a73c181 Author: Manish Awasthi Date: Wed Nov 11 21:23:44 2026 -0500 net: mana: Introduce gdma_bus_ops for bus-specific operations [ Upstream commit c03e69c95a18e957dd461d60bd343e0488a986c4 ] Introduce per-device gdma_bus_ops for interrupt allocation, IRQ lookup, reset, servicing, and bus-specific capabilities. Route the shared GDMA code through these callbacks and provide the PCI implementation. Move common device bring-up and teardown into mana_gd_setup() and mana_gd_cleanup(), including hardware-channel initialization, device enumeration, interrupt-pool sizing, and servicing workqueue management. Record the vPort count for transport-specific queue sizing and keep shared IRQ context bookkeeping in the core. This prepares the driver for additional bus transports without duplicating the core or adding configuration checks throughout it. Signed-off-by: Manish Awasthi Reviewed-by: Simon Horman Reviewed-by: Haiyang Zhang Link: https://patch.msgid.link/20260924173054.589291-2-mawasthi@linux.microsoft.com Signed-off-by: Jakub Kicinski Stable-dep-of: 684603842b78 ("net: mana: Add support to process throttled EQEs") Signed-off-by: Sasha Levin commit 84c248200c188a39c5d2d004ac055f9704f72372 Author: HOYOUNG SEO Date: Wed Nov 11 18:22:22 2026 -0500 scsi: ufs: core: Change the error check sequence for auto hibern8 [ Upstream commit 6b2ff2b3eafa381db9b4c8a6ed98b353b2a09f39 ] Auto-hibern8 enter and exit are performed by the host controller without a UIC command, and the auto-hibern8 idle timer only runs while no UIC command is outstanding. An auto-hibern8 error (IS.UHES or IS.UHXS) is therefore usually reported while hba->active_uic_cmd is NULL. Since commit fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze"), ufshcd_uic_cmd_compl() returns early when hba->active_uic_cmd is NULL, before ufshcd_is_auto_hibern8_error() is called. Such auto-hibern8 errors are no longer recorded in hba->errors, so ufshcd_check_errors() is not called for them and the error handler is not scheduled. Check for auto-hibern8 errors before checking for an active UIC command, as was done before that commit, but keep returning early when there is no active UIC command so that a NULL cmd is never dereferenced. Only report the missing UIC command if no auto-hibern8 error was found. Fixes: fcd8b0450a9a ("scsi: ufs: core: Make ufshcd_uic_cmd_compl() easier to analyze") Cc: stable@vger.kernel.org # v6.13+ Signed-off-by: HOYOUNG SEO Reviewed-by: Stanley Jhu Reviewed-by: Bean Huo Reviewed-by: Bart Van Assche Link: https://patch.msgid.link/20261027110357.3649301-1-hy50.seo@samsung.com Signed-off-by: Martin K. Petersen (Oracle) [ sashal: Retained hba->host->host_lock without the address-of operator because host_lock is a pointer. ] Signed-off-by: Sasha Levin commit a23b005bb2caabb3723c608a66902da13496ea1f Author: David Hildenbrand (Arm) Date: Wed Nov 11 17:55:16 2026 -0500 mm/userfaultfd: wake waiters when registration modes are removed [ Upstream commit 4eee9c389b072e161549d46dcb1ae10b0222717e ] UFFDIO_REGISTER can replace MISSING or MINOR tracking without waking faults that are already queued. For example, switching an anonymous range from MISSING to WP leaves a missing-fault waiter asleep until userspace explicitly wakes it. When a registration change removes a UFFD mode, wake waiters in the affected interval after updating the VMA. The VMA is write-locked at this point, so no new faults can queue under the old modes and woken threads cannot retry until mmap_write_unlock(). Waiters for retained modes in the same interval may also wake and refault. The hang reproduces for MISSING-to-WP and MINOR-to-MISSING transitions, with both read and unread fault events. Fixes: 63b2d4174c4a ("userfaultfd: wp: add the writeprotect API to userfaultfd ioctl") Cc: stable@vger.kernel.org Reviewed-by: Gregory Price (Meta) Tested-by: Gregory Price (Meta) Signed-off-by: Gregory Price (Meta) Reviewed-by: Mike Rapoport (Microsoft) Reviewed-by: Lorenzo Stoakes (ARM) Tested-by: Muhammad Usama Anjum Link: https://patch.msgid.link/20261031-fixes_core-v3-25-d6437171ecc3@kernel.org Signed-off-by: David Hildenbrand (Arm) [ sashal: Adjusted context to retain is_vm_hugetlb_page() instead of vma_is_hugetlb(). ] Signed-off-by: Sasha Levin commit b144d274b841d5a34b82c383f253e850a26be2e4 Author: Ali Ahmet Memiş Date: Wed Nov 11 17:23:39 2026 -0500 platform/x86: ideapad-laptop: Evaluate ACPI methods exclusively [ Upstream commit f91c2cd6dbcedf52e227b2eea8d7b99ecbac7552 ] On some Lenovo IdeaPad and Yoga models, the battery _BIX takes the EC AML mutex and then calls the serialized RDER through RDIF, while GBMD calls RDER first and then takes the EC mutex. When the two run interleaved they deadlock until the mutex acquisition in RDER times out, and GBMD returns garbage that is reported as both charge types being enabled. Evaluate all methods with the exclusive helpers, so that GBMD never runs interleaved with the battery methods. Link: https://bugzilla.kernel.org/show_bug.cgi?id=221065 Link: https://lore.kernel.org/all/58586fa666f09c209f9d7fe8c692a8bdda6d4410.camel@rong.moe/ Signed-off-by: Ali Ahmet Memiş Reviewed-by: Rong Zhang Cc: All applicable # 80892972ff23 ACPI: utils: Add exclusive AML evaluation helpers Link: https://patch.msgid.link/20261018122348.679126-1-aliamemis@disroot.org Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin commit 0edd3a7cd5185cbb616316731c3c5dd0e0442b4e Author: Eklavya Singh Date: Wed Nov 11 17:00:59 2026 -0500 ocfs2/heartbeat: serialize concurrent writes to a region's dev attribute [ Upstream commit 0a8f258c0f012314c36b9e4818cdc0178c68f891 ] o2hb_region_dev_store() checks reg->hr_bdev_file to see if the region is already started, but nothing stops two writers from doing that at the same time. configfs only serializes writes through the same open file, so two processes that each open the dev attribute can both get past the check: A: hr_bdev_file is NULL, opens file A, sets hr_bdev_file = A B: hr_bdev_file is NULL, opens file B, sets hr_bdev_file = B A: start fails, fput(hr_bdev_file) drops B, sets it to NULL B: start fails, fput(NULL) Both calls also use the same hr_slots, hr_slot_data and hr_tmp_block, so the error paths can free the slot data twice. syzbot hit the fput(NULL) with an unbound loop device, where every start fails with -EIO. With four threads doing the same thing on a KASAN kernel I get both crashes within a second: BUG: KASAN: double-free in o2hb_unmap_slot_data+0x14d/0x2f0 BUG: kernel NULL pointer dereference, address: 0000000000000158 Add a mutex to the region and hold it in dev_store(), in the block_bytes, start_block and blocks stores, and in dev_show(), since they all look at hr_bdev_file. dev_store() cleans up with goto, so it takes the mutex in a small wrapper rather than with guard(). The mutex is dropped while dev_store() waits for the heartbeat to become steady, which takes seconds, so a read of dev doesn't stall behind a start. hr_bdev_file is already set at that point, so other writers still get -EINVAL, and the cleanup after the wait retakes the mutex. With the patch the same test ran for 10 minutes with lockdep on and nothing was reported. So did a second one, with a working loop device, that interrupts starts during the wait while other threads read and write the attributes. Link: https://lore.kernel.org/20261020212339.46591-1-eklavyasingh2106@gmail.com Fixes: a7f6a5fb4bde ("[PATCH] OCFS2: The Second Oracle Cluster Filesystem") Signed-off-by: Eklavya Singh Signed-off-by: Andrew Morton Reported-by: Closes: https://syzkaller.appspot.com/bug?extid=5d4e96acd0febccb5e87 Reviewed-by: Joseph Qi Cc: Mark Fasheh Cc: Joel Becker Cc: Heming Zhao Cc: Deepanshu Kartikey Cc: Cen Zhang Cc: Signed-off-by: Sasha Levin commit 209d372db6827617329f7129253044d0fcd854bb Author: Karl Mehltretter Date: Wed Nov 11 17:00:58 2026 -0500 ocfs2/cluster: hold a reference on the heartbeat thread [ Upstream commit aa2e38aabaae87236290e486a2b77cfa3adfbebe ] Since commit 688bc88e2046 ("ocfs2/cluster: keep heartbeat local node stable"), o2hb_thread() leaves its loop and returns when the local node changes, for example after "echo 0 > node//local". The thread was started with kthread_run() and nothing holds a reference to its task_struct, so the task is freed once it exits, while reg->hr_task still points to it. Reading the region's pid attribute then reads the freed task, and removing the region calls kthread_stop() on it: BUG: KASAN: slab-use-after-free in o2hb_region_pid_show+0xb3/0xc0 refcount_t: addition on 0; use-after-free. Oops: Oops: 0000 [#1] SMP KASAN NOPTI RIP: 0010:kthread_stop+0xb1/0x390 The thread could already return by itself before, when heartbeat start was aborted or on an unclean stop, but the local node change makes it reachable from userspace at any time. Create the thread, take a reference on it and only then wake it, so the reference cannot race with the thread exiting. Drop it with kthread_stop_put(). Link: https://lore.kernel.org/20260923010149.14391-1-kmehltretter@gmail.com Fixes: 688bc88e2046 ("ocfs2/cluster: keep heartbeat local node stable") Signed-off-by: Karl Mehltretter Signed-off-by: Andrew Morton Reported-by: Sashiko Closes: https://sashiko.dev/#/patchset/20260616074931.3774929-1-zzzccc427%40gmail.com Reviewed-by: Joseph Qi Assisted-by: LLM Cc: Mark Fasheh Cc: Joel Becker Cc: Cen Zhang Cc: Junxiao Bi Cc: Heming Zhao Stable-dep-of: 0a8f258c0f01 ("ocfs2/heartbeat: serialize concurrent writes to a region's dev attribute") Signed-off-by: Sasha Levin commit a336cd46459c1a7608cc805ec04a59890e993baa Author: Lorenzo Stoakes (ARM) Date: Wed Nov 11 15:02:32 2026 -0500 mm: do not unintentionally overwrite atomic VMA flags [ Upstream commit 13fc99f46399c9d38d1b54ecf0a3f387ba04d05d ] Patch series "mm: avoid losing atomic VMA flags", v1. Since commit 2ab7f1bbafc9 ("mm/madvise: allow guard page install/remove under VMA lock"), VMA_MAYBE_GUARD_BIT can be set atomically under the VMA read lock. However, a number of places wrongly assume the flags are stable under the read lock, which can cause stale atomic VMA flags to overwrite existing valid ones. Additionally, one case in which VMA_SOFTDIRTY_BIT was overwritten is also addressed. This series addresses each of these, while keeping the logic inline with existing conventions. Each patch in this series is a hotfix. This patch (of 4): madvise, mlock and mprotect take a copy of a VMA's flags holding only the VMA read lock, later writing it back under the write lock (in madvise_update_vma(), mlock_fixup(), mlock_vma_pages_range() and mprotect_fixup()). This was done on the assumption that VMA flags cannot change with a read lock held. However this changed in commit 2ab7f1bbafc9 ("mm/madvise: allow guard page install/remove under VMA lock"), which allowed VM_ATOMIC_SET_ALLOWED flags (currently only VMA_MAYBE_GUARD_BIT) to be written concurrently under a VMA read lock. The actual write itself is safe as this is done under the VMA write lock at which point no further concurrent writes can occur, however at this point the stale flags mean that these callers can unintentionally overwrite atomic flags incorrectly. The consequences of this are significant - a missing VMA_MAYBE_GUARD_BIT could result in page tables not being copied on fork (the vma_needs_copy() check can return false) or being overwritten on file-backed THP collapse (the file_backed_vma_is_retractable() can return true). Resolve the issue by always taking care to retain existing atomic flags when overwriting VMA flags, replacing the inconsistently named vma_flags_reset_once() with vma_overwrite_flags() to do so, and always invoking it when flags are overwritten like this. Reads are a problem too - madvise, mlock and mprotect all compare VMA flags without a VMA write lock held via vma_flags_same_pair(). This has more serious impact, as concurrent changes to atomic VMA flags can cause two sets of VMA flags to be wrongly considered different. For mprotect and madvise this causes a useless split, but mlock is impacted more seriously as it can result in mm->locked_vm underflow. Fix this by updating vma_flags_same_pair() to disregard VM_ATOMIC_SET_ALLOWED VMAs - VMA equality is the same as VMA mergeability, and atomic VMA flags are disregarded when comparing VMA flags for merge - so this is justified semantically. Additionally, remove the redundant vma_flags_same_mask() and the unused vma_flags_same() as part of the change, and replace VM_ATOMIC_SET_ALLOWED with VMA_ATOMIC_SET_ALLOWED, using the new VMA flag API. Finally, update userland VMA tests to reflect the changes. Link: https://lore.kernel.org/20261023-fix-vma-atomic-v1-0-8ff4fae1fc85@kernel.org Link: https://lore.kernel.org/20261023-fix-vma-atomic-v1-1-8ff4fae1fc85@kernel.org Fixes: 2ab7f1bbafc9 ("mm/madvise: allow guard page install/remove under VMA lock") Signed-off-by: Lorenzo Stoakes (ARM) Signed-off-by: Andrew Morton Suggested-by: David Hildenbrand (Arm) Acked-by: David Hildenbrand (Arm) Reviewed-by: Pedro Falcato Tested-by: Gregory Price (Meta) Cc: Liam R. Howlett Cc: Vlastimil Babka Cc: Mike Rapoport Cc: Suren Baghdasaryan Cc: Michal Hocko Cc: Jann Horn Cc: Davidlohr Bueso Cc: SJ Park Cc: Kees Cook Cc: Colin Cross Cc: [ sashal: adapted mlock page-walk flag writes to the existing temporary VMA_IO_BIT protocol instead of walk_flags. ] Signed-off-by: Sasha Levin commit d159f2fbe082e24100bb09468d73a3796b6f17b8 Author: Priyank Rathod Date: Wed Nov 11 13:27:48 2026 -0500 PCI/AER: Fix memory leak in aer_recover_work_func() when pci_dev is missing [ Upstream commit d4c842c3af5bc52b3ca0b8a7f116114e43b6ba44 ] When ACPI APEI/GHES processes PCIe AER error records, it allocates memory for aer_capability_regs (entry.regs) from ghes_estatus_pool and queues the entry into aer_recover_ring. In aer_recover_work_func(), items are popped from aer_recover_ring via kfifo_get(). If pci_get_domain_bus_and_slot() fails to find a matching pci_dev, the code previously executed 'continue', bypassing the call to ghes_estatus_pool_region_free(). As a result, the memory allocated for entry.regs from ghes_estatus_pool was leaked. This is reachable whenever the device reported by firmware is not (or is no longer) present in the PCI device tree, e.g. after hot-removal or when firmware reports an error for a device the kernel never enumerated. Refactor aer_recover_work_func() to ensure ghes_estatus_pool_region_free() is called unconditionally for every dequeued entry, releasing the pool memory even when pci_dev is missing. Fixes: e2abc47a5a1a ("ACPI: APEI: Fix AER info corruption when error status data has multiple sections") Signed-off-by: Priyank Rathod Signed-off-by: Bjorn Helgaas Reviewed-by: Kuppuswamy Sathyanarayanan Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260928-b4-fix-aer-memleaks-v5-2-ba6b94c9c9a6@google.com [ sashal: Combined the upstream pdev recovery guard with the existing err check to preserve false-alarm filtering. ] Signed-off-by: Sasha Levin commit f53ee5a65460010cabd75895d83258d90923ca7a Author: Josef Bacik Date: Wed Nov 11 21:19:32 2026 -0500 mm/shmem: hold off eviction in shmem_writeout() [ Upstream commit 8f59173b5ca358bf4d1017b44da3cbe6faa80daf ] Once shmem_writeout() has moved the folio from the page cache to the swap cache, the folio lock no longer keeps the inode alive: truncation and eviction find a swap entry, free it and do not wait for anybody. That did not matter as long as swap_writeout() was the last thing the function did. But since it puts the folio back when swap_writeout() returns AOP_WRITEPAGE_ACTIVATE, it uses the mapping and the inode afterwards: reclaim last close of an unlinked file shmem_writeout() shmem_delete_from_page_cache() swap_writeout() zswap_store() fails shmem_evict_inode() writeback is disabled shmem_truncate_range() return AOP_WRITEPAGE_ACTIVATE shmem_free_swap() destroy_inode() ... RCU grace period, freed shmem_add_to_page_cache(mapping) xas_lock_irq() <- use after free swap_writeout() behaves that way if zswap is enabled, cannot take the folio and the memcg or one of its ancestors has memory.zswap.writeback set to 0. shmem_unuse() already added infrastructure to deal with that. Reuse info->stop_eviction to protect the inode during writeout. Increment it before removing the folio from the page cache, and decrement it after swap_writeout() and any attempted reinsertion and inode accounting. In shmem_evict_inode(), wait for the counter to reach zero even if swapoff has already removed the inode from the swap list. Add some helpers to make the code easier to digest. There is a known remaining issue with two swapoffs racing, and the empty list check not being able to detect that race. That will be addressed separately later. Fix generated by an LLM and sent by Josef Bacik in private. Fixes: 6344a6d9ce13 ("mm/shmem: writeout free swap if swap_writeout() reactivates") Cc: stable@vger.kernel.org Signed-off-by: Josef Bacik Acked-by: Pedro Falcato Acked-by: Kiryl Shutsemau (Meta) Reviewed-by: Nhat Pham Reviewed-by: Baolin Wang Tested-by: Baolin Wang [ david: code cleanups; improve description ] Tested-by: Gregory Price (Meta) Link: https://patch.msgid.link/20261029-fixes_shmem-v4-6-392fc715d8f6@kernel.org Signed-off-by: David Hildenbrand (Arm) [ sashal: expanded upstream eviction helpers inline at their call sites to avoid adding new functions ] Signed-off-by: Sasha Levin commit 80461b4cf0dde46f592cf57451a8cb9cad4f9bd0 Author: Yizhou Zhao Date: Wed Nov 11 18:24:40 2026 -0500 9p/xen: drain response work after unbinding IRQ [ Upstream commit 7b6f2e3c29fb4d76f1e4973280792eabbd526602 ] commit ea4f1009408e ("9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition") added cancel_work_sync() to keep xen_9pfs_front_free() from freeing a ring while p9_xen_response() is still running. The work is currently drained before the event channel IRQ is unbound. That leaves a race window where xen_9pfs_front_event_handler() can run after cancel_work_sync() returns and queue p9_xen_response() again. The following unbind_from_irqhandler() synchronizes with the IRQ handler, but it does not cancel work that the handler already queued. The teardown can then free the ring and private data while the response work remains pending, and the worker later dereferences ring->priv and priv->client. Unbind the event channel IRQ before draining the work. Once the IRQ is unbound, no new response work can be queued by the backend event channel, and cancel_work_sync() waits for any work that was queued before or during the unbind. It is then safe to release the ring resources. Fixes: ea4f1009408e ("9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition") Cc: stable@vger.kernel.org Reported-by: Yizhou Zhao Reported-by: Yuxiang Yang Reported-by: Ao Wang Reported-by: Xuewei Feng Reported-by: Qi Li Reported-by: Ke Xu Assisted-by: GLM:GLM-5.1 Signed-off-by: Yizhou Zhao Message-ID: <20260609155202.1706-1-zhaoyz24@mails.tsinghua.edu.cn> Signed-off-by: Dominique Martinet [ sashal: Adjusted indentation to fit the existing if (priv->rings) cleanup wrapper for separately allocated rings. ] Signed-off-by: Sasha Levin commit 98c9b4348b33c7e575dff7d4dbac6df8e2f638e8 Author: Sean Christopherson Date: Wed Nov 11 12:04:52 2026 -0500 KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM [ Upstream commit 053621535f014085c935879582dd3b65964a0dce ] When doing RSM to L2, validate L1's state after copying it back into vmcb01 from SMRAM, as SMRAM is carved out of guest memory, i.e. is writable by the guest. Failure to validate L1's state is especially problematic for inputs to MMU context, as KVM can end up with impossible CR4 vs. EFER state. E.g. without the recent hardening FNAME(walk_addr_generic), a guest can trigger: ------------[ cut here ]------------ UBSAN: array-index-out-of-bounds in arch/x86/kvm/mmu/paging_tmpl.h:435:15 index 3 is out of range for type 'u32 [2]' CPU: 3 UID: 0 PID: 92 Comm: CPU 1/KVM Not tainted 7.3.0-rc1 #2 PREEMPT(lazy) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.17.0-0-gb52ca86e094d-prebuilt.qemu.org 04/01/2014 Call Trace: dump_stack_lvl+0x5f/0x90 dump_stack+0x10/0x18 ubsan_epilogue+0x9/0x39 __ubsan_handle_out_of_bounds.cold+0x50/0x55 paging32_walk_addr_generic+0x889/0x970 paging32_page_fault+0x79/0xa60 kvm_mmu_do_page_fault+0x125/0x270 kvm_mmu_page_fault+0x88/0x7b0 npf_interception+0xc8/0x220 [kvm_amd] svm_invoke_exit_handler+0x16d/0x1d0 [kvm_amd] svm_handle_exit+0xb7/0x160 [kvm_amd] vcpu_enter_guest+0x428/0x16a0 kvm_arch_vcpu_ioctl_run+0x479/0x920 kvm_vcpu_ioctl+0x316/0xb00 __x64_sys_ioctl+0xa3/0x100 x64_sys_call+0x281/0x23d0 do_syscall_64+0xba/0x550 entry_SYSCALL_64_after_hwframe+0x76/0x7e RIP: 0033:0x79bb30deb04b ---[ end trace ]--- Fixes: 37be407b2ce8 ("KVM: nSVM: Fix L1 state corruption upon return from SMM") Cc: stable@vger.kernel.org Reported-by: Bill Wendling Reported-by: Stefan Teodorescu Tested-by: Stefan Teodorescu Signed-off-by: Sean Christopherson Message-ID: <20261022021046.295001-1-seanjc@google.com> Signed-off-by: Paolo Bonzini Signed-off-by: Sasha Levin commit 49c08193b4e4fe8edc9523c2dac0221bc0cc7c84 Author: Shivansh Dhiman Date: Wed Nov 11 12:04:51 2026 -0500 KVM: SVM: Add a vCPU-aware helper to get supported DEBUGCTL bits [ Upstream commit cd0e6f4d7cec11be97fe6476309719b23ab5accb ] Replace DEBUGCTL_RESERVED_BITS with a vCPU-aware helper that provides the set of supported bits so that KVM can handle bits that are conditionally supported based on the vCPU model, e.g. for features like Bus Lock Detect. No functional change intended. Signed-off-by: Shivansh Dhiman Reviewed-by: Nikunj A Dadhania [sean: invert from reserved => supported, massage changelog] Link: https://patch.msgid.link/20260930193634.3415089-12-seanjc@google.com Signed-off-by: Sean Christopherson Stable-dep-of: 053621535f01 ("KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM") Signed-off-by: Sasha Levin