summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-07-22netfilter: nf_conntrack_sip: widen NAT rewrite delta to s32 in sip_help_tcp()Xiang Mei
sip_help_tcp() stores the size change of each NAT-rewritten SIP message in s16 diff and accumulates it in s16 tdiff, but a single message can grow by more than S16_MAX while the packet stays under the 65535 enlarge_skb() limit: nf_nat_sip() rewrites every matching URI, and a long Contact list expands the message by tens of kilobytes. diff then wraps, and "datalen = datalen + diff - msglen" yields a huge unsigned datalen, so the next iteration's ct_sip_get_header() reads past the linearized skb tail. Widen diff, tdiff and the seq_adjust hook to s32. Both are bounded by the 65535 byte packet limit, and the seqadj core is already s32 (nf_ct_seqadj_set() takes s32), so no previously accepted input is rejected. BUG: KASAN: use-after-free in ct_sip_get_header (net/netfilter/nf_conntrack_sip.c:464) Read of size 1 at addr ffff888010800000 by task ksoftirqd/1/25 ct_sip_get_header (net/netfilter/nf_conntrack_sip.c:464) sip_help_tcp (net/netfilter/nf_conntrack_sip.c:1694) nf_confirm (net/netfilter/nf_conntrack_proto.c:183) nf_hook_slow (net/netfilter/core.c:619) ip6_output (net/ipv6/ip6_output.c:246) ip6_forward (net/ipv6/ip6_output.c:690) ipv6_rcv (net/ipv6/ip6_input.c:351) __netif_receive_skb_one_core (net/core/dev.c:6212) process_backlog (net/core/dev.c:6676) __napi_poll (net/core/dev.c:7735) net_rx_action (net/core/dev.c:7955) handle_softirqs (kernel/softirq.c:622) run_ksoftirqd (kernel/softirq.c:1076) ... Fixes: f5b321bd37fb ("netfilter: nf_conntrack_sip: add TCP support") Reported-by: Weiming Shi <bestswngs@gmail.com> Link: https://patch.msgid.link/netfilter-devel/20260712234201.3213635-1-xmei5@asu.edu Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Xiang Mei <xmei5@asu.edu> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2026-07-22PCI/P2PDMA: Add Nvidia Vera Rubin to whitelistLeon Romanovsky
Nvidia Vera Rubin platforms support PCI peer‑to‑peer transactions. Add them to the P2P whitelist to enable this functionality. Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Logan Gunthorpe <logang@deltatee.com> Link: https://patch.msgid.link/20260705-p2p-vr-v1-1-3cd45cab3fb4@nvidia.com
2026-07-22Merge tag 'platform-drivers-x86-v7.2-3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Ilpo Järvinen: - asus-wmi: Revert retaining battery charge threshold on boot due to userspace regression. Userspace assumed (errorneously) a non-zero return code from sysfs read implies feature is not supported but the correct way would be to check file visibility instead. This results in the kernel change breaking the functionality completely. Thus, we are taking timeout on the kernel side to allow userspace to sort their problem first. - intel/vsec: Free ACPI discovery data allocation on error paths * tag 'platform-drivers-x86-v7.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: asus-wmi: temporarily revert to setting a charge limit platform/x86/intel/vsec: free ACPI discovery data on early errors
2026-07-23Merge branch 'sunxi/dt-for-7.3' into sunxi/for-nextChen-Yu Tsai
2026-07-23ARM: dts: allwinner: a10: Fix PMU interruptAndre Przywara
The Performance Monitoring Unit of the Cortex-A8 cores in the Allwinner A10 SoC is connected to interrupt line 66, not 3. This is shown in the manual (where interrupt 3 is assigned to UART2, also in our .dtsi), but has also been confirmed by triggering an PMU overflow interrupt and inspecting the IRQ controller status registers (from U-Boot). Please note that "perf stat" does not use interrupts, this might explain why this evaded the initial testing. Fixes: 7e345d25c796 ("ARM: dts: sun4i-a10: Add PMU node") Signed-off-by: Andre Przywara <andre.przywara@arm.com> Link: https://patch.msgid.link/20260720215128.5761-1-andre.przywara@arm.com Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
2026-07-22net: hsr: fix memory leak on slave unregistration by removing synced VLANsEric Dumazet
When an HSR master device is brought UP, it auto-adds VLAN 0 via vlan_vid0_add(), which propagates VID 0 to its slave devices (slave A and B). If a slave device is later unregistered while HSR is active (e.g., during netns cleanup or interface destruction), hsr_del_port() is called to detach the slave port from the HSR master. However, hsr_del_port() currently does not delete the VLAN IDs that were synced to the slave device by HSR. As a result, the slave device retains a refcount on VID 0 (and any other synced VLANs). When the slave device is destroyed, its vlan_info / vlan_vid_info structure remains allocated, leading to a memory leak. Fix this by calling vlan_vids_del_by_dev(port->dev, master->dev) in hsr_del_port() before unlinking slave A or slave B ports, matching the propagation logic in hsr_ndo_vlan_rx_add_vid() / hsr_ndo_vlan_rx_kill_vid() and the cleanup behavior in bonding and team drivers. Fixes: 1a8a63a5305e ("net: hsr: Add VLAN CTAG filter support") Reported-by: syzbot+456957213f32970c0762@syzkaller.appspotmail.com Closes: https://lore.kernel.org/netdev/6a4cb6ca.57639fcc.86d58.000b.GAE@google.com/T/#u Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Fernando Fernandez Mancera <fmancera@suse.de> Reviewed-by: Felix Maurer <fmaurer@redhat.com> Link: https://patch.msgid.link/20260721101240.995597-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22Merge branch 'net-bridge-fix-vlan-range-dumps-starting-with-a-pvid'Jakub Kicinski
Nikolay Aleksandrov says: ==================== net: bridge: fix vlan range dumps starting with a PVID Patch 01 fixes a bug that can skip dumping VLANs which a part of a range starting with a PVID VLAN and share the same flags. PVID VLAN should be always on its own. Patch 02 adds a selftest for this case. More information can be found in the respective patches. ==================== Link: https://patch.msgid.link/20260721140922.682265-1-razor@blackwall.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22selftests: net: bridge: test ranges with PVID VLANNikolay Aleksandrov
Add a test with PVID VLAN that matches the flags of the VLAN following it and check if the range is properly dumped. PVID VLAN should be on its own and all VLANs should be present in the dump. Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260721140922.682265-3-razor@blackwall.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22net: bridge: vlan: fix vlan range dumps starting with pvidNikolay Aleksandrov
There is a bug in all range dumps that rely on br_vlan_can_enter_range() when the PVID is a range starting VLAN, all following VLANs that match its flags can enter the range, but when the range is filled in only the PVID VLAN is dumped and the rest of the range is discarded because br_vlan_fill_vids() checks for the PVID flag. Since the PVID VLAN can be only one, we need to break ranges around it, the best way to do that consistently for all is to alter br_vlan_can_enter_range() to take into account the PVID and return false to break the range when it's matched. Before the fix: $ ip l add br0 type bridge vlan_filtering 1 $ ip l add dumdum type dummy $ ip l set dumdum master br0 $ ip l set br0 up $ ip l set dumdum up $ bridge vlan add dev dumdum vid 1 pvid untagged master $ bridge vlan add dev dumdum vid 2 untagged master $ bridge vlan show dev dumdum # use legacy dump to show all vlans port vlan-id dumdum 1 PVID Egress Untagged 2 Egress Untagged $ bridge -d vlan show dev dumdum # use the new dump (RTM_GETVLAN) port vlan-id dumdum 1 PVID Egress Untagged state forwarding mcast_router 1 VLAN 2 is missing, and if there are more matching VLANs afterwards they'd be missing too. After the fix: [ same setup steps ] $ bridge vlan show dev dumdum port vlan-id dumdum 1 PVID Egress Untagged 2 Egress Untagged $ bridge -d vlan show dev dumdum # use the new dump (RTM_GETVLAN) port vlan-id dumdum 1 PVID Egress Untagged state forwarding mcast_router 1 2 Egress Untagged state forwarding mcast_router 1 Fixes: 0ab558795184 ("net: bridge: vlan: add rtm range support") Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20260721140922.682265-2-razor@blackwall.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22Merge tag 'sound-7.2-rc5' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A collection of fixes that have been accumulated recently. The amount is still "new normal", but all small fixes. Mostly hardware-specific quirks, but including a few core fixes, too. ALSA Core: - Fix potential UAF and race fixes in ALSA timer core - Fix sequencer queue timer cleanup to prevent leaks and double-free HD-audio: - Fix silent streams with Intel HDMI keep-alive silent mode - Quirks for HP laptops (Pavilion x360, EliteBook 830 G8, ZBook 8 G2a), Samsung 750XBE/730XBE, and Dell Pro QC1255, Alienware x16 R2, Lunnen Ground 14 - Properly validate ACPI mute object in CS35L41 HDA companion driver - Reset calibration data size on failure in TAS2781 HDA driver. USB-audio: - Support FIXED_RATE quirk for JBL Quantum650 Wireless USB headset ASoC: - Intel SOF SoundWire board driver quirks for new Dell laptops - DMI overrides and quirks for AMD ACP/YC platforms, including new ASUS TUF platforms and MSI Vector A16 HX laptops - Skip sysclk reset for active DAIs in shutdown for FSL imx-card - Fix spurious BCLK on resume by clearing BYP in FSL SAI driver - Add playback-only quirk for H616 codec in Allwinner driver - Fix Cirrus Logic CS35L56 potential probe deadlock - Fix cache write-through on resume in FS210X codec - Bound firmware description string parsing in TAS2781 codec driver - Fix duplicate DAPM widget names for wideband DAI in BT-SCO codec" * tag 'sound-7.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits) ALSA: hda/realtek - Add quirk for Dell Pro QC1255 ALSA: hda/tas2781: clear cali_data.total_sz when calibration read fails ALSA: hda/realtek: Add HDA_CODEC_QUIRK for Samsung 750XBE/730XBE ALSA: hda/realtek: Fix speakers on Lunnen Ground 14 ALSA: timer: drain a slave's callback before its master detaches it ALSA: timer: don't re-enter an instance callback that is still running ALSA: usb-audio: Add FIXED_RATE quirk for JBL Quantum650 Wireless ALSA: hda/realtek: Add quirk for HP Pavilion x360 ASoC: Intel: sof_sdw: Add quirks for new Dell laptops ASoC: cs35l56: Use complete_all() to signal init_completion ASoC: cs35l56: Fix potential probe() deadlock ASoC: fs210x: Make cache write through again during resume ALSA: hda/realtek: Add inverted LED quirk for HP ZBook 8 G2a ALSA: hda: codecs: hdmi: disable keep-alive before audio format change ASoC: bt-sco: fix duplicate DAPM widget names for wideband DAI ALSA: hda: cs35l41: validate and free ACPI mute object ALSA: hda/realtek: Fix speakers on Alienware x16 R2 ALSA: hda/realtek: Add quirk for HP EliteBook 830 G8 (8AB8) to enable mute LEDs ASoC: amd: yc: Add DMI quirk for MSI Vector A16 HX A8WIG ASoC: fsl: imx-card: Skip sysclk reset for active DAIs in shutdown ...
2026-07-22geneve: fix geneve_config leak on register_netdevice() failureEric Dumazet
When geneve_configure() allocates a new geneve_config structure via geneve_config_alloc() and assigns it to geneve->cfg before calling register_netdevice(), if register_netdevice() fails early (for example, in dev_get_valid_name() due to an invalid or duplicate interface name), register_netdevice() exits without calling dev->priv_destructor. The caller (e.g. rtnl_newlink()) subsequently calls free_netdev(), which frees the net_device structure directly via kvfree() because reg_state is NETREG_UNINITIALIZED, bypassing dev->priv_destructor (geneve_free_dev()). As a result, the newly allocated geneve_config and its per-CPU dst_cache are leaked. Fix this by invoking geneve_free_dev(dev) directly on the error path of register_netdevice(). Since geneve_free_dev() sets geneve->cfg to NULL, this call is fully idempotent and safe even if register_netdevice() failed on a later error path that already ran dev->priv_destructor. Fixes: 0ba269933f73 ("geneve: convert config to RCU-protected pointer") Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20260721163950.1483019-1-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22MAINTAINERS: add nci tests to nfcJakub Kicinski
NCI is part of NFC, so include its selftests under the NFC entry. Reviewed-by: David Heidelberg <david@ixit.cz> Link: https://patch.msgid.link/20260721205555.1020513-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22Merge tag 'for-net-2026-07-21' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth Luiz Augusto von Dentz says: ==================== bluetooth pull request for net: - hci_sync: Protect UUID list traversal - RFCOMM: Fix session UAF in set_termios - btusb: validate Realtek vendor event length * tag 'for-net-2026-07-21' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth: Bluetooth: btusb: validate Realtek vendor event length Bluetooth: RFCOMM: Fix session UAF in set_termios Bluetooth: hci_sync: Protect UUID list traversal ==================== Link: https://patch.msgid.link/20260721160240.884274-1-luiz.dentz@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22ext4: write back partial-zeroed edges in WRITE_ZEROESZhang Yi
FALLOC_FL_WRITE_ZEROES requires that all blocks in the requested range end up as written extents with zeroed content. For unaligned edges that were partial-zeroed in dirty unwritten or delalloc state, the buffer is left dirty while the underlying extent may not yet be converted to written. As a result, a subsequent SYNC write to this range would still trigger metadata changes, which violates the semantics of WRITE_ZEROES. Fix this by calling filemap_write_and_wait_range() for partial-zeroed edges to flush out the zeroed data and ensure the extent conversion is complete. Fixes: f4265b8d32c4 ("ext4: add FALLOC_FL_WRITE_ZEROES support") Cc: stable@vger.kernel.org Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-9-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: zero out whole block for clean edges in WRITE_ZEROESZhang Yi
FALLOC_FL_WRITE_ZEROES requires that all blocks in the requested range end up as written extents with zeroed content. For unaligned edges that were already allocated, ext4_zero_partial_blocks() zeros them directly. However, for unaligned edges whose underlying extent is a clean unwritten extent or a hole, the extent type remains unwritten after partial zeroing, which does not align with the semantics of WRITE_ZEROES. Therefore, when ext4_zero_partial_blocks() skips partial zeroing, it indicates that the corresponding edges are clean unwritten extents or holes. In this case, we need to expand the aligned allocation range outward to cover such edges, so that ext4_alloc_file_blocks() can correctly allocate blocks for the unaligned range. Edges that were partial-zeroed (i.e., written or dirty) are left untouched. Fixes: f4265b8d32c4 ("ext4: add FALLOC_FL_WRITE_ZEROES support") Cc: stable@vger.kernel.org Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-8-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: track partial-zero outcome per edge in ext4_zero_partial_blocks()Zhang Yi
Replace the single bool did_zero output of ext4_zero_partial_blocks() with a bitmask that records which edge (start, end, or both in the single-block case) was actually partial-zeroed. This allows callers to distinguish which edges have been zeroed, preparing for unaligned FALLOC_FL_WRITE_ZEROES handling in later patches. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-7-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: clarify return semantics of ext4_load_tail_bh()Zhang Yi
ext4_load_tail_bh() returns NULL for both holes and clean unwritten buffers, but the conditions that lead to this are not obvious from the code alone. Document this behavior to clarify the return value, so that readers do not mistakenly assume that only holes result in a NULL return. Also update the inline comment following the ext4_get_block() call to reflect this, and note that a lookup-only get_block (without EXT4_GET_BLOCKS_CREATE) never sets BH_Mapped for clean unwritten extents, which is why a clean unwritten bh falls through to the "nothing to do" path. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-6-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: move partial block zeroing earlier in ext4_zero_range()Zhang Yi
In ext4_zero_range(), move the ext4_zero_partial_blocks() call, which handles unaligned edges, into the same branch where the unaligned range is preallocated, immediately after ext4_alloc_file_blocks(). This is safe because there is no dependency between partial block handling and the subsequent full block handling. This change will be used by later patches that handle unaligned FALLOC_FL_WRITE_ZEROES operations, which will need to check the partial zeroed result. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-5-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: check return value of ext4_get_block() in ext4_load_tail_bh()Zhang Yi
ext4_load_tail_bh() ignores the return value of ext4_get_block(), so an I/O or allocation failure is silently discarded. buffer_mapped(bh) stays false and the function returns NULL, which callers such as ext4_block_do_zero_range() treat as "nothing to do" and return success. This can mask real failures during zero-range, truncate, or punch-hole operations, potentially exposing stale data if the block was not actually a hole and needed zeroing. So propagate the error to the callers. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-4-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: skip tail block zeroing for inline data filesZhang Yi
ext4_block_zero_eof() is called from ext4_write_checks() on every append write beyond EOF. For inline data files, ext4_get_block() returns -ERANGE when ext4_load_tail_bh() looks up the tail block. However, this error is currently ignored because the return value of ext4_get_block() in ext4_load_tail_bh() is discarded. Before we fix ext4_load_tail_bh() to properly propagate the error, skip the zeroing for inline data inodes to avoid unnecessary failures or confusion. Fixes: 3f60efd65412d ("ext4: zero post-EOF partial block before appending write") Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-3-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: use FGP_WRITEBEGIN for tail block zeroingZhang Yi
ext4_load_tail_bh() returns a locked folio that callers immediately mutate through folio_zero_range() and mark_buffer_dirty(). Use FGP_WRITEBEGIN so that, on backing devices that require stable writes, __filemap_get_folio() waits for writeback to finish before returning the folio; on regular devices the wait is a no-op. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260714080044.4038124-2-yi.zhang@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22Merge tag 'ath-next-20260722' of ↵Johannes Berg
git://git.kernel.org/pub/scm/linux/kernel/git/ath/ath Jeff Johnson says: ================== ath.git patches for v7.3 (PR #1) There has been quite a bit of activity across the ath drivers. Significant changes in ath12k include: Align with new Qualcomm generic Peripheral Authentication Service (PAS). Ongoing infrastructure changes to support the QCC2072 platform. Ongoing infrastructure changes to support the IPQ5332 platform. Enhance datapath statistics. Tuning of datapath parameters. In addition, an assortment of cleanups and minor bug fixes across ath6kl, ath10k, ath11k, ath12k, and carl9170. ================== Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-07-22Merge branch 'net-dsa-realtek-rtl8365mb-add-sgmii-hsgmii-support-for-rtl8367s'Jakub Kicinski
Johan Alvarado says: ==================== net: dsa: realtek: rtl8365mb: add SGMII/HSGMII support for RTL8367S The RTL8367S is a 5+2 port switch from the same family as the RTL8365MB-VC already supported by this driver. Its chip info table entry declares SGMII and HSGMII on external interface 1, but the driver so far only implements RGMII, leaving boards that wire the switch to the CPU over the SerDes without a working CPU port. This series implements both modes. The configuration sequence and the SerDes tuning parameters are derived from the GPL-licensed Realtek rtl8367c vendor driver, as distributed in the Mercusys MR80X GPL code drop, and cross-checked against the real register sequence captured at runtime by chainloading a custom U-Boot ahead of the stock firmware and logging the live SerDes accesses on hardware. The vendor driver brings up the SerDes by loading firmware into the switch's embedded DW8051 microcontroller. Analysis of that firmware (by Luiz Angelo Daros de Luca) showed it only performs a SerDes data-path reset right after the SerDes reset is deasserted, and then runs a link-polling loop that writes the external interface force registers -- duplicating, and racing with, the link management phylink already performs. This series therefore keeps the DW8051 disabled and performs the one necessary action (the data-path reset via the SerDes BMCR register) directly in the driver, avoiding both the race and a dependency on a redistributable firmware blob. The SerDes is modelled as a phylink PCS: mac_select_pcs() hands the SerDes interfaces to a phylink_pcs whose pcs_config()/pcs_link_up() ops own the SerDes register sequence, keeping it out of the MAC operations. In-band autonegotiation is not implemented; the link is forced (fixed-link or conventional PHY), as for RGMII, and the PCS reports this to phylink through pcs_inband_caps(). Patch 1 adds the SerDes indirect access helpers, the PCS and SGMII (1 Gbps) support. Patch 2 extends the PCS to HSGMII (2.5 Gbps), which phylink represents as 2500base-x. Tested on a Mercusys MR80X v2.20 (RTL8367S wired to the SoC over the SerDes), in both SGMII and HSGMII modes with a fixed-link device tree description: link bring-up verified across cold boots, warm reboots, module reloads and link down/up cycles, with sustained traffic and no CRC/symbol errors. The SerDes pause enables were verified by driving congestion toward a 100M user port and observing pause frame emission on the CPU port (dot3OutPauseFrames) toggle with the SDS_MISC TXFC/RXFC bits. The port 6 rate limiters were verified to be live by lowering them to 100 Mbps at runtime and observing iperf3 throughput across the CPU port clamp accordingly in each direction, recovering once the maximum was restored. The HSGMII link is confirmed running at 2.5G at the register level (SoC uniphy mode and gmac clocks); per-direction throughput could not be pushed past ~1 Gbps on this board because the SoC side is driven by the IPQ5018 SSDK and the user-facing PHY is 1G, so full 2.5G line-rate throughput remains unverified on my hardware. Independently, >1 Gbps aggregate HSGMII throughput (~2 Gbps with multiple clients) has been observed on an RTL8367S-based Mercusys MR85X running an OpenWrt backport of this series with the rate limiters raised (see patch 2). The RTL8367SB also declares SGMII and HSGMII in its chip info entry and therefore gains both modes as well. The vendor driver drives the two chips through the same code path, keyed only on the chip option register (both report chip id 0x6367), so this is expected to work there too, but I have no RTL8367SB hardware to confirm it. ==================== Link: https://patch.msgid.link/20260711-rtl8367s-sgmii-v6-0-88f7944ddca7@c127.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22net: dsa: realtek: rtl8365mb: add HSGMII support for RTL8367SJohan Alvarado
In addition to SGMII, the RTL8367S SerDes also supports HSGMII, which carries 2.5 Gbps with the same signaling as SGMII at 2.5x clock rate. The chip info table already declares HSGMII as a supported interface mode for external interface 1. Extend the SerDes PCS to handle HSGMII, which phylink represents as 2500base-x: - Select the HSGMII SerDes tuning parameters and external interface mode, and mux the SerDes to MAC8 in HSGMII mode, from pcs_config() according to the interface. The parameters are again lifted from the GPL-licensed Realtek rtl8367c vendor driver, and again only cover the tuning variant for a non-zero chip option, so the mode is gated on the option probed at setup. - Advertise 2500base-x and MAC_2500FD on ports whose external interface supports HSGMII. - Accept SPEED_2500 in the forced link configuration. The MAC speed field has no 2.5 Gbps value: the rate is determined by the HSGMII SerDes configuration, and the vendor driver programs the 1 Gbps value here, so do the same. - Raise the port 6 ingress and egress rate limiters to their maximum at setup time, as the vendor switch init does unconditionally for the whole chip family. The chip resets them to 0x1FFFF (~1.048 Gbps in units of 8 Kbps), which caps the aggregate HSGMII throughput at roughly 1 Gbps. The vendor documentation describes the reset default as disabling the limiter, but the cap is real: on an RTL8367S-based Mercusys MR85X running an OpenWrt backport of this series, several clients on 1 Gbps user ports were limited to about 1.02 Gbps combined across the HSGMII CPU port until these limiters were raised, after which throughput reached about 2 Gbps [1]. The related HSGMII scheduler line rate (LINE_RATE_HSG_H) is already set to its maximum by the common init jam table. Tested on a Mercusys MR80X v2.20, where the RTL8367S is connected to the SoC over HSGMII. Link: https://github.com/openwrt/openwrt/pull/19445#issuecomment-4505613294 [1] Suggested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Suggested-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Signed-off-by: Johan Alvarado <contact@c127.dev> Tested-by: Stanisław Pal <kuncy7@gmail.com> Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Reviewed-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Tested-by: Stanislaw Pal <kuncy7@gmail.com> Link: https://patch.msgid.link/20260711-rtl8367s-sgmii-v6-2-88f7944ddca7@c127.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22net: dsa: realtek: rtl8365mb: add SGMII support for RTL8367SJohan Alvarado
The RTL8367S can mux its embedded SerDes to external interface 1, which is typically used to connect the switch to a CPU port. The chip info table already declares SGMII as a supported interface mode for this chip, but the driver only implements RGMII so far. Implement SGMII support as a phylink PCS, with the configuration sequence derived from the GPL-licensed Realtek rtl8367c vendor driver as distributed in the Mercusys MR80X GPL code drop: - Add accessors for the SerDes indirect access registers (SDS_INDACS), through which the SerDes internal registers are reached. - Register a phylink_pcs for the SerDes, selected from mac_select_pcs for the SGMII interface, so the SerDes handling lives in the PCS operations rather than in the MAC operations. - Probe the SerDes tuning variant from the chip option register once at setup. The vendor driver keeps two sets of SerDes tuning parameters and selects between them based on this option; only the variant for a non-zero option (which all RTL8367S parts seen so far report) has been validated on hardware, so the SerDes interface modes are only advertised in that case. An unsupported variant thus fails at phylink validation time instead of at link configuration time. - Keep the embedded DW8051 microcontroller in reset and disabled. The vendor driver loads firmware into it to manage the SerDes link, but analysis of that firmware shows it only duplicates the link management phylink already performs: it polls the port status and writes the external interface force registers behind the driver's back. - Clear the line rate bypass bit for the external interface, tune the SerDes with the vendor-prescribed parameters, mux the SerDes to MAC8 in SGMII mode and only then take the SerDes out of reset, as the vendor driver does. - After deasserting the SerDes reset, reset the SerDes data path via the SerDes BMCR register to flush the FIFOs and resync the PLL. This mirrors what the vendor firmware does right after deasserting the SerDes reset, and ensures a clean link state from cold boot. - Force the SGMII link parameters (link, speed, duplex) in the SDS_MISC register from pcs_link_up(). SGMII in-band autonegotiation is not implemented, so only fixed-link and conventional PHY setups are supported, just like RGMII. This is reported to phylink through pcs_inband_caps() returning LINK_INBAND_DISABLE, so phylink never selects an in-band-enabled negotiation mode for this PCS. - Program the SerDes pause enables in SDS_MISC from the resolved pause modes when forcing the MAC external interface in mac_link_up, as the vendor driver does, rather than leaving whatever state the boot firmware left there. Flow control testing shows these bits, not the MAC force pause bits, gate pause on the SerDes external interface. This is done in the MAC layer because pcs_link_up() carries no pause information. - Implement pcs_get_state() by reading the link status from the SerDes, with the forced speed and duplex read back from SDS_MISC. Although the supported fixed-link and conventional PHY setups do not use it, the PCS owns the SerDes link state, and phylink consults pcs_get_state() to track the physical link when operating in in-band mode with autonegotiation disabled. The SerDes has no link interrupt wired up, so the PCS sets its poll flag. Tested on a Mercusys MR80X v2.20, where the RTL8367S is connected to the SoC over SGMII. Suggested-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Suggested-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Suggested-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Signed-off-by: Johan Alvarado <contact@c127.dev> Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com> Reviewed-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Reviewed-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> Tested-by: Stanislaw Pal <kuncy7@gmail.com> Link: https://patch.msgid.link/20260711-rtl8367s-sgmii-v6-1-88f7944ddca7@c127.dev Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22jbd2: bound shrinker scans by examined checkpoint buffersMax Kellermann
The jbd2 shrinker currently accounts only checkpoint buffers that it successfully releases against nr_to_scan. Busy buffers therefore do not consume the scan budget. If a checkpoint transaction contains mostly busy buffers, the shrinker can scan its entire checkpoint list while holding journal->j_list_lock. Large checkpoint lists can result in excessive lock hold times and leave other CPUs spinning on j_list_lock, causing soft lockups or RCU stalls. Pass nr_to_scan into journal_shrink_one_cp_list() and decrement it for every buffer examined, including busy buffers. Pass NULL from checkpoint cleanup paths so their existing full-list behavior is preserved. This restores the scan-budget semantics that existed before journal_shrink_one_cp_list() was changed to always scan a complete checkpoint list. Fixes: b98dba273a0e ("jbd2: remove journal_clean_one_cp_list()") Cc: stable@vger.kernel.org Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260713102229.1598812-3-max.kellermann@ionos.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22jbd2: check need_resched() when skipping busy checkpoint buffersMax Kellermann
journal_shrink_one_cp_list() skips busy checkpoint buffers when called with JBD2_SHRINK_BUSY_SKIP. The continue statement on this path also skips the need_resched() check at the end of the loop body. Consequently, when a checkpoint list contains mostly busy buffers, the shrinker can walk the entire list while holding journal->j_list_lock, even when a reschedule has been requested. Large checkpoint lists under memory pressure can therefore cause long lock hold times and leave other CPUs spinning on j_list_lock, resulting in soft lockups or RCU stalls. Route the busy-buffer path through the need_resched() check so that the shrinker can release j_list_lock and reschedule promptly, restoring parity with the clean-buffer path, which already checks need_resched(). This does not change which checkpoint buffers are eligible for removal. Fixes: b98dba273a0e ("jbd2: remove journal_clean_one_cp_list()") Cc: stable@vger.kernel.org Signed-off-by: Max Kellermann <max.kellermann@ionos.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260713102229.1598812-2-max.kellermann@ionos.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: use str_plural() instead of custom macroJoshua Crofts
Remove the custom PLURAL() macro and use str_plural() from string_choices.h instead. Reviewed-by: Baokun Li <libaokun@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Joshua Crofts <joshua.crofts1@gmail.com> Link: https://patch.msgid.link/20260713-remove-plural-macro-v2-1-424e1536ac10@gmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22fs: add iput_if_not_last() helperYun Zhou
Add a helper that drops an inode reference only if the caller does not hold the last one. Returns true if the reference was dropped, false otherwise. This is useful for filesystems that need to release inode references in contexts where triggering final iput (and thus eviction) would be unsafe due to lock ordering constraints. The caller can check the return value and defer the final iput to a safe context. Unlike iput_not_last() which BUG_ON's if called with the last ref, this variant is designed to be called speculatively. Signed-off-by: Yun Zhou <yun.zhou@windriver.com> Suggested-by: Jan Kara <jack@suse.cz> Suggested-by: Mateusz Guzik <mjguzik@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christian Brauner (Amutable) <brauner@kernel.org> Tested-by: syzbot@syzkaller.appspotmail.com Link: https://patch.msgid.link/20260710030851.2791589-2-yun.zhou@windriver.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: remove ea_inode_array mechanism in favor of ext4_put_ea_inode()Yun Zhou
Now that ext4_put_ea_inode() handles deferred iput safely for all cases (using iput_if_not_last + embedded llist_node), the ea_inode_array mechanism for batching deferred iputs is redundant. Remove: - ext4_expand_inode_array() and ext4_xattr_inode_array_free() - struct ext4_xattr_inode_array and EIA_INCR/EIA_MASK defines - ea_inode_array parameter from ext4_xattr_inode_dec_ref_all(), ext4_xattr_release_block(), and ext4_xattr_delete_inode() - ea_inode_array variable from ext4_evict_inode() Instead, ext4_xattr_inode_dec_ref_all() now calls ext4_put_ea_inode() directly after processing each EA inode. This simplifies the code by eliminating multi-layer parameter threading and removes the need for callers to manage array lifetime. Signed-off-by: Yun Zhou <yun.zhou@windriver.com> Suggested-by: Jan Kara <jack@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz> Tested-by: syzbot@syzkaller.appspotmail.com Link: https://patch.msgid.link/20260710030851.2791589-5-yun.zhou@windriver.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: convert all EA inode iput() calls to ext4_put_ea_inode()Yun Zhou
Convert all iput() calls on EA inodes in xattr code paths to use ext4_put_ea_inode(). This establishes a uniform rule: every EA inode reference release in ext4 xattr code goes through ext4_put_ea_inode(), eliminating the need to analyze each call site individually for lock safety. Converted sites: - ext4_xattr_inode_get() read path - ext4_xattr_inode_inc_ref_all() main loop and cleanup path - ext4_xattr_inode_dec_ref_all() error paths - ext4_xattr_inode_create() error path - ext4_xattr_inode_cache_find() mismatch path - ext4_xattr_inode_lookup_create() out_err - ext4_xattr_set_entry() old_ea_inode - ext4_xattr_block_set() new block path, cleanup, and tmp_inode - ext4_xattr_ibody_set() error and success paths - ext4_xattr_delete_inode() quota loop For most of these, iput_if_not_last() will succeed (the EA inode has other references) making the overhead a single atomic operation. Signed-off-by: Yun Zhou <yun.zhou@windriver.com> Reviewed-by: Jan Kara <jack@suse.cz> Tested-by: syzbot@syzkaller.appspotmail.com Link: https://patch.msgid.link/20260710030851.2791589-4-yun.zhou@windriver.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: introduce ext4_put_ea_inode() for safe deferred iputYun Zhou
Calling iput() on EA inodes while holding xattr_sem or a jbd2 handle can trigger write_inode_now() -> ext4_writepages() -> s_writepages_rwsem, creating a lock ordering issue during mount (!SB_ACTIVE). Add ext4_put_ea_inode() which uses iput_if_not_last() as a fast path. If this is not the last reference, it is dropped immediately. If this is the last reference, the inode is linked onto a per-sb lock-free llist via i_ea_iput_node (embedded in ext4_inode_info, sharing space with the unused xattr_sem of EA inodes via a union) and a delayed worker (1 jiffie) performs the final iput() in a clean context. This avoids per-iput memory allocation. Flush points ensure all pending EA inode evictions complete before dependent resources become unavailable: - ext4_put_super / failed_mount9: before quota shutdown - failed_mount_wq: before freeing xattr caches - failed_mount3a: before freeing shrinker (journal replay case) - ext4_sync_fs: before remount-ro, freeze, or sync completes Initialization is placed before journal loading since fast commit replay may trigger evictions that call ext4_put_ea_inode(). Also moves init_rwsem(xattr_sem) from init_once to ext4_alloc_inode to handle slab object reuse after the union field has been overwritten. Signed-off-by: Yun Zhou <yun.zhou@windriver.com> Suggested-by: Jan Kara <jack@suse.cz> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260710030851.2791589-3-yun.zhou@windriver.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: check dir entry fits before reading the hash trailer in ext4_search_dir()Xiang Mei
For casefolded encrypted directories ext4 stores an 8-byte hash trailer after the name (EXT4_DIRENT_HASHES()), at an offset derived from de->name_len. On the sb_no_casefold_compat_fallback() path ext4_match() reads that trailer, but ext4_search_dir()'s by-hand pre-check only tests de->name + de->name_len <= dlimit, which proves the name fits, not the rounded trailer. A crafted entry whose name ends at the block boundary passes the check while EXT4_DIRENT_HASHES(de) lands past the block end, so ext4_match() reads out of bounds on an ordinary lookup. KASAN reports it as a use-after-free when the page after the directory block holds a freed object: BUG: KASAN: use-after-free in ext4_match (fs/ext4/namei.c:1435) Read of size 4 at addr ffff888010458000 by task exploit Call Trace: ext4_match (fs/ext4/namei.c:1435) ext4_search_dir (fs/ext4/namei.c:1470) __ext4_find_entry (fs/ext4/namei.c:1268 fs/ext4/namei.c:1632) ext4_lookup (fs/ext4/namei.c:1703 fs/ext4/namei.c:1769) ... filename_lookup (fs/namei.c:2842) vfs_statx (fs/stat.c:353) __do_sys_newfstatat (fs/stat.c:538) do_syscall_64 (arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) Require, for hash-in-dirent directories, that the whole entry including the rounded trailer fits before calling ext4_match(). This is the same bound ext4_check_dir_entry() already enforces via ext4_dir_rec_len(), so no well-formed entry is rejected. The other caller, ext4_find_dest_de(), runs ext4_check_dir_entry() first and is unaffected. Fixes: 471fbbea7ff7 ("ext4: handle casefolding with encryption") Reported-by: Weiming Shi <bestswngs@gmail.com> Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Xiang Mei <xmei5@asu.edu> Reviewed-by: Andreas Dilger <adilger@dilger.ca> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20260709184101.441348-1-xmei5@asu.edu Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22ext4: fix buffer_head leak in ext4_init_orphan_infoGuanghui Yang
ext4_init_orphan_info() reads orphan file blocks with ext4_bread() and stores the returned buffer_head in oi->of_binfo[i].ob_bh. If ext4_bread() succeeds but the orphan block magic or checksum validation fails, the function jumps to out_free. However, the old out_free loop starts releasing buffers from i - 1, so the current buffer_head at index i is skipped. This leaks the buffer_head reference obtained by ext4_bread() on the bad magic and bad checksum error paths. Fix this by tracking the number of successfully read buffer_heads and releasing exactly those buffer_heads on the error path. Fixes: 02f310fcf47f ("ext4: Speedup ext4 orphan inode handling") Signed-off-by: Guanghui Yang <3497809730@qq.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/tencent_B38798612A159E21450ECF959016371B0807@qq.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22Documentation/core-api: min_heap: remove documented but unimplemented ↵Jyun-An Chen
min_heap_empty() min_heap_empty()/min_heap_empty_inline() are documented as part of the Min Heap API, but no such functions or macros exist in include/linux/min_heap.h or lib/min_heap.c. Remove the stale description. Acked-by: Kuan-Wei Chiu <visitorckw@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jyun-An Chen <jun930436@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260722044236.6346-1-jun930436@gmail.com>
2026-07-22libarena: Use compiler load-acquire/store-release in bpf_atomic.hPuranjay Mohan
Teach libarena's BPF atomic primitives to use compiler builtins for load-acquire and store-release when Clang advertises __BPF_FEATURE_LOAD_ACQ_STORE_REL. Older compilers continue to use the existing barrier-based fallback. Notably, as BPF programs begin running on arm64, it is better to use the more appropriate variants since we can no longer rely on x86 TSO ordering. Commit 880442305a39 ("bpf: Introduce load-acquire and store-release instructions") introduced support, hence kernels from 6.15 onwards are needed when compiling with compilers supporting these instructions. We have relatively recent kernel version requirements in libarena anyway, and have not cut first release, hence declare such a dependency. Signed-off-by: Puranjay Mohan <puranjay@kernel.org> Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com> Link: https://lore.kernel.org/bpf/20260722141003.2841007-1-puranjay@kernel.org Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
2026-07-22ext4: clear error before retrying inode xattr space fallbackGuanghui Yang
When ext4_xattr_make_inode_space() returns -ENOSPC, ext4_expand_extra_isize_ea() can retry the expansion with s_min_extra_isize. If that retry succeeds by finding enough ibody free space, control jumps directly to the shift label. The previous -ENOSPC is still stored in error in that path, so the function can update i_extra_isize but still return -ENOSPC to the caller. Clear error before retrying so a successful fallback expansion returns success. Reproduced with an ext4 image using 1 KiB blocks, project quota support, 256-byte inodes, and min_extra_isize/want_extra_isize set to 32. FS_IOC_FSSETXATTR failures dropped from 802 to 86 after the fix. Fixes: 69f3a3039b0d ("ext4: introduce ITAIL helper") Cc: stable@vger.kernel.org Signed-off-by: Guanghui Yang <3497809730@qq.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/tencent_192F8A699EFD21126E02101131C9546F3C08@qq.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22RDMA/bnxt_re: Clear VM_MAYWRITE on DBR/toggle page mmapSelvin Xavier
bnxt_re_mmap() rejects VM_WRITE for the DBR_PAGE and TOGGLE_PAGE mmap flags, but a read-only mapping can still retain VM_MAYWRITE. nd later be upgraded with mprotect(PROT_WRITE). This can bypass the write check that only runs at mmap time. Clear VM_MAYWRITE before vm_insert_page() in the shared DBR/toggle-page branch, matching the existing policy that userspace writes are not expected for these pages. Fixes: ea222485788208 ("RDMA/bnxt_re: Update alloc_page uapi for pacing") Suggested-by: Yousef Alhouseen <alhouseenyousef@gmail.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/20260721115440.24021-5-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
2026-07-22drm/xe/i2c: Allow per domain unique idRaag Jadav
PCI bus, device and function can be same for devices existing across different domains. Allow per domain unique identifier while registering platform device to prevent name conflict. Fixes: f0e53aadd702 ("drm/xe: Support for I2C attached MCUs") Signed-off-by: Raag Jadav <raag.jadav@intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://patch.msgid.link/20260721113438.651100-1-raag.jadav@intel.com Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
2026-07-22ext4: propagate errors from fast commit range replayGuanghui Yang
ext4_fc_replay() stops replaying fast commit tags only when a tag handler returns a negative error. However, ext4_fc_replay_add_range() and ext4_fc_replay_del_range() currently return 0 from their common exit paths even after internal failures. This hides errors from ext4_fc_record_modified_inode(), ext4_map_blocks(), ext4_find_extent(), ext4_ext_insert_extent(), ext4_ext_replay_update_ex(), and ext4_ext_remove_space(). As a result, a failed ADD_RANGE or DEL_RANGE replay can be treated as successful and the replay code may continue with subsequent fast commit tags. This is particularly problematic for DEL_RANGE because it may already have marked blocks as free before ext4_ext_remove_space() fails. If the error is swallowed, replay may continue from a partially applied range operation. Return the saved error from the common exit paths and make the ERR_PTR() cases in ADD_RANGE store PTR_ERR() before jumping to out. Fixes: 8016e29f4362 ("ext4: fast commit recovery path") Cc: stable@vger.kernel.org Signed-off-by: Guanghui Yang <3497809730@qq.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/tencent_E3622146846A84C75C31C7D32AC4D5AD0605@qq.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
2026-07-22docs/ja_JP: translate submitting-patches.rst (sign-off)Akiyoshi Kurita
Translate the "Include PATCH in the subject" and "Sign your work - the Developer's Certificate of Origin" sections into Japanese. Keep the DCO text in English as the original certificate text, and add a Japanese note that the sign-off refers to the English DCO text. Use a reStructuredText note directive to make it clear that the note is specific to the Japanese translation. Signed-off-by: Akiyoshi Kurita <weibu@redadmin.org> Acked-by: Akira Yokosawa <akiyks@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260720223410.421262-1-weibu@redadmin.org>
2026-07-22Documentation: proc: fix repeated word 'page'Yahya Toubali
Remove the duplicate 'page' in the sentence describing large page allocation accounting. The extra word makes the description confusing. Signed-off-by: Yahya Toubali <yahya@yahyatoubali.me> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260718165613.1923550-1-yahya@yahyatoubali.me>
2026-07-22scripts/kernel-doc: Suggest possible names for excess descriptionsRyszard Knop
Recent check_sections() change added a warning if a documentation tag member name does not match the detected struct/union member names. Since the checker knows all possible names, we can suggest known names, so that it's more obvious how to deal with the warning. Signed-off-by: Ryszard Knop <ryszard.knop@intel.com> Tested-by: Randy Dunlap <rdunlap@infradead.org> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <20260717125753.634550-1-ryszard.knop@intel.com>
2026-07-22x86/cpu: Remove unnecessary __maybe_unused annotationsThorsten Blum
Remove __maybe_unused from variables and functions that are referenced unconditionally. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Link: https://patch.msgid.link/20260630083031.683508-2-thorsten.blum@linux.dev
2026-07-22Merge tag 'wireless-2026-07-22' of ↵Jakub Kicinski
https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Lots of fixes: - mostly driver security/robustness/warning fixes - ath12k: fix MLO throughput regression - iwlwifi: add UNII-9 to avoid regression - brcmfmac: - fix 802.1X-SHA256 - SDIO fix for some boards - mac80211: - fix traffic indication for sleeping STAs - fix NAN throughput * tag 'wireless-2026-07-22' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (80 commits) wifi: brcmfmac: fix 802.1X-SHA256 call trace warning wifi: mt76: mt7996: fix possible NULL-pointer deref in mt7996_mcu_sta_bfer_eht() wifi: mt76: mt7925: fix crash in reset link replay wifi: mt76: fix airoha_npu dependency tracking wifi: mt76: restrict NPU/PPE active checks to MMIO devices wifi: mt76: fix MAC address for non OF pcie cards wifi: mt76: mt7996: check pointer returned by mt76_connac_get_he_phy_cap() wifi: mt76: mt7925: fix possible NULL-pointer deref in mt7925_mcu_bss_he_tlv() wifi: mt76: connac: fix possible NULL-pointer deref in mt76_connac_mcu_uni_bss_he_tlv() wifi: mt76: mt7915: guard HE capability lookups wifi: mt76: mt7925: guard link STA in decap offload wifi: mt76: Disable napi when removing device wifi: mt76: mt7615: drop TXRX_NOTIFY on non-mmio buses wifi: mt76: mt7925: drop TXRX_NOTIFY on non-mmio buses wifi: mt76: mt7921: drop TXRX_NOTIFY on non-mmio buses wifi: brcmfmac: set F2 blocksize to 256 for BCM43752 wifi: cfg80211: guard optional PMSR nominal time wifi: mac80211_hwsim: reject undersized HWSIM_ATTR_TX_INFO wifi: brcmfmac: drain bus_reset work on device removal wifi: brcmfmac: make release_scratchbuffers idempotent ... ==================== Link: https://patch.msgid.link/20260722092647.119094-3-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-07-22wifi: ath11k: add purwa-iot-evk and qcs6490-rb3gen2 to usecase firmware tableMiaoqing Pan
Add purwa-iot-evk and qcs6490-rb3gen2 platform support to the usecase firmware lookup table for WCN6855 hw2.1. These platforms use the nfa765 firmware path for usecase-based firmware selection. Also reorder the table entries by compatible string. Tested-on: WCN6855 hw2.1 PCI WLAN.HSP.1.1-04685-QCAHSPSWPL_V1_V2_SILICONZ_IOE-1 Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260713020359.3618193-1-miaoqing.pan@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
2026-07-22wifi: ath11k: Avoid buffer overread in ath11k_wmi_tlv_op_rx()Jeff Johnson
Currently, in ath11k_wmi_tlv_op_rx(), the firmware buffer is read without first verifying that the buffer has enough data to hold a header. This could result in a buffer overread. Add an upfront length check before dereferencing skb->data as a wmi_cmd_hdr. The check is placed before the trace_ath11k_wmi_event() call to preserve the existing trace semantics (tracing the full raw WMI event including the header), unlike the analogous ath12k fix which could use skb_pull_data() directly. Compile tested only. Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices") Assisted-by: Claude:claude-sonnet-4-6 Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260716-ath11k_wmi_tlv_op_rx-overread-v1-1-0b972b3f1368@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
2026-07-22wifi: ath12k: Avoid buffer overread in ath12k_wmi_op_rx()Jeff Johnson
Currently, in ath12k_wmi_op_rx(), the firmware buffer is read without first verifying that the buffer has enough data to hold a header. This could result in a buffer overread. Update the logic to verify the buffer contains at least enough data to hold a wmi_cmd_hdr before reading from the buffer. Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3 Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices") Assisted-by: Claude:claude-sonnet-4-6 Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Link: https://patch.msgid.link/20260716-ath12k_wmi_op_rx-overread-v1-1-327a4b1c2372@oss.qualcomm.com Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
2026-07-22wifi: ath12k: fix survey indexing across bandsMatthew Leach
When running 'iw dev wlan0 survey dump' the values for the channel busy time have the same sequence across bands. This is caused by indexing into the ath12k survey array using a band-local index rather than the global index passed by mac80211. This results in surveys for 5 GHz and 6 GHz channels returning values from 2.4 GHz slots, making the survey unusable on those bands. Further, there are redundant survey slots for multi-radio/single-phy instances. Fix by moving the survey data into ath12k_hw so multiple radios under a single wiphy share one table, and index into it using the global mac80211 index. A new spinlock in ath12k_hw serialises access to the survey array, which is now shared across all radios under a single hw. Band busy-times Before this fix: 2.4 GHz: 9, 2, 2, 2, 4, 2, 10, 16, 4, 12, 5 5 GHz: 9, 2, 2, 2, 4, 2, 10, 16, 4, 12, 5 6 GHz: 9, 2, 2, 2, 4, 2, 10, 16, 4, 12, 5 After this fix, times are independent: 2.4 GHz: 23, 5, 5, 12, 2, 12, 26, 5, 3, 1, 27 5 GHz: 30, 40, 29, 27, 118, 118, 112, 120, 11, 11, 11 6 GHz: 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 Tested-on: wcn7850 hw2.0 PCI WLAN.IOE_HMT.1.1-00018-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1 Fixes: 4f242b1d6996 ("wifi: ath12k: support get_survey mac op for single wiphy") Signed-off-by: Matthew Leach <matthew.leach@collabora.com> Reviewed-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com> Reviewed-by: Rameshkumar Sundaram <rameshkumar.sundaram@oss.qualcomm.com> Link: https://patch.msgid.link/20260703-ath12-survey-band-fix-v3-1-2fb050c2505a@collabora.com [fixed ath12k-check issues] Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
2026-07-22wifi: ath6kl: Constify struct cfg80211_opsChristophe JAILLET
'struct cfg80211_ops' is not modified in this driver. Constifying this structure moves some data to a read-only section, so increases overall security, especially when the structure holds some function pointers. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 143726 34579 192 178497 2b941 drivers/net/wireless/ath/ath6kl/cfg80211.o After: ===== text data bss dec hex filename 144814 33491 192 178497 2b941 drivers/net/wireless/ath/ath6kl/cfg80211.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/5aace954b6ef5c42017b83a1bffb859618e9498a.1784013180.git.christophe.jaillet@wanadoo.fr Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>