Changelog in Linux kernel 6.19.10

 
ACPI: processor: Fix previous acpi_processor_errata_piix4() fix [+ + +]
Author: Rafael J. Wysocki <[email protected]>
Date:   Tue Mar 17 21:39:05 2026 +0100

    ACPI: processor: Fix previous acpi_processor_errata_piix4() fix
    
    [ Upstream commit bf504b229cb8d534eccbaeaa23eba34c05131e25 ]
    
    After commi f132e089fe89 ("ACPI: processor: Fix NULL-pointer dereference
    in acpi_processor_errata_piix4()"), device pointers may be dereferenced
    after dropping references to the device objects pointed to by them,
    which may cause a use-after-free to occur.
    
    Moreover, debug messages about enabling the errata may be printed
    if the errata flags corresponding to them are unset.
    
    Address all of these issues by moving message printing to the points
    in the code where the errata flags are set.
    
    Fixes: f132e089fe89 ("ACPI: processor: Fix NULL-pointer dereference in acpi_processor_errata_piix4()")
    Reported-by: Guenter Roeck <[email protected]>
    Closes: https://lore.kernel.org/linux-acpi/[email protected]/
    Reviewed-by: Guenter Roeck <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
ACPICA: Update the format of Arg3 of _DSM [+ + +]
Author: Saket Dumbre <[email protected]>
Date:   Tue Mar 17 20:34:49 2026 +0100

    ACPICA: Update the format of Arg3 of _DSM
    
    [ Upstream commit ab93d7eee94205430fc3b0532557cb0494bf2faf ]
    
    To get rid of type incompatibility warnings in Linux.
    
    Fixes: 81f92cff6d42 ("ACPICA: ACPI_TYPE_ANY does not include the package type")
    Link: https://github.com/acpica/acpica/commit/4fb74872dcec
    Signed-off-by: Saket Dumbre <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
af_unix: Give up GC if MSG_PEEK intervened. [+ + +]
Author: Kuniyuki Iwashima <[email protected]>
Date:   Wed Mar 11 05:40:40 2026 +0000

    af_unix: Give up GC if MSG_PEEK intervened.
    
    [ Upstream commit e5b31d988a41549037b8d8721a3c3cae893d8670 ]
    
    Igor Ushakov reported that GC purged the receive queue of
    an alive socket due to a race with MSG_PEEK with a nice repro.
    
    This is the exact same issue previously fixed by commit
    cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK").
    
    After GC was replaced with the current algorithm, the cited
    commit removed the locking dance in unix_peek_fds() and
    reintroduced the same issue.
    
    The problem is that MSG_PEEK bumps a file refcount without
    interacting with GC.
    
    Consider an SCC containing sk-A and sk-B, where sk-A is
    close()d but can be recv()ed via sk-B.
    
    The bad thing happens if sk-A is recv()ed with MSG_PEEK from
    sk-B and sk-B is close()d while GC is checking unix_vertex_dead()
    for sk-A and sk-B.
    
      GC thread                    User thread
      ---------                    -----------
      unix_vertex_dead(sk-A)
      -> true   <------.
                        \
                         `------   recv(sk-B, MSG_PEEK)
                  invalidate !!    -> sk-A's file refcount : 1 -> 2
    
                                   close(sk-B)
                                   -> sk-B's file refcount : 2 -> 1
      unix_vertex_dead(sk-B)
      -> true
    
    Initially, sk-A's file refcount is 1 by the inflight fd in sk-B
    recvq.  GC thinks sk-A is dead because the file refcount is the
    same as the number of its inflight fds.
    
    However, sk-A's file refcount is bumped silently by MSG_PEEK,
    which invalidates the previous evaluation.
    
    At this moment, sk-B's file refcount is 2; one by the open fd,
    and one by the inflight fd in sk-A.  The subsequent close()
    releases one refcount by the former.
    
    Finally, GC incorrectly concludes that both sk-A and sk-B are dead.
    
    One option is to restore the locking dance in unix_peek_fds(),
    but we can resolve this more elegantly thanks to the new algorithm.
    
    The point is that the issue does not occur without the subsequent
    close() and we actually do not need to synchronise MSG_PEEK with
    the dead SCC detection.
    
    When the issue occurs, close() and GC touch the same file refcount.
    If GC sees the refcount being decremented by close(), it can just
    give up garbage-collecting the SCC.
    
    Therefore, we only need to signal the race during MSG_PEEK with
    a proper memory barrier to make it visible to the GC.
    
    Let's use seqcount_t to notify GC when MSG_PEEK occurs and let
    it defer the SCC to the next run.
    
    This way no locking is needed on the MSG_PEEK side, and we can
    avoid imposing a penalty on every MSG_PEEK unnecessarily.
    
    Note that we can retry within unix_scc_dead() if MSG_PEEK is
    detected, but we do not do so to avoid hung task splat from
    abusive MSG_PEEK calls.
    
    Fixes: 118f457da9ed ("af_unix: Remove lock dance in unix_peek_fds().")
    Reported-by: Igor Ushakov <[email protected]>
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
arm64: dts: renesas: r8a78000: Fix out-of-range SPI interrupt numbers [+ + +]
Author: Geert Uytterhoeven <[email protected]>
Date:   Wed Mar 4 17:29:01 2026 +0100

    arm64: dts: renesas: r8a78000: Fix out-of-range SPI interrupt numbers
    
    [ Upstream commit 85c2601e2c2feb60980c7ca23de28c49472f61f1 ]
    
    SPI interrupts are in the range 0-987.  Extended SPI interrupts should
    use GIC_ESPI, instead of abusing GIC_SPI with a manual offset of 4064.
    
    Fixes: 63500d12cf76d003 ("arm64: dts: renesas: Add R8A78000 SoC support")
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/1f9dd274720ea1b66617a5dd84f76c3efc829dc8.1772641415.git.geert+renesas@glider.be
    Signed-off-by: Sasha Levin <[email protected]>

arm64: dts: renesas: r9a09g057: Remove wdt{0,2,3} nodes [+ + +]
Author: Fabrizio Castro <[email protected]>
Date:   Tue Feb 3 12:42:46 2026 +0000

    arm64: dts: renesas: r9a09g057: Remove wdt{0,2,3} nodes
    
    [ Upstream commit a3f34651de4287138c0da19ba321ad72622b4af3 ]
    
    The HW user manual for the Renesas RZ/V2H(P) SoC (a.k.a r9a09g057)
    states that only WDT1 is supposed to be accessed by the CA55 cores.
    WDT0 is supposed to be used by the CM33 core, WDT2 is supposed
    to be used by the CR8 core 0, and WDT3 is supposed to be used
    by the CR8 core 1.
    
    Remove wdt{0,2,3} from the SoC specific device tree to make it
    compliant with the specification from the HW manual.
    
    This change is harmless as there are currently no users of the
    wdt{0,2,3} device tree nodes, only the wdt1 node is actually used.
    
    Fixes: 095105496e7d ("arm64: dts: renesas: r9a09g057: Add WDT0-WDT3 nodes")
    Signed-off-by: Fabrizio Castro <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

arm64: dts: renesas: r9a09g077: Fix CPG register region sizes [+ + +]
Author: Lad Prabhakar <[email protected]>
Date:   Fri Feb 13 13:17:41 2026 +0000

    arm64: dts: renesas: r9a09g077: Fix CPG register region sizes
    
    [ Upstream commit b12985ceca18bcf67f176883175d544daad5e00e ]
    
    The CPG register regions were incorrectly sized.  Update them to match
    the actual hardware specification:
      - First region (0x80280000): 0x1000 -> 0x10000 (64kiB)
      - Second region (0x81280000): 0x9000 -> 0x10000 (64kiB)
    
    Fixes: d17b34744f5e4 ("arm64: dts: renesas: Add initial support for the Renesas RZ/T2H SoC")
    Signed-off-by: Lad Prabhakar <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

arm64: dts: renesas: r9a09g087: Fix CPG register region sizes [+ + +]
Author: Lad Prabhakar <[email protected]>
Date:   Fri Feb 13 13:17:42 2026 +0000

    arm64: dts: renesas: r9a09g087: Fix CPG register region sizes
    
    [ Upstream commit f459672cf3ffd3c062973838951418271aa2ceef ]
    
    The CPG register regions were incorrectly sized.  Update them to match
    the actual hardware specification:
      - First region (0x80280000): 0x1000 -> 0x10000 (64kiB)
      - Second region (0x81280000): 0x9000 -> 0x10000 (64kiB)
    
    Fixes: 4b3d31f0b81fe ("arm64: dts: renesas: Add initial SoC DTSI for the RZ/N2H SoC")
    Signed-off-by: Lad Prabhakar <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

arm64: dts: renesas: rzg3s-smarc-som: Set bypass for Versa3 PLL2 [+ + +]
Author: Claudiu Beznea <[email protected]>
Date:   Mon Mar 2 15:57:03 2026 +0200

    arm64: dts: renesas: rzg3s-smarc-som: Set bypass for Versa3 PLL2
    
    [ Upstream commit 6dcbb6f070cccabc6a13d640a5a84de581fdd761 ]
    
    The default settings for the Versa3 device on the Renesas RZ/G3S SMARC
    SoM board have PLL2 disabled. PLL2 was later enabled together with audio
    support, as it is required to support both 44.1 kHz and 48 kHz audio.
    
    With PLL2 enabled, it was observed that Linux occasionally either hangs
    during boot (the last log message being related to the I2C probe) or
    randomly crashes. This was mainly reproducible on cold boots. During
    debugging, it was also noticed that the Unicode replacement character (�)
    sometimes appears on the serial console. Further investigation traced this
    to the configuration applied through the Versa3 register at offset 0x1c,
    which controls PLL enablement.
    
    The appearance of the Unicode replacement character suggested an issue
    with the SoC reference clock. The RZ/G3S reference clock is provided by
    the Versa3 clock generator (REF output).
    
    After checking with the Renesas Versa3 hardware team, it was found that
    this is related to the PLL2 lock bit being set through the
    renesas,settings DT property.
    
    The PLL lock bit must be set to avoid unstable clock output from the PLL.
    However, due to the Versa3 hardware design, when a PLL lock bit is set,
    all outputs (including the REF clock) are temporarily disabled until the
    configured PLLs become stable.
    
    As an alternative, the bypass bit can be used. This does not interrupt the
    PLL2 output or any other Versa3 outputs, but it may result in temporary
    instability on PLL2 output while the configuration is applied. Since PLL2
    feeds only the audio path and audio is not used during early boot, this is
    acceptable and does not affect system boot.
    
    Drop the PLL2 lock bit and set the bypass bit instead.
    
    This has been tested with more than 1000 cold boots.
    
    Fixes: a94253232b04 ("arm64: dts: renesas: rzg3s-smarc-som: Add versa3 clock generator node")
    Signed-off-by: Claudiu Beznea <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

arm64: dts: renesas: rzt2h-n2h-evk: Add ramp delay for SD0 card regulator [+ + +]
Author: Lad Prabhakar <[email protected]>
Date:   Fri Jan 23 22:59:54 2026 +0000

    arm64: dts: renesas: rzt2h-n2h-evk: Add ramp delay for SD0 card regulator
    
    [ Upstream commit bb70589b67039e491dd60cf71272884e926a0f95 ]
    
    Add a ramp delay of 60 uV/us to the vqmmc_sdhi0 voltage regulator to
    fix UHS-I SD card detection failures.
    
    Measurements on CN78 pin 4 showed the actual voltage ramp time to be
    21.86ms when switching between 3.3V and 1.8V. A 25ms ramp delay has
    been configured to provide adequate margin. The calculation is based
    on the voltage delta of 1.5V (3.3V - 1.8V):
      1500000 uV / 60 uV/us = 25000 us (25ms)
    
    Prior to this patch, UHS-I cards failed to initialize with:
    
        mmc0: error -110 whilst initialising SD card
    
    After this patch, UHS-I cards are properly detected on SD0:
    
        mmc0: new UHS-I speed SDR104 SDXC card at address aaaa
        mmcblk0: mmc0:aaaa SR64G 59.5 GiB
    
    Fixes: d065453e5ee09 ("arm64: dts: renesas: rzt2h-rzn2h-evk: Enable SD card slot")
    Signed-off-by: Lad Prabhakar <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

arm64: dts: renesas: rzv2-evk-cn15-sd: Add ramp delay for SD0 regulator [+ + +]
Author: Lad Prabhakar <[email protected]>
Date:   Fri Jan 23 22:59:57 2026 +0000

    arm64: dts: renesas: rzv2-evk-cn15-sd: Add ramp delay for SD0 regulator
    
    [ Upstream commit 5c03465ecf6a56b7b261df9594f0e10612f53a50 ]
    
    Set an appropriate ramp delay for the SD0 I/O voltage regulator in the
    CN15 SD overlay to make UHS-I voltage switching reliable during card
    initialization.
    
    This issue was observed on the RZ/V2H EVK, while the same UHS-I cards
    worked on the RZ/V2N EVK without problems. Adding the ramp delay makes
    the behavior consistent and avoids SD init timeouts.
    
    Before this change SD0 could fail with:
    
        mmc0: error -110 whilst initialising SD card
    
    With the delay in place UHS-I cards enumerate correctly:
    
        mmc0: new UHS-I speed SDR104 SDXC card at address aaaa
        mmcblk0: mmc0:aaaa SR64G 59.5 GiB
         mmcblk0: p1
    
    Fixes: 3d6c2bc7629c8 ("arm64: dts: renesas: Add CN15 eMMC and SD overlays for RZ/V2H and RZ/V2N EVKs")
    Signed-off-by: Lad Prabhakar <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

arm64: realm: Fix PTE_NS_SHARED for 52bit PA support [+ + +]
Author: Suzuki K Poulose <[email protected]>
Date:   Mon Mar 16 16:19:01 2026 +0000

    arm64: realm: Fix PTE_NS_SHARED for 52bit PA support
    
    [ Upstream commit 8c6e9b60f5c7985a9fe41320556a92d7a33451df ]
    
    With LPA/LPA2, the top bits of the PFN (Bits[51:48]) end up in the lower bits
    of the PTE. So, simply creating a mask of the "top IPA bit" doesn't work well
    for these configurations to set the "top" bit at the output of Stage1
    translation.
    
    Fix this by using the __phys_to_pte_val() to do the right thing for all
    configurations.
    
    Tested using, kvmtool, placing the memory at a higher address (-m <size>@<Addr>).
    
     e.g:
     # lkvm run --realm -c 4 -m 512M@@128T -k Image --console serial
    
     sh-5.0# dmesg | grep "LPA2\|RSI"
    [    0.000000] RME: Using RSI version 1.0
    [    0.000000] CPU features: detected: 52-bit Virtual Addressing (LPA2)
    [    0.777354] CPU features: detected: 52-bit Virtual Addressing for KVM (LPA2)
    
    Fixes: 399306954996 ("arm64: realm: Query IPA size from the RMM")
    Cc: Catalin Marinas <[email protected]>
    Cc: Steven Price <[email protected]>
    Cc: Will Deacon <[email protected]>
    Signed-off-by: Suzuki K Poulose <[email protected]>
    Reviewed-by: Steven Price <[email protected]>
    Reviewed-by: Catalin Marinas <[email protected]>
    Signed-off-by: Will Deacon <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
arm_mpam: Fix null pointer dereference when restoring bandwidth counters [+ + +]
Author: Ben Horgan <[email protected]>
Date:   Fri Mar 6 18:27:16 2026 +0000

    arm_mpam: Fix null pointer dereference when restoring bandwidth counters
    
    [ Upstream commit 4ad79c874e53ebb7fe3b8ae7ac6c858a2121f415 ]
    
    When an MSC supporting memory bandwidth monitoring is brought offline and
    then online, mpam_restore_mbwu_state() calls __ris_msmon_read() via ipi to
    restore the configuration of the bandwidth counters. It doesn't care about
    the value read, mbwu_arg.val, and doesn't set it leading to a null pointer
    dereference when __ris_msmon_read() adds to it. This results in a kernel
    oops with a call trace such as:
    
    Call trace:
    __ris_msmon_read+0x19c/0x64c (P)
    mpam_restore_mbwu_state+0xa0/0xe8
    smp_call_on_cpu_callback+0x1c/0x38
    process_one_work+0x154/0x4b4
    worker_thread+0x188/0x310
    kthread+0x11c/0x130
    ret_from_fork+0x10/0x20
    
    Provide a local variable for val to avoid __ris_msmon_read() dereferencing
    a null pointer when adding to val.
    
    Fixes: 41e8a14950e1 ("arm_mpam: Track bandwidth counter state for power management")
    Signed-off-by: Ben Horgan <[email protected]>
    Reviewed-by: James Morse <[email protected]>
    Signed-off-by: James Morse <[email protected]>
    Signed-off-by: Will Deacon <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ata: libata-core: disable LPM on ADATA SU680 SSD [+ + +]
Author: Damien Le Moal <[email protected]>
Date:   Sun Mar 15 07:24:15 2026 +0900

    ata: libata-core: disable LPM on ADATA SU680 SSD
    
    commit ce5ae93d1a216680460040c7c0465a6e3b629dec upstream.
    
    ADATA SU680 SSDs suffer from NCQ read and write commands timeouts or bus
    errors when link power management (LPM) is enabled. Flag these devices
    with the ATA_QUIRK_NOLPM quirk to prevent the use of LPM and avoid these
    command failures.
    
    Reported-by: Mohammad Khaled Bayan <[email protected]>
    Closes: https://bugs.launchpad.net/ubuntu/+source/linux-hwe-6.17/+bug/2144060
    Cc: [email protected]
    Tested-by: Mohammad-Khaled Bayan <[email protected]>
    Signed-off-by: Damien Le Moal <[email protected]>
    Reviewed-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Niklas Cassel <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ata: libata-scsi: report correct sense field pointer in ata_scsiop_maint_in() [+ + +]
Author: Damien Le Moal <[email protected]>
Date:   Fri Mar 20 12:48:01 2026 +0900

    ata: libata-scsi: report correct sense field pointer in ata_scsiop_maint_in()
    
    commit e6d7eba23b666d85cacee0643be280d6ce1ebffc upstream.
    
    Commit 4ab7bb976343 ("ata: libata-scsi: Refactor ata_scsiop_maint_in()")
    modified ata_scsiop_maint_in() to directly call
    ata_scsi_set_invalid_field() to set the field pointer of the sense data
    of a failed MAINTENANCE IN command. However, in the case of an invalid
    command format, the sense data field incorrectly indicates byte 1 of
    the CDB. Fix this to indicate byte 2 of the command.
    
    Reported-by: Guenter Roeck <[email protected]>
    Fixes: 4ab7bb976343 ("ata: libata-scsi: Refactor ata_scsiop_maint_in()")
    Cc: [email protected]
    Signed-off-by: Damien Le Moal <[email protected]>
    Signed-off-by: Niklas Cassel <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
batman-adv: avoid OGM aggregation when skb tailroom is insufficient [+ + +]
Author: Yang Yang <[email protected]>
Date:   Sat Mar 14 07:11:27 2026 +0000

    batman-adv: avoid OGM aggregation when skb tailroom is insufficient
    
    commit 0d4aef630be9d5f9c1227d07669c26c4383b5ad0 upstream.
    
    When OGM aggregation state is toggled at runtime, an existing forwarded
    packet may have been allocated with only packet_len bytes, while a later
    packet can still be selected for aggregation. Appending in this case can
    hit skb_put overflow conditions.
    
    Reject aggregation when the target skb tailroom cannot accommodate the new
    packet. The caller then falls back to creating a new forward packet
    instead of appending.
    
    Fixes: c6c8fea29769 ("net: Add batman-adv meshing protocol")
    Cc: [email protected]
    Reported-by: Yifan Wu <[email protected]>
    Reported-by: Juefei Pu <[email protected]>
    Signed-off-by: Yuan Tan <[email protected]>
    Signed-off-by: Xin Liu <[email protected]>
    Signed-off-by: Ao Zhou <[email protected]>
    Signed-off-by: Yang Yang <[email protected]>
    Signed-off-by: Sven Eckelmann <[email protected]>
    Signed-off-by: Simon Wunderlich <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
binfmt_elf_fdpic: fix AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4 [+ + +]
Author: Andrei Vagin <[email protected]>
Date:   Tue Feb 17 18:01:05 2026 +0000

    binfmt_elf_fdpic: fix AUXV size calculation for ELF_HWCAP3 and ELF_HWCAP4
    
    [ Upstream commit 4ced4cf5c9d172d91f181df3accdf949d3761aab ]
    
    Commit 4e6e8c2b757f ("binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4") added
    support for AT_HWCAP3 and AT_HWCAP4, but it missed updating the AUX
    vector size calculation in create_elf_fdpic_tables() and
    AT_VECTOR_SIZE_BASE in include/linux/auxvec.h.
    
    Similar to the fix for AT_HWCAP2 in commit c6a09e342f8e ("binfmt_elf_fdpic:
    fix AUXV size calculation when ELF_HWCAP2 is defined"), this omission
    leads to a mismatch between the reserved space and the actual number of
    AUX entries, eventually triggering a kernel BUG_ON(csp != sp).
    
    Fix this by incrementing nitems when ELF_HWCAP3 or ELF_HWCAP4 are
    defined and updating AT_VECTOR_SIZE_BASE.
    
    Cc: Mark Brown <[email protected]>
    Cc: Max Filippov <[email protected]>
    Reviewed-by: Michal Koutný <[email protected]>
    Reviewed-by: Mark Brown <[email protected]>
    Reviewed-by: Cyrill Gorcunov <[email protected]>
    Reviewed-by: Alexander Mikhalitsyn <[email protected]>
    Fixes: 4e6e8c2b757f ("binfmt_elf: Wire up AT_HWCAP3 at AT_HWCAP4")
    Signed-off-by: Andrei Vagin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Bluetooth: hci_sync: Fix hci_le_create_conn_sync [+ + +]
Author: Michael Grzeschik <[email protected]>
Date:   Thu Mar 5 14:50:52 2026 +0100

    Bluetooth: hci_sync: Fix hci_le_create_conn_sync
    
    [ Upstream commit 2cabe7ff1001b7a197009cf50ba71701f9cbd354 ]
    
    While introducing hci_le_create_conn_sync the functionality
    of hci_connect_le was ported to hci_le_create_conn_sync including
    the disable of the scan before starting the connection.
    
    When this code was run non synchronously the immediate call that was
    setting the flag HCI_LE_SCAN_INTERRUPTED had an impact. Since the
    completion handler for the LE_SCAN_DISABLE was not immediately called.
    In the completion handler of the LE_SCAN_DISABLE event, this flag is
    checked to set the state of the hdev to DISCOVERY_STOPPED.
    
    With the synchronised approach the later setting of the
    HCI_LE_SCAN_INTERRUPTED flag has not the same effect. The completion
    handler would immediately fire in the LE_SCAN_DISABLE call, check for
    the flag, which is then not yet set and do nothing.
    
    To fix this issue and make the function call work as before, we move the
    setting of the flag HCI_LE_SCAN_INTERRUPTED before disabling the scan.
    
    Fixes: 8e8b92ee60de ("Bluetooth: hci_sync: Add hci_le_create_conn_sync")
    Signed-off-by: Michael Grzeschik <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: HIDP: Fix possible UAF [+ + +]
Author: Luiz Augusto von Dentz <[email protected]>
Date:   Thu Mar 5 10:17:47 2026 -0500

    Bluetooth: HIDP: Fix possible UAF
    
    [ Upstream commit dbf666e4fc9bdd975a61bf682b3f75cb0145eedd ]
    
    This fixes the following trace caused by not dropping l2cap_conn
    reference when user->remove callback is called:
    
    [   97.809249] l2cap_conn_free: freeing conn ffff88810a171c00
    [   97.809907] CPU: 1 UID: 0 PID: 1419 Comm: repro_standalon Not tainted 7.0.0-rc1-dirty #14 PREEMPT(lazy)
    [   97.809935] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014
    [   97.809947] Call Trace:
    [   97.809954]  <TASK>
    [   97.809961]  dump_stack_lvl (lib/dump_stack.c:122)
    [   97.809990]  l2cap_conn_free (net/bluetooth/l2cap_core.c:1808)
    [   97.810017]  l2cap_conn_del (./include/linux/kref.h:66 net/bluetooth/l2cap_core.c:1821 net/bluetooth/l2cap_core.c:1798)
    [   97.810055]  l2cap_disconn_cfm (net/bluetooth/l2cap_core.c:7347 (discriminator 1) net/bluetooth/l2cap_core.c:7340 (discriminator 1))
    [   97.810086]  ? __pfx_l2cap_disconn_cfm (net/bluetooth/l2cap_core.c:7341)
    [   97.810117]  hci_conn_hash_flush (./include/net/bluetooth/hci_core.h:2152 (discriminator 2) net/bluetooth/hci_conn.c:2644 (discriminator 2))
    [   97.810148]  hci_dev_close_sync (net/bluetooth/hci_sync.c:5360)
    [   97.810180]  ? __pfx_hci_dev_close_sync (net/bluetooth/hci_sync.c:5285)
    [   97.810212]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810242]  ? up_write (./arch/x86/include/asm/atomic64_64.h:87 (discriminator 5) ./include/linux/atomic/atomic-arch-fallback.h:2852 (discriminator 5) ./include/linux/atomic/atomic-long.h:268 (discriminator 5) ./include/linux/atomic/atomic-instrumented.h:3391 (discriminator 5) kernel/locking/rwsem.c:1385 (discriminator 5) kernel/locking/rwsem.c:1643 (discriminator 5))
    [   97.810267]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810290]  ? rcu_is_watching (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/context_tracking.h:128 kernel/rcu/tree.c:752)
    [   97.810320]  hci_unregister_dev (net/bluetooth/hci_core.c:504 net/bluetooth/hci_core.c:2716)
    [   97.810346]  vhci_release (drivers/bluetooth/hci_vhci.c:691)
    [   97.810375]  ? __pfx_vhci_release (drivers/bluetooth/hci_vhci.c:678)
    [   97.810404]  __fput (fs/file_table.c:470)
    [   97.810430]  task_work_run (kernel/task_work.c:235)
    [   97.810451]  ? __pfx_task_work_run (kernel/task_work.c:201)
    [   97.810472]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810495]  ? do_raw_spin_unlock (./include/asm-generic/qspinlock.h:128 (discriminator 5) kernel/locking/spinlock_debug.c:142 (discriminator 5))
    [   97.810527]  do_exit (kernel/exit.c:972)
    [   97.810547]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810574]  ? __pfx_do_exit (kernel/exit.c:897)
    [   97.810594]  ? lock_acquire (kernel/locking/lockdep.c:470 (discriminator 6) kernel/locking/lockdep.c:5870 (discriminator 6) kernel/locking/lockdep.c:5825 (discriminator 6))
    [   97.810616]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810639]  ? do_raw_spin_lock (kernel/locking/spinlock_debug.c:95 (discriminator 4) kernel/locking/spinlock_debug.c:118 (discriminator 4))
    [   97.810664]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810688]  ? find_held_lock (kernel/locking/lockdep.c:5350 (discriminator 1))
    [   97.810721]  do_group_exit (kernel/exit.c:1093)
    [   97.810745]  get_signal (kernel/signal.c:3007 (discriminator 1))
    [   97.810772]  ? security_file_permission (./arch/x86/include/asm/jump_label.h:37 security/security.c:2366)
    [   97.810803]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810826]  ? vfs_read (fs/read_write.c:555)
    [   97.810854]  ? __pfx_get_signal (kernel/signal.c:2800)
    [   97.810880]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810905]  ? __pfx_vfs_read (fs/read_write.c:555)
    [   97.810932]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.810960]  arch_do_signal_or_restart (arch/x86/kernel/signal.c:337 (discriminator 1))
    [   97.810990]  ? __pfx_arch_do_signal_or_restart (arch/x86/kernel/signal.c:334)
    [   97.811021]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.811055]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.811078]  ? ksys_read (fs/read_write.c:707)
    [   97.811106]  ? __pfx_ksys_read (fs/read_write.c:707)
    [   97.811137]  exit_to_user_mode_loop (kernel/entry/common.c:66 kernel/entry/common.c:98)
    [   97.811169]  ? rcu_is_watching (./arch/x86/include/asm/atomic.h:23 ./include/linux/atomic/atomic-arch-fallback.h:457 ./include/linux/context_tracking.h:128 kernel/rcu/tree.c:752)
    [   97.811192]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.811215]  ? trace_hardirqs_off (./include/trace/events/preemptirq.h:36 (discriminator 33) kernel/trace/trace_preemptirq.c:95 (discriminator 33) kernel/trace/trace_preemptirq.c:90 (discriminator 33))
    [   97.811240]  do_syscall_64 (./include/linux/irq-entry-common.h:226 ./include/linux/irq-entry-common.h:256 ./include/linux/entry-common.h:325 arch/x86/entry/syscall_64.c:100)
    [   97.811268]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   97.811292]  ? exc_page_fault (arch/x86/mm/fault.c:1480 (discriminator 3) arch/x86/mm/fault.c:1527 (discriminator 3))
    [   97.811318]  entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
    [   97.811338] RIP: 0033:0x445cfe
    [   97.811352] Code: Unable to access opcode bytes at 0x445cd4.
    
    Code starting with the faulting instruction
    ===========================================
    [   97.811360] RSP: 002b:00007f65c41c6dc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
    [   97.811378] RAX: fffffffffffffe00 RBX: 00007f65c41c76c0 RCX: 0000000000445cfe
    [   97.811391] RDX: 0000000000000400 RSI: 00007f65c41c6e40 RDI: 0000000000000004
    [   97.811403] RBP: 00007f65c41c7250 R08: 0000000000000000 R09: 0000000000000000
    [   97.811415] R10: 0000000000000000 R11: 0000000000000246 R12: ffffffffffffffe8
    [   97.811428] R13: 0000000000000000 R14: 00007fff780a8c00 R15: 00007f65c41c76c0
    [   97.811453]  </TASK>
    [   98.402453] ==================================================================
    [   98.403560] BUG: KASAN: use-after-free in __mutex_lock (kernel/locking/mutex.c:199 kernel/locking/mutex.c:694 kernel/locking/mutex.c:776)
    [   98.404541] Read of size 8 at addr ffff888113ee40a8 by task khidpd_00050004/1430
    [   98.405361]
    [   98.405563] CPU: 1 UID: 0 PID: 1430 Comm: khidpd_00050004 Not tainted 7.0.0-rc1-dirty #14 PREEMPT(lazy)
    [   98.405588] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014
    [   98.405600] Call Trace:
    [   98.405607]  <TASK>
    [   98.405614]  dump_stack_lvl (lib/dump_stack.c:122)
    [   98.405641]  print_report (mm/kasan/report.c:379 mm/kasan/report.c:482)
    [   98.405667]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.405691]  ? __virt_addr_valid (arch/x86/mm/physaddr.c:55)
    [   98.405724]  ? __mutex_lock (kernel/locking/mutex.c:199 kernel/locking/mutex.c:694 kernel/locking/mutex.c:776)
    [   98.405748]  kasan_report (mm/kasan/report.c:221 mm/kasan/report.c:597)
    [   98.405778]  ? __mutex_lock (kernel/locking/mutex.c:199 kernel/locking/mutex.c:694 kernel/locking/mutex.c:776)
    [   98.405807]  __mutex_lock (kernel/locking/mutex.c:199 kernel/locking/mutex.c:694 kernel/locking/mutex.c:776)
    [   98.405832]  ? do_raw_spin_lock (kernel/locking/spinlock_debug.c:95 (discriminator 4) kernel/locking/spinlock_debug.c:118 (discriminator 4))
    [   98.405859]  ? l2cap_unregister_user (./include/linux/list.h:381 (discriminator 2) net/bluetooth/l2cap_core.c:1723 (discriminator 2))
    [   98.405888]  ? __pfx_do_raw_spin_lock (kernel/locking/spinlock_debug.c:114)
    [   98.405915]  ? __pfx___mutex_lock (kernel/locking/mutex.c:775)
    [   98.405939]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.405963]  ? lock_acquire (kernel/locking/lockdep.c:470 (discriminator 6) kernel/locking/lockdep.c:5870 (discriminator 6) kernel/locking/lockdep.c:5825 (discriminator 6))
    [   98.405984]  ? find_held_lock (kernel/locking/lockdep.c:5350 (discriminator 1))
    [   98.406015]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406038]  ? lock_release (kernel/locking/lockdep.c:5536 kernel/locking/lockdep.c:5889 kernel/locking/lockdep.c:5875)
    [   98.406061]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406085]  ? _raw_spin_unlock_irqrestore (./arch/x86/include/asm/irqflags.h:42 ./arch/x86/include/asm/irqflags.h:119 ./arch/x86/include/asm/irqflags.h:159 ./include/linux/spinlock_api_smp.h:178 kernel/locking/spinlock.c:194)
    [   98.406107]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406130]  ? __timer_delete_sync (kernel/time/timer.c:1592)
    [   98.406158]  ? l2cap_unregister_user (./include/linux/list.h:381 (discriminator 2) net/bluetooth/l2cap_core.c:1723 (discriminator 2))
    [   98.406186]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406210]  l2cap_unregister_user (./include/linux/list.h:381 (discriminator 2) net/bluetooth/l2cap_core.c:1723 (discriminator 2))
    [   98.406263]  hidp_session_thread (./include/linux/instrumented.h:112 ./include/linux/atomic/atomic-instrumented.h:400 ./include/linux/refcount.h:389 ./include/linux/refcount.h:432 ./include/linux/refcount.h:450 ./include/linux/kref.h:64 net/bluetooth/hidp/core.c:996 net/bluetooth/hidp/core.c:1305)
    [   98.406293]  ? __pfx_hidp_session_thread (net/bluetooth/hidp/core.c:1264)
    [   98.406323]  ? kthread (kernel/kthread.c:433)
    [   98.406340]  ? __pfx_hidp_session_wake_function (net/bluetooth/hidp/core.c:1251)
    [   98.406370]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406393]  ? find_held_lock (kernel/locking/lockdep.c:5350 (discriminator 1))
    [   98.406424]  ? __pfx_hidp_session_wake_function (net/bluetooth/hidp/core.c:1251)
    [   98.406453]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406476]  ? trace_hardirqs_on (kernel/trace/trace_preemptirq.c:79 (discriminator 1))
    [   98.406499]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406523]  ? kthread (kernel/kthread.c:433)
    [   98.406539]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406565]  ? kthread (kernel/kthread.c:433)
    [   98.406581]  ? __pfx_hidp_session_thread (net/bluetooth/hidp/core.c:1264)
    [   98.406610]  kthread (kernel/kthread.c:467)
    [   98.406627]  ? __pfx_kthread (kernel/kthread.c:412)
    [   98.406645]  ret_from_fork (arch/x86/kernel/process.c:164)
    [   98.406674]  ? __pfx_ret_from_fork (arch/x86/kernel/process.c:153)
    [   98.406704]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.406728]  ? __pfx_kthread (kernel/kthread.c:412)
    [   98.406747]  ret_from_fork_asm (arch/x86/entry/entry_64.S:258)
    [   98.406774]  </TASK>
    [   98.406780]
    [   98.433693] The buggy address belongs to the physical page:
    [   98.434405] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff888113ee7c40 pfn:0x113ee4
    [   98.435557] flags: 0x200000000000000(node=0|zone=2)
    [   98.436198] raw: 0200000000000000 ffffea0004244308 ffff8881f6f3ebc0 0000000000000000
    [   98.437195] raw: ffff888113ee7c40 0000000000000000 00000000ffffffff 0000000000000000
    [   98.438115] page dumped because: kasan: bad access detected
    [   98.438951]
    [   98.439211] Memory state around the buggy address:
    [   98.439871]  ffff888113ee3f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [   98.440714]  ffff888113ee4000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    [   98.441580] >ffff888113ee4080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    [   98.442458]                                   ^
    [   98.443011]  ffff888113ee4100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    [   98.443889]  ffff888113ee4180: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
    [   98.444768] ==================================================================
    [   98.445719] Disabling lock debugging due to kernel taint
    [   98.448074] l2cap_conn_free: freeing conn ffff88810c22b400
    [   98.450012] CPU: 1 UID: 0 PID: 1430 Comm: khidpd_00050004 Tainted: G    B               7.0.0-rc1-dirty #14 PREEMPT(lazy)
    [   98.450040] Tainted: [B]=BAD_PAGE
    [   98.450047] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-debian-1.17.0-1 04/01/2014
    [   98.450059] Call Trace:
    [   98.450065]  <TASK>
    [   98.450071]  dump_stack_lvl (lib/dump_stack.c:122)
    [   98.450099]  l2cap_conn_free (net/bluetooth/l2cap_core.c:1808)
    [   98.450125]  l2cap_conn_put (net/bluetooth/l2cap_core.c:1822)
    [   98.450154]  session_free (net/bluetooth/hidp/core.c:990)
    [   98.450181]  hidp_session_thread (net/bluetooth/hidp/core.c:1307)
    [   98.450213]  ? __pfx_hidp_session_thread (net/bluetooth/hidp/core.c:1264)
    [   98.450271]  ? kthread (kernel/kthread.c:433)
    [   98.450293]  ? __pfx_hidp_session_wake_function (net/bluetooth/hidp/core.c:1251)
    [   98.450339]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.450368]  ? find_held_lock (kernel/locking/lockdep.c:5350 (discriminator 1))
    [   98.450406]  ? __pfx_hidp_session_wake_function (net/bluetooth/hidp/core.c:1251)
    [   98.450442]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.450471]  ? trace_hardirqs_on (kernel/trace/trace_preemptirq.c:79 (discriminator 1))
    [   98.450499]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.450528]  ? kthread (kernel/kthread.c:433)
    [   98.450547]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.450578]  ? kthread (kernel/kthread.c:433)
    [   98.450598]  ? __pfx_hidp_session_thread (net/bluetooth/hidp/core.c:1264)
    [   98.450637]  kthread (kernel/kthread.c:467)
    [   98.450657]  ? __pfx_kthread (kernel/kthread.c:412)
    [   98.450680]  ret_from_fork (arch/x86/kernel/process.c:164)
    [   98.450715]  ? __pfx_ret_from_fork (arch/x86/kernel/process.c:153)
    [   98.450752]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [   98.450782]  ? __pfx_kthread (kernel/kthread.c:412)
    [   98.450804]  ret_from_fork_asm (arch/x86/entry/entry_64.S:258)
    [   98.450836]  </TASK>
    
    Fixes: b4f34d8d9d26 ("Bluetooth: hidp: add new session-management helpers")
    Reported-by: soufiane el hachmi <[email protected]>
    Tested-by: soufiane el hachmi <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: ISO: Fix defer tests being unstable [+ + +]
Author: Luiz Augusto von Dentz <[email protected]>
Date:   Fri Feb 27 15:23:01 2026 -0500

    Bluetooth: ISO: Fix defer tests being unstable
    
    [ Upstream commit 62bcaa6b351b6dc400f6c6b83762001fd9f5c12d ]
    
    iso-tester defer tests seem to fail with hci_conn_hash_lookup_cig
    being unable to resolve a cig in set_cig_params_sync due a race
    where it is run immediatelly before hci_bind_cis is able to set
    the QoS settings into the hci_conn object.
    
    So this moves the assigning of the QoS settings to be done directly
    by hci_le_set_cig_params to prevent that from happening again.
    
    Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections")
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: L2CAP: Fix accepting multiple L2CAP_ECRED_CONN_REQ [+ + +]
Author: Luiz Augusto von Dentz <[email protected]>
Date:   Tue Mar 3 13:29:53 2026 -0500

    Bluetooth: L2CAP: Fix accepting multiple L2CAP_ECRED_CONN_REQ
    
    commit 5b3e2052334f2ff6d5200e952f4aa66994d09899 upstream.
    
    Currently the code attempts to accept requests regardless of the
    command identifier which may cause multiple requests to be marked
    as pending (FLAG_DEFER_SETUP) which can cause more than
    L2CAP_ECRED_MAX_CID(5) to be allocated in l2cap_ecred_rsp_defer
    causing an overflow.
    
    The spec is quite clear that the same identifier shall not be used on
    subsequent requests:
    
    'Within each signaling channel a different Identifier shall be used
    for each successive request or indication.'
    https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-62/out/en/host/logical-link-control-and-adaptation-protocol-specification.html#UUID-32a25a06-4aa4-c6c7-77c5-dcfe3682355d
    
    So this attempts to check if there are any channels pending with the
    same identifier and rejects if any are found.
    
    Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
    Reported-by: Yiming Qian <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Bluetooth: L2CAP: Fix type confusion in l2cap_ecred_reconf_rsp() [+ + +]
Author: Lukas Johannes Möller <[email protected]>
Date:   Tue Mar 10 21:59:46 2026 +0000

    Bluetooth: L2CAP: Fix type confusion in l2cap_ecred_reconf_rsp()
    
    commit 15145675690cab2de1056e7ed68e59cbd0452529 upstream.
    
    l2cap_ecred_reconf_rsp() casts the incoming data to struct
    l2cap_ecred_conn_rsp (the ECRED *connection* response, 8 bytes with
    result at offset 6) instead of struct l2cap_ecred_reconf_rsp (2 bytes
    with result at offset 0).
    
    This causes two problems:
    
     - The sizeof(*rsp) length check requires 8 bytes instead of the
       correct 2, so valid L2CAP_ECRED_RECONF_RSP packets are rejected
       with -EPROTO.
    
     - rsp->result reads from offset 6 instead of offset 0, returning
       wrong data when the packet is large enough to pass the check.
    
    Fix by using the correct type.  Also pass the already byte-swapped
    result variable to BT_DBG instead of the raw __le16 field.
    
    Fixes: 15f02b910562 ("Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode")
    Cc: [email protected]
    Signed-off-by: Lukas Johannes Möller <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Bluetooth: L2CAP: Fix use-after-free in l2cap_unregister_user [+ + +]
Author: Shaurya Rane <[email protected]>
Date:   Thu Nov 6 23:50:16 2025 +0530

    Bluetooth: L2CAP: Fix use-after-free in l2cap_unregister_user
    
    [ Upstream commit 752a6c9596dd25efd6978a73ff21f3b592668f4a ]
    
    After commit ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in
    hci_chan_del"), l2cap_conn_del() uses conn->lock to protect access to
    conn->users. However, l2cap_register_user() and l2cap_unregister_user()
    don't use conn->lock, creating a race condition where these functions can
    access conn->users and conn->hchan concurrently with l2cap_conn_del().
    
    This can lead to use-after-free and list corruption bugs, as reported
    by syzbot.
    
    Fix this by changing l2cap_register_user() and l2cap_unregister_user()
    to use conn->lock instead of hci_dev_lock(), ensuring consistent locking
    for the l2cap_conn structure.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=14b6d57fb728e27ce23c
    Fixes: ab4eedb790ca ("Bluetooth: L2CAP: Fix corrupted list in hci_chan_del")
    Signed-off-by: Shaurya Rane <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: L2CAP: Validate L2CAP_INFO_RSP payload length before access [+ + +]
Author: Lukas Johannes Möller <[email protected]>
Date:   Tue Mar 10 21:59:47 2026 +0000

    Bluetooth: L2CAP: Validate L2CAP_INFO_RSP payload length before access
    
    commit dd815e6e3918dc75a49aaabac36e4f024d675101 upstream.
    
    l2cap_information_rsp() checks that cmd_len covers the fixed
    l2cap_info_rsp header (type + result, 4 bytes) but then reads
    rsp->data without verifying that the payload is present:
    
     - L2CAP_IT_FEAT_MASK calls get_unaligned_le32(rsp->data), which reads
       4 bytes past the header (needs cmd_len >= 8).
    
     - L2CAP_IT_FIXED_CHAN reads rsp->data[0], 1 byte past the header
       (needs cmd_len >= 5).
    
    A truncated L2CAP_INFO_RSP with result == L2CAP_IR_SUCCESS triggers an
    out-of-bounds read of adjacent skb data.
    
    Guard each data access with the required payload length check.  If the
    payload is too short, skip the read and let the state machine complete
    with safe defaults (feat_mask and remote_fixed_chan remain zero from
    kzalloc), so the info timer cleanup and l2cap_conn_start() still run
    and the connection is not stalled.
    
    Fixes: 4e8402a3f884 ("[Bluetooth] Retrieve L2CAP features mask on connection setup")
    Cc: [email protected]
    Signed-off-by: Lukas Johannes Möller <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Bluetooth: LE L2CAP: Disconnect if received packet's SDU exceeds IMTU [+ + +]
Author: Christian Eggers <[email protected]>
Date:   Wed Feb 25 18:07:25 2026 +0100

    Bluetooth: LE L2CAP: Disconnect if received packet's SDU exceeds IMTU
    
    [ Upstream commit e1d9a66889867c232657a9b6f25d451d7c3ab96f ]
    
    Core 6.0, Vol 3, Part A, 3.4.3:
    "If the SDU length field value exceeds the receiver's MTU, the receiver
    shall disconnect the channel..."
    
    This fixes L2CAP/LE/CFC/BV-26-C (running together with 'l2test -r -P
    0x0027 -V le_public -I 100').
    
    Fixes: aac23bf63659 ("Bluetooth: Implement LE L2CAP reassembly")
    Signed-off-by: Christian Eggers <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: LE L2CAP: Disconnect if sum of payload sizes exceed SDU [+ + +]
Author: Christian Eggers <[email protected]>
Date:   Wed Feb 25 18:07:27 2026 +0100

    Bluetooth: LE L2CAP: Disconnect if sum of payload sizes exceed SDU
    
    [ Upstream commit b6a2bf43aa37670432843bc73ae2a6288ba4d6f8 ]
    
    Core 6.0, Vol 3, Part A, 3.4.3:
    "... If the sum of the payload sizes for the K-frames exceeds the
    specified SDU length, the receiver shall disconnect the channel."
    
    This fixes L2CAP/LE/CFC/BV-27-C (running together with 'l2test -r -P
    0x0027 -V le_public').
    
    Fixes: aac23bf63659 ("Bluetooth: Implement LE L2CAP reassembly")
    Signed-off-by: Christian Eggers <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: MGMT: Fix list corruption and UAF in command complete handlers [+ + +]
Author: Wang Tao <[email protected]>
Date:   Fri Feb 27 11:03:39 2026 +0000

    Bluetooth: MGMT: Fix list corruption and UAF in command complete handlers
    
    [ Upstream commit 17f89341cb4281d1da0e2fb0de5406ab7c4e25ef ]
    
    Commit 302a1f674c00 ("Bluetooth: MGMT: Fix possible UAFs") introduced
    mgmt_pending_valid(), which not only validates the pending command but
    also unlinks it from the pending list if it is valid. This change in
    semantics requires updates to several completion handlers to avoid list
    corruption and memory safety issues.
    
    This patch addresses two left-over issues from the aforementioned rework:
    
    1. In mgmt_add_adv_patterns_monitor_complete(), mgmt_pending_remove()
    is replaced with mgmt_pending_free() in the success path. Since
    mgmt_pending_valid() already unlinks the command at the beginning of
    the function, calling mgmt_pending_remove() leads to a double list_del()
    and subsequent list corruption/kernel panic.
    
    2. In set_mesh_complete(), the use of mgmt_pending_foreach() in the error
    path is removed. Since the current command is already unlinked by
    mgmt_pending_valid(), this foreach loop would incorrectly target other
    pending mesh commands, potentially freeing them while they are still being
    processed concurrently (leading to UAFs). The redundant mgmt_cmd_status()
    is also simplified to use cmd->opcode directly.
    
    Fixes: 302a1f674c00 ("Bluetooth: MGMT: Fix possible UAFs")
    Signed-off-by: Wang Tao <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: qca: fix ROM version reading on WCN3998 chips [+ + +]
Author: Dmitry Baryshkov <[email protected]>
Date:   Wed Mar 11 01:02:57 2026 +0200

    Bluetooth: qca: fix ROM version reading on WCN3998 chips
    
    [ Upstream commit 99b2c531e0e797119ae1b9195a8764ee98b00e65 ]
    
    WCN3998 uses a bit different format for rom version:
    
    [    5.479978] Bluetooth: hci0: setting up wcn399x
    [    5.633763] Bluetooth: hci0: QCA Product ID   :0x0000000a
    [    5.645350] Bluetooth: hci0: QCA SOC Version  :0x40010224
    [    5.650906] Bluetooth: hci0: QCA ROM Version  :0x00001001
    [    5.665173] Bluetooth: hci0: QCA Patch Version:0x00006699
    [    5.679356] Bluetooth: hci0: QCA controller version 0x02241001
    [    5.691109] Bluetooth: hci0: QCA Downloading qca/crbtfw21.tlv
    [    6.680102] Bluetooth: hci0: QCA Downloading qca/crnv21.bin
    [    6.842948] Bluetooth: hci0: QCA setup on UART is completed
    
    Fixes: 523760b7ff88 ("Bluetooth: hci_qca: Added support for WCN3998")
    Reviewed-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Dmitry Baryshkov <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: SMP: make SM/PER/KDU/BI-04-C happy [+ + +]
Author: Christian Eggers <[email protected]>
Date:   Wed Feb 25 18:07:28 2026 +0100

    Bluetooth: SMP: make SM/PER/KDU/BI-04-C happy
    
    [ Upstream commit 0e4d4dcc1a6e82cc6f9abf32193558efa7e1613d ]
    
    The last test step ("Test with Invalid public key X and Y, all set to
    0") expects to get an "DHKEY check failed" instead of "unspecified".
    
    Fixes: 6d19628f539f ("Bluetooth: SMP: Fail if remote and local public keys are identical")
    Signed-off-by: Christian Eggers <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
bnxt_en: fix OOB access in DBG_BUF_PRODUCER async event handler [+ + +]
Author: Junrui Luo <[email protected]>
Date:   Sat Mar 14 17:41:04 2026 +0800

    bnxt_en: fix OOB access in DBG_BUF_PRODUCER async event handler
    
    commit 64dcbde7f8f870a4f2d9daf24ffb06f9748b5dd3 upstream.
    
    The ASYNC_EVENT_CMPL_EVENT_ID_DBG_BUF_PRODUCER handler in
    bnxt_async_event_process() uses a firmware-supplied 'type' field
    directly as an index into bp->bs_trace[] without bounds validation.
    
    The 'type' field is a 16-bit value extracted from DMA-mapped completion
    ring memory that the NIC writes directly to host RAM. A malicious or
    compromised NIC can supply any value from 0 to 65535, causing an
    out-of-bounds access into kernel heap memory.
    
    The bnxt_bs_trace_check_wrap() call then dereferences bs_trace->magic_byte
    and writes to bs_trace->last_offset and bs_trace->wrapped, leading to
    kernel memory corruption or a crash.
    
    Fix by adding a bounds check and defining BNXT_TRACE_MAX as
    DBG_LOG_BUFFER_FLUSH_REQ_TYPE_ERR_QPC_TRACE + 1 to cover all currently
    defined firmware trace types (0x0 through 0xc).
    
    Fixes: 84fcd9449fd7 ("bnxt_en: Manage the FW trace context memory")
    Reported-by: Yuhao Jiang <[email protected]>
    Cc: [email protected]
    Signed-off-by: Junrui Luo <[email protected]>
    Reviewed-by: Michael Chan <[email protected]>
    Link: https://patch.msgid.link/SYBPR01MB7881A253A1C9775D277F30E9AF42A@SYBPR01MB7881.ausprd01.prod.outlook.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
bonding: prevent potential infinite loop in bond_header_parse() [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Sun Mar 15 10:41:52 2026 +0000

    bonding: prevent potential infinite loop in bond_header_parse()
    
    [ Upstream commit b7405dcf7385445e10821777143f18c3ce20fa04 ]
    
    bond_header_parse() can loop if a stack of two bonding devices is setup,
    because skb->dev always points to the hierarchy top.
    
    Add new "const struct net_device *dev" parameter to
    (struct header_ops)->parse() method to make sure the recursion
    is bounded, and that the final leaf parse method is called.
    
    Fixes: 950803f72547 ("bonding: fix type confusion in bond_setup_by_slave()")
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Jiayuan Chen <[email protected]>
    Tested-by: Jiayuan Chen <[email protected]>
    Cc: Jay Vosburgh <[email protected]>
    Cc: Andrew Lunn <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
bridge: cfm: Fix race condition in peer_mep deletion [+ + +]
Author: Hyunwoo Kim <[email protected]>
Date:   Wed Mar 11 03:18:09 2026 +0900

    bridge: cfm: Fix race condition in peer_mep deletion
    
    [ Upstream commit 3715a00855316066cdda69d43648336367422127 ]
    
    When a peer MEP is being deleted, cancel_delayed_work_sync() is called
    on ccm_rx_dwork before freeing. However, br_cfm_frame_rx() runs in
    softirq context under rcu_read_lock (without RTNL) and can re-schedule
    ccm_rx_dwork via ccm_rx_timer_start() between cancel_delayed_work_sync()
    returning and kfree_rcu() being called.
    
    The following is a simple race scenario:
    
               cpu0                                     cpu1
    
    mep_delete_implementation()
      cancel_delayed_work_sync(ccm_rx_dwork);
                                               br_cfm_frame_rx()
                                                 // peer_mep still in hlist
                                                 if (peer_mep->ccm_defect)
                                                   ccm_rx_timer_start()
                                                     queue_delayed_work(ccm_rx_dwork)
      hlist_del_rcu(&peer_mep->head);
      kfree_rcu(peer_mep, rcu);
                                               ccm_rx_work_expired()
                                                 // on freed peer_mep
    
    To prevent this, cancel_delayed_work_sync() is replaced with
    disable_delayed_work_sync() in both peer MEP deletion paths, so
    that subsequent queue_delayed_work() calls from br_cfm_frame_rx()
    are silently rejected.
    
    The cc_peer_disable() helper retains cancel_delayed_work_sync()
    because it is also used for the CC enable/disable toggle path where
    the work must remain re-schedulable.
    
    Fixes: dc32cbb3dbd7 ("bridge: cfm: Kernel space implementation of CFM. CCM frame RX added.")
    Signed-off-by: Hyunwoo Kim <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Link: https://patch.msgid.link/abBgYT5K_FI9rD1a@v4bel
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
btrfs: log new dentries when logging parent dir of a conflicting inode [+ + +]
Author: Filipe Manana <[email protected]>
Date:   Tue Mar 3 16:57:43 2026 +0000

    btrfs: log new dentries when logging parent dir of a conflicting inode
    
    [ Upstream commit 9573a365ff9ff45da9222d3fe63695ce562beb24 ]
    
    If we log the parent directory of a conflicting inode, we are not logging
    the new dentries of the directory, so when we finish we have the parent
    directory's inode marked as logged but we did not log its new dentries.
    As a consequence if the parent directory is explicitly fsynced later and
    it does not have any new changes since we logged it, the fsync is a no-op
    and after a power failure the new dentries are missing.
    
    Example scenario:
    
      $ mkdir foo
    
      $ sync
    
      $rmdir foo
    
      $ mkdir dir1
      $ mkdir dir2
    
      # A file with the same name and parent as the directory we just deleted
      # and was persisted in a past transaction. So the deleted directory's
      # inode is a conflicting inode of this new file's inode.
      $ touch foo
    
      $ ln foo dir2/link
    
      # The fsync on dir2 will log the parent directory (".") because the
      # conflicting inode (deleted directory) does not exists anymore, but it
      # it does not log its new dentries (dir1).
      $ xfs_io -c "fsync" dir2
    
      # This fsync on the parent directory is no-op, since the previous fsync
      # logged it (but without logging its new dentries).
      $ xfs_io -c "fsync" .
    
      <power failure>
    
      # After log replay dir1 is missing.
    
    Fix this by ensuring we log new dir dentries whenever we log the parent
    directory of a no longer existing conflicting inode.
    
    A test case for fstests will follow soon.
    
    Reported-by: Vyacheslav Kovalevsky <[email protected]>
    Link: https://lore.kernel.org/linux-btrfs/[email protected]/
    Fixes: a3baaf0d786e ("Btrfs: fix fsync after succession of renames and unlink/rmdir")
    Reviewed-by: Boris Burkov <[email protected]>
    Signed-off-by: Filipe Manana <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

btrfs: tree-checker: fix misleading root drop_level error message [+ + +]
Author: ZhengYuan Huang <[email protected]>
Date:   Thu Mar 12 08:33:21 2026 +0800

    btrfs: tree-checker: fix misleading root drop_level error message
    
    [ Upstream commit fc1cd1f18c34f91e78362f9629ab9fd43b9dcab9 ]
    
    Fix tree-checker error message to report "invalid root drop_level"
    instead of the misleading "invalid root level".
    
    Fixes: 259ee7754b67 ("btrfs: tree-checker: Add ROOT_ITEM check")
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: ZhengYuan Huang <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
cache: ax45mp: Fix device node reference leak in ax45mp_cache_init() [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sat Jan 31 01:49:09 2026 +0800

    cache: ax45mp: Fix device node reference leak in ax45mp_cache_init()
    
    [ Upstream commit 0528a348b04b327a4611e29589beb4c9ae81304a ]
    
    In ax45mp_cache_init(), of_find_matching_node() returns a device node
    with an incremented reference count that must be released with
    of_node_put(). The current code fails to call of_node_put() which
    causes a reference leak.
    
    Use the __free(device_node) attribute to ensure automatic cleanup when
    the variable goes out of scope.
    
    Fixes: d34599bcd2e4 ("cache: Add L2 cache management for Andes AX45MP RISC-V core")
    Signed-off-by: Felix Gu <[email protected]>
    Signed-off-by: Conor Dooley <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

cache: starfive: fix device node leak in starlink_cache_init() [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sat Jan 31 01:13:45 2026 +0800

    cache: starfive: fix device node leak in starlink_cache_init()
    
    [ Upstream commit 3c85234b979af71cb9db5eb976ea08a468415767 ]
    
    of_find_matching_node() returns a device_node with refcount incremented.
    
    Use __free(device_node) attribute to automatically call of_node_put()
    when the variable goes out of scope, preventing the refcount leak.
    
    Fixes: cabff60ca77d ("cache: Add StarFive StarLink cache management")
    Signed-off-by: Felix Gu <[email protected]>
    Reviewed-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Conor Dooley <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
cifs: open files should not hold ref on superblock [+ + +]
Author: Shyam Prasad N <[email protected]>
Date:   Wed Mar 18 17:03:22 2026 -0400

    cifs: open files should not hold ref on superblock
    
    [ Upstream commit 340cea84f691c5206561bb2e0147158fe02070be ]
    
    Today whenever we deal with a file, in addition to holding
    a reference on the dentry, we also get a reference on the
    superblock. This happens in two cases:
    1. when a new cinode is allocated
    2. when an oplock break is being processed
    
    The reasoning for holding the superblock ref was to make sure
    that when umount happens, if there are users of inodes and
    dentries, it does not try to clean them up and wait for the
    last ref to superblock to be dropped by last of such users.
    
    But the side effect of doing that is that umount silently drops
    a ref on the superblock and we could have deferred closes and
    lease breaks still holding these refs.
    
    Ideally, we should ensure that all of these users of inodes and
    dentries are cleaned up at the time of umount, which is what this
    code is doing.
    
    This code change allows these code paths to use a ref on the
    dentry (and hence the inode). That way, umount is
    ensured to clean up SMB client resources when it's the last
    ref on the superblock (For ex: when same objects are shared).
    
    The code change also moves the call to close all the files in
    deferred close list to the umount code path. It also waits for
    oplock_break workers to be flushed before calling
    kill_anon_super (which eventually frees up those objects).
    
    Fixes: 24261fc23db9 ("cifs: delay super block destruction until all cifsFileInfo objects are gone")
    Fixes: 705c79101ccf ("smb: client: fix use-after-free in cifs_oplock_break")
    Cc: <[email protected]>
    Signed-off-by: Shyam Prasad N <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    [ replaced kmalloc_obj() with kmalloc(sizeof(...)) ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
clsact: Fix use-after-free in init/destroy rollback asymmetry [+ + +]
Author: Daniel Borkmann <[email protected]>
Date:   Fri Mar 13 07:55:31 2026 +0100

    clsact: Fix use-after-free in init/destroy rollback asymmetry
    
    [ Upstream commit a0671125d4f55e1e98d9bde8a0b671941987e208 ]
    
    Fix a use-after-free in the clsact qdisc upon init/destroy rollback asymmetry.
    The latter is achieved by first fully initializing a clsact instance, and
    then in a second step having a replacement failure for the new clsact qdisc
    instance. clsact_init() initializes ingress first and then takes care of the
    egress part. This can fail midway, for example, via tcf_block_get_ext(). Upon
    failure, the kernel will trigger the clsact_destroy() callback.
    
    Commit 1cb6f0bae504 ("bpf: Fix too early release of tcx_entry") details the
    way how the transition is happening. If tcf_block_get_ext on the q->ingress_block
    ends up failing, we took the tcx_miniq_inc reference count on the ingress
    side, but not yet on the egress side. clsact_destroy() tests whether the
    {ingress,egress}_entry was non-NULL. However, even in midway failure on the
    replacement, both are in fact non-NULL with a valid egress_entry from the
    previous clsact instance.
    
    What we really need to test for is whether the qdisc instance-specific ingress
    or egress side previously got initialized. This adds a small helper for checking
    the miniq initialization called mini_qdisc_pair_inited, and utilizes that upon
    clsact_destroy() in order to fix the use-after-free scenario. Convert the
    ingress_destroy() side as well so both are consistent to each other.
    
    Fixes: 1cb6f0bae504 ("bpf: Fix too early release of tcx_entry")
    Reported-by: Keenan Dong <[email protected]>
    Signed-off-by: Daniel Borkmann <[email protected]>
    Cc: Martin KaFai Lau <[email protected]>
    Acked-by: Martin KaFai Lau <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
crash_dump: don't log dm-crypt key bytes in read_key_from_user_keying [+ + +]
Author: Thorsten Blum <[email protected]>
Date:   Sat Feb 28 00:00:09 2026 +0100

    crash_dump: don't log dm-crypt key bytes in read_key_from_user_keying
    
    commit 36f46b0e36892eba08978eef7502ff3c94ddba77 upstream.
    
    When debug logging is enabled, read_key_from_user_keying() logs the first
    8 bytes of the key payload and partially exposes the dm-crypt key.  Stop
    logging any key bytes.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 479e58549b0f ("crash_dump: store dm crypt keys in kdump reserved memory")
    Signed-off-by: Thorsten Blum <[email protected]>
    Cc: Baoquan He <[email protected]>
    Cc: Coiby Xu <[email protected]>
    Cc: Dave Young <[email protected]>
    Cc: Vivek Goyal <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
crypto: atmel-sha204a - Fix OOM ->tfm_count leak [+ + +]
Author: Thorsten Blum <[email protected]>
Date:   Wed Mar 18 20:35:55 2026 -0400

    crypto: atmel-sha204a - Fix OOM ->tfm_count leak
    
    [ Upstream commit d240b079a37e90af03fd7dfec94930eb6c83936e ]
    
    If memory allocation fails, decrement ->tfm_count to avoid blocking
    future reads.
    
    Cc: [email protected]
    Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator")
    Signed-off-by: Thorsten Blum <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    [ adapted kmalloc_obj() macro to kmalloc(sizeof()) ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

crypto: ccp - Fix leaking the same page twice [+ + +]
Author: Guenter Roeck <[email protected]>
Date:   Wed Mar 4 12:39:34 2026 -0800

    crypto: ccp - Fix leaking the same page twice
    
    [ Upstream commit 5c52607c43c397b79a9852ce33fc61de58c3645c ]
    
    Commit 551120148b67 ("crypto: ccp - Fix a case where SNP_SHUTDOWN is
    missed") fixed a case where SNP is left in INIT state if page reclaim
    fails. It removes the transition to the INIT state for this command and
    adjusts the page state management.
    
    While doing this, it added a call to snp_leak_pages() after a call to
    snp_reclaim_pages() failed. Since snp_reclaim_pages() already calls
    snp_leak_pages() internally on the pages it fails to reclaim, calling
    it again leaks the exact same page twice.
    
    Fix by removing the extra call to snp_leak_pages().
    
    The problem was found by an experimental code review agent based on
    gemini-3.1-pro while reviewing backports into v6.18.y.
    
    Assisted-by: Gemini:gemini-3.1-pro
    Fixes: 551120148b67 ("crypto: ccp - Fix a case where SNP_SHUTDOWN is missed")
    Cc: Tycho Andersen (AMD) <[email protected]>
    Cc: Tom Lendacky <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Reviewed-by: Tom Lendacky <[email protected]>
    Reviewed-by: Tycho Andersen (AMD) <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

crypto: padlock-sha - Disable for Zhaoxin processor [+ + +]
Author: AlanSong-oc <[email protected]>
Date:   Fri Mar 13 16:01:49 2026 +0800

    crypto: padlock-sha - Disable for Zhaoxin processor
    
    commit ebba09f198078b7a2565004104ef762d1148e7f0 upstream.
    
    For Zhaoxin processors, the XSHA1 instruction requires the total memory
    allocated at %rdi register must be 32 bytes, while the XSHA1 and
    XSHA256 instruction doesn't perform any operation when %ecx is zero.
    
    Due to these requirements, the current padlock-sha driver does not work
    correctly with Zhaoxin processors. It cannot pass the self-tests and
    therefore does not activate the driver on Zhaoxin processors. This issue
    has been reported in Debian [1]. The self-tests fail with the
    following messages [2]:
    
    alg: shash: sha1-padlock-nano test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer"
    alg: self-tests for sha1 using sha1-padlock-nano failed (rc=-22)
    
    alg: shash: sha256-padlock-nano test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer"
    alg: self-tests for sha256 using sha256-padlock-nano failed (rc=-22)
    
    Disable the padlock-sha driver on Zhaoxin processors with the CPU family
    0x07 and newer. Following the suggestion in [3], support for PHE will be
    added to lib/crypto/ instead.
    
    [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1113996
    [2] https://linux-hardware.org/?probe=271fabb7a4&log=dmesg
    [3] https://lore.kernel.org/linux-crypto/[email protected]/
    
    Fixes: 63dc06cd12f9 ("crypto: padlock-sha - Use API partial block handling")
    Cc: [email protected]
    Signed-off-by: AlanSong-oc <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Eric Biggers <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amd/display: Fix DisplayID not-found handling in parse_edid_displayid_vrr() [+ + +]
Author: Srinivasan Shanmugam <[email protected]>
Date:   Sun Mar 15 18:30:26 2026 +0530

    drm/amd/display: Fix DisplayID not-found handling in parse_edid_displayid_vrr()
    
    [ Upstream commit 2323b019651ad81c20a0f7f817c63392b3110652 ]
    
    parse_edid_displayid_vrr() searches the EDID extension blocks for a
    DisplayID extension before parsing the dynamic video timing range.
    
    The code previously checked whether edid_ext was NULL after the search
    loop. However, edid_ext is assigned during each iteration of the loop,
    so it will never be NULL once the loop has executed. If no DisplayID
    extension is found, edid_ext ends up pointing to the last extension
    block, and the NULL check does not correctly detect the failure case.
    
    Instead, check whether the loop completed without finding a matching
    DisplayID block by testing "i == edid->extensions". This ensures the
    function exits early when no DisplayID extension is present and avoids
    parsing an unrelated EDID extension block.
    
    Also simplify the EDID validation check using "!edid ||
    !edid->extensions".
    
    Fixes the below:
    drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:13079 parse_edid_displayid_vrr() warn: variable dereferenced before check 'edid_ext' (see line 13075)
    
    Fixes: a638b837d0e6 ("drm/amd/display: Fix refresh rate range for some panel")
    Cc: Roman Li <[email protected]>
    Cc: Alex Hung <[email protected]>
    Cc: Jerry Zuo <[email protected]>
    Cc: Sun peng Li <[email protected]>
    Cc: Tom Chung <[email protected]>
    Cc: Dan Carpenter <[email protected]>
    Cc: Aurabindo Pillai <[email protected]>
    Signed-off-by: Srinivasan Shanmugam <[email protected]>
    Reviewed-by: Tom Chung <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 91c7e6342e98c846b259c57273436fdea4c043f2)
    Signed-off-by: Sasha Levin <[email protected]>

drm/amd/display: Wrap dcn32_override_min_req_memclk() in DC_FP_{START, END} [+ + +]
Author: Xi Ruoyao <[email protected]>
Date:   Fri Mar 6 14:28:03 2026 +0800

    drm/amd/display: Wrap dcn32_override_min_req_memclk() in DC_FP_{START, END}
    
    commit ebe82c6e75cfc547154d0fd843b0dd6cca3d548f upstream.
    
    [Why]
    The dcn32_override_min_req_memclk function is in dcn32_fpu.c, which is
    compiled with CC_FLAGS_FPU into FP instructions.  So when we call it we
    must use DC_FP_{START,END} to save and restore the FP context, and
    prepare the FP unit on architectures like LoongArch where the FP unit
    isn't always on.
    
    Reported-by: LiarOnce <[email protected]>
    Fixes: ee7be8f3de1c ("drm/amd/display: Limit DCN32 8 channel or less parts to DPM1 for FPO")
    Signed-off-by: Xi Ruoyao <[email protected]>
    Reviewed-by: Alex Hung <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 25bb1d54ba3983c064361033a8ec15474fece37e)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amd: fix dcn 2.01 check [+ + +]
Author: Andy Nguyen <[email protected]>
Date:   Sun Mar 15 17:51:47 2026 +0100

    drm/amd: fix dcn 2.01 check
    
    [ Upstream commit 39f44f54afa58661ecae9c27e15f5dbce2372892 ]
    
    The ASICREV_IS_BEIGE_GOBY_P check always took precedence, because it includes all chip revisions upto NV_UNKNOWN.
    
    Fixes: 54b822b3eac3 ("drm/amd/display: Use dce_version instead of chip_id")
    Signed-off-by: Andy Nguyen <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 9c7be0efa6f0daa949a5f3e3fdf9ea090b0713cb)
    Signed-off-by: Sasha Levin <[email protected]>

drm/amd: Fix hang on amdgpu unload by using pci_dev_is_disconnected() [+ + +]
Author: Mario Limonciello <[email protected]>
Date:   Thu Feb 5 10:42:54 2026 -0600

    drm/amd: Fix hang on amdgpu unload by using pci_dev_is_disconnected()
    
    commit f7afda7fcd169a9168695247d07ad94cf7b9798f upstream.
    
    The commit 6a23e7b4332c ("drm/amd: Clean up kfd node on surprise
    disconnect") introduced early KFD cleanup when drm_dev_is_unplugged()
    returns true. However, this causes hangs during normal module unload
    (rmmod amdgpu).
    
    The issue occurs because drm_dev_unplug() is called in amdgpu_pci_remove()
    for all removal scenarios, not just surprise disconnects. This was done
    intentionally in commit 39934d3ed572 ("Revert "drm/amdgpu: TA unload
    messages are not actually sent to psp when amdgpu is uninstalled"") to
    fix IGT PCI software unplug test failures. As a result,
    drm_dev_is_unplugged() returns true even during normal module unload,
    triggering the early KFD cleanup inappropriately.
    
    The correct check should distinguish between:
    - Actual surprise disconnect (eGPU unplugged): pci_dev_is_disconnected()
      returns true
    - Normal module unload (rmmod): pci_dev_is_disconnected() returns false
    
    Replace drm_dev_is_unplugged() with pci_dev_is_disconnected() to ensure
    the early cleanup only happens during true hardware disconnect events.
    
    Cc: [email protected]
    Reported-by: Cal Peake <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Fixes: 6a23e7b4332c ("drm/amd: Clean up kfd node on surprise disconnect")
    Acked-by: Alex Deucher <[email protected]>
    Signed-off-by: Mario Limonciello <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/gmc9.0: add bounds checking for cid [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Mon Mar 16 15:51:08 2026 -0400

    drm/amdgpu/gmc9.0: add bounds checking for cid
    
    commit f39e1270277f4b06db0b2c6ec9405b6dd766fb13 upstream.
    
    The value should never exceed the array size as those
    are the only values the hardware is expected to return,
    but add checks anyway.
    
    Cc: Benjamin Cheng <[email protected]>
    Reviewed-by: Benjamin Cheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit e14d468304832bcc4a082d95849bc0a41b18ddea)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/mmhub2.0: add bounds checking for cid [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Wed Mar 4 17:22:43 2026 -0500

    drm/amdgpu/mmhub2.0: add bounds checking for cid
    
    commit 0b26edac4ac5535df1f63e6e8ab44c24fe1acad7 upstream.
    
    The value should never exceed the array size as those
    are the only values the hardware is expected to return,
    but add checks anyway.
    
    Reviewed-by: Benjamin Cheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit e064cef4b53552602bb6ac90399c18f662f3cacd)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/mmhub2.3: add bounds checking for cid [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Wed Mar 4 17:24:10 2026 -0500

    drm/amdgpu/mmhub2.3: add bounds checking for cid
    
    commit a54403a534972af5d9ba5aaa3bb6ead612500ec6 upstream.
    
    The value should never exceed the array size as those
    are the only values the hardware is expected to return,
    but add checks anyway.
    
    Reviewed-by: Benjamin Cheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 89cd90375c19fb45138990b70e9f4ba4806f05c4)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/mmhub3.0.1: add bounds checking for cid [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Wed Mar 4 17:24:35 2026 -0500

    drm/amdgpu/mmhub3.0.1: add bounds checking for cid
    
    commit 5d4e88bcfef29569a1db224ef15e28c603666c6d upstream.
    
    The value should never exceed the array size as those
    are the only values the hardware is expected to return,
    but add checks anyway.
    
    Reviewed-by: Benjamin Cheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 5f76083183363c4528a4aaa593f5d38c28fe7d7b)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/mmhub3.0.2: add bounds checking for cid [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Wed Mar 4 17:25:09 2026 -0500

    drm/amdgpu/mmhub3.0.2: add bounds checking for cid
    
    commit e5e6d67b1ce9764e67aef2d0eef9911af53ad99a upstream.
    
    The value should never exceed the array size as those
    are the only values the hardware is expected to return,
    but add checks anyway.
    
    Reviewed-by: Benjamin Cheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 1441f52c7f6ae6553664aa9e3e4562f6fc2fe8ea)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/mmhub3.0: add bounds checking for cid [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Wed Mar 4 17:25:30 2026 -0500

    drm/amdgpu/mmhub3.0: add bounds checking for cid
    
    commit cdb82ecbeccb55fae75a3c956b605f7801a30db1 upstream.
    
    The value should never exceed the array size as those
    are the only values the hardware is expected to return,
    but add checks anyway.
    
    Reviewed-by: Benjamin Cheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit f14f27bbe2a3ed7af32d5f6eaf3f417139f45253)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/mmhub4.1.0: add bounds checking for cid [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Wed Mar 4 17:25:56 2026 -0500

    drm/amdgpu/mmhub4.1.0: add bounds checking for cid
    
    commit 3cdd405831d8cc50a5eae086403402697bb98a4a upstream.
    
    The value should never exceed the array size as those
    are the only values the hardware is expected to return,
    but add checks anyway.
    
    Reviewed-by: Benjamin Cheng <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 04f063d85090f5dd0c671010ce88ee49d9dcc8ed)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu: apply state adjust rules to some additional HAINAN vairants [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Mon Sep 25 10:44:07 2023 -0400

    drm/amdgpu: apply state adjust rules to some additional HAINAN vairants
    
    commit 9787f7da186ee8143b7b6d914cfa0b6e7fee2648 upstream.
    
    They need a similar workaround.
    
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1839
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 0de31d92a173d3d94f28051b0b80a6c98913aed4)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/amdgpu: Limit BO list entry count to prevent resource exhaustion [+ + +]
Author: Jesse.Zhang <[email protected]>
Date:   Thu Mar 12 18:06:17 2026 +0800

    drm/amdgpu: Limit BO list entry count to prevent resource exhaustion
    
    commit 6270b1a5dab94665d7adce3dc78bc9066ed28bdd upstream.
    
    Userspace can pass an arbitrary number of BO list entries via the
    bo_number field. Although the previous multiplication overflow check
    prevents out-of-bounds allocation, a large number of entries could still
    cause excessive memory allocation (up to potentially gigabytes) and
    unnecessarily long list processing times.
    
    Introduce a hard limit of 128k entries per BO list, which is more than
    sufficient for any realistic use case (e.g., a single list containing all
    buffers in a large scene). This prevents memory exhaustion attacks and
    ensures predictable performance.
    
    Return -EINVAL if the requested entry count exceeds the limit
    
    Reviewed-by: Christian König <[email protected]>
    Suggested-by: Christian König <[email protected]>
    Signed-off-by: Jesse Zhang <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 688b87d39e0aa8135105b40dc167d74b5ada5332)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/amdgpu: rework how we handle TLB fences [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Mon Mar 16 11:04:46 2026 -0400

    drm/amdgpu: rework how we handle TLB fences
    
    commit e9f58ff991dd4be13fd7a651bbf64329c090af09 upstream.
    
    Add a new VM flag to indicate whether or not we need
    a TLB fence.  Userqs (KFD or KGD) require a TLB fence.
    A TLB fence is not strictly required for kernel queues,
    but it shouldn't hurt.  That said, enabling this
    unconditionally should be fine, but it seems to tickle
    some issues in KIQ/MES.  Only enable them for KFD,
    or when KGD userq queues are enabled (currently via module
    parameter).
    
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4798
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4749
    Fixes: f3854e04b708 ("drm/amdgpu: attach tlb fence to the PTs update")
    Cc: Christian König <[email protected]>
    Cc: Prike Liang <[email protected]>
    Reviewed-by: Prike Liang <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 69c5fbd2b93b5ced77c6e79afe83371bca84c788)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/bridge: dw-hdmi-qp: fix multi-channel audio output [+ + +]
Author: Jonas Karlman <[email protected]>
Date:   Sat Feb 28 11:28:22 2026 +0000

    drm/bridge: dw-hdmi-qp: fix multi-channel audio output
    
    [ Upstream commit cffcb42c57686e9a801dfcf37a3d0c62e51c1c3e ]
    
    Channel Allocation (PB4) and Level Shift Information (PB5) are
    configured with values from PB1 and PB2 due to the wrong offset
    being used. This results in missing audio channels or incorrect
    speaker placement when playing multi-channel audio.
    
    Use the correct offset to fix multi-channel audio output.
    
    Fixes: fd0141d1a8a2 ("drm/bridge: synopsys: Add audio support for dw-hdmi-qp")
    Reported-by: Christian Hewitt <[email protected]>
    Signed-off-by: Jonas Karlman <[email protected]>
    Signed-off-by: Christian Hewitt <[email protected]>
    Reviewed-by: Cristian Ciocaltea <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Luca Ceresoli <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/i915/dmc: Fix an unlikely NULL pointer deference at probe [+ + +]
Author: Imre Deak <[email protected]>
Date:   Mon Mar 9 18:48:03 2026 +0200

    drm/i915/dmc: Fix an unlikely NULL pointer deference at probe
    
    commit ac57eb3b7d2ad649025b5a0fa207315f755ac4f6 upstream.
    
    intel_dmc_update_dc6_allowed_count() oopses when DMC hasn't been
    initialized, and dmc is thus NULL.
    
    That would be the case when the call path is
    intel_power_domains_init_hw() -> {skl,bxt,icl}_display_core_init() ->
    gen9_set_dc_state() -> intel_dmc_update_dc6_allowed_count(), as
    intel_power_domains_init_hw() is called *before* intel_dmc_init().
    
    However, gen9_set_dc_state() calls intel_dmc_update_dc6_allowed_count()
    conditionally, depending on the current and target DC states. At probe,
    the target is disabled, but if DC6 is enabled, the function is called,
    and an oops follows. Apparently it's quite unlikely that DC6 is enabled
    at probe, as we haven't seen this failure mode before.
    
    It is also strange to have DC6 enabled at boot, since that would require
    the DMC firmware (loaded by BIOS); the BIOS loading the DMC firmware and
    the driver stopping / reprogramming the firmware is a poorly specified
    sequence and as such unlikely an intentional BIOS behaviour. It's more
    likely that BIOS is leaving an unintentionally enabled DC6 HW state
    behind (without actually loading the required DMC firmware for this).
    
    The tracking of the DC6 allowed counter only works if starting /
    stopping the counter depends on the _SW_ DC6 state vs. the current _HW_
    DC6 state (since stopping the counter requires the DC5 counter captured
    when the counter was started). Thus, using the HW DC6 state is incorrect
    and it also leads to the above oops. Fix both issues by using the SW DC6
    state for the tracking.
    
    This is v2 of the fix originally sent by Jani, updated based on the
    first Link: discussion below.
    
    Link: https://lore.kernel.org/all/[email protected]
    Link: https://lore.kernel.org/all/[email protected]
    Fixes: 88c1f9a4d36d ("drm/i915/dmc: Create debugfs entry for dc6 counter")
    Cc: Mohammed Thasleem <[email protected]>
    Cc: Jani Nikula <[email protected]>
    Cc: Tao Liu <[email protected]>
    Cc: <[email protected]> # v6.16+
    Tested-by: Tao Liu <[email protected]>
    Reviewed-by: Jani Nikula <[email protected]>
    Signed-off-by: Imre Deak <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 2344b93af8eb5da5d496b4e0529d35f0f559eaf0)
    Signed-off-by: Joonas Lahtinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters [+ + +]
Author: Jouni Högander <[email protected]>
Date:   Wed Mar 4 13:30:10 2026 +0200

    drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters
    
    commit bb5f1cd10101c2567bff4d0e760b74aee7c42f44 upstream.
    
    There are slice row per frame and pic height configuration in DSC Selective
    Update Parameter Set 1 register. Add helper for configuring these.
    
    v2:
      - Add WARN_ON_ONCE if vdsc instances per pipe > 2
      - instead of checking vdsc instances per pipe being > 1 check == 2
    
    Bspec: 71709
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Ankit Nautiyal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit c8698d61aeb3f70fe33761ee9d3d0e131b5bc2eb)
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    [tursulin: fixup forward declaration conflict]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/i915/dsc: Add Selective Update register definitions [+ + +]
Author: Jouni Högander <[email protected]>
Date:   Wed Mar 4 13:30:09 2026 +0200

    drm/i915/dsc: Add Selective Update register definitions
    
    commit c2c79c6d5b939ae8a42ddb884f576bddae685672 upstream.
    
    Add definitions for DSC_SU_PARAMETER_SET_0_DSC0 and
    DSC_SU_PARAMETER_SET_0_DSC1 registers. These are for Selective Update Early
    Transport configuration.
    
    Bspec: 71709
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Ankit Nautiyal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 24f96d903daf3dcf8fafe84d3d22b80ef47ba493)
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/i915/gt: Check set_default_submission() before deferencing [+ + +]
Author: Rahul Bukte <[email protected]>
Date:   Tue Feb 3 10:18:39 2026 +0530

    drm/i915/gt: Check set_default_submission() before deferencing
    
    [ Upstream commit 0162ab3220bac870e43e229e6e3024d1a21c3f26 ]
    
    When the i915 driver firmware binaries are not present, the
    set_default_submission pointer is not set. This pointer is
    dereferenced during suspend anyways.
    
    Add a check to make sure it is set before dereferencing.
    
    [   23.289926] PM: suspend entry (deep)
    [   23.293558] Filesystems sync: 0.000 seconds
    [   23.298010] Freezing user space processes
    [   23.302771] Freezing user space processes completed (elapsed 0.000 seconds)
    [   23.309766] OOM killer disabled.
    [   23.313027] Freezing remaining freezable tasks
    [   23.318540] Freezing remaining freezable tasks completed (elapsed 0.001 seconds)
    [   23.342038] serial 00:05: disabled
    [   23.345719] serial 00:02: disabled
    [   23.349342] serial 00:01: disabled
    [   23.353782] sd 0:0:0:0: [sda] Synchronizing SCSI cache
    [   23.358993] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
    [   23.361635] ata1.00: Entering standby power mode
    [   23.368863] ata2.00: Entering standby power mode
    [   23.445187] BUG: kernel NULL pointer dereference, address: 0000000000000000
    [   23.452194] #PF: supervisor instruction fetch in kernel mode
    [   23.457896] #PF: error_code(0x0010) - not-present page
    [   23.463065] PGD 0 P4D 0
    [   23.465640] Oops: Oops: 0010 [#1] SMP NOPTI
    [   23.469869] CPU: 8 UID: 0 PID: 211 Comm: kworker/u48:18 Tainted: G S      W           6.19.0-rc4-00020-gf0b9d8eb98df #10 PREEMPT(voluntary)
    [   23.482512] Tainted: [S]=CPU_OUT_OF_SPEC, [W]=WARN
    [   23.496511] Workqueue: async async_run_entry_fn
    [   23.501087] RIP: 0010:0x0
    [   23.503755] Code: Unable to access opcode bytes at 0xffffffffffffffd6.
    [   23.510324] RSP: 0018:ffffb4a60065fca8 EFLAGS: 00010246
    [   23.515592] RAX: 0000000000000000 RBX: ffff9f428290e000 RCX: 000000000000000f
    [   23.522765] RDX: 0000000000000000 RSI: 0000000000000282 RDI: ffff9f428290e000
    [   23.529937] RBP: ffff9f4282907070 R08: ffff9f4281130428 R09: 00000000ffffffff
    [   23.537111] R10: 0000000000000000 R11: 0000000000000001 R12: ffff9f42829070f8
    [   23.544284] R13: ffff9f4282906028 R14: ffff9f4282900000 R15: ffff9f4282906b68
    [   23.551457] FS:  0000000000000000(0000) GS:ffff9f466b2cf000(0000) knlGS:0000000000000000
    [   23.559588] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   23.565365] CR2: ffffffffffffffd6 CR3: 000000031c230001 CR4: 0000000000f70ef0
    [   23.572539] PKRU: 55555554
    [   23.575281] Call Trace:
    [   23.577770]  <TASK>
    [   23.579905]  intel_engines_reset_default_submission+0x42/0x60
    [   23.585695]  __intel_gt_unset_wedged+0x191/0x200
    [   23.590360]  intel_gt_unset_wedged+0x20/0x40
    [   23.594675]  gt_sanitize+0x15e/0x170
    [   23.598290]  i915_gem_suspend_late+0x6b/0x180
    [   23.602692]  i915_drm_suspend_late+0x35/0xf0
    [   23.607008]  ? __pfx_pci_pm_suspend_late+0x10/0x10
    [   23.611843]  dpm_run_callback+0x78/0x1c0
    [   23.615817]  device_suspend_late+0xde/0x2e0
    [   23.620037]  async_suspend_late+0x18/0x30
    [   23.624082]  async_run_entry_fn+0x25/0xa0
    [   23.628129]  process_one_work+0x15b/0x380
    [   23.632182]  worker_thread+0x2a5/0x3c0
    [   23.635973]  ? __pfx_worker_thread+0x10/0x10
    [   23.640279]  kthread+0xf6/0x1f0
    [   23.643464]  ? __pfx_kthread+0x10/0x10
    [   23.647263]  ? __pfx_kthread+0x10/0x10
    [   23.651045]  ret_from_fork+0x131/0x190
    [   23.654837]  ? __pfx_kthread+0x10/0x10
    [   23.658634]  ret_from_fork_asm+0x1a/0x30
    [   23.662597]  </TASK>
    [   23.664826] Modules linked in:
    [   23.667914] CR2: 0000000000000000
    [   23.671271] ------------[ cut here ]------------
    
    Signed-off-by: Rahul Bukte <[email protected]>
    Reviewed-by: Suraj Kandpal <[email protected]>
    Signed-off-by: Suraj Kandpal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit daa199abc3d3d1740c9e3a2c3e9216ae5b447cad)
    Fixes: ff44ad51ebf8 ("drm/i915: Move engine->submit_request selection to a vfunc")
    Signed-off-by: Joonas Lahtinen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/i915/psr: Compute PSR entry_setup_frames into intel_crtc_state [+ + +]
Author: Jouni Högander <[email protected]>
Date:   Thu Mar 12 10:37:10 2026 +0200

    drm/i915/psr: Compute PSR entry_setup_frames into intel_crtc_state
    
    commit 7caac659a837af9fd4cad85be851982b88859484 upstream.
    
    PSR entry_setup_frames is currently computed directly into struct
    intel_dp:intel_psr:entry_setup_frames. This causes a problem if mode change
    gets rejected after PSR compute config: Psr_entry_setup_frames computed for
    this rejected state is in intel_dp:intel_psr:entry_setup_frame. Fix this by
    computing it into intel_crtc_state and copy the value into
    intel_dp:intel_psr:entry_setup_frames on PSR enable.
    
    Fixes: 2b981d57e480 ("drm/i915/display: Support PSR entry VSC packet to be transmitted one frame earlier")
    Cc: Mika Kahola <[email protected]>
    Cc: <[email protected]> # v6.8+
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Suraj Kandpal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 8c229b4aa00262c13787982e998c61c0783285e0)
    Signed-off-by: Joonas Lahtinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/i915/psr: Disable PSR on update_m_n and update_lrr [+ + +]
Author: Jouni Högander <[email protected]>
Date:   Thu Mar 12 10:37:09 2026 +0200

    drm/i915/psr: Disable PSR on update_m_n and update_lrr
    
    commit b0a4dba7b623aa7cbc9efcc56b4af2ec8b274f3e upstream.
    
    PSR/PR parameters might change based on update_m_n or update_lrr. Disable
    on update_m_n and update_lrr to ensure proper parameters are taken into use
    on next PSR enable in intel_psr_post_plane_update.
    
    Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15771
    Fixes: 2bc98c6f97af ("drm/i915/alpm: Compute ALPM parameters into crtc_state->alpm_state")
    Cc: <[email protected]> # v6.19+
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Suraj Kandpal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 65852b56bfa929f99e28c96fd98b02058959da7f)
    Signed-off-by: Joonas Lahtinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/i915/psr: Write DSC parameters on Selective Update in ET mode [+ + +]
Author: Jouni Högander <[email protected]>
Date:   Wed Mar 4 13:30:11 2026 +0200

    drm/i915/psr: Write DSC parameters on Selective Update in ET mode
    
    commit 5923a6e0459fdd3edac4ad5abccb24d777d8f1b6 upstream.
    
    There are slice row per frame and pic height parameters in DSC that needs
    to be configured on every Selective Update in Early Transport mode. Use
    helper provided by DSC code to configure these on Selective Update when in
    Early Transport mode. Also fill crtc_state->psr2_su_area with full frame
    area on full frame update for DSC calculation.
    
    v2: move psr2_su_area under skip_sel_fetch_set_loop label
    
    Bspec: 68927, 71709
    Fixes: 467e4e061c44 ("drm/i915/psr: Enable psr2 early transport as possible")
    Cc: <[email protected]> # v6.9+
    Signed-off-by: Jouni Högander <[email protected]>
    Reviewed-by: Ankit Nautiyal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 3140af2fab505a4cd47d516284529bf1585628be)
    Signed-off-by: Tvrtko Ursulin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/imagination: Fix deadlock in soft reset sequence [+ + +]
Author: Alessio Belle <[email protected]>
Date:   Mon Mar 9 15:23:48 2026 +0000

    drm/imagination: Fix deadlock in soft reset sequence
    
    commit a55c2a5c8d680156495b7b1e2a9f5a3e313ba524 upstream.
    
    The soft reset sequence is currently executed from the threaded IRQ
    handler, hence it cannot call disable_irq() which internally waits
    for IRQ handlers, i.e. itself, to complete.
    
    Use disable_irq_nosync() during a soft reset instead.
    
    Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support")
    Cc: [email protected]
    Signed-off-by: Alessio Belle <[email protected]>
    Reviewed-by: Matt Coster <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Matt Coster <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/imagination: Synchronize interrupts before suspending the GPU [+ + +]
Author: Alessio Belle <[email protected]>
Date:   Tue Mar 10 11:41:11 2026 +0000

    drm/imagination: Synchronize interrupts before suspending the GPU
    
    commit 2d7f05cddf4c268cc36256a2476946041dbdd36d upstream.
    
    The runtime PM suspend callback doesn't know whether the IRQ handler is
    in progress on a different CPU core and doesn't wait for it to finish.
    
    Depending on timing, the IRQ handler could be running while the GPU is
    suspended, leading to kernel crashes when trying to access GPU
    registers. See example signature below.
    
    In a power off sequence initiated by the runtime PM suspend callback,
    wait for any IRQ handlers in progress on other CPU cores to finish, by
    calling synchronize_irq().
    
    At the same time, remove the runtime PM resume/put calls in the threaded
    IRQ handler. On top of not being the right approach to begin with, and
    being at the wrong place as they should have wrapped all GPU register
    accesses, the driver would hit a deadlock between synchronize_irq()
    being called from a runtime PM suspend callback, holding the device
    power lock, and the resume callback requiring the same.
    
    Example crash signature on a TI AM68 SK platform:
    
      [  337.241218] SError Interrupt on CPU0, code 0x00000000bf000000 -- SError
      [  337.241239] CPU: 0 UID: 0 PID: 112 Comm: irq/234-gpu Tainted: G   M                6.17.7-B2C-00005-g9c7bbe4ea16c #2 PREEMPT
      [  337.241246] Tainted: [M]=MACHINE_CHECK
      [  337.241249] Hardware name: Texas Instruments AM68 SK (DT)
      [  337.241252] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      [  337.241256] pc : pvr_riscv_irq_pending+0xc/0x24
      [  337.241277] lr : pvr_device_irq_thread_handler+0x64/0x310
      [  337.241282] sp : ffff800085b0bd30
      [  337.241284] x29: ffff800085b0bd50 x28: ffff0008070d9eab x27: ffff800083a5ce10
      [  337.241291] x26: ffff000806e48f80 x25: ffff0008070d9eac x24: 0000000000000000
      [  337.241296] x23: ffff0008068e9bf0 x22: ffff0008068e9bd0 x21: ffff800085b0bd30
      [  337.241301] x20: ffff0008070d9e00 x19: ffff0008068e9000 x18: 0000000000000001
      [  337.241305] x17: 637365645f656c70 x16: 0000000000000000 x15: ffff000b7df9ff40
      [  337.241310] x14: 0000a585fe3c0d0e x13: 000000999704f060 x12: 000000000002771a
      [  337.241314] x11: 00000000000000c0 x10: 0000000000000af0 x9 : ffff800085b0bd00
      [  337.241318] x8 : ffff0008071175d0 x7 : 000000000000b955 x6 : 0000000000000003
      [  337.241323] x5 : 0000000000000000 x4 : 0000000000000002 x3 : 0000000000000000
      [  337.241327] x2 : ffff800080e39d20 x1 : ffff800080e3fc48 x0 : 0000000000000000
      [  337.241333] Kernel panic - not syncing: Asynchronous SError Interrupt
      [  337.241337] CPU: 0 UID: 0 PID: 112 Comm: irq/234-gpu Tainted: G   M                6.17.7-B2C-00005-g9c7bbe4ea16c #2 PREEMPT
      [  337.241342] Tainted: [M]=MACHINE_CHECK
      [  337.241343] Hardware name: Texas Instruments AM68 SK (DT)
      [  337.241345] Call trace:
      [  337.241348]  show_stack+0x18/0x24 (C)
      [  337.241357]  dump_stack_lvl+0x60/0x80
      [  337.241364]  dump_stack+0x18/0x24
      [  337.241368]  vpanic+0x124/0x2ec
      [  337.241373]  abort+0x0/0x4
      [  337.241377]  add_taint+0x0/0xbc
      [  337.241384]  arm64_serror_panic+0x70/0x80
      [  337.241389]  do_serror+0x3c/0x74
      [  337.241392]  el1h_64_error_handler+0x30/0x48
      [  337.241400]  el1h_64_error+0x6c/0x70
      [  337.241404]  pvr_riscv_irq_pending+0xc/0x24 (P)
      [  337.241410]  irq_thread_fn+0x2c/0xb0
      [  337.241416]  irq_thread+0x170/0x334
      [  337.241421]  kthread+0x12c/0x210
      [  337.241428]  ret_from_fork+0x10/0x20
      [  337.241434] SMP: stopping secondary CPUs
      [  337.241451] Kernel Offset: disabled
      [  337.241453] CPU features: 0x040000,02002800,20002001,0400421b
      [  337.241456] Memory Limit: none
      [  337.457921] ---[ end Kernel panic - not syncing: Asynchronous SError Interrupt ]---
    
    Fixes: cc1aeedb98ad ("drm/imagination: Implement firmware infrastructure and META FW support")
    Fixes: 96822d38ff57 ("drm/imagination: Handle Rogue safety event IRQs")
    Cc: [email protected] # see patch description, needs adjustments for < 6.16
    Signed-off-by: Alessio Belle <[email protected]>
    Reviewed-by: Matt Coster <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Matt Coster <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/radeon: apply state adjust rules to some additional HAINAN vairants [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Mon Sep 25 10:44:06 2023 -0400

    drm/radeon: apply state adjust rules to some additional HAINAN vairants
    
    commit 86650ee2241ff84207eaa298ab318533f3c21a38 upstream.
    
    They need a similar workaround.
    
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/1839
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 87327658c848f56eac166cb382b57b83bf06c5ac)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/vmwgfx: Don't overwrite KMS surface dirty tracker [+ + +]
Author: Ian Forbes <[email protected]>
Date:   Mon Mar 2 14:03:30 2026 -0600

    drm/vmwgfx: Don't overwrite KMS surface dirty tracker
    
    [ Upstream commit c6cb77c474a32265e21c4871c7992468bf5e7638 ]
    
    We were overwriting the surface's dirty tracker here causing a memory leak.
    
    Reported-by: Mika Penttilä <[email protected]>
    Closes: https://lore.kernel.org/dri-devel/[email protected]/
    Fixes: 965544150d1c ("drm/vmwgfx: Refactor cursor handling")
    Signed-off-by: Ian Forbes <[email protected]>
    Reviewed-by: Maaz Mombasawala <[email protected]>
    Signed-off-by: Zack Rusin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/xe/guc: Ensure CT state transitions via STOP before DISABLED [+ + +]
Author: Zhanjun Dong <[email protected]>
Date:   Tue Mar 10 18:50:37 2026 -0400

    drm/xe/guc: Ensure CT state transitions via STOP before DISABLED
    
    commit 7838dd8367419e9fc43b79c038321cb3c04de2a2 upstream.
    
    The GuC CT state transition requires moving to the STOP state before
    entering the DISABLED state. Update the driver teardown sequence to make
    the proper state machine transitions.
    
    Fixes: ee4b32220a6b ("drm/xe/guc: Add devm release action to safely tear down CT")
    Cc: [email protected]
    Signed-off-by: Zhanjun Dong <[email protected]>
    Reviewed-by: Matthew Brost <[email protected]>
    Signed-off-by: Matthew Brost <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit dace8cb0032f57ea67c87b3b92ad73c89dd2db44)
    Signed-off-by: Thomas Hellström <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/xe/guc: Fail immediately on GuC load error [+ + +]
Author: Daniele Ceraolo Spurio <[email protected]>
Date:   Mon Mar 2 16:17:33 2026 -0800

    drm/xe/guc: Fail immediately on GuC load error
    
    [ Upstream commit 9b72283ec9b8685acdb3467de8fbc3352fdb70bb ]
    
    By using the same variable for both the return of poll_timeout_us and
    the return of the polled function guc_wait_ucode, the return value of
    the latter is overwritten and lost after exiting the polling loop. Since
    guc_wait_ucode returns -1 on GuC load failure, we lose that information
    and always continue as if the GuC had been loaded correctly.
    
    This is fixed by simply using 2 separate variables.
    
    Fixes: a4916b4da448 ("drm/xe/guc: Refactor GuC load to use poll_timeout_us()")
    Signed-off-by: Daniele Ceraolo Spurio <[email protected]>
    Reviewed-by: Matthew Brost <[email protected]>
    Signed-off-by: Vinay Belgaumkar <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit c85ec5c5753a46b5c2aea1292536487be9470ffe)
    Signed-off-by: Thomas Hellström <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/xe/oa: Allow reading after disabling OA stream [+ + +]
Author: Ashutosh Dixit <[email protected]>
Date:   Thu Mar 12 22:36:30 2026 -0700

    drm/xe/oa: Allow reading after disabling OA stream
    
    commit 9be6fd9fbd2032b683e51374497768af9aaa228a upstream.
    
    Some OA data might be present in the OA buffer when OA stream is
    disabled. Allow UMD's to retrieve this data, so that all data till the
    point when OA stream is disabled can be retrieved.
    
    v2: Update tail pointer after disable (Umesh)
    
    Fixes: efb315d0a013 ("drm/xe/oa/uapi: Read file_operation")
    Cc: [email protected]
    Signed-off-by: Ashutosh Dixit <[email protected]>
    Reviewed-by: Umesh Nerlige Ramappa<[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 4ff57c5e8dbba23b5457be12f9709d5c016da16e)
    Signed-off-by: Thomas Hellström <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/xe: Always kill exec queues in xe_guc_submit_pause_abort [+ + +]
Author: Matthew Brost <[email protected]>
Date:   Tue Mar 10 18:50:33 2026 -0400

    drm/xe: Always kill exec queues in xe_guc_submit_pause_abort
    
    commit 26c638d5602e329e0b26281a74c6ec69dee12f23 upstream.
    
    xe_guc_submit_pause_abort is intended to be called after something
    disastrous occurs (e.g., VF migration fails, device wedging, or driver
    unload) and should immediately trigger the teardown of remaining
    submission state. With that, kill any remaining queues in this function.
    
    Fixes: 7c4b7e34c83b ("drm/xe/vf: Abort VF post migration recovery on failure")
    Cc: [email protected]
    Signed-off-by: Zhanjun Dong <[email protected]>
    Reviewed-by: Stuart Summers <[email protected]>
    Signed-off-by: Matthew Brost <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 78f3bf00be4f15daead02ba32d4737129419c902)
    Signed-off-by: Thomas Hellström <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/xe: Fix memory leak in xe_vm_madvise_ioctl [+ + +]
Author: Varun Gupta <[email protected]>
Date:   Wed Mar 18 16:41:41 2026 -0400

    drm/xe: Fix memory leak in xe_vm_madvise_ioctl
    
    [ Upstream commit 0cfe9c4838f1147713f6b5c02094cd4dc0c598fa ]
    
    When check_bo_args_are_sane() validation fails, jump to the new
    free_vmas cleanup label to properly free the allocated resources.
    This ensures proper cleanup in this error path.
    
    Fixes: 293032eec4ba ("drm/xe/bo: Update atomic_access attribute on madvise")
    Cc: [email protected] # v6.18+
    Reviewed-by: Shuicheng Lin <[email protected]>
    Signed-off-by: Varun Gupta <[email protected]>
    Reviewed-by: Matthew Brost <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Tejas Upadhyay <[email protected]>
    (cherry picked from commit 29bd06faf727a4b76663e4be0f7d770e2d2a7965)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    [ changed old goto target from `madv_fini` to `unlock_vm` ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/xe: Fix missing runtime PM reference in ccs_mode_store [+ + +]
Author: Sanjay Yadav <[email protected]>
Date:   Fri Mar 13 12:46:09 2026 +0530

    drm/xe: Fix missing runtime PM reference in ccs_mode_store
    
    commit 65d046b2d8e0d6d855379a981869005fd6b6a41b upstream.
    
    ccs_mode_store() calls xe_gt_reset() which internally invokes
    xe_pm_runtime_get_noresume(). That function requires the caller
    to already hold an outer runtime PM reference and warns if none
    is held:
    
      [46.891177] xe 0000:03:00.0: [drm] Missing outer runtime PM protection
      [46.891178] WARNING: drivers/gpu/drm/xe/xe_pm.c:885 at
      xe_pm_runtime_get_noresume+0x8b/0xc0
    
    Fix this by protecting xe_gt_reset() with the scope-based
    guard(xe_pm_runtime)(xe), which is the preferred form when
    the reference lifetime matches a single scope.
    
    v2:
    - Use scope-based guard(xe_pm_runtime)(xe) (Shuicheng)
    - Update commit message accordingly
    
    Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/7593
    Fixes: 480b358e7d8e ("drm/xe: Do not wake device during a GT reset")
    Cc: <[email protected]> # v6.19+
    Cc: Thomas Hellström <[email protected]>
    Cc: Matthew Brost <[email protected]>
    Cc: Rodrigo Vivi <[email protected]>
    Cc: Shuicheng Lin <[email protected]>
    Suggested-by: Matthew Auld <[email protected]>
    Signed-off-by: Sanjay Yadav <[email protected]>
    Reviewed-by: Shuicheng Lin <[email protected]>
    Reviewed-by: Matthew Auld <[email protected]>
    Signed-off-by: Matthew Auld <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 7937ea733f79b3f25e802a0c8360bf7423856f36)
    Signed-off-by: Thomas Hellström <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/xe: Open-code GGTT MMIO access protection [+ + +]
Author: Matthew Brost <[email protected]>
Date:   Tue Mar 10 18:50:39 2026 -0400

    drm/xe: Open-code GGTT MMIO access protection
    
    commit 01f2557aa684e514005541e71a3d01f4cd45c170 upstream.
    
    GGTT MMIO access is currently protected by hotplug (drm_dev_enter),
    which works correctly when the driver loads successfully and is later
    unbound or unloaded. However, if driver load fails, this protection is
    insufficient because drm_dev_unplug() is never called.
    
    Additionally, devm release functions cannot guarantee that all BOs with
    GGTT mappings are destroyed before the GGTT MMIO region is removed, as
    some BOs may be freed asynchronously by worker threads.
    
    To address this, introduce an open-coded flag, protected by the GGTT
    lock, that guards GGTT MMIO access. The flag is cleared during the
    dev_fini_ggtt devm release function to ensure MMIO access is disabled
    once teardown begins.
    
    Cc: [email protected]
    Fixes: 919bb54e989c ("drm/xe: Fix missing runtime outer protection for ggtt_remove_node")
    Reviewed-by: Zhanjun Dong <[email protected]>
    Signed-off-by: Matthew Brost <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 4f3a998a173b4325c2efd90bdadc6ccd3ad9a431)
    Signed-off-by: Thomas Hellström <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug [+ + +]
Author: Maarten Lankhorst <[email protected]>
Date:   Fri Mar 13 16:17:27 2026 +0100

    drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug
    
    commit 6bee098b91417654703e17eb5c1822c6dfd0c01d upstream.
    
    When trying to do a rather aggressive test of igt's "xe_module_load
    --r reload" with a full desktop environment and game running I noticed
    a few OOPSes when dereferencing freed pointers, related to
    framebuffers and property blobs after the compositor exits.
    
    Solve this by guarding the freeing in drm_file with drm_dev_enter/exit,
    and immediately put the references from struct drm_file objects during
    drm_dev_unplug().
    
    Related warnings for framebuffers on the subtest:
    [  739.713076] ------------[ cut here ]------------
                   WARN_ON(!list_empty(&dev->mode_config.fb_list))
    [  739.713079] WARNING: drivers/gpu/drm/drm_mode_config.c:584 at drm_mode_config_cleanup+0x30b/0x320 [drm], CPU#12: xe_module_load/13145
    ....
    [  739.713328] Call Trace:
    [  739.713330]  <TASK>
    [  739.713335]  ? intel_pmdemand_destroy_state+0x11/0x20 [xe]
    [  739.713574]  ? intel_atomic_global_obj_cleanup+0xe4/0x1a0 [xe]
    [  739.713794]  intel_display_driver_remove_noirq+0x51/0xb0 [xe]
    [  739.714041]  xe_display_fini_early+0x33/0x50 [xe]
    [  739.714284]  devm_action_release+0xf/0x20
    [  739.714294]  devres_release_all+0xad/0xf0
    [  739.714301]  device_unbind_cleanup+0x12/0xa0
    [  739.714305]  device_release_driver_internal+0x1b7/0x210
    [  739.714311]  device_driver_detach+0x14/0x20
    [  739.714315]  unbind_store+0xa6/0xb0
    [  739.714319]  drv_attr_store+0x21/0x30
    [  739.714322]  sysfs_kf_write+0x48/0x60
    [  739.714328]  kernfs_fop_write_iter+0x16b/0x240
    [  739.714333]  vfs_write+0x266/0x520
    [  739.714341]  ksys_write+0x72/0xe0
    [  739.714345]  __x64_sys_write+0x19/0x20
    [  739.714347]  x64_sys_call+0xa15/0xa30
    [  739.714355]  do_syscall_64+0xd8/0xab0
    [  739.714361]  entry_SYSCALL_64_after_hwframe+0x4b/0x53
    
    and
    
    [  739.714459] ------------[ cut here ]------------
    [  739.714461] xe 0000:67:00.0: [drm] drm_WARN_ON(!list_empty(&fb->filp_head))
    [  739.714464] WARNING: drivers/gpu/drm/drm_framebuffer.c:833 at drm_framebuffer_free+0x6c/0x90 [drm], CPU#12: xe_module_load/13145
    [  739.714715] RIP: 0010:drm_framebuffer_free+0x7a/0x90 [drm]
    ...
    [  739.714869] Call Trace:
    [  739.714871]  <TASK>
    [  739.714876]  drm_mode_config_cleanup+0x26a/0x320 [drm]
    [  739.714998]  ? __drm_printfn_seq_file+0x20/0x20 [drm]
    [  739.715115]  ? drm_mode_config_cleanup+0x207/0x320 [drm]
    [  739.715235]  intel_display_driver_remove_noirq+0x51/0xb0 [xe]
    [  739.715576]  xe_display_fini_early+0x33/0x50 [xe]
    [  739.715821]  devm_action_release+0xf/0x20
    [  739.715828]  devres_release_all+0xad/0xf0
    [  739.715843]  device_unbind_cleanup+0x12/0xa0
    [  739.715850]  device_release_driver_internal+0x1b7/0x210
    [  739.715856]  device_driver_detach+0x14/0x20
    [  739.715860]  unbind_store+0xa6/0xb0
    [  739.715865]  drv_attr_store+0x21/0x30
    [  739.715868]  sysfs_kf_write+0x48/0x60
    [  739.715873]  kernfs_fop_write_iter+0x16b/0x240
    [  739.715878]  vfs_write+0x266/0x520
    [  739.715886]  ksys_write+0x72/0xe0
    [  739.715890]  __x64_sys_write+0x19/0x20
    [  739.715893]  x64_sys_call+0xa15/0xa30
    [  739.715900]  do_syscall_64+0xd8/0xab0
    [  739.715905]  entry_SYSCALL_64_after_hwframe+0x4b/0x53
    
    and then finally file close blows up:
    
    [  743.186530] Oops: general protection fault, probably for non-canonical address 0xdead000000000122: 0000 [#1] SMP
    [  743.186535] CPU: 3 UID: 1000 PID: 3453 Comm: kwin_wayland Tainted: G        W           7.0.0-rc1-valkyria+ #110 PREEMPT_{RT,(lazy)}
    [  743.186537] Tainted: [W]=WARN
    [  743.186538] Hardware name: Gigabyte Technology Co., Ltd. X299 AORUS Gaming 3/X299 AORUS Gaming 3-CF, BIOS F8n 12/06/2021
    [  743.186539] RIP: 0010:drm_framebuffer_cleanup+0x55/0xc0 [drm]
    [  743.186588] Code: d8 72 73 0f b6 42 05 ff c3 39 c3 72 e8 49 8d bd 50 07 00 00 31 f6 e8 3a 80 d3 e1 49 8b 44 24 10 49 8d 7c 24 08 49 8b 54 24 08 <48> 3b 38 0f 85 95 7f 02 00 48 3b 7a 08 0f 85 8b 7f 02 00 48 89 42
    [  743.186589] RSP: 0018:ffffc900085e3cf8 EFLAGS: 00010202
    [  743.186591] RAX: dead000000000122 RBX: 0000000000000001 RCX: ffffffff8217ed03
    [  743.186592] RDX: dead000000000100 RSI: 0000000000000000 RDI: ffff88814675ba08
    [  743.186593] RBP: ffffc900085e3d10 R08: 0000000000000000 R09: 0000000000000000
    [  743.186593] R10: 0000000000000000 R11: 0000000000000000 R12: ffff88814675ba00
    [  743.186594] R13: ffff88810d778000 R14: ffff888119f6dca0 R15: ffff88810c660bb0
    [  743.186595] FS:  00007ff377d21280(0000) GS:ffff888cec3f8000(0000) knlGS:0000000000000000
    [  743.186596] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  743.186596] CR2: 000055690b55e000 CR3: 0000000113586003 CR4: 00000000003706f0
    [  743.186597] Call Trace:
    [  743.186598]  <TASK>
    [  743.186603]  intel_user_framebuffer_destroy+0x12/0x90 [xe]
    [  743.186722]  drm_framebuffer_free+0x3a/0x90 [drm]
    [  743.186750]  ? trace_hardirqs_on+0x5f/0x120
    [  743.186754]  drm_mode_object_put+0x51/0x70 [drm]
    [  743.186786]  drm_fb_release+0x105/0x190 [drm]
    [  743.186812]  ? rt_mutex_slowunlock+0x3aa/0x410
    [  743.186817]  ? rt_spin_lock+0xea/0x1b0
    [  743.186819]  drm_file_free+0x1e0/0x2c0 [drm]
    [  743.186843]  drm_release_noglobal+0x91/0xf0 [drm]
    [  743.186865]  __fput+0x100/0x2e0
    [  743.186869]  fput_close_sync+0x40/0xa0
    [  743.186870]  __x64_sys_close+0x3e/0x80
    [  743.186873]  x64_sys_call+0xa07/0xa30
    [  743.186879]  do_syscall_64+0xd8/0xab0
    [  743.186881]  entry_SYSCALL_64_after_hwframe+0x4b/0x53
    [  743.186882] RIP: 0033:0x7ff37e567732
    [  743.186884] Code: 08 0f 85 a1 38 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 55 bf 01 00
    [  743.186885] RSP: 002b:00007ffc818169a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
    [  743.186886] RAX: ffffffffffffffda RBX: 00007ffc81816a30 RCX: 00007ff37e567732
    [  743.186887] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000012
    [  743.186888] RBP: 00007ffc818169d0 R08: 0000000000000000 R09: 0000000000000000
    [  743.186889] R10: 0000000000000000 R11: 0000000000000246 R12: 000055d60a7996e0
    [  743.186889] R13: 00007ffc81816a90 R14: 00007ffc81816a90 R15: 000055d60a782a30
    [  743.186892]  </TASK>
    [  743.186893] Modules linked in: rfcomm snd_hrtimer xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp xt_addrtype nft_compat x_tables nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables overlay cfg80211 bnep mtd_intel_dg snd_hda_codec_intelhdmi mtd snd_hda_codec_hdmi nls_utf8 mxm_wmi intel_wmi_thunderbolt gigabyte_wmi wmi_bmof xe drm_gpuvm drm_gpusvm_helper i2c_algo_bit drm_buddy drm_ttm_helper ttm video drm_suballoc_helper gpu_sched drm_client_lib drm_exec drm_display_helper cec drm_kunit_helpers drm_kms_helper kunit x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_alc882 snd_hda_codec_realtek_lib snd_hda_codec_generic snd_hda_intel snd_soc_avs snd_soc_hda_codec snd_hda_ext_core snd_hda_codec snd_hwdep snd_hda_core snd_intel_dspcfg snd_soc_core snd_compress ac97_bus snd_pcm snd_seq snd_seq_device snd_timer i2c_i801 i2c_mux snd i2c_smbus btusb btrtl btbcm btmtk btintel bluetooth ecdh_generic rfkill ecc mei_me mei ioatdma dca wmi nfsd drm i2c_dev fuse nfnetlink
    [  743.186938] ---[ end trace 0000000000000000 ]---
    
    And for property blobs:
    
    void drm_mode_config_cleanup(struct drm_device *dev)
    {
    ...
            list_for_each_entry_safe(blob, bt, &dev->mode_config.property_blob_list,
                                     head_global) {
                    drm_property_blob_put(blob);
            }
    
    Resulting in:
    
    [  371.072940] BUG: unable to handle page fault for address: 000001ffffffffff
    [  371.072944] #PF: supervisor read access in kernel mode
    [  371.072945] #PF: error_code(0x0000) - not-present page
    [  371.072947] PGD 0 P4D 0
    [  371.072950] Oops: Oops: 0000 [#1] SMP
    [  371.072953] CPU: 0 UID: 1000 PID: 3693 Comm: kwin_wayland Not tainted 7.0.0-rc1-valkyria+ #111 PREEMPT_{RT,(lazy)}
    [  371.072956] Hardware name: Gigabyte Technology Co., Ltd. X299 AORUS Gaming 3/X299 AORUS Gaming 3-CF, BIOS F8n 12/06/2021
    [  371.072957] RIP: 0010:drm_property_destroy_user_blobs+0x3b/0x90 [drm]
    [  371.073019] Code: 00 00 48 83 ec 10 48 8b 86 30 01 00 00 48 39 c3 74 59 48 89 c2 48 8d 48 c8 48 8b 00 4c 8d 60 c8 eb 04 4c 8d 60 c8 48 8b 71 40 <48> 39 16 0f 85 39 32 01 00 48 3b 50 08 0f 85 2f 32 01 00 48 89 70
    [  371.073021] RSP: 0018:ffffc90006a73de8 EFLAGS: 00010293
    [  371.073022] RAX: 000001ffffffffff RBX: ffff888118a1a930 RCX: ffff8881b92355c0
    [  371.073024] RDX: ffff8881b92355f8 RSI: 000001ffffffffff RDI: ffff888118be4000
    [  371.073025] RBP: ffffc90006a73e08 R08: ffff8881009b7300 R09: ffff888cecc5b000
    [  371.073026] R10: ffffc90006a73e90 R11: 0000000000000002 R12: 000001ffffffffc7
    [  371.073027] R13: ffff888118a1a980 R14: ffff88810b366d20 R15: ffff888118a1a970
    [  371.073028] FS:  00007f1faccbb280(0000) GS:ffff888cec2db000(0000) knlGS:0000000000000000
    [  371.073029] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  371.073030] CR2: 000001ffffffffff CR3: 000000010655c001 CR4: 00000000003706f0
    [  371.073031] Call Trace:
    [  371.073033]  <TASK>
    [  371.073036]  drm_file_free+0x1df/0x2a0 [drm]
    [  371.073077]  drm_release_noglobal+0x7a/0xe0 [drm]
    [  371.073113]  __fput+0xe2/0x2b0
    [  371.073118]  fput_close_sync+0x40/0xa0
    [  371.073119]  __x64_sys_close+0x3e/0x80
    [  371.073122]  x64_sys_call+0xa07/0xa30
    [  371.073126]  do_syscall_64+0xc0/0x840
    [  371.073130]  entry_SYSCALL_64_after_hwframe+0x4b/0x53
    [  371.073132] RIP: 0033:0x7f1fb3501732
    [  371.073133] Code: 08 0f 85 a1 38 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 55 bf 01 00
    [  371.073135] RSP: 002b:00007ffe8e6f0278 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
    [  371.073136] RAX: ffffffffffffffda RBX: 00007ffe8e6f0300 RCX: 00007f1fb3501732
    [  371.073137] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000012
    [  371.073138] RBP: 00007ffe8e6f02a0 R08: 0000000000000000 R09: 0000000000000000
    [  371.073139] R10: 0000000000000000 R11: 0000000000000246 R12: 00005585ba46eea0
    [  371.073140] R13: 00007ffe8e6f0360 R14: 00007ffe8e6f0360 R15: 00005585ba458a30
    [  371.073143]  </TASK>
    [  371.073144] Modules linked in: rfcomm snd_hrtimer xt_addrtype xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp nft_compat x_tables nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables overlay cfg80211 bnep snd_hda_codec_intelhdmi snd_hda_codec_hdmi mtd_intel_dg mtd nls_utf8 wmi_bmof mxm_wmi gigabyte_wmi intel_wmi_thunderbolt xe drm_gpuvm drm_gpusvm_helper i2c_algo_bit drm_buddy drm_ttm_helper ttm video drm_suballoc_helper gpu_sched drm_client_lib drm_exec drm_display_helper cec drm_kunit_helpers drm_kms_helper kunit x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_alc882 snd_hda_codec_realtek_lib snd_hda_codec_generic snd_hda_intel snd_soc_avs snd_soc_hda_codec snd_hda_ext_core snd_hda_codec snd_hwdep snd_hda_core snd_intel_dspcfg snd_soc_core snd_compress ac97_bus snd_pcm snd_seq snd_seq_device snd_timer i2c_i801 btusb i2c_mux i2c_smbus btrtl snd btbcm btmtk btintel bluetooth ecdh_generic rfkill ecc mei_me mei ioatdma dca wmi nfsd drm i2c_dev fuse nfnetlink
    [  371.073198] CR2: 000001ffffffffff
    [  371.073199] ---[ end trace 0000000000000000 ]---
    
    Add a guard around file close, and ensure the warnings from drm_mode_config
    do not trigger. Fix those by allowing an open reference to the file descriptor
    and cleaning up the file linked list entry in drm_mode_config_cleanup().
    
    Cc: <[email protected]> # v4.18+
    Fixes: bee330f3d672 ("drm: Use srcu to protect drm_device.unplugged")
    Cc: Thomas Hellström <[email protected]>
    Reviewed-by: Thomas Hellström <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Maarten Lankhorst <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
firmware: arm_ffa: Remove vm_id argument in ffa_rxtx_unmap() [+ + +]
Author: Yeoreum Yun <[email protected]>
Date:   Wed Mar 4 12:09:53 2026 +0000

    firmware: arm_ffa: Remove vm_id argument in ffa_rxtx_unmap()
    
    [ Upstream commit a4e8473b775160f3ce978f621cf8dea2c7250433 ]
    
    According to the FF-A specification (DEN0077, v1.1, §13.7), when
    FFA_RXTX_UNMAP is invoked from any instance other than non-secure
    physical, the w1 register must be zero (MBZ). If a non-zero value is
    supplied in this context, the SPMC must return FFA_INVALID_PARAMETER.
    
    The Arm FF-A driver operates exclusively as a guest or non-secure
    physical instance where the partition ID is always zero and is not
    invoked from a hypervisor context where w1 carries a VM ID. In this
    execution model, the partition ID observed by the driver is always zero,
    and passing a VM ID is unnecessary and potentially invalid.
    
    Remove the vm_id parameter from ffa_rxtx_unmap() and ensure that the
    SMC call is issued with w1 implicitly zeroed, as required by the
    specification. This prevents invalid parameter errors and aligns the
    implementation with the defined FF-A ABI behavior.
    
    Fixes: 3bbfe9871005 ("firmware: arm_ffa: Add initial Arm FFA driver support")
    Signed-off-by: Yeoreum Yun <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Sudeep Holla <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

firmware: arm_scmi: Fix NULL dereference on notify error path [+ + +]
Author: Cristian Marussi <[email protected]>
Date:   Thu Mar 5 13:10:11 2026 +0000

    firmware: arm_scmi: Fix NULL dereference on notify error path
    
    [ Upstream commit 555317d6100164748f7d09f80142739bd29f0cda ]
    
    Since commit b5daf93b809d1 ("firmware: arm_scmi: Avoid notifier
    registration for unsupported events") the call chains leading to the helper
    __scmi_event_handler_get_ops expect an ERR_PTR to be returned on failure to
    get an handler for the requested event key, while the current helper can
    still return a NULL when no handler could be found or created.
    
    Fix by forcing an ERR_PTR return value when the handler reference is NULL.
    
    Fixes: b5daf93b809d1 ("firmware: arm_scmi: Avoid notifier registration for unsupported events")
    Signed-off-by: Cristian Marussi <[email protected]>
    Reviewed-by: Dan Carpenter <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Sudeep Holla <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

firmware: arm_scpi: Fix device_node reference leak in probe path [+ + +]
Author: Felix Gu <[email protected]>
Date:   Wed Jan 21 21:08:19 2026 +0800

    firmware: arm_scpi: Fix device_node reference leak in probe path
    
    [ Upstream commit 879c001afbac3df94160334fe5117c0c83b2cf48 ]
    
    A device_node reference obtained from the device tree is not released
    on all error paths in the arm_scpi probe path. Specifically, a node
    returned by of_parse_phandle() could be leaked when the probe failed
    after the node was acquired. The probe function returns early and
    the shmem reference is not released.
    
    Use __free(device_node) scope-based cleanup to automatically release
    the reference when the variable goes out of scope.
    
    Fixes: ed7ecb883901 ("firmware: arm_scpi: Add compatibility checks for shmem node")
    Signed-off-by: Felix Gu <[email protected]>
    Message-Id: <[email protected]>
    Signed-off-by: Sudeep Holla <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

firmware: stratix10-svc: Add Multi SVC clients support [+ + +]
Author: Muhammad Amirul Asyraf Mohamad Jamian <[email protected]>
Date:   Thu Mar 19 09:18:09 2026 -0400

    firmware: stratix10-svc: Add Multi SVC clients support
    
    [ Upstream commit 22fd7f7fed2ae3702f90d1985c326354e86b9c75 ]
    
    In the current implementation, SVC client drivers such as socfpga-hwmon,
    intel_fcs, stratix10-soc, stratix10-rsu each send an SMC command that
    triggers a single thread in the stratix10-svc driver. Upon receiving a
    callback, the initiating client driver sends a stratix10-svc-done signal,
    terminating the thread without waiting for other pending SMC commands to
    complete. This leads to a timeout issue in the firmware SVC mailbox service
    when multiple client drivers send SMC commands concurrently.
    
    To resolve this issue, a dedicated thread is now created per channel. The
    stratix10-svc driver will support up to the number of channels defined by
    SVC_NUM_CHANNEL. Thread synchronization is handled using a mutex to prevent
    simultaneous issuance of SMC commands by multiple threads.
    
    SVC_NUM_DATA_IN_FIFO is reduced from 32 to 8, since each channel now has
    its own dedicated FIFO and the SDM processes commands one at a time.
    8 entries per channel is sufficient while keeping the total aggregate
    capacity the same (4 channels x 8 = 32 entries).
    
    Additionally, a thread task is now validated before invoking kthread_stop
    when the user aborts, ensuring safe termination.
    
    Timeout values have also been adjusted to accommodate the increased load
    from concurrent client driver activity.
    
    Fixes: 7ca5ce896524 ("firmware: add Intel Stratix10 service layer driver")
    Cc: [email protected]
    Signed-off-by: Ang Tien Sung <[email protected]>
    Signed-off-by: Fong, Yan Kei <[email protected]>
    Signed-off-by: Muhammad Amirul Asyraf Mohamad Jamian <[email protected]>
    Link: https://lore.kernel.org/all/20260305093151.2678-1-muhammad.amirul.asyraf.mohamad.jamian@altera.com
    Signed-off-by: Dinh Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

firmware: stratix10-svc: Delete some stray tabs [+ + +]
Author: Dan Carpenter <[email protected]>
Date:   Thu Mar 19 09:18:08 2026 -0400

    firmware: stratix10-svc: Delete some stray tabs
    
    [ Upstream commit 9e51d1da5b245c9bf97fc49b06cca7e901c0fe94 ]
    
    These lines are indented one tab too far.  Delete the extra tabs
    for readability.
    
    Signed-off-by: Dan Carpenter <[email protected]>
    Signed-off-by: Dinh Nguyen <[email protected]>
    Stable-dep-of: 22fd7f7fed2a ("firmware: stratix10-svc: Add Multi SVC clients support")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
fs/tests: exec: Remove bad test vector [+ + +]
Author: Kees Cook <[email protected]>
Date:   Wed Mar 18 11:36:29 2026 -0700

    fs/tests: exec: Remove bad test vector
    
    [ Upstream commit c4192754e836e0ffed95833509b6ada975b74418 ]
    
    Drop an unusable test in the bprm stack limits.
    
    Reported-by: Guenter Roeck <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]
    Fixes: 60371f43e56b ("exec: Add KUnit test for bprm_stack_limits()")
    Signed-off-by: Kees Cook <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
HID: bpf: prevent buffer overflow in hid_hw_request [+ + +]
Author: Benjamin Tissoires <[email protected]>
Date:   Fri Mar 13 08:40:25 2026 +0100

    HID: bpf: prevent buffer overflow in hid_hw_request
    
    commit 2b658c1c442ec1cd9eec5ead98d68662c40fe645 upstream.
    
    right now the returned value is considered to be always valid. However,
    when playing with HID-BPF, the return value can be arbitrary big,
    because it's the return value of dispatch_hid_bpf_raw_requests(), which
    calls the struct_ops and we have no guarantees that the value makes
    sense.
    
    Fixes: 8bd0488b5ea5 ("HID: bpf: add HID-BPF hooks for hid_hw_raw_requests")
    Cc: [email protected]
    Acked-by: Jiri Kosina <[email protected]>
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
hwmon: (max6639) Fix pulses-per-revolution implementation [+ + +]
Author: Guenter Roeck <[email protected]>
Date:   Thu Mar 19 21:31:22 2026 -0700

    hwmon: (max6639) Fix pulses-per-revolution implementation
    
    [ Upstream commit e7bae9a7a5e1251ab414291f4e9304d702bb9221 ]
    
    The valid range for the pulses-per-revolution devicetree property is
    1..4. The current code checks for a range of 1..5. Fix it.
    
    Declare the variable used to retrieve pulses per revolution from
    devicetree as u32 (unsigned) to match the of_property_read_u32() API.
    
    The current code uses a postfix decrement when writing the pulses per
    resolution into the chip. This has no effect since the value is evaluated
    before it is decremented. Fix it by decrementing before evaluating the
    value.
    
    Fixes: 7506ebcd662b ("hwmon: (max6639) : Configure based on DT property")
    Cc: Naresh Solanki <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

hwmon: (pmbus/ina233) Add error check for pmbus_read_word_data() return value [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Tue Mar 17 17:46:31 2026 +0000

    hwmon: (pmbus/ina233) Add error check for pmbus_read_word_data() return value
    
    commit 32f59301b9898c0ab5e72908556d553e2d481945 upstream.
    
    ina233_read_word_data() uses the return value of pmbus_read_word_data()
    directly in a DIV_ROUND_CLOSEST() computation without first checking for
    errors. If the underlying I2C transaction fails, a negative error code is
    used in the arithmetic, producing a garbage sensor value instead of
    propagating the error.
    
    Add the missing error check before using the return value.
    
    Fixes: b64b6cb163f16 ("hwmon: Add driver for TI INA233 Current and Power Monitor")
    Cc: [email protected]
    Signed-off-by: Sanman Pradhan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

hwmon: (pmbus/isl68137) Fix unchecked return value and use sysfs_emit() [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Wed Mar 18 19:40:19 2026 +0000

    hwmon: (pmbus/isl68137) Fix unchecked return value and use sysfs_emit()
    
    commit 86259558e422b250aa6aa57163a6d759074573f5 upstream.
    
    isl68137_avs_enable_show_page() uses the return value of
    pmbus_read_byte_data() without checking for errors. If the I2C transaction
    fails, a negative error code is passed through bitwise operations,
    producing incorrect output.
    
    Add an error check to propagate the return value if it is negative.
    Additionally, modernize the callback by replacing sprintf()
    with sysfs_emit().
    
    Fixes: 038a9c3d1e424 ("hwmon: (pmbus/isl68137) Add driver for Intersil ISL68137 PWM Controller")
    Cc: [email protected]
    Signed-off-by: Sanman Pradhan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

hwmon: (pmbus/mp2869) Check pmbus_read_byte_data() before using its return value [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Tue Mar 17 17:37:41 2026 +0000

    hwmon: (pmbus/mp2869) Check pmbus_read_byte_data() before using its return value
    
    commit c6f45ed26b6eb4766db06f21ff28a97ed485bcbb upstream.
    
    In mp2869_read_byte_data() and mp2869_read_word_data(), the return value
    of pmbus_read_byte_data() for PMBUS_STATUS_MFR_SPECIFIC is used directly
    inside FIELD_GET() macro arguments without error checking. If the I2C
    transaction fails, a negative error code is passed to FIELD_GET() and
    FIELD_PREP(), silently corrupting the status register bits being
    constructed.
    
    Extract the nested pmbus_read_byte_data() calls into a separate variable
    and check for errors before use. This also eliminates a redundant duplicate
    read of the same register in the PMBUS_STATUS_TEMPERATURE case.
    
    Fixes: a3a2923aaf7f2 ("hwmon: add MP2869,MP29608,MP29612 and MP29816 series driver")
    Cc: [email protected]
    Signed-off-by: Sanman Pradhan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

hwmon: (pmbus/mp2975) Add error check for pmbus_read_word_data() return value [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Tue Mar 17 17:37:17 2026 +0000

    hwmon: (pmbus/mp2975) Add error check for pmbus_read_word_data() return value
    
    commit 19d4b9c8a136704d5f2544e7ac550f27918a5004 upstream.
    
    mp2973_read_word_data() XORs the return value of pmbus_read_word_data()
    with PB_STATUS_POWER_GOOD_N without first checking for errors. If the I2C
    transaction fails, a negative error code is XORed with the constant,
    producing a corrupted value that is returned as valid status data instead
    of propagating the error.
    
    Add the missing error check before modifying the return value.
    
    Fixes: acda945afb465 ("hwmon: (pmbus/mp2975) Fix PGOOD in READ_STATUS_WORD")
    Cc: [email protected]
    Signed-off-by: Sanman Pradhan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
i2c: cp2615: fix serial string NULL-deref at probe [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Mon Mar 9 08:50:16 2026 +0100

    i2c: cp2615: fix serial string NULL-deref at probe
    
    commit aa79f996eb41e95aed85a1bd7f56bcd6a3842008 upstream.
    
    The cp2615 driver uses the USB device serial string as the i2c adapter
    name but does not make sure that the string exists.
    
    Verify that the device has a serial number before accessing it to avoid
    triggering a NULL-pointer dereference (e.g. with malicious devices).
    
    Fixes: 4a7695429ead ("i2c: cp2615: add i2c driver for Silicon Labs' CP2615 Digital Audio Bridge")
    Cc: [email protected]      # 5.13
    Cc: Bence Csókás <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Reviewed-by: Bence Csókás <[email protected]>
    Signed-off-by: Andi Shyti <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

i2c: fsi: Fix a potential leak in fsi_i2c_probe() [+ + +]
Author: Christophe JAILLET <[email protected]>
Date:   Sun Mar 1 17:21:01 2026 +0100

    i2c: fsi: Fix a potential leak in fsi_i2c_probe()
    
    commit be627abcc0d5dbd5882873bd85fbc18aa3d189ed upstream.
    
    In the commit in Fixes:, when the code has been updated to use an explicit
    for loop, instead of for_each_available_child_of_node(), the assumption
    that a reference to a device_node structure would be released at each
    iteration has been broken.
    
    Now, an explicit of_node_put() is needed to release the reference.
    
    Fixes: 095561f476ab ("i2c: fsi: Create busses for all ports")
    Signed-off-by: Christophe JAILLET <[email protected]>
    Cc: <[email protected]> # v5.3+
    Signed-off-by: Andi Shyti <[email protected]>
    Link: https://lore.kernel.org/r/fd805c39f8de51edf303856103d782138a1633c8.1772382022.git.christophe.jaillet@wanadoo.fr
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

i2c: pxa: defer reset on Armada 3700 when recovery is used [+ + +]
Author: Gabor Juhos <[email protected]>
Date:   Thu Feb 26 14:11:27 2026 +0100

    i2c: pxa: defer reset on Armada 3700 when recovery is used
    
    commit 78a6ee14f8b9e1c8f7c77612122444f3be8dc8cc upstream.
    
    The I2C communication is completely broken on the Armada 3700 platform
    since commit 0b01392c18b9 ("i2c: pxa: move to generic GPIO recovery").
    
    For example, on the Methode uDPU board, probing of the two onboard
    temperature sensors fails ...
    
      [    7.271713] i2c i2c-0: using pinctrl states for GPIO recovery
      [    7.277503] i2c i2c-0:  PXA I2C adapter
      [    7.282199] i2c i2c-1: using pinctrl states for GPIO recovery
      [    7.288241] i2c i2c-1:  PXA I2C adapter
      [    7.292947] sfp sfp-eth1: Host maximum power 3.0W
      [    7.299614] sfp sfp-eth0: Host maximum power 3.0W
      [    7.308178] lm75 1-0048: supply vs not found, using dummy regulator
      [   32.489631] lm75 1-0048: probe with driver lm75 failed with error -121
      [   32.496833] lm75 1-0049: supply vs not found, using dummy regulator
      [   82.890614] lm75 1-0049: probe with driver lm75 failed with error -121
    
    ... and accessing the plugged-in SFP modules also does not work:
    
      [  511.298537] sfp sfp-eth1: please wait, module slow to respond
      [  536.488530] sfp sfp-eth0: please wait, module slow to respond
      ...
      [ 1065.688536] sfp sfp-eth1: failed to read EEPROM: -EREMOTEIO
      [ 1090.888532] sfp sfp-eth0: failed to read EEPROM: -EREMOTEIO
    
    After a discussion [1], there was an attempt to fix the problem by
    reverting the offending change by commit 7b211c767121 ("Revert "i2c:
    pxa: move to generic GPIO recovery""), but that only helped to fix
    the issue in the 6.1.y stable tree. The reason behind the partial succes
    is that there was another change in commit 20cb3fce4d60 ("i2c: Set i2c
    pinctrl recovery info from it's device pinctrl") in the 6.3-rc1 cycle
    which broke things further.
    
    The cause of the problem is the same in case of both offending commits
    mentioned above. Namely, the I2C core code changes the pinctrl state to
    GPIO while running the recovery initialization code. Although the PXA
    specific initialization also does this, but the key difference is that
    it happens before the controller is getting enabled in i2c_pxa_reset(),
    whereas in the case of the generic initialization it happens after that.
    
    Change the code to reset the controller only before the first transfer
    instead of before registering the controller. This ensures that the
    controller is not enabled at the time when the generic recovery code
    performs the pinctrl state changes, thus avoids the problem described
    above.
    
    As the result this change restores the original behaviour, which in
    turn makes the I2C communication to work again as it can be seen from
    the following log:
    
      [    7.363250] i2c i2c-0: using pinctrl states for GPIO recovery
      [    7.369041] i2c i2c-0:  PXA I2C adapter
      [    7.373673] i2c i2c-1: using pinctrl states for GPIO recovery
      [    7.379742] i2c i2c-1:  PXA I2C adapter
      [    7.384506] sfp sfp-eth1: Host maximum power 3.0W
      [    7.393013] sfp sfp-eth0: Host maximum power 3.0W
      [    7.399266] lm75 1-0048: supply vs not found, using dummy regulator
      [    7.407257] hwmon hwmon0: temp1_input not attached to any thermal zone
      [    7.413863] lm75 1-0048: hwmon0: sensor 'tmp75c'
      [    7.418746] lm75 1-0049: supply vs not found, using dummy regulator
      [    7.426371] hwmon hwmon1: temp1_input not attached to any thermal zone
      [    7.432972] lm75 1-0049: hwmon1: sensor 'tmp75c'
      [    7.755092] sfp sfp-eth1: module MENTECHOPTO      POS22-LDCC-KR    rev 1.0  sn MNC208U90009     dc 200828
      [    7.764997] mvneta d0040000.ethernet eth1: unsupported SFP module: no common interface modes
      [    7.785362] sfp sfp-eth0: module Mikrotik         S-RJ01           rev 1.0  sn 61B103C55C58     dc 201022
      [    7.803426] hwmon hwmon2: temp1_input not attached to any thermal zone
    
    Link: https://lore.kernel.org/r/[email protected] #1
    
    Cc: [email protected] # 6.3+
    Fixes: 20cb3fce4d60 ("i2c: Set i2c pinctrl recovery info from it's device pinctrl")
    Signed-off-by: Gabor Juhos <[email protected]>
    Tested-by: Robert Marko <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Andi Shyti <[email protected]>
    Link: https://lore.kernel.org/r/20260226-i2c-pxa-fix-i2c-communication-v4-1-797a091dae87@gmail.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
iavf: fix VLAN filter lost on add/delete race [+ + +]
Author: Petr Oros <[email protected]>
Date:   Wed Feb 25 11:01:37 2026 +0100

    iavf: fix VLAN filter lost on add/delete race
    
    [ Upstream commit fc9c69be594756b81b54c6bc40803fa6052f35ae ]
    
    When iavf_add_vlan() finds an existing filter in IAVF_VLAN_REMOVE
    state, it transitions the filter to IAVF_VLAN_ACTIVE assuming the
    pending delete can simply be cancelled. However, there is no guarantee
    that iavf_del_vlans() has not already processed the delete AQ request
    and removed the filter from the PF. In that case the filter remains in
    the driver's list as IAVF_VLAN_ACTIVE but is no longer programmed on
    the NIC. Since iavf_add_vlans() only picks up filters in
    IAVF_VLAN_ADD state, the filter is never re-added, and spoof checking
    drops all traffic for that VLAN.
    
      CPU0                       CPU1                     Workqueue
      ----                       ----                     ---------
      iavf_del_vlan(vlan 100)
        f->state = REMOVE
        schedule AQ_DEL_VLAN
                                 iavf_add_vlan(vlan 100)
                                   f->state = ACTIVE
                                                          iavf_del_vlans()
                                                            f is ACTIVE, skip
                                                          iavf_add_vlans()
                                                            f is ACTIVE, skip
    
      Filter is ACTIVE in driver but absent from NIC.
    
    Transition to IAVF_VLAN_ADD instead and schedule
    IAVF_FLAG_AQ_ADD_VLAN_FILTER so iavf_add_vlans() re-programs the
    filter.  A duplicate add is idempotent on the PF.
    
    Fixes: 0c0da0e95105 ("iavf: refactor VLAN filter states")
    Signed-off-by: Petr Oros <[email protected]>
    Tested-by: Rafal Romanowski <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
icmp: fix NULL pointer dereference in icmp_tag_validation() [+ + +]
Author: Weiming Shi <[email protected]>
Date:   Wed Mar 18 21:06:01 2026 +0800

    icmp: fix NULL pointer dereference in icmp_tag_validation()
    
    [ Upstream commit 614aefe56af8e13331e50220c936fc0689cf5675 ]
    
    icmp_tag_validation() unconditionally dereferences the result of
    rcu_dereference(inet_protos[proto]) without checking for NULL.
    The inet_protos[] array is sparse -- only about 15 of 256 protocol
    numbers have registered handlers. When ip_no_pmtu_disc is set to 3
    (hardened PMTU mode) and the kernel receives an ICMP Fragmentation
    Needed error with a quoted inner IP header containing an unregistered
    protocol number, the NULL dereference causes a kernel panic in
    softirq context.
    
     Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] SMP KASAN NOPTI
     KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
     RIP: 0010:icmp_unreach (net/ipv4/icmp.c:1085 net/ipv4/icmp.c:1143)
     Call Trace:
      <IRQ>
      icmp_rcv (net/ipv4/icmp.c:1527)
      ip_protocol_deliver_rcu (net/ipv4/ip_input.c:207)
      ip_local_deliver_finish (net/ipv4/ip_input.c:242)
      ip_local_deliver (net/ipv4/ip_input.c:262)
      ip_rcv (net/ipv4/ip_input.c:573)
      __netif_receive_skb_one_core (net/core/dev.c:6164)
      process_backlog (net/core/dev.c:6628)
      handle_softirqs (kernel/softirq.c:561)
      </IRQ>
    
    Add a NULL check before accessing icmp_strict_tag_validation. If the
    protocol has no registered handler, return false since it cannot
    perform strict tag validation.
    
    Fixes: 8ed1dc44d3e9 ("ipv4: introduce hardened ip_no_pmtu_disc mode")
    Reported-by: Xiang Mei <[email protected]>
    Signed-off-by: Weiming Shi <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
igc: fix missing update of skb->tail in igc_xmit_frame() [+ + +]
Author: Kohei Enju <[email protected]>
Date:   Sat Feb 14 19:46:32 2026 +0000

    igc: fix missing update of skb->tail in igc_xmit_frame()
    
    [ Upstream commit 0ffba246652faf4a36aedc66059c2f94e4c83ea5 ]
    
    igc_xmit_frame() misses updating skb->tail when the packet size is
    shorter than the minimum one.
    Use skb_put_padto() in alignment with other Intel Ethernet drivers.
    
    Fixes: 0507ef8a0372 ("igc: Add transmit and receive fastpath and interrupt handlers")
    Signed-off-by: Kohei Enju <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Tested-by: Avigail Dahan <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

igc: fix page fault in XDP TX timestamps handling [+ + +]
Author: Zdenek Bouska <[email protected]>
Date:   Wed Feb 25 10:58:29 2026 +0100

    igc: fix page fault in XDP TX timestamps handling
    
    [ Upstream commit 45b33e805bd39f615d9353a7194b2da5281332df ]
    
    If an XDP application that requested TX timestamping is shutting down
    while the link of the interface in use is still up the following kernel
    splat is reported:
    
    [  883.803618] [   T1554] BUG: unable to handle page fault for address: ffffcfb6200fd008
    ...
    [  883.803650] [   T1554] Call Trace:
    [  883.803652] [   T1554]  <TASK>
    [  883.803654] [   T1554]  igc_ptp_tx_tstamp_event+0xdf/0x160 [igc]
    [  883.803660] [   T1554]  igc_tsync_interrupt+0x2d5/0x300 [igc]
    ...
    
    During shutdown of the TX ring the xsk_meta pointers are left behind, so
    that the IRQ handler is trying to touch them.
    
    This issue is now being fixed by cleaning up the stale xsk meta data on
    TX shutdown. TX timestamps on other queues remain unaffected.
    
    Fixes: 15fd021bc427 ("igc: Add Tx hardware timestamp request for AF_XDP zero-copy packet")
    Signed-off-by: Zdenek Bouska <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Reviewed-by: Florian Bezdeka <[email protected]>
    Tested-by: Avigail Dahan <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
io_uring/kbuf: fix missing BUF_MORE for incremental buffers at EOF [+ + +]
Author: Jens Axboe <[email protected]>
Date:   Thu Mar 19 14:29:09 2026 -0600

    io_uring/kbuf: fix missing BUF_MORE for incremental buffers at EOF
    
    commit 3ecd3e03144b38a21a3b70254f1b9d2e16629b09 upstream.
    
    For a zero length transfer, io_kbuf_inc_commit() is called with !len.
    Since we never enter the while loop to consume the buffers,
    io_kbuf_inc_commit() ends up returning true, consuming the buffer. But
    if no data was consumed, by definition it cannot have consumed the
    buffer. Return false for that case.
    
    Reported-by: Martin Michaelis <[email protected]>
    Cc: [email protected]
    Fixes: ae98dbf43d75 ("io_uring/kbuf: add support for incremental buffer consumption")
    Link: https://github.com/axboe/liburing/issues/1553
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

io_uring/kbuf: propagate BUF_MORE through early buffer commit path [+ + +]
Author: Jens Axboe <[email protected]>
Date:   Thu Mar 19 14:29:20 2026 -0600

    io_uring/kbuf: propagate BUF_MORE through early buffer commit path
    
    commit 418eab7a6f3c002d8e64d6e95ec27118017019af upstream.
    
    When io_should_commit() returns true (eg for non-pollable files), buffer
    commit happens at buffer selection time and sel->buf_list is set to
    NULL. When __io_put_kbufs() generates CQE flags at completion time, it
    calls __io_put_kbuf_ring() which finds a NULL buffer_list and hence
    cannot determine whether the buffer was consumed or not. This means that
    IORING_CQE_F_BUF_MORE is never set for non-pollable input with
    incrementally consumed buffers.
    
    Likewise for io_buffers_select(), which always commits upfront and
    discards the return value of io_kbuf_commit().
    
    Add REQ_F_BUF_MORE to store the result of io_kbuf_commit() during early
    commit. Then __io_put_kbuf_ring() can check this flag and set
    IORING_F_BUF_MORE accordingy.
    
    Reported-by: Martin Michaelis <[email protected]>
    Cc: [email protected]
    Fixes: ae98dbf43d75 ("io_uring/kbuf: add support for incremental buffer consumption")
    Link: https://github.com/axboe/liburing/issues/1553
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
io_uring/poll: fix multishot recv missing EOF on wakeup race [+ + +]
Author: Jens Axboe <[email protected]>
Date:   Sun Mar 15 09:03:03 2026 -0600

    io_uring/poll: fix multishot recv missing EOF on wakeup race
    
    commit a68ed2df72131447d131531a08fe4dfcf4fa4653 upstream.
    
    When a socket send and shutdown() happen back-to-back, both fire
    wake-ups before the receiver's task_work has a chance to run. The first
    wake gets poll ownership (poll_refs=1), and the second bumps it to 2.
    When io_poll_check_events() runs, it calls io_poll_issue() which does a
    recv that reads the data and returns IOU_RETRY. The loop then drains all
    accumulated refs (atomic_sub_return(2) -> 0) and exits, even though only
    the first event was consumed. Since the shutdown is a persistent state
    change, no further wakeups will happen, and the multishot recv can hang
    forever.
    
    Check specifically for HUP in the poll loop, and ensure that another
    loop is done to check for status if more than a single poll activation
    is pending. This ensures we don't lose the shutdown event.
    
    Cc: [email protected]
    Fixes: dbc2564cfe0f ("io_uring: let fast poll support multishot")
    Reported-by: Francis Brosseau <[email protected]>
    Link: https://github.com/axboe/liburing/issues/1549
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
iommu/amd: Block identity domain when SNP enabled [+ + +]
Author: Joe Damato <[email protected]>
Date:   Mon Mar 9 16:52:33 2026 -0700

    iommu/amd: Block identity domain when SNP enabled
    
    [ Upstream commit ba17de98545d07285d15ce4fe2afe98283338fb0 ]
    
    Previously, commit 8388f7df936b ("iommu/amd: Do not support
    IOMMU_DOMAIN_IDENTITY after SNP is enabled") prevented users from
    changing the IOMMU domain to identity if SNP was enabled.
    
    This resulted in an error when writing to sysfs:
    
      # echo "identity" > /sys/kernel/iommu_groups/50/type
      -bash: echo: write error: Cannot allocate memory
    
    However, commit 4402f2627d30 ("iommu/amd: Implement global identity
    domain") changed the flow of the code, skipping the SNP guard and
    allowing users to change the IOMMU domain to identity after a machine
    has booted.
    
    Once the user does that, they will probably try to bind and the
    device/driver will start to do DMA which will trigger errors:
    
      iommu ivhd3: AMD-Vi: Event logged [ILLEGAL_DEV_TABLE_ENTRY device=0000:43:00.0 pasid=0x00000 address=0x3737b01000 flags=0x0020]
      iommu ivhd3: AMD-Vi: Control Reg : 0xc22000142148d
      AMD-Vi: DTE[0]: 6000000000000003
      AMD-Vi: DTE[1]: 0000000000000001
      AMD-Vi: DTE[2]: 2000003088b3e013
      AMD-Vi: DTE[3]: 0000000000000000
      bnxt_en 0000:43:00.0 (unnamed net_device) (uninitialized): Error (timeout: 500015) msg {0x0 0x0} len:0
      iommu ivhd3: AMD-Vi: Event logged [ILLEGAL_DEV_TABLE_ENTRY device=0000:43:00.0 pasid=0x00000 address=0x3737b01000 flags=0x0020]
      iommu ivhd3: AMD-Vi: Control Reg : 0xc22000142148d
      AMD-Vi: DTE[0]: 6000000000000003
      AMD-Vi: DTE[1]: 0000000000000001
      AMD-Vi: DTE[2]: 2000003088b3e013
      AMD-Vi: DTE[3]: 0000000000000000
      bnxt_en 0000:43:00.0: probe with driver bnxt_en failed with error -16
    
    To prevent this from happening, create an attach wrapper for
    identity_domain_ops which returns EINVAL if amd_iommu_snp_en is true.
    
    With this commit applied:
    
      # echo "identity" > /sys/kernel/iommu_groups/62/type
      -bash: echo: write error: Invalid argument
    
    Fixes: 4402f2627d30 ("iommu/amd: Implement global identity domain")
    Signed-off-by: Joe Damato <[email protected]>
    Reviewed-by: Vasant Hegde <[email protected]>
    Reviewed-by: Jason Gunthorpe <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
iommu/sva: Fix crash in iommu_sva_unbind_device() [+ + +]
Author: Lizhi Hou <[email protected]>
Date:   Wed Mar 4 22:18:42 2026 -0800

    iommu/sva: Fix crash in iommu_sva_unbind_device()
    
    [ Upstream commit 06e14c36e20b48171df13d51b89fe67c594ed07a ]
    
    domain->mm->iommu_mm can be freed by iommu_domain_free():
      iommu_domain_free()
        mmdrop()
          __mmdrop()
            mm_pasid_drop()
    After iommu_domain_free() returns, accessing domain->mm->iommu_mm may
    dereference a freed mm structure, leading to a crash.
    
    Fix this by moving the code that accesses domain->mm->iommu_mm to before
    the call to iommu_domain_free().
    
    Fixes: e37d5a2d60a3 ("iommu/sva: invalidate stale IOTLB entries for kernel address space")
    Signed-off-by: Lizhi Hou <[email protected]>
    Reviewed-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Yi Liu <[email protected]>
    Reviewed-by: Vasant Hegde <[email protected]>
    Reviewed-by: Lu Baolu <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
iommu/vt-d: Fix intel iommu iotlb sync hardlockup and retry [+ + +]
Author: Guanghui Feng <[email protected]>
Date:   Mon Mar 16 15:16:39 2026 +0800

    iommu/vt-d: Fix intel iommu iotlb sync hardlockup and retry
    
    commit fe89277c9ceb0d6af0aa665bcf24a41d8b1b79cd upstream.
    
    During the qi_check_fault process after an IOMMU ITE event, requests at
    odd-numbered positions in the queue are set to QI_ABORT, only satisfying
    single-request submissions. However, qi_submit_sync now supports multiple
    simultaneous submissions, and can't guarantee that the wait_desc will be
    at an odd-numbered position. Therefore, if an item times out, IOMMU can't
    re-initiate the request, resulting in an infinite polling wait.
    
    This modifies the process by setting the status of all requests already
    fetched by IOMMU and recorded as QI_IN_USE status (including wait_desc
    requests) to QI_ABORT, thus enabling multiple requests to be resubmitted.
    
    Fixes: 8a1d82462540 ("iommu/vt-d: Multiple descriptors per qi_submit_sync()")
    Cc: [email protected]
    Signed-off-by: Guanghui Feng <[email protected]>
    Tested-by: Shuai Xue <[email protected]>
    Reviewed-by: Shuai Xue <[email protected]>
    Reviewed-by: Samiullah Khawaja <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lu Baolu <[email protected]>
    Fixes: 8a1d82462540 ("iommu/vt-d: Multiple descriptors per  qi_submit_sync()")
    Signed-off-by: Joerg Roedel <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iommu/vt-d: Only handle IOPF for SVA when PRI is supported [+ + +]
Author: Lu Baolu <[email protected]>
Date:   Mon Mar 16 15:16:40 2026 +0800

    iommu/vt-d: Only handle IOPF for SVA when PRI is supported
    
    commit 39c20c4e83b9f78988541d829aa34668904e54a0 upstream.
    
    In intel_svm_set_dev_pasid(), the driver unconditionally manages the IOPF
    handling during a domain transition. However, commit a86fb7717320
    ("iommu/vt-d: Allow SVA with device-specific IOPF") introduced support for
    SVA on devices that handle page faults internally without utilizing the
    PCI PRI. On such devices, the IOMMU-side IOPF infrastructure is not
    required. Calling iopf_for_domain_replace() on these devices is incorrect
    and can lead to unexpected failures during PASID attachment or unwinding.
    
    Add a check for info->pri_supported to ensure that the IOPF queue logic
    is only invoked for devices that actually rely on the IOMMU's PRI-based
    fault handling.
    
    Fixes: 17fce9d2336d ("iommu/vt-d: Put iopf enablement in domain attach path")
    Cc: [email protected]
    Suggested-by: Kevin Tian <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Signed-off-by: Lu Baolu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Joerg Roedel <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
iommu: Fix mapping check for 0x0 to avoid re-mapping it [+ + +]
Author: Antheas Kapenekakis <[email protected]>
Date:   Fri Feb 27 09:06:37 2026 +0100

    iommu: Fix mapping check for 0x0 to avoid re-mapping it
    
    [ Upstream commit 0a4d00e2e99a39a5698e4b63c394415dcbb39d90 ]
    
    Commit 789a5913b29c ("iommu/amd: Use the generic iommu page table")
    introduces the shared iommu page table for AMD IOMMU. Some bioses
    contain an identity mapping for address 0x0, which is not parsed
    properly (e.g., certain Strix Halo devices). This causes the DMA
    components of the device to fail to initialize (e.g., the NVMe SSD
    controller), leading to a failed post.
    
    Specifically, on the GPD Win 5, the NVME and SSD GPU fail to mount,
    making collecting errors difficult. While debugging, it was found that
    a -EADDRINUSE error was emitted and its source was traced to
    iommu_iova_to_phys(). After adding some debug prints, it was found that
    phys_addr becomes 0, which causes the code to try to re-map the 0
    address and fail, causing a cascade leading to a failed post. This is
    because the GPD Win 5 contains a 0x0-0x1 identity mapping for DMA
    devices, causing it to be repeated for each device.
    
    The cause of this failure is the following check in
    iommu_create_device_direct_mappings(), where address aliasing is handled
    via the following check:
    
    ```
    phys_addr = iommu_iova_to_phys(domain, addr);
    if (!phys_addr) {
            map_size += pg_size;
            continue;
    }
    ````
    
    Obviously, the iommu_iova_to_phys() signature is faulty and aliases
    unmapped and 0 together, causing the allocation code to try to
    re-allocate the 0 address per device. However, it has too many
    instantiations to fix. Therefore, use a ternary so that when addr
    is 0, the check is done for address 1 instead.
    
    Suggested-by: Robin Murphy <[email protected]>
    Fixes: 789a5913b29c ("iommu/amd: Use the generic iommu page table")
    Signed-off-by: Antheas Kapenekakis <[email protected]>
    Reviewed-by: Vasant Hegde <[email protected]>
    Reviewed-by: Jason Gunthorpe <[email protected]>
    Signed-off-by: Joerg Roedel <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ip_tunnel: adapt iptunnel_xmit_stats() to NETDEV_PCPU_STAT_DSTATS [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Wed Mar 11 12:31:10 2026 +0000

    ip_tunnel: adapt iptunnel_xmit_stats() to NETDEV_PCPU_STAT_DSTATS
    
    [ Upstream commit 8431c602f551549f082bbfa67f3003f2d8e3e132 ]
    
    Blamed commits forgot that vxlan/geneve use udp_tunnel[6]_xmit_skb() which
    call iptunnel_xmit_stats().
    
    iptunnel_xmit_stats() was assuming tunnels were only using
    NETDEV_PCPU_STAT_TSTATS.
    
    @syncp offset in pcpu_sw_netstats and pcpu_dstats is different.
    
    32bit kernels would either have corruptions or freezes if the syncp
    sequence was overwritten.
    
    This patch also moves pcpu_stat_type closer to dev->{t,d}stats to avoid
    a potential cache line miss since iptunnel_xmit_stats() needs to read it.
    
    Fixes: 6fa6de302246 ("geneve: Handle stats using NETDEV_PCPU_STAT_DSTATS.")
    Fixes: be226352e8dc ("vxlan: Handle stats using NETDEV_PCPU_STAT_DSTATS.")
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Guillaume Nault <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ipmi: Consolidate the run to completion checking for xmit msgs lock [+ + +]
Author: Corey Minyard <[email protected]>
Date:   Tue Mar 17 12:51:54 2026 -0400

    ipmi: Consolidate the run to completion checking for xmit msgs lock
    
    [ Upstream commit 1d90e6c1a56f6ab83e5c9d30ded19e7ac8155713 ]
    
    It made things hard to read, move the check to a function.
    
    Signed-off-by: Corey Minyard <[email protected]>
    Reviewed-by: Breno Leitao <[email protected]>
    Stable-dep-of: 62cd145453d5 ("ipmi:msghandler: Handle error returns from the SMI sender")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Linux: ipmi:msghandler: Handle error returns from the SMI sender [+ + +]
Author: Corey Minyard <[email protected]>
Date:   Tue Mar 17 12:51:55 2026 -0400

    ipmi:msghandler: Handle error returns from the SMI sender
    
    [ Upstream commit 62cd145453d577113f993efd025f258dd86aa183 ]
    
    It used to be, until recently, that the sender operation on the low
    level interfaces would not fail.  That's not the case any more with
    recent changes.
    
    So check the return value from the sender operation, and propagate it
    back up from there and handle the errors in all places.
    
    Reported-by: Rafael J. Wysocki <[email protected]>
    Fixes: bc3a9d217755 ("ipmi:si: Gracefully handle if the BMC is non-functional")
    Cc: [email protected] # 4.18
    Signed-off-by: Corey Minyard <[email protected]>
    Reviewed-by: Rafael J. Wysocki (Intel) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ipv6: add NULL checks for idev in SRv6 paths [+ + +]
Author: Minhong He <[email protected]>
Date:   Mon Mar 16 15:33:01 2026 +0800

    ipv6: add NULL checks for idev in SRv6 paths
    
    [ Upstream commit 06413793526251870e20402c39930804f14d59c0 ]
    
    __in6_dev_get() can return NULL when the device has no IPv6 configuration
    (e.g. MTU < IPV6_MIN_MTU or after NETDEV_UNREGISTER).
    
    Add NULL checks for idev returned by __in6_dev_get() in both
    seg6_hmac_validate_skb() and ipv6_srh_rcv() to prevent potential NULL
    pointer dereferences.
    
    Fixes: 1ababeba4a21 ("ipv6: implement dataplane support for rthdr type 4 (Segment Routing Header)")
    Fixes: bf355b8d2c30 ("ipv6: sr: add core files for SR HMAC support")
    Signed-off-by: Minhong He <[email protected]>
    Reviewed-by: Andrea Mayer <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
irqchip/riscv-rpmi-sysmsi: Fix mailbox channel leak in rpmi_sysmsi_probe() [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sun Mar 15 15:17:54 2026 +0800

    irqchip/riscv-rpmi-sysmsi: Fix mailbox channel leak in rpmi_sysmsi_probe()
    
    commit 76f0930d6e809234904cf9f0f5f42ee6c1dc694e upstream.
    
    When riscv_acpi_get_gsi_info() fails, the mailbox channel previously
    requested via mbox_request_channel() is not freed. Add the missing
    mbox_free_channel() call to prevent the resource leak.
    
    Fixes: 4752b0cfbc37 ("irqchip/riscv-rpmi-sysmsi: Add ACPI support")
    Signed-off-by: Felix Gu <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Cc: [email protected]
    Reviewed-by: Rahul Pathak <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ksmbd: fix use-after-free in durable v2 replay of active file handles [+ + +]
Author: Hyunwoo Kim <[email protected]>
Date:   Thu Mar 12 17:15:51 2026 +0900

    ksmbd: fix use-after-free in durable v2 replay of active file handles
    
    [ Upstream commit b425e4d0eb321a1116ddbf39636333181675d8f4 ]
    
    parse_durable_handle_context() unconditionally assigns dh_info->fp->conn
    to the current connection when handling a DURABLE_REQ_V2 context with
    SMB2_FLAGS_REPLAY_OPERATION. ksmbd_lookup_fd_cguid() does not filter by
    fp->conn, so it returns file handles that are already actively connected.
    The unconditional overwrite replaces fp->conn, and when the overwriting
    connection is subsequently freed, __ksmbd_close_fd() dereferences the
    stale fp->conn via spin_lock(&fp->conn->llist_lock), causing a
    use-after-free.
    
    KASAN report:
    
    [    7.349357] ==================================================================
    [    7.349607] BUG: KASAN: slab-use-after-free in _raw_spin_lock+0x75/0xe0
    [    7.349811] Write of size 4 at addr ffff8881056ac18c by task kworker/1:2/108
    [    7.350010]
    [    7.350064] CPU: 1 UID: 0 PID: 108 Comm: kworker/1:2 Not tainted 7.0.0-rc3+ #58 PREEMPTLAZY
    [    7.350068] Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
    [    7.350070] Workqueue: ksmbd-io handle_ksmbd_work
    [    7.350083] Call Trace:
    [    7.350087]  <TASK>
    [    7.350087]  dump_stack_lvl+0x64/0x80
    [    7.350094]  print_report+0xce/0x660
    [    7.350100]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
    [    7.350101]  ? __pfx___mod_timer+0x10/0x10
    [    7.350106]  ? _raw_spin_lock+0x75/0xe0
    [    7.350108]  kasan_report+0xce/0x100
    [    7.350109]  ? _raw_spin_lock+0x75/0xe0
    [    7.350114]  kasan_check_range+0x105/0x1b0
    [    7.350116]  _raw_spin_lock+0x75/0xe0
    [    7.350118]  ? __pfx__raw_spin_lock+0x10/0x10
    [    7.350119]  ? __call_rcu_common.constprop.0+0x25e/0x780
    [    7.350125]  ? close_id_del_oplock+0x2cc/0x4e0
    [    7.350128]  __ksmbd_close_fd+0x27f/0xaf0
    [    7.350131]  ksmbd_close_fd+0x135/0x1b0
    [    7.350133]  smb2_close+0xb19/0x15b0
    [    7.350142]  ? __pfx_smb2_close+0x10/0x10
    [    7.350143]  ? xas_load+0x18/0x270
    [    7.350146]  ? _raw_spin_lock+0x84/0xe0
    [    7.350148]  ? __pfx__raw_spin_lock+0x10/0x10
    [    7.350150]  ? _raw_spin_unlock+0xe/0x30
    [    7.350151]  ? ksmbd_smb2_check_message+0xeb2/0x24c0
    [    7.350153]  ? ksmbd_tree_conn_lookup+0xcd/0xf0
    [    7.350154]  handle_ksmbd_work+0x40f/0x1080
    [    7.350156]  process_one_work+0x5fa/0xef0
    [    7.350162]  ? assign_work+0x122/0x3e0
    [    7.350163]  worker_thread+0x54b/0xf70
    [    7.350165]  ? __pfx_worker_thread+0x10/0x10
    [    7.350166]  kthread+0x346/0x470
    [    7.350170]  ? recalc_sigpending+0x19b/0x230
    [    7.350176]  ? __pfx_kthread+0x10/0x10
    [    7.350178]  ret_from_fork+0x4fb/0x6c0
    [    7.350183]  ? __pfx_ret_from_fork+0x10/0x10
    [    7.350185]  ? __switch_to+0x36c/0xbe0
    [    7.350188]  ? __pfx_kthread+0x10/0x10
    [    7.350190]  ret_from_fork_asm+0x1a/0x30
    [    7.350197]  </TASK>
    [    7.350197]
    [    7.355160] Allocated by task 123:
    [    7.355261]  kasan_save_stack+0x33/0x60
    [    7.355373]  kasan_save_track+0x14/0x30
    [    7.355484]  __kasan_kmalloc+0x8f/0xa0
    [    7.355593]  ksmbd_conn_alloc+0x44/0x6d0
    [    7.355711]  ksmbd_kthread_fn+0x243/0xd70
    [    7.355839]  kthread+0x346/0x470
    [    7.355942]  ret_from_fork+0x4fb/0x6c0
    [    7.356051]  ret_from_fork_asm+0x1a/0x30
    [    7.356164]
    [    7.356214] Freed by task 134:
    [    7.356305]  kasan_save_stack+0x33/0x60
    [    7.356416]  kasan_save_track+0x14/0x30
    [    7.356527]  kasan_save_free_info+0x3b/0x60
    [    7.356646]  __kasan_slab_free+0x43/0x70
    [    7.356761]  kfree+0x1ca/0x430
    [    7.356862]  ksmbd_tcp_disconnect+0x59/0xe0
    [    7.356993]  ksmbd_conn_handler_loop+0x77e/0xd40
    [    7.357138]  kthread+0x346/0x470
    [    7.357240]  ret_from_fork+0x4fb/0x6c0
    [    7.357350]  ret_from_fork_asm+0x1a/0x30
    [    7.357463]
    [    7.357513] The buggy address belongs to the object at ffff8881056ac000
    [    7.357513]  which belongs to the cache kmalloc-1k of size 1024
    [    7.357857] The buggy address is located 396 bytes inside of
    [    7.357857]  freed 1024-byte region [ffff8881056ac000, ffff8881056ac400)
    
    Fix by removing the unconditional fp->conn assignment and rejecting the
    replay when fp->conn is non-NULL. This is consistent with
    ksmbd_lookup_durable_fd(), which also rejects file handles with a
    non-NULL fp->conn. For disconnected file handles (fp->conn == NULL),
    ksmbd_reopen_durable_fd() handles setting fp->conn.
    
    Fixes: c8efcc786146 ("ksmbd: add support for durable handles v1/v2")
    Signed-off-by: Hyunwoo Kim <[email protected]>
    Acked-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ksmbd: fix use-after-free of share_conf in compound request [+ + +]
Author: Hyunwoo Kim <[email protected]>
Date:   Thu Mar 12 17:17:02 2026 +0900

    ksmbd: fix use-after-free of share_conf in compound request
    
    [ Upstream commit c33615f995aee80657b9fdfbc4ee7f49c2bd733d ]
    
    smb2_get_ksmbd_tcon() reuses work->tcon in compound requests without
    validating tcon->t_state. ksmbd_tree_conn_lookup() checks t_state ==
    TREE_CONNECTED on the initial lookup path, but the compound reuse path
    bypasses this check entirely.
    
    If a prior command in the compound (SMB2_TREE_DISCONNECT) sets t_state
    to TREE_DISCONNECTED and frees share_conf via ksmbd_share_config_put(),
    subsequent commands dereference the freed share_conf through
    work->tcon->share_conf.
    
    KASAN report:
    
    [    4.144653] ==================================================================
    [    4.145059] BUG: KASAN: slab-use-after-free in smb2_write+0xc74/0xe70
    [    4.145415] Read of size 4 at addr ffff88810430c194 by task kworker/1:1/44
    [    4.145772]
    [    4.145867] CPU: 1 UID: 0 PID: 44 Comm: kworker/1:1 Not tainted 7.0.0-rc3+ #60 PREEMPTLAZY
    [    4.145871] Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
    [    4.145875] Workqueue: ksmbd-io handle_ksmbd_work
    [    4.145888] Call Trace:
    [    4.145892]  <TASK>
    [    4.145894]  dump_stack_lvl+0x64/0x80
    [    4.145910]  print_report+0xce/0x660
    [    4.145919]  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
    [    4.145928]  ? smb2_write+0xc74/0xe70
    [    4.145931]  kasan_report+0xce/0x100
    [    4.145934]  ? smb2_write+0xc74/0xe70
    [    4.145937]  smb2_write+0xc74/0xe70
    [    4.145939]  ? __pfx_smb2_write+0x10/0x10
    [    4.145942]  ? _raw_spin_unlock+0xe/0x30
    [    4.145945]  ? ksmbd_smb2_check_message+0xeb2/0x24c0
    [    4.145948]  ? smb2_tree_disconnect+0x31c/0x480
    [    4.145951]  handle_ksmbd_work+0x40f/0x1080
    [    4.145953]  process_one_work+0x5fa/0xef0
    [    4.145962]  ? assign_work+0x122/0x3e0
    [    4.145964]  worker_thread+0x54b/0xf70
    [    4.145967]  ? __pfx_worker_thread+0x10/0x10
    [    4.145970]  kthread+0x346/0x470
    [    4.145976]  ? recalc_sigpending+0x19b/0x230
    [    4.145980]  ? __pfx_kthread+0x10/0x10
    [    4.145984]  ret_from_fork+0x4fb/0x6c0
    [    4.145992]  ? __pfx_ret_from_fork+0x10/0x10
    [    4.145995]  ? __switch_to+0x36c/0xbe0
    [    4.145999]  ? __pfx_kthread+0x10/0x10
    [    4.146003]  ret_from_fork_asm+0x1a/0x30
    [    4.146013]  </TASK>
    [    4.146014]
    [    4.149858] Allocated by task 44:
    [    4.149953]  kasan_save_stack+0x33/0x60
    [    4.150061]  kasan_save_track+0x14/0x30
    [    4.150169]  __kasan_kmalloc+0x8f/0xa0
    [    4.150274]  ksmbd_share_config_get+0x1dd/0xdd0
    [    4.150401]  ksmbd_tree_conn_connect+0x7e/0x600
    [    4.150529]  smb2_tree_connect+0x2e6/0x1000
    [    4.150645]  handle_ksmbd_work+0x40f/0x1080
    [    4.150761]  process_one_work+0x5fa/0xef0
    [    4.150873]  worker_thread+0x54b/0xf70
    [    4.150978]  kthread+0x346/0x470
    [    4.151071]  ret_from_fork+0x4fb/0x6c0
    [    4.151176]  ret_from_fork_asm+0x1a/0x30
    [    4.151286]
    [    4.151332] Freed by task 44:
    [    4.151418]  kasan_save_stack+0x33/0x60
    [    4.151526]  kasan_save_track+0x14/0x30
    [    4.151634]  kasan_save_free_info+0x3b/0x60
    [    4.151751]  __kasan_slab_free+0x43/0x70
    [    4.151861]  kfree+0x1ca/0x430
    [    4.151952]  __ksmbd_tree_conn_disconnect+0xc8/0x190
    [    4.152088]  smb2_tree_disconnect+0x1cd/0x480
    [    4.152211]  handle_ksmbd_work+0x40f/0x1080
    [    4.152326]  process_one_work+0x5fa/0xef0
    [    4.152438]  worker_thread+0x54b/0xf70
    [    4.152545]  kthread+0x346/0x470
    [    4.152638]  ret_from_fork+0x4fb/0x6c0
    [    4.152743]  ret_from_fork_asm+0x1a/0x30
    [    4.152853]
    [    4.152900] The buggy address belongs to the object at ffff88810430c180
    [    4.152900]  which belongs to the cache kmalloc-96 of size 96
    [    4.153226] The buggy address is located 20 bytes inside of
    [    4.153226]  freed 96-byte region [ffff88810430c180, ffff88810430c1e0)
    [    4.153549]
    [    4.153596] The buggy address belongs to the physical page:
    [    4.153750] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88810430ce80 pfn:0x10430c
    [    4.154000] flags: 0x100000000000200(workingset|node=0|zone=2)
    [    4.154160] page_type: f5(slab)
    [    4.154251] raw: 0100000000000200 ffff888100041280 ffff888100040110 ffff888100040110
    [    4.154461] raw: ffff88810430ce80 0000000800200009 00000000f5000000 0000000000000000
    [    4.154668] page dumped because: kasan: bad access detected
    [    4.154820]
    [    4.154866] Memory state around the buggy address:
    [    4.155002]  ffff88810430c080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [    4.155196]  ffff88810430c100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [    4.155391] >ffff88810430c180: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
    [    4.155587]                          ^
    [    4.155693]  ffff88810430c200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [    4.155891]  ffff88810430c280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [    4.156087] ==================================================================
    
    Add the same t_state validation to the compound reuse path, consistent
    with ksmbd_tree_conn_lookup().
    
    Fixes: 5005bcb42191 ("ksmbd: validate session id and tree id in the compound request")
    Signed-off-by: Hyunwoo Kim <[email protected]>
    Acked-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ksmbd: unset conn->binding on failed binding request [+ + +]
Author: Namjae Jeon <[email protected]>
Date:   Fri Mar 13 10:00:58 2026 +0900

    ksmbd: unset conn->binding on failed binding request
    
    commit 282343cf8a4a5a3603b1cb0e17a7083e4a593b03 upstream.
    
    When a multichannel SMB2_SESSION_SETUP request with
    SMB2_SESSION_REQ_FLAG_BINDING fails ksmbd sets conn->binding = true
    but never clears it on the error path. This leaves the connection in
    a binding state where all subsequent ksmbd_session_lookup_all() calls
    fall back to the global sessions table. This fix it by clearing
    conn->binding = false in the error path.
    
    Cc: [email protected]
    Reported-by: Hyunwoo Kim <[email protected]>
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ksmbd: use volume UUID in FS_OBJECT_ID_INFORMATION [+ + +]
Author: Namjae Jeon <[email protected]>
Date:   Fri Mar 13 10:01:29 2026 +0900

    ksmbd: use volume UUID in FS_OBJECT_ID_INFORMATION
    
    commit 3a64125730cabc34fccfbc230c2667c2e14f7308 upstream.
    
    Use sb->s_uuid for a proper volume identifier as the primary choice.
    For filesystems that do not provide a UUID, fall back to stfs.f_fsid
    obtained from vfs_statfs().
    
    Cc: [email protected]
    Reported-by: Hyunwoo Kim <[email protected]>
    Signed-off-by: Namjae Jeon <[email protected]>
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
lib/bootconfig: check xbc_init_node() return in override path [+ + +]
Author: Josh Law <[email protected]>
Date:   Thu Mar 19 08:43:05 2026 +0900

    lib/bootconfig: check xbc_init_node() return in override path
    
    [ Upstream commit bb288d7d869e86d382f35a0e26242c5ccb05ca82 ]
    
    The ':=' override path in xbc_parse_kv() calls xbc_init_node() to
    re-initialize an existing value node but does not check the return
    value. If xbc_init_node() fails (data offset out of range), parsing
    silently continues with stale node data.
    
    Add the missing error check to match the xbc_add_node() call path
    which already checks for failure.
    
    In practice, a bootconfig using ':=' to override a value near the
    32KB data limit could silently retain the old value, meaning a
    security-relevant boot parameter override (e.g., a trace filter or
    debug setting) would not take effect as intended.
    
    Link: https://lore.kernel.org/all/[email protected]/
    
    Fixes: e5efaeb8a8f5 ("bootconfig: Support mixing a value and subkeys under a key")
    Signed-off-by: Josh Law <[email protected]>
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
libie: prevent memleak in fwlog code [+ + +]
Author: Michal Swiatkowski <[email protected]>
Date:   Wed Feb 11 10:10:08 2026 +0100

    libie: prevent memleak in fwlog code
    
    [ Upstream commit 6850deb61118345996f03b87817b4ae0f2f25c38 ]
    
    All cmd_buf buffers are allocated and need to be freed after usage.
    Add an error unwinding path that properly frees these buffers.
    
    The memory leak happens whenever fwlog configuration is changed. For
    example:
    
    $echo 256K > /sys/kernel/debug/ixgbe/0000\:32\:00.0/fwlog/log_size
    
    Fixes: 96a9a9341cda ("ice: configure FW logging")
    Reviewed-by: Aleksandr Loktionov <[email protected]>
    Signed-off-by: Michal Swiatkowski <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Linux: Linux 6.19.10 [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Wed Mar 25 11:13:32 2026 +0100

    Linux 6.19.10
    
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Brett A C Sheffield <[email protected]>
    Tested-by: Ronald Warsow <[email protected]>
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Tested-by: Peter Schneider <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Salvatore Bonaccorso <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Takeshi Ogasawara <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Tested-by: Justin M. Forbes <[email protected]>
    Tested-by: Dileep Malepu <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Miguel Ojeda <[email protected]>
    Tested-by: Barry K. Nathan <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
LoongArch: Check return values for set_memory_{rw,rox} [+ + +]
Author: Tiezhu Yang <[email protected]>
Date:   Fri Mar 20 08:42:26 2026 -0400

    LoongArch: Check return values for set_memory_{rw,rox}
    
    [ Upstream commit 431ce839dad66d0d56fb604785452c6a57409f35 ]
    
    set_memory_rw() and set_memory_rox() may fail, so we should check the
    return values and return immediately in larch_insn_text_copy().
    
    Cc: [email protected]
    Signed-off-by: Tiezhu Yang <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    [ kept `stop_machine()` instead of `stop_machine_cpuslocked()` ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

LoongArch: Give more information if kmem access failed [+ + +]
Author: Tiezhu Yang <[email protected]>
Date:   Mon Mar 16 10:36:01 2026 +0800

    LoongArch: Give more information if kmem access failed
    
    commit a47f0754bdd01f971c9715acdbdd3a07515c8f83 upstream.
    
    If memory access such as copy_{from, to}_kernel_nofault() failed, its
    users do not know what happened, so it is very useful to print the
    exception code for such cases. Furthermore, it is better to print the
    caller function to know where is the entry.
    
    Here are the low level call chains:
    
      copy_from_kernel_nofault()
        copy_from_kernel_nofault_loop()
          __get_kernel_nofault()
    
      copy_to_kernel_nofault()
        copy_to_kernel_nofault_loop()
          __put_kernel_nofault()
    
    Cc: [email protected]
    Signed-off-by: Tiezhu Yang <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

LoongArch: No need to flush icache if text copy failed [+ + +]
Author: Tiezhu Yang <[email protected]>
Date:   Mon Mar 16 10:36:01 2026 +0800

    LoongArch: No need to flush icache if text copy failed
    
    commit d3b8491961207ac967795c34375890407fd51a45 upstream.
    
    If copy_to_kernel_nofault() failed, no need to flush icache and just
    return immediately.
    
    Cc: [email protected]
    Signed-off-by: Tiezhu Yang <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mac80211: fix crash in ieee80211_chan_bw_change for AP_VLAN stations [+ + +]
Author: Felix Fietkau <[email protected]>
Date:   Thu Mar 5 17:08:12 2026 +0000

    mac80211: fix crash in ieee80211_chan_bw_change for AP_VLAN stations
    
    commit 672e5229e1ecfc2a3509b53adcb914d8b024a853 upstream.
    
    ieee80211_chan_bw_change() iterates all stations and accesses
    link->reserved.oper via sta->sdata->link[link_id]. For stations on
    AP_VLAN interfaces (e.g. 4addr WDS clients), sta->sdata points to
    the VLAN sdata, whose link never participates in chanctx reservations.
    This leaves link->reserved.oper zero-initialized with chan == NULL,
    causing a NULL pointer dereference in __ieee80211_sta_cap_rx_bw()
    when accessing chandef->chan->band during CSA.
    
    Resolve the VLAN sdata to its parent AP sdata using get_bss_sdata()
    before accessing link data.
    
    Cc: [email protected]
    Signed-off-by: Felix Fietkau <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    [also change sta->sdata in ARRAY_SIZE even if it doesn't matter]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/huge_memory: fix early failure try_to_migrate() when split huge pmd for shared THP [+ + +]
Author: Wei Yang <[email protected]>
Date:   Thu Mar 5 01:50:06 2026 +0000

    mm/huge_memory: fix early failure try_to_migrate() when split huge pmd for shared THP
    
    commit 939080834fef3ce42fdbcfef33fd29c9ffe5bbed upstream.
    
    Commit 60fbb14396d5 ("mm/huge_memory: adjust try_to_migrate_one() and
    split_huge_pmd_locked()") return false unconditionally after
    split_huge_pmd_locked().  This may fail try_to_migrate() early when
    TTU_SPLIT_HUGE_PMD is specified.
    
    The reason is the above commit adjusted try_to_migrate_one() to, when a
    PMD-mapped THP entry is found, and TTU_SPLIT_HUGE_PMD is specified (for
    example, via unmap_folio()), return false unconditionally.  This breaks
    the rmap walk and fail try_to_migrate() early, if this PMD-mapped THP is
    mapped in multiple processes.
    
    The user sensible impact of this bug could be:
    
      * On memory pressure, shrink_folio_list() may split partially mapped
        folio with split_folio_to_list(). Then free unmapped pages without IO.
        If failed, it may not be reclaimed.
      * On memory failure, memory_failure() would call try_to_split_thp_page()
        to split folio contains the bad page. If succeed, the PG_has_hwpoisoned
        bit is only set in the after-split folio contains @split_at. By doing
        so, we limit bad memory. If failed to split, the whole folios is not
        usable.
    
    One way to reproduce:
    
        Create an anonymous THP range and fork 512 children, so we have a
        THP shared mapped in 513 processes. Then trigger folio split with
        /sys/kernel/debug/split_huge_pages debugfs to split the THP folio to
        order 0.
    
    Without the above commit, we can successfully split to order 0.  With the
    above commit, the folio is still a large folio.
    
    And currently there are two core users of TTU_SPLIT_HUGE_PMD:
    
      * try_to_unmap_one()
      * try_to_migrate_one()
    
    try_to_unmap_one() would restart the rmap walk, so only
    try_to_migrate_one() is affected.
    
    We can't simply revert commit 60fbb14396d5 ("mm/huge_memory: adjust
    try_to_migrate_one() and split_huge_pmd_locked()"), since it removed some
    duplicated check covered by page_vma_mapped_walk().
    
    This patch fixes this by restart page_vma_mapped_walk() after
    split_huge_pmd_locked().  Since we cannot simply return "true" to fix the
    problem, as that would affect another case:
    
        When invoking folio_try_share_anon_rmap_pmd() from
        split_huge_pmd_locked(), the latter can fail and leave a large folio
        mapped through PTEs, in which case we ought to return true from
        try_to_migrate_one(). This might result in unnecessary walking of the
        rmap but is relatively harmless.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 60fbb14396d5 ("mm/huge_memory: adjust try_to_migrate_one() and split_huge_pmd_locked()")
    Signed-off-by: Wei Yang <[email protected]>
    Reviewed-by: Baolin Wang <[email protected]>
    Reviewed-by: Zi Yan <[email protected]>
    Tested-by: Lance Yang <[email protected]>
    Reviewed-by: Lance Yang <[email protected]>
    Reviewed-by: Gavin Guo <[email protected]>
    Acked-by: David Hildenbrand (arm) <[email protected]>
    Reviewed-by: Lorenzo Stoakes (Oracle) <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mm/huge_memory: fix use of NULL folio in move_pages_huge_pmd() [+ + +]
Author: Chris Down <[email protected]>
Date:   Tue Mar 3 07:21:21 2026 +0000

    mm/huge_memory: fix use of NULL folio in move_pages_huge_pmd()
    
    commit fae654083bfa409bb2244f390232e2be47f05bfc upstream.
    
    move_pages_huge_pmd() handles UFFDIO_MOVE for both normal THPs and huge
    zero pages.  For the huge zero page path, src_folio is explicitly set to
    NULL, and is used as a sentinel to skip folio operations like lock and
    rmap.
    
    In the huge zero page branch, src_folio is NULL, so folio_mk_pmd(NULL,
    pgprot) passes NULL through folio_pfn() and page_to_pfn().  With
    SPARSEMEM_VMEMMAP this silently produces a bogus PFN, installing a PMD
    pointing to non-existent physical memory.  On other memory models it is a
    NULL dereference.
    
    Use page_folio(src_page) to obtain the valid huge zero folio from the
    page, which was obtained from pmd_page() and remains valid throughout.
    
    After commit d82d09e48219 ("mm/huge_memory: mark PMD mappings of the huge
    zero folio special"), moved huge zero PMDs must remain special so
    vm_normal_page_pmd() continues to treat them as special mappings.
    
    move_pages_huge_pmd() currently reconstructs the destination PMD in the
    huge zero page branch, which drops PMD state such as pmd_special() on
    architectures with CONFIG_ARCH_HAS_PTE_SPECIAL.  As a result,
    vm_normal_page_pmd() can treat the moved huge zero PMD as a normal page
    and corrupt its refcount.
    
    Instead of reconstructing the PMD from the folio, derive the destination
    entry from src_pmdval after pmdp_huge_clear_flush(), then handle the PMD
    metadata the same way move_huge_pmd() does for moved entries by marking it
    soft-dirty and clearing uffd-wp.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: e3981db444a0 ("mm: add folio_mk_pmd()")
    Signed-off-by: Chris Down <[email protected]>
    Signed-off-by: Lorenzo Stoakes <[email protected]>
    Reviewed-by: Lorenzo Stoakes <[email protected]>
    Tested-by: Lorenzo Stoakes <[email protected]>
    Acked-by: David Hildenbrand (Arm) <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/rmap: fix incorrect pte restoration for lazyfree folios [+ + +]
Author: Dev Jain <[email protected]>
Date:   Tue Mar 3 11:45:28 2026 +0530

    mm/rmap: fix incorrect pte restoration for lazyfree folios
    
    commit 29f40594a28114b9a9bc87f6cf7bbee9609628f2 upstream.
    
    We batch unmap anonymous lazyfree folios by folio_unmap_pte_batch.  If the
    batch has a mix of writable and non-writable bits, we may end up setting
    the entire batch writable.  Fix this by respecting writable bit during
    batching.
    
    Although on a successful unmap of a lazyfree folio, the soft-dirty bit is
    lost, preserve it on pte restoration by respecting the bit during
    batching, to make the fix consistent w.r.t both writable bit and
    soft-dirty bit.
    
    I was able to write the below reproducer and crash the kernel.
    Explanation of reproducer (set 64K mTHP to always):
    
    Fault in a 64K large folio.  Split the VMA at mid-point with
    MADV_DONTFORK.  fork() - parent points to the folio with 8 writable ptes
    and 8 non-writable ptes.  Merge the VMAs with MADV_DOFORK so that
    folio_unmap_pte_batch() can determine all the 16 ptes as a batch.  Do
    MADV_FREE on the range to mark the folio as lazyfree.  Write to the memory
    to dirty the pte, eventually rmap will dirty the folio.  Then trigger
    reclaim, we will hit the pte restoration path, and the kernel will crash
    with the trace given below.
    
    The BUG happens at:
    
            BUG_ON(atomic_inc_return(&ptc->anon_map_count) > 1 && rw);
    
    The code path is asking for anonymous page to be mapped writable into the
    pagetable.  The BUG_ON() firing implies that such a writable page has been
    mapped into the pagetables of more than one process, which breaks
    anonymous memory/CoW semantics.
    
    [   21.134473] kernel BUG at mm/page_table_check.c:118!
    [   21.134497] Internal error: Oops - BUG: 00000000f2000800 [#1]  SMP
    [   21.135917] Modules linked in:
    [   21.136085] CPU: 1 UID: 0 PID: 1735 Comm: dup-lazyfree Not tainted 7.0.0-rc1-00116-g018018a17770 #1028 PREEMPT
    [   21.136858] Hardware name: linux,dummy-virt (DT)
    [   21.137019] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
    [   21.137308] pc : page_table_check_set+0x28c/0x2a8
    [   21.137607] lr : page_table_check_set+0x134/0x2a8
    [   21.137885] sp : ffff80008a3b3340
    [   21.138124] x29: ffff80008a3b3340 x28: fffffdffc3d14400 x27: ffffd1a55e03d000
    [   21.138623] x26: 0040000000000040 x25: ffffd1a55f7dd000 x24: 0000000000000001
    [   21.139045] x23: 0000000000000001 x22: 0000000000000001 x21: ffffd1a55f217f30
    [   21.139629] x20: 0000000000134521 x19: 0000000000134519 x18: 005c43e000040000
    [   21.140027] x17: 0001400000000000 x16: 0001700000000000 x15: 000000000000ffff
    [   21.140578] x14: 000000000000000c x13: 005c006000000000 x12: 0000000000000020
    [   21.140828] x11: 0000000000000000 x10: 005c000000000000 x9 : ffffd1a55c079ee0
    [   21.141077] x8 : 0000000000000001 x7 : 005c03e000040000 x6 : 000000004000ffff
    [   21.141490] x5 : ffff00017fffce00 x4 : 0000000000000001 x3 : 0000000000000002
    [   21.141741] x2 : 0000000000134510 x1 : 0000000000000000 x0 : ffff0000c08228c0
    [   21.141991] Call trace:
    [   21.142093]  page_table_check_set+0x28c/0x2a8 (P)
    [   21.142265]  __page_table_check_ptes_set+0x144/0x1e8
    [   21.142441]  __set_ptes_anysz.constprop.0+0x160/0x1a8
    [   21.142766]  contpte_set_ptes+0xe8/0x140
    [   21.142907]  try_to_unmap_one+0x10c4/0x10d0
    [   21.143177]  rmap_walk_anon+0x100/0x250
    [   21.143315]  try_to_unmap+0xa0/0xc8
    [   21.143441]  shrink_folio_list+0x59c/0x18a8
    [   21.143759]  shrink_lruvec+0x664/0xbf0
    [   21.144043]  shrink_node+0x218/0x878
    [   21.144285]  __node_reclaim.constprop.0+0x98/0x338
    [   21.144763]  user_proactive_reclaim+0x2a4/0x340
    [   21.145056]  reclaim_store+0x3c/0x60
    [   21.145216]  dev_attr_store+0x20/0x40
    [   21.145585]  sysfs_kf_write+0x84/0xa8
    [   21.145835]  kernfs_fop_write_iter+0x130/0x1c8
    [   21.145994]  vfs_write+0x2b8/0x368
    [   21.146119]  ksys_write+0x70/0x110
    [   21.146240]  __arm64_sys_write+0x24/0x38
    [   21.146380]  invoke_syscall+0x50/0x120
    [   21.146513]  el0_svc_common.constprop.0+0x48/0xf8
    [   21.146679]  do_el0_svc+0x28/0x40
    [   21.146798]  el0_svc+0x34/0x110
    [   21.146926]  el0t_64_sync_handler+0xa0/0xe8
    [   21.147074]  el0t_64_sync+0x198/0x1a0
    [   21.147225] Code: f9400441 b4fff241 17ffff94 d4210000 (d4210000)
    [   21.147440] ---[ end trace 0000000000000000 ]---
    
    #define _GNU_SOURCE
    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <sys/mman.h>
    #include <string.h>
    #include <sys/wait.h>
    #include <sched.h>
    #include <fcntl.h>
    
    void write_to_reclaim() {
        const char *path = "/sys/devices/system/node/node0/reclaim";
        const char *value = "409600000000";
        int fd = open(path, O_WRONLY);
        if (fd == -1) {
            perror("open");
            exit(EXIT_FAILURE);
        }
    
        if (write(fd, value, sizeof("409600000000") - 1) == -1) {
            perror("write");
            close(fd);
            exit(EXIT_FAILURE);
        }
    
        printf("Successfully wrote %s to %s\n", value, path);
        close(fd);
    }
    
    int main()
    {
            char *ptr = mmap((void *)(1UL << 30), 1UL << 16, PROT_READ | PROT_WRITE,
                             MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
            if ((unsigned long)ptr != (1UL << 30)) {
                    perror("mmap");
                    return 1;
            }
    
            /* a 64K folio gets faulted in */
            memset(ptr, 0, 1UL << 16);
    
            /* 32K half will not be shared into child */
            if (madvise(ptr, 1UL << 15, MADV_DONTFORK)) {
                    perror("madvise madv dontfork");
                    return 1;
            }
    
            pid_t pid = fork();
    
            if (pid < 0) {
                    perror("fork");
                    return 1;
            } else if (pid == 0) {
                    sleep(15);
            } else {
                    /* merge VMAs. now first half of the 16 ptes are writable, the other half not. */
                    if (madvise(ptr, 1UL << 15, MADV_DOFORK)) {
                            perror("madvise madv fork");
                            return 1;
                    }
                    if (madvise(ptr, (1UL << 16), MADV_FREE)) {
                            perror("madvise madv free");
                            return 1;
                    }
    
                    /* dirty the large folio */
                    (*ptr) += 10;
    
                    write_to_reclaim();
                    // sleep(10);
                    waitpid(pid, NULL, 0);
    
            }
    }
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 354dffd29575 ("mm: support batched unmap for lazyfree large folios during reclamation")
    Signed-off-by: Dev Jain <[email protected]>
    Acked-by: David Hildenbrand (Arm) <[email protected]>
    Reviewed-by: Lorenzo Stoakes <[email protected]>
    Reviewed-by: Barry Song <[email protected]>
    Reviewed-by: Wei Yang <[email protected]>
    Tested-by: Lance Yang <[email protected]>
    Cc: Anshuman Khandual <[email protected]>
    Cc: Harry Yoo <[email protected]>
    Cc: Jann Horn <[email protected]>
    Cc: Liam Howlett <[email protected]>
    Cc: Rik van Riel <[email protected]>
    Cc: Ryan Roberts <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mmc: sdhci-pci-gli: fix GL9750 DMA write corruption [+ + +]
Author: Matthew Schwartz <[email protected]>
Date:   Mon Mar 2 13:07:17 2026 -0800

    mmc: sdhci-pci-gli: fix GL9750 DMA write corruption
    
    commit 2b76e0cc7803e5ab561c875edaba7f6bbd87fbb0 upstream.
    
    The GL9750 SD host controller has intermittent data corruption during
    DMA write operations. The GM_BURST register's R_OSRC_Lmt field
    (bits 17:16), which limits outstanding DMA read requests from system
    memory, is not being cleared during initialization. The Windows driver
    sets R_OSRC_Lmt to zero, limiting requests to the smallest unit.
    
    Clear R_OSRC_Lmt to match the Windows driver behavior. This eliminates
    write corruption verified with f3write/f3read tests while maintaining
    DMA performance.
    
    Cc: [email protected]
    Fixes: e51df6ce668a ("mmc: host: sdhci-pci: Add Genesys Logic GL975x support")
    Closes: https://lore.kernel.org/linux-mmc/[email protected]/
    Acked-by: Adrian Hunter <[email protected]>
    Signed-off-by: Matthew Schwartz <[email protected]>
    Reviewed-by: Ben Chuang <[email protected]>
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mmc: sdhci: fix timing selection for 1-bit bus width [+ + +]
Author: Luke Wang <[email protected]>
Date:   Wed Mar 11 17:50:06 2026 +0800

    mmc: sdhci: fix timing selection for 1-bit bus width
    
    commit 5e3486e64094c28a526543f1e8aa0d5964b7f02d upstream.
    
    When 1-bit bus width is used with HS200/HS400 capabilities set,
    mmc_select_hs200() returns 0 without actually switching. This
    causes mmc_select_timing() to skip mmc_select_hs(), leaving eMMC
    in legacy mode (26MHz) instead of High Speed SDR (52MHz).
    
    Per JEDEC eMMC spec section 5.3.2, 1-bit mode supports High Speed
    SDR. Drop incompatible HS200/HS400/UHS/DDR caps early so timing
    selection falls through to mmc_select_hs() correctly.
    
    Fixes: f2119df6b764 ("mmc: sd: add support for signal voltage switch procedure")
    Signed-off-by: Luke Wang <[email protected]>
    Acked-by: Adrian Hunter <[email protected]>
    Cc: [email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mpls: add missing unregister_netdevice_notifier to mpls_init [+ + +]
Author: Sabrina Dubroca <[email protected]>
Date:   Wed Mar 11 23:35:09 2026 +0100

    mpls: add missing unregister_netdevice_notifier to mpls_init
    
    [ Upstream commit 99600f79b28c83c68bae199a3d8e95049a758308 ]
    
    If mpls_init() fails after registering mpls_dev_notifier, it never
    gets removed. Add the missing unregister_netdevice_notifier() call to
    the error handling path.
    
    Fixes: 5be2062e3080 ("mpls: Handle error of rtnl_register_module().")
    Signed-off-by: Sabrina Dubroca <[email protected]>
    Link: https://patch.msgid.link/7c55363c4f743d19e2306204a134407c90a69bbb.1773228081.git.sd@queasysnail.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
MPTCP: fix lock class name family in pm_nl_create_listen_socket [+ + +]
Author: Li Xiasong <[email protected]>
Date:   Thu Mar 19 19:21:59 2026 +0800

    MPTCP: fix lock class name family in pm_nl_create_listen_socket
    
    [ Upstream commit 7ab4a7c5d969642782b8a5b608da0dd02aa9f229 ]
    
    In mptcp_pm_nl_create_listen_socket(), use entry->addr.family
    instead of sk->sk_family for lock class setup. The 'sk' parameter
    is a netlink socket, not the MPTCP subflow socket being created.
    
    Fixes: cee4034a3db1 ("mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket()")
    Signed-off-by: Li Xiasong <[email protected]>
    Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
mshv: Fix use-after-free in mshv_map_user_memory error path [+ + +]
Author: Stanislav Kinsburskii <[email protected]>
Date:   Thu Mar 12 16:02:53 2026 +0000

    mshv: Fix use-after-free in mshv_map_user_memory error path
    
    [ Upstream commit 6922db250422a0dfee34de322f86b7a73d713d33 ]
    
    In the error path of mshv_map_user_memory(), calling vfree() directly on
    the region leaves the MMU notifier registered. When userspace later unmaps
    the memory, the notifier fires and accesses the freed region, causing a
    use-after-free and potential kernel panic.
    
    Replace vfree() with mshv_partition_put() to properly unregister
    the MMU notifier before freeing the region.
    
    Fixes: b9a66cd5ccbb9 ("mshv: Add support for movable memory regions")
    Signed-off-by: Stanislav Kinsburskii <[email protected]>
    Signed-off-by: Wei Liu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
mtd: Avoid boot crash in RedBoot partition table parser [+ + +]
Author: Finn Thain <[email protected]>
Date:   Mon Feb 16 18:01:30 2026 +1100

    mtd: Avoid boot crash in RedBoot partition table parser
    
    commit 8e2f8020270af7777d49c2e7132260983e4fc566 upstream.
    
    Given CONFIG_FORTIFY_SOURCE=y and a recent compiler,
    commit 439a1bcac648 ("fortify: Use __builtin_dynamic_object_size() when
    available") produces the warning below and an oops.
    
        Searching for RedBoot partition table in 50000000.flash at offset 0x7e0000
        ------------[ cut here ]------------
        WARNING: lib/string_helpers.c:1035 at 0xc029e04c, CPU#0: swapper/0/1
        memcmp: detected buffer overflow: 15 byte read of buffer size 14
        Modules linked in:
        CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.19.0 #1 NONE
    
    As Kees said, "'names' is pointing to the final 'namelen' many bytes
    of the allocation ... 'namelen' could be basically any length at all.
    This fortify warning looks legit to me -- this code used to be reading
    beyond the end of the allocation."
    
    Since the size of the dynamic allocation is calculated with strlen()
    we can use strcmp() instead of memcmp() and remain within bounds.
    
    Cc: Kees Cook <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Link: https://lore.kernel.org/all/202602151911.AD092DFFCD@keescook/
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Suggested-by: Kees Cook <[email protected]>
    Signed-off-by: Finn Thain <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mtd: rawnand: brcmnand: skip DMA during panic write [+ + +]
Author: Kamal Dasu <[email protected]>
Date:   Thu Mar 5 15:21:57 2026 -0500

    mtd: rawnand: brcmnand: skip DMA during panic write
    
    [ Upstream commit da9ba4dcc01e7cf52b7676f0ee9607b8358c2171 ]
    
    When oops_panic_write is set, the driver disables interrupts and
    switches to PIO polling mode but still falls through into the DMA
    path. DMA cannot be used reliably in panic context, so make the
    DMA path an else branch to ensure only PIO is used during panic
    writes.
    
    Fixes: c1ac2dc34b51 ("mtd: rawnand: brcmnand: When oops in progress use pio and interrupt polling")
    Signed-off-by: Kamal Dasu <[email protected]>
    Reviewed-by: William Zhang <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

mtd: rawnand: cadence: Fix error check for dma_alloc_coherent() in cadence_nand_init() [+ + +]
Author: Chen Ni <[email protected]>
Date:   Mon Feb 9 15:56:18 2026 +0800

    mtd: rawnand: cadence: Fix error check for dma_alloc_coherent() in cadence_nand_init()
    
    commit 0410e1a4c545c769c59c6eda897ad5d574d0c865 upstream.
    
    Fix wrong variable used for error checking after dma_alloc_coherent()
    call. The function checks cdns_ctrl->dma_cdma_desc instead of
    cdns_ctrl->cdma_desc, which could lead to incorrect error handling.
    
    Fixes: ec4ba01e894d ("mtd: rawnand: Add new Cadence NAND driver to MTD subsystem")
    Cc: [email protected]
    Signed-off-by: Chen Ni <[email protected]>
    Reviewed-by: Alok Tiwari <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mtd: rawnand: pl353: make sure optimal timings are applied [+ + +]
Author: Olivier Sobrie <[email protected]>
Date:   Tue Mar 17 18:18:07 2026 +0100

    mtd: rawnand: pl353: make sure optimal timings are applied
    
    commit b9465b04de4b90228de03db9a1e0d56b00814366 upstream.
    
    Timings of the nand are adjusted by pl35x_nfc_setup_interface() but
    actually applied by the pl35x_nand_select_target() function.
    If there is only one nand chip, the pl35x_nand_select_target() will only
    apply the timings once since the test at its beginning will always be true
    after the first call to this function. As a result, the hardware will
    keep using the default timings set at boot to detect the nand chip, not
    the optimal ones.
    
    With this patch, we program directly the new timings when
    pl35x_nfc_setup_interface() is called.
    
    Fixes: 08d8c62164a3 ("mtd: rawnand: pl353: Add support for the ARM PL353 SMC NAND controller")
    Signed-off-by: Olivier Sobrie <[email protected]>
    Cc: [email protected]
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mtd: rawnand: serialize lock/unlock against other NAND operations [+ + +]
Author: Kamal Dasu <[email protected]>
Date:   Thu Mar 5 14:49:06 2026 -0500

    mtd: rawnand: serialize lock/unlock against other NAND operations
    
    [ Upstream commit bab2bc6e850a697a23b9e5f0e21bb8c187615e95 ]
    
    nand_lock() and nand_unlock() call into chip->ops.lock_area/unlock_area
    without holding the NAND device lock. On controllers that implement
    SET_FEATURES via multiple low-level PIO commands, these can race with
    concurrent UBI/UBIFS background erase/write operations that hold the
    device lock, resulting in cmd_pending conflicts on the NAND controller.
    
    Add nand_get_device()/nand_release_device() around the lock/unlock
    operations to serialize them against all other NAND controller access.
    
    Fixes: 92270086b7e5 ("mtd: rawnand: Add support for manufacturer specific lock/unlock operation")
    Signed-off-by: Kamal Dasu <[email protected]>
    Reviewed-by: William Zhang <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

mtd: spi-nor: Fix RDCR controller capability core check [+ + +]
Author: Miquel Raynal <[email protected]>
Date:   Tue Mar 17 11:18:42 2026 +0100

    mtd: spi-nor: Fix RDCR controller capability core check
    
    commit ac512cd351f7e4ab4569f6a52c116f4ab3a239cc upstream.
    
    Commit 5008c3ec3f89 ("mtd: spi-nor: core: Check read CR support") adds a
    controller check to make sure the core will not use CR reads on
    controllers not supporting them. The approach is valid but the fix is
    incorrect. Unfortunately, the author could not catch it, because the
    expected behavior was met. The patch indeed drops the RDCR capability,
    but it does it for all controllers!
    
    The issue comes from the use of spi_nor_spimem_check_op() which is an
    internal helper dedicated to check read/write operations only, despite
    its generic name.
    
    This helper looks for the biggest number of address bytes that can be
    used for a page operation and tries 4 then 3. It then calls the usual
    spi-mem helpers to do the checks. These will always fail because there
    is now an inconsistency: the address cycles are forced to 4 (then 3)
    bytes, but the bus width during the address cycles rightfully remains
    0. There is a non-zero address length but a zero address bus width,
    which is an invalid combination.
    
    The correct check in this case is to directly call spi_mem_supports_op()
    which doesn't messes up with the operation content.
    
    Fixes: 5008c3ec3f89 ("mtd: spi-nor: core: Check read CR support")
    Cc: [email protected]
    Acked-by: Tudor Ambarus <[email protected]>
    Acked-by: Takahiro Kuwano <[email protected]>
    Reviewed-by: Pratyush Yadav <[email protected]>
    Signed-off-by: Miquel Raynal <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
net/mlx5: qos: Restrict RTNL area to avoid a lock cycle [+ + +]
Author: Cosmin Ratiu <[email protected]>
Date:   Mon Mar 16 11:46:01 2026 +0200

    net/mlx5: qos: Restrict RTNL area to avoid a lock cycle
    
    [ Upstream commit b7e3a5d9c0d66b7fb44f63aef3bd734821afa0c8 ]
    
    A lock dependency cycle exists where:
    1. mlx5_ib_roce_init -> mlx5_core_uplink_netdev_event_replay ->
    mlx5_blocking_notifier_call_chain (takes notifier_rwsem) ->
    mlx5e_mdev_notifier_event -> mlx5_netdev_notifier_register ->
    register_netdevice_notifier_dev_net (takes rtnl)
    => notifier_rwsem -> rtnl
    
    2. mlx5e_probe -> _mlx5e_probe ->
    mlx5_core_uplink_netdev_set (takes uplink_netdev_lock) ->
    mlx5_blocking_notifier_call_chain (takes notifier_rwsem)
    => uplink_netdev_lock -> notifier_rwsem
    
    3: devlink_nl_rate_set_doit -> devlink_nl_rate_set ->
    mlx5_esw_devlink_rate_leaf_tx_max_set -> esw_qos_devlink_rate_to_mbps ->
    mlx5_esw_qos_max_link_speed_get (takes rtnl) ->
    mlx5_esw_qos_lag_link_speed_get_locked ->
    mlx5_uplink_netdev_get (takes uplink_netdev_lock)
    => rtnl -> uplink_netdev_lock
    => BOOM! (lock cycle)
    
    Fix that by restricting the rtnl-protected section to just the necessary
    part, the call to netdev_master_upper_dev_get and speed querying, so
    that the last lock dependency is avoided and the cycle doesn't close.
    This is safe because mlx5_uplink_netdev_get uses netdev_hold to keep the
    uplink netdev alive while its master device is queried.
    
    Use this opportunity to rename the ambiguously-named "hold_rtnl_lock"
    argument to "take_rtnl" and remove the "_locked" suffix from
    mlx5_esw_qos_lag_link_speed_get_locked.
    
    Fixes: 6b4be64fd9fe ("net/mlx5e: Harden uplink netdev access against device unbind")
    Signed-off-by: Cosmin Ratiu <[email protected]>
    Reviewed-by: Dragos Tatulea <[email protected]>
    Signed-off-by: Tariq Toukan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/mlx5e: Fix race condition during IPSec ESN update [+ + +]
Author: Jianbo Liu <[email protected]>
Date:   Mon Mar 16 11:46:03 2026 +0200

    net/mlx5e: Fix race condition during IPSec ESN update
    
    [ Upstream commit beb6e2e5976a128b0cccf10d158124422210c5ef ]
    
    In IPSec full offload mode, the device reports an ESN (Extended
    Sequence Number) wrap event to the driver. The driver validates this
    event by querying the IPSec ASO and checking that the esn_event_arm
    field is 0x0, which indicates an event has occurred. After handling
    the event, the driver must re-arm the context by setting esn_event_arm
    back to 0x1.
    
    A race condition exists in this handling path. After validating the
    event, the driver calls mlx5_accel_esp_modify_xfrm() to update the
    kernel's xfrm state. This function temporarily releases and
    re-acquires the xfrm state lock.
    
    So, need to acknowledge the event first by setting esn_event_arm to
    0x1. This prevents the driver from reprocessing the same ESN update if
    the hardware sends events for other reason. Since the next ESN update
    only occurs after nearly 2^31 packets are received, there's no risk of
    missing an update, as it will happen long after this handling has
    finished.
    
    Processing the event twice causes the ESN high-order bits (esn_msb) to
    be incremented incorrectly. The driver then programs the hardware with
    this invalid ESN state, which leads to anti-replay failures and a
    complete halt of IPSec traffic.
    
    Fix this by re-arming the ESN event immediately after it is validated,
    before calling mlx5_accel_esp_modify_xfrm(). This ensures that any
    spurious, duplicate events are correctly ignored, closing the race
    window.
    
    Fixes: fef06678931f ("net/mlx5e: Fix ESN update kernel panic")
    Signed-off-by: Jianbo Liu <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Tariq Toukan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net/mlx5e: Prevent concurrent access to IPSec ASO context [+ + +]
Author: Jianbo Liu <[email protected]>
Date:   Mon Mar 16 11:46:02 2026 +0200

    net/mlx5e: Prevent concurrent access to IPSec ASO context
    
    [ Upstream commit 99b36850d881e2d65912b2520a1c80d0fcc9429a ]
    
    The query or updating IPSec offload object is through Access ASO WQE.
    The driver uses a single mlx5e_ipsec_aso struct for each PF, which
    contains a shared DMA-mapped context for all ASO operations.
    
    A race condition exists because the ASO spinlock is released before
    the hardware has finished processing WQE. If a second operation is
    initiated immediately after, it overwrites the shared context in the
    DMA area.
    
    When the first operation's completion is processed later, it reads
    this corrupted context, leading to unexpected behavior and incorrect
    results.
    
    This commit fixes the race by introducing a private context within
    each IPSec offload object. The shared ASO context is now copied to
    this private context while the ASO spinlock is held. Subsequent
    processing uses this saved, per-object context, ensuring its integrity
    is maintained.
    
    Fixes: 1ed78fc03307 ("net/mlx5e: Update IPsec soft and hard limits")
    Signed-off-by: Jianbo Liu <[email protected]>
    Reviewed-by: Leon Romanovsky <[email protected]>
    Signed-off-by: Tariq Toukan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/rose: fix NULL pointer dereference in rose_transmit_link on reconnect [+ + +]
Author: Jiayuan Chen <[email protected]>
Date:   Wed Mar 11 15:06:02 2026 +0800

    net/rose: fix NULL pointer dereference in rose_transmit_link on reconnect
    
    [ Upstream commit e1f0a18c9564cdb16523c802e2c6fe5874e3d944 ]
    
    syzkaller reported a bug [1], and the reproducer is available at [2].
    
    ROSE sockets use four sk->sk_state values: TCP_CLOSE, TCP_LISTEN,
    TCP_SYN_SENT, and TCP_ESTABLISHED. rose_connect() already rejects
    calls for TCP_ESTABLISHED (-EISCONN) and TCP_CLOSE with SS_CONNECTING
    (-ECONNREFUSED), but lacks a check for TCP_SYN_SENT.
    
    When rose_connect() is called a second time while the first connection
    attempt is still in progress (TCP_SYN_SENT), it overwrites
    rose->neighbour via rose_get_neigh(). If that returns NULL, the socket
    is left with rose->state == ROSE_STATE_1 but rose->neighbour == NULL.
    When the socket is subsequently closed, rose_release() sees
    ROSE_STATE_1 and calls rose_write_internal() ->
    rose_transmit_link(skb, NULL), causing a NULL pointer dereference.
    
    Per connect(2), a second connect() while a connection is already in
    progress should return -EALREADY. Add this missing check for
    TCP_SYN_SENT to complete the state validation in rose_connect().
    
    [1] https://syzkaller.appspot.com/bug?extid=d00f90e0af54102fb271
    [2] https://gist.github.com/mrpre/9e6779e0d13e2c66779b1653fef80516
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/all/[email protected]/T/
    Suggested-by: Eric Dumazet <[email protected]>
    Signed-off-by: Jiayuan Chen <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/sched: teql: Fix double-free in teql_master_xmit [+ + +]
Author: Jamal Hadi Salim <[email protected]>
Date:   Sun Mar 15 11:54:22 2026 -0400

    net/sched: teql: Fix double-free in teql_master_xmit
    
    [ Upstream commit 66360460cab63c248ca5b1070a01c0c29133b960 ]
    
    Whenever a TEQL devices has a lockless Qdisc as root, qdisc_reset should
    be called using the seq_lock to avoid racing with the datapath. Failure
    to do so may cause crashes like the following:
    
    [  238.028993][  T318] BUG: KASAN: double-free in skb_release_data (net/core/skbuff.c:1139)
    [  238.029328][  T318] Free of addr ffff88810c67ec00 by task poc_teql_uaf_ke/318
    [  238.029749][  T318]
    [  238.029900][  T318] CPU: 3 UID: 0 PID: 318 Comm: poc_teql_ke Not tainted 7.0.0-rc3-00149-ge5b31d988a41 #704 PREEMPT(full)
    [  238.029906][  T318] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    [  238.029910][  T318] Call Trace:
    [  238.029913][  T318]  <TASK>
    [  238.029916][  T318]  dump_stack_lvl (lib/dump_stack.c:122)
    [  238.029928][  T318]  print_report (mm/kasan/report.c:379 mm/kasan/report.c:482)
    [  238.029940][  T318]  ? skb_release_data (net/core/skbuff.c:1139)
    [  238.029944][  T318]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    ...
    [  238.029957][  T318]  ? skb_release_data (net/core/skbuff.c:1139)
    [  238.029969][  T318]  kasan_report_invalid_free (mm/kasan/report.c:221 mm/kasan/report.c:563)
    [  238.029979][  T318]  ? skb_release_data (net/core/skbuff.c:1139)
    [  238.029989][  T318]  check_slab_allocation (mm/kasan/common.c:231)
    [  238.029995][  T318]  kmem_cache_free (mm/slub.c:2637 (discriminator 1) mm/slub.c:6168 (discriminator 1) mm/slub.c:6298 (discriminator 1))
    [  238.030004][  T318]  skb_release_data (net/core/skbuff.c:1139)
    ...
    [  238.030025][  T318]  sk_skb_reason_drop (net/core/skbuff.c:1256)
    [  238.030032][  T318]  pfifo_fast_reset (./include/linux/ptr_ring.h:171 ./include/linux/ptr_ring.h:309 ./include/linux/skb_array.h:98 net/sched/sch_generic.c:827)
    [  238.030039][  T318]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    ...
    [  238.030054][  T318]  qdisc_reset (net/sched/sch_generic.c:1034)
    [  238.030062][  T318]  teql_destroy (./include/linux/spinlock.h:395 net/sched/sch_teql.c:157)
    [  238.030071][  T318]  __qdisc_destroy (./include/net/pkt_sched.h:328 net/sched/sch_generic.c:1077)
    [  238.030077][  T318]  qdisc_graft (net/sched/sch_api.c:1062 net/sched/sch_api.c:1053 net/sched/sch_api.c:1159)
    [  238.030089][  T318]  ? __pfx_qdisc_graft (net/sched/sch_api.c:1091)
    [  238.030095][  T318]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [  238.030102][  T318]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [  238.030106][  T318]  ? srso_alias_return_thunk (arch/x86/lib/retpoline.S:221)
    [  238.030114][  T318]  tc_get_qdisc (net/sched/sch_api.c:1529 net/sched/sch_api.c:1556)
    ...
    [  238.072958][  T318] Allocated by task 303 on cpu 5 at 238.026275s:
    [  238.073392][  T318]  kasan_save_stack (mm/kasan/common.c:58)
    [  238.073884][  T318]  kasan_save_track (mm/kasan/common.c:64 (discriminator 5) mm/kasan/common.c:79 (discriminator 5))
    [  238.074230][  T318]  __kasan_slab_alloc (mm/kasan/common.c:369)
    [  238.074578][  T318]  kmem_cache_alloc_node_noprof (./include/linux/kasan.h:253 mm/slub.c:4542 mm/slub.c:4869 mm/slub.c:4921)
    [  238.076091][  T318]  kmalloc_reserve (net/core/skbuff.c:616 (discriminator 107))
    [  238.076450][  T318]  __alloc_skb (net/core/skbuff.c:713)
    [  238.076834][  T318]  alloc_skb_with_frags (./include/linux/skbuff.h:1383 net/core/skbuff.c:6763)
    [  238.077178][  T318]  sock_alloc_send_pskb (net/core/sock.c:2997)
    [  238.077520][  T318]  packet_sendmsg (net/packet/af_packet.c:2926 net/packet/af_packet.c:3019 net/packet/af_packet.c:3108)
    [  238.081469][  T318]
    [  238.081870][  T318] Freed by task 299 on cpu 1 at 238.028496s:
    [  238.082761][  T318]  kasan_save_stack (mm/kasan/common.c:58)
    [  238.083481][  T318]  kasan_save_track (mm/kasan/common.c:64 (discriminator 5) mm/kasan/common.c:79 (discriminator 5))
    [  238.085348][  T318]  kasan_save_free_info (mm/kasan/generic.c:587 (discriminator 1))
    [  238.085900][  T318]  __kasan_slab_free (mm/kasan/common.c:287)
    [  238.086439][  T318]  kmem_cache_free (mm/slub.c:6168 (discriminator 3) mm/slub.c:6298 (discriminator 3))
    [  238.087007][  T318]  skb_release_data (net/core/skbuff.c:1139)
    [  238.087491][  T318]  consume_skb (net/core/skbuff.c:1451)
    [  238.087757][  T318]  teql_master_xmit (net/sched/sch_teql.c:358)
    [  238.088116][  T318]  dev_hard_start_xmit (./include/linux/netdevice.h:5324 ./include/linux/netdevice.h:5333 net/core/dev.c:3871 net/core/dev.c:3887)
    [  238.088468][  T318]  sch_direct_xmit (net/sched/sch_generic.c:347)
    [  238.088820][  T318]  __qdisc_run (net/sched/sch_generic.c:420 (discriminator 1))
    [  238.089166][  T318]  __dev_queue_xmit (./include/net/sch_generic.h:229 ./include/net/pkt_sched.h:121 ./include/net/pkt_sched.h:117 net/core/dev.c:4196 net/core/dev.c:4802)
    
    Workflow to reproduce:
    1. Initialize a TEQL topology (dummy0 and ifb0 as slaves, teql0 up).
    2. Start multiple sender workers continuously transmitting packets
       through teql0 to drive teql_master_xmit().
    3. In parallel, repeatedly delete and re-add the root qdisc on
       dummy0 and ifb0 via RTNETLINK, forcing frequent teardown and reset activity
       (teql_destroy() / qdisc_reset()).
    4. After running both workloads concurrently for several iterations,
       KASAN reports slab-use-after-free or double-free in the skb free path.
    
    Fix this by moving dev_reset_queue to sch_generic.h and calling it, instead
    of qdisc_reset, in teql_destroy since it handles both the lock and lockless
    cases correctly for root qdiscs.
    
    Fixes: 96009c7d500e ("sched: replace __QDISC_STATE_RUNNING bit with a spin lock")
    Reported-by: Xianrui Dong <[email protected]>
    Tested-by: Xianrui Dong <[email protected]>
    Co-developed-by: Victor Nogueira <[email protected]>
    Signed-off-by: Victor Nogueira <[email protected]>
    Signed-off-by: Jamal Hadi Salim <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/smc: fix NULL dereference and UAF in smc_tcp_syn_recv_sock() [+ + +]
Author: Jiayuan Chen <[email protected]>
Date:   Thu Mar 12 17:29:07 2026 +0800

    net/smc: fix NULL dereference and UAF in smc_tcp_syn_recv_sock()
    
    [ Upstream commit 6d5e4538364b9ceb1ac2941a4deb86650afb3538 ]
    
    Syzkaller reported a panic in smc_tcp_syn_recv_sock() [1].
    
    smc_tcp_syn_recv_sock() is called in the TCP receive path
    (softirq) via icsk_af_ops->syn_recv_sock on the clcsock (TCP
    listening socket). It reads sk_user_data to get the smc_sock
    pointer. However, when the SMC listen socket is being closed
    concurrently, smc_close_active() sets clcsock->sk_user_data
    to NULL under sk_callback_lock, and then the smc_sock itself
    can be freed via sock_put() in smc_release().
    
    This leads to two issues:
    
    1) NULL pointer dereference: sk_user_data is NULL when
       accessed.
    2) Use-after-free: sk_user_data is read as non-NULL, but the
       smc_sock is freed before its fields (e.g., queued_smc_hs,
       ori_af_ops) are accessed.
    
    The race window looks like this (the syzkaller crash [1]
    triggers via the SYN cookie path: tcp_get_cookie_sock() ->
    smc_tcp_syn_recv_sock(), but the normal tcp_check_req() path
    has the same race):
    
      CPU A (softirq)              CPU B (process ctx)
    
      tcp_v4_rcv()
        TCP_NEW_SYN_RECV:
        sk = req->rsk_listener
        sock_hold(sk)
        /* No lock on listener */
                                   smc_close_active():
                                     write_lock_bh(cb_lock)
                                     sk_user_data = NULL
                                     write_unlock_bh(cb_lock)
                                     ...
                                     smc_clcsock_release()
                                     sock_put(smc->sk) x2
                                       -> smc_sock freed!
        tcp_check_req()
          smc_tcp_syn_recv_sock():
            smc = user_data(sk)
              -> NULL or dangling
            smc->queued_smc_hs
              -> crash!
    
    Note that the clcsock and smc_sock are two independent objects
    with separate refcounts. TCP stack holds a reference on the
    clcsock, which keeps it alive, but this does NOT prevent the
    smc_sock from being freed.
    
    Fix this by using RCU and refcount_inc_not_zero() to safely
    access smc_sock. Since smc_tcp_syn_recv_sock() is called in
    the TCP three-way handshake path, taking read_lock_bh on
    sk_callback_lock is too heavy and would not survive a SYN
    flood attack. Using rcu_read_lock() is much more lightweight.
    
    - Set SOCK_RCU_FREE on the SMC listen socket so that
      smc_sock freeing is deferred until after the RCU grace
      period. This guarantees the memory is still valid when
      accessed inside rcu_read_lock().
    - Use rcu_read_lock() to protect reading sk_user_data.
    - Use refcount_inc_not_zero(&smc->sk.sk_refcnt) to pin the
      smc_sock. If the refcount has already reached zero (close
      path completed), it returns false and we bail out safely.
    
    Note: smc_hs_congested() has a similar lockless read of
    sk_user_data without rcu_read_lock(), but it only checks for
    NULL and accesses the global smc_hs_wq, never dereferencing
    any smc_sock field, so it is not affected.
    
    Reproducer was verified with mdelay injection and smc_run,
    the issue no longer occurs with this patch applied.
    
    [1] https://syzkaller.appspot.com/bug?extid=827ae2bfb3a3529333e9
    
    Fixes: 8270d9c21041 ("net/smc: Limit backlog connections")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/all/[email protected]/T/
    Suggested-by: Eric Dumazet <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Signed-off-by: Jiayuan Chen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net: airoha: Remove airoha_dev_stop() in airoha_remove() [+ + +]
Author: Lorenzo Bianconi <[email protected]>
Date:   Fri Mar 13 12:27:00 2026 +0100

    net: airoha: Remove airoha_dev_stop() in airoha_remove()
    
    [ Upstream commit d4a533ad249e9fbdc2d0633f2ddd60a5b3a9a4ca ]
    
    Do not run airoha_dev_stop routine explicitly in airoha_remove()
    since ndo_stop() callback is already executed by unregister_netdev() in
    __dev_close_many routine if necessary and, doing so, we will end up causing
    an underflow in the qdma users atomic counters. Rely on networking subsystem
    to stop the device removing the airoha_eth module.
    
    Fixes: 23020f0493270 ("net: airoha: Introduce ethernet support for EN7581 SoC")
    Signed-off-by: Lorenzo Bianconi <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/20260313-airoha-remove-ndo_stop-remove-net-v2-1-67542c3ceeca@kernel.org
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: bcmgenet: increase WoL poll timeout [+ + +]
Author: Justin Chen <[email protected]>
Date:   Thu Mar 12 12:18:52 2026 -0700

    net: bcmgenet: increase WoL poll timeout
    
    [ Upstream commit 6cfc3bc02b977f2fba5f7268e6504d1931a774f7 ]
    
    Some systems require more than 5ms to get into WoL mode. Increase the
    timeout value to 50ms.
    
    Fixes: c51de7f3976b ("net: bcmgenet: add Wake-on-LAN support code")
    Signed-off-by: Justin Chen <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: bonding: fix NULL deref in bond_debug_rlb_hash_show [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Mon Mar 16 17:50:34 2026 -0700

    net: bonding: fix NULL deref in bond_debug_rlb_hash_show
    
    [ Upstream commit 605b52497bf89b3b154674deb135da98f916e390 ]
    
    rlb_clear_slave intentionally keeps RLB hash-table entries on
    the rx_hashtbl_used_head list with slave set to NULL when no
    replacement slave is available. However, bond_debug_rlb_hash_show
    visites client_info->slave without checking if it's NULL.
    
    Other used-list iterators in bond_alb.c already handle this NULL-slave
    state safely:
    
    - rlb_update_client returns early on !client_info->slave
    - rlb_req_update_slave_clients, rlb_clear_slave, and rlb_rebalance
    compare slave values before visiting
    - lb_req_update_subnet_clients continues if slave is NULL
    
    The following NULL deref crash can be trigger in
    bond_debug_rlb_hash_show:
    
    [    1.289791] BUG: kernel NULL pointer dereference, address: 0000000000000000
    [    1.292058] RIP: 0010:bond_debug_rlb_hash_show (drivers/net/bonding/bond_debugfs.c:41)
    [    1.293101] RSP: 0018:ffffc900004a7d00 EFLAGS: 00010286
    [    1.293333] RAX: 0000000000000000 RBX: ffff888102b48200 RCX: ffff888102b48204
    [    1.293631] RDX: ffff888102b48200 RSI: ffffffff839daad5 RDI: ffff888102815078
    [    1.293924] RBP: ffff888102815078 R08: ffff888102b4820e R09: 0000000000000000
    [    1.294267] R10: 0000000000000000 R11: 0000000000000000 R12: ffff888100f929c0
    [    1.294564] R13: ffff888100f92a00 R14: 0000000000000001 R15: ffffc900004a7ed8
    [    1.294864] FS:  0000000001395380(0000) GS:ffff888196e75000(0000) knlGS:0000000000000000
    [    1.295239] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [    1.295480] CR2: 0000000000000000 CR3: 0000000102adc004 CR4: 0000000000772ef0
    [    1.295897] Call Trace:
    [    1.296134]  seq_read_iter (fs/seq_file.c:231)
    [    1.296341]  seq_read (fs/seq_file.c:164)
    [    1.296493]  full_proxy_read (fs/debugfs/file.c:378 (discriminator 1))
    [    1.296658]  vfs_read (fs/read_write.c:572)
    [    1.296981]  ksys_read (fs/read_write.c:717)
    [    1.297132]  do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1))
    [    1.297325]  entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
    
    Add a NULL check and print "(none)" for entries with no assigned slave.
    
    Fixes: caafa84251b88 ("bonding: add the debugfs interface to see RLB hash table")
    Reported-by: Weiming Shi <[email protected]>
    Signed-off-by: Xiang Mei <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: dsa: bcm_sf2: fix missing clk_disable_unprepare() in error paths [+ + +]
Author: Anas Iqbal <[email protected]>
Date:   Wed Mar 18 08:42:12 2026 +0000

    net: dsa: bcm_sf2: fix missing clk_disable_unprepare() in error paths
    
    [ Upstream commit b48731849609cbd8c53785a48976850b443153fd ]
    
    Smatch reports:
    drivers/net/dsa/bcm_sf2.c:997 bcm_sf2_sw_resume() warn:
    'priv->clk' from clk_prepare_enable() not released on lines: 983,990.
    
    The clock enabled by clk_prepare_enable() in bcm_sf2_sw_resume()
    is not released if bcm_sf2_sw_rst() or bcm_sf2_cfp_resume() fails.
    
    Add the missing clk_disable_unprepare() calls in the error paths
    to properly release the clock resource.
    
    Fixes: e9ec5c3bd238 ("net: dsa: bcm_sf2: request and handle clocks")
    Reviewed-by: Jonas Gorski <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Signed-off-by: Anas Iqbal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: macb: fix uninitialized rx_fs_lock [+ + +]
Author: Fedor Pchelkin <[email protected]>
Date:   Mon Mar 16 13:38:25 2026 +0300

    net: macb: fix uninitialized rx_fs_lock
    
    [ Upstream commit 34b11cc56e4369bc08b1f4c4a04222d75ed596ce ]
    
    If hardware doesn't support RX Flow Filters, rx_fs_lock spinlock is not
    initialized leading to the following assertion splat triggerable via
    set_rxnfc callback.
    
    INFO: trying to register non-static key.
    The code is fine but needs lockdep annotation, or maybe
    you didn't initialize this object before use?
    turning off the locking correctness validator.
    CPU: 1 PID: 949 Comm: syz.0.6 Not tainted 6.1.164+ #113
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:88 [inline]
     dump_stack_lvl+0x8d/0xba lib/dump_stack.c:106
     assign_lock_key kernel/locking/lockdep.c:974 [inline]
     register_lock_class+0x141b/0x17f0 kernel/locking/lockdep.c:1287
     __lock_acquire+0x74f/0x6c40 kernel/locking/lockdep.c:4928
     lock_acquire kernel/locking/lockdep.c:5662 [inline]
     lock_acquire+0x190/0x4b0 kernel/locking/lockdep.c:5627
     __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
     _raw_spin_lock_irqsave+0x33/0x50 kernel/locking/spinlock.c:162
     gem_del_flow_filter drivers/net/ethernet/cadence/macb_main.c:3562 [inline]
     gem_set_rxnfc+0x533/0xac0 drivers/net/ethernet/cadence/macb_main.c:3667
     ethtool_set_rxnfc+0x18c/0x280 net/ethtool/ioctl.c:961
     __dev_ethtool net/ethtool/ioctl.c:2956 [inline]
     dev_ethtool+0x229c/0x6290 net/ethtool/ioctl.c:3095
     dev_ioctl+0x637/0x1070 net/core/dev_ioctl.c:510
     sock_do_ioctl+0x20d/0x2c0 net/socket.c:1215
     sock_ioctl+0x577/0x6d0 net/socket.c:1320
     vfs_ioctl fs/ioctl.c:51 [inline]
     __do_sys_ioctl fs/ioctl.c:870 [inline]
     __se_sys_ioctl fs/ioctl.c:856 [inline]
     __x64_sys_ioctl+0x18c/0x210 fs/ioctl.c:856
     do_syscall_x64 arch/x86/entry/common.c:46 [inline]
     do_syscall_64+0x35/0x80 arch/x86/entry/common.c:76
     entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    
    A more straightforward solution would be to always initialize rx_fs_lock,
    just like rx_fs_list.  However, in this case the driver set_rxnfc callback
    would return with a rather confusing error code, e.g. -EINVAL.  So deny
    set_rxnfc attempts directly if the RX filtering feature is not supported
    by hardware.
    
    Fixes: ae8223de3df5 ("net: macb: Added support for RX filtering")
    Signed-off-by: Fedor Pchelkin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: macb: fix use-after-free access to PTP clock [+ + +]
Author: Fedor Pchelkin <[email protected]>
Date:   Mon Mar 16 13:38:24 2026 +0300

    net: macb: fix use-after-free access to PTP clock
    
    commit 8da13e6d63c1a97f7302d342c89c4a56a55c7015 upstream.
    
    PTP clock is registered on every opening of the interface and destroyed on
    every closing.  However it may be accessed via get_ts_info ethtool call
    which is possible while the interface is just present in the kernel.
    
    BUG: KASAN: use-after-free in ptp_clock_index+0x47/0x50 drivers/ptp/ptp_clock.c:426
    Read of size 4 at addr ffff8880194345cc by task syz.0.6/948
    
    CPU: 1 PID: 948 Comm: syz.0.6 Not tainted 6.1.164+ #109
    Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.1-0-g3208b098f51a-prebuilt.qemu.org 04/01/2014
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:88 [inline]
     dump_stack_lvl+0x8d/0xba lib/dump_stack.c:106
     print_address_description mm/kasan/report.c:316 [inline]
     print_report+0x17f/0x496 mm/kasan/report.c:420
     kasan_report+0xd9/0x180 mm/kasan/report.c:524
     ptp_clock_index+0x47/0x50 drivers/ptp/ptp_clock.c:426
     gem_get_ts_info+0x138/0x1e0 drivers/net/ethernet/cadence/macb_main.c:3349
     macb_get_ts_info+0x68/0xb0 drivers/net/ethernet/cadence/macb_main.c:3371
     __ethtool_get_ts_info+0x17c/0x260 net/ethtool/common.c:558
     ethtool_get_ts_info net/ethtool/ioctl.c:2367 [inline]
     __dev_ethtool net/ethtool/ioctl.c:3017 [inline]
     dev_ethtool+0x2b05/0x6290 net/ethtool/ioctl.c:3095
     dev_ioctl+0x637/0x1070 net/core/dev_ioctl.c:510
     sock_do_ioctl+0x20d/0x2c0 net/socket.c:1215
     sock_ioctl+0x577/0x6d0 net/socket.c:1320
     vfs_ioctl fs/ioctl.c:51 [inline]
     __do_sys_ioctl fs/ioctl.c:870 [inline]
     __se_sys_ioctl fs/ioctl.c:856 [inline]
     __x64_sys_ioctl+0x18c/0x210 fs/ioctl.c:856
     do_syscall_x64 arch/x86/entry/common.c:46 [inline]
     do_syscall_64+0x35/0x80 arch/x86/entry/common.c:76
     entry_SYSCALL_64_after_hwframe+0x6e/0xd8
     </TASK>
    
    Allocated by task 457:
     kmalloc include/linux/slab.h:563 [inline]
     kzalloc include/linux/slab.h:699 [inline]
     ptp_clock_register+0x144/0x10e0 drivers/ptp/ptp_clock.c:235
     gem_ptp_init+0x46f/0x930 drivers/net/ethernet/cadence/macb_ptp.c:375
     macb_open+0x901/0xd10 drivers/net/ethernet/cadence/macb_main.c:2920
     __dev_open+0x2ce/0x500 net/core/dev.c:1501
     __dev_change_flags+0x56a/0x740 net/core/dev.c:8651
     dev_change_flags+0x92/0x170 net/core/dev.c:8722
     do_setlink+0xaf8/0x3a80 net/core/rtnetlink.c:2833
     __rtnl_newlink+0xbf4/0x1940 net/core/rtnetlink.c:3608
     rtnl_newlink+0x63/0xa0 net/core/rtnetlink.c:3655
     rtnetlink_rcv_msg+0x3c6/0xed0 net/core/rtnetlink.c:6150
     netlink_rcv_skb+0x15d/0x430 net/netlink/af_netlink.c:2511
     netlink_unicast_kernel net/netlink/af_netlink.c:1318 [inline]
     netlink_unicast+0x6d7/0xa30 net/netlink/af_netlink.c:1344
     netlink_sendmsg+0x97e/0xeb0 net/netlink/af_netlink.c:1872
     sock_sendmsg_nosec net/socket.c:718 [inline]
     __sock_sendmsg+0x14b/0x180 net/socket.c:730
     __sys_sendto+0x320/0x3b0 net/socket.c:2152
     __do_sys_sendto net/socket.c:2164 [inline]
     __se_sys_sendto net/socket.c:2160 [inline]
     __x64_sys_sendto+0xdc/0x1b0 net/socket.c:2160
     do_syscall_x64 arch/x86/entry/common.c:46 [inline]
     do_syscall_64+0x35/0x80 arch/x86/entry/common.c:76
     entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    
    Freed by task 938:
     kasan_slab_free include/linux/kasan.h:177 [inline]
     slab_free_hook mm/slub.c:1729 [inline]
     slab_free_freelist_hook mm/slub.c:1755 [inline]
     slab_free mm/slub.c:3687 [inline]
     __kmem_cache_free+0xbc/0x320 mm/slub.c:3700
     device_release+0xa0/0x240 drivers/base/core.c:2507
     kobject_cleanup lib/kobject.c:681 [inline]
     kobject_release lib/kobject.c:712 [inline]
     kref_put include/linux/kref.h:65 [inline]
     kobject_put+0x1cd/0x350 lib/kobject.c:729
     put_device+0x1b/0x30 drivers/base/core.c:3805
     ptp_clock_unregister+0x171/0x270 drivers/ptp/ptp_clock.c:391
     gem_ptp_remove+0x4e/0x1f0 drivers/net/ethernet/cadence/macb_ptp.c:404
     macb_close+0x1c8/0x270 drivers/net/ethernet/cadence/macb_main.c:2966
     __dev_close_many+0x1b9/0x310 net/core/dev.c:1585
     __dev_close net/core/dev.c:1597 [inline]
     __dev_change_flags+0x2bb/0x740 net/core/dev.c:8649
     dev_change_flags+0x92/0x170 net/core/dev.c:8722
     dev_ifsioc+0x151/0xe00 net/core/dev_ioctl.c:326
     dev_ioctl+0x33e/0x1070 net/core/dev_ioctl.c:572
     sock_do_ioctl+0x20d/0x2c0 net/socket.c:1215
     sock_ioctl+0x577/0x6d0 net/socket.c:1320
     vfs_ioctl fs/ioctl.c:51 [inline]
     __do_sys_ioctl fs/ioctl.c:870 [inline]
     __se_sys_ioctl fs/ioctl.c:856 [inline]
     __x64_sys_ioctl+0x18c/0x210 fs/ioctl.c:856
     do_syscall_x64 arch/x86/entry/common.c:46 [inline]
     do_syscall_64+0x35/0x80 arch/x86/entry/common.c:76
     entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    
    Set the PTP clock pointer to NULL after unregistering.
    
    Fixes: c2594d804d5c ("macb: Common code to enable ptp support for MACB/GEM")
    Cc: [email protected]
    Signed-off-by: Fedor Pchelkin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: macb: Introduce gem_init_rx_ring() [+ + +]
Author: Kevin Hao <[email protected]>
Date:   Fri Mar 20 08:42:02 2026 -0400

    net: macb: Introduce gem_init_rx_ring()
    
    [ Upstream commit 1a7124ecd655bcaf1845197fe416aa25cff4c3ea ]
    
    Extract the initialization code for the GEM RX ring into a new function.
    This change will be utilized in a subsequent patch. No functional changes
    are introduced.
    
    Signed-off-by: Kevin Hao <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 718d0766ce4c ("net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume [+ + +]
Author: Kevin Hao <[email protected]>
Date:   Fri Mar 20 08:42:03 2026 -0400

    net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume
    
    [ Upstream commit 718d0766ce4c7634ce62fa78b526ea7263487edd ]
    
    On certain platforms, such as AMD Versal boards, the tx/rx queue pointer
    registers are cleared after suspend, and the rx queue pointer register
    is also disabled during suspend if WOL is enabled. Previously, we assumed
    that these registers would be restored by macb_mac_link_up(). However,
    in commit bf9cf80cab81, macb_init_buffers() was moved from
    macb_mac_link_up() to macb_open(). Therefore, we should call
    macb_init_buffers() to reinitialize the tx/rx queue pointer registers
    during resume.
    
    Due to the reset of these two registers, we also need to adjust the
    tx/rx rings accordingly. The tx ring will be handled by
    gem_shuffle_tx_rings() in macb_mac_link_up(), so we only need to
    initialize the rx ring here.
    
    Fixes: bf9cf80cab81 ("net: macb: Fix tx/rx malfunction after phy link down and up")
    Reported-by: Quanyang Wang <[email protected]>
    Signed-off-by: Kevin Hao <[email protected]>
    Tested-by: Quanyang Wang <[email protected]>
    Cc: [email protected]
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: mana: fix use-after-free in mana_hwc_destroy_channel() by reordering teardown [+ + +]
Author: Dipayaan Roy <[email protected]>
Date:   Wed Mar 11 12:22:04 2026 -0700

    net: mana: fix use-after-free in mana_hwc_destroy_channel() by reordering teardown
    
    [ Upstream commit fa103fc8f56954a60699a29215cb713448a39e87 ]
    
    A potential race condition exists in mana_hwc_destroy_channel() where
    hwc->caller_ctx is freed before the HWC's Completion Queue (CQ) and
    Event Queue (EQ) are destroyed. This allows an in-flight CQ interrupt
    handler to dereference freed memory, leading to a use-after-free or
    NULL pointer dereference in mana_hwc_handle_resp().
    
    mana_smc_teardown_hwc() signals the hardware to stop but does not
    synchronize against IRQ handlers already executing on other CPUs. The
    IRQ synchronization only happens in mana_hwc_destroy_cq() via
    mana_gd_destroy_eq() -> mana_gd_deregister_irq(). Since this runs
    after kfree(hwc->caller_ctx), a concurrent mana_hwc_rx_event_handler()
    can dereference freed caller_ctx (and rxq->msg_buf) in
    mana_hwc_handle_resp().
    
    Fix this by reordering teardown to reverse-of-creation order: destroy
    the TX/RX work queues and CQ/EQ before freeing hwc->caller_ctx. This
    ensures all in-flight interrupt handlers complete before the memory they
    access is freed.
    
    Fixes: ca9c54d2d6a5 ("net: mana: Add a driver for Microsoft Azure Network Adapter (MANA)")
    Reviewed-by: Haiyang Zhang <[email protected]>
    Signed-off-by: Dipayaan Roy <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/abHA3AjNtqa1nx9k@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: mvpp2: guard flow control update with global_tx_fc in buffer switching [+ + +]
Author: Muhammad Hammad Ijaz <[email protected]>
Date:   Mon Mar 16 12:31:01 2026 -0700

    net: mvpp2: guard flow control update with global_tx_fc in buffer switching
    
    [ Upstream commit 8a63baadf08453f66eb582fdb6dd234f72024723 ]
    
    mvpp2_bm_switch_buffers() unconditionally calls
    mvpp2_bm_pool_update_priv_fc() when switching between per-cpu and
    shared buffer pool modes. This function programs CM3 flow control
    registers via mvpp2_cm3_read()/mvpp2_cm3_write(), which dereference
    priv->cm3_base without any NULL check.
    
    When the CM3 SRAM resource is not present in the device tree (the
    third reg entry added by commit 60523583b07c ("dts: marvell: add CM3
    SRAM memory to cp11x ethernet device tree")), priv->cm3_base remains
    NULL and priv->global_tx_fc is false. Any operation that triggers
    mvpp2_bm_switch_buffers(), for example an MTU change that crosses
    the jumbo frame threshold, will crash:
    
      Unable to handle kernel NULL pointer dereference at
      virtual address 0000000000000000
      Mem abort info:
        ESR = 0x0000000096000006
        EC = 0x25: DABT (current EL), IL = 32 bits
      pc : readl+0x0/0x18
      lr : mvpp2_cm3_read.isra.0+0x14/0x20
      Call trace:
       readl+0x0/0x18
       mvpp2_bm_pool_update_fc+0x40/0x12c
       mvpp2_bm_pool_update_priv_fc+0x94/0xd8
       mvpp2_bm_switch_buffers.isra.0+0x80/0x1c0
       mvpp2_change_mtu+0x140/0x380
       __dev_set_mtu+0x1c/0x38
       dev_set_mtu_ext+0x78/0x118
       dev_set_mtu+0x48/0xa8
       dev_ifsioc+0x21c/0x43c
       dev_ioctl+0x2d8/0x42c
       sock_ioctl+0x314/0x378
    
    Every other flow control call site in the driver already guards
    hardware access with either priv->global_tx_fc or port->tx_fc.
    mvpp2_bm_switch_buffers() is the only place that omits this check.
    
    Add the missing priv->global_tx_fc guard to both the disable and
    re-enable calls in mvpp2_bm_switch_buffers(), consistent with the
    rest of the driver.
    
    Fixes: 3a616b92a9d1 ("net: mvpp2: Add TX flow control support for jumbo frames")
    Signed-off-by: Muhammad Hammad Ijaz <[email protected]>
    Reviewed-by: Gunnar Kudrjavets <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: shaper: protect from late creation of hierarchy [+ + +]
Author: Jakub Kicinski <[email protected]>
Date:   Tue Mar 17 09:10:14 2026 -0700

    net: shaper: protect from late creation of hierarchy
    
    [ Upstream commit d75ec7e8ba1979a1eb0b9211d94d749cdce849c8 ]
    
    We look up a netdev during prep of Netlink ops (pre- callbacks)
    and take a ref to it. Then later in the body of the callback
    we take its lock or RCU which are the actual protections.
    
    The netdev may get unregistered in between the time we take
    the ref and the time we lock it. We may allocate the hierarchy
    after flush has already run, which would lead to a leak.
    
    Take the instance lock in pre- already, this saves us from the race
    and removes the need for dedicated lock/unlock callbacks completely.
    After all, if there's any chance of write happening concurrently
    with the flush - we're back to leaking the hierarchy.
    
    We may take the lock for devices which don't support shapers but
    we're only dealing with SET operations here, not taking the lock
    would be optimizing for an error case.
    
    Fixes: 93954b40f6a4 ("net-shapers: implement NL set and delete operations")
    Link: https://lore.kernel.org/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: shaper: protect late read accesses to the hierarchy [+ + +]
Author: Jakub Kicinski <[email protected]>
Date:   Tue Mar 17 09:10:13 2026 -0700

    net: shaper: protect late read accesses to the hierarchy
    
    [ Upstream commit 0f9ea7141f365b4f27226898e62220fb98ef8dc6 ]
    
    We look up a netdev during prep of Netlink ops (pre- callbacks)
    and take a ref to it. Then later in the body of the callback
    we take its lock or RCU which are the actual protections.
    
    This is not proper, a conversion from a ref to a locked netdev
    must include a liveness check (a check if the netdev hasn't been
    unregistered already). Fix the read cases (those under RCU).
    Writes needs a separate change to protect from creating the
    hierarchy after flush has already run.
    
    Fixes: 4b623f9f0f59 ("net-shapers: implement NL get operation")
    Reported-by: Paul Moses <[email protected]>
    Link: https://lore.kernel.org/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: ti: icssg-prueth: Fix memory leak in XDP_DROP for non-zero-copy mode [+ + +]
Author: Meghana Malladi <[email protected]>
Date:   Wed Mar 11 15:24:41 2026 +0530

    net: ti: icssg-prueth: Fix memory leak in XDP_DROP for non-zero-copy mode
    
    [ Upstream commit 719d3e71691db7c4f1658ba5a6d1472928121594 ]
    
    Page recycling was removed from the XDP_DROP path in emac_run_xdp() to
    avoid conflicts with AF_XDP zero-copy mode, which uses xsk_buff_free()
    instead.
    
    However, this causes a memory leak when running XDP programs that drop
    packets in non-zero-copy mode (standard page pool mode). The pages are
    never returned to the page pool, leading to OOM conditions.
    
    Fix this by handling cleanup in the caller, emac_rx_packet().
    When emac_run_xdp() returns ICSSG_XDP_CONSUMED for XDP_DROP, the
    caller now recycles the page back to the page pool. The zero-copy
    path, emac_rx_packet_zc() already handles cleanup correctly with
    xsk_buff_free().
    
    Fixes: 7a64bb388df3 ("net: ti: icssg-prueth: Add AF_XDP zero copy for RX")
    Signed-off-by: Meghana Malladi <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: usb: aqc111: Do not perform PM inside suspend callback [+ + +]
Author: Nikola Z. Ivanov <[email protected]>
Date:   Fri Mar 13 16:16:43 2026 +0200

    net: usb: aqc111: Do not perform PM inside suspend callback
    
    [ Upstream commit 069c8f5aebe4d5224cf62acc7d4b3486091c658a ]
    
    syzbot reports "task hung in rpm_resume"
    
    This is caused by aqc111_suspend calling
    the PM variant of its write_cmd routine.
    
    The simplified call trace looks like this:
    
    rpm_suspend()
      usb_suspend_both() - here udev->dev.power.runtime_status == RPM_SUSPENDING
        aqc111_suspend() - called for the usb device interface
          aqc111_write32_cmd()
            usb_autopm_get_interface()
              pm_runtime_resume_and_get()
                rpm_resume() - here we call rpm_resume() on our parent
                  rpm_resume() - Here we wait for a status change that will never happen.
    
    At this point we block another task which holds
    rtnl_lock and locks up the whole networking stack.
    
    Fix this by replacing the write_cmd calls with their _nopm variants
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=48dc1e8dfc92faf1124c
    Fixes: e58ba4544c77 ("net: usb: aqc111: Add support for wake on LAN by MAGIC packet")
    Signed-off-by: Nikola Z. Ivanov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: usb: cdc_ncm: add ndpoffset to NDP16 nframes bounds check [+ + +]
Author: Tobi Gaertner <[email protected]>
Date:   Fri Mar 13 22:46:39 2026 -0700

    net: usb: cdc_ncm: add ndpoffset to NDP16 nframes bounds check
    
    [ Upstream commit 2aa8a4fa8d5b7d0e1ebcec100e1a4d80a1f4b21a ]
    
    cdc_ncm_rx_verify_ndp16() validates that the NDP header and its DPE
    entries fit within the skb. The first check correctly accounts for
    ndpoffset:
    
      if ((ndpoffset + sizeof(struct usb_cdc_ncm_ndp16)) > skb_in->len)
    
    but the second check omits it:
    
      if ((sizeof(struct usb_cdc_ncm_ndp16) +
           ret * (sizeof(struct usb_cdc_ncm_dpe16))) > skb_in->len)
    
    This validates the DPE array size against the total skb length as if
    the NDP were at offset 0, rather than at ndpoffset. When the NDP is
    placed near the end of the NTB (large wNdpIndex), the DPE entries can
    extend past the skb data buffer even though the check passes.
    cdc_ncm_rx_fixup() then reads out-of-bounds memory when iterating
    the DPE array.
    
    Add ndpoffset to the nframes bounds check and use struct_size_t() to
    express the NDP-plus-DPE-array size more clearly.
    
    Fixes: ff06ab13a4cc ("net: cdc_ncm: splitting rx_fixup for code reuse")
    Signed-off-by: Tobi Gaertner <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: usb: cdc_ncm: add ndpoffset to NDP32 nframes bounds check [+ + +]
Author: Tobi Gaertner <[email protected]>
Date:   Fri Mar 13 22:46:40 2026 -0700

    net: usb: cdc_ncm: add ndpoffset to NDP32 nframes bounds check
    
    [ Upstream commit 77914255155e68a20aa41175edeecf8121dac391 ]
    
    The same bounds-check bug fixed for NDP16 in the previous patch also
    exists in cdc_ncm_rx_verify_ndp32(). The DPE array size is validated
    against the total skb length without accounting for ndpoffset, allowing
    out-of-bounds reads when the NDP32 is placed near the end of the NTB.
    
    Add ndpoffset to the nframes bounds check and use struct_size_t() to
    express the NDP-plus-DPE-array size more clearly.
    
    Compile-tested only.
    
    Fixes: 0fa81b304a79 ("cdc_ncm: Implement the 32-bit version of NCM Transfer Block")
    Signed-off-by: Tobi Gaertner <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
netconsole: fix sysdata_release_enabled_show checking wrong flag [+ + +]
Author: Breno Leitao <[email protected]>
Date:   Wed Mar 18 20:41:31 2026 -0400

    netconsole: fix sysdata_release_enabled_show checking wrong flag
    
    [ Upstream commit 5af6e8b54927f7a8d3c7fd02b1bdc09e93d5c079 ]
    
    sysdata_release_enabled_show() checks SYSDATA_TASKNAME instead of
    SYSDATA_RELEASE, causing the configfs release_enabled attribute to
    reflect the taskname feature state rather than the release feature
    state. This is a copy-paste error from the adjacent
    sysdata_taskname_enabled_show() function.
    
    The corresponding _store function already uses the correct
    SYSDATA_RELEASE flag.
    
    Fixes: 343f90227070 ("netconsole: implement configfs for release_enabled")
    Signed-off-by: Breno Leitao <[email protected]>
    Cc: [email protected]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
netdevsim: drop PSP ext ref on forward failure [+ + +]
Author: Wesley Atwell <[email protected]>
Date:   Tue Mar 17 00:14:31 2026 -0600

    netdevsim: drop PSP ext ref on forward failure
    
    [ Upstream commit 7d9351435ebba08bbb60f42793175c9dc714d2fb ]
    
    nsim_do_psp() takes an extra reference to the PSP skb extension so the
    extension survives __dev_forward_skb(). That forward path scrubs the skb
    and drops attached skb extensions before nsim_psp_handle_ext() can
    reattach the PSP metadata.
    
    If __dev_forward_skb() fails in nsim_forward_skb(), the function returns
    before nsim_psp_handle_ext() can attach that extension to the skb, leaving
    the extra reference leaked.
    
    Drop the saved PSP extension reference before returning from the
    forward-failure path. Guard the put because plain or non-decapsulated
    traffic can also fail forwarding without ever taking the extra PSP
    reference.
    
    Fixes: f857478d6206 ("netdevsim: a basic test PSP implementation")
    Signed-off-by: Wesley Atwell <[email protected]>
    Reviewed-by: Daniel Zahka <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
netfilter: bpf: defer hook memory release until rcu readers are done [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Tue Mar 17 12:23:08 2026 +0100

    netfilter: bpf: defer hook memory release until rcu readers are done
    
    [ Upstream commit 24f90fa3994b992d1a09003a3db2599330a5232a ]
    
    Yiming Qian reports UaF when concurrent process is dumping hooks via
    nfnetlink_hooks:
    
    BUG: KASAN: slab-use-after-free in nfnl_hook_dump_one.isra.0+0xe71/0x10f0
    Read of size 8 at addr ffff888003edbf88 by task poc/79
    Call Trace:
     <TASK>
     nfnl_hook_dump_one.isra.0+0xe71/0x10f0
     netlink_dump+0x554/0x12b0
     nfnl_hook_get+0x176/0x230
     [..]
    
    Defer release until after concurrent readers have completed.
    
    Reported-by: Yiming Qian <[email protected]>
    Fixes: 84601d6ee68a ("bpf: add bpf_link support for BPF_NETFILTER programs")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: conntrack: add missing netlink policy validations [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Tue Mar 10 00:28:29 2026 +0100

    netfilter: conntrack: add missing netlink policy validations
    
    [ Upstream commit f900e1d77ee0ef87bfb5ab3fe60f0b3d8ad5ba05 ]
    
    Hyunwoo Kim reports out-of-bounds access in sctp and ctnetlink.
    
    These attributes are used by the kernel without any validation.
    Extend the netlink policies accordingly.
    
    Quoting the reporter:
      nlattr_to_sctp() assigns the user-supplied CTA_PROTOINFO_SCTP_STATE
      value directly to ct->proto.sctp.state without checking that it is
      within the valid range. [..]
    
      and: ... with exp->dir = 100, the access at
      ct->master->tuplehash[100] reads 5600 bytes past the start of a
      320-byte nf_conn object, causing a slab-out-of-bounds read confirmed by
      UBSAN.
    
    Fixes: 076a0ca02644 ("netfilter: ctnetlink: add NAT support for expectations")
    Fixes: a258860e01b8 ("netfilter: ctnetlink: add full support for SCTP to ctnetlink")
    Reported-by: Hyunwoo Kim <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: ctnetlink: fix use-after-free in ctnetlink_dump_exp_ct() [+ + +]
Author: Hyunwoo Kim <[email protected]>
Date:   Sun Mar 8 02:21:37 2026 +0900

    netfilter: ctnetlink: fix use-after-free in ctnetlink_dump_exp_ct()
    
    [ Upstream commit 5cb81eeda909dbb2def209dd10636b51549a3f8a ]
    
    ctnetlink_dump_exp_ct() stores a conntrack pointer in cb->data for the
    netlink dump callback ctnetlink_exp_ct_dump_table(), but drops the
    conntrack reference immediately after netlink_dump_start().  When the
    dump spans multiple rounds, the second recvmsg() triggers the dump
    callback which dereferences the now-freed conntrack via nfct_help(ct),
    leading to a use-after-free on ct->ext.
    
    The bug is that the netlink_dump_control has no .start or .done
    callbacks to manage the conntrack reference across dump rounds.  Other
    dump functions in the same file (e.g. ctnetlink_get_conntrack) properly
    use .start/.done callbacks for this purpose.
    
    Fix this by adding .start and .done callbacks that hold and release the
    conntrack reference for the duration of the dump, and move the
    nfct_help() call after the cb->args[0] early-return check in the dump
    callback to avoid dereferencing ct->ext unnecessarily.
    
     BUG: KASAN: slab-use-after-free in ctnetlink_exp_ct_dump_table+0x4f/0x2e0
     Read of size 8 at addr ffff88810597ebf0 by task ctnetlink_poc/133
    
     CPU: 1 UID: 0 PID: 133 Comm: ctnetlink_poc Not tainted 7.0.0-rc2+ #3 PREEMPTLAZY
     Call Trace:
      <TASK>
      ctnetlink_exp_ct_dump_table+0x4f/0x2e0
      netlink_dump+0x333/0x880
      netlink_recvmsg+0x3e2/0x4b0
      ? aa_sk_perm+0x184/0x450
      sock_recvmsg+0xde/0xf0
    
     Allocated by task 133:
      kmem_cache_alloc_noprof+0x134/0x440
      __nf_conntrack_alloc+0xa8/0x2b0
      ctnetlink_create_conntrack+0xa1/0x900
      ctnetlink_new_conntrack+0x3cf/0x7d0
      nfnetlink_rcv_msg+0x48e/0x510
      netlink_rcv_skb+0xc9/0x1f0
      nfnetlink_rcv+0xdb/0x220
      netlink_unicast+0x3ec/0x590
      netlink_sendmsg+0x397/0x690
      __sys_sendmsg+0xf4/0x180
    
     Freed by task 0:
      slab_free_after_rcu_debug+0xad/0x1e0
      rcu_core+0x5c3/0x9c0
    
    Fixes: e844a928431f ("netfilter: ctnetlink: allow to dump expectation per master conntrack")
    Signed-off-by: Hyunwoo Kim <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_conntrack_h323: check for zero length in DecodeQ931() [+ + +]
Author: Jenny Guanni Qu <[email protected]>
Date:   Thu Mar 12 14:49:50 2026 +0000

    netfilter: nf_conntrack_h323: check for zero length in DecodeQ931()
    
    [ Upstream commit f173d0f4c0f689173f8cdac79991043a4a89bf66 ]
    
    In DecodeQ931(), the UserUserIE code path reads a 16-bit length from
    the packet, then decrements it by 1 to skip the protocol discriminator
    byte before passing it to DecodeH323_UserInformation(). If the encoded
    length is 0, the decrement wraps to -1, which is then passed as a
    large value to the decoder, leading to an out-of-bounds read.
    
    Add a check to ensure len is positive after the decrement.
    
    Fixes: 5e35941d9901 ("[NETFILTER]: Add H.323 conntrack/NAT helper")
    Reported-by: Klaudia Kloc <[email protected]>
    Reported-by: Dawid Moczadło <[email protected]>
    Tested-by: Jenny Guanni Qu <[email protected]>
    Signed-off-by: Jenny Guanni Qu <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_conntrack_h323: fix OOB read in decode_int() CONS case [+ + +]
Author: Jenny Guanni Qu <[email protected]>
Date:   Thu Mar 12 02:29:32 2026 +0000

    netfilter: nf_conntrack_h323: fix OOB read in decode_int() CONS case
    
    [ Upstream commit 1e3a3593162c96e8a8de48b1e14f60c3b57fca8a ]
    
    In decode_int(), the CONS case calls get_bits(bs, 2) to read a length
    value, then calls get_uint(bs, len) without checking that len bytes
    remain in the buffer. The existing boundary check only validates the
    2 bits for get_bits(), not the subsequent 1-4 bytes that get_uint()
    reads. This allows a malformed H.323/RAS packet to cause a 1-4 byte
    slab-out-of-bounds read.
    
    Add a boundary check for len bytes after get_bits() and before
    get_uint().
    
    Fixes: 5e35941d9901 ("[NETFILTER]: Add H.323 conntrack/NAT helper")
    Reported-by: Klaudia Kloc <[email protected]>
    Reported-by: Dawid Moczadło <[email protected]>
    Signed-off-by: Jenny Guanni Qu <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_conntrack_sip: fix Content-Length u32 truncation in sip_help_tcp() [+ + +]
Author: Lukas Johannes Möller <[email protected]>
Date:   Tue Mar 10 21:49:01 2026 +0000

    netfilter: nf_conntrack_sip: fix Content-Length u32 truncation in sip_help_tcp()
    
    [ Upstream commit fbce58e719a17aa215c724473fd5baaa4a8dc57c ]
    
    sip_help_tcp() parses the SIP Content-Length header with
    simple_strtoul(), which returns unsigned long, but stores the result in
    unsigned int clen.  On 64-bit systems, values exceeding UINT_MAX are
    silently truncated before computing the SIP message boundary.
    
    For example, Content-Length 4294967328 (2^32 + 32) is truncated to 32,
    causing the parser to miscalculate where the current message ends.  The
    loop then treats trailing data in the TCP segment as a second SIP
    message and processes it through the SDP parser.
    
    Fix this by changing clen to unsigned long to match the return type of
    simple_strtoul(), and reject Content-Length values that exceed the
    remaining TCP payload length.
    
    Fixes: f5b321bd37fb ("netfilter: nf_conntrack_sip: add TCP support")
    Signed-off-by: Lukas Johannes Möller <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_flow_table_ip: reset mac header before vlan push [+ + +]
Author: Eric Woudstra <[email protected]>
Date:   Tue Mar 10 15:39:33 2026 +0100

    netfilter: nf_flow_table_ip: reset mac header before vlan push
    
    [ Upstream commit a3aca98aec9a278ee56da4f8013bfa1dd1a1c298 ]
    
    With double vlan tagged packets in the fastpath, getting the error:
    
    skb_vlan_push got skb with skb->data not at mac header (offset 18)
    
    Call skb_reset_mac_header() before calling skb_vlan_push().
    
    Fixes: c653d5a78f34 ("netfilter: flowtable: inline vlan encapsulation in xmit path")
    Signed-off-by: Eric Woudstra <[email protected]>
    Acked-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_tables: release flowtable after rcu grace period on error [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Tue Mar 17 20:00:26 2026 +0100

    netfilter: nf_tables: release flowtable after rcu grace period on error
    
    [ Upstream commit d73f4b53aaaea4c95f245e491aa5eeb8a21874ce ]
    
    Call synchronize_rcu() after unregistering the hooks from error path,
    since a hook that already refers to this flowtable can be already
    registered, exposing this flowtable to packet path and nfnetlink_hook
    control plane.
    
    This error path is rare, it should only happen by reaching the maximum
    number hooks or by failing to set up to hardware offload, just call
    synchronize_rcu().
    
    There is a check for already used device hooks by different flowtable
    that could result in EEXIST at this late stage. The hook parser can be
    updated to perform this check earlier to this error path really becomes
    rarely exercised.
    
    Uncovered by KASAN reported as use-after-free from nfnetlink_hook path
    when dumping hooks.
    
    Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend")
    Reported-by: Yiming Qian <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nft_ct: drop pending enqueued packets on removal [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Thu Mar 12 13:48:47 2026 +0100

    netfilter: nft_ct: drop pending enqueued packets on removal
    
    [ Upstream commit 36eae0956f659e48d5366d9b083d9417f3263ddc ]
    
    Packets sitting in nfqueue might hold a reference to:
    
    - templates that specify the conntrack zone, because a percpu area is
      used and module removal is possible.
    - conntrack timeout policies and helper, where object removal leave
      a stale reference.
    
    Since these objects can just go away, drop enqueued packets to avoid
    stale reference to them.
    
    If there is a need for finer grain removal, this logic can be revisited
    to make selective packet drop upon dependencies.
    
    Fixes: 7e0b2b57f01d ("netfilter: nft_ct: add ct timeout support")
    Reported-by: Yiming Qian <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: xt_CT: drop pending enqueued packets on template removal [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Thu Mar 12 13:48:48 2026 +0100

    netfilter: xt_CT: drop pending enqueued packets on template removal
    
    [ Upstream commit f62a218a946b19bb59abdd5361da85fa4606b96b ]
    
    Templates refer to objects that can go away while packets are sitting in
    nfqueue refer to:
    
    - helper, this can be an issue on module removal.
    - timeout policy, nfnetlink_cttimeout might remove it.
    
    The use of templates with zone and event cache filter are safe, since
    this just copies values.
    
    Flush these enqueued packets in case the template rule gets removed.
    
    Fixes: 24de58f46516 ("netfilter: xt_CT: allow to attach timeout policy + glue code")
    Reported-by: Yiming Qian <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: xt_time: use unsigned int for monthday bit shift [+ + +]
Author: Jenny Guanni Qu <[email protected]>
Date:   Thu Mar 12 14:59:49 2026 +0000

    netfilter: xt_time: use unsigned int for monthday bit shift
    
    [ Upstream commit 00050ec08cecfda447e1209b388086d76addda3a ]
    
    The monthday field can be up to 31, and shifting a signed integer 1
    by 31 positions (1 << 31) is undefined behavior in C, as the result
    overflows a 32-bit signed int. Use 1U to ensure well-defined behavior
    for all valid monthday values.
    
    Change the weekday shift to 1U as well for consistency.
    
    Fixes: ee4411a1b1e0 ("[NETFILTER]: x_tables: add xt_time match")
    Reported-by: Klaudia Kloc <[email protected]>
    Reported-by: Dawid Moczadło <[email protected]>
    Tested-by: Jenny Guanni Qu <[email protected]>
    Signed-off-by: Jenny Guanni Qu <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
nf_tables: nft_dynset: fix possible stateful expression memleak in error path [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Thu Mar 12 12:38:59 2026 +0100

    nf_tables: nft_dynset: fix possible stateful expression memleak in error path
    
    [ Upstream commit 0548a13b5a145b16e4da0628b5936baf35f51b43 ]
    
    If cloning the second stateful expression in the element via GFP_ATOMIC
    fails, then the first stateful expression remains in place without being
    released.
    
       unreferenced object (percpu) 0x607b97e9cab8 (size 16):
         comm "softirq", pid 0, jiffies 4294931867
         hex dump (first 16 bytes on cpu 3):
           00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
         backtrace (crc 0):
           pcpu_alloc_noprof+0x453/0xd80
           nft_counter_clone+0x9c/0x190 [nf_tables]
           nft_expr_clone+0x8f/0x1b0 [nf_tables]
           nft_dynset_new+0x2cb/0x5f0 [nf_tables]
           nft_rhash_update+0x236/0x11c0 [nf_tables]
           nft_dynset_eval+0x11f/0x670 [nf_tables]
           nft_do_chain+0x253/0x1700 [nf_tables]
           nft_do_chain_ipv4+0x18d/0x270 [nf_tables]
           nf_hook_slow+0xaa/0x1e0
           ip_local_deliver+0x209/0x330
    
    Fixes: 563125a73ac3 ("netfilter: nftables: generalize set extension to support for several expressions")
    Reported-by: Gurpreet Shergill <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFC: nxp-nci: allow GPIOs to sleep [+ + +]
Author: Ian Ray <[email protected]>
Date:   Tue Mar 17 10:53:36 2026 +0200

    NFC: nxp-nci: allow GPIOs to sleep
    
    commit 55dc632ab2ac2889b15995a9eef56c753d48ebc7 upstream.
    
    Allow the firmware and enable GPIOs to sleep.
    
    This fixes a `WARN_ON' and allows the driver to operate GPIOs which are
    connected to I2C GPIO expanders.
    
    -- >8 --
    kernel: WARNING: CPU: 3 PID: 2636 at drivers/gpio/gpiolib.c:3880 gpiod_set_value+0x88/0x98
    -- >8 --
    
    Fixes: 43201767b44c ("NFC: nxp-nci: Convert to use GPIO descriptor")
    Cc: [email protected]
    Signed-off-by: Ian Ray <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
nfnetlink_osf: validate individual option lengths in fingerprints [+ + +]
Author: Weiming Shi <[email protected]>
Date:   Thu Mar 19 15:32:44 2026 +0800

    nfnetlink_osf: validate individual option lengths in fingerprints
    
    [ Upstream commit dbdfaae9609629a9569362e3b8f33d0a20fd783c ]
    
    nfnl_osf_add_callback() validates opt_num bounds and string
    NUL-termination but does not check individual option length fields.
    A zero-length option causes nf_osf_match_one() to enter the option
    matching loop even when foptsize sums to zero, which matches packets
    with no TCP options where ctx->optp is NULL:
    
     Oops: general protection fault
     KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
     RIP: 0010:nf_osf_match_one (net/netfilter/nfnetlink_osf.c:98)
     Call Trace:
      nf_osf_match (net/netfilter/nfnetlink_osf.c:227)
      xt_osf_match_packet (net/netfilter/xt_osf.c:32)
      ipt_do_table (net/ipv4/netfilter/ip_tables.c:293)
      nf_hook_slow (net/netfilter/core.c:623)
      ip_local_deliver (net/ipv4/ip_input.c:262)
      ip_rcv (net/ipv4/ip_input.c:573)
    
    Additionally, an MSS option (kind=2) with length < 4 causes
    out-of-bounds reads when nf_osf_match_one() unconditionally accesses
    optp[2] and optp[3] for MSS value extraction.  While RFC 9293
    section 3.2 specifies that the MSS option is always exactly 4
    bytes (Kind=2, Length=4), the check uses "< 4" rather than
    "!= 4" because lengths greater than 4 do not cause memory
    safety issues -- the buffer is guaranteed to be at least
    foptsize bytes by the ctx->optsize == foptsize check.
    
    Reject fingerprints where any option has zero length, or where an MSS
    option has length less than 4, at add time rather than trusting these
    values in the packet matching hot path.
    
    Fixes: 11eeef41d5f6 ("netfilter: passive OS fingerprint xtables match")
    Reported-by: Xiang Mei <[email protected]>
    Signed-off-by: Weiming Shi <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFSD: Defer sub-object cleanup in export put callbacks [+ + +]
Author: Chuck Lever <[email protected]>
Date:   Thu Feb 19 16:50:16 2026 -0500

    NFSD: Defer sub-object cleanup in export put callbacks
    
    commit 48db892356d6cb80f6942885545de4a6dd8d2a29 upstream.
    
    svc_export_put() calls path_put() and auth_domain_put() immediately
    when the last reference drops, before the RCU grace period. RCU
    readers in e_show() and c_show() access both ex_path (via
    seq_path/d_path) and ex_client->name (via seq_escape) without
    holding a reference. If cache_clean removes the entry and drops the
    last reference concurrently, the sub-objects are freed while still
    in use, producing a NULL pointer dereference in d_path.
    
    Commit 2530766492ec ("nfsd: fix UAF when access ex_uuid or
    ex_stats") moved kfree of ex_uuid and ex_stats into the
    call_rcu callback, but left path_put() and auth_domain_put() running
    before the grace period because both may sleep and call_rcu
    callbacks execute in softirq context.
    
    Replace call_rcu/kfree_rcu with queue_rcu_work(), which defers the
    callback until after the RCU grace period and executes it in process
    context where sleeping is permitted. This allows path_put() and
    auth_domain_put() to be moved into the deferred callback alongside
    the other resource releases. Apply the same fix to expkey_put(),
    which has the identical pattern with ek_path and ek_client.
    
    A dedicated workqueue scopes the shutdown drain to only NFSD
    export release work items; flushing the shared
    system_unbound_wq would stall on unrelated work from other
    subsystems. nfsd_export_shutdown() uses rcu_barrier() followed
    by flush_workqueue() to ensure all deferred release callbacks
    complete before the export caches are destroyed.
    
    Reported-by: Misbah Anjum N <[email protected]>
    Closes: https://lore.kernel.org/linux-nfs/[email protected]/
    Fixes: c224edca7af0 ("nfsd: no need get cache ref when protected by rcu")
    Fixes: 1b10f0b603c0 ("SUNRPC: no need get cache ref when protected by rcu")
    Cc: [email protected]
    Reviwed-by: Jeff Layton <[email protected]>
    Reviewed-by: NeilBrown <[email protected]>
    Tested-by: Olga Kornievskaia <[email protected]>
    Signed-off-by: Chuck Lever <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
nfsd: fix heap overflow in NFSv4.0 LOCK replay cache [+ + +]
Author: Jeff Layton <[email protected]>
Date:   Tue Feb 24 11:33:35 2026 -0500

    nfsd: fix heap overflow in NFSv4.0 LOCK replay cache
    
    commit 5133b61aaf437e5f25b1b396b14242a6bb0508e2 upstream.
    
    The NFSv4.0 replay cache uses a fixed 112-byte inline buffer
    (rp_ibuf[NFSD4_REPLAY_ISIZE]) to store encoded operation responses.
    This size was calculated based on OPEN responses and does not account
    for LOCK denied responses, which include the conflicting lock owner as
    a variable-length field up to 1024 bytes (NFS4_OPAQUE_LIMIT).
    
    When a LOCK operation is denied due to a conflict with an existing lock
    that has a large owner, nfsd4_encode_operation() copies the full encoded
    response into the undersized replay buffer via read_bytes_from_xdr_buf()
    with no bounds check. This results in a slab-out-of-bounds write of up
    to 944 bytes past the end of the buffer, corrupting adjacent heap memory.
    
    This can be triggered remotely by an unauthenticated attacker with two
    cooperating NFSv4.0 clients: one sets a lock with a large owner string,
    then the other requests a conflicting lock to provoke the denial.
    
    We could fix this by increasing NFSD4_REPLAY_ISIZE to allow for a full
    opaque, but that would increase the size of every stateowner, when most
    lockowners are not that large.
    
    Instead, fix this by checking the encoded response length against
    NFSD4_REPLAY_ISIZE before copying into the replay buffer. If the
    response is too large, set rp_buflen to 0 to skip caching the replay
    payload. The status is still cached, and the client already received the
    correct response on the original request.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Cc: [email protected]
    Reported-by: Nicholas Carlini <[email protected]>
    Tested-by: Nicholas Carlini <[email protected]>
    Signed-off-by: Jeff Layton <[email protected]>
    Signed-off-by: Chuck Lever <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
NFSD: Hold net reference for the lifetime of /proc/fs/nfs/exports fd [+ + +]
Author: Chuck Lever <[email protected]>
Date:   Thu Feb 19 16:50:17 2026 -0500

    NFSD: Hold net reference for the lifetime of /proc/fs/nfs/exports fd
    
    commit e7fcf179b82d3a3730fd8615da01b087cc654d0b upstream.
    
    The /proc/fs/nfs/exports proc entry is created at module init
    and persists for the module's lifetime. exports_proc_open()
    captures the caller's current network namespace and stores
    its svc_export_cache in seq->private, but takes no reference
    on the namespace. If the namespace is subsequently torn down
    (e.g. container destruction after the opener does setns() to a
    different namespace), nfsd_net_exit() calls nfsd_export_shutdown()
    which frees the cache. Subsequent reads on the still-open fd
    dereference the freed cache_detail, walking a freed hash table.
    
    Hold a reference on the struct net for the lifetime of the open
    file descriptor. This prevents nfsd_net_exit() from running --
    and thus prevents nfsd_export_shutdown() from freeing the cache
    -- while any exports fd is open. cache_detail already stores
    its net pointer (cd->net, set by cache_create_net()), so
    exports_release() can retrieve it without additional per-file
    storage.
    
    Reported-by: Misbah Anjum N <[email protected]>
    Closes: https://lore.kernel.org/linux-nfs/[email protected]/
    Fixes: 96d851c4d28d ("nfsd: use proper net while reading "exports" file")
    Cc: [email protected]
    Reviewed-by: Jeff Layton <[email protected]>
    Reviewed-by: NeilBrown <[email protected]>
    Tested-by: Olga Kornievskaia <[email protected]>
    Signed-off-by: Chuck Lever <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
nvdimm/bus: Fix potential use after free in asynchronous initialization [+ + +]
Author: Ira Weiny <[email protected]>
Date:   Fri Mar 6 12:33:05 2026 -0600

    nvdimm/bus: Fix potential use after free in asynchronous initialization
    
    commit a8aec14230322ed8f1e8042b6d656c1631d41163 upstream.
    
    Dingisoul with KASAN reports a use after free if device_add() fails in
    nd_async_device_register().
    
    Commit b6eae0f61db2 ("libnvdimm: Hold reference on parent while
    scheduling async init") correctly added a reference on the parent device
    to be held until asynchronous initialization was complete.  However, if
    device_add() results in an allocation failure the ref count of the
    device drops to 0 prior to the parent pointer being accessed.  Thus
    resulting in use after free.
    
    The bug bot AI correctly identified the fix.  Save a reference to the
    parent pointer to be used to drop the parent reference regardless of the
    outcome of device_add().
    
    Reported-by: Dingisoul <[email protected]>
    Closes: http://lore.kernel.org/[email protected]
    Fixes: b6eae0f61db2 ("libnvdimm: Hold reference on parent while scheduling async init")
    Cc: [email protected]
    Reviewed-by: Dave Jiang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Ira Weiny <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
parisc: Flush correct cache in cacheflush() syscall [+ + +]
Author: Helge Deller <[email protected]>
Date:   Mon Mar 9 15:16:37 2026 +0100

    parisc: Flush correct cache in cacheflush() syscall
    
    commit 2c98a8fbd6aa647414c6248dacf254ebe91c79ad upstream.
    
    The assembly flush instructions were swapped for I- and D-cache flags:
    
    SYSCALL_DEFINE3(cacheflush, ...)
    {
            if (cache & DCACHE) {
                            "fic ...\n"
            }
            if (cache & ICACHE && error == 0) {
                            "fdc ...\n"
            }
    
    Fix it by using fdc for DCACHE, and fic for ICACHE flushing.
    
    Reported-by: Felix Lechner <[email protected]>
    Fixes: c6d96328fecd ("parisc: Add cacheflush() syscall")
    Cc: <[email protected]> # v6.5+
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
perf/x86/intel: Add missing branch counters constraint apply [+ + +]
Author: Dapeng Mi <[email protected]>
Date:   Sat Feb 28 13:33:20 2026 +0800

    perf/x86/intel: Add missing branch counters constraint apply
    
    commit 1d07bbd7ea36ea0b8dfa8068dbe67eb3a32d9590 upstream.
    
    When running the command:
    'perf record -e "{instructions,instructions:p}" -j any,counter sleep 1',
    a "shift-out-of-bounds" warning is reported on CWF.
    
      UBSAN: shift-out-of-bounds in /kbuild/src/consumer/arch/x86/events/intel/lbr.c:970:15
      shift exponent 64 is too large for 64-bit type 'long long unsigned int'
      ......
      intel_pmu_lbr_counters_reorder.isra.0.cold+0x2a/0xa7
      intel_pmu_lbr_save_brstack+0xc0/0x4c0
      setup_arch_pebs_sample_data+0x114b/0x2400
    
    The warning occurs because the second "instructions:p" event, which
    involves branch counters sampling, is incorrectly programmed to fixed
    counter 0 instead of the general-purpose (GP) counters 0-3 that support
    branch counters sampling. Currently only GP counters 0-3 support branch
    counters sampling on CWF, any event involving branch counters sampling
    should be programed on GP counters 0-3. Since the counter index of fixed
    counter 0 is 32, it leads to the "src" value in below code is right
    shifted 64 bits and trigger the "shift-out-of-bounds" warning.
    
    cnt = (src >> (order[j] * LBR_INFO_BR_CNTR_BITS)) & LBR_INFO_BR_CNTR_MASK;
    
    The root cause is the loss of the branch counters constraint for the
    new event in the branch counters sampling event group. Since it isn't
    yet part of the sibling list. This results in the second
    "instructions:p" event being programmed on fixed counter 0 incorrectly
    instead of the appropriate GP counters 0-3.
    
    To address this, we apply the missing branch counters constraint for
    the last event in the group. Additionally, we introduce a new function,
    `intel_set_branch_counter_constr()`, to apply the branch counters
    constraint and avoid code duplication.
    
    Fixes: 33744916196b ("perf/x86/intel: Support branch counters logging")
    Reported-by: Xudong Hao <[email protected]>
    Signed-off-by: Dapeng Mi <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
perf/x86: Move event pointer setup earlier in x86_pmu_enable() [+ + +]
Author: Breno Leitao <[email protected]>
Date:   Tue Mar 10 03:13:16 2026 -0700

    perf/x86: Move event pointer setup earlier in x86_pmu_enable()
    
    commit 8d5fae6011260de209aaf231120e8146b14bc8e0 upstream.
    
    A production AMD EPYC system crashed with a NULL pointer dereference
    in the PMU NMI handler:
    
      BUG: kernel NULL pointer dereference, address: 0000000000000198
      RIP: x86_perf_event_update+0xc/0xa0
      Call Trace:
       <NMI>
       amd_pmu_v2_handle_irq+0x1a6/0x390
       perf_event_nmi_handler+0x24/0x40
    
    The faulting instruction is `cmpq $0x0, 0x198(%rdi)` with RDI=0,
    corresponding to the `if (unlikely(!hwc->event_base))` check in
    x86_perf_event_update() where hwc = &event->hw and event is NULL.
    
    drgn inspection of the vmcore on CPU 106 showed a mismatch between
    cpuc->active_mask and cpuc->events[]:
    
      active_mask: 0x1e (bits 1, 2, 3, 4)
      events[1]:   0xff1100136cbd4f38  (valid)
      events[2]:   0x0                 (NULL, but active_mask bit 2 set)
      events[3]:   0xff1100076fd2cf38  (valid)
      events[4]:   0xff1100079e990a90  (valid)
    
    The event that should occupy events[2] was found in event_list[2]
    with hw.idx=2 and hw.state=0x0, confirming x86_pmu_start() had run
    (which clears hw.state and sets active_mask) but events[2] was
    never populated.
    
    Another event (event_list[0]) had hw.state=0x7 (STOPPED|UPTODATE|ARCH),
    showing it was stopped when the PMU rescheduled events, confirming the
    throttle-then-reschedule sequence occurred.
    
    The root cause is commit 7e772a93eb61 ("perf/x86: Fix NULL event access
    and potential PEBS record loss") which moved the cpuc->events[idx]
    assignment out of x86_pmu_start() and into step 2 of x86_pmu_enable(),
    after the PERF_HES_ARCH check. This broke any path that calls
    pmu->start() without going through x86_pmu_enable() -- specifically
    the unthrottle path:
    
      perf_adjust_freq_unthr_events()
        -> perf_event_unthrottle_group()
          -> perf_event_unthrottle()
            -> event->pmu->start(event, 0)
              -> x86_pmu_start()     // sets active_mask but not events[]
    
    The race sequence is:
    
      1. A group of perf events overflows, triggering group throttle via
         perf_event_throttle_group(). All events are stopped: active_mask
         bits cleared, events[] preserved (x86_pmu_stop no longer clears
         events[] after commit 7e772a93eb61).
    
      2. While still throttled (PERF_HES_STOPPED), x86_pmu_enable() runs
         due to other scheduling activity. Stopped events that need to
         move counters get PERF_HES_ARCH set and events[old_idx] cleared.
         In step 2 of x86_pmu_enable(), PERF_HES_ARCH causes these events
         to be skipped -- events[new_idx] is never set.
    
      3. The timer tick unthrottles the group via pmu->start(). Since
         commit 7e772a93eb61 removed the events[] assignment from
         x86_pmu_start(), active_mask[new_idx] is set but events[new_idx]
         remains NULL.
    
      4. A PMC overflow NMI fires. The handler iterates active counters,
         finds active_mask[2] set, reads events[2] which is NULL, and
         crashes dereferencing it.
    
    Move the cpuc->events[hwc->idx] assignment in x86_pmu_enable() to
    before the PERF_HES_ARCH check, so that events[] is populated even
    for events that are not immediately started. This ensures the
    unthrottle path via pmu->start() always finds a valid event pointer.
    
    Fixes: 7e772a93eb61 ("perf/x86: Fix NULL event access and potential PEBS record loss")
    Signed-off-by: Breno Leitao <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Cc: [email protected]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
PM: runtime: Fix a race condition related to device removal [+ + +]
Author: Bart Van Assche <[email protected]>
Date:   Thu Mar 12 11:27:20 2026 -0700

    PM: runtime: Fix a race condition related to device removal
    
    [ Upstream commit 29ab768277617452d88c0607c9299cdc63b6e9ff ]
    
    The following code in pm_runtime_work() may dereference the dev->parent
    pointer after the parent device has been freed:
    
            /* Maybe the parent is now able to suspend. */
            if (parent && !parent->power.ignore_children) {
                    spin_unlock(&dev->power.lock);
    
                    spin_lock(&parent->power.lock);
                    rpm_idle(parent, RPM_ASYNC);
                    spin_unlock(&parent->power.lock);
    
                    spin_lock(&dev->power.lock);
            }
    
    Fix this by inserting a flush_work() call in pm_runtime_remove().
    
    Without this patch blktest block/001 triggers the following complaint
    sporadically:
    
    BUG: KASAN: slab-use-after-free in lock_acquire+0x70/0x160
    Read of size 1 at addr ffff88812bef7198 by task kworker/u553:1/3081
    Workqueue: pm pm_runtime_work
    Call Trace:
     <TASK>
     dump_stack_lvl+0x61/0x80
     print_address_description.constprop.0+0x8b/0x310
     print_report+0xfd/0x1d7
     kasan_report+0xd8/0x1d0
     __kasan_check_byte+0x42/0x60
     lock_acquire.part.0+0x38/0x230
     lock_acquire+0x70/0x160
     _raw_spin_lock+0x36/0x50
     rpm_suspend+0xc6a/0xfe0
     rpm_idle+0x578/0x770
     pm_runtime_work+0xee/0x120
     process_one_work+0xde3/0x1410
     worker_thread+0x5eb/0xfe0
     kthread+0x37b/0x480
     ret_from_fork+0x6cb/0x920
     ret_from_fork_asm+0x11/0x20
     </TASK>
    
    Allocated by task 4314:
     kasan_save_stack+0x2a/0x50
     kasan_save_track+0x18/0x40
     kasan_save_alloc_info+0x3d/0x50
     __kasan_kmalloc+0xa0/0xb0
     __kmalloc_noprof+0x311/0x990
     scsi_alloc_target+0x122/0xb60 [scsi_mod]
     __scsi_scan_target+0x101/0x460 [scsi_mod]
     scsi_scan_channel+0x179/0x1c0 [scsi_mod]
     scsi_scan_host_selected+0x259/0x2d0 [scsi_mod]
     store_scan+0x2d2/0x390 [scsi_mod]
     dev_attr_store+0x43/0x80
     sysfs_kf_write+0xde/0x140
     kernfs_fop_write_iter+0x3ef/0x670
     vfs_write+0x506/0x1470
     ksys_write+0xfd/0x230
     __x64_sys_write+0x76/0xc0
     x64_sys_call+0x213/0x1810
     do_syscall_64+0xee/0xfc0
     entry_SYSCALL_64_after_hwframe+0x4b/0x53
    
    Freed by task 4314:
     kasan_save_stack+0x2a/0x50
     kasan_save_track+0x18/0x40
     kasan_save_free_info+0x3f/0x50
     __kasan_slab_free+0x67/0x80
     kfree+0x225/0x6c0
     scsi_target_dev_release+0x3d/0x60 [scsi_mod]
     device_release+0xa3/0x220
     kobject_cleanup+0x105/0x3a0
     kobject_put+0x72/0xd0
     put_device+0x17/0x20
     scsi_device_dev_release+0xacf/0x12c0 [scsi_mod]
     device_release+0xa3/0x220
     kobject_cleanup+0x105/0x3a0
     kobject_put+0x72/0xd0
     put_device+0x17/0x20
     scsi_device_put+0x7f/0xc0 [scsi_mod]
     sdev_store_delete+0xa5/0x120 [scsi_mod]
     dev_attr_store+0x43/0x80
     sysfs_kf_write+0xde/0x140
     kernfs_fop_write_iter+0x3ef/0x670
     vfs_write+0x506/0x1470
     ksys_write+0xfd/0x230
     __x64_sys_write+0x76/0xc0
     x64_sys_call+0x213/0x1810
    
    Reported-by: Ming Lei <[email protected]>
    Closes: https://lore.kernel.org/all/ZxdNvLNI8QaOfD2d@fedora/
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/all/[email protected]/
    Fixes: 5e928f77a09a ("PM: Introduce core framework for run-time PM of I/O devices (rev. 17)")
    Signed-off-by: Bart Van Assche <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
pmdomain: bcm: bcm2835-power: Increase ASB control timeout [+ + +]
Author: Maíra Canal <[email protected]>
Date:   Tue Mar 17 19:41:49 2026 -0300

    pmdomain: bcm: bcm2835-power: Increase ASB control timeout
    
    commit b826d2c0b0ecb844c84431ba6b502e744f5d919a upstream.
    
    The bcm2835_asb_control() function uses a tight polling loop to wait
    for the ASB bridge to acknowledge a request. During intensive workloads,
    this handshake intermittently fails for V3D's master ASB on BCM2711,
    resulting in "Failed to disable ASB master for v3d" errors during
    runtime PM suspend. As a consequence, the failed power-off leaves V3D in
    a broken state, leading to bus faults or system hangs on later accesses.
    
    As the timeout is insufficient in some scenarios, increase the polling
    timeout from 1us to 5us, which is still negligible in the context of a
    power domain transition. Also, replace the open-coded ktime_get_ns()/
    cpu_relax() polling loop with readl_poll_timeout_atomic().
    
    Cc: [email protected]
    Fixes: 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.")
    Signed-off-by: Maíra Canal <[email protected]>
    Reviewed-by: Stefan Wahren <[email protected]>
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

pmdomain: mediatek: Fix power domain count [+ + +]
Author: Adam Ford <[email protected]>
Date:   Mon Feb 9 23:37:01 2026 -0600

    pmdomain: mediatek: Fix power domain count
    
    commit b22c526569e6af84008b674e66378e771bfbdd94 upstream.
    
    The wrong value of the number of domains is wrong which leads to
    failures when trying to enumerate nested power domains.
    
     PM: genpd_xlate_onecell: invalid domain index 0
     PM: genpd_xlate_onecell: invalid domain index 1
     PM: genpd_xlate_onecell: invalid domain index 3
     PM: genpd_xlate_onecell: invalid domain index 4
     PM: genpd_xlate_onecell: invalid domain index 5
     PM: genpd_xlate_onecell: invalid domain index 13
     PM: genpd_xlate_onecell: invalid domain index 14
    
    Attempts to use these power domains fail, so fix this by
    using the correct value of calculated power domains.
    
    Signed-off-by: Adam Ford <[email protected]>
    Fixes: 88914db077b6 ("pmdomain: mediatek: Add support for Hardware Voter power domains")
    Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
    Cc: [email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ring-buffer: Fix to update per-subbuf entries of persistent ring buffer [+ + +]
Author: Masami Hiramatsu (Google) <[email protected]>
Date:   Thu Mar 19 18:12:19 2026 +0900

    ring-buffer: Fix to update per-subbuf entries of persistent ring buffer
    
    commit f35dbac6942171dc4ce9398d1d216a59224590a9 upstream.
    
    Since the validation loop in rb_meta_validate_events() updates the same
    cpu_buffer->head_page->entries, the other subbuf entries are not updated.
    Fix to use head_page to update the entries field, since it is the cursor
    in this loop.
    
    Cc: [email protected]
    Cc: Mathieu Desnoyers <[email protected]>
    Cc: Ian Rogers <[email protected]>
    Fixes: 5f3b6e839f3c ("ring-buffer: Validate boot range memory events")
    Link: https://patch.msgid.link/177391153882.193994.17158784065013676533.stgit@mhiramat.tok.corp.google.com
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
sched: idle: Consolidate the handling of two special cases [+ + +]
Author: Rafael J. Wysocki <[email protected]>
Date:   Fri Mar 13 13:25:41 2026 +0100

    sched: idle: Consolidate the handling of two special cases
    
    [ Upstream commit f4c31b07b136839e0fb3026f8a5b6543e3b14d2f ]
    
    There are two special cases in the idle loop that are handled
    inconsistently even though they are analogous.
    
    The first one is when a cpuidle driver is absent and the default CPU
    idle time power management implemented by the architecture code is used.
    In that case, the scheduler tick is stopped every time before invoking
    default_idle_call().
    
    The second one is when a cpuidle driver is present, but there is only
    one idle state in its table.  In that case, the scheduler tick is never
    stopped at all.
    
    Since each of these approaches has its drawbacks, reconcile them with
    the help of one simple heuristic.  Namely, stop the tick if the CPU has
    been woken up by it in the previous iteration of the idle loop, or let
    it tick otherwise.
    
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Reviewed-by: Christian Loehle <[email protected]>
    Reviewed-by: Frederic Weisbecker <[email protected]>
    Reviewed-by: Qais Yousef <[email protected]>
    Reviewed-by: Aboorva Devarajan <[email protected]>
    Fixes: ed98c3491998 ("sched: idle: Do not stop the tick before cpuidle_idle_call()")
    [ rjw: Added Fixes tag, changelog edits ]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
selftests/hid: fix compilation when bpf_wq and hid_device are not exported [+ + +]
Author: Benjamin Tissoires <[email protected]>
Date:   Fri Mar 13 08:40:24 2026 +0100

    selftests/hid: fix compilation when bpf_wq and hid_device are not exported
    
    commit 5d4c6c132ea9a967d48890dd03e6a786c060e968 upstream.
    
    This can happen in situations when CONFIG_HID_SUPPORT is set to no, or
    some complex situations where struct bpf_wq is not exported.
    
    So do the usual dance of hiding them before including vmlinux.h, and
    then redefining them and make use of CO-RE to have the correct offsets.
    
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Fixes: fe8d561db3e8 ("selftests/hid: add wq test for hid_bpf_input_report()")
    Cc: [email protected]
    Acked-by: Jiri Kosina <[email protected]>
    Reviewed-by: Thomas Weißschuh <[email protected]>
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
serial: 8250: Add late synchronize_irq() to shutdown to handle DW UART BUSY [+ + +]
Author: Ilpo Järvinen <[email protected]>
Date:   Tue Feb 3 19:10:48 2026 +0200

    serial: 8250: Add late synchronize_irq() to shutdown to handle DW UART BUSY
    
    commit e0a368ae79531ff92105a2692f10d83052055856 upstream.
    
    When DW UART is !uart_16550_compatible, it can indicate BUSY at any
    point (when under constant Rx pressure) unless a complex sequence of
    steps is performed. Any LCR write can run a foul with the condition
    that prevents writing LCR while the UART is BUSY, which triggers
    BUSY_DETECT interrupt that seems unmaskable using IER bits.
    
    Normal flow is that dw8250_handle_irq() handles BUSY_DETECT condition
    by reading USR register. This BUSY feature, however, breaks the
    assumptions made in serial8250_do_shutdown(), which runs
    synchronize_irq() after clearing IER and assumes no interrupts can
    occur after that point but then proceeds to update LCR, which on DW
    UART can trigger an interrupt.
    
    If serial8250_do_shutdown() releases the interrupt handler before the
    handler has run and processed the BUSY_DETECT condition by read the USR
    register, the IRQ is not deasserted resulting in interrupt storm that
    triggers "irq x: nobody cared" warning leading to disabling the IRQ.
    
    Add late synchronize_irq() into serial8250_do_shutdown() to ensure
    BUSY_DETECT from DW UART is handled before port's interrupt handler is
    released. Alternative would be to add DW UART specific shutdown
    function but it would mostly duplicate the generic code and the extra
    synchronize_irq() seems pretty harmless in serial8250_do_shutdown().
    
    Fixes: 7d4008ebb1c9 ("tty: add a DesignWare 8250 driver")
    Cc: stable <[email protected]>
    Reported-by: Bandal, Shankar <[email protected]>
    Tested-by: Bandal, Shankar <[email protected]>
    Tested-by: Murthy, Shanth <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250: Add serial8250_handle_irq_locked() [+ + +]
Author: Ilpo Järvinen <[email protected]>
Date:   Tue Feb 3 19:10:45 2026 +0200

    serial: 8250: Add serial8250_handle_irq_locked()
    
    commit 8324a54f604da18f21070702a8ad82ab2062787b upstream.
    
    8250_port exports serial8250_handle_irq() to HW specific 8250 drivers.
    It takes port's lock within but a HW specific 8250 driver may want to
    take port's lock itself, do something, and then call the generic
    handler in 8250_port but to do that, the caller has to release port's
    lock for no good reason.
    
    Introduce serial8250_handle_irq_locked() which a HW specific driver can
    call while already holding port's lock.
    
    As this is new export, put it straight into a namespace (where all 8250
    exports should eventually be moved).
    
    Tested-by: Bandal, Shankar <[email protected]>
    Tested-by: Murthy, Shanth <[email protected]>
    Cc: stable <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250: always disable IRQ during THRE test [+ + +]
Author: Peng Zhang <[email protected]>
Date:   Tue Feb 24 13:16:39 2026 +0100

    serial: 8250: always disable IRQ during THRE test
    
    commit 24b98e8664e157aff0814a0f49895ee8223f382f upstream.
    
    commit 039d4926379b ("serial: 8250: Toggle IER bits on only after irq
    has been set up") moved IRQ setup before the THRE test, in combination
    with commit 205d300aea75 ("serial: 8250: change lock order in
    serial8250_do_startup()") the interrupt handler can run during the
    test and race with its IIR reads. This can produce wrong THRE test
    results and cause spurious registration of the
    serial8250_backup_timeout timer. Unconditionally disable the IRQ for
    the short duration of the test and re-enable it afterwards to avoid
    the race.
    
    Fixes: 039d4926379b ("serial: 8250: Toggle IER bits on only after irq has been set up")
    Depends-on: 205d300aea75 ("serial: 8250: change lock order in serial8250_do_startup()")
    Cc: stable <[email protected]>
    Signed-off-by: Peng Zhang <[email protected]>
    Reviewed-by: Muchun Song <[email protected]>
    Signed-off-by: Alban Bedel <[email protected]>
    Tested-by: Maximilian Lueer <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250: Fix TX deadlock when using DMA [+ + +]
Author: Raul E Rangel <[email protected]>
Date:   Mon Feb 9 13:58:18 2026 -0700

    serial: 8250: Fix TX deadlock when using DMA
    
    commit a424a34b8faddf97b5af41689087e7a230f79ba7 upstream.
    
    `dmaengine_terminate_async` does not guarantee that the
    `__dma_tx_complete` callback will run. The callback is currently the
    only place where `dma->tx_running` gets cleared. If the transaction is
    canceled and the callback never runs, then `dma->tx_running` will never
    get cleared and we will never schedule new TX DMA transactions again.
    
    This change makes it so we clear `dma->tx_running` after we terminate
    the DMA transaction. This is "safe" because `serial8250_tx_dma_flush`
    is holding the UART port lock. The first thing the callback does is also
    grab the UART port lock, so access to `dma->tx_running` is serialized.
    
    Fixes: 9e512eaaf8f4 ("serial: 8250: Fix fifo underflow on flush")
    Cc: stable <[email protected]>
    Signed-off-by: Raul E Rangel <[email protected]>
    Link: https://patch.msgid.link/20260209135815.1.I16366ecb0f62f3c96fe3dd5763fcf6f3c2b4d8cd@changeid
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250: Protect LCR write in shutdown [+ + +]
Author: Ilpo Järvinen <[email protected]>
Date:   Tue Feb 3 19:10:43 2026 +0200

    serial: 8250: Protect LCR write in shutdown
    
    commit 59a33d83bbe6d73d2071d7ae21590b29faed0503 upstream.
    
    The 8250_dw driver needs to potentially perform very complex operations
    during LCR writes because its BUSY handling prevents updates to LCR
    while UART is BUSY (which is not fully under our control without those
    complex operations). Thus, LCR writes should occur under port's lock.
    
    Move LCR write under port's lock in serial8250_do_shutdown(). Also
    split the LCR RMW so that the logic is on a separate line for clarity.
    
    Reported-by: Bandal, Shankar <[email protected]>
    Tested-by: Bandal, Shankar <[email protected]>
    Tested-by: Murthy, Shanth <[email protected]>
    Cc: stable <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250_dw: Avoid unnecessary LCR writes [+ + +]
Author: Ilpo Järvinen <[email protected]>
Date:   Tue Feb 3 19:10:44 2026 +0200

    serial: 8250_dw: Avoid unnecessary LCR writes
    
    commit 8002d6d6d0d8a36a7d6ca523b17a51cb0fa7c3c3 upstream.
    
    When DW UART is configured with BUSY flag, LCR writes may not always
    succeed which can make any LCR write complex and very expensive.
    Performing write directly can trigger IRQ and the driver has to perform
    complex and distruptive sequence while retrying the write.
    
    Therefore, it's better to avoid doing LCR write that would not change
    the value of the LCR register. Add LCR write avoidance code into the
    8250_dw driver's .serial_out() functions.
    
    Reported-by: Bandal, Shankar <[email protected]>
    Tested-by: Bandal, Shankar <[email protected]>
    Tested-by: Murthy, Shanth <[email protected]>
    Cc: stable <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250_dw: Ensure BUSY is deasserted [+ + +]
Author: Ilpo Järvinen <[email protected]>
Date:   Tue Feb 3 19:10:49 2026 +0200

    serial: 8250_dw: Ensure BUSY is deasserted
    
    commit a7b9ce39fbe4ae2919fe4f7ac16c293cb6632d30 upstream.
    
    DW UART cannot write to LCR, DLL, and DLH while BUSY is asserted.
    Existance of BUSY depends on uart_16550_compatible, if UART HW is
    configured with it those registers can always be written.
    
    There currently is dw8250_force_idle() which attempts to achieve
    non-BUSY state by disabling FIFO, however, the solution is unreliable
    when Rx keeps getting more and more characters.
    
    Create a sequence of operations that ensures UART cannot keep BUSY
    asserted indefinitely. The new sequence relies on enabling loopback mode
    temporarily to prevent incoming Rx characters keeping UART BUSY.
    
    Ensure no Tx in ongoing while the UART is switches into the loopback
    mode (requires exporting serial8250_fifo_wait_for_lsr_thre() and adding
    DMA Tx pause/resume functions).
    
    According to tests performed by Adriana Nicolae <[email protected]>,
    simply disabling FIFO or clearing FIFOs only once does not always
    ensure BUSY is deasserted but up to two tries may be needed. This could
    be related to ongoing Rx of a character (a guess, not known for sure).
    Therefore, retry FIFO clearing a few times (retry limit 4 is arbitrary
    number but using, e.g., p->fifosize seems overly large). Tests
    performed by others did not exhibit similar challenge but it does not
    seem harmful to leave the FIFO clearing loop in place for all DW UARTs
    with BUSY functionality.
    
    Use the new dw8250_idle_enter/exit() to do divisor writes and LCR
    writes. In case of plain LCR writes, opportunistically try to update
    LCR first and only invoke dw8250_idle_enter() if the write did not
    succeed (it has been observed that in practice most LCR writes do
    succeed without complications).
    
    This issue was first reported by qianfan Zhao who put lots of debugging
    effort into understanding the solution space.
    
    Fixes: c49436b657d0 ("serial: 8250_dw: Improve unwritable LCR workaround")
    Fixes: 7d4008ebb1c9 ("tty: add a DesignWare 8250 driver")
    Cc: stable <[email protected]>
    Reported-by: qianfan Zhao <[email protected]>
    Link: https://lore.kernel.org/linux-serial/[email protected]/
    Reported-by: Adriana Nicolae <[email protected]>
    Link: https://lore.kernel.org/linux-serial/[email protected]/
    Reported-by: Bandal, Shankar <[email protected]>
    Tested-by: Bandal, Shankar <[email protected]>
    Tested-by: Murthy, Shanth <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250_dw: Rework dw8250_handle_irq() locking and IIR handling [+ + +]
Author: Ilpo Järvinen <[email protected]>
Date:   Tue Feb 3 19:10:46 2026 +0200

    serial: 8250_dw: Rework dw8250_handle_irq() locking and IIR handling
    
    commit 883c5a2bc934c165c4491d1ef7da0ac4e9765077 upstream.
    
    dw8250_handle_irq() takes port's lock multiple times with no good
    reason to release it in between and calls serial8250_handle_irq()
    that also takes port's lock.
    
    Take port's lock only once in dw8250_handle_irq() and use
    serial8250_handle_irq_locked() to avoid releasing port's lock in
    between.
    
    As IIR_NO_INT check in serial8250_handle_irq() was outside of port's
    lock, it has to be done already in dw8250_handle_irq().
    
    DW UART can, in addition to IIR_NO_INT, report BUSY_DETECT (0x7) which
    collided with the IIR_NO_INT (0x1) check in serial8250_handle_irq()
    (because & is used instead of ==) meaning that no other work is done by
    serial8250_handle_irq() during an BUSY_DETECT interrupt.
    
    This allows reorganizing code in dw8250_handle_irq() to do both
    IIR_NO_INT and BUSY_DETECT handling right at the start simplifying
    the logic.
    
    Tested-by: Bandal, Shankar <[email protected]>
    Tested-by: Murthy, Shanth <[email protected]>
    Cc: stable <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250_dw: Rework IIR_NO_INT handling to stop interrupt storm [+ + +]
Author: Ilpo Järvinen <[email protected]>
Date:   Tue Feb 3 19:10:47 2026 +0200

    serial: 8250_dw: Rework IIR_NO_INT handling to stop interrupt storm
    
    commit 73a4ed8f9efaaaf8207614ccc1c9d5ca1888f23a upstream.
    
    INTC10EE UART can end up into an interrupt storm where it reports
    IIR_NO_INT (0x1). If the storm happens during active UART operation, it
    is promptly stopped by IIR value change due to Rx or Tx events.
    However, when there is no activity, either due to idle serial line or
    due to specific circumstances such as during shutdown that writes
    IER=0, there is nothing to stop the storm.
    
    During shutdown the storm is particularly problematic because
    serial8250_do_shutdown() calls synchronize_irq() that will hang in
    waiting for the storm to finish which never happens.
    
    This problem can also result in triggering a warning:
    
      irq 45: nobody cared (try booting with the "irqpoll" option)
      [...snip...]
      handlers:
        serial8250_interrupt
      Disabling IRQ #45
    
    Normal means to reset interrupt status by reading LSR, MSR, USR, or RX
    register do not result in the UART deasserting the IRQ.
    
    Add a quirk to INTC10EE UARTs to enable Tx interrupts if UART's Tx is
    currently empty and inactive. Rework IIR_NO_INT to keep track of the
    number of consecutive IIR_NO_INT, and on fourth one perform the quirk.
    Enabling Tx interrupts should change IIR value from IIR_NO_INT to
    IIR_THRI which has been observed to stop the storm.
    
    Fixes: e92fad024929 ("serial: 8250_dw: Add ACPI ID for Granite Rapids-D UART")
    Cc: stable <[email protected]>
    Reported-by: Bandal, Shankar <[email protected]>
    Tested-by: Bandal, Shankar <[email protected]>
    Tested-by: Murthy, Shanth <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Ilpo Järvinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250_pci: add support for the AX99100 [+ + +]
Author: Martin Roukala (né Peres) <[email protected]>
Date:   Mon Mar 9 15:53:10 2026 +0200

    serial: 8250_pci: add support for the AX99100
    
    commit 9c0072bc33d349c83d223e64be30794e11938a6b upstream.
    
    This is found in popular brands such as StarTech.com or Delock, and has
    been a source of frustration to quite a few people, if I can trust
    Amazon comments complaining about Linux support via the official
    out-of-the-tree driver.
    
    Signed-off-by: Martin Roukala (né Peres) <[email protected]>
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: core: fix infinite loop in handle_tx() for PORT_UNKNOWN [+ + +]
Author: Jiayuan Chen <[email protected]>
Date:   Wed Feb 4 15:43:20 2026 +0800

    serial: core: fix infinite loop in handle_tx() for PORT_UNKNOWN
    
    commit 455ce986fa356ff43a43c0d363ba95fa152f21d5 upstream.
    
    uart_write_room() and uart_write() behave inconsistently when
    xmit_buf is NULL (which happens for PORT_UNKNOWN ports that were
    never properly initialized):
    
    - uart_write_room() returns kfifo_avail() which can be > 0
    - uart_write() checks xmit_buf and returns 0 if NULL
    
    This inconsistency causes an infinite loop in drivers that rely on
    tty_write_room() to determine if they can write:
    
      while (tty_write_room(tty) > 0) {
          written = tty->ops->write(...);
          // written is always 0, loop never exits
      }
    
    For example, caif_serial's handle_tx() enters an infinite loop when
    used with PORT_UNKNOWN serial ports, causing system hangs.
    
    Fix by making uart_write_room() also check xmit_buf and return 0 if
    it's NULL, consistent with uart_write().
    
    Reproducer: https://gist.github.com/mrpre/d9a694cc0e19828ee3bc3b37983fde13
    
    Signed-off-by: Jiayuan Chen <[email protected]>
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: uartlite: fix PM runtime usage count underflow on probe [+ + +]
Author: Maciej Andrzejewski ICEYE <[email protected]>
Date:   Thu Mar 5 13:37:51 2026 +0100

    serial: uartlite: fix PM runtime usage count underflow on probe
    
    commit d54801cd509515f674a5aac1d3ea1401d2a05863 upstream.
    
    ulite_probe() calls pm_runtime_put_autosuspend() at the end of probe
    without holding a corresponding PM runtime reference for non-console
    ports.
    
    During ulite_assign(), uart_add_one_port() triggers uart_configure_port()
    which calls ulite_pm() via uart_change_pm(). For non-console ports, the
    UART core performs a balanced get/put cycle:
    
      uart_change_pm(ON)  -> ulite_pm() -> pm_runtime_get_sync()        +1
      uart_change_pm(OFF) -> ulite_pm() -> pm_runtime_put_autosuspend() -1
    
    This leaves no spare reference for the pm_runtime_put_autosuspend() at
    the end of probe. The PM runtime core prevents the count from actually
    going below zero, and instead triggers a
    "Runtime PM usage count underflow!" warning.
    
    For console ports the bug is masked: the UART core skips the
    uart_change_pm(OFF) call, so the UART core's unbalanced get happens to
    pair with probe's trailing put.
    
    Add pm_runtime_get_noresume() before pm_runtime_enable() to take an
    explicit probe-owned reference that the trailing
    pm_runtime_put_autosuspend() can release. This ensures a correct usage
    count regardless of whether the port is a console.
    
    Fixes: 5bbe10a6942d ("tty: serial: uartlite: Add runtime pm support")
    Cc: stable <[email protected]>
    Signed-off-by: Maciej Andrzejewski ICEYE <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
smb: client: fix krb5 mount with username option [+ + +]
Author: Paulo Alcantara <[email protected]>
Date:   Fri Mar 13 00:03:38 2026 -0300

    smb: client: fix krb5 mount with username option
    
    commit 12b4c5d98cd7ca46d5035a57bcd995df614c14e1 upstream.
    
    Customer reported that some of their krb5 mounts were failing against
    a single server as the client was trying to mount the shares with
    wrong credentials.  It turned out the client was reusing SMB session
    from first mount to try mounting the other shares, even though a
    different username= option had been specified to the other mounts.
    
    By using username mount option along with sec=krb5 to search for
    principals from keytab is supported by cifs.upcall(8) since
    cifs-utils-4.8.  So fix this by matching username mount option in
    match_session() even with Kerberos.
    
    For example, the second mount below should fail with -ENOKEY as there
    is no 'foobar' principal in keytab (/etc/krb5.keytab).  The client
    ends up reusing SMB session from first mount to perform the second
    one, which is wrong.
    
    ```
    $ ktutil
    ktutil:  add_entry -password -p testuser -k 1 -e aes256-cts
    Password for [email protected]:
    ktutil:  write_kt /etc/krb5.keytab
    ktutil:  quit
    $ klist -ke
    Keytab name: FILE:/etc/krb5.keytab
    KVNO Principal
     ---- ----------------------------------------------------------------
       1 [email protected] (aes256-cts-hmac-sha1-96)
    $ mount.cifs //w22-root2/scratch /mnt/1 -o sec=krb5,username=testuser
    $ mount.cifs //w22-root2/scratch /mnt/2 -o sec=krb5,username=foobar
    $ mount -t cifs | grep -Po 'username=\K\w+'
    testuser
    testuser
    ```
    
    Reported-by: Oscar Santos <[email protected]>
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Cc: David Howells <[email protected]>
    Cc: [email protected]
    Cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
soc: fsl: cpm1: qmc: Fix error check for devm_ioremap_resource() in qmc_qe_init_resources() [+ + +]
Author: Chen Ni <[email protected]>
Date:   Mon Feb 9 09:59:04 2026 +0800

    soc: fsl: cpm1: qmc: Fix error check for devm_ioremap_resource() in qmc_qe_init_resources()
    
    [ Upstream commit 3f4e403304186d79fddace860360540fc3af97f9 ]
    
    Fix wrong variable used for error checking after devm_ioremap_resource()
    call. The function checks qmc->scc_pram instead of qmc->dpram, which
    could lead to incorrect error handling.
    
    Fixes: eb680d563089 ("soc: fsl: cpm1: qmc: Add support for QUICC Engine (QE) implementation")
    Signed-off-by: Chen Ni <[email protected]>
    Acked-by: Herve Codina <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christophe Leroy (CS GROUP) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

soc: fsl: qbman: fix race condition in qman_destroy_fq [+ + +]
Author: Richard Genoud <[email protected]>
Date:   Tue Dec 23 08:25:49 2025 +0100

    soc: fsl: qbman: fix race condition in qman_destroy_fq
    
    [ Upstream commit 014077044e874e270ec480515edbc1cadb976cf2 ]
    
    When QMAN_FQ_FLAG_DYNAMIC_FQID is set, there's a race condition between
    fq_table[fq->idx] state and freeing/allocating from the pool and
    WARN_ON(fq_table[fq->idx]) in qman_create_fq() gets triggered.
    
    Indeed, we can have:
             Thread A                             Thread B
        qman_destroy_fq()                    qman_create_fq()
          qman_release_fqid()
            qman_shutdown_fq()
            gen_pool_free()
               -- At this point, the fqid is available again --
                                               qman_alloc_fqid()
               -- so, we can get the just-freed fqid in thread B --
                                               fq->fqid = fqid;
                                               fq->idx = fqid * 2;
                                               WARN_ON(fq_table[fq->idx]);
                                               fq_table[fq->idx] = fq;
         fq_table[fq->idx] = NULL;
    
    And adding some logs between qman_release_fqid() and
    fq_table[fq->idx] = NULL makes the WARN_ON() trigger a lot more.
    
    To prevent that, ensure that fq_table[fq->idx] is set to NULL before
    gen_pool_free() is called by using smp_wmb().
    
    Fixes: c535e923bb97 ("soc/fsl: Introduce DPAA 1.x QMan device driver")
    Signed-off-by: Richard Genoud <[email protected]>
    Tested-by: CHAMPSEIX Thomas <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Christophe Leroy (CS GROUP) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe() [+ + +]
Author: Zilin Guan <[email protected]>
Date:   Sun Dec 28 12:48:36 2025 +0000

    soc: microchip: mpfs: Fix memory leak in mpfs_sys_controller_probe()
    
    [ Upstream commit 5a741f8cc6fe62542f955cd8d24933a1b6589cbd ]
    
    In mpfs_sys_controller_probe(), if of_get_mtd_device_by_node() fails,
    the function returns immediately without freeing the allocated memory
    for sys_controller, leading to a memory leak.
    
    Fix this by jumping to the out_free label to ensure the memory is
    properly freed.
    
    Also, consolidate the error handling for the mbox_request_channel()
    failure case to use the same label.
    
    Fixes: 742aa6c563d2 ("soc: microchip: mpfs: enable access to the system controller's flash")
    Co-developed-by: Jianhao Xu <[email protected]>
    Signed-off-by: Jianhao Xu <[email protected]>
    Signed-off-by: Zilin Guan <[email protected]>
    Signed-off-by: Conor Dooley <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

soc: rockchip: grf: Add missing of_node_put() when returning [+ + +]
Author: Shawn Lin <[email protected]>
Date:   Wed Feb 11 21:02:37 2026 +0800

    soc: rockchip: grf: Add missing of_node_put() when returning
    
    [ Upstream commit 24ed11ee5bacf9a9aca18fc6b47667c7f38d578b ]
    
    Fix the smatch checking:
    drivers/soc/rockchip/grf.c:249 rockchip_grf_init()
    warn: inconsistent refcounting 'np->kobj.kref.refcount.refs.counter':
    
    Reported-by: Dan Carpenter <[email protected]>
    Fixes: 75fb63ae0312 ("soc: rockchip: grf: Support multiple grf to be handled")
    Closes: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Shawn Lin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Heiko Stuebner <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
spi: amlogic-spisg: Fix memory leak in aml_spisg_probe() [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sun Mar 8 14:49:21 2026 +0800

    spi: amlogic-spisg: Fix memory leak in aml_spisg_probe()
    
    [ Upstream commit b8db9552997924b750e727a625a30eaa4603bbb9 ]
    
    In aml_spisg_probe(), ctlr is allocated by
    spi_alloc_target()/spi_alloc_host(), but fails to call
    spi_controller_put() in several error paths. This leads
    to a memory leak whenever the driver fails to probe after
    the initial allocation.
    
    Convert to use devm_spi_alloc_host()/devm_spi_alloc_target()
    to fix the memory leak.
    
    Fixes: cef9991e04ae ("spi: Add Amlogic SPISG driver")
    Signed-off-by: Felix Gu <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

spi: amlogic: spifc-a4: Remove redundant clock cleanup [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sun Mar 8 21:34:55 2026 +0800

    spi: amlogic: spifc-a4: Remove redundant clock cleanup
    
    [ Upstream commit a00da54d06f435dbbeacb84f9121dbbe6d6eda74 ]
    
    The driver uses devm_clk_get_enabled() which enables the clock and
    registers a callback to automatically disable it when the device
    is unbound.
    
    Remove the redundant aml_sfc_disable_clk() call in the error paths
    and remove callback.
    
    Fixes: 4670db6f32e9 ("spi: amlogic: add driver for Amlogic SPI Flash Controller")
    Signed-off-by: Felix Gu <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

spi: fix statistics allocation [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Thu Mar 12 16:18:14 2026 +0100

    spi: fix statistics allocation
    
    commit dee0774bbb2abb172e9069ce5ffef579b12b3ae9 upstream.
    
    The controller per-cpu statistics is not allocated until after the
    controller has been registered with driver core, which leaves a window
    where accessing the sysfs attributes can trigger a NULL-pointer
    dereference.
    
    Fix this by moving the statistics allocation to controller allocation
    while tying its lifetime to that of the controller (rather than using
    implicit devres).
    
    Fixes: 6598b91b5ac3 ("spi: spi.c: Convert statistics to per-cpu u64_stats_t")
    Cc: [email protected]      # 6.0
    Cc: David Jander <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

spi: fix use-after-free on controller registration failure [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Thu Mar 12 16:18:13 2026 +0100

    spi: fix use-after-free on controller registration failure
    
    commit 8634e05b08ead636e926022f4a98416e13440df9 upstream.
    
    Make sure to deregister from driver core also in the unlikely event that
    per-cpu statistics allocation fails during controller registration to
    avoid use-after-free (of driver resources) and unclocked register
    accesses.
    
    Fixes: 6598b91b5ac3 ("spi: spi.c: Convert statistics to per-cpu u64_stats_t")
    Cc: [email protected]      # 6.0
    Cc: David Jander <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
sunrpc: fix cache_request leak in cache_release [+ + +]
Author: Jeff Layton <[email protected]>
Date:   Mon Feb 23 12:09:58 2026 -0500

    sunrpc: fix cache_request leak in cache_release
    
    commit 17ad31b3a43b72aec3a3d83605891e1397d0d065 upstream.
    
    When a reader's file descriptor is closed while in the middle of reading
    a cache_request (rp->offset != 0), cache_release() decrements the
    request's readers count but never checks whether it should free the
    request.
    
    In cache_read(), when readers drops to 0 and CACHE_PENDING is clear, the
    cache_request is removed from the queue and freed along with its buffer
    and cache_head reference. cache_release() lacks this cleanup.
    
    The only other path that frees requests with readers == 0 is
    cache_dequeue(), but it runs only when CACHE_PENDING transitions from
    set to clear. If that transition already happened while readers was
    still non-zero, cache_dequeue() will have skipped the request, and no
    subsequent call will clean it up.
    
    Add the same cleanup logic from cache_read() to cache_release(): after
    decrementing readers, check if it reached 0 with CACHE_PENDING clear,
    and if so, dequeue and free the cache_request.
    
    Reported-by: NeilBrown <[email protected]>
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Cc: [email protected]
    Signed-off-by: Jeff Layton <[email protected]>
    Signed-off-by: Chuck Lever <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
tee: shm: Remove refcounting of kernel pages [+ + +]
Author: Matthew Wilcox <[email protected]>
Date:   Fri Feb 20 14:19:59 2026 +0530

    tee: shm: Remove refcounting of kernel pages
    
    [ Upstream commit 08d9a4580f71120be3c5b221af32dca00a48ceb0 ]
    
    Earlier TEE subsystem assumed to refcount all the memory pages to be
    shared with TEE implementation to be refcounted. However, the slab
    allocations within the kernel don't allow refcounting kernel pages.
    
    It is rather better to trust the kernel clients to not free pages while
    being shared with TEE implementation. Hence, remove refcounting of kernel
    pages from register_shm_helper() API.
    
    Fixes: b9c0e49abfca ("mm: decline to manipulate the refcount on a slab page")
    Reported-by: Marco Felsch <[email protected]>
    Reported-by: Sven Püschel <[email protected]>
    Signed-off-by: Matthew Wilcox <[email protected]>
    Co-developed-by: Sumit Garg <[email protected]>
    Signed-off-by: Sumit Garg <[email protected]>
    Tested-by: Sven Püschel <[email protected]>
    Signed-off-by: Jens Wiklander <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure [+ + +]
Author: Josh Law <[email protected]>
Date:   Thu Mar 19 08:43:06 2026 +0900

    tools/bootconfig: fix fd leak in load_xbc_file() on fstat failure
    
    [ Upstream commit 3b2c2ab4ceb82af484310c3087541eab00ea288b ]
    
    If fstat() fails after open() succeeds, the function returns without
    closing the file descriptor. Also preserve errno across close(), since
    close() may overwrite it before the error is returned.
    
    Link: https://lore.kernel.org/all/[email protected]/
    
    Fixes: 950313ebf79c ("tools: bootconfig: Add bootconfig command")
    Signed-off-by: Josh Law <[email protected]>
    Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tracing: Fix failure to read user space from system call trace events [+ + +]
Author: Steven Rostedt <[email protected]>
Date:   Mon Mar 16 13:07:34 2026 -0400

    tracing: Fix failure to read user space from system call trace events
    
    commit edca33a56297d5741ccf867669debec116681987 upstream.
    
    The system call trace events call trace_user_fault_read() to read the user
    space part of some system calls. This is done by grabbing a per-cpu
    buffer, disabling migration, enabling preemption, calling
    copy_from_user(), disabling preemption, enabling migration and checking if
    the task was preempted while preemption was enabled. If it was, the buffer
    is considered corrupted and it tries again.
    
    There's a safety mechanism that will fail out of this loop if it fails 100
    times (with a warning). That warning message was triggered in some
    pi_futex stress tests. Enabling the sched_switch trace event and
    traceoff_on_warning, showed the problem:
    
     pi_mutex_hammer-1375    [006] d..21   138.981648: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981651: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981656: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981659: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981664: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981667: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981671: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981675: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981679: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981682: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981687: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981690: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981695: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981698: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981703: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981706: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981711: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981714: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981719: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981722: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981727: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981730: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
     pi_mutex_hammer-1375    [006] d..21   138.981735: sched_switch: prev_comm=pi_mutex_hammer prev_pid=1375 prev_prio=95 prev_state=R+ ==> next_comm=migration/6 next_pid=47 next_prio=0
         migration/6-47      [006] d..2.   138.981738: sched_switch: prev_comm=migration/6 prev_pid=47 prev_prio=0 prev_state=S ==> next_comm=pi_mutex_hammer next_pid=1375 next_prio=95
    
    What happened was the task 1375 was flagged to be migrated. When
    preemption was enabled, the migration thread woke up to migrate that task,
    but failed because migration for that task was disabled. This caused the
    loop to fail to exit because the task scheduled out while trying to read
    user space.
    
    Every time the task enabled preemption the migration thread would schedule
    in, try to migrate the task, fail and let the task continue. But because
    the loop would only enable preemption with migration disabled, it would
    always fail because each time it enabled preemption to read user space,
    the migration thread would try to migrate it.
    
    To solve this, when the loop fails to read user space without being
    scheduled out, enabled and disable preemption with migration enabled. This
    will allow the migration task to successfully migrate the task and the
    next loop should succeed to read user space without being scheduled out.
    
    Cc: [email protected]
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Fixes: 64cf7d058a005 ("tracing: Have trace_marker use per-cpu data to read user space")
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

tracing: Fix trace_marker copy link list updates [+ + +]
Author: Steven Rostedt <[email protected]>
Date:   Wed Mar 18 18:55:12 2026 -0400

    tracing: Fix trace_marker copy link list updates
    
    commit 07183aac4a6828e474f00b37c9d795d0d99e18a7 upstream.
    
    When the "copy_trace_marker" option is enabled for an instance, anything
    written into /sys/kernel/tracing/trace_marker is also copied into that
    instances buffer. When the option is set, that instance's trace_array
    descriptor is added to the marker_copies link list. This list is protected
    by RCU, as all iterations uses an RCU protected list traversal.
    
    When the instance is deleted, all the flags that were enabled are cleared.
    This also clears the copy_trace_marker flag and removes the trace_array
    descriptor from the list.
    
    The issue is after the flags are called, a direct call to
    update_marker_trace() is performed to clear the flag. This function
    returns true if the state of the flag changed and false otherwise. If it
    returns true here, synchronize_rcu() is called to make sure all readers
    see that its removed from the list.
    
    But since the flag was already cleared, the state does not change and the
    synchronization is never called, leaving a possible UAF bug.
    
    Move the clearing of all flags below the updating of the copy_trace_marker
    option which then makes sure the synchronization is performed.
    
    Also use the flag for checking the state in update_marker_trace() instead
    of looking at if the list is empty.
    
    Cc: [email protected]
    Cc: Masami Hiramatsu <[email protected]>
    Cc: Mathieu Desnoyers <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Fixes: 7b382efd5e8a ("tracing: Allow the top level trace_marker to write into another instances")
    Reported-by: Sasha Levin <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
udp_tunnel: fix NULL deref caused by udp_sock_create6 when CONFIG_IPV6=n [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Mon Mar 16 18:02:41 2026 -0700

    udp_tunnel: fix NULL deref caused by udp_sock_create6 when CONFIG_IPV6=n
    
    [ Upstream commit b3a6df291fecf5f8a308953b65ca72b7fc9e015d ]
    
    When CONFIG_IPV6 is disabled, the udp_sock_create6() function returns 0
    (success) without actually creating a socket. Callers such as
    fou_create() then proceed to dereference the uninitialized socket
    pointer, resulting in a NULL pointer dereference.
    
    The captured NULL deref crash:
      BUG: kernel NULL pointer dereference, address: 0000000000000018
      RIP: 0010:fou_nl_add_doit (net/ipv4/fou_core.c:590 net/ipv4/fou_core.c:764)
      [...]
      Call Trace:
        <TASK>
        genl_family_rcv_msg_doit.constprop.0 (net/netlink/genetlink.c:1114)
        genl_rcv_msg (net/netlink/genetlink.c:1194 net/netlink/genetlink.c:1209)
        [...]
        netlink_rcv_skb (net/netlink/af_netlink.c:2550)
        genl_rcv (net/netlink/genetlink.c:1219)
        netlink_unicast (net/netlink/af_netlink.c:1319 net/netlink/af_netlink.c:1344)
        netlink_sendmsg (net/netlink/af_netlink.c:1894)
        __sock_sendmsg (net/socket.c:727 (discriminator 1) net/socket.c:742 (discriminator 1))
        __sys_sendto (./include/linux/file.h:62 (discriminator 1) ./include/linux/file.h:83 (discriminator 1) net/socket.c:2183 (discriminator 1))
        __x64_sys_sendto (net/socket.c:2213 (discriminator 1) net/socket.c:2209 (discriminator 1) net/socket.c:2209 (discriminator 1))
        do_syscall_64 (arch/x86/entry/syscall_64.c:63 (discriminator 1) arch/x86/entry/syscall_64.c:94 (discriminator 1))
        entry_SYSCALL_64_after_hwframe (net/arch/x86/entry/entry_64.S:130)
    
    This patch makes udp_sock_create6 return -EPFNOSUPPORT instead, so
    callers correctly take their error paths. There is only one caller of
    the vulnerable function and only privileged users can trigger it.
    
    Fixes: fd384412e199b ("udp_tunnel: Seperate ipv6 functions into its own file.")
    Reported-by: Weiming Shi <[email protected]>
    Signed-off-by: Xiang Mei <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
vt: save/restore unicode screen buffer for alternate screen [+ + +]
Author: Nicolas Pitre <[email protected]>
Date:   Tue Jan 27 17:56:01 2026 -0500

    vt: save/restore unicode screen buffer for alternate screen
    
    commit 5eb608319bb56464674a71b4a66ea65c6c435d64 upstream.
    
    The alternate screen support added by commit 23743ba64709 ("vt: add
    support for smput/rmput escape codes") only saves and restores the
    regular screen buffer (vc_origin), but completely ignores the corresponding
    unicode screen buffer (vc_uni_lines) creating a messed-up display.
    
    Add vc_saved_uni_lines to save the unicode screen buffer when entering
    the alternate screen, and restore it when leaving. Also ensure proper
    cleanup in reset_terminal() and vc_deallocate().
    
    Fixes: 23743ba64709 ("vt: add support for smput/rmput escape codes")
    Cc: stable <[email protected]>
    Signed-off-by: Nicolas Pitre <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
wifi: cfg80211: cancel pmsr_free_wk in cfg80211_pmsr_wdev_down [+ + +]
Author: Peddolla Harshavardhan Reddy <[email protected]>
Date:   Thu Mar 5 21:36:59 2026 +0530

    wifi: cfg80211: cancel pmsr_free_wk in cfg80211_pmsr_wdev_down
    
    [ Upstream commit 6dccbc9f3e1d38565dff7730d2b7d1e8b16c9b09 ]
    
    When the nl80211 socket that originated a PMSR request is
    closed, cfg80211_release_pmsr() sets the request's nl_portid
    to zero and schedules pmsr_free_wk to process the abort
    asynchronously. If the interface is concurrently torn down
    before that work runs, cfg80211_pmsr_wdev_down() calls
    cfg80211_pmsr_process_abort() directly. However, the already-
    scheduled pmsr_free_wk work item remains pending and may run
    after the interface has been removed from the driver. This
    could cause the driver's abort_pmsr callback to operate on a
    torn-down interface, leading to undefined behavior and
    potential crashes.
    
    Cancel pmsr_free_wk synchronously in cfg80211_pmsr_wdev_down()
    before calling cfg80211_pmsr_process_abort(). This ensures any
    pending or in-progress work is drained before interface teardown
    proceeds, preventing the work from invoking the driver abort
    callback after the interface is gone.
    
    Fixes: 9bb7e0f24e7e ("cfg80211: add peer measurement with FTM initiator API")
    Signed-off-by: Peddolla Harshavardhan Reddy <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: mac80211: always free skb on ieee80211_tx_prepare_skb() failure [+ + +]
Author: Felix Fietkau <[email protected]>
Date:   Sat Mar 14 06:54:55 2026 +0000

    wifi: mac80211: always free skb on ieee80211_tx_prepare_skb() failure
    
    [ Upstream commit d5ad6ab61cbd89afdb60881f6274f74328af3ee9 ]
    
    ieee80211_tx_prepare_skb() has three error paths, but only two of them
    free the skb. The first error path (ieee80211_tx_prepare() returning
    TX_DROP) does not free it, while invoke_tx_handlers() failure and the
    fragmentation check both do.
    
    Add kfree_skb() to the first error path so all three are consistent,
    and remove the now-redundant frees in callers (ath9k, mt76,
    mac80211_hwsim) to avoid double-free.
    
    Document the skb ownership guarantee in the function's kdoc.
    
    Signed-off-by: Felix Fietkau <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Fixes: 06be6b149f7e ("mac80211: add ieee80211_tx_prepare_skb() helper function")
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: mac80211: fix NULL deref in mesh_matches_local() [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Tue Mar 17 20:42:44 2026 -0700

    wifi: mac80211: fix NULL deref in mesh_matches_local()
    
    [ Upstream commit c73bb9a2d33bf81f6eecaa0f474b6c6dbe9855bd ]
    
    mesh_matches_local() unconditionally dereferences ie->mesh_config to
    compare mesh configuration parameters. When called from
    mesh_rx_csa_frame(), the parsed action-frame elements may not contain a
    Mesh Configuration IE, leaving ie->mesh_config NULL and triggering a
    kernel NULL pointer dereference.
    
    The other two callers are already safe:
      - ieee80211_mesh_rx_bcn_presp() checks !elems->mesh_config before
        calling mesh_matches_local()
      - mesh_plink_get_event() is only reached through
        mesh_process_plink_frame(), which checks !elems->mesh_config, too
    
    mesh_rx_csa_frame() is the only caller that passes raw parsed elements
    to mesh_matches_local() without guarding mesh_config. An adjacent
    attacker can exploit this by sending a crafted CSA action frame that
    includes a valid Mesh ID IE but omits the Mesh Configuration IE,
    crashing the kernel.
    
    The captured crash log:
    
    Oops: general protection fault, probably for non-canonical address ...
    KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
    Workqueue: events_unbound cfg80211_wiphy_work
    [...]
    Call Trace:
     <TASK>
     ? __pfx_mesh_matches_local (net/mac80211/mesh.c:65)
     ieee80211_mesh_rx_queued_mgmt (net/mac80211/mesh.c:1686)
     [...]
     ieee80211_iface_work (net/mac80211/iface.c:1754 net/mac80211/iface.c:1802)
     [...]
     cfg80211_wiphy_work (net/wireless/core.c:426)
     process_one_work (net/kernel/workqueue.c:3280)
     ? assign_work (net/kernel/workqueue.c:1219)
     worker_thread (net/kernel/workqueue.c:3352)
     ? __pfx_worker_thread (net/kernel/workqueue.c:3385)
     kthread (net/kernel/kthread.c:436)
     [...]
     ret_from_fork_asm (net/arch/x86/entry/entry_64.S:255)
     </TASK>
    
    This patch adds a NULL check for ie->mesh_config at the top of
    mesh_matches_local() to return false early when the Mesh Configuration
    IE is absent.
    
    Fixes: 2e3c8736820b ("mac80211: support functions for mesh")
    Reported-by: Weiming Shi <[email protected]>
    Signed-off-by: Xiang Mei <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: mac80211: Fix static_branch_dec() underflow for aql_disable. [+ + +]
Author: Kuniyuki Iwashima <[email protected]>
Date:   Fri Mar 6 07:24:02 2026 +0000

    wifi: mac80211: Fix static_branch_dec() underflow for aql_disable.
    
    [ Upstream commit b94ae8e0d5fe1bdbbfdc3854ff6ce98f6876a828 ]
    
    syzbot reported static_branch_dec() underflow in aql_enable_write(). [0]
    
    The problem is that aql_enable_write() does not serialise concurrent
    write()s to the debugfs.
    
    aql_enable_write() checks static_key_false(&aql_disable.key) and
    later calls static_branch_inc() or static_branch_dec(), but the
    state may change between the two calls.
    
    aql_disable does not need to track inc/dec.
    
    Let's use static_branch_enable() and static_branch_disable().
    
    [0]:
    val == 0
    WARNING: kernel/jump_label.c:311 at __static_key_slow_dec_cpuslocked.part.0+0x107/0x120 kernel/jump_label.c:311, CPU#0: syz.1.3155/20288
    Modules linked in:
    CPU: 0 UID: 0 PID: 20288 Comm: syz.1.3155 Tainted: G     U       L      syzkaller #0 PREEMPT(full)
    Tainted: [U]=USER, [L]=SOFTLOCKUP
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/24/2026
    RIP: 0010:__static_key_slow_dec_cpuslocked.part.0+0x107/0x120 kernel/jump_label.c:311
    Code: f2 c9 ff 5b 5d c3 cc cc cc cc e8 54 f2 c9 ff 48 89 df e8 ac f9 ff ff eb ad e8 45 f2 c9 ff 90 0f 0b 90 eb a2 e8 3a f2 c9 ff 90 <0f> 0b 90 eb 97 48 89 df e8 5c 4b 33 00 e9 36 ff ff ff 0f 1f 80 00
    RSP: 0018:ffffc9000b9f7c10 EFLAGS: 00010293
    RAX: 0000000000000000 RBX: ffffffff9b3e5d40 RCX: ffffffff823c57b4
    RDX: ffff8880285a0000 RSI: ffffffff823c5846 RDI: ffff8880285a0000
    RBP: 0000000000000000 R08: 0000000000000005 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: 000000000000000a
    R13: 1ffff9200173ef88 R14: 0000000000000001 R15: ffffc9000b9f7e98
    FS:  00007f530dd726c0(0000) GS:ffff8881245e3000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000200000001140 CR3: 000000007cc4a000 CR4: 00000000003526f0
    Call Trace:
     <TASK>
     __static_key_slow_dec_cpuslocked kernel/jump_label.c:297 [inline]
     __static_key_slow_dec kernel/jump_label.c:321 [inline]
     static_key_slow_dec+0x7c/0xc0 kernel/jump_label.c:336
     aql_enable_write+0x2b2/0x310 net/mac80211/debugfs.c:343
     short_proxy_write+0x133/0x1a0 fs/debugfs/file.c:383
     vfs_write+0x2aa/0x1070 fs/read_write.c:684
     ksys_pwrite64 fs/read_write.c:793 [inline]
     __do_sys_pwrite64 fs/read_write.c:801 [inline]
     __se_sys_pwrite64 fs/read_write.c:798 [inline]
     __x64_sys_pwrite64+0x1eb/0x250 fs/read_write.c:798
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xc9/0xf80 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7f530cf9aeb9
    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:00007f530dd72028 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
    RAX: ffffffffffffffda RBX: 00007f530d215fa0 RCX: 00007f530cf9aeb9
    RDX: 0000000000000003 RSI: 0000000000000000 RDI: 0000000000000010
    RBP: 00007f530d008c1f R08: 0000000000000000 R09: 0000000000000000
    R10: 4200000000000005 R11: 0000000000000246 R12: 0000000000000000
    R13: 00007f530d216038 R14: 00007f530d215fa0 R15: 00007ffde89fb978
     </TASK>
    
    Fixes: e908435e402a ("mac80211: introduce aql_enable node in debugfs")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: mac80211: remove keys after disabling beaconing [+ + +]
Author: Johannes Berg <[email protected]>
Date:   Tue Mar 3 15:03:39 2026 +0100

    wifi: mac80211: remove keys after disabling beaconing
    
    [ Upstream commit 708bbb45537780a8d3721ca1e0cf1932c1d1bf5f ]
    
    We shouldn't remove keys before disable beaconing, at least when
    beacon protection is used, since that would remove keys that are
    still used for beacon transmission at the same time. Stop before
    removing keys so there's no race.
    
    Fixes: af2d14b01c32 ("mac80211: Beacon protection using the new BIGTK (STA)")
    Reviewed-by: Miriam Rachel Korenblit <[email protected]>
    Link: https://patch.msgid.link/20260303150339.574e7887b3ab.I50d708f5aa22584506a91d0da7f8a73ba39fceac@changeid
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: mac80211: use jiffies_delta_to_msecs() for sta_info inactive times [+ + +]
Author: Nicolas Cavallari <[email protected]>
Date:   Tue Mar 3 17:06:39 2026 +0100

    wifi: mac80211: use jiffies_delta_to_msecs() for sta_info inactive times
    
    [ Upstream commit ac6f24cc9c0a9aefa55ec9696dcafa971d4d760b ]
    
    Inactive times of around 0xffffffff milliseconds have been observed on
    an ath9k device on ARM.  This is likely due to a memory ordering race in
    the jiffies_to_msecs(jiffies - last_active()) calculation causing an
    overflow when the observed jiffies is below ieee80211_sta_last_active().
    
    Use jiffies_delta_to_msecs() instead to avoid this problem.
    
    Fixes: 7bbdd2d98797 ("mac80211: implement station stats retrieval")
    Signed-off-by: Nicolas Cavallari <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: wlcore: Return -ENOMEM instead of -EAGAIN if there is not enough headroom [+ + +]
Author: Guenter Roeck <[email protected]>
Date:   Tue Mar 17 23:46:36 2026 -0700

    wifi: wlcore: Return -ENOMEM instead of -EAGAIN if there is not enough headroom
    
    [ Upstream commit deb353d9bb009638b7762cae2d0b6e8fdbb41a69 ]
    
    Since upstream commit e75665dd0968 ("wifi: wlcore: ensure skb headroom
    before skb_push"), wl1271_tx_allocate() and with it
    wl1271_prepare_tx_frame() returns -EAGAIN if pskb_expand_head() fails.
    However, in wlcore_tx_work_locked(), a return value of -EAGAIN from
    wl1271_prepare_tx_frame() is interpreted as the aggregation buffer being
    full. This causes the code to flush the buffer, put the skb back at the
    head of the queue, and immediately retry the same skb in a tight while
    loop.
    
    Because wlcore_tx_work_locked() holds wl->mutex, and the retry happens
    immediately with GFP_ATOMIC, this will result in an infinite loop and a
    CPU soft lockup. Return -ENOMEM instead so the packet is dropped and
    the loop terminates.
    
    The problem was found by an experimental code review agent based on
    gemini-3.1-pro while reviewing backports into v6.18.y.
    
    Assisted-by: Gemini:gemini-3.1-pro
    Fixes: e75665dd0968 ("wifi: wlcore: ensure skb headroom before skb_push")
    Cc: Peter Astrand <[email protected]>
    Signed-off-by: Guenter Roeck <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
x86/hyperv: Use __naked attribute to fix stackless C function [+ + +]
Author: Ard Biesheuvel <[email protected]>
Date:   Mon Mar 2 17:45:31 2026 +0100

    x86/hyperv: Use __naked attribute to fix stackless C function
    
    [ Upstream commit 3fde5281b805370a6c3bd2ef462ebff70a0ea2c6 ]
    
    hv_crash_c_entry() is a C function that is entered without a stack,
    and this is only allowed for functions that have the __naked attribute,
    which informs the compiler that it must not emit the usual prologue and
    epilogue or emit any other kind of instrumentation that relies on a
    stack frame.
    
    So split up the function, and set the __naked attribute on the initial
    part that sets up the stack, GDT, IDT and other pieces that are needed
    for ordinary C execution. Given that function calls are not permitted
    either, use the existing long return coded in an asm() block to call the
    second part of the function, which is an ordinary function that is
    permitted to call other functions as usual.
    
    Reviewed-by: Andrew Cooper <[email protected]> # asm parts, not hv parts
    Reviewed-by: Mukesh Rathor <[email protected]>
    Acked-by: Uros Bizjak <[email protected]>
    Cc: Wei Liu <[email protected]>
    Cc: [email protected]
    Fixes: 94212d34618c ("x86/hyperv: Implement hypervisor RAM collection into vmcore")
    Signed-off-by: Ard Biesheuvel <[email protected]>
    Signed-off-by: Wei Liu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
x86/mce/amd: Check SMCA feature bit before accessing SMCA MSRs [+ + +]
Author: William Roche <[email protected]>
Date:   Tue Mar 17 10:38:10 2026 +0000

    x86/mce/amd: Check SMCA feature bit before accessing SMCA MSRs
    
    commit 201bc182ad6333468013f1af0719ffe125826b6a upstream.
    
    People do effort to inject MCEs into guests in order to simulate/test
    handling of hardware errors. The real use case behind it is testing the
    handling of SIGBUS which the memory failure code sends to the process.
    
    If that process is QEMU, instead of killing the whole guest, the MCE can
    be injected into the guest kernel so that latter can attempt proper
    handling and kill the user *process*  in the guest, instead, which
    caused the MCE. The assumption being here that the whole injection flow
    can supply enough information that the guest kernel can pinpoint the
    right process. But that's a different topic...
    
    Regardless of virtualization or not, access to SMCA-specific registers
    like MCA_DESTAT should only be done after having checked the smca
    feature bit. And there are AMD machines like Bulldozer (the one before
    Zen1) which do support deferred errors but are not SMCA machines.
    
    Therefore, properly check the feature bit before accessing related MSRs.
    
      [ bp: Rewrite commit message. ]
    
    Fixes: 7cb735d7c0cb ("x86/mce: Unify AMD DFR handler with MCA Polling")
    Signed-off-by: William Roche <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Yazen Ghannam <[email protected]>
    Cc: [email protected]
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86/platform/uv: Handle deconfigured sockets [+ + +]
Author: Kyle Meyer <[email protected]>
Date:   Fri Mar 20 12:19:20 2026 -0500

    x86/platform/uv: Handle deconfigured sockets
    
    commit 1f6aa5bbf1d0f81a8a2aafc16136e7dd9a609ff3 upstream.
    
    When a socket is deconfigured, it's mapped to SOCK_EMPTY (0xffff). This causes
    a panic while allocating UV hub info structures.
    
    Fix this by using NUMA_NO_NODE, allowing UV hub info structures to be
    allocated on valid nodes.
    
    Fixes: 8a50c5851927 ("x86/platform/uv: UV support for sub-NUMA clustering")
    Signed-off-by: Kyle Meyer <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Steve Wahl <[email protected]>
    Cc: [email protected]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
xen/privcmd: add boot control for restricted usage in domU [+ + +]
Author: Juergen Gross <[email protected]>
Date:   Tue Oct 14 13:28:15 2025 +0200

    xen/privcmd: add boot control for restricted usage in domU
    
    commit 1613462be621ad5103ec338a7b0ca0746ec4e5f1 upstream.
    
    When running in an unprivileged domU under Xen, the privcmd driver
    is restricted to allow only hypercalls against a target domain, for
    which the current domU is acting as a device model.
    
    Add a boot parameter "unrestricted" to allow all hypercalls (the
    hypervisor will still refuse destructive hypercalls affecting other
    guests).
    
    Make this new parameter effective only in case the domU wasn't started
    using secure boot, as otherwise hypercalls targeting the domU itself
    might result in violating the secure boot functionality.
    
    This is achieved by adding another lockdown reason, which can be
    tested to not being set when applying the "unrestricted" option.
    
    This is part of XSA-482
    
    Signed-off-by: Juergen Gross <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

xen/privcmd: restrict usage in unprivileged domU [+ + +]
Author: Juergen Gross <[email protected]>
Date:   Thu Oct 9 16:54:58 2025 +0200

    xen/privcmd: restrict usage in unprivileged domU
    
    commit 453b8fb68f3641fea970db88b7d9a153ed2a37e8 upstream.
    
    The Xen privcmd driver allows to issue arbitrary hypercalls from
    user space processes. This is normally no problem, as access is
    usually limited to root and the hypervisor will deny any hypercalls
    affecting other domains.
    
    In case the guest is booted using secure boot, however, the privcmd
    driver would be enabling a root user process to modify e.g. kernel
    memory contents, thus breaking the secure boot feature.
    
    The only known case where an unprivileged domU is really needing to
    use the privcmd driver is the case when it is acting as the device
    model for another guest. In this case all hypercalls issued via the
    privcmd driver will target that other guest.
    
    Fortunately the privcmd driver can already be locked down to allow
    only hypercalls targeting a specific domain, but this mode can be
    activated from user land only today.
    
    The target domain can be obtained from Xenstore, so when not running
    in dom0 restrict the privcmd driver to that target domain from the
    beginning, resolving the potential problem of breaking secure boot.
    
    This is XSA-482
    
    Reported-by: Teddy Astie <[email protected]>
    Fixes: 1c5de1939c20 ("xen: add privcmd driver")
    Signed-off-by: Juergen Gross <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>