summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-08riscv: dts: sophgo: cv180x: Fix internal ephy node nameChen-Yu Yeh
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 <inochiama@gmail.com> Reviewed-by: Hiago De Franco <hfranco@baylibre.com> Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com> Link: https://patch.msgid.link/20261005093749.645014-3-chenyou910331@gmail.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <chen.wang@linux.dev>
2026-10-08riscv: dts: sophgo: add Milk-V Duo 256M ethernet support overlayChen-Yu Yeh
The SG2002 has an internal 10/100 Ethernet PHY, but on the Milk-V Duo 256M the Ethernet signals only reach the RJ45 connector on the optional USB & Ethernet IO board. The MAC (gmac0) and the MDIO multiplexer used to reach the internal PHY are already described in cv180x.dtsi but are disabled, and they cannot be enabled in the board devicetree because without the IO board the same pins may be used as GPIO. Add an overlay that enables them. Tested on Milk-V Duo 256M with the USB & Ethernet IO board: the link comes up at 100Mbps/Full, the interface gets an address via DHCP and passes traffic in both directions. Without the overlay, eth0 does not appear. Reviewed-by: Hiago De Franco <hfranco@baylibre.com> Signed-off-by: Chen-Yu Yeh <chenyou910331@gmail.com> Link: https://patch.msgid.link/20261005093749.645014-2-chenyou910331@gmail.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <chen.wang@linux.dev>
2026-10-08riscv: dts: sophgo: Limit SG2042 SPI NOR to 12.5 MHzHan Gao
Use 12.5 MHz on the SG2042 EVBs and Milk-V Pioneer to match the vendor kernel. The existing 50 MHz limit raises SCK once the driver starts honoring spi-max-frequency. Signed-off-by: Han Gao <gaohan@iscas.ac.cn> Link: https://patch.msgid.link/20261001-fix-sg204xspi-v2-4-014dbaf22b5e@iscas.ac.cn Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <chen.wang@linux.dev>
2026-10-08riscv: dts: sophgo: Enable SPI NOR on SRD3-10Hangfan Li
Enable both SPI NOR controllers at 12.5 MHz, matching EDK2. Signed-off-by: Hangfan Li <lihangfan@iscas.ac.cn> Co-developed-by: Han Gao <gaohan@iscas.ac.cn> Signed-off-by: Han Gao <gaohan@iscas.ac.cn> Link: https://patch.msgid.link/20261001-fix-sg204xspi-v2-3-014dbaf22b5e@iscas.ac.cn Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <chen.wang@linux.dev>
2026-10-07sfc: handle rhashtable walk errors in mport lookupSang-Hoon Choi
rhashtable_walk_next() can return ERR_PTR(-EAGAIN) when the table is resized. efx_mae_lookup_mport() currently dereferences that value as an mport descriptor. Skip error values and continue the walk, as the other rhashtable walkers in this driver already do. Cc: stable+noautosel@kernel.org # LLM report + LLM fix, untested Fixes: 5227adff37af ("sfc: add mport lookup based on driver's mport data") Reported-by: Changyul Lee <lcy8047@gmail.com> Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20261003.final089.e0910b3ffb849fe4@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-08wifi: mm81x: validate YAPS receive framingFelix Hoffmann
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 <f3lix.dev@gmx.de> Link: https://patch.msgid.link/20261007093021.17132-1-f3lix.dev@gmx.de [remove Suggested-by and fix Assisted-by] Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
2026-10-07Merge tag 'wireless-next-2026-10-07' of ↵Jakub Kicinski
https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next Johannes Berg says: ==================== Not too much going on: - brcmfmac: plenty of improvements - mac80211: NAN Instant Communications support - iwlegacy: remove sysfs - nxpwifi: IW610 support - couple of fixes for recent regressions * tag 'wireless-next-2026-10-07' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next: (50 commits) wifi: mac80211: use the AP address as RA for a 4-addr MLO station wifi: mac80211: acquire wiphy lock for unlisted sdata teardown wifi: mac80211: fix non-MLD link ID handling wifi: brcmsmac: Adjust txpwrindex value in nphy_ipa_rxcal_gaintbl_2GHz wifi: iwlegacy: 3945: remove custom sysfs files wifi: iwlegacy: 4965: remove custom sysfs files wifi: iwlegacy: set debug level using debugfs wifi: nxpwifi: bound debug info output wifi: nxpwifi: bound histogram debugfs output wifi: nxpwifi: validate variable IE lengths in beacon parser wifi: nxpwifi: fix missing error codes in _nxpwifi_fw_dpc() wifi: mac80211_hwsim: add NAN Instant Communication support wifi: mac80211_hwsim: nan: Handle more of the NAN configuration wifi: mac80211_hwsim: nan: prepare for more configurable NAN settings wifi: mac80211_hwsim: nan: use ieee80211_is_nan_beacon() helper wifi: ieee80211: add NAN service ID list attribute definitions wifi: mac80211: accept NAN beacons only when IC is enabled wifi: mac80211: nan: allow Rx registration for NAN beacons wifi: cfg80211: do not use NAN beacons to update the BSS table wifi: cfg80211: nan: check Rx registration for NAN beacons ... ==================== Link: https://patch.msgid.link/20261007205827.467974-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07Merge tag 'wireless-2026-10-07' of ↵Jakub Kicinski
https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Some more fixes: - ath12k: revert broken panic handler - mt76: SAR/MLO/STA/NAPI fixes - nxpwifi: race fixes, validation - libertas: revert botched frame size fix - brcmfmac: fix crash on P2P removal - mac80211: fix WARN on downlink OFDMA frames * tag 'wireless-2026-10-07' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (25 commits) Revert "wifi: libertas: reject short monitor TX frames" wifi: brcmfmac: fix P2P device removal race in brcmf_detach() wifi: mac80211: don't estimate airtime for unsupported rate widths Revert "wifi: ath12k: add panic handler" wifi: nxpwifi: do not delete Rx reorder entries under RCU wifi: nxpwifi: fix inverted check in Tx BA stream entry deletion wifi: nxpwifi: handle authentication frame allocation failures wifi: nxpwifi: fix the authentication frame length handling wifi: nxpwifi: zero the channel statistics array wifi: nxpwifi: free the aggregation buffer when the RA list disappears wifi: nxpwifi: wait for the wakeup timer before the adapter is freed wifi: nxpwifi: delete the station entry on the uAP deauth event wifi: nxpwifi: protect sta_list against concurrent add and delete wifi: mt76: mt7996: fix uninitialized buf read in mt7996_variant_fem_init() wifi: mt76: mt792x: pick the SAR table layout from the table itself wifi: mt76: mt792x: treat 0xff ACPI SAR entries as no limit wifi: mt76: mt7603: initialize global station WCID wifi: mt76: mt7925: don't put the band auto marker in TGID wifi: mt76: mt7915: disable rx napi when removing device wifi: mt76: mt7996: fix struct mt7996_mcu_wed_rro_ba_delete_event layout ... ==================== Link: https://patch.msgid.link/20261007205143.464714-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07Merge branch 'net-stmmac-introduce-xdp-multi-buff-support-for-tx-path'Jakub Kicinski
Lorenzo Bianconi says: ==================== net: stmmac: introduce XDP multi-buff support for TX path Extend stmmac_xdp_xmit_xdpf() to transmit XDP frames with fragments. Fix TX coalesce race and div-by-zero in XDP/legacy path ==================== Link: https://patch.msgid.link/20261001-b4-stmmac-xmit-mb-v4-0-664e0c3eb289@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07net: stmmac: add XDP multi-buff support for TX sideLorenzo Bianconi
Extend stmmac_xdp_xmit_xdpf() to transmit XDP frames with fragments (multi-buff). Each buffer, i.e. the frame head and every frag, is mapped and programmed into a dedicated TX descriptor. Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com> Link: https://patch.msgid.link/20261001-b4-stmmac-xmit-mb-v4-2-664e0c3eb289@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07net: stmmac: fix TX coalesce race and div-by-zero in XDP/legacy pathLorenzo Bianconi
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 <lorenzo.bianconi@oss.qualcomm.com> Link: https://patch.msgid.link/20261001-b4-stmmac-xmit-mb-v4-1-664e0c3eb289@oss.qualcomm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07Merge branch ↵Jakub Kicinski
'neighbour-add-ipv4-ipv6-specific-wrappers-for-neigh_lookup-and-friends' Kuniyuki Iwashima says: ==================== neighbour: Add IPv4/IPv6-specific wrappers for neigh_lookup() and friends. syzbot reported that ip6_finish_output2() could pass tbl and dev from different netns to neigh_create(). When namespacifying neigh_table, I chose to resolve neigh_table in callers to minimise changes, but it turned out to be error-prone. This series adds IPv4/IPv6-specific helpers for neigh_lookup() and neigh_create() that always fetch the netns from dev to fix the problem. Along the way, the confusing and now mostly redundant helpers __neigh_lookup() and __neigh_lookup_errno() are converted and removed. ==================== Link: https://patch.msgid.link/20261003212336.1304988-1-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07neighbour: Check n->parms->tbl under tbl->lock in ___neigh_create().Kuniyuki Iwashima
Sashiko reported that if ___neigh_create() is called outside of RCU, it could create a new entry for dev in a different netns while __dev_change_net_namespace() is running concurrently: creator ipv6_neigh_create(dev, ...) tbl = nd_table(dev_net(dev)) <- old netns <preempted> __dev_change_net_namespace() NETDEV_UNREGISTER rcu_barrier() dev_net_set(dev, new_net) NETDEV_REGISTER <- new in6_dev creator resumes neigh_create(old_tbl, ...) ndisc_constructor() in6_dev_get(dev) <- new in6_dev, live parms Let's check n->parms->tbl under tbl->lock. Fixes: cda2962b6e2b ("neighbour: Namespacify neigh_tables.") Reported-by: netdev-bot+sashiko@kernel.org Closes: https://lore.kernel.org/netdev/179090663305.434549.17214258093385242325@kernel.org/ Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-10-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07neighbour: Remove __neigh_lookup() and __neigh_lookup_errno().Kuniyuki Iwashima
Both __neigh_lookup() and __neigh_lookup_errno() not only look up but also create a new neighbour entry. The names were misleading and there was __neigh_lookup(..., 0), which should have been simply written as neigh_lookup(). Now, __neigh_lookup() has only 1 user left. Let's convert the last user to neigh_lookup() and neigh_create() and remove __neigh_lookup() and __neigh_lookup_errno(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-9-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07ipv4: Use ipv4_neigh_lookup() and friends.Kuniyuki Iwashima
It is error-prone to require callers to fetch netns and neigh_table and pass it with dev to neigh_lookup(), etc. Let's replace neigh_lookup() and friends with IPv4 helpers. Note that __neigh_lookup(create=false) is replaced with ipv4_neigh_lookup() and __neigh_lookup(create=true) and __neigh_lookup_errno() are split into ipv4_neigh_lookup() and ipv4_neigh_create(). Fixes: 2430df635a59 ("ipv4: Replace &arp_tbl with arp_table(net).") Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-8-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07ipv6: Use ipv6_neigh_lookup() and friends.Kuniyuki Iwashima
syzbot reported the splat below in neigh_mark_dead() [0] where tbl->lock was not held while neigh_ifdown() should have acquired one. This only happens when a neigh_table accidentally has a neighbour from a different netns. In ip6_finish_output2(), the net argument is the caller's and does not always match dev_net(dev) fetched from dst. (e.g. xfrm) It is error-prone to require callers to fetch netns and neigh_table and pass it with dev to neigh_lookup(), etc. Let's replace neigh_lookup() and friends with IPv6 helpers. Note that __neigh_lookup() is split into ipv6_neigh_lookup() and ipv6_neigh_create(). [0]: debug_locks && !(lock_is_held(&(&n->tbl->lock)->dep_map) != 0) WARNING: net/core/neighbour.c:154 at neigh_mark_dead+0x2fb/0x340 net/core/neighbour.c:154, CPU#0: syz.0.857/9765 Modules linked in: CPU: 0 UID: 0 PID: 9765 Comm: syz.0.857 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 RIP: 0010:neigh_mark_dead+0x2fb/0x340 net/core/neighbour.c:154 Code: e8 03 42 80 3c 28 00 74 08 48 89 df e8 ee 9a 80 f8 4c 89 33 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc e8 86 95 10 f8 90 <0f> 0b 90 e9 8f fd ff ff 48 c7 c1 80 9a 7a 90 80 e1 07 80 c1 03 38 RSP: 0018:ffffc90003726600 EFLAGS: 00010287 RAX: ffffffff89b7467a RBX: ffff888022e86000 RCX: 0000000000080000 RDX: ffffc900047fa000 RSI: 0000000000003e08 RDI: 0000000000003e09 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff520006e4cb8 R12: ffff888022e8613c R13: dffffc0000000000 R14: ffff888022e86020 R15: ffff888022e86000 FS: 00007f9c30f046c0(0000) GS:ffff888124cc6000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000076c56000 CR4: 00000000003526f0 Call Trace: <TASK> neigh_flush_one+0x27c/0x5a0 net/core/neighbour.c:388 neigh_flush_dev net/core/neighbour.c:432 [inline] __neigh_ifdown+0x1fb/0xc70 net/core/neighbour.c:465 neigh_ifdown+0x1f/0x30 net/core/neighbour.c:487 rt6_disable_ip+0x751/0x7e0 net/ipv6/route.c:5058 addrconf_ifdown+0x155/0x1ad0 net/ipv6/addrconf.c:3892 addrconf_notify+0x1bc/0x1050 net/ipv6/addrconf.c:-1 notifier_call_chain+0x1a5/0x3d0 kernel/notifier.c:85 call_netdevice_notifiers_mtu net/core/dev.c:2350 [inline] netif_set_mtu_ext+0x5ac/0x830 net/core/dev.c:9963 do_setlink+0xa81/0x47a0 net/core/rtnetlink.c:3247 rtnl_setlink+0x578/0x820 net/core/rtnetlink.c:3623 rtnetlink_rcv_msg+0x802/0xc00 net/core/rtnetlink.c:7159 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+0x13a/0x180 net/socket.c:800 __sock_sendmsg net/socket.c:815 [inline] sock_write_iter+0x2de/0x3e0 net/socket.c:1266 do_iter_readv_writev+0x612/0x8c0 fs/read_write.c:-1 vfs_writev+0x343/0x990 fs/read_write.c:1058 do_writev+0x154/0x2e0 fs/read_write.c:1104 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:0x7f9c2ff9e159 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:00007f9c30f04028 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 00007f9c30225fa0 RCX: 00007f9c2ff9e159 RDX: 0000000000000001 RSI: 00002000000003c0 RDI: 0000000000000004 RBP: 00007f9c3003506b R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9c30226038 R14: 00007f9c30225fa0 R15: 00007ffed3c74808 </TASK> Fixes: df5f4f372de5 ("ipv6: Replace &nd_tbl with nd_table(net).") Reported-by: syzbot+5a8857f0b4a0a7b12c62@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6abd69a9.80e1c6cc.22483f.0005.GAE@google.com/ Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-7-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07mlxsw: spectrum: Resolve neigh_table right before neigh_lookup().Kuniyuki Iwashima
We will replace neigh_lookup() and neigh_create() with IPv4/IPv6-specific helpers. mlxsw has two paths where neigh_table is fetched in advance and passed down to a function which calls neigh_lookup() and neigh_create(). To keep the changes simple, let's prepare them beforehand by delaying the neigh_table resolution until right before neigh_lookup(). struct mlxsw_sp_nexthop caches neigh_tbl, so it is replaced with family, and a new helper, mlxsw_sp_nexthop_neigh_lookup(), resolves neigh_table and calls neigh_lookup() and neigh_create(). Similarly, mlxsw_sp_span_entry_gretap[46]_parms() now pass family to mlxsw_sp_span_dmac() to resolve neigh_table there just before neigh_lookup() and neigh_create(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-6-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07ipv6: Add wrappers for neigh_lookup() and (__)?neigh_create().Kuniyuki Iwashima
neigh_lookup() accepts struct neigh_table *tbl and struct net_device *dev, and both of them must exist in the same netns. It is error-prone to require callers to fetch a netns and get neigh_table, which might belong to a different netns than dev_net(dev). Let's add IPv6-specific wrappers for neigh_lookup() and (__)?neigh_create() that always fetch netns from dev. Similar to IPv4, we do not add wrappers for __neigh_lookup() since 3 out of 4 users call it with create=1, which should be simply written as neigh_lookup() and neigh_create(). IPv6 has 3 callers of __neigh_create(want_ref=false), so ipv6_neigh_create_noref() is also added. Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-5-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07ipv4: Add wrappers for neigh_lookup() and neigh_create().Kuniyuki Iwashima
neigh_lookup() accepts struct neigh_table *tbl and struct net_device *dev, and both of them must exist in the same netns. It is error-prone to require callers to fetch a netns and get neigh_table, which might belong to a different netns than dev_net(dev). Let's add IPv4-specific wrappers for neigh_lookup() and neigh_create() that always fetch netns from dev. Note that we do not add wrappers for __neigh_lookup() and __neigh_lookup_errno(), which we will remove later. __neigh_lookup_errno() is a simple combo of neigh_lookup() and neigh_create(). __neigh_lookup() is almost the same but converts errno from neigh_create() to NULL. So both names are confusing. For IPv4, __neigh_lookup_errno() is only used in arp_req_set() and is not worth a new wrapper. Instead, it should be inlined. arp_process() uses __neigh_lookup(create=0) but it should simply be neigh_lookup(), and then __neigh_lookup(create=1) is only used in arp_process(), so this should be inlined too. Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-4-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07ipv6: Rename ip6_neigh_lookup() to __ip6_dst_neigh_lookup().Kuniyuki Iwashima
Later, we will add ipv6_neigh_lookup() as a wrapper for neigh_lookup(nd_table(net), ...). The existing ip6_neigh_lookup() is called from ip6_dst_neigh_lookup() with a gateway address. Let's rename ip6_neigh_lookup() to __ip6_dst_neigh_lookup(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-3-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07ipv4: Rename ipv4_neigh_lookup() to ipv4_dst_neigh_lookup().Kuniyuki Iwashima
Later, we will add ipv4_neigh_lookup() as a wrapper for neigh_lookup(arp_table(net), ...). The existing ipv4_neigh_lookup() is more like ip6_dst_neigh_lookup(). Let's rename ipv4_neigh_lookup() to ipv4_dst_neigh_lookup(). Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003212336.1304988-2-kuniyu@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-07PCI/P2PDMA: Add Intel Xeon E3 v4/E5 v4/E7 v4 host bridge to allowlistkai zhang
For P2P paths routed through a host bridge, the P2PDMA core consults an allowlist of known-good hardware. Add Intel 8086:6f00 with REQ_SAME_HOST_BRIDGE so the entry permits peers only below the same host bridge. The bridge was tested on a single-socket Intel Xeon E5-2697A v4 system with two PCIe GPUs below different Root Ports of the same host bridge. Without the allowlist entry, peer access was rejected before a transfer was issued. With the entry, 64 MiB peer transfers completed in both directions with data integrity verified while the IOMMU used translated mode. Assisted-by: LLM Signed-off-by: kai zhang <zhangkai.cool@gmail.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20261007141558.59852-1-zhangkai.cool@gmail.com
2026-10-07fs/ntfs3: check return values in indx_delete_entry()Dmitry Morgun
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 <d.morgun@ispras.ru> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-07fs/ntfs3: remove redundant if-block in check_attr()Matvey Kovalev
Condition of this if-block repeats another one from if-block above. So, condition is always false. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Matvey Kovalev <matvey.kovalev@ispras.ru> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-07fs/ntfs3: validate that EA entry size covers its name and valueAldo Ariel Panzardo
ntfs_read_ea() walks the on-disk $EA attribute and checks each EA_FULL entry for consistency. For an entry with a non-zero ef->size (the offset to the next entry) the loop only verifies that this stride fits in the remaining buffer, and then continues: if (ef->size) { ea_size = le32_to_cpu(ef->size); if (ea_size > bytes) goto out1; continue; } It never verifies that the entry's own name (ef->name_len) and value (ef->elength) actually fit inside ef->size. A later reader trusts ef->elength unconditionally; ntfs_get_ea() does: len = le16_to_cpu(ea->elength); /* up to 0xffff */ ... if (len > size) /* size is the user buffer */ return -ERANGE; memcpy(buffer, ea->name + ea->name_len + 1, len); A crafted image with a small but valid ef->size (e.g. 24) and ef->elength == 0xffff therefore passes validation, and a getxattr() with a large enough user buffer copies up to 64 KiB starting just past the short entry -- an out-of-bounds read of the ea_all allocation that leaks adjacent kernel heap memory to userspace. BUG: KASAN: slab-out-of-bounds in ntfs_get_ea+0x2b8/0x3f0 Read of size 65535 ... ntfs_get_ea -> ntfs_getxattr -> vfs_getxattr -> do_getxattr The zero-ef->size branch already computes the same struct_size() to derive the stride; mirror that in the non-zero branch and reject the entry when its declared size cannot hold the name and value. Fixes: 0e8235d28f3a ("fs/ntfs3: Check fields while reading") Cc: stable@vger.kernel.org Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2026-10-07PCI/sysfs: Pass the device name length in UTF-16 code unitsKrzysztof Wilczyński
Currently, dsm_label_utf16s_to_utf8s() passes the ACPI buffer length to utf16s_to_utf8s() unchanged. The Device Name _DSM may return the device name as a buffer holding a UTF-16 string, and the ACPI length counts bytes while the converter counts wchar_t elements. The converter therefore receives a count twice the number of code units the buffer holds, and that count is its only bound on the input. A NUL code unit ends the conversion early, so a name that carries one is converted correctly and the error stays hidden. ACPICA zeroes the entire result allocation, and the padding placed after the buffer supplies that NUL for most lengths. Lengths that leave no padding, or a single byte of it, do not, and the conversion then runs up to its own length in bytes past the end of the allocation. The bytes beyond the allocation are decoded into the "label" attribute, which is world readable. Divide the buffer length by the size of wchar_t so that the converter receives a count of code units. The division truncates, so the converter is never told to read more bytes than the buffer holds, including for an odd length. Reaching the out of bounds read needs firmware that returns the name as a buffer and omits the terminator. Fixes: 6058989bad05 ("PCI: Export ACPI _DSM provided firmware instance number and string name to sysfs") Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20260814070522.2327975-5-kwilczynski@kernel.org
2026-10-07PCI/sysfs: Handle a malformed _DSM result in acpi_attr_is_visible()Krzysztof Wilczyński
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 <kwilczynski@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260814070522.2327975-4-kwilczynski@kernel.org
2026-10-07PCI/sysfs: Decouple acpi_index from the optional device name elementKrzysztof Wilczyński
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 <kwilczynski@kernel.org> [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260814070522.2327975-3-kwilczynski@kernel.org
2026-10-07PCI/sysfs: Stop reporting _DSM failures as -EPERMKrzysztof Wilczyński
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 <kwilczynski@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260814070522.2327975-2-kwilczynski@kernel.org
2026-10-07Revert "wifi: libertas: reject short monitor TX frames"Johannes Berg
This reverts commit 13ff543e0b2c713aedeaadadde686686e949dc78. The 'goto free' just made things worse, causing a spinlock to be handled incorrectly. Revert this for now. Reported-by: Takashi Iwai <tiwai@suse.de> Cc: stable@vger.kernel.org Fixes: 13ff543e0b2c ("wifi: libertas: reject short monitor TX frames") Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-10-07PCI: Avoid FLR and SBR on Intel DG1 0x4905 graphics adaptersJanusz Krzysztofik
DRM CI consistently reports failing device reset attempts on Intel DG1 discrete graphics adapters. Manual reproduction attempts allowed to narrow down the scope of that problem to a specific revision of that hardware, SKU 8086:4905. It has been confirmed that both reset methods claimed by the device, i.e., FLR and Secondary Bus Reset, suffer from that issue. Since consecutively failing device resets may lead to system hangs, disable both useless reset methods. A respective CI test will then be skipped instead of aborting whole CI jobs. Suggested-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/11814 Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Link: https://patch.msgid.link/20260907090249.1348552-2-janusz.krzysztofik@linux.intel.com
2026-10-07aoe: pull in the headers each received packet type readsJosef Bacik
aoenet_rcv() only pulls the AoE and ATA headers into the skb head when the packet is long enough to hold both. A shorter packet goes through unpulled, and aoenet_rcv() reads the AoE header from it anyway. CFG responses go on to aoecmd_cfg_rsp(), which reads the config header after it, and ATA responses get queued for ktiocomplete(), which skb_pull()s both headers. Ethernet pads frames to 60 bytes, so this mostly takes a virtual link, but nothing stops a short frame from getting here. Pull the AoE header up front and drop the packet if it isn't there, then pull the ATA or config header in the switch arm that hands the packet on, so each path gets the headers it reads. This also replaces the open-coded __pskb_pull_tail() with pskb_may_pull(). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Josef Bacik <josef@toxicpanda.com> Link: https://patch.msgid.link/20261007-b4-aoe-short-packets-v1-1-db5155f7bb9c@toxicpanda.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-10-07workqueue: Fix NULL current_pwq deref in mem-reclaim helperPavankumar Kondeti
current_is_workqueue_mem_reclaim() uses current_wq_worker() to decide whether %current is a workqueue worker and then checks the current workqueue flags. However, current_wq_worker() only implies that %current is a kworker; it does not imply that the worker is currently executing a work item. worker->current_pwq is set while process_one_work() runs the work function and cleared afterwards. A kworker outside work-item execution can therefore have PF_WQ_WORKER set with current_pwq cleared. Guard the flag check with worker->current_pwq. Without a current_pwq, the worker is not executing on a WQ_MEM_RECLAIM workqueue, so the helper should return false. Fixes: da729ddd4a1b ("NFS/localio: issue IO inline when not in a memory-reclaim context") Signed-off-by: Pavankumar Kondeti <pavan.kondeti@oss.qualcomm.com> Signed-off-by: Tejun Heo <tj@kernel.org>
2026-10-07ALSA: hda/ca0132: Add Sound BlasterX AE-5 external RGB LED strip supportDevin Christensen
The Sound BlasterX AE-5 and AE-5 Plus expose a 3-pin 5V addressable RGB header driven directly by the CA0113 PCIe-to-HD-Audio bridge. Rather than using the CA0132 DSP or MMIO GPIO, the CA0113 contains an autonomous HDA link sniffer that snoops a designated HDA DMA playback stream, extracts the 24-bit GRB color payload, and serializes it as 800 kHz single-wire NRZ pulses to the strip (WS2812B protocol). Expose the strip through volatile card control elements: "AE-5 LED Strip" (RW, BYTES): 300-byte RGB payload representing up to 100 addressable LEDs (3 bytes per LED). "AE-5 LED Strip Count" (RW, INTEGER): Active LED count (1..100). The controls are marked with IFACE_CARD and SNDRV_CTL_ELEM_ACCESS_VOLATILE so changes do not trigger unnecessary audio daemon wakeups or state restoration by alsactl. Writes allocate an idle HDA playback stream, format a 32 KB DMA buffer populated with repeating WS2812 frames (preamble, audio words per LED, and reset gap), configure the CA0113 BAR2 serializers and stream-tag pin mux, and pulse the stream long enough for the reset latch to fire. Access is serialized with a per-spec mutex, and the controls are only registered on QUIRK_AE5 devices. The strip transport uses snd_hdac_dsp_prepare() / snd_hdac_dsp_cleanup(), which require CONFIG_SND_HDA_DSP_LOADER. All strip-related code and struct fields are conditionally compiled under IS_ENABLED(CONFIG_SND_HDA_DSP_LOADER), with a no-op stub for ae5_add_strip_controls() when disabled. Signed-off-by: Devin Christensen <dchristensen8@proton.me> Link: https://patch.msgid.link/20261007163207.2621040-1-dchristensen8@proton.me Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-07drm/amdgpu: make Mac FB workaround genericAlex Deucher
Rather than adding a case of every chip where this is seen just check if the FB is at 0 and the ssid is apple. This should cover all chips which fall into this case. Tested-by: Ayhan Çiçek <ayhancicek@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit c54e4d10507722398dc90cf3c532e50b86cf425a) Cc: stable@vger.kernel.org
2026-10-07drm/amdkfd: fix dma_buf reference leak in get_dmabuf_infoHaojie Li
When kzalloc fails for metadata_buffer in amdgpu_amdkfd_get_dmabuf_info(), the function returns -ENOMEM directly without calling dma_buf_put(), leaking the dma_buf reference obtained earlier via dma_buf_get(). Fix both issues by: - Adding an error check after the first amdgpu_bo_get_metadata() call - Replacing the direct return with r = -ENOMEM and goto out_put to ensure dma_buf_put() is called on all error paths Fixes: f54ce9e8cbd3 ("drm/amdkfd: Let driver decide buffer size at AMDKFD_IOC_GET_DMABUF_INFO ioctl") Signed-off-by: Haojie Li <lihaojie@kylinos.cn> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit ffa699553332f8caf8688d312279ddcea9e3c141) Cc: stable@vger.kernel.org
2026-10-07drm/amd/display: Don't replace a sink mode that shares the native totalsAdrian Betschart
decide_crtc_timing_for_drm_display_mode() copies the native mode's CRTC timing into the requested mode when clock, htotal and vtotal match. That is meant for the modes amdgpu inserts itself: amdgpu_dm_create_common_mode() duplicates the native mode and changes only hdisplay and vdisplay, so those are sent with the native timing and scaled. A sink can also offer a real mode with the same clock and totals as its native mode. CTA-861 VIC 102 (4096x2160@60) and VIC 97 (3840x2160@60) both use 594 MHz and 4400x2250. With 3840x2160@60 as the preferred mode, a 4096x2160@60 request goes out with the 3840x2160 timing and the framebuffer scaled into it (dst 3840x2025 at y=67), while the AVI InfoFrame still carries VIC 102. A JVC projector then reports 3840x2160 and shows a corrupted right edge. 4096x2160@24, whose totals differ, is sent and displayed correctly. Inserted modes keep the native sync positions; a real mode with its own active width does not. Compare those too, so only inserted modes are patched. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: Adrian Betschart <adrian.betschart@cinemaone.ch> Assisted-by: Claude-Code:claude-opus-5-5 Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Reviewed-by: Roman Li <roman.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 22f9a2da101c37f821cd00954f81dc598754f4d5) Cc: stable@vger.kernel.org
2026-10-07drm/amdkfd: align SDMA doorbell base for shader doorbell writesSaleel Kudchadker
On GC 9.4.3, 9.4.4 and 9.5.0, doorbell writes issued from shaders are routed to an SDMA engine at 32-byte (4 doorbell index) granularity. SDMA engine doorbell ranges are 10 indices apart, so the range of every odd engine starts 2 indices into a 4-index block that begins in the previous engine's range. A shader ringing the doorbell of a queue on an odd engine therefore rings the previous engine instead. The intended queue never sees the doorbell, so its work stalls and the application hangs. Align the per-engine doorbell base up to a 4-index boundary on these ASICs. Each engine only uses 4 of its 10 indices, so the aligned base plus the queue offset stays within the engine's range. Even engines are already aligned, so only the doorbell IDs of odd-engine queues change. Only doorbells rung by the device itself are routed this way. Doorbell writes from the host, including the kernel's own SDMA rings, are not affected. The doorbell ID of an SDMA queue is saved in CRIU checkpoints and checked again on restore. A checkpoint taken before this change that contains an SDMA queue on an odd engine will fail to restore with -EINVAL. This is intentional: the restored process still holds the old doorbell address, so accepting the stale ID would bring back the same stall. Tested on MI300X with a shader-rung SDMA doorbell test: queues on odd engines hung before this change and complete with it. v2: use u32 instead of uint32_t for the new locals (checkpatch) v3: name the routing granularity, use dev->node_id, document the layout invariants, describe impact v4: express the granularity in doorbell indices, drop unrelated cleanups, explain the CRIU restore behavior, add test note Fixes: 6df442a03d1a ("drm/amdgpu: add new doorbell assignment table for aqua_vanjaram") Signed-off-by: Saleel Kudchadker <Saleel.Kudchadker@amd.com> Reviewed-by: Felix Kuehling <felix.kuehling@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit ee1379e6d7da47bdf7a8d5b89c2d1b28473701fb) Cc: stable@vger.kernel.org
2026-10-07drm/amdgpu: copy debugfs register data outside the GRBM/SRBM locksMikhail Gavrilov
Reading or writing a register through the amdgpu_regs2 debugfs file with GRBM bank selection, which umr does for every banked access (a single "umr -b x x x -r <reg>" is enough, as is the wave dump with "-O halt_waves"), makes lockdep report a circular locking dependency, after which lockdep stays off until reboot: WARNING: possible circular locking dependency detected umr/63306 is trying to acquire lock: ffff8882cf4b8350 (&mm->mmap_lock){++++}-{4:4}, at: __might_fault+0x9b/0x140 but task is already holding lock: ffff8881aec010d0 (&amdgpu_grbm_lock_key){+.+.}-{4:4}, at: amdgpu_debugfs_regs2_op.isra.0+0x20d/0xd00 [amdgpu] ... Chain exists of: &mm->mmap_lock --> &amdgpu_srbm_lock_key --> &amdgpu_grbm_lock_key ... __might_fault+0xc5/0x140 amdgpu_debugfs_regs2_op.isra.0+0x441/0xd00 [amdgpu] full_proxy_write+0x10e/0x1d0 vfs_write+0x1d0/0xf50 ksys_write+0x116/0x250 amdgpu_debugfs_regs2_op() and amdgpu_debugfs_process_reg_op() call get_user()/put_user() for every dword while holding grbm_idx_mutex or srbm_mutex, and pm.mutex if requested, so a fault there takes mmap_lock inside those locks. The lock hierarchy in amdgpu_lockdep.c puts srbm_mutex and grbm_idx_mutex below notifier_lock, which amdgpu_cs_submit() takes with the BO reservations held, and dma_resv_lockdep() orders the reservations inside mmap_lock. So mmap_lock is outside grbm_idx_mutex and srbm_mutex, and these two debugfs paths nest it the other way round. The copies under the locks are as old as the bank selection in both files; commit 1d0f5838b126 ("drm/amdgpu: Add lockdep annotations for lock ordering validation") only made them visible to lockdep. Copy the user buffer in before any of the locks is taken and the result out after all of them are dropped, as amdgpu_debugfs_wave_read(), amdgpu_debugfs_gpr_read() and amdgpu_debugfs_gprwave_read() already do. The buffer is sized by the count passed to read() or write(), so an access larger than PAGE_SIZE is now rejected with -EINVAL; umr reads and writes one register at a time. A fault on the user buffer of a write now fails with -EFAULT before any register is written, instead of after a partial write. Fixes: 566281595037 ("drm/amd/amdgpu: Add bank selection for MMIO debugfs (v3)") Fixes: 37df9560cd3e ("drm/amd/amdgpu: New debugfs interface for MMIO registers (v5)") Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit ccf9e35ed6811f2c25ba6368e7dc6481da17159d) Cc: stable@vger.kernel.org
2026-10-07drm/amdgpu: serialize vblank counter reads against GPU resetVitaly Prosyak
The vblank counter callback reads display registers and scanout position without holding reset_domain->sem. During GPU recovery, display commit work can call the callback while reset owns the semaphore for writing. The hardware access then triggers the lockdep_assert_held() in amdgpu_device_skip_hw_access() and sets TAINT_WARN when lockdep is enabled. Try to acquire the reset semaphore for reading before accessing the hardware, and hold it across the counter and scanout-position reads. If reset is already in progress, return DRM's cached software vblank count instead. This avoids blocking behind reset and avoids accessing display hardware while it is being reset. The cached count is less accurate than the hardware count, but is used only when reset prevents a safe hardware read. This addresses the reset-time warning from this vblank path; it does not suppress or fix unrelated lockdep warnings. Cc: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Harry Wentland <harry.wentland@amd.com> Cc: Sunpeng Li <sunpeng.li@amd.com> Signed-off-by: Vitaly Prosyak <vitaly.prosyak@amd.com> Reviewed-by: Sunpeng Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 51a4359f7431a4be5e42803c8bdaf7e0e5be2934) Cc: stable@vger.kernel.org
2026-10-07drm/amd/display: disable self-refresh on tearing flipsLeo Li
[Why & How] Immediate (tearing) flips breaks self refresh state machine assumptions, so disable PSR/Replay for them. Tested-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit acbdd213b37e095f15685f3e3ee6d35defa05616) Cc: stable@vger.kernel.org
2026-10-07drm/amdgpu/userq: return the memdup_user() error for the user MQDJesse Zhang
mes_userq_mqd_create() returns -ENOMEM when copying the user MQD fails, even though memdup_user() returns -EFAULT for a bad pointer or -EINTR when interrupted by a signal. Return PTR_ERR() instead. While at it drop the error messages. Neither case is a driver error and userspace shouldn't be able to spam the log with invalid IOCTL parameters. v2: drop the error messages (Christian) Fixes: 2c695d7c0720 ("drm/amdgpu: enable compute/gfx usermode queue") Fixes: 543b61453774 ("drm/amdgpu: enable SDMA usermode queues") Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 49a443fcb829be9fc780f10850652ddea2fe81f0) Cc: stable@vger.kernel.org
2026-10-07drm/amdgpu/userq: only accept doorbell BOs as queue doorbellJesse Zhang
amdgpu_userq_get_doorbell_index() pins any BO passed as doorbell_handle into the doorbell domain. For a regular BO, TTM moves it with ttm_bo_move_null() and its contents are lost. Since an importer on the same device gets the exporter's GEM object, a client can do this to a buffer another client shared with it. Reject BOs that were not created in the doorbell domain. v2: drop the error message, use a local abo variable (Christian) Fixes: f09c1e6077ab ("drm/amdgpu: generate doorbell index for userqueue") Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit f7497bbc19db4821c62b9d97b31c9086feb2d917) Cc: stable@vger.kernel.org
2026-10-07drm/amd/display: Fix direct scanout alpha on some DRM_FORMATsLeo Li
[Why] DM was declaring it's own list of has_alpha DRM formats to check against for enabling alpha blending, when the format->has_alpha already does that for us. The self-declared list missed some has_alpha formats, causing direct-scanout planes with such formats to appear opaque. [How] Drop the self-declared list, instead use the format->has_alpha field directly. Signed-off-by: Leo Li <sunpeng.li@amd.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 9ecdac91ed43d836683d5daa467f4907405420e2) Cc: stable@vger.kernel.org
2026-10-07riscv: ptrace: Zero-initialize regset buffers before copyinZongmin Zhou
user_regset_copyin() only copies `count` bytes, so a PTRACE_SETREGSET request with a short iov_len leaves the rest of the stack buffer uninitialized. In riscv_vr_set() that garbage is validated and copied into the target's vstate, and in riscv_cfi_set() it can be stored as the target's shadow stack pointer. Zero both buffers, as the get path already does. Fixes: 9300f0043974 ("RISC-V: Add ptrace support for vectors") Fixes: 2af7c9cf021c ("riscv/ptrace: expose riscv CFI status and state via ptrace and in core files") Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn> Link: https://patch.msgid.link/20260826115711.86861-1-min_halo@163.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-07ASoC: mediatek: Handle constraint return value in FE startupMark Brown
bui duc phuc <phucduc.bui@gmail.com> says: Some FE startup callbacks may return a positive value from constraint helpers, but ASoC expects 0 on success. This can cause .shutdown() to be skipped during rollback. Return 0 explicitly on success. Compile-tested only. Link: https://patch.msgid.link/20261007110858.509341-1-phucduc.bui@gmail.com
2026-10-07ASoC: mediatek: mt8365: Handle constraint return value in FE startupbui duc phuc
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 <phucduc.bui@gmail.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20261007110858.509341-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-07ASoC: mediatek: mt8189: Handle constraint return value in FE startupbui duc phuc
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 <phucduc.bui@gmail.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20261007110858.509341-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-07ASoC: mediatek: mt8188: Handle constraint return value in FE startupbui duc phuc
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 <phucduc.bui@gmail.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20261007110858.509341-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-10-07ASoC: mediatek: common: Handle constraint return value in FE startupbui duc phuc
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 <phucduc.bui@gmail.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20261007110858.509341-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>