Changelog in Linux kernel 6.18.22

 
accel/qaic: Handle DBC deactivation if the owner went away [+ + +]
Author: Youssef Samir <[email protected]>
Date:   Thu Feb 5 13:34:14 2026 +0100

    accel/qaic: Handle DBC deactivation if the owner went away
    
    [ Upstream commit 2feec5ae5df785658924ab6bd91280dc3926507c ]
    
    When a DBC is released, the device sends a QAIC_TRANS_DEACTIVATE_FROM_DEV
    transaction to the host over the QAIC_CONTROL MHI channel. QAIC handles
    this by calling decode_deactivate() to release the resources allocated for
    that DBC. Since that handling is done in the qaic_manage_ioctl() context,
    if the user goes away before receiving and handling the deactivation, the
    host will be out-of-sync with the DBCs available for use, and the DBC
    resources will not be freed unless the device is removed. If another user
    loads and requests to activate a network, then the device assigns the same
    DBC to that network, QAIC will "indefinitely" wait for dbc->in_use = false,
    leading the user process to hang.
    
    As a solution to this, handle QAIC_TRANS_DEACTIVATE_FROM_DEV transactions
    that are received after the user has gone away.
    
    Fixes: 129776ac2e38 ("accel/qaic: Add control path")
    Signed-off-by: Youssef Samir <[email protected]>
    Reviewed-by: Lizhi Hou <[email protected]>
    Reviewed-by: Jeff Hugo <[email protected]>
    Signed-off-by: Jeff Hugo <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
ACPI: RIMT: Add dependency between iommu and devices [+ + +]
Author: Sunil V L <[email protected]>
Date:   Tue Mar 3 11:46:05 2026 +0530

    ACPI: RIMT: Add dependency between iommu and devices
    
    [ Upstream commit 9156585280f161fc1c3552cf1860559edb2bb7e3 ]
    
    EPROBE_DEFER ensures IOMMU devices are probed before the devices that
    depend on them. During shutdown, however, the IOMMU may be removed
    first, leading to issues. To avoid this, a device link is added
    which enforces the correct removal order.
    
    Fixes: 8f7729552582 ("ACPI: RISC-V: Add support for RIMT")
    Signed-off-by: Sunil V L <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paul Walmsley <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ALSA: caiaq: fix stack out-of-bounds read in init_card [+ + +]
Author: Berk Cem Goksel <[email protected]>
Date:   Sun Mar 29 16:38:25 2026 +0300

    ALSA: caiaq: fix stack out-of-bounds read in init_card
    
    commit 45424e871abf2a152e247a9cff78359f18dd95c0 upstream.
    
    The loop creates a whitespace-stripped copy of the card shortname
    where `len < sizeof(card->id)` is used for the bounds check. Since
    sizeof(card->id) is 16 and the local id buffer is also 16 bytes,
    writing 16 non-space characters fills the entire buffer,
    overwriting the terminating nullbyte.
    
    When this non-null-terminated string is later passed to
    snd_card_set_id() -> copy_valid_id_string(), the function scans
    forward with `while (*nid && ...)` and reads past the end of the
    stack buffer, reading the contents of the stack.
    
    A USB device with a product name containing many non-ASCII, non-space
    characters (e.g. multibyte UTF-8) will reliably trigger this as follows:
    
      BUG: KASAN: stack-out-of-bounds in copy_valid_id_string
           sound/core/init.c:696 [inline]
      BUG: KASAN: stack-out-of-bounds in snd_card_set_id_no_lock+0x698/0x74c
           sound/core/init.c:718
    
    The off-by-one has been present since commit bafeee5b1f8d ("ALSA:
    snd_usb_caiaq: give better shortname") from June 2009 (v2.6.31-rc1),
    which first introduced this whitespace-stripping loop. The original
    code never accounted for the null terminator when bounding the copy.
    
    Fix this by changing the loop bound to `sizeof(card->id) - 1`,
    ensuring at least one byte remains as the null terminator.
    
    Fixes: bafeee5b1f8d ("ALSA: snd_usb_caiaq: give better shortname")
    Cc: [email protected]
    Cc: Andrey Konovalov <[email protected]>
    Reported-by: Berk Cem Goksel <[email protected]>
    Signed-off-by: Berk Cem Goksel <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ALSA: ctxfi: Fix missing SPDIFI1 index handling [+ + +]
Author: Takashi Iwai <[email protected]>
Date:   Sun Mar 29 11:12:37 2026 +0200

    ALSA: ctxfi: Fix missing SPDIFI1 index handling
    
    commit b045ab3dff97edae6d538eeff900a34c098761f8 upstream.
    
    SPDIF1 DAIO type isn't properly handled in daio_device_index() for
    hw20k2, and it returned -EINVAL, which ended up with the out-of-bounds
    array access.  Follow the hw20k1 pattern and return the proper index
    for this type, too.
    
    Reported-and-tested-by: Karsten Hohmeier <[email protected]>
    Closes: https://lore.kernel.org/[email protected]
    Cc: <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ALSA: hda/realtek: Add quirk for ASUS ROG Strix SCAR 15 [+ + +]
Author: Zhang Heng <[email protected]>
Date:   Mon Mar 30 15:53:34 2026 +0800

    ALSA: hda/realtek: Add quirk for ASUS ROG Strix SCAR 15
    
    commit f1af71d568e55536d9297bfa7907ad497108cf30 upstream.
    
    ASUS ROG Strix SCAR 15, like the Strix G15, requires the
    ALC285_FIXUP_ASUS_G533Z_PINS quirk to work properly.
    
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=221247
    Cc: <[email protected]>
    Signed-off-by: Zhang Heng <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ALSA: hda/realtek: add quirk for HP Victus 15-fb0xxx [+ + +]
Author: Sourav Nayak <[email protected]>
Date:   Fri Mar 27 19:58:05 2026 +0530

    ALSA: hda/realtek: add quirk for HP Victus 15-fb0xxx
    
    commit 1fbf85dbf02c96c318e056fb5b8fc614758fee3c upstream.
    
    This adds a mute led quirck for HP Victus 15-fb0xxx (103c:8a3d) model
    
    - As it used 0x8(full bright)/0x7f(little dim) for mute led on and other
      values as 0ff (0x0, 0x4, ...)
    
    - So, use ALC245_FIXUP_HP_MUTE_LED_V2_COEFBIT insted for safer approach
    
    Cc: <[email protected]>
    Signed-off-by: Sourav Nayak <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ALSA: usb-audio: Exclude Scarlett 2i2 1st Gen (8016) from SKIP_IFACE_SETUP [+ + +]
Author: Geoffrey D. Bennett <[email protected]>
Date:   Wed Apr 1 16:01:27 2026 +1030

    ALSA: usb-audio: Exclude Scarlett 2i2 1st Gen (8016) from SKIP_IFACE_SETUP
    
    [ Upstream commit a0dafdbd1049a8ea661a1a471be1b840bd8aed13 ]
    
    Same issue as the other 1st Gen Scarletts: QUIRK_FLAG_SKIP_IFACE_SETUP
    causes distorted audio on this revision of the Scarlett 2i2 1st Gen
    (1235:8016).
    
    Fixes: 38c322068a26 ("ALSA: usb-audio: Add QUIRK_FLAG_SKIP_IFACE_SETUP")
    Reported-by: lukas-reineke [https://github.com/geoffreybennett/linux-fcp/issues/54]
    Signed-off-by: Geoffrey D. Bennett <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ALSA: usb-audio: Exclude Scarlett Solo 1st Gen from SKIP_IFACE_SETUP [+ + +]
Author: Dag Smedberg <[email protected]>
Date:   Sun Mar 29 19:04:20 2026 +0200

    ALSA: usb-audio: Exclude Scarlett Solo 1st Gen from SKIP_IFACE_SETUP
    
    [ Upstream commit f025ac8c698ac7d29eb3b5025bcdaf7ad675785d ]
    
    Same issue that the Scarlett 2i2 1st Gen had:
    QUIRK_FLAG_SKIP_IFACE_SETUP causes distorted audio on the
    Scarlett Solo 1st Gen (1235:801c).
    
    Fixes: 38c322068a26 ("ALSA: usb-audio: Add QUIRK_FLAG_SKIP_IFACE_SETUP")
    Reported-by: Dag Smedberg <[email protected]>
    Tested-by: Dag Smedberg <[email protected]>
    Signed-off-by: Dag Smedberg <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
arm64/scs: Fix handling of advance_loc4 [+ + +]
Author: Pepper Gray <[email protected]>
Date:   Tue Mar 10 14:44:28 2026 +0100

    arm64/scs: Fix handling of advance_loc4
    
    [ Upstream commit d499e9627d70b1269020d59b95ed3e18bee6b8cd ]
    
    DW_CFA_advance_loc4 is defined but no handler is implemented. Its
    CFA opcode defaults to EDYNSCS_INVALID_CFA_OPCODE triggering an
    error which wrongfully prevents modules from loading.
    
    Link: https://bugs.gentoo.org/971060
    Signed-off-by: Pepper Gray <[email protected]>
    Signed-off-by: Will Deacon <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
 
ASoC: ep93xx: Fix unchecked clk_prepare_enable() and add rollback on failure [+ + +]
Author: Jihed Chaibi <[email protected]>
Date:   Tue Mar 24 22:09:09 2026 +0100

    ASoC: ep93xx: Fix unchecked clk_prepare_enable() and add rollback on failure
    
    [ Upstream commit 622363757b2286dd2c2984b0d80255cbb35a0495 ]
    
    ep93xx_i2s_enable() calls clk_prepare_enable() on three clocks in
    sequence (mclk, sclk, lrclk) without checking the return value of any
    of them. If an intermediate enable fails, the clocks that were already
    enabled are never rolled back, leaking them until the next disable cycle
    — which may never come if the stream never started cleanly.
    
    Change ep93xx_i2s_enable() from void to int. Add error checking after
    each clk_prepare_enable() call and unwind already-enabled clocks on
    failure. Propagate the error through ep93xx_i2s_startup() and
    ep93xx_i2s_resume(), both of which already return int.
    
    Signed-off-by: Jihed Chaibi <[email protected]>
    Fixes: f4ff6b56bc8a ("ASoC: cirrus: i2s: Prepare clock before using it")
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ASoC: Intel: boards: fix unmet dependency on PINCTRL [+ + +]
Author: Julian Braha <[email protected]>
Date:   Wed Mar 25 00:15:21 2026 +0000

    ASoC: Intel: boards: fix unmet dependency on PINCTRL
    
    [ Upstream commit e920c36f2073d533bdf19ba6ab690432c8173b63 ]
    
    This reverts commit c073f0757663 ("ASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43")
    
    Currently, SND_SOC_INTEL_SOUNDWIRE_SOF_MACH selects PINCTRL_CS42L43
    without also selecting or depending on PINCTRL, despite PINCTRL_CS42L43
    depending on PINCTRL.
    
    See the following Kbuild warning:
    
    WARNING: unmet direct dependencies detected for PINCTRL_CS42L43
      Depends on [n]: PINCTRL [=n] && MFD_CS42L43 [=m]
      Selected by [m]:
      - SND_SOC_INTEL_SOUNDWIRE_SOF_MACH [=m] && SOUND [=y] && SND [=m] && SND_SOC [=m] && SND_SOC_INTEL_MACH [=y] && (SND_SOC_SOF_INTEL_COMMON [=m] || !SND_SOC_SOF_INTEL_COMMON [=m]) && SND_SOC_SOF_INTEL_SOUNDWIRE [=m] && I2C [=y] && SPI_MASTER [=y] && ACPI [=y] && (MFD_INTEL_LPSS [=n] || COMPILE_TEST [=y]) && (SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES [=n] || COMPILE_TEST [=y]) && SOUNDWIRE [=m]
    
    In response to v1 of this patch [1], Arnd pointed out that there is
    no compile-time dependency sof_sdw and the PINCTRL_CS42L43 driver.
    After testing, I can confirm that the kernel compiled with
    SND_SOC_INTEL_SOUNDWIRE_SOF_MACH enabled and PINCTRL_CS42L43 disabled.
    
    This unmet dependency was detected by kconfirm, a static analysis
    tool for Kconfig.
    
    Link: https://lore.kernel.org/all/[email protected]/ [1]
    Fixes: c073f0757663 ("ASoC: Intel: sof_sdw: select PINCTRL_CS42L43 and SPI_CS42L43")
    Signed-off-by: Julian Braha <[email protected]>
    Acked-by: Arnd Bergmann <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ASoC: qcom: sc7280: make use of common helpers [+ + +]
Author: Srinivas Kandagatla <[email protected]>
Date:   Tue Apr 7 16:32:05 2026 +0800

    ASoC: qcom: sc7280: make use of common helpers
    
    commit 8fdb030fe283c84fd8d378c97ad0f32d6cdec6ce upstream.
    
    sc7280 machine driver can make use of common sdw functions to do most of
    the soundwire related operations. Remove such redundant code from sc7280
    driver.
    
    [This is a partial backport containing only the sound/soc/qcom/sdw.c
    changes which add LPASS CDC DMA DAI IDs to qcom_snd_is_sdw_dai().
    The sc7280.c refactoring changes are omitted as they depend on
    intermediate patches not present in 6.18.y. The sdw.c change fixes a
    NULL pointer dereference for lpass-cpu based SoundWire links.]
    
    Fixes: bcba17279327 ("ASoC: qcom: sdw: fix memory leak for sdw_stream_runtime")
    Cc: [email protected]
    Signed-off-by: Srinivas Kandagatla <[email protected]>
    Tested-by: Steev Klimaszewski <[email protected]> # Thinkpad X13s
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Xilin Wu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
atm: lec: fix use-after-free in sock_def_readable() [+ + +]
Author: Deepanshu Kartikey <[email protected]>
Date:   Mon Mar 9 21:29:08 2026 +0530

    atm: lec: fix use-after-free in sock_def_readable()
    
    [ Upstream commit 922814879542c2e397b0e9641fd36b8202a8e555 ]
    
    A race condition exists between lec_atm_close() setting priv->lecd
    to NULL and concurrent access to priv->lecd in send_to_lecd(),
    lec_handle_bridge(), and lec_atm_send(). When the socket is freed
    via RCU while another thread is still using it, a use-after-free
    occurs in sock_def_readable() when accessing the socket's wait queue.
    
    The root cause is that lec_atm_close() clears priv->lecd without
    any synchronization, while callers dereference priv->lecd without
    any protection against concurrent teardown.
    
    Fix this by converting priv->lecd to an RCU-protected pointer:
    - Mark priv->lecd as __rcu in lec.h
    - Use rcu_assign_pointer() in lec_atm_close() and lecd_attach()
      for safe pointer assignment
    - Use rcu_access_pointer() for NULL checks that do not dereference
      the pointer in lec_start_xmit(), lec_push(), send_to_lecd() and
      lecd_attach()
    - Use rcu_read_lock/rcu_dereference/rcu_read_unlock in send_to_lecd(),
      lec_handle_bridge() and lec_atm_send() to safely access lecd
    - Use rcu_assign_pointer() followed by synchronize_rcu() in
      lec_atm_close() to ensure all readers have completed before
      proceeding. This is safe since lec_atm_close() is called from
      vcc_release() which holds lock_sock(), a sleeping lock.
    - Remove the manual sk_receive_queue drain from lec_atm_close()
      since vcc_destroy_socket() already drains it after lec_atm_close()
      returns.
    
    v2: Switch from spinlock + sock_hold/put approach to RCU to properly
        fix the race. The v1 spinlock approach had two issues pointed out
        by Eric Dumazet:
        1. priv->lecd was still accessed directly after releasing the
           lock instead of using a local copy.
        2. The spinlock did not prevent packets being queued after
           lec_atm_close() drains sk_receive_queue since timer and
           workqueue paths bypass netif_stop_queue().
    
    Note: Syzbot patch testing was attempted but the test VM terminated
        unexpectedly with "Connection to localhost closed by remote host",
        likely due to a QEMU AHCI emulation issue unrelated to this fix.
        Compile testing with "make W=1 net/atm/lec.o" passes cleanly.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=f50072212ab792c86925
    Link: https://lore.kernel.org/all/[email protected]/T/ [v1]
    Signed-off-by: Deepanshu Kartikey <[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]>

 
Bluetooth: hci_conn: fix potential UAF in set_cig_params_sync [+ + +]
Author: Pauli Virtanen <[email protected]>
Date:   Sun Mar 29 16:43:01 2026 +0300

    Bluetooth: hci_conn: fix potential UAF in set_cig_params_sync
    
    [ Upstream commit a2639a7f0f5bf7d73f337f8f077c19415c62ed2c ]
    
    hci_conn lookup and field access must be covered by hdev lock in
    set_cig_params_sync, otherwise it's possible it is freed concurrently.
    
    Take hdev lock to prevent hci_conn from being deleted or modified
    concurrently.  Just RCU lock is not suitable here, as we also want to
    avoid "tearing" in the configuration.
    
    Fixes: a091289218202 ("Bluetooth: hci_conn: Fix hci_le_set_cig_params")
    Signed-off-by: Pauli Virtanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: hci_event: fix potential UAF in hci_le_remote_conn_param_req_evt [+ + +]
Author: Pauli Virtanen <[email protected]>
Date:   Sun Mar 29 16:43:02 2026 +0300

    Bluetooth: hci_event: fix potential UAF in hci_le_remote_conn_param_req_evt
    
    [ Upstream commit b255531b27da336571411248c2a72a350662bd09 ]
    
    hci_conn lookup and field access must be covered by hdev lock in
    hci_le_remote_conn_param_req_evt, otherwise it's possible it is freed
    concurrently.
    
    Extend the hci_dev_lock critical section to cover all conn usage.
    
    Fixes: 95118dd4edfec ("Bluetooth: hci_event: Use of a function table to handle LE subevents")
    Signed-off-by: Pauli Virtanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: hci_h4: Fix race during initialization [+ + +]
Author: Jonathan Rissanen <[email protected]>
Date:   Fri Mar 27 11:47:21 2026 +0100

    Bluetooth: hci_h4: Fix race during initialization
    
    [ Upstream commit 0ffac654e95c1bdfe2d4edf28fb18d6ba1f103e6 ]
    
    Commit 5df5dafc171b ("Bluetooth: hci_uart: Fix another race during
    initialization") fixed a race for hci commands sent during initialization.
    However, there is still a race that happens if an hci event from one of
    these commands is received before HCI_UART_REGISTERED has been set at
    the end of hci_uart_register_dev(). The event will be ignored which
    causes the command to fail with a timeout in the log:
    
    "Bluetooth: hci0: command 0x1003 tx timeout"
    
    This is because the hci event receive path (hci_uart_tty_receive ->
    h4_recv) requires HCI_UART_REGISTERED to be set in h4_recv(), while the
    hci command transmit path (hci_uart_send_frame -> h4_enqueue) only
    requires HCI_UART_PROTO_INIT to be set in hci_uart_send_frame().
    
    The check for HCI_UART_REGISTERED was originally added in commit
    c2578202919a ("Bluetooth: Fix H4 crash from incoming UART packets")
    to fix a crash caused by hu->hdev being null dereferenced. That can no
    longer happen: once HCI_UART_PROTO_INIT is set in hci_uart_register_dev()
    all pointers (hu, hu->priv and hu->hdev) are valid, and
    hci_uart_tty_receive() already calls h4_recv() on HCI_UART_PROTO_INIT
    or HCI_UART_PROTO_READY.
    
    Remove the check for HCI_UART_REGISTERED in h4_recv() to fix the race
    condition.
    
    Fixes: 5df5dafc171b ("Bluetooth: hci_uart: Fix another race during initialization")
    Signed-off-by: Jonathan Rissanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: hci_sync: call destroy in hci_cmd_sync_run if immediate [+ + +]
Author: Pauli Virtanen <[email protected]>
Date:   Wed Mar 25 21:07:46 2026 +0200

    Bluetooth: hci_sync: call destroy in hci_cmd_sync_run if immediate
    
    [ Upstream commit a834a0b66ec6fb743377201a0f4229bb2503f4ce ]
    
    hci_cmd_sync_run() may run the work immediately if called from existing
    sync work (otherwise it queues a new sync work). In this case it fails
    to call the destroy() function.
    
    On immediate run, make it behave same way as if item was queued
    successfully: call destroy, and return 0.
    
    The only callsite is hci_abort_conn() via hci_cmd_sync_run_once(), and
    this changes its return value. However, its return value is not used
    except as the return value for hci_disconnect(), and nothing uses the
    return value of hci_disconnect(). Hence there should be no behavior
    change anywhere.
    
    Fixes: c898f6d7b093b ("Bluetooth: hci_sync: Introduce hci_cmd_sync_run/hci_cmd_sync_run_once")
    Signed-off-by: Pauli Virtanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: hci_sync: fix stack buffer overflow in hci_le_big_create_sync [+ + +]
Author: hkbinbin <[email protected]>
Date:   Tue Mar 31 05:39:16 2026 +0000

    Bluetooth: hci_sync: fix stack buffer overflow in hci_le_big_create_sync
    
    commit bc39a094730ce062fa034a529c93147c096cb488 upstream.
    
    hci_le_big_create_sync() uses DEFINE_FLEX to allocate a
    struct hci_cp_le_big_create_sync on the stack with room for 0x11 (17)
    BIS entries.  However, conn->num_bis can hold up to HCI_MAX_ISO_BIS (31)
    entries — validated against ISO_MAX_NUM_BIS (0x1f) in the caller
    hci_conn_big_create_sync().  When conn->num_bis is between 18 and 31,
    the memcpy that copies conn->bis into cp->bis writes up to 14 bytes
    past the stack buffer, corrupting adjacent stack memory.
    
    This is trivially reproducible: binding an ISO socket with
    bc_num_bis = ISO_MAX_NUM_BIS (31) and calling listen() will
    eventually trigger hci_le_big_create_sync() from the HCI command
    sync worker, causing a KASAN-detectable stack-out-of-bounds write:
    
      BUG: KASAN: stack-out-of-bounds in hci_le_big_create_sync+0x256/0x3b0
      Write of size 31 at addr ffffc90000487b48 by task kworker/u9:0/71
    
    Fix this by changing the DEFINE_FLEX count from the incorrect 0x11 to
    HCI_MAX_ISO_BIS, which matches the maximum number of BIS entries that
    conn->bis can actually carry.
    
    Fixes: 42ecf1947135 ("Bluetooth: ISO: Do not emit LE BIG Create Sync if previous is pending")
    Cc: [email protected]
    Signed-off-by: hkbinbin <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Bluetooth: MGMT: validate LTK enc_size on load [+ + +]
Author: Keenan Dong <[email protected]>
Date:   Sat Mar 28 16:46:47 2026 +0800

    Bluetooth: MGMT: validate LTK enc_size on load
    
    [ Upstream commit b8dbe9648d69059cfe3a28917bfbf7e61efd7f15 ]
    
    Load Long Term Keys stores the user-provided enc_size and later uses
    it to size fixed-size stack operations when replying to LE LTK
    requests. An enc_size larger than the 16-byte key buffer can therefore
    overflow the reply stack buffer.
    
    Reject oversized enc_size values while validating the management LTK
    record so invalid keys never reach the stored key state.
    
    Fixes: 346af67b8d11 ("Bluetooth: Add MGMT handlers for dealing with SMP LTK's")
    Reported-by: Keenan Dong <[email protected]>
    Signed-off-by: Keenan Dong <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: MGMT: validate mesh send advertising payload length [+ + +]
Author: Keenan Dong <[email protected]>
Date:   Wed Apr 1 22:25:26 2026 +0800

    Bluetooth: MGMT: validate mesh send advertising payload length
    
    [ Upstream commit bda93eec78cdbfe5cda00785cefebd443e56b88b ]
    
    mesh_send() currently bounds MGMT_OP_MESH_SEND by total command
    length, but it never verifies that the bytes supplied for the
    flexible adv_data[] array actually match the embedded adv_data_len
    field. MGMT_MESH_SEND_SIZE only covers the fixed header, so a
    truncated command can still pass the existing 20..50 byte range
    check and later drive the async mesh send path past the end of the
    queued command buffer.
    
    Keep rejecting zero-length and oversized advertising payloads, but
    validate adv_data_len explicitly and require the command length to
    exactly match the flexible array size before queueing the request.
    
    Fixes: b338d91703fa ("Bluetooth: Implement support for Mesh")
    Reported-by: Keenan Dong <[email protected]>
    Signed-off-by: Keenan Dong <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: SCO: fix race conditions in sco_sock_connect() [+ + +]
Author: Cen Zhang <[email protected]>
Date:   Thu Mar 26 23:16:45 2026 +0800

    Bluetooth: SCO: fix race conditions in sco_sock_connect()
    
    [ Upstream commit 8a5b0135d4a5d9683203a3d9a12a711ccec5936b ]
    
    sco_sock_connect() checks sk_state and sk_type without holding
    the socket lock. Two concurrent connect() syscalls on the same
    socket can both pass the check and enter sco_connect(), leading
    to use-after-free.
    
    The buggy scenario involves three participants and was confirmed
    with additional logging instrumentation:
    
      Thread A (connect):    HCI disconnect:      Thread B (connect):
    
      sco_sock_connect(sk)                        sco_sock_connect(sk)
      sk_state==BT_OPEN                           sk_state==BT_OPEN
      (pass, no lock)                             (pass, no lock)
      sco_connect(sk):                            sco_connect(sk):
        hci_dev_lock                                hci_dev_lock
        hci_connect_sco                               <- blocked
          -> hcon1
        sco_conn_add->conn1
        lock_sock(sk)
        sco_chan_add:
          conn1->sk = sk
          sk->conn = conn1
        sk_state=BT_CONNECT
        release_sock
        hci_dev_unlock
                               hci_dev_lock
                               sco_conn_del:
                                 lock_sock(sk)
                                 sco_chan_del:
                                   sk->conn=NULL
                                   conn1->sk=NULL
                                   sk_state=
                                     BT_CLOSED
                                   SOCK_ZAPPED
                                 release_sock
                               hci_dev_unlock
                                                      (unblocked)
                                                      hci_connect_sco
                                                        -> hcon2
                                                      sco_conn_add
                                                        -> conn2
                                                      lock_sock(sk)
                                                      sco_chan_add:
                                                        sk->conn=conn2
                                                      sk_state=
                                                        BT_CONNECT
                                                      // zombie sk!
                                                      release_sock
                                                      hci_dev_unlock
    
    Thread B revives a BT_CLOSED + SOCK_ZAPPED socket back to
    BT_CONNECT. Subsequent cleanup triggers double sock_put() and
    use-after-free. Meanwhile conn1 is leaked as it was orphaned
    when sco_conn_del() cleared the association.
    
    Fix this by:
    - Moving lock_sock() before the sk_state/sk_type checks in
      sco_sock_connect() to serialize concurrent connect attempts
    - Fixing the sk_type != SOCK_SEQPACKET check to actually
      return the error instead of just assigning it
    - Adding a state re-check in sco_connect() after lock_sock()
      to catch state changes during the window between the locks
    - Adding sco_pi(sk)->conn check in sco_chan_add() to prevent
      double-attach of a socket to multiple connections
    - Adding hci_conn_drop() on sco_chan_add failure to prevent
      HCI connection leaks
    
    Fixes: 9a8ec9e8ebb5 ("Bluetooth: SCO: Fix possible circular locking dependency on sco_connect_cfm")
    Signed-off-by: Cen Zhang <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: SMP: derive legacy responder STK authentication from MITM state [+ + +]
Author: Oleh Konko <[email protected]>
Date:   Tue Mar 31 11:52:13 2026 +0000

    Bluetooth: SMP: derive legacy responder STK authentication from MITM state
    
    commit 20756fec2f0108cb88e815941f1ffff88dc286fe upstream.
    
    The legacy responder path in smp_random() currently labels the stored
    STK as authenticated whenever pending_sec_level is BT_SECURITY_HIGH.
    That reflects what the local service requested, not what the pairing
    flow actually achieved.
    
    For Just Works/Confirm legacy pairing, SMP_FLAG_MITM_AUTH stays clear
    and the resulting STK should remain unauthenticated even if the local
    side requested HIGH security. Use the established MITM state when
    storing the responder STK so the key metadata matches the pairing result.
    
    This also keeps the legacy path aligned with the Secure Connections code,
    which already treats JUST_WORKS/JUST_CFM as unauthenticated.
    
    Fixes: fff3490f4781 ("Bluetooth: Fix setting correct authentication information for SMP STK")
    Cc: [email protected]
    Signed-off-by: Oleh Konko <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Bluetooth: SMP: force responder MITM requirements before building the pairing response [+ + +]
Author: Oleh Konko <[email protected]>
Date:   Tue Mar 31 11:52:12 2026 +0000

    Bluetooth: SMP: force responder MITM requirements before building the pairing response
    
    commit d05111bfe37bfd8bd4d2dfe6675d6bdeef43f7c7 upstream.
    
    smp_cmd_pairing_req() currently builds the pairing response from the
    initiator auth_req before enforcing the local BT_SECURITY_HIGH
    requirement. If the initiator omits SMP_AUTH_MITM, the response can
    also omit it even though the local side still requires MITM.
    
    tk_request() then sees an auth value without SMP_AUTH_MITM and may
    select JUST_CFM, making method selection inconsistent with the pairing
    policy the responder already enforces.
    
    When the local side requires HIGH security, first verify that MITM can
    be achieved from the IO capabilities and then force SMP_AUTH_MITM in the
    response in both rsp.auth_req and auth. This keeps the responder auth bits
    and later method selection aligned.
    
    Fixes: 2b64d153a0cc ("Bluetooth: Add MITM mechanism to LE-SMP")
    Cc: [email protected]
    Suggested-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Oleh Konko <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
bnxt_en: Restore default stat ctxs for ULP when resource is available [+ + +]
Author: Pavan Chebbi <[email protected]>
Date:   Mon Mar 30 23:51:38 2026 -0700

    bnxt_en: Restore default stat ctxs for ULP when resource is available
    
    [ Upstream commit 071dbfa304e85a6b04a593e950d18fa170997288 ]
    
    During resource reservation, if the L2 driver does not have enough
    MSIX vectors to provide to the RoCE driver, it sets the stat ctxs for
    ULP also to 0 so that we don't have to reserve it unnecessarily.
    
    However, subsequently the user may reduce L2 rings thereby freeing up
    some resources that the L2 driver can now earmark for RoCE. In this
    case, the driver should restore the default ULP stat ctxs to make
    sure that all RoCE resources are ready for use.
    
    The RoCE driver may fail to initialize in this scenario without this
    fix.
    
    Fixes: d630624ebd70 ("bnxt_en: Utilize ulp client resources if RoCE is not registered")
    Reviewed-by: Kalesh AP <[email protected]>
    Signed-off-by: Pavan Chebbi <[email protected]>
    Signed-off-by: Michael Chan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

bnxt_en: set backing store type from query type [+ + +]
Author: Pengpeng Hou <[email protected]>
Date:   Sun Mar 29 07:43:56 2026 +0800

    bnxt_en: set backing store type from query type
    
    [ Upstream commit 4ee937107d52f9e5c350e4b5e629760e328b3d9f ]
    
    bnxt_hwrm_func_backing_store_qcaps_v2() stores resp->type from the
    firmware response in ctxm->type and later uses that value to index
    fixed backing-store metadata arrays such as ctx_arr[] and
    bnxt_bstore_to_trace[].
    
    ctxm->type is fixed by the current backing-store query type and matches
    the array index of ctx->ctx_arr. Set ctxm->type from the current loop
    variable instead of depending on resp->type.
    
    Also update the loop to advance type from next_valid_type in the for
    statement, which keeps the control flow simpler for non-valid and
    unchanged entries.
    
    Fixes: 6a4d0774f02d ("bnxt_en: Add support for new backing store query firmware API")
    Signed-off-by: Pengpeng Hou <[email protected]>
    Reviewed-by: Michael Chan <[email protected]>
    Tested-by: Michael Chan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
bpf: Fix regsafe() for pointers to packet [+ + +]
Author: Alexei Starovoitov <[email protected]>
Date:   Tue Mar 31 13:42:28 2026 -0700

    bpf: Fix regsafe() for pointers to packet
    
    [ Upstream commit a8502a79e832b861e99218cbd2d8f4312d62e225 ]
    
    In case rold->reg->range == BEYOND_PKT_END && rcur->reg->range == N
    regsafe() may return true which may lead to current state with
    valid packet range not being explored. Fix the bug.
    
    Fixes: 6d94e741a8ff ("bpf: Support for pointers beyond pkt_end.")
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Andrii Nakryiko <[email protected]>
    Reviewed-by: Daniel Borkmann <[email protected]>
    Reviewed-by: Amery Hung <[email protected]>
    Acked-by: Eduard Zingerman <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

bpf: reject direct access to nullable PTR_TO_BUF pointers [+ + +]
Author: Qi Tang <[email protected]>
Date:   Thu Apr 2 17:29:22 2026 +0800

    bpf: reject direct access to nullable PTR_TO_BUF pointers
    
    [ Upstream commit b0db1accbc7395657c2b79db59fa9fae0d6656f3 ]
    
    check_mem_access() matches PTR_TO_BUF via base_type() which strips
    PTR_MAYBE_NULL, allowing direct dereference without a null check.
    
    Map iterator ctx->key and ctx->value are PTR_TO_BUF | PTR_MAYBE_NULL.
    On stop callbacks these are NULL, causing a kernel NULL dereference.
    
    Add a type_may_be_null() guard to the PTR_TO_BUF branch, matching the
    existing PTR_TO_BTF_ID pattern.
    
    Fixes: 20b2aff4bc15 ("bpf: Introduce MEM_RDONLY flag")
    Signed-off-by: Qi Tang <[email protected]>
    Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

bpf: Reject sleepable kprobe_multi programs at attach time [+ + +]
Author: Varun R Mallya <[email protected]>
Date:   Thu Apr 2 00:41:25 2026 +0530

    bpf: Reject sleepable kprobe_multi programs at attach time
    
    [ Upstream commit eb7024bfcc5f68ed11ed9dd4891a3073c15f04a8 ]
    
    kprobe.multi programs run in atomic/RCU context and cannot sleep.
    However, bpf_kprobe_multi_link_attach() did not validate whether the
    program being attached had the sleepable flag set, allowing sleepable
    helpers such as bpf_copy_from_user() to be invoked from a non-sleepable
    context.
    
    This causes a "sleeping function called from invalid context" splat:
    
      BUG: sleeping function called from invalid context at ./include/linux/uaccess.h:169
      in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1787, name: sudo
      preempt_count: 1, expected: 0
      RCU nest depth: 2, expected: 0
    
    Fix this by rejecting sleepable programs early in
    bpf_kprobe_multi_link_attach(), before any further processing.
    
    Fixes: 0dcac2725406 ("bpf: Add multi kprobe link")
    Signed-off-by: Varun R Mallya <[email protected]>
    Acked-by: Kumar Kartikeya Dwivedi <[email protected]>
    Acked-by: Leon Hwang <[email protected]>
    Acked-by: Jiri Olsa <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

bpf: sockmap: Fix use-after-free of sk->sk_socket in sk_psock_verdict_data_ready(). [+ + +]
Author: Kuniyuki Iwashima <[email protected]>
Date:   Wed Apr 1 00:54:15 2026 +0000

    bpf: sockmap: Fix use-after-free of sk->sk_socket in sk_psock_verdict_data_ready().
    
    [ Upstream commit ad8391d37f334ee73ba91926f8b4e4cf6d31ea04 ]
    
    syzbot reported use-after-free of AF_UNIX socket's sk->sk_socket
    in sk_psock_verdict_data_ready(). [0]
    
    In unix_stream_sendmsg(), the peer socket's ->sk_data_ready() is
    called after dropping its unix_state_lock().
    
    Although the sender socket holds the peer's refcount, it does not
    prevent the peer's sock_orphan(), and the peer's sk_socket might
    be freed after one RCU grace period.
    
    Let's fetch the peer's sk->sk_socket and sk->sk_socket->ops under
    RCU in sk_psock_verdict_data_ready().
    
    [0]:
    BUG: KASAN: slab-use-after-free in sk_psock_verdict_data_ready+0xec/0x590 net/core/skmsg.c:1278
    Read of size 8 at addr ffff8880594da860 by task syz.4.1842/11013
    
    CPU: 1 UID: 0 PID: 11013 Comm: syz.4.1842 Not tainted syzkaller #0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
    Call Trace:
     <TASK>
     dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
     print_address_description mm/kasan/report.c:378 [inline]
     print_report+0xba/0x230 mm/kasan/report.c:482
     kasan_report+0x117/0x150 mm/kasan/report.c:595
     sk_psock_verdict_data_ready+0xec/0x590 net/core/skmsg.c:1278
     unix_stream_sendmsg+0x8a3/0xe80 net/unix/af_unix.c:2482
     sock_sendmsg_nosec net/socket.c:721 [inline]
     __sock_sendmsg net/socket.c:736 [inline]
     ____sys_sendmsg+0x972/0x9f0 net/socket.c:2585
     ___sys_sendmsg+0x2a5/0x360 net/socket.c:2639
     __sys_sendmsg net/socket.c:2671 [inline]
     __do_sys_sendmsg net/socket.c:2676 [inline]
     __se_sys_sendmsg net/socket.c:2674 [inline]
     __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2674
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7facf899c819
    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:00007facf9827028 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
    RAX: ffffffffffffffda RBX: 00007facf8c15fa0 RCX: 00007facf899c819
    RDX: 0000000000000000 RSI: 0000200000000500 RDI: 0000000000000004
    RBP: 00007facf8a32c91 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    R13: 00007facf8c16038 R14: 00007facf8c15fa0 R15: 00007ffd41b01c78
     </TASK>
    
    Allocated by task 11013:
     kasan_save_stack mm/kasan/common.c:57 [inline]
     kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
     unpoison_slab_object mm/kasan/common.c:340 [inline]
     __kasan_slab_alloc+0x6c/0x80 mm/kasan/common.c:366
     kasan_slab_alloc include/linux/kasan.h:253 [inline]
     slab_post_alloc_hook mm/slub.c:4538 [inline]
     slab_alloc_node mm/slub.c:4866 [inline]
     kmem_cache_alloc_lru_noprof+0x2b8/0x640 mm/slub.c:4885
     sock_alloc_inode+0x28/0xc0 net/socket.c:316
     alloc_inode+0x6a/0x1b0 fs/inode.c:347
     new_inode_pseudo include/linux/fs.h:3003 [inline]
     sock_alloc net/socket.c:631 [inline]
     __sock_create+0x12d/0x9d0 net/socket.c:1562
     sock_create net/socket.c:1656 [inline]
     __sys_socketpair+0x1c4/0x560 net/socket.c:1803
     __do_sys_socketpair net/socket.c:1856 [inline]
     __se_sys_socketpair net/socket.c:1853 [inline]
     __x64_sys_socketpair+0x9b/0xb0 net/socket.c:1853
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Freed by task 15:
     kasan_save_stack mm/kasan/common.c:57 [inline]
     kasan_save_track+0x3e/0x80 mm/kasan/common.c:78
     kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:584
     poison_slab_object mm/kasan/common.c:253 [inline]
     __kasan_slab_free+0x5c/0x80 mm/kasan/common.c:285
     kasan_slab_free include/linux/kasan.h:235 [inline]
     slab_free_hook mm/slub.c:2685 [inline]
     slab_free mm/slub.c:6165 [inline]
     kmem_cache_free+0x187/0x630 mm/slub.c:6295
     rcu_do_batch kernel/rcu/tree.c:2617 [inline]
     rcu_core+0x7cd/0x1070 kernel/rcu/tree.c:2869
     handle_softirqs+0x22a/0x870 kernel/softirq.c:622
     run_ksoftirqd+0x36/0x60 kernel/softirq.c:1063
     smpboot_thread_fn+0x541/0xa50 kernel/smpboot.c:160
     kthread+0x388/0x470 kernel/kthread.c:436
     ret_from_fork+0x51e/0xb90 arch/x86/kernel/process.c:158
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
    
    Fixes: c63829182c37 ("af_unix: Implement ->psock_update_sk_prot()")
    Closes: https://lore.kernel.org/bpf/[email protected]/
    Reported-by: [email protected]
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Signed-off-by: Martin KaFai Lau <[email protected]>
    Reviewed-by: Jiayuan Chen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
bridge: br_nd_send: linearize skb before parsing ND options [+ + +]
Author: Yang Yang <[email protected]>
Date:   Thu Mar 26 03:44:39 2026 +0000

    bridge: br_nd_send: linearize skb before parsing ND options
    
    [ Upstream commit a01aee7cafc575bb82f5529e8734e7052f9b16ea ]
    
    br_nd_send() parses neighbour discovery options from ns->opt[] and
    assumes that these options are in the linear part of request.
    
    Its callers only guarantee that the ICMPv6 header and target address
    are available, so the option area can still be non-linear. Parsing
    ns->opt[] in that case can access data past the linear buffer.
    
    Linearize request before option parsing and derive ns from the linear
    network header.
    
    Fixes: ed842faeb2bd ("bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports")
    Reported-by: Yifan Wu <[email protected]>
    Reported-by: Juefei Pu <[email protected]>
    Tested-by: Ao Zhou <[email protected]>
    Co-developed-by: Yuan Tan <[email protected]>
    Signed-off-by: Yuan Tan <[email protected]>
    Suggested-by: Xin Liu <[email protected]>
    Signed-off-by: Yang Yang <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Acked-by: Nikolay Aleksandrov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

bridge: br_nd_send: validate ND option lengths [+ + +]
Author: Yang Yang <[email protected]>
Date:   Thu Mar 26 03:44:40 2026 +0000

    bridge: br_nd_send: validate ND option lengths
    
    commit 850837965af15707fd3142c1cf3c5bfaf022299b upstream.
    
    br_nd_send() walks ND options according to option-provided lengths.
    A malformed option can make the parser advance beyond the computed
    option span or use a too-short source LLADDR option payload.
    
    Validate option lengths against the remaining NS option area before
    advancing, and only read source LLADDR when the option is large enough
    for an Ethernet address.
    
    Fixes: ed842faeb2bd ("bridge: suppress nd pkts on BR_NEIGH_SUPPRESS ports")
    Cc: [email protected]
    Reported-by: Yifan Wu <[email protected]>
    Reported-by: Juefei Pu <[email protected]>
    Tested-by: Ao Zhou <[email protected]>
    Co-developed-by: Yuan Tan <[email protected]>
    Signed-off-by: Yuan Tan <[email protected]>
    Suggested-by: Xin Liu <[email protected]>
    Signed-off-by: Yang Yang <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Acked-by: Nikolay Aleksandrov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
btrfs: don't take device_list_mutex when querying zone info [+ + +]
Author: Johannes Thumshirn <[email protected]>
Date:   Tue Mar 3 11:53:46 2026 +0100

    btrfs: don't take device_list_mutex when querying zone info
    
    [ Upstream commit 77603ab10429fe713a03345553ca8dbbfb1d91c6 ]
    
    Shin'ichiro reported sporadic hangs when running generic/013 in our CI
    system. When enabling lockdep, there is a lockdep splat when calling
    btrfs_get_dev_zone_info_all_devices() in the mount path that can be
    triggered by i.e. generic/013:
    
      ======================================================
      WARNING: possible circular locking dependency detected
      7.0.0-rc1+ #355 Not tainted
      ------------------------------------------------------
      mount/1043 is trying to acquire lock:
      ffff8881020b5470 (&vblk->vdev_mutex){+.+.}-{4:4}, at: virtblk_report_zones+0xda/0x430
    
      but task is already holding lock:
      ffff888102a738e0 (&fs_devs->device_list_mutex){+.+.}-{4:4}, at: btrfs_get_dev_zone_info_all_devices+0x45/0x90
    
      which lock already depends on the new lock.
    
      the existing dependency chain (in reverse order) is:
    
      -> #4 (&fs_devs->device_list_mutex){+.+.}-{4:4}:
             __mutex_lock+0xa3/0x1360
             btrfs_create_pending_block_groups+0x1f4/0x9d0
             __btrfs_end_transaction+0x3e/0x2e0
             btrfs_zoned_reserve_data_reloc_bg+0x2f8/0x390
             open_ctree+0x1934/0x23db
             btrfs_get_tree.cold+0x105/0x26c
             vfs_get_tree+0x28/0xb0
             __do_sys_fsconfig+0x324/0x680
             do_syscall_64+0x92/0x4f0
             entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
      -> #3 (btrfs_trans_num_extwriters){++++}-{0:0}:
             join_transaction+0xc2/0x5c0
             start_transaction+0x17c/0xbc0
             btrfs_zoned_reserve_data_reloc_bg+0x2b4/0x390
             open_ctree+0x1934/0x23db
             btrfs_get_tree.cold+0x105/0x26c
             vfs_get_tree+0x28/0xb0
             __do_sys_fsconfig+0x324/0x680
             do_syscall_64+0x92/0x4f0
             entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
      -> #2 (btrfs_trans_num_writers){++++}-{0:0}:
             lock_release+0x163/0x4b0
             __btrfs_end_transaction+0x1c7/0x2e0
             btrfs_dirty_inode+0x6f/0xd0
             touch_atime+0xe5/0x2c0
             btrfs_file_mmap_prepare+0x65/0x90
             __mmap_region+0x4b9/0xf00
             mmap_region+0xf7/0x120
             do_mmap+0x43d/0x610
             vm_mmap_pgoff+0xd6/0x190
             ksys_mmap_pgoff+0x7e/0xc0
             do_syscall_64+0x92/0x4f0
             entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
      -> #1 (&mm->mmap_lock){++++}-{4:4}:
             __might_fault+0x68/0xa0
             _copy_to_user+0x22/0x70
             blkdev_copy_zone_to_user+0x22/0x40
             virtblk_report_zones+0x282/0x430
             blkdev_report_zones_ioctl+0xfd/0x130
             blkdev_ioctl+0x20f/0x2c0
             __x64_sys_ioctl+0x86/0xd0
             do_syscall_64+0x92/0x4f0
             entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
      -> #0 (&vblk->vdev_mutex){+.+.}-{4:4}:
             __lock_acquire+0x1522/0x2680
             lock_acquire+0xd5/0x2f0
             __mutex_lock+0xa3/0x1360
             virtblk_report_zones+0xda/0x430
             blkdev_report_zones_cached+0x162/0x190
             btrfs_get_dev_zones+0xdc/0x2e0
             btrfs_get_dev_zone_info+0x219/0xe80
             btrfs_get_dev_zone_info_all_devices+0x62/0x90
             open_ctree+0x1200/0x23db
             btrfs_get_tree.cold+0x105/0x26c
             vfs_get_tree+0x28/0xb0
             __do_sys_fsconfig+0x324/0x680
             do_syscall_64+0x92/0x4f0
             entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
      other info that might help us debug this:
    
      Chain exists of:
        &vblk->vdev_mutex --> btrfs_trans_num_extwriters --> &fs_devs->device_list_mutex
    
       Possible unsafe locking scenario:
    
             CPU0                    CPU1
             ----                    ----
        lock(&fs_devs->device_list_mutex);
                                     lock(btrfs_trans_num_extwriters);
                                     lock(&fs_devs->device_list_mutex);
        lock(&vblk->vdev_mutex);
    
       *** DEADLOCK ***
    
      3 locks held by mount/1043:
       #0: ffff88811063e878 (&fc->uapi_mutex){+.+.}-{4:4}, at: __do_sys_fsconfig+0x2ae/0x680
       #1: ffff88810cb9f0e8 (&type->s_umount_key#31/1){+.+.}-{4:4}, at: alloc_super+0xc0/0x3e0
       #2: ffff888102a738e0 (&fs_devs->device_list_mutex){+.+.}-{4:4}, at: btrfs_get_dev_zone_info_all_devices+0x45/0x90
    
      stack backtrace:
      CPU: 2 UID: 0 PID: 1043 Comm: mount Not tainted 7.0.0-rc1+ #355 PREEMPT(full)
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.17.0-9.fc43 06/10/2025
      Call Trace:
       <TASK>
       dump_stack_lvl+0x5b/0x80
       print_circular_bug.cold+0x18d/0x1d8
       check_noncircular+0x10d/0x130
       __lock_acquire+0x1522/0x2680
       ? vmap_small_pages_range_noflush+0x3ef/0x820
       lock_acquire+0xd5/0x2f0
       ? virtblk_report_zones+0xda/0x430
       ? lock_is_held_type+0xcd/0x130
       __mutex_lock+0xa3/0x1360
       ? virtblk_report_zones+0xda/0x430
       ? virtblk_report_zones+0xda/0x430
       ? __pfx_copy_zone_info_cb+0x10/0x10
       ? virtblk_report_zones+0xda/0x430
       virtblk_report_zones+0xda/0x430
       ? __pfx_copy_zone_info_cb+0x10/0x10
       blkdev_report_zones_cached+0x162/0x190
       ? __pfx_copy_zone_info_cb+0x10/0x10
       btrfs_get_dev_zones+0xdc/0x2e0
       btrfs_get_dev_zone_info+0x219/0xe80
       btrfs_get_dev_zone_info_all_devices+0x62/0x90
       open_ctree+0x1200/0x23db
       btrfs_get_tree.cold+0x105/0x26c
       ? rcu_is_watching+0x18/0x50
       vfs_get_tree+0x28/0xb0
       __do_sys_fsconfig+0x324/0x680
       do_syscall_64+0x92/0x4f0
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
      RIP: 0033:0x7f615e27a40e
      RSP: 002b:00007fff11b18fb8 EFLAGS: 00000246 ORIG_RAX: 00000000000001af
      RAX: ffffffffffffffda RBX: 000055572e92ab10 RCX: 00007f615e27a40e
      RDX: 0000000000000000 RSI: 0000000000000006 RDI: 0000000000000003
      RBP: 00007fff11b19100 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
      R13: 000055572e92bc40 R14: 00007f615e3faa60 R15: 000055572e92bd08
       </TASK>
    
    Don't hold the device_list_mutex while calling into
    btrfs_get_dev_zone_info() in btrfs_get_dev_zone_info_all_devices() to
    mitigate the issue. This is safe, as no other thread can touch the device
    list at the moment of execution.
    
    Reported-by: Shin'ichiro Kawasaki <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Signed-off-by: Johannes Thumshirn <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

btrfs: reject root items with drop_progress and zero drop_level [+ + +]
Author: ZhengYuan Huang <[email protected]>
Date:   Thu Mar 12 08:14:43 2026 +0800

    btrfs: reject root items with drop_progress and zero drop_level
    
    [ Upstream commit b17b79ff896305fd74980a5f72afec370ee88ca4 ]
    
    [BUG]
    When recovering relocation at mount time, merge_reloc_root() and
    btrfs_drop_snapshot() both use BUG_ON(level == 0) to guard against
    an impossible state: a non-zero drop_progress combined with a zero
    drop_level in a root_item, which can be triggered:
    
    ------------[ cut here ]------------
    kernel BUG at fs/btrfs/relocation.c:1545!
    Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
    CPU: 1 UID: 0 PID: 283 ... Tainted: 6.18.0+ #16 PREEMPT(voluntary)
    Tainted: [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
    Hardware name: QEMU Ubuntu 24.04 PC v2, BIOS 1.16.3-debian-1.16.3-2
    RIP: 0010:merge_reloc_root+0x1266/0x1650 fs/btrfs/relocation.c:1545
    Code: ffff0000 00004589 d7e9acfa ffffe8a1 79bafebe 02000000
    Call Trace:
     merge_reloc_roots+0x295/0x890 fs/btrfs/relocation.c:1861
     btrfs_recover_relocation+0xd6e/0x11d0 fs/btrfs/relocation.c:4195
     btrfs_start_pre_rw_mount+0xa4d/0x1810 fs/btrfs/disk-io.c:3130
     open_ctree+0x5824/0x5fe0 fs/btrfs/disk-io.c:3640
     btrfs_fill_super fs/btrfs/super.c:987 [inline]
     btrfs_get_tree_super fs/btrfs/super.c:1951 [inline]
     btrfs_get_tree_subvol fs/btrfs/super.c:2094 [inline]
     btrfs_get_tree+0x111c/0x2190 fs/btrfs/super.c:2128
     vfs_get_tree+0x9a/0x370 fs/super.c:1758
     fc_mount fs/namespace.c:1199 [inline]
     do_new_mount_fc fs/namespace.c:3642 [inline]
     do_new_mount fs/namespace.c:3718 [inline]
     path_mount+0x5b8/0x1ea0 fs/namespace.c:4028
     do_mount fs/namespace.c:4041 [inline]
     __do_sys_mount fs/namespace.c:4229 [inline]
     __se_sys_mount fs/namespace.c:4206 [inline]
     __x64_sys_mount+0x282/0x320 fs/namespace.c:4206
     ...
    RIP: 0033:0x7f969c9a8fde
    Code: 0f1f4000 48c7c2b0 fffffff7 d8648902 b8ffffff ffc3660f
    ---[ end trace 0000000000000000 ]---
    
    The bug is reproducible on 7.0.0-rc2-next-20260310 with our dynamic
    metadata fuzzing tool that corrupts btrfs metadata at runtime.
    
    [CAUSE]
    A non-zero drop_progress.objectid means an interrupted
    btrfs_drop_snapshot() left a resume point on disk, and in that case
    drop_level must be greater than 0 because the checkpoint is only
    saved at internal node levels.
    
    Although this invariant is enforced when the kernel writes the root
    item, it is not validated when the root item is read back from disk.
    That allows on-disk corruption to provide an invalid state with
    drop_progress.objectid != 0 and drop_level == 0.
    
    When relocation recovery later processes such a root item,
    merge_reloc_root() reads drop_level and hits BUG_ON(level == 0). The
    same invalid metadata can also trigger the corresponding BUG_ON() in
    btrfs_drop_snapshot().
    
    [FIX]
    Fix this by validating the root_item invariant in tree-checker when
    reading root items from disk: if drop_progress.objectid is non-zero,
    drop_level must also be non-zero. Reject such malformed metadata with
    -EUCLEAN before it reaches merge_reloc_root() or btrfs_drop_snapshot()
    and triggers the BUG_ON.
    
    After the fix, the same corruption is correctly rejected by tree-checker
    and the BUG_ON is no longer triggered.
    
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: ZhengYuan Huang <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

btrfs: reserve enough transaction items for qgroup ioctls [+ + +]
Author: Filipe Manana <[email protected]>
Date:   Fri Feb 13 16:08:53 2026 +0000

    btrfs: reserve enough transaction items for qgroup ioctls
    
    [ Upstream commit f9a4e3015db1aeafbef407650eb8555445ca943e ]
    
    Currently our qgroup ioctls don't reserve any space, they just do a
    transaction join, which does not reserve any space, neither for the quota
    tree updates nor for the delayed refs generated when updating the quota
    tree. The quota root uses the global block reserve, which is fine most of
    the time since we don't expect a lot of updates to the quota root, or to
    be too close to -ENOSPC such that other critical metadata updates need to
    resort to the global reserve.
    
    However this is not optimal, as not reserving proper space may result in a
    transaction abort due to not reserving space for delayed refs and then
    abusing the use of the global block reserve.
    
    For example, the following reproducer (which is unlikely to model any
    real world use case, but just to illustrate the problem), triggers such a
    transaction abort due to -ENOSPC when running delayed refs:
    
      $ cat test.sh
      #!/bin/bash
    
      DEV=/dev/nullb0
      MNT=/mnt/nullb0
    
      umount $DEV &> /dev/null
      # Limit device to 1G so that it's much faster to reproduce the issue.
      mkfs.btrfs -f -b 1G $DEV
      mount -o commit=600 $DEV $MNT
    
      fallocate -l 800M $MNT/filler
      btrfs quota enable $MNT
    
      for ((i = 1; i <= 400000; i++)); do
          btrfs qgroup create 1/$i $MNT
      done
    
      umount $MNT
    
    When running this, we can see in dmesg/syslog that a transaction abort
    happened:
    
      [436.490] BTRFS error (device nullb0): failed to run delayed ref for logical 30408704 num_bytes 16384 type 176 action 1 ref_mod 1: -28
      [436.493] ------------[ cut here ]------------
      [436.494] BTRFS: Transaction aborted (error -28)
      [436.495] WARNING: fs/btrfs/extent-tree.c:2247 at btrfs_run_delayed_refs+0xd9/0x110 [btrfs], CPU#4: umount/2495372
      [436.497] Modules linked in: btrfs loop (...)
      [436.508] CPU: 4 UID: 0 PID: 2495372 Comm: umount Tainted: G        W           6.19.0-rc8-btrfs-next-225+ #1 PREEMPT(full)
      [436.510] Tainted: [W]=WARN
      [436.511] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.2-0-gea1b7a073390-prebuilt.qemu.org 04/01/2014
      [436.513] RIP: 0010:btrfs_run_delayed_refs+0xdf/0x110 [btrfs]
      [436.514] Code: 0f 82 ea (...)
      [436.518] RSP: 0018:ffffd511850b7d78 EFLAGS: 00010292
      [436.519] RAX: 00000000ffffffe4 RBX: ffff8f120dad37e0 RCX: 0000000002040001
      [436.520] RDX: 0000000000000002 RSI: 00000000ffffffe4 RDI: ffffffffc090fd80
      [436.522] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffffffc04d1867
      [436.523] R10: ffff8f18dc1fffa8 R11: 0000000000000003 R12: ffff8f173aa89400
      [436.524] R13: 0000000000000000 R14: ffff8f173aa89400 R15: 0000000000000000
      [436.526] FS:  00007fe59045d840(0000) GS:ffff8f192e22e000(0000) knlGS:0000000000000000
      [436.527] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [436.528] CR2: 00007fe5905ff2b0 CR3: 000000060710a002 CR4: 0000000000370ef0
      [436.530] Call Trace:
      [436.530]  <TASK>
      [436.530]  btrfs_commit_transaction+0x73/0xc00 [btrfs]
      [436.531]  ? btrfs_attach_transaction_barrier+0x1e/0x70 [btrfs]
      [436.532]  sync_filesystem+0x7a/0x90
      [436.533]  generic_shutdown_super+0x28/0x180
      [436.533]  kill_anon_super+0x12/0x40
      [436.534]  btrfs_kill_super+0x12/0x20 [btrfs]
      [436.534]  deactivate_locked_super+0x2f/0xb0
      [436.534]  cleanup_mnt+0xea/0x180
      [436.535]  task_work_run+0x58/0xa0
      [436.535]  exit_to_user_mode_loop+0xed/0x480
      [436.536]  ? __x64_sys_umount+0x68/0x80
      [436.536]  do_syscall_64+0x2a5/0xf20
      [436.537]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
      [436.537] RIP: 0033:0x7fe5906b6217
      [436.538] Code: 0d 00 f7 (...)
      [436.540] RSP: 002b:00007ffcd87a61f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
      [436.541] RAX: 0000000000000000 RBX: 00005618b9ecadc8 RCX: 00007fe5906b6217
      [436.541] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 00005618b9ecb100
      [436.542] RBP: 0000000000000000 R08: 00007ffcd87a4fe0 R09: 00000000ffffffff
      [436.544] R10: 0000000000000103 R11: 0000000000000246 R12: 00007fe59081626c
      [436.544] R13: 00005618b9ecb100 R14: 0000000000000000 R15: 00005618b9ecacc0
      [436.545]  </TASK>
      [436.545] ---[ end trace 0000000000000000 ]---
    
    Fix this by changing the qgroup ioctls to use start transaction instead of
    joining so that proper space is reserved for the delayed refs generated
    for the updates to the quota root. This way we don't get any transaction
    abort.
    
    Reviewed-by: Boris Burkov <[email protected]>
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: Filipe Manana <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
cdc-acm: new quirk for EPSON HMD [+ + +]
Author: Oliver Neukum <[email protected]>
Date:   Tue Mar 17 09:41:10 2026 +0100

    cdc-acm: new quirk for EPSON HMD
    
    commit f97e96c303d689708f7f713d8f3afcc31f1237e9 upstream.
    
    This device has a union descriptor that is just garbage
    and needs a custom descriptor.
    In principle this could be done with a (conditionally
    activated) heuristic. That would match more devices
    without a need for defining a new quirk. However,
    this always carries the risk that the heuristics
    does the wrong thing and leads to more breakage.
    Defining the quirk and telling it exactly what to do
    is the safe and conservative approach.
    
    Signed-off-by: Oliver Neukum <[email protected]>
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
comedi: dt2815: add hardware detection to prevent crash [+ + +]
Author: Deepanshu Kartikey <[email protected]>
Date:   Mon Mar 9 16:18:59 2026 +0530

    comedi: dt2815: add hardware detection to prevent crash
    
    commit 93853512f565e625df2397f0d8050d6aafd7c3ad upstream.
    
    The dt2815 driver crashes when attached to I/O ports without actual
    hardware present. This occurs because syzkaller or users can attach
    the driver to arbitrary I/O addresses via COMEDI_DEVCONFIG ioctl.
    
    When no hardware exists at the specified port, inb() operations return
    0xff (floating bus), but outb() operations can trigger page faults due
    to undefined behavior, especially under race conditions:
    
      BUG: unable to handle page fault for address: 000000007fffff90
      #PF: supervisor write access in kernel mode
      #PF: error_code(0x0002) - not-present page
      RIP: 0010:dt2815_attach+0x6e0/0x1110
    
    Add hardware detection by reading the status register before attempting
    any write operations. If the read returns 0xff, assume no hardware is
    present and fail the attach with -ENODEV. This prevents crashes from
    outb() operations on non-existent hardware.
    
    Reported-by: [email protected]
    Cc: stable <[email protected]>
    Closes: https://syzkaller.appspot.com/bug?extid=72f94b474d6e50b71ffc
    Tested-by: [email protected]
    Reviewed-by: Ian Abbott <[email protected]>
    Signed-off-by: Deepanshu Kartikey <[email protected]>
    Link: [https://lore.kernel.org/all/[email protected]/T/]
    Link: [https://lore.kernel.org/all/[email protected]/T/
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

comedi: me4000: Fix potential overrun of firmware buffer [+ + +]
Author: Ian Abbott <[email protected]>
Date:   Thu Feb 5 13:39:49 2026 +0000

    comedi: me4000: Fix potential overrun of firmware buffer
    
    commit 3fb43a7a5b44713f892c58ead2e5f3a1bc9f4ee7 upstream.
    
    `me4000_xilinx_download()` loads the firmware that was requested by
    `request_firmware()`.  It is possible for it to overrun the source
    buffer because it blindly trusts the file format.  It reads a data
    stream length from the first 4 bytes into variable `file_length` and
    reads the data stream contents of length `file_length` from offset 16
    onwards.
    
    Add a test to ensure that the supplied firmware is long enough to
    contain the header and the data stream.  On failure, log an error and
    return `-EINVAL`.
    
    Note: The firmware loading was totally broken before commit ac584af59945
    ("staging: comedi: me4000: fix firmware downloading"), but that is the
    most sensible target for this fix.
    
    Fixes: ac584af59945 ("staging: comedi: me4000: fix firmware downloading")
    Cc: stable <[email protected]>
    Signed-off-by: Ian Abbott <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

comedi: me_daq: Fix potential overrun of firmware buffer [+ + +]
Author: Ian Abbott <[email protected]>
Date:   Thu Feb 5 14:01:30 2026 +0000

    comedi: me_daq: Fix potential overrun of firmware buffer
    
    commit cc797d4821c754c701d9714b58bea947e31dbbe0 upstream.
    
    `me2600_xilinx_download()` loads the firmware that was requested by
    `request_firmware()`.  It is possible for it to overrun the source
    buffer because it blindly trusts the file format.  It reads a data
    stream length from the first 4 bytes into variable `file_length` and
    reads the data stream contents of length `file_length` from offset 16
    onwards.  Although it checks that the supplied firmware is at least 16
    bytes long, it does not check that it is long enough to contain the data
    stream.
    
    Add a test to ensure that the supplied firmware is long enough to
    contain the header and the data stream.  On failure, log an error and
    return `-EINVAL`.
    
    Fixes: 85acac61096f9 ("Staging: comedi: add me_daq driver")
    Cc: stable <[email protected]>
    Signed-off-by: Ian Abbott <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

comedi: ni_atmio16d: Fix invalid clean-up after failed attach [+ + +]
Author: Ian Abbott <[email protected]>
Date:   Wed Jan 28 15:00:10 2026 +0000

    comedi: ni_atmio16d: Fix invalid clean-up after failed attach
    
    commit 101ab946b79ad83b36d5cfd47de587492a80acf0 upstream.
    
    If the driver's COMEDI "attach" handler function (`atmio16d_attach()`)
    returns an error, the COMEDI core will call the driver's "detach"
    handler function (`atmio16d_detach()`) to clean up.  This calls
    `reset_atmio16d()` unconditionally, but depending on where the error
    occurred in the attach handler, the device may not have been
    sufficiently initialized to call `reset_atmio16d()`.  It uses
    `dev->iobase` as the I/O port base address and `dev->private` as the
    pointer to the COMEDI device's private data structure.  `dev->iobase`
    may still be set to its initial value of 0, which would result in
    undesired writes to low I/O port addresses.  `dev->private` may still be
    `NULL`, which would result in null pointer dereferences.
    
    Fix `atmio16d_detach()` by checking that `dev->private` is valid
    (non-null) before calling `reset_atmio16d()`.  This implies that
    `dev->iobase` was set correctly since that is set up before
    `dev->private`.
    
    Fixes: 2323b276308a ("Staging: comedi: add ni_at_atmio16d driver")
    Cc: stable <[email protected]>
    Signed-off-by: Ian Abbott <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

comedi: Reinit dev->spinlock between attachments to low-level drivers [+ + +]
Author: Ian Abbott <[email protected]>
Date:   Wed Feb 25 13:24:27 2026 +0000

    comedi: Reinit dev->spinlock between attachments to low-level drivers
    
    commit 4b9a9a6d71e3e252032f959fb3895a33acb5865c upstream.
    
    `struct comedi_device` is the main controlling structure for a COMEDI
    device created by the COMEDI subsystem.  It contains a member `spinlock`
    containing a spin-lock that is initialized by the COMEDI subsystem, but
    is reserved for use by a low-level driver attached to the COMEDI device
    (at least since commit 25436dc9d84f ("Staging: comedi: remove RT
    code")).
    
    Some COMEDI devices (those created on initialization of the COMEDI
    subsystem when the "comedi.comedi_num_legacy_minors" parameter is
    non-zero) can be attached to different low-level drivers over their
    lifetime using the `COMEDI_DEVCONFIG` ioctl command.  This can result in
    inconsistent lock states being reported when there is a mismatch in the
    spin-lock locking levels used by each low-level driver to which the
    COMEDI device has been attached.  Fix it by reinitializing
    `dev->spinlock` before calling the low-level driver's `attach` function
    pointer if `CONFIG_LOCKDEP` is enabled.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=cc9f7f4a7df09f53c4a4
    Fixes: ed9eccbe8970 ("Staging: add comedi core")
    Cc: stable <[email protected]>
    Signed-off-by: Ian Abbott <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member [+ + +]
Author: Cosmin Tanislav <[email protected]>
Date:   Fri Jan 30 14:23:53 2026 +0200

    counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member
    
    commit 2932095c114b98cbb40ccf34fc00d613cb17cead upstream.
    
    The counter driver can use HW channels 1 and 2, while the PWM driver can
    use HW channels 0, 1, 2, 3, 4, 6, 7.
    
    The dev member is assigned both by the counter driver and the PWM driver
    for channels 1 and 2, to their own struct device instance, overwriting
    the previous value.
    
    The sub-drivers race to assign their own struct device pointer to the
    same struct rz_mtu3_channel's dev member.
    
    The dev member of struct rz_mtu3_channel is used by the counter
    sub-driver for runtime PM.
    
    Depending on the probe order of the counter and PWM sub-drivers, the
    dev member may point to the wrong struct device instance, causing the
    counter sub-driver to do runtime PM actions on the wrong device.
    
    To fix this, use the parent pointer of the counter, which is assigned
    during probe to the correct struct device, not the struct device pointer
    inside the shared struct rz_mtu3_channel.
    
    Cc: [email protected]
    Fixes: 0be8907359df ("counter: Add Renesas RZ/G2L MTU3a counter driver")
    Signed-off-by: Cosmin Tanislav <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: William Breathitt Gray <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

counter: rz-mtu3-cnt: prevent counter from being toggled multiple times [+ + +]
Author: Cosmin Tanislav <[email protected]>
Date:   Fri Jan 30 14:23:52 2026 +0200

    counter: rz-mtu3-cnt: prevent counter from being toggled multiple times
    
    commit 67c3f99bed6f422ba343d2b70a2eeeccdfd91bef upstream.
    
    Runtime PM counter is incremented / decremented each time the sysfs
    enable file is written to.
    
    If user writes 0 to the sysfs enable file multiple times, runtime PM
    usage count underflows, generating the following message.
    
    rz-mtu3-counter rz-mtu3-counter.0: Runtime PM usage count underflow!
    
    At the same time, hardware registers end up being accessed with clocks
    off in rz_mtu3_terminate_counter() to disable an already disabled
    channel.
    
    If user writes 1 to the sysfs enable file multiple times, runtime PM
    usage count will be incremented each time, requiring the same number of
    0 writes to get it back to 0.
    
    If user writes 0 to the sysfs enable file while PWM is in progress, PWM
    is stopped without counter being the owner of the underlying MTU3
    channel.
    
    Check against the cached count_is_enabled value and exit if the user
    is trying to set the same enable value.
    
    Cc: [email protected]
    Fixes: 0be8907359df ("counter: Add Renesas RZ/G2L MTU3a counter driver")
    Signed-off-by: Cosmin Tanislav <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: William Breathitt Gray <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
cpufreq: governor: fix double free in cpufreq_dbs_governor_init() error path [+ + +]
Author: Guangshuo Li <[email protected]>
Date:   Wed Apr 1 10:45:35 2026 +0800

    cpufreq: governor: fix double free in cpufreq_dbs_governor_init() error path
    
    commit 6dcf9d0064ce2f3e3dfe5755f98b93abe6a98e1e upstream.
    
    When kobject_init_and_add() fails, cpufreq_dbs_governor_init() calls
    kobject_put(&dbs_data->attr_set.kobj).
    
    The kobject release callback cpufreq_dbs_data_release() calls
    gov->exit(dbs_data) and kfree(dbs_data), but the current error path
    then calls gov->exit(dbs_data) and kfree(dbs_data) again, causing a
    double free.
    
    Keep the direct kfree(dbs_data) for the gov->init() failure path, but
    after kobject_init_and_add() has been called, let kobject_put() handle
    the cleanup through cpufreq_dbs_data_release().
    
    Fixes: 4ebe36c94aed ("cpufreq: Fix kobject memleak")
    Signed-off-by: Guangshuo Li <[email protected]>
    Reviewed-by: Zhongqiu Han <[email protected]>
    Acked-by: Viresh Kumar <[email protected]>
    Cc: All applicable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
crypto: af-alg - fix NULL pointer dereference in scatterwalk [+ + +]
Author: Norbert Szetei <[email protected]>
Date:   Wed Mar 25 18:26:13 2026 +0100

    crypto: af-alg - fix NULL pointer dereference in scatterwalk
    
    [ Upstream commit 62397b493e14107ae82d8b80938f293d95425bcb ]
    
    The AF_ALG interface fails to unmark the end of a Scatter/Gather List (SGL)
    when chaining a new af_alg_tsgl structure. If a sendmsg() fills an SGL
    exactly to MAX_SGL_ENTS, the last entry is marked as the end. A subsequent
    sendmsg() allocates a new SGL and chains it, but fails to clear the end
    marker on the previous SGL's last data entry.
    
    This causes the crypto scatterwalk to hit a premature end, returning NULL
    on sg_next() and leading to a kernel panic during dereference.
    
    Fix this by explicitly unmarking the end of the previous SGL when
    performing sg_chain() in af_alg_alloc_tsgl().
    
    Fixes: 8ff590903d5f ("crypto: algif_skcipher - User-space interface for skcipher operations")
    Signed-off-by: Norbert Szetei <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

crypto: algif_aead - Revert to operating out-of-place [+ + +]
Author: Herbert Xu <[email protected]>
Date:   Thu Mar 26 15:30:20 2026 +0900

    crypto: algif_aead - Revert to operating out-of-place
    
    [ Upstream commit a664bf3d603dc3bdcf9ae47cc21e0daec706d7a5 ]
    
    This mostly reverts commit 72548b093ee3 except for the copying of
    the associated data.
    
    There is no benefit in operating in-place in algif_aead since the
    source and destination come from different mappings.  Get rid of
    all the complexity added for in-place operation and just copy the
    AD directly.
    
    Fixes: 72548b093ee3 ("crypto: algif_aead - copy AAD from src to dst")
    Reported-by: Taeyang Lee <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

crypto: authencesn - Do not place hiseq at end of dst for out-of-place decryption [+ + +]
Author: Herbert Xu <[email protected]>
Date:   Fri Mar 27 15:04:17 2026 +0900

    crypto: authencesn - Do not place hiseq at end of dst for out-of-place decryption
    
    [ Upstream commit e02494114ebf7c8b42777c6cd6982f113bfdbec7 ]
    
    When decrypting data that is not in-place (src != dst), there is
    no need to save the high-order sequence bits in dst as it could
    simply be re-copied from the source.
    
    However, the data to be hashed need to be rearranged accordingly.
    
    Reported-by: Taeyang Lee <[email protected]>
    Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD interface")
    Signed-off-by: Herbert Xu <[email protected]>
    
    Thanks,
    
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

crypto: caam - fix DMA corruption on long hmac keys [+ + +]
Author: Horia Geantă <[email protected]>
Date:   Tue Mar 17 12:25:13 2026 +0200

    crypto: caam - fix DMA corruption on long hmac keys
    
    [ Upstream commit 5ddfdcbe10dc5f97afc4e46ca22be2be717e8caf ]
    
    When a key longer than block size is supplied, it is copied and then
    hashed into the real key.  The memory allocated for the copy needs to
    be rounded to DMA cache alignment, as otherwise the hashed key may
    corrupt neighbouring memory.
    
    The rounding was performed, but never actually used for the allocation.
    Fix this by replacing kmemdup with kmalloc for a larger buffer,
    followed by memcpy.
    
    Fixes: 199354d7fb6e ("crypto: caam - Remove GFP_DMA and add DMA alignment padding")
    Reported-by: Paul Bunyan <[email protected]>
    Signed-off-by: Horia Geantă <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

crypto: caam - fix overflow on long hmac keys [+ + +]
Author: Horia Geantă <[email protected]>
Date:   Tue Mar 17 12:25:14 2026 +0200

    crypto: caam - fix overflow on long hmac keys
    
    [ Upstream commit 80688afb9c35b3934ce2d6be9973758915e2e0ef ]
    
    When a key longer than block size is supplied, it is copied and then
    hashed into the real key.  The memory allocated for the copy needs to
    be rounded to DMA cache alignment, as otherwise the hashed key may
    corrupt neighbouring memory.
    
    The copying is performed using kmemdup, however this leads to an overflow:
    reading more bytes (aligned_len - keylen) from the keylen source buffer.
    Fix this by replacing kmemdup with kmalloc, followed by memcpy.
    
    Fixes: 199354d7fb6e ("crypto: caam - Remove GFP_DMA and add DMA alignment padding")
    Signed-off-by: Horia Geantă <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

crypto: deflate - fix spurious -ENOSPC [+ + +]
Author: Mikulas Patocka <[email protected]>
Date:   Wed Mar 25 16:31:38 2026 +0100

    crypto: deflate - fix spurious -ENOSPC
    
    [ Upstream commit 6d89f743e57cb34e233a8217b394c7ee09abf225 ]
    
    The code in deflate_decompress_one may erroneously return -ENOSPC even if
    it didn't run out of output space. The error happens under this
    condition:
    
    - Suppose that there are two input pages, the compressed data fits into
      the first page and the zlib checksum is placed in the second page.
    
    - The code iterates over the first page, decompresses the data and fully
      fills the destination buffer, zlib_inflate returns Z_OK becuse zlib
      hasn't seen the checksum yet.
    
    - The outer do-while loop is iterated again, acomp_walk_next_src sets the
      input parameters to the second page containing the checksum.
    
    - We go into the inner do-while loop, execute "dcur =
      acomp_walk_next_dst(&walk);". "dcur" is zero, so we break out of the
      loop and return -ENOSPC, despite the fact that the decompressed data
      fit into the destination buffer.
    
    In order to fix this bug, this commit changes the logic when to report
    the -ENOSPC error. We report the error if the destination buffer is empty
    *and* if zlib_inflate didn't make any progress consuming the input
    buffer. If zlib_inflate consumes the trailing checksum, we see that it
    made progress and we will not return -ENOSPC.
    
    Fixes: 08cabc7d3c86 ("crypto: deflate - Convert to acomp")
    Signed-off-by: Mikulas Patocka <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

crypto: tegra - Add missing CRYPTO_ALG_ASYNC [+ + +]
Author: Eric Biggers <[email protected]>
Date:   Mon Mar 16 13:21:19 2026 -0700

    crypto: tegra - Add missing CRYPTO_ALG_ASYNC
    
    commit 4b56770d345524fc2acc143a2b85539cf7d74bc1 upstream.
    
    The tegra crypto driver failed to set the CRYPTO_ALG_ASYNC on its
    asynchronous algorithms, causing the crypto API to select them for users
    that request only synchronous algorithms.  This causes crashes (at
    least).  Fix this by adding the flag like what the other drivers do.
    Also remove the unnecessary CRYPTO_ALG_TYPE_* flags, since those just
    get ignored and overridden by the registration function anyway.
    
    Reported-by: Zorro Lang <[email protected]>
    Closes: https://lore.kernel.org/r/20260314080937.pghb4aa7d4je3mhh@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com
    Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
    Cc: [email protected]
    Cc: Akhil R <[email protected]>
    Signed-off-by: Eric Biggers <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amd/display: Fix DCE LVDS handling [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Tue Mar 31 20:19:34 2026 -0400

    drm/amd/display: Fix DCE LVDS handling
    
    [ Upstream commit 90d239cc53723c1a3f89ce08eac17bf3a9e9f2d4 ]
    
    LVDS does not use an HPD pin so it may be invalid.  Handle
    this case correctly in link encoder creation.
    
    Fixes: 7c8fb3b8e9ba ("drm/amd/display: Add hpd_source index check for DCE60/80/100/110/112/120 link encoders")
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/5012
    Cc: Srinivasan Shanmugam <[email protected]>
    Cc: Roman Li <[email protected]>
    Reviewed-by: Roman Li <[email protected]>
    Reviewed-by: Srinivasan Shanmugam <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 3b5620f7ee688177fcf65cf61588c5435bce1872)
    Cc: [email protected]
    [ removed unrelated VGA connector block absent from stable and split combined null/bounds check into separate guard and ternary ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/amd/display: Fix NULL pointer dereference in dcn401_init_hw() [+ + +]
Author: Srinivasan Shanmugam <[email protected]>
Date:   Sat Mar 21 17:25:14 2026 +0530

    drm/amd/display: Fix NULL pointer dereference in dcn401_init_hw()
    
    commit e927b36ae18b66b49219eaa9f46edc7b4fdbb25e upstream.
    
    dcn401_init_hw() assumes that update_bw_bounding_box() is valid when
    entering the update path. However, the existing condition:
    
      ((!fams2_enable && update_bw_bounding_box) || freq_changed)
    
    does not guarantee this, as the freq_changed branch can evaluate to true
    independently of the callback pointer.
    
    This can result in calling update_bw_bounding_box() when it is NULL.
    
    Fix this by separating the update condition from the pointer checks and
    ensuring the callback, dc->clk_mgr, and bw_params are validated before
    use.
    
    Fixes the below:
    ../dc/hwss/dcn401/dcn401_hwseq.c:367 dcn401_init_hw() error: we previously assumed 'dc->res_pool->funcs->update_bw_bounding_box' could be null (see line 362)
    
    Fixes: ca0fb243c3bb ("drm/amd/display: Underflow Seen on DCN401 eGPU")
    Cc: Daniel Sa <[email protected]>
    Cc: Alvin Lee <[email protected]>
    Cc: Roman Li <[email protected]>
    Cc: Alex Hung <[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: Alex Hung <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 86117c5ab42f21562fedb0a64bffea3ee5fcd477)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amd/pm: disable OD_FAN_CURVE if temp or pwm range invalid for smu v13 [+ + +]
Author: Yang Wang <[email protected]>
Date:   Wed Apr 1 12:31:35 2026 -0400

    drm/amd/pm: disable OD_FAN_CURVE if temp or pwm range invalid for smu v13
    
    [ Upstream commit 3e6dd28a11083e83e11a284d99fcc9eb748c321c ]
    
    Forcibly disable the OD_FAN_CURVE feature when temperature or PWM range is invalid,
    otherwise PMFW will reject this configuration on smu v13.0.x
    
    example:
    $ sudo cat /sys/bus/pci/devices/<BDF>/gpu_od/fan_ctrl/fan_curve
    
    OD_FAN_CURVE:
    0: 0C 0%
    1: 0C 0%
    2: 0C 0%
    3: 0C 0%
    4: 0C 0%
    OD_RANGE:
    FAN_CURVE(hotspot temp): 0C 0C
    FAN_CURVE(fan speed): 0% 0%
    
    $ echo "0 50 40" | sudo tee fan_curve
    
    kernel log:
    [  756.442527] amdgpu 0000:03:00.0: amdgpu: Fan curve temp setting(50) must be within [0, 0]!
    [  777.345800] amdgpu 0000:03:00.0: amdgpu: Fan curve temp setting(50) must be within [0, 0]!
    
    Closes: https://github.com/ROCm/amdgpu/issues/208
    Signed-off-by: Yang Wang <[email protected]>
    Acked-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 470891606c5a97b1d0d937e0aa67a3bed9fcb056)
    Cc: [email protected]
    [ adapted forward declaration placement to existing FEATURE_MASK macro ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu/pm: drop SMU driver if version not matched messages [+ + +]
Author: Alex Deucher <[email protected]>
Date:   Tue Mar 17 16:34:41 2026 -0400

    drm/amdgpu/pm: drop SMU driver if version not matched messages
    
    commit a3ffaa5b397f4df9d6ac16b10583e9df8e6fa471 upstream.
    
    It just leads to user confusion.
    
    Cc: Yang Wang <[email protected]>
    Cc: Lijo Lazar <[email protected]>
    Reviewed-by: Yang Wang <[email protected]>
    Reviewed-by: Lijo Lazar <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit e471627d56272a791972f25e467348b611c31713)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/amdgpu: Change AMDGPU_VA_RESERVED_TRAP_SIZE to 64KB [+ + +]
Author: Donet Tom <[email protected]>
Date:   Thu Mar 26 17:51:28 2026 +0530

    drm/amdgpu: Change AMDGPU_VA_RESERVED_TRAP_SIZE to 64KB
    
    commit 4487571ef17a30d274600b3bd6965f497a881299 upstream.
    
    Currently, AMDGPU_VA_RESERVED_TRAP_SIZE is hardcoded to 8KB, while
    KFD_CWSR_TBA_TMA_SIZE is defined as 2 * PAGE_SIZE. On systems with
    4K pages, both values match (8KB), so allocation and reserved space
    are consistent.
    
    However, on 64K page-size systems, KFD_CWSR_TBA_TMA_SIZE becomes 128KB,
    while the reserved trap area remains 8KB. This mismatch causes the
    kernel to crash when running rocminfo or rccl unit tests.
    
    Kernel attempted to read user page (2) - exploit attempt? (uid: 1001)
    BUG: Kernel NULL pointer dereference on read at 0x00000002
    Faulting instruction address: 0xc0000000002c8a64
    Oops: Kernel access of bad area, sig: 11 [#1]
    LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA pSeries
    CPU: 34 UID: 1001 PID: 9379 Comm: rocminfo Tainted: G E
    6.19.0-rc4-amdgpu-00320-gf23176405700 #56 VOLUNTARY
    Tainted: [E]=UNSIGNED_MODULE
    Hardware name: IBM,9105-42A POWER10 (architected) 0x800200 0xf000006
    of:IBM,FW1060.30 (ML1060_896) hv:phyp pSeries
    NIP:  c0000000002c8a64 LR: c00000000125dbc8 CTR: c00000000125e730
    REGS: c0000001e0957580 TRAP: 0300 Tainted: G E
    MSR:  8000000000009033 <SF,EE,ME,IR,DR,RI,LE> CR: 24008268
    XER: 00000036
    CFAR: c00000000125dbc4 DAR: 0000000000000002 DSISR: 40000000
    IRQMASK: 1
    GPR00: c00000000125d908 c0000001e0957820 c0000000016e8100
    c00000013d814540
    GPR04: 0000000000000002 c00000013d814550 0000000000000045
    0000000000000000
    GPR08: c00000013444d000 c00000013d814538 c00000013d814538
    0000000084002268
    GPR12: c00000000125e730 c000007e2ffd5f00 ffffffffffffffff
    0000000000020000
    GPR16: 0000000000000000 0000000000000002 c00000015f653000
    0000000000000000
    GPR20: c000000138662400 c00000013d814540 0000000000000000
    c00000013d814500
    GPR24: 0000000000000000 0000000000000002 c0000001e0957888
    c0000001e0957878
    GPR28: c00000013d814548 0000000000000000 c00000013d814540
    c0000001e0957888
    NIP [c0000000002c8a64] __mutex_add_waiter+0x24/0xc0
    LR [c00000000125dbc8] __mutex_lock.constprop.0+0x318/0xd00
    Call Trace:
    0xc0000001e0957890 (unreliable)
    __mutex_lock.constprop.0+0x58/0xd00
    amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu+0x6fc/0xb60 [amdgpu]
    kfd_process_alloc_gpuvm+0x54/0x1f0 [amdgpu]
    kfd_process_device_init_cwsr_dgpu+0xa4/0x1a0 [amdgpu]
    kfd_process_device_init_vm+0xd8/0x2e0 [amdgpu]
    kfd_ioctl_acquire_vm+0xd0/0x130 [amdgpu]
    kfd_ioctl+0x514/0x670 [amdgpu]
    sys_ioctl+0x134/0x180
    system_call_exception+0x114/0x300
    system_call_vectored_common+0x15c/0x2ec
    
    This patch changes AMDGPU_VA_RESERVED_TRAP_SIZE to 64 KB and
    KFD_CWSR_TBA_TMA_SIZE to the AMD GPU page size. This means we reserve
    64 KB for the trap in the address space, but only allocate 8 KB within
    it. With this approach, the allocation size never exceeds the reserved
    area.
    
    Fixes: 34a1de0f7935 ("drm/amdkfd: Relocate TBA/TMA to opposite side of VM hole")
    Reviewed-by: Christian König <[email protected]>
    Suggested-by: Felix Kuehling <[email protected]>
    Suggested-by: Christian König <[email protected]>
    Signed-off-by: Donet Tom <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 31b8de5e55666f26ea7ece5f412b83eab3f56dbb)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/amdgpu: fix the idr allocation flags [+ + +]
Author: Prike Liang <[email protected]>
Date:   Mon Mar 23 16:07:02 2026 +0800

    drm/amdgpu: fix the idr allocation flags
    
    commit 62f553d60a801384336f5867967c26ddf3b17038 upstream.
    
    Fix the IDR allocation flags by using atomic GFP
    flags in non‑sleepable contexts to avoid the __might_sleep()
    complaint.
    
      268.290239] [drm] Initialized amdgpu 3.64.0 for 0000:03:00.0 on minor 0
    [  268.294900] BUG: sleeping function called from invalid context at ./include/linux/sched/mm.h:323
    [  268.295355] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1744, name: modprobe
    [  268.295705] preempt_count: 1, expected: 0
    [  268.295886] RCU nest depth: 0, expected: 0
    [  268.296072] 2 locks held by modprobe/1744:
    [  268.296077]  #0: ffff8c3a44abd1b8 (&dev->mutex){....}-{4:4}, at: __driver_attach+0xe4/0x210
    [  268.296100]  #1: ffffffffc1a6ea78 (amdgpu_pasid_idr_lock){+.+.}-{3:3}, at: amdgpu_pasid_alloc+0x26/0xe0 [amdgpu]
    [  268.296494] CPU: 12 UID: 0 PID: 1744 Comm: modprobe Tainted: G     U     OE       6.19.0-custom #16 PREEMPT(voluntary)
    [  268.296498] Tainted: [U]=USER, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
    [  268.296499] Hardware name: AMD Majolica-RN/Majolica-RN, BIOS RMJ1009A 06/13/2021
    [  268.296501] Call Trace:
    
    Fixes: 8f1de51f49be ("drm/amdgpu: prevent immediate PASID reuse case")
    Tested-by: Borislav Petkov (AMD) <[email protected]>
    Signed-off-by: Prike Liang <[email protected]>
    Reviewed-by: Christian König <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit ea56aa2625708eaf96f310032391ff37746310ef)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/amdgpu: Fix wait after reset sequence in S4 [+ + +]
Author: Lijo Lazar <[email protected]>
Date:   Fri Mar 27 14:29:17 2026 +0530

    drm/amdgpu: Fix wait after reset sequence in S4
    
    commit daf470b8882b6f7f53cbfe9ec2b93a1b21528cdc upstream.
    
    For a mode-1 reset done at the end of S4 on PSPv11 dGPUs, only check if
    TOS is unloaded.
    
    Fixes: 32f73741d6ee ("drm/amdgpu: Wait for bootloader after PSPv11 reset")
    Closes: https://gitlab.freedesktop.org/drm/amd/-/work_items/4853
    Signed-off-by: Lijo Lazar <[email protected]>
    Reviewed-by: Alex Deucher <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 2fb4883b884a437d760bd7bdf7695a7e5a60bba3)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

drm/amdgpu: validate doorbell_offset in user queue creation [+ + +]
Author: Junrui Luo <[email protected]>
Date:   Tue Mar 24 17:39:02 2026 +0800

    drm/amdgpu: validate doorbell_offset in user queue creation
    
    commit a018d1819f158991b7308e4f74609c6c029b670c upstream.
    
    amdgpu_userq_get_doorbell_index() passes the user-provided
    doorbell_offset to amdgpu_doorbell_index_on_bar() without bounds
    checking. An arbitrarily large doorbell_offset can cause the
    calculated doorbell index to fall outside the allocated doorbell BO,
    potentially corrupting kernel doorbell space.
    
    Validate that doorbell_offset falls within the doorbell BO before
    computing the BAR index, using u64 arithmetic to prevent overflow.
    
    Fixes: f09c1e6077ab ("drm/amdgpu: generate doorbell index for userqueue")
    Reported-by: Yuhao Jiang <[email protected]>
    Signed-off-by: Junrui Luo <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit de1ef4ffd70e1d15f0bf584fd22b1f28cbd5e2ec)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/ast: dp501: Fix initialization of SCU2C [+ + +]
Author: Thomas Zimmermann <[email protected]>
Date:   Fri Mar 27 14:32:53 2026 +0100

    drm/ast: dp501: Fix initialization of SCU2C
    
    commit 2f42c1a6161646cbd29b443459fd635d29eda634 upstream.
    
    Ast's DP501 initialization reads the register SCU2C at offset 0x1202c
    and tries to set it to source data from VGA. But writes the update to
    offset 0x0, with unknown results. Write the result to SCU instead.
    
    The bug only happens in ast_init_analog(). There's similar code in
    ast_init_dvo(), which works correctly.
    
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Fixes: 83c6620bae3f ("drm/ast: initial DP501 support (v0.2)")
    Reviewed-by: Jocelyn Falempe <[email protected]>
    Cc: Dave Airlie <[email protected]>
    Cc: Thomas Zimmermann <[email protected]>
    Cc: Jocelyn Falempe <[email protected]>
    Cc: [email protected]
    Cc: <[email protected]> # v3.16+
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/i915/dp: Use crtc_state->enhanced_framing properly on ivb/hsw CPU eDP [+ + +]
Author: Ville Syrjälä <[email protected]>
Date:   Wed Mar 25 15:58:45 2026 +0200

    drm/i915/dp: Use crtc_state->enhanced_framing properly on ivb/hsw CPU eDP
    
    commit 9c9a57e4e337f94e23ddf69263fd0685c91155fb upstream.
    
    Looks like I missed the drm_dp_enhanced_frame_cap() in the ivb/hsw CPU
    eDP code when I introduced crtc_state->enhanced_framing. Fix it up so
    that the state we program to the hardware is guaranteed to match what
    we computed earlier.
    
    Cc: [email protected]
    Fixes: 3072a24c778a ("drm/i915: Introduce crtc_state->enhanced_framing")
    Signed-off-by: Ville Syrjälä <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Reviewed-by: Michał Grzelak <[email protected]>
    (cherry picked from commit 799fe8dc2af52f35c78c4ac97f8e34994dfd8760)
    Signed-off-by: Joonas Lahtinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/i915/dsi: Don't do DSC horizontal timing adjustments in command mode [+ + +]
Author: Ville Syrjälä <[email protected]>
Date:   Thu Mar 26 13:18:10 2026 +0200

    drm/i915/dsi: Don't do DSC horizontal timing adjustments in command mode
    
    commit 4dfce79e098915d8e5fc2b9e1d980bc3251dd32c upstream.
    
    Stop adjusting the horizontal timing values based on the
    compression ratio in command mode. Bspec seems to be telling
    us to do this only in video mode, and this is also how the
    Windows driver does things.
    
    This should also fix a div-by-zero on some machines because
    the adjusted htotal ends up being so small that we end up with
    line_time_us==0 when trying to determine the vtotal value in
    command mode.
    
    Note that this doesn't actually make the display on the
    Huawei Matebook E work, but at least the kernel no longer
    explodes when the driver loads.
    
    Cc: [email protected]
    Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12045
    Signed-off-by: Ville Syrjälä <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Fixes: 53693f02d80e ("drm/i915/dsi: account for DSC in horizontal timings")
    Reviewed-by: Jani Nikula <[email protected]>
    (cherry picked from commit 0b475e91ecc2313207196c6d7fd5c53e1a878525)
    Signed-off-by: Joonas Lahtinen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/ioc32: stop speculation on the drm_compat_ioctl path [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Tue Mar 24 17:42:51 2026 +0100

    drm/ioc32: stop speculation on the drm_compat_ioctl path
    
    commit f8995c2df519f382525ca4bc90553ad2ec611067 upstream.
    
    The drm compat ioctl path takes a user controlled pointer, and then
    dereferences it into a table of function pointers, the signature method
    of spectre problems.  Fix this up by calling array_index_nospec() on the
    index to the function pointer list.
    
    Fixes: 505b5240329b ("drm/ioctl: Fix Spectre v1 vulnerabilities")
    Cc: Maarten Lankhorst <[email protected]>
    Cc: Maxime Ripard <[email protected]>
    Cc: Thomas Zimmermann <[email protected]>
    Cc: David Airlie <[email protected]>
    Cc: Simona Vetter <[email protected]>
    Cc: stable <[email protected]>
    Assisted-by: gkh_clanker_2000
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Acked-by: Thomas Zimmermann <[email protected]>
    Acked-by: Maxime Ripard <[email protected]>
    Reviewed-by: Simona Vetter <[email protected]>
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Link: https://patch.msgid.link/2026032451-playing-rummage-8fa2@gregkh
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/sysfb: Fix efidrm error handling and memory type mismatch [+ + +]
Author: Chen Ni <[email protected]>
Date:   Wed Mar 11 14:46:52 2026 +0800

    drm/sysfb: Fix efidrm error handling and memory type mismatch
    
    [ Upstream commit 5e77923a3eb39cce91bf08ed7670f816bf86d4af ]
    
    Fix incorrect error checking and memory type confusion in
    efidrm_device_create(). devm_memremap() returns error pointers, not
    NULL, and returns system memory while devm_ioremap() returns I/O memory.
    The code incorrectly passes system memory to iosys_map_set_vaddr_iomem().
    
    Restructure to handle each memory type separately. Use devm_ioremap*()
    with ERR_PTR(-ENXIO) for WC/UC, and devm_memremap() with ERR_CAST() for
    WT/WB.
    
    Fixes: 32ae90c66fb6 ("drm/sysfb: Add efidrm for EFI displays")
    Signed-off-by: Chen Ni <[email protected]>
    Reviewed-by: Thomas Zimmermann <[email protected]>
    Signed-off-by: Thomas Zimmermann <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/xe/pxp: Clean up termination status on failure [+ + +]
Author: Daniele Ceraolo Spurio <[email protected]>
Date:   Tue Mar 24 08:37:20 2026 -0700

    drm/xe/pxp: Clean up termination status on failure
    
    [ Upstream commit e2628e670bb0923fcdc00828bfcd67b26a7df020 ]
    
    If the PXP HW termination fails during PXP start, the normal completion
    code won't be called, so the termination will remain uncomplete. To avoid
    unnecessary waits, mark the termination as completed from the error path.
    Note that we already do this if the termination fails when handling a
    termination irq from the HW.
    
    Fixes: f8caa80154c4 ("drm/xe/pxp: Add PXP queue tracking and session start")
    Signed-off-by: Daniele Ceraolo Spurio <[email protected]>
    Cc: Alan Previn Teres Alexis <[email protected]>
    Cc: Julia Filipchuk <[email protected]>
    Reviewed-by: Julia Filipchuk <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 5d9e708d2a69ab1f64a17aec810cd7c70c5b9fab)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

drm/xe/pxp: Clear restart flag in pxp_start after jumping back [+ + +]
Author: Daniele Ceraolo Spurio <[email protected]>
Date:   Tue Mar 24 08:37:22 2026 -0700

    drm/xe/pxp: Clear restart flag in pxp_start after jumping back
    
    [ Upstream commit 76903b2057c8677c2c006e87fede15f496555dc0 ]
    
    If we don't clear the flag we'll keep jumping back at the beginning of
    the function once we reach the end.
    
    Fixes: ccd3c6820a90 ("drm/xe/pxp: Decouple queue addition from PXP start")
    Signed-off-by: Daniele Ceraolo Spurio <[email protected]>
    Cc: Julia Filipchuk <[email protected]>
    Reviewed-by: Julia Filipchuk <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit 0850ec7bb2459602351639dccf7a68a03c9d1ee0)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

drm/xe/pxp: Remove incorrect handling of impossible state during suspend [+ + +]
Author: Daniele Ceraolo Spurio <[email protected]>
Date:   Tue Mar 24 08:37:21 2026 -0700

    drm/xe/pxp: Remove incorrect handling of impossible state during suspend
    
    [ Upstream commit 4fed244954c2dc9aafa333d08f66b14345225e03 ]
    
    The default case of the PXP suspend switch is incorrectly exiting
    without releasing the lock. However, this case is impossible to hit
    because we're switching on an enum and all the valid enum values have
    their own cases. Therefore, we can just get rid of the default case
    and rely on the compiler to warn us if a new enum value is added and
    we forget to add it to the switch.
    
    Fixes: 51462211f4a9 ("drm/xe/pxp: add PXP PM support")
    Signed-off-by: Daniele Ceraolo Spurio <[email protected]>
    Cc: Alan Previn Teres Alexis <[email protected]>
    Cc: Julia Filipchuk <[email protected]>
    Reviewed-by: Julia Filipchuk <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    (cherry picked from commit f1b5a77fc9b6a90cd9a5e3db9d4c73ae1edfcfac)
    Signed-off-by: Rodrigo Vivi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
dt-bindings: auxdisplay: ht16k33: Use unevaluatedProperties to fix common property warning [+ + +]
Author: Frank Li <[email protected]>
Date:   Mon Mar 2 16:59:55 2026 -0500

    dt-bindings: auxdisplay: ht16k33: Use unevaluatedProperties to fix common property warning
    
    [ Upstream commit 398c0c8bbc8f5a9d2f43863275a427a9d3720b6f ]
    
    Change additionalProperties to unevaluatedProperties because it refs to
    /schemas/input/matrix-keymap.yaml.
    
    Fix below CHECK_DTBS warnings:
    arch/arm/boot/dts/nxp/imx/imx6dl-victgo.dtb: keypad@70 (holtek,ht16k33): 'keypad,num-columns', 'keypad,num-rows' do not match any of the regexes: '^pinctrl-[0-9]+$'
            from schema $id: http://devicetree.org/schemas/auxdisplay/holtek,ht16k33.yaml#
    
    Fixes: f12b457c6b25c ("dt-bindings: auxdisplay: ht16k33: Convert to json-schema")
    Acked-by: Rob Herring (Arm) <[email protected]>
    Signed-off-by: Frank Li <[email protected]>
    Signed-off-by: Andy Shevchenko <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dt-bindings: connector: add pd-disable dependency [+ + +]
Author: Xu Yang <[email protected]>
Date:   Mon Mar 30 14:35:18 2026 +0800

    dt-bindings: connector: add pd-disable dependency
    
    commit 269c26464dcf8b54b0dd9c333721c30ee44ae297 upstream.
    
    When Power Delivery is not supported, the source is unable to obtain the
    current capability from the Source PDO. As a result, typec-power-opmode
    needs to be added to advertise such capability.
    
    Acked-by: Conor Dooley <[email protected]>
    Cc: stable <[email protected]>
    Signed-off-by: Xu Yang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

dt-bindings: gpio: fix microchip #interrupt-cells [+ + +]
Author: Jamie Gibbons <[email protected]>
Date:   Thu Mar 26 17:02:34 2026 +0000

    dt-bindings: gpio: fix microchip #interrupt-cells
    
    [ Upstream commit 6b5ef8c88854b343b733b574ea8754c9dab61f41 ]
    
    The GPIO controller on PolarFire SoC supports more than one type of
    interrupt and needs two interrupt cells.
    
    Fixes: 735806d8a68e9 ("dt-bindings: gpio: add bindings for microchip mpfs gpio")
    Signed-off-by: Jamie Gibbons <[email protected]>
    Signed-off-by: Conor Dooley <[email protected]>
    Link: https://patch.msgid.link/20260326-wise-gumdrop-49217723a72a@spud
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
eth: fbnic: Account for page fragments when updating BDQ tail [+ + +]
Author: Dimitri Daskalakis <[email protected]>
Date:   Tue Mar 24 12:51:22 2026 -0700

    eth: fbnic: Account for page fragments when updating BDQ tail
    
    [ Upstream commit b38c55320bf85a84a4f04803c57b261fc87e9b4b ]
    
    FBNIC supports fixed size buffers of 4K. When PAGE_SIZE > 4K, we
    fragment the page across multiple descriptors (FBNIC_BD_FRAG_COUNT).
    When refilling the BDQ, the correct number of entries are populated,
    but tail was only incremented by one. So on a system with 64K pages,
    HW would get one descriptor refilled for every 16 we populate.
    
    Additionally, we program the ring size in the HW when enabling the BDQ.
    This was not accounting for page fragments, so on systems with 64K pages,
    the HW used 1/16th of the ring.
    
    Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
    Signed-off-by: Dimitri Daskalakis <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

eth: fbnic: Increase FBNIC_QUEUE_SIZE_MIN to 64 [+ + +]
Author: Dimitri Daskalakis <[email protected]>
Date:   Wed Apr 1 09:28:48 2026 -0700

    eth: fbnic: Increase FBNIC_QUEUE_SIZE_MIN to 64
    
    [ Upstream commit ec7067e661193403a7a00980bda8612db5954142 ]
    
    On systems with 64K pages, RX queues will be wedged if users set the
    descriptor count to the current minimum (16). Fbnic fragments large
    pages into 4K chunks, and scales down the ring size accordingly. With
    64K pages and 16 descriptors, the ring size mask is 0 and will never
    be filled.
    
    32 descriptors is another special case that wedges the RX rings.
    Internally, the rings track pages for the head/tail pointers, not page
    fragments. So with 32 descriptors, there's only 1 usable page as one
    ring slot is kept empty to disambiguate between an empty/full ring.
    As a result, the head pointer never advances and the HW stalls after
    consuming 16 page fragments.
    
    Fixes: 0cb4c0a13723 ("eth: fbnic: Implement Rx queue alloc/start/stop/free")
    Signed-off-by: Dimitri Daskalakis <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
firmware: microchip: fail auto-update probe if no flash found [+ + +]
Author: Conor Dooley <[email protected]>
Date:   Tue Mar 3 11:24:06 2026 +0000

    firmware: microchip: fail auto-update probe if no flash found
    
    commit c7596f9001e2b83293e3658e4e1addde69bb335d upstream.
    
    There's no point letting the driver probe if there is no flash, as
    trying to do a firmware upload will fail. Move the code that attempts
    to get the flash from firmware upload to probe, and let it emit a
    message to users stating why auto-update is not supported.
    The code currently could have a problem if there's a flash in
    devicetree, but the system controller driver fails to get a pointer to
    it from the mtd subsystem, which will cause
    mpfs_sys_controller_get_flash() to return an error. Check for errors and
    null, instead of just null, in the new clause.
    
    CC: [email protected]
    Fixes: ec5b0f1193ad4 ("firmware: microchip: add PolarFire SoC Auto Update support")
    Signed-off-by: Conor Dooley <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
gpib: Fix fluke driver s390 compile issue [+ + +]
Author: Dave Penkler <[email protected]>
Date:   Mon Feb 2 10:47:55 2026 +0100

    gpib: Fix fluke driver s390 compile issue
    
    commit 579af7204d762587f9cce0d6236a710a771f1f6f upstream.
    
    The following errors were reported for a s390 randconfig build
    of the fluke gpib driver:
    
    >> drivers/gpib/eastwood/fluke_gpib.c:1002:23: error: call to undeclared function 'ioremap'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        1002 |         nec_priv->mmiobase = ioremap(e_priv->gpib_iomem_res->start,
             |                              ^
    >> drivers/gpib/eastwood/fluke_gpib.c:1002:21: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
        1002 |         nec_priv->mmiobase = ioremap(e_priv->gpib_iomem_res->start,
             |                            ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        1003 |                                      resource_size(e_priv->gpib_iomem_res));
             |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       drivers/gpib/eastwood/fluke_gpib.c:1036:33: error: incompatible integer to pointer conversion assigning to 'void *' from 'int' [-Wint-conversion]
        1036 |         e_priv->write_transfer_counter = ioremap(e_priv->write_transfer_counter_res->start,
             |                                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        1037 |                                                  resource_size(e_priv->write_transfer_counter_res));
             |                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Add HAS_IOMEM dependency to Kconfig for fluke driver option
    
    Suggested-by: Arnd Bergmann <[email protected]>
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Fixes: baf8855c9160 ("staging: gpib: fix address space mixup")
    Cc: stable <[email protected]>
    Signed-off-by: Dave Penkler <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

gpib: fix use-after-free in IO ioctl handlers [+ + +]
Author: Adam Crosser <[email protected]>
Date:   Tue Mar 17 19:25:28 2026 +0700

    gpib: fix use-after-free in IO ioctl handlers
    
    commit d1857f8296dceb75d00ab857fc3c61bc00c7f5c6 upstream.
    
    The IBRD, IBWRT, IBCMD, and IBWAIT ioctl handlers use a gpib_descriptor
    pointer after board->big_gpib_mutex has been released.  A concurrent
    IBCLOSEDEV ioctl can free the descriptor via close_dev_ioctl() during
    this window, causing a use-after-free.
    
    The IO handlers (read_ioctl, write_ioctl, command_ioctl) explicitly
    release big_gpib_mutex before calling their handler.  wait_ioctl() is
    called with big_gpib_mutex held, but ibwait() releases it internally
    when wait_mask is non-zero.  In all four cases, the descriptor pointer
    obtained from handle_to_descriptor() becomes unprotected.
    
    Fix this by introducing a kernel-only descriptor_busy reference count
    in struct gpib_descriptor.  Each handler atomically increments
    descriptor_busy under file_priv->descriptors_mutex before releasing the
    lock, and decrements it when done.  close_dev_ioctl() checks
    descriptor_busy under the same lock and rejects the close with -EBUSY
    if the count is non-zero.
    
    A reference count rather than a simple flag is necessary because
    multiple handlers can operate on the same descriptor concurrently
    (e.g. IBRD and IBWAIT on the same handle from different threads).
    
    A separate counter is needed because io_in_progress can be cleared from
    unprivileged userspace via the IBWAIT ioctl (through general_ibstatus()
    with set_mask containing CMPL), which would allow an attacker to bypass
    a check based solely on io_in_progress.  The new descriptor_busy
    counter is only modified by the kernel IO paths.
    
    The lock ordering is consistent (big_gpib_mutex -> descriptors_mutex)
    and the handlers only hold descriptors_mutex briefly during the lookup,
    so there is no deadlock risk and no impact on IO throughput.
    
    Signed-off-by: Adam Crosser <[email protected]>
    Cc: stable <[email protected]>
    Reviewed-by: Dave Penkler <[email protected]>
    Tested-by: Dave Penkler <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

gpib: lpvo_usb: fix memory leak on disconnect [+ + +]
Author: Johan Hovold <[email protected]>
Date:   Tue Mar 10 11:51:27 2026 +0100

    gpib: lpvo_usb: fix memory leak on disconnect
    
    commit 5cefb52c1af6f69ea719e42788f6ec6a087eb74c upstream.
    
    The driver iterates over the registered USB interfaces during GPIB
    attach and takes a reference to their USB devices until a match is
    found. These references are never released which leads to a memory leak
    when devices are disconnected.
    
    Fix the leak by dropping the unnecessary references.
    
    Fixes: fce79512a96a ("staging: gpib: Add LPVO DIY USB GPIB driver")
    Cc: stable <[email protected]> # 6.13
    Cc: Dave Penkler <[email protected]>
    Signed-off-by: Johan Hovold <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
gpio: Fix resource leaks on errors in gpiochip_add_data_with_key() [+ + +]
Author: Tzung-Bi Shih <[email protected]>
Date:   Thu Feb 5 09:28:40 2026 +0000

    gpio: Fix resource leaks on errors in gpiochip_add_data_with_key()
    
    commit 16fdabe143fce2cbf89139677728e17e21b46c28 upstream.
    
    Since commit aab5c6f20023 ("gpio: set device type for GPIO chips"),
    `gdev->dev.release` is unset.  As a result, the reference count to
    `gdev->dev` isn't dropped on the error handling paths.
    
    Drop the reference on errors.
    
    Also reorder the instructions to make the error handling simpler.
    Now gpiochip_add_data_with_key() roughly looks like:
    
       >>> Some memory allocation.  Go to ERR ZONE 1 on errors.
       >>> device_initialize().
    
       gpiodev_release() takes over the responsibility for freeing the
       resources of `gdev->dev`.  The subsequent error handling paths
       shouldn't go through ERR ZONE 1 again which leads to double free.
    
       >>> Some initialization mainly on `gdev`.
       >>> The rest of initialization.  Go to ERR ZONE 2 on errors.
       >>> Chip registration success and exit.
    
       >>> ERR ZONE 2.  gpio_device_put() and exit.
       >>> ERR ZONE 1.
    
    Cc: [email protected]
    Fixes: aab5c6f20023 ("gpio: set device type for GPIO chips")
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Tzung-Bi Shih <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

gpio: mxc: map Both Edge pad wakeup to Rising Edge [+ + +]
Author: Shenwei Wang <[email protected]>
Date:   Tue Mar 24 14:21:29 2026 -0500

    gpio: mxc: map Both Edge pad wakeup to Rising Edge
    
    commit c720fb57d56274213d027b3c5ab99080cf62a306 upstream.
    
    Suspend may fail on i.MX8QM when Falling Edge is used as a pad wakeup
    trigger due to a hardware bug in the detection logic. Since the hardware
    does not support Both Edge wakeup, remap requests for Both Edge to Rising
    Edge by default to avoid hitting this issue.
    
    A warning is emitted when Falling Edge is selected on i.MX8QM.
    
    Fixes: f60c9eac54af ("gpio: mxc: enable pad wakeup on i.MX8x platforms")
    cc: [email protected]
    Reviewed-by: Peng Fan <[email protected]>
    Signed-off-by: Shenwei Wang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

gpio: rename gpio_chip_hwgpio() to gpiod_hwgpio() [+ + +]
Author: Bartosz Golaszewski <[email protected]>
Date:   Thu Oct 16 11:09:25 2025 +0200

    gpio: rename gpio_chip_hwgpio() to gpiod_hwgpio()
    
    [ Upstream commit df900536e85819f6168783d5f6b3908d47811fdd ]
    
    This function takes a GPIO descriptor as first argument. Make its naming
    consistent with the rest of the GPIO codebase and use the gpiod_ prefix.
    
    Reviewed-by: Linus Walleij <[email protected]>
    Reviewed-by: Andrew Jeffery <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Stable-dep-of: 6df6ea4b3d15 ("gpiolib: clear requested flag if line is invalid")
    Signed-off-by: Sasha Levin <[email protected]>

 
gpiolib: clear requested flag if line is invalid [+ + +]
Author: Barnabás Pőcze <[email protected]>
Date:   Tue Mar 10 20:44:03 2026 +0000

    gpiolib: clear requested flag if line is invalid
    
    [ Upstream commit 6df6ea4b3d1567dbe6442f308735c23b63007c7f ]
    
    If `gpiochip_line_is_valid()` fails, then `-EINVAL` is returned, but
    `desc->flags` will have `GPIOD_FLAG_REQUESTED` set, which will result
    in subsequent calls misleadingly returning `-EBUSY`.
    
    Fix that by clearing the flag in case of failure.
    
    Fixes: a501624864f3 ("gpio: Respect valid_mask when requesting GPIOs")
    Signed-off-by: Barnabás Pőcze <[email protected]>
    Reviewed-by: Matti Vaittinen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Bartosz Golaszewski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
HID: appletb-kbd: add .resume method in PM [+ + +]
Author: Aditya Garg <[email protected]>
Date:   Tue Apr 7 16:38:01 2026 +0530

    HID: appletb-kbd: add .resume method in PM
    
    commit 1965445e13c09b79932ca8154977b4408cb9610c upstream.
    
    Upon resuming from suspend, the Touch Bar driver was missing a resume
    method in order to restore the original mode the Touch Bar was on before
    suspending. It is the same as the reset_resume method.
    
    Cc: [email protected]
    Signed-off-by: Aditya Garg <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

HID: core: Mitigate potential OOB by removing bogus memset() [+ + +]
Author: Lee Jones <[email protected]>
Date:   Mon Mar 9 14:59:29 2026 +0000

    HID: core: Mitigate potential OOB by removing bogus memset()
    
    [ Upstream commit 0a3fe972a7cb1404f693d6f1711f32bc1d244b1c ]
    
    The memset() in hid_report_raw_event() has the good intention of
    clearing out bogus data by zeroing the area from the end of the incoming
    data string to the assumed end of the buffer.  However, as we have
    previously seen, doing so can easily result in OOB reads and writes in
    the subsequent thread of execution.
    
    The current suggestion from one of the HID maintainers is to remove the
    memset() and simply return if the incoming event buffer size is not
    large enough to fill the associated report.
    
    Suggested-by Benjamin Tissoires <[email protected]>
    
    Signed-off-by: Lee Jones <[email protected]>
    [bentiss: changed the return value]
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

HID: logitech-hidpp: Enable MX Master 4 over bluetooth [+ + +]
Author: Adrian Freund <[email protected]>
Date:   Wed Mar 11 20:19:33 2026 +0100

    HID: logitech-hidpp: Enable MX Master 4 over bluetooth
    
    [ Upstream commit 70031e70ca15ede6a39db4d978e53a6cc720d454 ]
    
    The Logitech MX Master 4 can be connected over bluetooth or through a
    Logitech Bolt receiver. This change adds support for non-standard HID
    features, such as high resolution scrolling when the mouse is connected
    over bluetooth.
    Because no Logitech Bolt receiver driver exists yet those features
    won't be available when the mouse is connected through the receiver.
    
    Signed-off-by: Adrian Freund <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

HID: logitech-hidpp: Prevent use-after-free on force feedback initialisation failure [+ + +]
Author: Lee Jones <[email protected]>
Date:   Fri Feb 27 10:09:38 2026 +0000

    HID: logitech-hidpp: Prevent use-after-free on force feedback initialisation failure
    
    [ Upstream commit f7a4c78bfeb320299c1b641500fe7761eadbd101 ]
    
    Presently, if the force feedback initialisation fails when probing the
    Logitech G920 Driving Force Racing Wheel for Xbox One, an error number
    will be returned and propagated before the userspace infrastructure
    (sysfs and /dev/input) has been torn down.  If userspace ignores the
    errors and continues to use its references to these dangling entities, a
    UAF will promptly follow.
    
    We have 2 options; continue to return the error, but ensure that all of
    the infrastructure is torn down accordingly or continue to treat this
    condition as a warning by emitting the message but returning success.
    It is thought that the original author's intention was to emit the
    warning but keep the device functional, less the force feedback feature,
    so let's go with that.
    
    Signed-off-by: Lee Jones <[email protected]>
    Reviewed-by: Günther Noack <[email protected]>
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

HID: multitouch: Check to ensure report responses match the request [+ + +]
Author: Lee Jones <[email protected]>
Date:   Fri Feb 27 16:30:25 2026 +0000

    HID: multitouch: Check to ensure report responses match the request
    
    [ Upstream commit e716edafedad4952fe3a4a273d2e039a84e8681a ]
    
    It is possible for a malicious (or clumsy) device to respond to a
    specific report's feature request using a completely different report
    ID.  This can cause confusion in the HID core resulting in nasty
    side-effects such as OOB writes.
    
    Add a check to ensure that the report ID in the response, matches the
    one that was requested.  If it doesn't, omit reporting the raw event and
    return early.
    
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Benjamin Tissoires <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

HID: wacom: fix out-of-bounds read in wacom_intuos_bt_irq [+ + +]
Author: Benoît Sevens <[email protected]>
Date:   Tue Mar 3 13:58:28 2026 +0000

    HID: wacom: fix out-of-bounds read in wacom_intuos_bt_irq
    
    [ Upstream commit 2f1763f62909ccb6386ac50350fa0abbf5bb16a9 ]
    
    The wacom_intuos_bt_irq() function processes Bluetooth HID reports
    without sufficient bounds checking. A maliciously crafted short report
    can trigger an out-of-bounds read when copying data into the wacom
    structure.
    
    Specifically, report 0x03 requires at least 22 bytes to safely read
    the processed data and battery status, while report 0x04 (which
    falls through to 0x03) requires 32 bytes.
    
    Add explicit length checks for these report IDs and log a warning if
    a short report is received.
    
    Signed-off-by: Benoît Sevens <[email protected]>
    Reviewed-by: Jason Gerecke <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
hwmon: (asus-ec-sensors) Fix T_Sensor for PRIME X670E-PRO WIFI [+ + +]
Author: Corey Hickey <[email protected]>
Date:   Tue Mar 31 14:49:06 2026 -0700

    hwmon: (asus-ec-sensors) Fix T_Sensor for PRIME X670E-PRO WIFI
    
    [ Upstream commit cffff6df669a438ecac506dadd49a53d4475a796 ]
    
    On the Asus PRIME X670E-PRO WIFI, the driver reports a constant value of
    zero for T_Sensor. On this board, the register for T_Sensor is at a
    different address, as found by experimentation and confirmed by
    comparison to an independent temperature reading.
    
    * sensor disconnected: -62.0°C
    * ambient temperature: +22.0°C
    * held between fingers: +30.0°C
    
    Introduce SENSOR_TEMP_T_SENSOR_ALT1 to support the PRIME X670E-PRO WIFI
    without causing a regression for other 600-series boards
    
    Fixes: e0444758dd1b ("hwmon: (asus-ec-sensors) add PRIME X670E-PRO WIFI")
    Signed-off-by: Corey Hickey <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    [groeck: Fixed typo, updated Fixes: reference]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

hwmon: (ltc4286) Add missing MODULE_IMPORT_NS("PMBUS") [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Sun Mar 29 17:09:53 2026 +0000

    hwmon: (ltc4286) Add missing MODULE_IMPORT_NS("PMBUS")
    
    [ Upstream commit a9d2fbd3ad0e6ac588386e699beeccfe7516755f ]
    
    ltc4286.c uses PMBus core symbols exported in the PMBUS namespace,
    such as pmbus_do_probe(), but does not declare MODULE_IMPORT_NS("PMBUS").
    
    Add the missing namespace import to avoid modpost warnings.
    
    Fixes: 0c459759ca97 ("hwmon: (pmbus) Add ltc4286 driver")
    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: Sasha Levin <[email protected]>

hwmon: (occ) Fix division by zero in occ_show_power_1() [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Thu Mar 26 22:45:23 2026 +0000

    hwmon: (occ) Fix division by zero in occ_show_power_1()
    
    commit 39e2a5bf970402a8530a319cf06122e216ba57b8 upstream.
    
    In occ_show_power_1() case 1, the accumulator is divided by
    update_tag without checking for zero. If no samples have been
    collected yet (e.g. during early boot when the sensor block is
    included but hasn't been updated), update_tag is zero, causing
    a kernel divide-by-zero crash.
    
    The 2019 fix in commit 211186cae14d ("hwmon: (occ) Fix division by
    zero issue") only addressed occ_get_powr_avg() used by
    occ_show_power_2() and occ_show_power_a0(). This separate code
    path in occ_show_power_1() was missed.
    
    Fix this by reusing the existing occ_get_powr_avg() helper, which
    already handles the zero-sample case and uses mul_u64_u32_div()
    to multiply before dividing for better precision. Move the helper
    above occ_show_power_1() so it is visible at the call site.
    
    Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions")
    Cc: [email protected]
    Signed-off-by: Sanman Pradhan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    [groeck: Fix alignment problems reported by checkpatch]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

hwmon: (occ) Fix missing newline in occ_show_extended() [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Thu Mar 26 22:45:29 2026 +0000

    hwmon: (occ) Fix missing newline in occ_show_extended()
    
    [ Upstream commit 09773978879ecf71a7990fe9a28ce4eb92bce645 ]
    
    In occ_show_extended() case 0, when the EXTN_FLAG_SENSOR_ID flag
    is set, the sysfs_emit format string "%u" is missing the trailing
    newline that the sysfs ABI expects. The else branch correctly uses
    "%4phN\n", and all other show functions in this file include the
    trailing newline.
    
    Add the missing "\n" for consistency and correct sysfs output.
    
    Fixes: c10e753d43eb ("hwmon (occ): Add sensor types and versions")
    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: Sasha Levin <[email protected]>

hwmon: (pxe1610) Check return value of page-select write in probe [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Sun Mar 29 17:09:48 2026 +0000

    hwmon: (pxe1610) Check return value of page-select write in probe
    
    [ Upstream commit ccf70c41e562b29d1c05d1bbf53391785e09c6fb ]
    
    pxe1610_probe() writes PMBUS_PAGE to select page 0 but does not check
    the return value. If the write fails, subsequent register reads operate
    on an indeterminate page, leading to silent misconfiguration.
    
    Check the return value and propagate the error using dev_err_probe(),
    which also handles -EPROBE_DEFER correctly without log spam.
    
    Fixes: 344757bac526 ("hwmon: (pmbus) Add Infineon PXE1610 VR driver")
    Signed-off-by: Sanman Pradhan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    [groeck: Fix "Fixes" SHA]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

hwmon: (tps53679) Fix array access with zero-length block read [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Sun Mar 29 17:09:40 2026 +0000

    hwmon: (tps53679) Fix array access with zero-length block read
    
    [ Upstream commit 0e211f6aaa6a00fd0ee0c1eea5498f168c6725e6 ]
    
    i2c_smbus_read_block_data() can return 0, indicating a zero-length
    read. When this happens, tps53679_identify_chip() accesses buf[ret - 1]
    which is buf[-1], reading one byte before the buffer on the stack.
    
    Fix by changing the check from "ret < 0" to "ret <= 0", treating a
    zero-length read as an error (-EIO), which prevents the out-of-bounds
    array access.
    
    Also fix a typo in the adjacent comment: "if present" instead of
    duplicate "if".
    
    Fixes: 75ca1e5875fe ("hwmon: (pmbus/tps53679) Add support for TPS53685")
    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: Sasha Levin <[email protected]>

hwmon: (tps53679) Fix device ID comparison and printing in tps53676_identify() [+ + +]
Author: Sanman Pradhan <[email protected]>
Date:   Mon Mar 30 15:56:40 2026 +0000

    hwmon: (tps53679) Fix device ID comparison and printing in tps53676_identify()
    
    [ Upstream commit ca34ee6d0307a0b4e52c870dfc1bb8a3c3eb956e ]
    
    tps53676_identify() uses strncmp() to compare the device ID buffer
    against a byte sequence containing embedded non-printable bytes
    (\x53\x67\x60). strncmp() is semantically wrong for binary data
    comparison; use memcmp() instead.
    
    Additionally, the buffer from i2c_smbus_read_block_data() is not
    NUL-terminated, so printing it with "%s" in the error path is
    undefined behavior and may read past the buffer. Use "%*ph" to
    hex-dump the actual bytes returned.
    
    Per the datasheet, the expected device ID is the 6-byte sequence
    54 49 53 67 60 00 ("TI\x53\x67\x60\x00"), so compare all 6 bytes
    including the trailing NUL.
    
    Fixes: cb3d37b59012 ("hwmon: (pmbus/tps53679) Add support for TI TPS53676")
    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: Sasha Levin <[email protected]>

 
i2c: tegra: Don't mark devices with pins as IRQ safe [+ + +]
Author: Mikko Perttunen <[email protected]>
Date:   Tue Mar 3 13:32:11 2026 +0900

    i2c: tegra: Don't mark devices with pins as IRQ safe
    
    [ Upstream commit ec69c9e88315c4be70c283f18c2ff130da6320b5 ]
    
    I2C devices with associated pinctrl states (DPAUX I2C controllers)
    will change pinctrl state during runtime PM. This requires taking
    a mutex, so these devices cannot be marked as IRQ safe.
    
    Add PINCTRL as dependency to avoid build errors.
    
    Signed-off-by: Mikko Perttunen <[email protected]>
    Reported-by: Russell King <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]/
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ice: Fix memory leak in ice_set_ringparam() [+ + +]
Author: Zilin Guan <[email protected]>
Date:   Thu Jan 22 03:26:44 2026 +0000

    ice: Fix memory leak in ice_set_ringparam()
    
    [ Upstream commit fe868b499d16f55bbeea89992edb98043c9de416 ]
    
    In ice_set_ringparam, tx_rings and xdp_rings are allocated before
    rx_rings. If the allocation of rx_rings fails, the code jumps to
    the done label leaking both tx_rings and xdp_rings. Furthermore, if
    the setup of an individual Rx ring fails during the loop, the code jumps
    to the free_tx label which releases tx_rings but leaks xdp_rings.
    
    Fix this by introducing a free_xdp label and updating the error paths to
    ensure both xdp_rings and tx_rings are properly freed if rx_rings
    allocation or setup fails.
    
    Compile tested only. Issue found using a prototype static analysis tool
    and code review.
    
    Fixes: fcea6f3da546 ("ice: Add stats and ethtool support")
    Fixes: efc2214b6047 ("ice: Add support for XDP")
    Signed-off-by: Zilin Guan <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Reviewed-by: Aleksandr Loktionov <[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]>

 
iio: accel: adxl313: add missing error check in predisable [+ + +]
Author: Antoniu Miclaus <[email protected]>
Date:   Thu Mar 12 13:20:23 2026 +0200

    iio: accel: adxl313: add missing error check in predisable
    
    commit 9d3fa23d5d55a137fd4396d3d4799102587a7f2b upstream.
    
    Check the return value of the FIFO bypass regmap_write() before
    proceeding to disable interrupts.
    
    Fixes: ff8093fa6ba4 ("iio: accel: adxl313: add buffered FIFO watermark with interrupt handling")
    Signed-off-by: Antoniu Miclaus <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: accel: adxl380: fix FIFO watermark bit 8 always written as 0 [+ + +]
Author: Antoniu Miclaus <[email protected]>
Date:   Fri Feb 27 14:43:05 2026 +0200

    iio: accel: adxl380: fix FIFO watermark bit 8 always written as 0
    
    commit bd66aa1c8b8cabf459064a46d3430a5ec5138418 upstream.
    
    FIELD_PREP(BIT(0), fifo_samples & BIT(8)) produces either 0 or 256,
    and since FIELD_PREP masks to bit 0, 256 & 1 evaluates to 0. Use !!
    to convert the result to a proper 0-or-1 value.
    
    Fixes: df36de13677a ("iio: accel: add ADXL380 driver")
    Signed-off-by: Antoniu Miclaus <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: accel: fix ADXL355 temperature signature value [+ + +]
Author: Valek Andrej <[email protected]>
Date:   Fri Mar 13 10:24:13 2026 +0100

    iio: accel: fix ADXL355 temperature signature value
    
    commit 4f51e6c0baae80e52bd013092e82a55678be31fc upstream.
    
    Temperature was wrongly represented as 12-bit signed, confirmed by checking
    the datasheet. Even if the temperature is negative, the value in the
    register stays unsigned.
    
    Fixes: 12ed27863ea3 iio: accel: Add driver support for ADXL355
    Signed-off-by: Valek Andrej <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ade9000: fix wrong register in CALIBBIAS case for active power [+ + +]
Author: Giorgi Tchankvetadze <[email protected]>
Date:   Thu Feb 26 18:07:02 2026 +0400

    iio: adc: ade9000: fix wrong register in CALIBBIAS case for active power
    
    commit 86133fb1ec36b2f5cec29d71fbae84877c3a1358 upstream.
    
    The switch statement in ade9000_write_raw() attempts to match
    chan->address against ADE9000_REG_AWATTOS (0x00F) to dispatch
    the calibration offset write for active power channels. However,
    chan->address is set via ADE9000_ADDR_ADJUST(ADE9000_REG_AWATT,
    num), so after masking the phase bits, tmp holds
    ADE9000_REG_AWATT (0x210), which never matches 0x00F.
    
    As a result, writing IIO_CHAN_INFO_CALIBBIAS for IIO_POWER always
    falls through to the default case and returns -EINVAL, making
    active power offset calibration silently broken.
    
    Fix this by matching against ADE9000_REG_AWATT instead, which is
    the actual base address stored in chan->address for watt channels.
    
    Reference:ADE9000 datasheet (Rev. B), AWATTOS is the offset correction
    register at 0x00F (p. 44), while AWATT is the total active power
    register at 0x210 (p. 48).
    
    Fixes: 81de7b4619fc ("iio: adc: add ade9000 support")
    Signed-off-by: Giorgi Tchankvetadze <[email protected]>
    Reviewed-by: Antoniu Miclaus <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ade9000: fix wrong return type in streaming push [+ + +]
Author: Giorgi Tchankvetadze <[email protected]>
Date:   Tue Feb 24 17:23:55 2026 +0400

    iio: adc: ade9000: fix wrong return type in streaming push
    
    commit 57b207e38d414a27fda9fff638a0d3e7ef16b917 upstream.
    
    The else branch of ade9000_iio_push_streaming() incorrectly returns
    IRQ_HANDLED on regmap_write failure. This function returns int (0 on
    success, negative errno on failure), so IRQ_HANDLED (1) would be
    misinterpreted as a non-error by callers.
    
    Return ret instead, consistent with every other error path in the
    function.
    
    Fixes: 81de7b4619fc ("iio: adc: add ade9000 support")
    Signed-off-by: Giorgi Tchankvetadze <[email protected]>
    Reviewed-by: Antoniu Miclaus <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ade9000: move mutex init before IRQ registration [+ + +]
Author: Antoniu Miclaus <[email protected]>
Date:   Fri Feb 27 15:33:30 2026 +0200

    iio: adc: ade9000: move mutex init before IRQ registration
    
    commit 0206dd36418c104c0b3dea4ed7047e21eccb30b0 upstream.
    
    Move devm_mutex_init() before ade9000_request_irq() calls so that
    st->lock is initialized before any handler that depends on it can run.
    
    Fixes: 81de7b4619fc ("iio: adc: add ade9000 support")
    Signed-off-by: Antoniu Miclaus <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: aspeed: clear reference voltage bits before configuring vref [+ + +]
Author: Billy Tsai <[email protected]>
Date:   Tue Mar 3 10:38:26 2026 +0800

    iio: adc: aspeed: clear reference voltage bits before configuring vref
    
    commit 7cf2f6ed8e7a3bf481ef70b6b4a2edb8abfa5c57 upstream.
    
    Ensures the reference voltage bits are cleared in the ADC engine
    control register before configuring the voltage reference. This
    avoids potential misconfigurations caused by residual bits.
    
    Fixes: 1b5ceb55fec2 ("iio: adc: aspeed: Support ast2600 adc.")
    Signed-off-by: Billy Tsai <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ti-adc161s626: fix buffer read on big-endian [+ + +]
Author: David Lechner <[email protected]>
Date:   Sat Mar 14 18:13:31 2026 -0500

    iio: adc: ti-adc161s626: fix buffer read on big-endian
    
    commit 24869650dff34a6fc8fd1cc91b2058a72f9abc95 upstream.
    
    Rework ti_adc_trigger_handler() to properly handle data on big-endian
    architectures. The scan data format is 16-bit CPU-endian, so we can't
    cast it to a int * on big-endian and expect it to work. Instead, we
    introduce a local int variable to read the data into, and then copy it
    to the buffer.
    
    Since the buffer isn't passed to any SPI functions, we don't need it to
    be DMA-safe. So we can drop it from the driver data struct and just
    use stack memory for the scan data.
    
    Since there is only one data value (plus timestamp), we don't need an
    array and can just declare a struct with the correct data type instead.
    
    Also fix alignment of iio_get_time_ns() to ( while we are touching this.
    
    Fixes: 4d671b71beef ("iio: adc: ti-adc161s626: add support for TI 1-channel differential ADCs")
    Signed-off-by: David Lechner <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ti-adc161s626: use DMA-safe memory for spi_read() [+ + +]
Author: David Lechner <[email protected]>
Date:   Sat Mar 14 18:13:32 2026 -0500

    iio: adc: ti-adc161s626: use DMA-safe memory for spi_read()
    
    commit 768461517a28d80fe81ea4d5d03a90cd184ea6ad upstream.
    
    Add a DMA-safe buffer and use it for spi_read() instead of a stack
    memory. All SPI buffers must be DMA-safe.
    
    Since we only need up to 3 bytes, we just use a u8[] instead of __be16
    and __be32 and change the conversion functions appropriately.
    
    Fixes: 4d671b71beef ("iio: adc: ti-adc161s626: add support for TI 1-channel differential ADCs")
    Signed-off-by: David Lechner <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ti-ads1119: Fix unbalanced pm reference count in ds1119_single_conversion() [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sat Feb 28 01:48:19 2026 +0800

    iio: adc: ti-ads1119: Fix unbalanced pm reference count in ds1119_single_conversion()
    
    commit 48a5c36577ebe0144f8ede70e59b59ea18b75089 upstream.
    
    In ads1119_single_conversion(), if pm_runtime_resume_and_get() fails,
    the code jumps to the pdown label, which calls
    pm_runtime_put_autosuspend().
    
    Since pm_runtime_resume_and_get() automatically decrements the usage
    counter on failure, the subsequent call to pm_runtime_put_autosuspend()
    causes an unbalanced reference counter.
    
    Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver")
    Signed-off-by: Felix Gu <[email protected]>
    Reviewed-by: João Paulo Gonçalves <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ti-ads1119: Reinit completion before wait_for_completion_timeout() [+ + +]
Author: Felix Gu <[email protected]>
Date:   Tue Mar 3 21:47:33 2026 +0800

    iio: adc: ti-ads1119: Reinit completion before wait_for_completion_timeout()
    
    commit 2f168094177f8553a36046afce139001801ca917 upstream.
    
    The completion is not reinit before wait_for_completion_timeout(),
    so wait_for_completion_timeout() will return immediately after
    the first successful completion.
    
    Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver")
    Signed-off-by: Felix Gu <[email protected]>
    Reviewed-by: Francesco Dolcini <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD [+ + +]
Author: Felix Gu <[email protected]>
Date:   Tue Mar 3 00:00:04 2026 +0800

    iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD
    
    commit 36f6d4db3c5cb0f58fb02b1f54f9e86522d2f918 upstream.
    
    As there is no threaded handler, replace devm_request_threaded_irq()
    with devm_request_irq(), and as the handler calls iio_trigger_poll()
    which may not be called from a threaded handler replace IRQF_ONESHOT
    with IRQF_NO_THREAD.
    
    Since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
    without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
    in IRQ request and gives a warning if there is no threaded handler.
    
    Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver")
    Signed-off-by: Felix Gu <[email protected]>
    Reviewed-by: David Lechner <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ti-ads7950: do not clobber gpio state in ti_ads7950_get() [+ + +]
Author: Dmitry Torokhov <[email protected]>
Date:   Thu Mar 5 11:21:53 2026 -0800

    iio: adc: ti-ads7950: do not clobber gpio state in ti_ads7950_get()
    
    commit d20bbae6e5d408a8a7c2a4344d76dd1ac557a149 upstream.
    
    GPIO state was inadvertently overwritten by the result of spi_sync(),
    resulting in ti_ads7950_get() only returning 0 as GPIO state (or error).
    
    Fix this by introducing a separate variable to hold the state.
    
    Fixes: c97dce792dc8 ("iio: adc: ti-ads7950: add GPIO support")
    Reported-by: David Lechner <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: ti-ads7950: normalize return value of gpio_get [+ + +]
Author: Dmitry Torokhov <[email protected]>
Date:   Thu Mar 5 11:21:52 2026 -0800

    iio: adc: ti-ads7950: normalize return value of gpio_get
    
    commit e2fa075d5ce1963e7cb7b0ac708ba567e5af66db upstream.
    
    The GPIO get callback is expected to return 0 or 1 (or a negative error
    code). Ensure that the value returned by ti_ads7950_get() for output
    pins is normalized to the [0, 1] range.
    
    Fixes: 86ef402d805d ("gpiolib: sanitize the return value of gpio_chip::get()")
    Reviewed-by: Andy Shevchenko <[email protected]>
    Reviewed-by: Bartosz Golaszewski <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: add IIO_DECLARE_QUATERNION() macro [+ + +]
Author: David Lechner <[email protected]>
Date:   Sat Feb 28 14:02:22 2026 -0600

    iio: add IIO_DECLARE_QUATERNION() macro
    
    commit 56bd57e7b161f75535df91b229b0b2c64c6e5581 upstream.
    
    Add a new IIO_DECLARE_QUATERNION() macro that is used to declare the
    field in an IIO buffer struct that contains a quaternion vector.
    
    Quaternions are currently the only IIO data type that uses the .repeat
    feature of struct iio_scan_type. This has an implicit rule that the
    element in the buffer must be aligned to the entire size of the repeated
    element. This macro will make that requirement explicit. Since this is
    the only user, we just call the macro IIO_DECLARE_QUATERNION() instead
    of something more generic.
    
    Signed-off-by: David Lechner <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: dac: ad5770r: fix error return in ad5770r_read_raw() [+ + +]
Author: Antoniu Miclaus <[email protected]>
Date:   Thu Mar 12 13:20:24 2026 +0200

    iio: dac: ad5770r: fix error return in ad5770r_read_raw()
    
    commit c354521708175d776d896f8bdae44b18711eccb6 upstream.
    
    Return the error code from regmap_bulk_read() instead of 0 so
    that I/O failures are properly propagated.
    
    Fixes: cbbb819837f6 ("iio: dac: ad5770r: Add AD5770R support")
    Signed-off-by: Antoniu Miclaus <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: gyro: mpu3050: Fix incorrect free_irq() variable [+ + +]
Author: Ethan Tidmore <[email protected]>
Date:   Tue Feb 24 16:48:15 2026 -0600

    iio: gyro: mpu3050: Fix incorrect free_irq() variable
    
    commit edb11a1aef4011a4b7b22cc3c3396c6fe371f4a6 upstream.
    
    The handler for the IRQ part of this driver is mpu3050->trig but,
    in the teardown free_irq() is called with handler mpu3050.
    
    Use correct IRQ handler when calling free_irq().
    
    Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Ethan Tidmore <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: gyro: mpu3050: Fix irq resource leak [+ + +]
Author: Ethan Tidmore <[email protected]>
Date:   Tue Feb 24 16:48:16 2026 -0600

    iio: gyro: mpu3050: Fix irq resource leak
    
    commit 4216db1043a3be72ef9c2b7b9f393d7fa72496e6 upstream.
    
    The interrupt handler is setup but only a few lines down if
    iio_trigger_register() fails the function returns without properly
    releasing the handler.
    
    Add cleanup goto to resolve resource leak.
    
    Detected by Smatch:
    drivers/iio/gyro/mpu3050-core.c:1128 mpu3050_trigger_probe() warn:
    'irq' from request_threaded_irq() not released on lines: 1124.
    
    Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Ethan Tidmore <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: gyro: mpu3050: Fix out-of-sequence free_irq() [+ + +]
Author: Ethan Tidmore <[email protected]>
Date:   Tue Feb 24 16:48:18 2026 -0600

    iio: gyro: mpu3050: Fix out-of-sequence free_irq()
    
    commit d14116f6529fa085b1a1b1f224dc9604e4d2a29c upstream.
    
    The triggered buffer is initialized before the IRQ is requested. The
    removal path currently calls iio_triggered_buffer_cleanup() before
    free_irq(). This violates the expected LIFO.
    
    Place free_irq() in the correct location relative to
    iio_triggered_buffer_cleanup().
    
    Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
    Suggested-by: Jonathan Cameron <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Ethan Tidmore <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: gyro: mpu3050: Move iio_device_register() to correct location [+ + +]
Author: Ethan Tidmore <[email protected]>
Date:   Tue Feb 24 16:48:17 2026 -0600

    iio: gyro: mpu3050: Move iio_device_register() to correct location
    
    commit 4c05799449108fb0e0a6bd30e65fffc71e60db4d upstream.
    
    iio_device_register() should be at the end of the probe function to
    prevent race conditions.
    
    Place iio_device_register() at the end of the probe function and place
    iio_device_unregister() accordingly.
    
    Fixes: 3904b28efb2c7 ("iio: gyro: Add driver for the MPU-3050 gyroscope")
    Suggested-by: Jonathan Cameron <[email protected]>
    Reviewed-by: Linus Walleij <[email protected]>
    Signed-off-by: Ethan Tidmore <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: imu: adis16550: fix swapped gyro/accel filter functions [+ + +]
Author: Antoniu Miclaus <[email protected]>
Date:   Fri Feb 27 14:20:46 2026 +0200

    iio: imu: adis16550: fix swapped gyro/accel filter functions
    
    commit ea7e2e43d768102e2601dbbda42041c78d7a99f9 upstream.
    
    The low-pass filter handlers for IIO_ANGL_VEL and IIO_ACCEL call each
    other's filter functions in both read_raw and write_raw. Swap them so
    each channel type uses its correct filter accessor.
    
    Fixes: bac4368fab62 ("iio: imu: adis16550: add adis16550 support")
    Signed-off-by: Antoniu Miclaus <[email protected]>
    Acked-by: Robert Budai <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: imu: bmi160: Remove potential undefined behavior in bmi160_config_pin() [+ + +]
Author: Josh Poimboeuf <[email protected]>
Date:   Mon Mar 9 20:45:45 2026 -0700

    iio: imu: bmi160: Remove potential undefined behavior in bmi160_config_pin()
    
    commit c05a87d9ec3bf8727a5d746ce855003c6f2f8bb4 upstream.
    
    If 'pin' is not one of its expected values, the value of
    'int_out_ctrl_shift' is undefined.  With UBSAN enabled, this causes
    Clang to generate undefined behavior, resulting in the following
    warning:
    
      drivers/iio/imu/bmi160/bmi160_core.o: warning: objtool: bmi160_setup_irq() falls through to next function __cfi_bmi160_core_runtime_resume()
    
    Prevent the UB and improve error handling by returning an error if 'pin'
    has an unexpected value.
    
    While at it, simplify the code a bit by moving the 'pin_name' assignment
    to the first switch statement.
    
    Fixes: 895bf81e6bbf ("iio:bmi160: add drdy interrupt support")
    Reported-by: Arnd Bergmann <[email protected]>
    Closes: https://lore.kernel.org/[email protected]
    Signed-off-by: Josh Poimboeuf <[email protected]>
    Reviewed-by: Nuno Sá <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: imu: bno055: fix BNO055_SCAN_CH_COUNT off by one [+ + +]
Author: David Lechner <[email protected]>
Date:   Sat Feb 14 16:33:54 2026 -0600

    iio: imu: bno055: fix BNO055_SCAN_CH_COUNT off by one
    
    [ Upstream commit 773ef9f95385bae52dcb7fd129fefba3a71a04db ]
    
    Fix an off-by-one error in the BNO055_SCAN_CH_COUNT macro. The count
    is derived by taking the difference of the last and first register
    addresses, dividing by the size of each channel (2 bytes). It needs to
    also add 1 to account for the fact that the count is inclusive of both
    the first and last channels.
    
    Thanks to the aligned_s64 timestamp field, there was already extra
    padding in the buffer, so there were no runtime issues caused by this
    bug.
    
    Fixes: 4aefe1c2bd0c ("iio: imu: add Bosch Sensortec BNO055 core driver")
    Signed-off-by: David Lechner <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

iio: imu: st_lsm6dsx: Set FIFO ODR for accelerometer and gyroscope only [+ + +]
Author: Francesco Lavra <[email protected]>
Date:   Wed Feb 25 11:06:00 2026 +0100

    iio: imu: st_lsm6dsx: Set FIFO ODR for accelerometer and gyroscope only
    
    commit 630748afa7030b272b7bee5df857e7bcf132ed51 upstream.
    
    The st_lsm6dsx_set_fifo_odr() function, which is called when enabling and
    disabling the hardware FIFO, checks the contents of the hw->settings->batch
    array at index sensor->id, and then sets the current ODR value in sensor
    registers that depend on whether the register address is set in the above
    array element. This logic is valid for internal sensors only, i.e. the
    accelerometer and gyroscope; however, since commit c91c1c844ebd ("iio: imu:
    st_lsm6dsx: add i2c embedded controller support"), this function is called
    also when configuring the hardware FIFO for external sensors (i.e. sensors
    accessed through the sensor hub functionality), which can result in
    unrelated device registers being written.
    
    Add a check to the beginning of st_lsm6dsx_set_fifo_odr() so that it does
    not touch any registers unless it is called for internal sensors.
    
    Fixes: c91c1c844ebd ("iio: imu: st_lsm6dsx: add i2c embedded controller support")
    Signed-off-by: Francesco Lavra <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: light: vcnl4035: fix scan buffer on big-endian [+ + +]
Author: David Lechner <[email protected]>
Date:   Sat Mar 14 17:18:10 2026 -0500

    iio: light: vcnl4035: fix scan buffer on big-endian
    
    commit fdc7aa54a5d44c05880a4aad7cfb41aacfd16d7b upstream.
    
    Rework vcnl4035_trigger_consumer_handler() so that we are not passing
    what should be a u16 value as an int * to regmap_read(). This won't
    work on bit endian systems.
    
    Instead, add a new unsigned int variable to pass to regmap_read(). Then
    copy that value into the buffer struct.
    
    The buffer array is replaced with a struct since there is only one value
    being read. This allows us to use the correct u16 data type and has a
    side-effect of simplifying the alignment specification.
    
    Also fix the endianness of the scan format from little-endian to CPU
    endianness. Since we are using regmap to read the value, it will be
    CPU-endian.
    
    Fixes: 55707294c4eb ("iio: light: Add support for vishay vcnl4035")
    Signed-off-by: David Lechner <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: light: veml6070: fix veml6070_read() return value [+ + +]
Author: Aldo Conte <[email protected]>
Date:   Wed Mar 25 12:32:16 2026 +0100

    iio: light: veml6070: fix veml6070_read() return value
    
    commit d0b224cf9ab12e86a4d1ca55c760dfaa5c19cbe7 upstream.
    
    veml6070_read() computes the sensor value in ret but
    returns 0 instead of the actual result. This causes
    veml6070_read_raw() to always report 0.
    
    Return the computed value instead of 0.
    
    Running make W=1 returns no errors. I was unable
    to test the patch because I do not have the hardware.
    Found by code inspection.
    
    Fixes: fc38525135dd ("iio: light: veml6070: use guard to handle mutex")
    Signed-off-by: Aldo Conte <[email protected]>
    Reviewed-by: Nuno Sá <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: orientation: hid-sensor-rotation: add timestamp hack to not break userspace [+ + +]
Author: David Lechner <[email protected]>
Date:   Sat Mar 7 19:44:09 2026 -0600

    iio: orientation: hid-sensor-rotation: add timestamp hack to not break userspace
    
    commit 79a86a6cc3669416a21fef32d0767d39ba84b3aa upstream.
    
    Add a hack to push two timestamps in the hid-sensor-rotation scan data
    to avoid breaking userspace applications that depend on the timestamp
    being at the incorrect location in the scan data due to unintentional
    misalignment in older kernels.
    
    When this driver was written, the timestamp was in the correct location
    because of the way iio_compute_scan_bytes() was implemented at the time.
    (Samples were 24 bytes each.) Then commit 883f61653069 ("iio: buffer:
    align the size of scan bytes to size of the largest element") changed
    the computed scan_bytes to be a different size (32 bytes), which caused
    iio_push_to_buffers_with_timestamp() to place the timestamp at an
    incorrect offset.
    
    There have been long periods of time (6 years each) where the timestamp
    was in either location, so to not break either case, we open-code the
    timestamps to be pushed to both locations in the scan data.
    
    Reported-by: Jonathan Cameron <[email protected]>
    Closes: https://lore.kernel.org/linux-iio/20260215162351.79f40b32@jic23-huawei/
    Fixes: 883f61653069 ("iio: buffer: align the size of scan bytes to size of the largest element")
    Signed-off-by: David Lechner <[email protected]>
    Reviewed-by: Nuno Sá <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: orientation: hid-sensor-rotation: fix quaternion alignment [+ + +]
Author: David Lechner <[email protected]>
Date:   Sat Feb 28 14:02:23 2026 -0600

    iio: orientation: hid-sensor-rotation: fix quaternion alignment
    
    commit 50d4cc74b8a720a9682a9c94f7e62a5de6b2ed3a upstream.
    
    Restore the alignment of sampled_vals to 16 bytes by using
    IIO_DECLARE_QUATERNION(). This field contains a quaternion value which
    has scan_type.repeat = 4 and storagebits = 32. So the alignment must
    be 16 bytes to match the assumptions of iio_storage_bytes_for_si() and
    also to not break userspace.
    
    Reported-by: Lixu Zhang <[email protected]>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221077
    Fixes: b31a74075cb4 ("iio: orientation: hid-sensor-rotation: remove unnecessary alignment")
    Tested-by: Lixu Zhang <[email protected]>
    Signed-off-by: David Lechner <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Input: bcm5974 - recover from failed mode switch [+ + +]
Author: Liam Mitchell <[email protected]>
Date:   Wed Feb 18 14:21:35 2026 -0800

    Input: bcm5974 - recover from failed mode switch
    
    commit fc1e8a6f129d87c64ac8e58b50d9dfa66217cfda upstream.
    
    Mode switches sent before control response are ignored. This results in
    an unresponsive trackpad and "bcm5974: bad trackpad package, length: 8"
    repeated in logs.
    
    On receiving unknown 8-byte packets, assume that mode switch was ignored
    and schedule an asynchronous mode reset. The reset will switch the
    device to normal mode, wait, then switch back to wellspring mode.
    
    Signed-off-by: Liam Mitchell <[email protected]>
    Link: https://lore.kernel.org/linux-input/CAOQ1CL4+DP1TuLAGNsz5GdFBTHvnTg=5q=Dr2Z1OQc6RXydSYA@mail.gmail.com/
    Acked-by: Henrik Rydberg <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: i8042 - add TUXEDO InfinityBook Max 16 Gen10 AMD to i8042 quirk table [+ + +]
Author: Christoffer Sandberg <[email protected]>
Date:   Mon Feb 23 15:20:45 2026 +0100

    Input: i8042 - add TUXEDO InfinityBook Max 16 Gen10 AMD to i8042 quirk table
    
    commit 5839419cffc7788a356428d321e3ec18055c0286 upstream.
    
    The device occasionally wakes up from suspend with missing input on the
    internal keyboard and the following suspend attempt results in an instant
    wake-up. The quirks fix both issues for this device.
    
    Signed-off-by: Christoffer Sandberg <[email protected]>
    Signed-off-by: Werner Sembach <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: synaptics-rmi4 - fix a locking bug in an error path [+ + +]
Author: Bart Van Assche <[email protected]>
Date:   Mon Feb 23 15:05:15 2026 -0800

    Input: synaptics-rmi4 - fix a locking bug in an error path
    
    commit 7adaaee5edd35a423ae199c41b86bd1ed60ed483 upstream.
    
    Lock f54->data_mutex when entering the function statement since jumping
    to the 'error' label when checking report_size fails causes that mutex
    to be unlocked.
    
    This bug has been detected by the Clang thread-safety checker.
    
    Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics")
    Signed-off-by: Bart Van Assche <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode [+ + +]
Author: Shengyu Qu <[email protected]>
Date:   Fri Apr 3 22:07:28 2026 -0700

    Input: xpad - add support for BETOP BTP-KP50B/C controller's wireless mode
    
    commit 0d9363a764d9d601a05591f9695cea8b429e9be3 upstream.
    
    BETOP's BTP-KP50B and BTP-KP50C controller's wireless dongles are both
    working as standard Xbox 360 controllers. Add USB device IDs for them to
    xpad driver.
    
    Signed-off-by: Shengyu Qu <[email protected]>
    Link: https://patch.msgid.link/TY4PR01MB14432B4B298EA186E5F86C46B9855A@TY4PR01MB14432.jpnprd01.prod.outlook.com
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: xpad - add support for Razer Wolverine V3 Pro [+ + +]
Author: Zoltan Illes <[email protected]>
Date:   Fri Apr 3 22:03:42 2026 -0700

    Input: xpad - add support for Razer Wolverine V3 Pro
    
    commit e2b0ae529db4766584e77647cefe3ec15c3d842e upstream.
    
    Add device IDs for the Razer Wolverine V3 Pro controller in both
    wired (0x0a57) and wireless 2.4 GHz dongle (0x0a59) modes.
    
    The controller uses the Xbox 360 protocol (vendor-specific class,
    subclass 93, protocol 1) on interface 0 with an identical 20-byte
    input report layout, so no additional processing is needed.
    
    Signed-off-by: Zoltan Illes <[email protected]>
    Link: https://patch.msgid.link/20260329220031.1325509-1-137647604+ZlordHUN@users.noreply.github.com
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
io_uring/net: fix slab-out-of-bounds read in io_bundle_nbufs() [+ + +]
Author: Junxi Qian <[email protected]>
Date:   Sun Mar 29 23:39:09 2026 +0800

    io_uring/net: fix slab-out-of-bounds read in io_bundle_nbufs()
    
    commit b948f9d5d3057b01188e36664e7c7604d1c8ecb5 upstream.
    
    sqe->len is __u32 but gets stored into sr->len which is int. When
    userspace passes sqe->len values exceeding INT_MAX (e.g. 0xFFFFFFFF),
    sr->len overflows to a negative value. This negative value propagates
    through the bundle recv/send path:
    
      1. io_recv(): sel.val = sr->len (ssize_t gets -1)
      2. io_recv_buf_select(): arg.max_len = sel->val (size_t gets
         0xFFFFFFFFFFFFFFFF)
      3. io_ring_buffers_peek(): buf->len is not clamped because max_len
         is astronomically large
      4. iov[].iov_len = 0xFFFFFFFF flows into io_bundle_nbufs()
      5. io_bundle_nbufs(): min_t(int, 0xFFFFFFFF, ret) yields -1,
         causing ret to increase instead of decrease, creating an
         infinite loop that reads past the allocated iov[] array
    
    This results in a slab-out-of-bounds read in io_bundle_nbufs() from
    the kmalloc-64 slab, as nbufs increments past the allocated iovec
    entries.
    
      BUG: KASAN: slab-out-of-bounds in io_bundle_nbufs+0x128/0x160
      Read of size 8 at addr ffff888100ae05c8 by task exp/145
      Call Trace:
       io_bundle_nbufs+0x128/0x160
       io_recv_finish+0x117/0xe20
       io_recv+0x2db/0x1160
    
    Fix this by rejecting negative sr->len values early in both
    io_sendmsg_prep() and io_recvmsg_prep(). Since sqe->len is __u32,
    any value > INT_MAX indicates overflow and is not a valid length.
    
    Fixes: a05d1f625c7a ("io_uring/net: support bundles for send")
    Cc: [email protected]
    Signed-off-by: Junxi Qian <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
io_uring/rsrc: reject zero-length fixed buffer import [+ + +]
Author: Qi Tang <[email protected]>
Date:   Mon Mar 30 00:49:36 2026 +0800

    io_uring/rsrc: reject zero-length fixed buffer import
    
    [ Upstream commit 111a12b422a8cfa93deabaef26fec48237163214 ]
    
    validate_fixed_range() admits buf_addr at the exact end of the
    registered region when len is zero, because the check uses strict
    greater-than (buf_end > imu->ubuf + imu->len).  io_import_fixed()
    then computes offset == imu->len, which causes the bvec skip logic
    to advance past the last bio_vec entry and read bv_offset from
    out-of-bounds slab memory.
    
    Return early from io_import_fixed() when len is zero.  A zero-length
    import has no data to transfer and should not walk the bvec array
    at all.
    
      BUG: KASAN: slab-out-of-bounds in io_import_reg_buf+0x697/0x7f0
      Read of size 4 at addr ffff888002bcc254 by task poc/103
      Call Trace:
       io_import_reg_buf+0x697/0x7f0
       io_write_fixed+0xd9/0x250
       __io_issue_sqe+0xad/0x710
       io_issue_sqe+0x7d/0x1100
       io_submit_sqes+0x86a/0x23c0
       __do_sys_io_uring_enter+0xa98/0x1590
      Allocated by task 103:
      The buggy address is located 12 bytes to the right of
       allocated 584-byte region [ffff888002bcc000, ffff888002bcc248)
    
    Fixes: 8622b20f23ed ("io_uring: add validate_fixed_range() for validate fixed buffer")
    Signed-off-by: Qi Tang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
io_uring: protect remaining lockless ctx->rings accesses with RCU [+ + +]
Author: Jens Axboe <[email protected]>
Date:   Tue Mar 31 07:07:47 2026 -0600

    io_uring: protect remaining lockless ctx->rings accesses with RCU
    
    Commit 61a11cf4812726aceaee17c96432e1c08f6ed6cb upstream.
    
    Commit 96189080265e addressed one case of ctx->rings being potentially
    accessed while a resize is happening on the ring, but there are still
    a few others that need handling. Add a helper for retrieving the
    rings associated with an io_uring context, and add some sanity checking
    to that to catch bad uses. ->rings_rcu is always valid, as long as it's
    used within RCU read lock. Any use of ->rings_rcu or ->rings inside
    either ->uring_lock or ->completion_lock is sane as well.
    
    Do the minimum fix for the current kernel, but set it up such that this
    basic infra can be extended for later kernels to make this harder to
    mess up in the future.
    
    Thanks to Junxi Qian for finding and debugging this issue.
    
    Cc: [email protected]
    Fixes: 79cfe9e59c2a ("io_uring/register: add IORING_REGISTER_RESIZE_RINGS")
    Reviewed-by: Junxi Qian <[email protected]>
    Tested-by: Junxi Qian <[email protected]>
    Link: https://lore.kernel.org/io-uring/[email protected]/
    Signed-off-by: Jens Axboe <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ip6_tunnel: clear skb2->cb[] in ip4ip6_err() [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Thu Mar 26 15:51:38 2026 +0000

    ip6_tunnel: clear skb2->cb[] in ip4ip6_err()
    
    [ Upstream commit 2edfa31769a4add828a7e604b21cb82aaaa05925 ]
    
    Oskar Kjos reported the following problem.
    
    ip4ip6_err() calls icmp_send() on a cloned skb whose cb[] was written
    by the IPv6 receive path as struct inet6_skb_parm. icmp_send() passes
    IPCB(skb2) to __ip_options_echo(), which interprets that cb[] region
    as struct inet_skb_parm (IPv4). The layouts differ: inet6_skb_parm.nhoff
    at offset 14 overlaps inet_skb_parm.opt.rr, producing a non-zero rr
    value. __ip_options_echo() then reads optlen from attacker-controlled
    packet data at sptr[rr+1] and copies that many bytes into dopt->__data,
    a fixed 40-byte stack buffer (IP_OPTIONS_DATA_FIXED_SIZE).
    
    To fix this we clear skb2->cb[], as suggested by Oskar Kjos.
    
    Also add minimal IPv4 header validation (version == 4, ihl >= 5).
    
    Fixes: c4d3efafcc93 ("[IPV6] IP6TUNNEL: Add support to IPv4 over IPv6 tunnel.")
    Reported-by: Oskar Kjos <[email protected]>
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ipv6: avoid overflows in ip6_datagram_send_ctl() [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Wed Apr 1 15:47:21 2026 +0000

    ipv6: avoid overflows in ip6_datagram_send_ctl()
    
    [ Upstream commit 4e453375561fc60820e6b9d8ebeb6b3ee177d42e ]
    
    Yiming Qian reported :
    <quote>
     I believe I found a locally triggerable kernel bug in the IPv6 sendmsg
     ancillary-data path that can panic the kernel via `skb_under_panic()`
     (local DoS).
    
     The core issue is a mismatch between:
    
     - a 16-bit length accumulator (`struct ipv6_txoptions::opt_flen`, type
     `__u16`) and
     - a pointer to the *last* provided destination-options header (`opt->dst1opt`)
    
     when multiple `IPV6_DSTOPTS` control messages (cmsgs) are provided.
    
     - `include/net/ipv6.h`:
       - `struct ipv6_txoptions::opt_flen` is `__u16` (wrap possible).
     (lines 291-307, especially 298)
     - `net/ipv6/datagram.c:ip6_datagram_send_ctl()`:
       - Accepts repeated `IPV6_DSTOPTS` and accumulates into `opt_flen`
     without rejecting duplicates. (lines 909-933)
     - `net/ipv6/ip6_output.c:__ip6_append_data()`:
       - Uses `opt->opt_flen + opt->opt_nflen` to compute header
     sizes/headroom decisions. (lines 1448-1466, especially 1463-1465)
     - `net/ipv6/ip6_output.c:__ip6_make_skb()`:
       - Calls `ipv6_push_frag_opts()` if `opt->opt_flen` is non-zero.
     (lines 1930-1934)
     - `net/ipv6/exthdrs.c:ipv6_push_frag_opts()` / `ipv6_push_exthdr()`:
       - Push size comes from `ipv6_optlen(opt->dst1opt)` (based on the
     pointed-to header). (lines 1179-1185 and 1206-1211)
    
     1. `opt_flen` is a 16-bit accumulator:
    
     - `include/net/ipv6.h:298` defines `__u16 opt_flen; /* after fragment hdr */`.
    
     2. `ip6_datagram_send_ctl()` accepts *repeated* `IPV6_DSTOPTS` cmsgs
     and increments `opt_flen` each time:
    
     - In `net/ipv6/datagram.c:909-933`, for `IPV6_DSTOPTS`:
       - It computes `len = ((hdr->hdrlen + 1) << 3);`
       - It checks `CAP_NET_RAW` using `ns_capable(net->user_ns,
     CAP_NET_RAW)`. (line 922)
       - Then it does:
         - `opt->opt_flen += len;` (line 927)
         - `opt->dst1opt = hdr;` (line 928)
    
     There is no duplicate rejection here (unlike the legacy
     `IPV6_2292DSTOPTS` path which rejects duplicates at
     `net/ipv6/datagram.c:901-904`).
    
     If enough large `IPV6_DSTOPTS` cmsgs are provided, `opt_flen` wraps
     while `dst1opt` still points to a large (2048-byte)
     destination-options header.
    
     In the attached PoC (`poc.c`):
    
     - 32 cmsgs with `hdrlen=255` => `len = (255+1)*8 = 2048`
     - 1 cmsg with `hdrlen=0` => `len = 8`
     - Total increment: `32*2048 + 8 = 65544`, so `(__u16)opt_flen == 8`
     - The last cmsg is 2048 bytes, so `dst1opt` points to a 2048-byte header.
    
     3. The transmit path sizes headers using the wrapped `opt_flen`:
    
    - In `net/ipv6/ip6_output.c:1463-1465`:
      - `headersize = sizeof(struct ipv6hdr) + (opt ? opt->opt_flen +
     opt->opt_nflen : 0) + ...;`
    
     With wrapped `opt_flen`, `headersize`/headroom decisions underestimate
     what will be pushed later.
    
     4. When building the final skb, the actual push length comes from
     `dst1opt` and is not limited by wrapped `opt_flen`:
    
     - In `net/ipv6/ip6_output.c:1930-1934`:
       - `if (opt->opt_flen) proto = ipv6_push_frag_opts(skb, opt, proto);`
     - In `net/ipv6/exthdrs.c:1206-1211`, `ipv6_push_frag_opts()` pushes
     `dst1opt` via `ipv6_push_exthdr()`.
     - In `net/ipv6/exthdrs.c:1179-1184`, `ipv6_push_exthdr()` does:
       - `skb_push(skb, ipv6_optlen(opt));`
       - `memcpy(h, opt, ipv6_optlen(opt));`
    
     With insufficient headroom, `skb_push()` underflows and triggers
     `skb_under_panic()` -> `BUG()`:
    
     - `net/core/skbuff.c:2669-2675` (`skb_push()` calls `skb_under_panic()`)
     - `net/core/skbuff.c:207-214` (`skb_panic()` ends in `BUG()`)
    
     - The `IPV6_DSTOPTS` cmsg path requires `CAP_NET_RAW` in the target
     netns user namespace (`ns_capable(net->user_ns, CAP_NET_RAW)`).
     - Root (or any task with `CAP_NET_RAW`) can trigger this without user
     namespaces.
     - An unprivileged `uid=1000` user can trigger this if unprivileged
     user namespaces are enabled and it can create a userns+netns to obtain
     namespaced `CAP_NET_RAW` (the attached PoC does this).
    
     - Local denial of service: kernel BUG/panic (system crash).
     - Reproducible with a small userspace PoC.
    </quote>
    
    This patch does not reject duplicated options, as this might break
    some user applications.
    
    Instead, it makes sure to adjust opt_flen and opt_nflen to correctly
    reflect the size of the current option headers, preventing the overflows
    and the potential for panics.
    
    This applies to IPV6_DSTOPTS, IPV6_HOPOPTS, and IPV6_RTHDR.
    
    Specifically:
    
    When a new IPV6_DSTOPTS is processed, the length of the old opt->dst1opt
    is subtracted from opt->opt_flen before adding the new length.
    
    When a new IPV6_HOPOPTS is processed, the length of the old opt->dst0opt
    is subtracted from opt->opt_nflen.
    
    When a new Routing Header (IPV6_RTHDR or IPV6_2292RTHDR) is processed,
    the length of the old opt->srcrt is subtracted from opt->opt_nflen.
    
    In the special case within IPV6_2292RTHDR handling where dst1opt is moved
    to dst0opt, the length of the old opt->dst0opt is subtracted from
    opt->opt_nflen before the new one is added.
    
    Fixes: 333fad5364d6 ("[IPV6]: Support several new sockopt / ancillary data in Advanced API (RFC3542).")
    Reported-by: Yiming Qian <[email protected]>
    Closes: https://lore.kernel.org/netdev/CAL_bE8JNzawgr5OX5m+3jnQDHry2XxhQT5=jThW1zDPtUikRYA@mail.gmail.com/
    Signed-off-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]>

ipv6: icmp: clear skb2->cb[] in ip6_err_gen_icmpv6_unreach() [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Thu Mar 26 20:26:08 2026 +0000

    ipv6: icmp: clear skb2->cb[] in ip6_err_gen_icmpv6_unreach()
    
    [ Upstream commit 86ab3e55673a7a49a841838776f1ab18d23a67b5 ]
    
    Sashiko AI-review observed:
    
      In ip6_err_gen_icmpv6_unreach(), the skb is an outer IPv4 ICMP error packet
      where its cb contains an IPv4 inet_skb_parm. When skb is cloned into skb2
      and passed to icmp6_send(), it uses IP6CB(skb2).
    
      IP6CB interprets the IPv4 inet_skb_parm as an inet6_skb_parm. The cipso
      offset in inet_skb_parm.opt directly overlaps with dsthao in inet6_skb_parm
      at offset 18.
    
      If an attacker sends a forged ICMPv4 error with a CIPSO IP option, dsthao
      would be a non-zero offset. Inside icmp6_send(), mip6_addr_swap() is called
      and uses ipv6_find_tlv(skb, opt->dsthao, IPV6_TLV_HAO).
    
      This would scan the inner, attacker-controlled IPv6 packet starting at that
      offset, potentially returning a fake TLV without checking if the remaining
      packet length can hold the full 18-byte struct ipv6_destopt_hao.
    
      Could mip6_addr_swap() then perform a 16-byte swap that extends past the end
      of the packet data into skb_shared_info?
    
      Should the cb array also be cleared in ip6_err_gen_icmpv6_unreach() and
      ip6ip6_err() to prevent this?
    
    This patch implements the first suggestion.
    
    I am not sure if ip6ip6_err() needs to be changed.
    A separate patch would be better anyway.
    
    Fixes: ca15a078bd90 ("sit: generate icmpv6 error when receiving icmpv4 error")
    Reported-by: Ido Schimmel <[email protected]>
    Closes: https://sashiko.dev/#/patchset/20260326155138.2429480-1-edumazet%40google.com
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Oskar Kjos <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ipv6: prevent possible UaF in addrconf_permanent_addr() [+ + +]
Author: Paolo Abeni <[email protected]>
Date:   Fri Mar 27 10:52:57 2026 +0100

    ipv6: prevent possible UaF in addrconf_permanent_addr()
    
    [ Upstream commit fd63f185979b047fb22a0dfc6bd94d0cab6a6a70 ]
    
    The mentioned helper try to warn the user about an exceptional
    condition, but the message is delivered too late, accessing the ipv6
    after its possible deletion.
    
    Reorder the statement to avoid the possible UaF; while at it, place the
    warning outside the idev->lock as it needs no protection.
    
    Reported-by: Jakub Kicinski <[email protected]>
    Closes: https://sashiko.dev/#/patchset/8c8bfe2e1a324e501f0e15fef404a77443fd8caf.1774365668.git.pabeni%40redhat.com
    Fixes: f1705ec197e7 ("net: ipv6: Make address flushing on ifdown optional")
    Signed-off-by: Paolo Abeni <[email protected]>
    Link: https://patch.msgid.link/ef973c3a8cb4f8f1787ed469f3e5391b9fe95aa0.1774601542.git.pabeni@redhat.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
kallsyms: clean up @namebuf initialization in kallsyms_lookup_buildid() [+ + +]
Author: Petr Mladek <[email protected]>
Date:   Fri Nov 28 14:59:14 2025 +0100

    kallsyms: clean up @namebuf initialization in kallsyms_lookup_buildid()
    
    commit 426295ef18c5d5f0b7f75ac89d09022fcfafd25c upstream.
    
    Patch series "kallsyms: Prevent invalid access when showing module
    buildid", v3.
    
    We have seen nested crashes in __sprint_symbol(), see below.  They seem to
    be caused by an invalid pointer to "buildid".  This patchset cleans up
    kallsyms code related to module buildid and fixes this invalid access when
    printing backtraces.
    
    I made an audit of __sprint_symbol() and found several situations
    when the buildid might be wrong:
    
      + bpf_address_lookup() does not set @modbuildid
    
      + ftrace_mod_address_lookup() does not set @modbuildid
    
      + __sprint_symbol() does not take rcu_read_lock and
        the related struct module might get removed before
        mod->build_id is printed.
    
    This patchset solves these problems:
    
      + 1st, 2nd patches are preparatory
      + 3rd, 4th, 6th patches fix the above problems
      + 5th patch cleans up a suspicious initialization code.
    
    This is the backtrace, we have seen. But it is not really important.
    The problems fixed by the patchset are obvious:
    
      crash64> bt [62/2029]
      PID: 136151 TASK: ffff9f6c981d4000 CPU: 367 COMMAND: "btrfs"
      #0 [ffffbdb687635c28] machine_kexec at ffffffffb4c845b3
      #1 [ffffbdb687635c80] __crash_kexec at ffffffffb4d86a6a
      #2 [ffffbdb687635d08] hex_string at ffffffffb51b3b61
      #3 [ffffbdb687635d40] crash_kexec at ffffffffb4d87964
      #4 [ffffbdb687635d50] oops_end at ffffffffb4c41fc8
      #5 [ffffbdb687635d70] do_trap at ffffffffb4c3e49a
      #6 [ffffbdb687635db8] do_error_trap at ffffffffb4c3e6a4
      #7 [ffffbdb687635df8] exc_stack_segment at ffffffffb5666b33
      #8 [ffffbdb687635e20] asm_exc_stack_segment at ffffffffb5800cf9
      ...
    
    
    This patch (of 7)
    
    The function kallsyms_lookup_buildid() initializes the given @namebuf by
    clearing the first and the last byte.  It is not clear why.
    
    The 1st byte makes sense because some callers ignore the return code and
    expect that the buffer contains a valid string, for example:
    
      - function_stat_show()
        - kallsyms_lookup()
          - kallsyms_lookup_buildid()
    
    The initialization of the last byte does not make much sense because it
    can later be overwritten.  Fortunately, it seems that all called functions
    behave correctly:
    
      -  kallsyms_expand_symbol() explicitly adds the trailing '\0'
         at the end of the function.
    
      - All *__address_lookup() functions either use the safe strscpy()
        or they do not touch the buffer at all.
    
    Document the reason for clearing the first byte.  And remove the useless
    initialization of the last byte.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Petr Mladek <[email protected]>
    Reviewed-by: Aaron Tomlin <[email protected]>
    Cc: Alexei Starovoitov <[email protected]>
    Cc: Daniel Borkman <[email protected]>
    Cc: John Fastabend <[email protected]>
    Cc: Kees Cook <[email protected]>
    Cc: Luis Chamberalin <[email protected]>
    Cc: Marc Rutland <[email protected]>
    Cc: "Masami Hiramatsu (Google)" <[email protected]>
    Cc: Petr Pavlu <[email protected]>
    Cc: Sami Tolvanen <[email protected]>
    Cc: Steven Rostedt <[email protected]>
    Cc: Daniel Gomez <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

kallsyms: clean up modname and modbuildid initialization in kallsyms_lookup_buildid() [+ + +]
Author: Petr Mladek <[email protected]>
Date:   Fri Nov 28 14:59:15 2025 +0100

    kallsyms: clean up modname and modbuildid initialization in kallsyms_lookup_buildid()
    
    commit fda024fb64769e9d6b3916d013c78d6b189129f8 upstream.
    
    The @modname and @modbuildid optional return parameters are set only when
    the symbol is in a module.
    
    Always initialize them so that they do not need to be cleared when the
    module is not in a module.  It simplifies the logic and makes the code
    even slightly more safe.
    
    Note that bpf_address_lookup() function will get updated in a separate
    patch.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Petr Mladek <[email protected]>
    Cc: Aaron Tomlin <[email protected]>
    Cc: Alexei Starovoitov <[email protected]>
    Cc: Daniel Borkman <[email protected]>
    Cc: Daniel Gomez <[email protected]>
    Cc: John Fastabend <[email protected]>
    Cc: Kees Cook <[email protected]>
    Cc: Luis Chamberalin <[email protected]>
    Cc: Marc Rutland <[email protected]>
    Cc: "Masami Hiramatsu (Google)" <[email protected]>
    Cc: Petr Pavlu <[email protected]>
    Cc: Sami Tolvanen <[email protected]>
    Cc: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

kallsyms: cleanup code for appending the module buildid [+ + +]
Author: Petr Mladek <[email protected]>
Date:   Fri Nov 28 14:59:17 2025 +0100

    kallsyms: cleanup code for appending the module buildid
    
    commit 8e81dac4cd5477731169b92cff7c24f8f6635950 upstream.
    
    Put the code for appending the optional "buildid" into a helper function,
    It makes __sprint_symbol() better readable.
    
    Also print a warning when the "modname" is set and the "buildid" isn't.
    It might catch a situation when some lookup function in
    kallsyms_lookup_buildid() does not handle the "buildid".
    
    Use pr_*_once() to avoid an infinite recursion when the function is called
    from printk().  The recursion is rather theoretical but better be on the
    safe side.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Petr Mladek <[email protected]>
    Cc: Aaron Tomlin <[email protected]>
    Cc: Alexei Starovoitov <[email protected]>
    Cc: Daniel Borkman <[email protected]>
    Cc: Daniel Gomez <[email protected]>
    Cc: John Fastabend <[email protected]>
    Cc: Kees Cook <[email protected]>
    Cc: Luis Chamberalin <[email protected]>
    Cc: Marc Rutland <[email protected]>
    Cc: "Masami Hiramatsu (Google)" <[email protected]>
    Cc: Petr Pavlu <[email protected]>
    Cc: Sami Tolvanen <[email protected]>
    Cc: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

kallsyms: prevent module removal when printing module name and buildid [+ + +]
Author: Petr Mladek <[email protected]>
Date:   Fri Nov 28 14:59:20 2025 +0100

    kallsyms: prevent module removal when printing module name and buildid
    
    commit 3b07086444f80c844351255fd94c2cb0a7224df2 upstream.
    
    kallsyms_lookup_buildid() copies the symbol name into the given buffer so
    that it can be safely read anytime later.  But it just copies pointers to
    mod->name and mod->build_id which might get reused after the related
    struct module gets removed.
    
    The lifetime of struct module is synchronized using RCU.  Take the rcu
    read lock for the entire __sprint_symbol().
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Petr Mladek <[email protected]>
    Reviewed-by: Aaron Tomlin <[email protected]>
    Cc: Alexei Starovoitov <[email protected]>
    Cc: Daniel Borkman <[email protected]>
    Cc: Daniel Gomez <[email protected]>
    Cc: John Fastabend <[email protected]>
    Cc: Kees Cook <[email protected]>
    Cc: Luis Chamberalin <[email protected]>
    Cc: Marc Rutland <[email protected]>
    Cc: "Masami Hiramatsu (Google)" <[email protected]>
    Cc: Petr Pavlu <[email protected]>
    Cc: Sami Tolvanen <[email protected]>
    Cc: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ksmbd: fix OOB write in QUERY_INFO for compound requests [+ + +]
Author: Asim Viladi Oglu Manizada <[email protected]>
Date:   Wed Mar 25 09:14:22 2026 +0900

    ksmbd: fix OOB write in QUERY_INFO for compound requests
    
    commit fda9522ed6afaec45cabc198d8492270c394c7bc upstream.
    
    When a compound request such as READ + QUERY_INFO(Security) is received,
    and the first command (READ) consumes most of the response buffer,
    ksmbd could write beyond the allocated buffer while building a security
    descriptor.
    
    The root cause was that smb2_get_info_sec() checked buffer space using
    ppntsd_size from xattr, while build_sec_desc() often synthesized a
    significantly larger descriptor from POSIX ACLs.
    
    This patch introduces smb_acl_sec_desc_scratch_len() to accurately
    compute the final descriptor size beforehand, performs proper buffer
    checking with smb2_calc_max_out_buf_len(), and uses exact-sized
    allocation + iov pinning.
    
    Cc: [email protected]
    Fixes: e2b76ab8b5c9 ("ksmbd: add support for read compound")
    Signed-off-by: Asim Viladi Oglu Manizada <[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/crypto: chacha: Zeroize permuted_state before it leaves scope [+ + +]
Author: Eric Biggers <[email protected]>
Date:   Wed Mar 25 20:29:20 2026 -0700

    lib/crypto: chacha: Zeroize permuted_state before it leaves scope
    
    commit e5046823f8fa3677341b541a25af2fcb99a5b1e0 upstream.
    
    Since the ChaCha permutation is invertible, the local variable
    'permuted_state' is sufficient to compute the original 'state', and thus
    the key, even after the permutation has been done.
    
    While the kernel is quite inconsistent about zeroizing secrets on the
    stack (and some prominent userspace crypto libraries don't bother at all
    since it's not guaranteed to work anyway), the kernel does try to do it
    as a best practice, especially in cases involving the RNG.
    
    Thus, explicitly zeroize 'permuted_state' before it goes out of scope.
    
    Fixes: c08d0e647305 ("crypto: chacha20 - Add a generic ChaCha20 stream cipher implementation")
    Cc: [email protected]
    Acked-by: Ard Biesheuvel <[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]>

 
Linux: Linux 6.18.22 [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Sat Apr 11 14:26:52 2026 +0200

    Linux 6.18.22
    
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Dileep Malepu <[email protected]>
    Tested-by: Shung-Hsi Yu <[email protected]>
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Wentao Guan <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Miguel Ojeda <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Peter Schneider <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mei: me: reduce the scope on unexpected reset [+ + +]
Author: Alexander Usyskin <[email protected]>
Date:   Mon Mar 30 11:38:30 2026 +0300

    mei: me: reduce the scope on unexpected reset
    
    commit 8c27b1bce059a11a8d3c8682984e13866f0714af upstream.
    
    After commit 2cedb296988c ("mei: me: trigger link reset if hw ready is unexpected")
    some devices started to show long resume times (5-7 seconds).
    This happens as mei falsely detects unready hardware,
    starts parallel link reset flow and triggers link reset timeouts
    in the resume callback.
    
    Address it by performing detection of unready hardware only
    when driver is in the MEI_DEV_ENABLED state instead of blacklisting
    states as done in the original patch.
    This eliminates active waitqueue check as in MEI_DEV_ENABLED state
    there will be no active waitqueue.
    
    Reviewed-by: Rafael J. Wysocki (Intel) <[email protected]>
    Reported-by: Todd Brandt <[email protected]>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221023
    Tested-by: Todd Brandt <[email protected]>
    Fixes: 2cedb296988c ("mei: me: trigger link reset if hw ready is unexpected")
    Cc: stable <[email protected]>
    Signed-off-by: Alexander Usyskin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
MIPS: Fix the GCC version check for `__multi3' workaround [+ + +]
Author: Maciej W. Rozycki <[email protected]>
Date:   Mon Mar 30 02:54:09 2026 +0100

    MIPS: Fix the GCC version check for `__multi3' workaround
    
    commit ec8bf18814915460d9c617b556bf024efef26613 upstream.
    
    It was only GCC 10 that fixed a MIPS64r6 code generation issue with a
    `__multi3' libcall inefficiently produced to perform 64-bit widening
    multiplication while suitable machine instructions exist to do such a
    calculation.  The fix went in with GCC commit 48b2123f6336 ("re PR
    target/82981 (unnecessary __multi3 call for mips64r6 linux kernel)").
    
    Adjust our code accordingly, removing build failures such as:
    
    mips64-linux-ld: lib/math/div64.o: in function `mul_u64_add_u64_div_u64':
    div64.c:(.text+0x84): undefined reference to `__multi3'
    
    with the GCC versions affected.
    
    Fixes: ebabcf17bcd7 ("MIPS: Implement __multi3 for GCC7 MIPS64r6 builds")
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Signed-off-by: Maciej W. Rozycki <[email protected]>
    Cc: [email protected] # v4.15+
    Reviewed-by: David Laight <[email protected].
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mips: mm: Allocate tlb_vpn array atomically [+ + +]
Author: Stefan Wiehler <[email protected]>
Date:   Tue Mar 10 11:40:24 2026 +0100

    mips: mm: Allocate tlb_vpn array atomically
    
    commit 01cc50ea5167bb14117257ec084637abe9e5f691 upstream.
    
    Found by DEBUG_ATOMIC_SLEEP:
    
      BUG: sleeping function called from invalid context at /include/linux/sched/mm.h:306
      in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1
      preempt_count: 1, expected: 0
      RCU nest depth: 0, expected: 0
      no locks held by swapper/1/0.
      irq event stamp: 0
      hardirqs last  enabled at (0): [<0000000000000000>] 0x0
      hardirqs last disabled at (0): [<ffffffff801477fc>] copy_process+0x75c/0x1b68
      softirqs last  enabled at (0): [<ffffffff801477fc>] copy_process+0x75c/0x1b68
      softirqs last disabled at (0): [<0000000000000000>] 0x0
      CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.6.119-d79e757675ec-fct #1
      Stack : 800000000290bad8 0000000000000000 0000000000000008 800000000290bae8
              800000000290bae8 800000000290bc78 0000000000000000 0000000000000000
              ffffffff80c80000 0000000000000001 ffffffff80d8dee8 ffffffff810d09c0
              784bb2a7ec10647d 0000000000000010 ffffffff80a6fd60 8000000001d8a9c0
              0000000000000000 0000000000000000 ffffffff80d90000 0000000000000000
              ffffffff80c9e0e8 0000000007ffffff 0000000000000cc0 0000000000000400
              ffffffffffffffff 0000000000000001 0000000000000002 ffffffffc0149ed8
              fffffffffffffffe 8000000002908000 800000000290bae0 ffffffff80a81b74
              ffffffff80129fb0 0000000000000000 0000000000000000 0000000000000000
              0000000000000000 0000000000000000 ffffffff80129fd0 0000000000000000
              ...
      Call Trace:
      [<ffffffff80129fd0>] show_stack+0x60/0x158
      [<ffffffff80a7f894>] dump_stack_lvl+0x88/0xbc
      [<ffffffff8018d3c8>] __might_resched+0x268/0x288
      [<ffffffff803648b0>] __kmem_cache_alloc_node+0x2e0/0x330
      [<ffffffff80302788>] __kmalloc+0x58/0xd0
      [<ffffffff80a81b74>] r4k_tlb_uniquify+0x7c/0x428
      [<ffffffff80143e8c>] tlb_init+0x7c/0x110
      [<ffffffff8012bdb4>] per_cpu_trap_init+0x16c/0x1d0
      [<ffffffff80133258>] start_secondary+0x28/0x128
    
    Fixes: 231ac951faba ("MIPS: mm: kmalloc tlb_vpn array to avoid stack overflow")
    Signed-off-by: Stefan Wiehler <[email protected]>
    Cc: [email protected]
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

mips: ralink: update CPU clock index [+ + +]
Author: Shiji Yang <[email protected]>
Date:   Tue Feb 24 10:22:50 2026 +0800

    mips: ralink: update CPU clock index
    
    [ Upstream commit 43985a62bab9d35e5e9af41118ce2f44c01b97d2 ]
    
    Update CPU clock index to match the clock driver changes.
    
    Fixes: d34db686a3d7 ("clk: ralink: mtmips: fix clocks probe order in oldest ralink SoCs")
    Signed-off-by: Mieczyslaw Nalewaj <[email protected]>
    Signed-off-by: Shiji Yang <[email protected]>
    Reviewed-by: Sergio Paracuellos <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
MIPS: SiByte: Bring back cache initialisation [+ + +]
Author: Maciej W. Rozycki <[email protected]>
Date:   Fri Mar 27 11:38:06 2026 +0000

    MIPS: SiByte: Bring back cache initialisation
    
    commit d62cf1511743526f530a4c169424e50c757f5a5e upstream.
    
    Bring back cache initialisation for Broadcom SiByte SB1 cores, which has
    been removed causing the kernel to hang at bootstrap right after:
    
    Dentry cache hash table entries: 524288 (order: 8, 4194304 bytes, linear)
    Inode-cache hash table entries: 262144 (order: 7, 2097152 bytes, linear)
    
    The cause of the problem is R4k cache handlers are also used by Broadcom
    SiByte SB1 cores, however with a different cache error exception handler
    and therefore not using CPU_R4K_CACHE_TLB:
    
    obj-$(CONFIG_CPU_R4K_CACHE_TLB) += c-r4k.o cex-gen.o tlb-r4k.o
    obj-$(CONFIG_CPU_SB1)           += c-r4k.o cerr-sb1.o cex-sb1.o tlb-r4k.o
    
    (from arch/mips/mm/Makefile).
    
    Fixes: bbe4f634f48c ("mips: fix r3k_cache_init build regression")
    Signed-off-by: Maciej W. Rozycki <[email protected]>
    Cc: [email protected] # v6.8+
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe [+ + +]
Author: Xingjing Deng <[email protected]>
Date:   Sat Jan 31 14:55:39 2026 +0800

    misc: fastrpc: check qcom_scm_assign_mem() return in rpmsg_probe
    
    commit 6a502776f4a4f80fb839b22f12aeaf0267fca344 upstream.
    
    In the SDSP probe path, qcom_scm_assign_mem() is used to assign the
    reserved memory to the configured VMIDs, but its return value was not checked.
    
    Fail the probe if the SCM call fails to avoid continuing with an
    unexpected/incorrect memory permission configuration.
    
    This issue was found by an in-house analysis workflow that extracts AST-based
    information and runs static checks, with LLM assistance for triage, and was
    confirmed by manual code review.
    No hardware testing was performed.
    
    Fixes: c3c0363bc72d4 ("misc: fastrpc: support complete DMA pool access to the DSP")
    Cc: [email protected] # 6.11-rc1
    Signed-off-by: Xingjing Deng <[email protected]>
    Reviewed-by: Dmitry Baryshkov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

misc: fastrpc: possible double-free of cctx->remote_heap [+ + +]
Author: Xingjing Deng <[email protected]>
Date:   Fri Jan 30 07:41:40 2026 +0800

    misc: fastrpc: possible double-free of cctx->remote_heap
    
    commit ba2c83167b215da30fa2aae56b140198cf8d8408 upstream.
    
    fastrpc_init_create_static_process() may free cctx->remote_heap on the
    err_map path but does not clear the pointer. Later, fastrpc_rpmsg_remove()
    frees cctx->remote_heap again if it is non-NULL, which can lead to a
    double-free if the INIT_CREATE_STATIC ioctl hits the error path and the rpmsg
    device is subsequently removed/unbound.
    Clear cctx->remote_heap after freeing it in the error path to prevent the
    later cleanup from freeing it again.
    
    This issue was found by an in-house analysis workflow that extracts AST-based
    information and runs static checks, with LLM assistance for triage, and was
    confirmed by manual code review.
    No hardware testing was performed.
    
    Fixes: 0871561055e66 ("misc: fastrpc: Add support for audiopd")
    Cc: [email protected] # 6.2+
    Signed-off-by: Xingjing Deng <[email protected]>
    Reviewed-by: Dmitry Baryshkov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm/memory: fix PMD/PUD checks in follow_pfnmap_start() [+ + +]
Author: David Hildenbrand (Arm) <[email protected]>
Date:   Wed Apr 1 12:45:26 2026 -0400

    mm/memory: fix PMD/PUD checks in follow_pfnmap_start()
    
    [ Upstream commit ffef67b93aa352b34e6aeba3d52c19a63885409a ]
    
    follow_pfnmap_start() suffers from two problems:
    
    (1) We are not re-fetching the pmd/pud after taking the PTL
    
    Therefore, we are not properly stabilizing what the lock actually
    protects.  If there is concurrent zapping, we would indicate to the
    caller that we found an entry, however, that entry might already have
    been invalidated, or contain a different PFN after taking the lock.
    
    Properly use pmdp_get() / pudp_get() after taking the lock.
    
    (2) pmd_leaf() / pud_leaf() are not well defined on non-present entries
    
    pmd_leaf()/pud_leaf() could wrongly trigger on non-present entries.
    
    There is no real guarantee that pmd_leaf()/pud_leaf() returns something
    reasonable on non-present entries.  Most architectures indeed either
    perform a present check or make it work by smart use of flags.
    
    However, for example loongarch checks the _PAGE_HUGE flag in pmd_leaf(),
    and always sets the _PAGE_HUGE flag in __swp_entry_to_pmd().  Whereby
    pmd_trans_huge() explicitly checks pmd_present(), pmd_leaf() does not do
    that.
    
    Let's check pmd_present()/pud_present() before assuming "the is a present
    PMD leaf" when spotting pmd_leaf()/pud_leaf(), like other page table
    handling code that traverses user page tables does.
    
    Given that non-present PMD entries are likely rare in VM_IO|VM_PFNMAP, (1)
    is likely more relevant than (2).  It is questionable how often (1) would
    actually trigger, but let's CC stable to be sure.
    
    This was found by code inspection.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 6da8e9634bb7 ("mm: new follow_pfnmap API")
    Signed-off-by: David Hildenbrand (Arm) <[email protected]>
    Acked-by: Mike Rapoport (Microsoft) <[email protected]>
    Reviewed-by: Lorenzo Stoakes (Oracle) <[email protected]>
    Cc: Liam Howlett <[email protected]>
    Cc: Michal Hocko <[email protected]>
    Cc: Peter Xu <[email protected]>
    Cc: Suren Baghdasaryan <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mm: replace READ_ONCE() with standard page table accessors [+ + +]
Author: Anshuman Khandual <[email protected]>
Date:   Wed Apr 1 12:45:25 2026 -0400

    mm: replace READ_ONCE() with standard page table accessors
    
    [ Upstream commit c0efdb373c3aaacb32db59cadb0710cac13e44ae ]
    
    Replace all READ_ONCE() with a standard page table accessors i.e
    pxdp_get() that defaults into READ_ONCE() in cases where platform does not
    override.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Anshuman Khandual <[email protected]>
    Acked-by: David Hildenbrand <[email protected]>
    Reviewed-by: Lance Yang <[email protected]>
    Reviewed-by: Wei Yang <[email protected]>
    Reviewed-by: Dev Jain <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Stable-dep-of: ffef67b93aa3 ("mm/memory: fix PMD/PUD checks in follow_pfnmap_start()")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mptcp: add eat_recv_skb helper [+ + +]
Author: Geliang Tang <[email protected]>
Date:   Fri Jan 30 20:24:24 2026 +0100

    mptcp: add eat_recv_skb helper
    
    [ Upstream commit 436510df0cafb1bc36f12e92e0e76599be28d8f4 ]
    
    This patch extracts the free skb related code in __mptcp_recvmsg_mskq()
    into a new helper mptcp_eat_recv_skb().
    
    This new helper will be used in the next patch.
    
    Signed-off-by: Geliang Tang <[email protected]>
    Reviewed-by: Mat Martineau <[email protected]>
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: 5dd8025a49c2 ("mptcp: fix soft lockup in mptcp_recvmsg()")
    Signed-off-by: Sasha Levin <[email protected]>

mptcp: fix soft lockup in mptcp_recvmsg() [+ + +]
Author: Li Xiasong <[email protected]>
Date:   Mon Mar 30 20:03:35 2026 +0800

    mptcp: fix soft lockup in mptcp_recvmsg()
    
    [ Upstream commit 5dd8025a49c268ab6b94d978532af3ad341132a7 ]
    
    syzbot reported a soft lockup in mptcp_recvmsg() [0].
    
    When receiving data with MSG_PEEK | MSG_WAITALL flags, the skb is not
    removed from the sk_receive_queue. This causes sk_wait_data() to always
    find available data and never perform actual waiting, leading to a soft
    lockup.
    
    Fix this by adding a 'last' parameter to track the last peeked skb.
    This allows sk_wait_data() to make informed waiting decisions and prevent
    infinite loops when MSG_PEEK is used.
    
    [0]:
    watchdog: BUG: soft lockup - CPU#2 stuck for 156s! [server:1963]
    Modules linked in:
    CPU: 2 UID: 0 PID: 1963 Comm: server Not tainted 6.19.0-rc8 #61 PREEMPT(none)
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
    RIP: 0010:sk_wait_data+0x15/0x190
    Code: 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 41 56 41 55 41 54 49 89 f4 55 48 89 d5 53 48 89 fb <48> 83 ec 30 65 48 8b 05 17 a4 6b 01 48 89 44 24 28 31 c0 65 48 8b
    RSP: 0018:ffffc90000603ca0 EFLAGS: 00000246
    RAX: 0000000000000000 RBX: ffff888102bf0800 RCX: 0000000000000001
    RDX: 0000000000000000 RSI: ffffc90000603d18 RDI: ffff888102bf0800
    RBP: 0000000000000000 R08: 0000000000000002 R09: 0000000000000101
    R10: 0000000000000000 R11: 0000000000000075 R12: ffffc90000603d18
    R13: ffff888102bf0800 R14: ffff888102bf0800 R15: 0000000000000000
    FS:  00007f6e38b8c4c0(0000) GS:ffff8881b877e000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000055aa7bff1680 CR3: 0000000105cbe000 CR4: 00000000000006f0
    Call Trace:
     <TASK>
     mptcp_recvmsg+0x547/0x8c0 net/mptcp/protocol.c:2329
     inet_recvmsg+0x11f/0x130 net/ipv4/af_inet.c:891
     sock_recvmsg+0x94/0xc0 net/socket.c:1100
     __sys_recvfrom+0xb2/0x130 net/socket.c:2256
     __x64_sys_recvfrom+0x1f/0x30 net/socket.c:2267
     do_syscall_64+0x59/0x2d0 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x76/0x7e arch/x86/entry/entry_64.S:131
    RIP: 0033:0x7f6e386a4a1d
    Code: 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8d 05 f1 de 2c 00 41 89 ca 8b 00 85 c0 75 20 45 31 c9 45 31 c0 b8 2d 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 6b f3 c3 66 0f 1f 84 00 00 00 00 00 41 56 41
    RSP: 002b:00007ffc3c4bb078 EFLAGS: 00000246 ORIG_RAX: 000000000000002d
    RAX: ffffffffffffffda RBX: 000000000000861e RCX: 00007f6e386a4a1d
    RDX: 00000000000003ff RSI: 00007ffc3c4bb150 RDI: 0000000000000004
    RBP: 00007ffc3c4bb570 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000103 R11: 0000000000000246 R12: 00005605dbc00be0
    R13: 00007ffc3c4bb650 R14: 0000000000000000 R15: 0000000000000000
     </TASK>
    
    Fixes: 8e04ce45a8db ("mptcp: fix MSG_PEEK stream corruption")
    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]>

 
net/ipv6: ioam6: prevent schema length wraparound in trace fill [+ + +]
Author: Pengpeng Hou <[email protected]>
Date:   Wed Mar 25 15:41:52 2026 +0800

    net/ipv6: ioam6: prevent schema length wraparound in trace fill
    
    [ Upstream commit 5e67ba9bb531e1ec6599a82a065dea9040b9ce50 ]
    
    ioam6_fill_trace_data() stores the schema contribution to the trace
    length in a u8. With bit 22 enabled and the largest schema payload,
    sclen becomes 1 + 1020 / 4, wraps from 256 to 0, and bypasses the
    remaining-space check. __ioam6_fill_trace_data() then positions the
    write cursor without reserving the schema area but still copies the
    4-byte schema header and the full schema payload, overrunning the trace
    buffer.
    
    Keep sclen in an unsigned int so the remaining-space check and the write
    cursor calculation both see the full schema length.
    
    Fixes: 8c6f6fa67726 ("ipv6: ioam: IOAM Generic Netlink API")
    Signed-off-by: Pengpeng Hou <[email protected]>
    Reviewed-by: Justin Iurman <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/mlx5: Avoid "No data available" when FW version queries fail [+ + +]
Author: Saeed Mahameed <[email protected]>
Date:   Mon Mar 30 22:40:14 2026 +0300

    net/mlx5: Avoid "No data available" when FW version queries fail
    
    [ Upstream commit 10dc35f6a443d488f219d1a1e3fb8f8dac422070 ]
    
    Avoid printing the misleading "kernel answers: No data available" devlink
    output when querying firmware or pending firmware version fails
    (e.g. MLX5 fw state errors / flash failures).
    
    FW can fail on loading the pending flash image and get its version due
    to various reasons, examples:
    
    mlxfw: Firmware flash failed: key not applicable, err (7)
    mlx5_fw_image_pending: can't read pending fw version while fw state is 1
    
    and the resulting:
    $ devlink dev info
    kernel answers: No data available
    
    Instead, just report 0 or 0xfff.. versions in case of failure to indicate
    a problem, and let other information be shown.
    
    after the fix:
    $ devlink dev info
    pci/0000:00:06.0:
      driver mlx5_core
      serial_number xxx...
      board.serial_number MT2225300179
      versions:
          fixed:
            fw.psid MT_0000000436
          running:
            fw.version 22.41.0188
            fw 22.41.0188
          stored:
            fw.version 255.255.65535
            fw 255.255.65535
    
    Fixes: 9c86b07e3069 ("net/mlx5: Added fw version query command")
    Signed-off-by: Saeed Mahameed <[email protected]>
    Reviewed-by: Moshe Shemesh <[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/mlx5: Fix switchdev mode rollback in case of failure [+ + +]
Author: Saeed Mahameed <[email protected]>
Date:   Mon Mar 30 22:40:15 2026 +0300

    net/mlx5: Fix switchdev mode rollback in case of failure
    
    [ Upstream commit 403186400a1a6166efe7031edc549c15fee4723f ]
    
    If for some internal reason switchdev mode fails, we rollback to legacy
    mode, before this patch, rollback will unregister the uplink netdev and
    leave it unregistered causing the below kernel bug.
    
    To fix this, we need to avoid netdev unregister by setting the proper
    rollback flag 'MLX5_PRIV_FLAGS_SWITCH_LEGACY' to indicate legacy mode.
    
    devlink (431) used greatest stack depth: 11048 bytes left
    mlx5_core 0000:00:03.0: E-Switch: Disable: mode(LEGACY), nvfs(0), \
            necvfs(0), active vports(0)
    mlx5_core 0000:00:03.0: E-Switch: Supported tc chains and prios offload
    mlx5_core 0000:00:03.0: Loading uplink representor for vport 65535
    mlx5_core 0000:00:03.0: mlx5_cmd_out_err:816:(pid 456): \
            QUERY_HCA_CAP(0x100) op_mod(0x0) failed, \
            status bad parameter(0x3), syndrome (0x3a3846), err(-22)
    mlx5_core 0000:00:03.0 enp0s3np0 (unregistered): Unloading uplink \
            representor for vport 65535
     ------------[ cut here ]------------
    kernel BUG at net/core/dev.c:12070!
    Oops: invalid opcode: 0000 [#1] SMP NOPTI
    CPU: 2 UID: 0 PID: 456 Comm: devlink Not tainted 6.16.0-rc3+ \
            #9 PREEMPT(voluntary)
    RIP: 0010:unregister_netdevice_many_notify+0x123/0xae0
    ...
    Call Trace:
    [   90.923094]  unregister_netdevice_queue+0xad/0xf0
    [   90.923323]  unregister_netdev+0x1c/0x40
    [   90.923522]  mlx5e_vport_rep_unload+0x61/0xc6
    [   90.923736]  esw_offloads_enable+0x8e6/0x920
    [   90.923947]  mlx5_eswitch_enable_locked+0x349/0x430
    [   90.924182]  ? is_mp_supported+0x57/0xb0
    [   90.924376]  mlx5_devlink_eswitch_mode_set+0x167/0x350
    [   90.924628]  devlink_nl_eswitch_set_doit+0x6f/0xf0
    [   90.924862]  genl_family_rcv_msg_doit+0xe8/0x140
    [   90.925088]  genl_rcv_msg+0x18b/0x290
    [   90.925269]  ? __pfx_devlink_nl_pre_doit+0x10/0x10
    [   90.925506]  ? __pfx_devlink_nl_eswitch_set_doit+0x10/0x10
    [   90.925766]  ? __pfx_devlink_nl_post_doit+0x10/0x10
    [   90.926001]  ? __pfx_genl_rcv_msg+0x10/0x10
    [   90.926206]  netlink_rcv_skb+0x52/0x100
    [   90.926393]  genl_rcv+0x28/0x40
    [   90.926557]  netlink_unicast+0x27d/0x3d0
    [   90.926749]  netlink_sendmsg+0x1f7/0x430
    [   90.926942]  __sys_sendto+0x213/0x220
    [   90.927127]  ? __sys_recvmsg+0x6a/0xd0
    [   90.927312]  __x64_sys_sendto+0x24/0x30
    [   90.927504]  do_syscall_64+0x50/0x1c0
    [   90.927687]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
    [   90.927929] RIP: 0033:0x7f7d0363e047
    
    Fixes: 2a4f56fbcc47 ("net/mlx5e: Keep netdev when leave switchdev for devlink set legacy only")
    Signed-off-by: Saeed Mahameed <[email protected]>
    Reviewed-by: Jianbo Liu <[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/mlx5: lag: Check for LAG device before creating debugfs [+ + +]
Author: Shay Drory <[email protected]>
Date:   Mon Mar 30 22:40:13 2026 +0300

    net/mlx5: lag: Check for LAG device before creating debugfs
    
    [ Upstream commit bf16bca6653679d8a514d6c1c5a2c67065033f14 ]
    
    __mlx5_lag_dev_add_mdev() may return 0 (success) even when an error
    occurs that is handled gracefully. Consequently, the initialization
    flow proceeds to call mlx5_ldev_add_debugfs() even when there is no
    valid LAG context.
    
    mlx5_ldev_add_debugfs() blindly created the debugfs directory and
    attributes. This exposed interfaces (like the members file) that rely on
    a valid ldev pointer, leading to potential NULL pointer dereferences if
    accessed when ldev is NULL.
    
    Add a check to verify that mlx5_lag_dev(dev) returns a valid pointer
    before attempting to create the debugfs entries.
    
    Fixes: 7f46a0b7327a ("net/mlx5: Lag, add debugfs to query hardware lag state")
    Signed-off-by: Shay Drory <[email protected]>
    Reviewed-by: Mark Bloch <[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/sched: cls_flow: fix NULL pointer dereference on shared blocks [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Mon Mar 30 22:02:16 2026 -0700

    net/sched: cls_flow: fix NULL pointer dereference on shared blocks
    
    [ Upstream commit 1a280dd4bd1d616a01d6ffe0de284c907b555504 ]
    
    flow_change() calls tcf_block_q() and dereferences q->handle to derive
    a default baseclass.  Shared blocks leave block->q NULL, causing a NULL
    deref when a flow filter without a fully qualified baseclass is created
    on a shared block.
    
    Check tcf_block_shared() before accessing block->q and return -EINVAL
    for shared blocks.  This avoids the null-deref shown below:
    
    =======================================================================
    KASAN: null-ptr-deref in range [0x0000000000000038-0x000000000000003f]
    RIP: 0010:flow_change (net/sched/cls_flow.c:508)
    Call Trace:
     tc_new_tfilter (net/sched/cls_api.c:2432)
     rtnetlink_rcv_msg (net/core/rtnetlink.c:6980)
     [...]
    =======================================================================
    
    Fixes: 1abf272022cf ("net: sched: tcindex, fw, flow: use tcf_block_q helper to get struct Qdisc")
    Reported-by: Weiming Shi <[email protected]>
    Signed-off-by: Xiang Mei <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net/sched: cls_fw: fix NULL pointer dereference on shared blocks [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Mon Mar 30 22:02:15 2026 -0700

    net/sched: cls_fw: fix NULL pointer dereference on shared blocks
    
    [ Upstream commit faeea8bbf6e958bf3c00cb08263109661975987c ]
    
    The old-method path in fw_classify() calls tcf_block_q() and
    dereferences q->handle.  Shared blocks leave block->q NULL, causing a
    NULL deref when an empty cls_fw filter is attached to a shared block
    and a packet with a nonzero major skb mark is classified.
    
    Reject the configuration in fw_change() when the old method (no
    TCA_OPTIONS) is used on a shared block, since fw_classify()'s
    old-method path needs block->q which is NULL for shared blocks.
    
    The fixed null-ptr-deref calling stack:
     KASAN: null-ptr-deref in range [0x0000000000000038-0x000000000000003f]
     RIP: 0010:fw_classify (net/sched/cls_fw.c:81)
     Call Trace:
      tcf_classify (./include/net/tc_wrapper.h:197 net/sched/cls_api.c:1764 net/sched/cls_api.c:1860)
      tc_run (net/core/dev.c:4401)
      __dev_queue_xmit (net/core/dev.c:4535 net/core/dev.c:4790)
    
    Fixes: 1abf272022cf ("net: sched: tcindex, fw, flow: use tcf_block_q helper to get struct Qdisc")
    Reported-by: Weiming Shi <[email protected]>
    Signed-off-by: Xiang Mei <[email protected]>
    Acked-by: Jamal Hadi Salim <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net/sched: sch_hfsc: fix divide-by-zero in rtsc_min() [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Thu Mar 26 13:43:09 2026 -0700

    net/sched: sch_hfsc: fix divide-by-zero in rtsc_min()
    
    [ Upstream commit 4576100b8cd03118267513cafacde164b498b322 ]
    
    m2sm() converts a u32 slope to a u64 scaled value.  For large inputs
    (e.g. m1=4000000000), the result can reach 2^32.  rtsc_min() stores
    the difference of two such u64 values in a u32 variable `dsm` and
    uses it as a divisor.  When the difference is exactly 2^32 the
    truncation yields zero, causing a divide-by-zero oops in the
    concave-curve intersection path:
    
      Oops: divide error: 0000
      RIP: 0010:rtsc_min (net/sched/sch_hfsc.c:601)
      Call Trace:
       init_ed (net/sched/sch_hfsc.c:629)
       hfsc_enqueue (net/sched/sch_hfsc.c:1569)
       [...]
    
    Widen `dsm` to u64 and replace do_div() with div64_u64() so the full
    difference is preserved.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: Weiming Shi <[email protected]>
    Signed-off-by: Xiang Mei <[email protected]>
    Acked-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/sched: sch_netem: fix out-of-bounds access in packet corruption [+ + +]
Author: Yucheng Lu <[email protected]>
Date:   Tue Mar 31 16:00:21 2026 +0800

    net/sched: sch_netem: fix out-of-bounds access in packet corruption
    
    [ Upstream commit d64cb81dcbd54927515a7f65e5e24affdc73c14b ]
    
    In netem_enqueue(), the packet corruption logic uses
    get_random_u32_below(skb_headlen(skb)) to select an index for
    modifying skb->data. When an AF_PACKET TX_RING sends fully non-linear
    packets over an IPIP tunnel, skb_headlen(skb) evaluates to 0.
    
    Passing 0 to get_random_u32_below() takes the variable-ceil slow path
    which returns an unconstrained 32-bit random integer. Using this
    unconstrained value as an offset into skb->data results in an
    out-of-bounds memory access.
    
    Fix this by verifying skb_headlen(skb) is non-zero before attempting
    to corrupt the linear data area. Fully non-linear packets will silently
    bypass the corruption logic.
    
    Fixes: c865e5d99e25 ("[PKT_SCHED] netem: packet corruption option")
    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: Yuhang Zheng <[email protected]>
    Signed-off-by: Yucheng Lu <[email protected]>
    Reviewed-by: Stephen Hemminger <[email protected]>
    Link: https://patch.msgid.link/45435c0935df877853a81e6d06205ac738ec65fa.1774941614.git.kanolyc@gmail.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/x25: Fix overflow when accumulating packets [+ + +]
Author: Martin Schiller <[email protected]>
Date:   Tue Mar 31 09:43:18 2026 +0200

    net/x25: Fix overflow when accumulating packets
    
    [ Upstream commit a1822cb524e89b4cd2cf0b82e484a2335496a6d9 ]
    
    Add a check to ensure that `x25_sock.fraglen` does not overflow.
    
    The `fraglen` also needs to be resetted when purging `fragment_queue` in
    `x25_clear_queues()`.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Suggested-by: Yiming Qian <[email protected]>
    Signed-off-by: Martin Schiller <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net/x25: Fix potential double free of skb [+ + +]
Author: Martin Schiller <[email protected]>
Date:   Tue Mar 31 09:43:17 2026 +0200

    net/x25: Fix potential double free of skb
    
    [ Upstream commit d10a26aa4d072320530e6968ef945c8c575edf61 ]
    
    When alloc_skb fails in x25_queue_rx_frame it calls kfree_skb(skb) at
    line 48 and returns 1 (error).
    This error propagates back through the call chain:
    
    x25_queue_rx_frame returns 1
        |
        v
    x25_state3_machine receives the return value 1 and takes the else
    branch at line 278, setting queued=0 and returning 0
        |
        v
    x25_process_rx_frame returns queued=0
        |
        v
    x25_backlog_rcv at line 452 sees queued=0 and calls kfree_skb(skb)
    again
    
    This would free the same skb twice. Looking at x25_backlog_rcv:
    
    net/x25/x25_in.c:x25_backlog_rcv() {
        ...
        queued = x25_process_rx_frame(sk, skb);
        ...
        if (!queued)
            kfree_skb(skb);
    }
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Martin Schiller <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net: airoha: Add missing cleanup bits in airoha_qdma_cleanup_rx_queue() [+ + +]
Author: Lorenzo Bianconi <[email protected]>
Date:   Fri Mar 27 10:48:21 2026 +0100

    net: airoha: Add missing cleanup bits in airoha_qdma_cleanup_rx_queue()
    
    [ Upstream commit 514aac3599879a7ed48b7dc19e31145beb6958ac ]
    
    In order to properly cleanup hw rx QDMA queues and bring the device to
    the initial state, reset rx DMA queue head/tail index. Moreover, reset
    queued DMA descriptor fields.
    
    Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC")
    Tested-by: Madhur Agrawal <[email protected]>
    Signed-off-by: Lorenzo Bianconi <[email protected]>
    Link: https://patch.msgid.link/20260327-airoha_qdma_cleanup_rx_queue-fix-v1-1-369d6ab1511a@kernel.org
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: bonding: fix use-after-free in bond_xmit_broadcast() [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Thu Mar 26 00:55:53 2026 -0700

    net: bonding: fix use-after-free in bond_xmit_broadcast()
    
    [ Upstream commit 2884bf72fb8f03409e423397319205de48adca16 ]
    
    bond_xmit_broadcast() reuses the original skb for the last slave
    (determined by bond_is_last_slave()) and clones it for others.
    Concurrent slave enslave/release can mutate the slave list during
    RCU-protected iteration, changing which slave is "last" mid-loop.
    This causes the original skb to be double-consumed (double-freed).
    
    Replace the racy bond_is_last_slave() check with a simple index
    comparison (i + 1 == slaves_count) against the pre-snapshot slave
    count taken via READ_ONCE() before the loop.  This preserves the
    zero-copy optimization for the last slave while making the "last"
    determination stable against concurrent list mutations.
    
    The UAF can trigger the following crash:
    
    ==================================================================
    BUG: KASAN: slab-use-after-free in skb_clone
    Read of size 8 at addr ffff888100ef8d40 by task exploit/147
    
    CPU: 1 UID: 0 PID: 147 Comm: exploit Not tainted 7.0.0-rc3+ #4 PREEMPTLAZY
    Call Trace:
     <TASK>
     dump_stack_lvl (lib/dump_stack.c:123)
     print_report (mm/kasan/report.c:379 mm/kasan/report.c:482)
     kasan_report (mm/kasan/report.c:597)
     skb_clone (include/linux/skbuff.h:1724 include/linux/skbuff.h:1792 include/linux/skbuff.h:3396 net/core/skbuff.c:2108)
     bond_xmit_broadcast (drivers/net/bonding/bond_main.c:5334)
     bond_start_xmit (drivers/net/bonding/bond_main.c:5567 drivers/net/bonding/bond_main.c:5593)
     dev_hard_start_xmit (include/linux/netdevice.h:5325 include/linux/netdevice.h:5334 net/core/dev.c:3871 net/core/dev.c:3887)
     __dev_queue_xmit (include/linux/netdevice.h:3601 net/core/dev.c:4838)
     ip6_finish_output2 (include/net/neighbour.h:540 include/net/neighbour.h:554 net/ipv6/ip6_output.c:136)
     ip6_finish_output (net/ipv6/ip6_output.c:208 net/ipv6/ip6_output.c:219)
     ip6_output (net/ipv6/ip6_output.c:250)
     ip6_send_skb (net/ipv6/ip6_output.c:1985)
     udp_v6_send_skb (net/ipv6/udp.c:1442)
     udpv6_sendmsg (net/ipv6/udp.c:1733)
     __sys_sendto (net/socket.c:730 net/socket.c:742 net/socket.c:2206)
     __x64_sys_sendto (net/socket.c:2209)
     do_syscall_64 (arch/x86/entry/syscall_64.c:63 arch/x86/entry/syscall_64.c:94)
     entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:130)
     </TASK>
    
    Allocated by task 147:
    
    Freed by task 147:
    
    The buggy address belongs to the object at ffff888100ef8c80
     which belongs to the cache skbuff_head_cache of size 224
    The buggy address is located 192 bytes inside of
     freed 224-byte region [ffff888100ef8c80, ffff888100ef8d60)
    
    Memory state around the buggy address:
     ffff888100ef8c00: fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
     ffff888100ef8c80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    >ffff888100ef8d00: fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
                                                        ^
     ffff888100ef8d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb
     ffff888100ef8e00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    ==================================================================
    
    Fixes: 4e5bd03ae346 ("net: bonding: fix bond_xmit_broadcast return value error bug")
    Reported-by: Weiming Shi <[email protected]>
    Signed-off-by: Xiang Mei <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: correctly handle tunneled traffic on IPV6_CSUM GSO fallback [+ + +]
Author: Willem de Bruijn <[email protected]>
Date:   Tue Mar 31 12:30:43 2026 -0400

    net: correctly handle tunneled traffic on IPV6_CSUM GSO fallback
    
    [ Upstream commit c4336a07eb6b2526dc2b62928b5104b41a7f81f5 ]
    
    NETIF_F_IPV6_CSUM only advertises support for checksum offload of
    packets without IPv6 extension headers. Packets with extension
    headers must fall back onto software checksumming. Since TSO
    depends on checksum offload, those must revert to GSO.
    
    The below commit introduces that fallback. It always checks
    network header length. For tunneled packets, the inner header length
    must be checked instead. Extend the check accordingly.
    
    A special case is tunneled packets without inner IP protocol. Such as
    RFC 6951 SCTP in UDP. Those are not standard IPv6 followed by
    transport header either, so also must revert to the software GSO path.
    
    Cc: [email protected]
    Fixes: 864e3396976e ("net: gso: Forbid IPv6 TSO with extensions on devices with only IPV6_CSUM")
    Reported-by: Tangxin Xie <[email protected]>
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Suggested-by: Paolo Abeni <[email protected]>
    Signed-off-by: Willem de Bruijn <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: enetc: check whether the RSS algorithm is Toeplitz [+ + +]
Author: Wei Fang <[email protected]>
Date:   Thu Mar 26 15:52:32 2026 +0800

    net: enetc: check whether the RSS algorithm is Toeplitz
    
    [ Upstream commit d389954a6cae7bf76b7b082ac3511d177b77ef2d ]
    
    Both ENETC v1 and v4 only provide Toeplitz RSS support. This patch adds
    a validation check to reject attempts to configure other RSS algorithms,
    avoiding misleading configuration options for users.
    
    Fixes: d382563f541b ("enetc: Add RFS and RSS support")
    Signed-off-by: Wei Fang <[email protected]>
    Reviewed-by: Clark Wang <[email protected]>
    Reviewed-by: Claudiu Manoil <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: enetc: do not allow VF to configure the RSS key [+ + +]
Author: Wei Fang <[email protected]>
Date:   Thu Mar 26 15:52:33 2026 +0800

    net: enetc: do not allow VF to configure the RSS key
    
    [ Upstream commit a142d139168cce8d5776245b5494c7f7f5d7fb7d ]
    
    VFs do not have privilege to configure the RSS key because the registers
    are owned by the PF. Currently, if VF attempts to configure the RSS key,
    enetc_set_rxfh() simply skips the configuration and does not generate a
    warning, which may mislead users into thinking the feature is supported.
    To improve this situation, add a check to reject RSS key configuration
    on VFs.
    
    Fixes: d382563f541b ("enetc: Add RFS and RSS support")
    Signed-off-by: Wei Fang <[email protected]>
    Reviewed-by: Clark Wang <[email protected]>
    Reviewed-by: Claudiu Manoil <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: enetc: reset PIR and CIR if they are not equal when initializing TX ring [+ + +]
Author: Wei Fang <[email protected]>
Date:   Tue Mar 24 14:21:19 2026 +0800

    net: enetc: reset PIR and CIR if they are not equal when initializing TX ring
    
    [ Upstream commit 0239fd701d33475a39428daa3dc627407cd417a6 ]
    
    Currently the driver does not reset the producer index register (PIR) and
    consumer index register (CIR) when initializing a TX BD ring. The driver
    only reads the PIR and CIR and initializes the software indexes. If the
    TX BD ring is reinitialized when it still contains unsent frames, its PIR
    and CIR will not be equal after the reinitialization. However, the BDs
    between CIR and PIR have been freed and become invalid and this can lead
    to a hardware malfunction, causing the TX BD ring will not work properly.
    
    For ENETC v4, it supports software to set the PIR and CIR, so the driver
    can reset these two registers if they are not equal when reinitializing
    the TX BD ring. Therefore, add this solution for ENETC v4. Note that this
    patch does not work for ENETC v1 because it does not support software to
    set the PIR and CIR.
    
    Fixes: 99100d0d9922 ("net: enetc: add preliminary support for i.MX95 ENETC PF")
    Signed-off-by: Wei Fang <[email protected]>
    Reviewed-by: Claudiu Manoil <[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: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled [+ + +]
Author: Sven Eckelmann (Plasma Cloud) <[email protected]>
Date:   Tue Mar 24 09:36:01 2026 +0100

    net: ethernet: mtk_ppe: avoid NULL deref when gmac0 is disabled
    
    commit 976ff48c2ac6e6b25b01428c9d7997bcd0fb2949 upstream.
    
    If the gmac0 is disabled, the precheck for a valid ingress device will
    cause a NULL pointer deref and crash the system. This happens because
    eth->netdev[0] will be NULL but the code will directly try to access
    netdev_ops.
    
    Instead of just checking for the first net_device, it must be checked if
    any of the mtk_eth net_devices is matching the netdev_ops of the ingress
    device.
    
    Cc: [email protected]
    Fixes: 73cfd947dbdb ("net: ethernet: mtk_eth_soc: ppe: prevent ppe update for non-mtk devices")
    Signed-off-by: Sven Eckelmann (Plasma Cloud) <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/20260324-wed-crash-gmac0-disabled-v1-1-3bc388aee565@simonwunderlich.de
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: fec: fix the PTP periodic output sysfs interface [+ + +]
Author: Buday Csaba <[email protected]>
Date:   Tue Mar 24 14:32:30 2026 +0100

    net: fec: fix the PTP periodic output sysfs interface
    
    [ Upstream commit e8e44c98f789dee45cfd24ffb9d4936e0606d7c6 ]
    
    When the PPS channel configuration was implemented, the channel
    index for the periodic outputs was configured as the hardware
    channel number.
    
    The sysfs interface uses a logical channel index, and rejects numbers
    greater than `n_per_out` (see period_store() in ptp_sysfs.c).
    That property was left at 1, since the driver implements channel
    selection, not simultaneous operation of multiple PTP hardware timer
    channels.
    
    A second check in fec_ptp_enable() returns -EOPNOTSUPP when the two
    channel numbers disagree, making channels 1..3 unusable from sysfs.
    
    Fix by removing this redundant check in the FEC PTP driver.
    
    Fixes: 566c2d83887f ("net: fec: make PPS channel configurable")
    Signed-off-by: Buday Csaba <[email protected]>
    Link: https://patch.msgid.link/8ec2afe88423c2231f9cf8044d212ce57846670e.1774359059.git.buday.csaba@prolan.hu
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: ftgmac100: fix ring allocation unwind on open failure [+ + +]
Author: Yufan Chen <[email protected]>
Date:   Sun Mar 29 00:32:57 2026 +0800

    net: ftgmac100: fix ring allocation unwind on open failure
    
    commit c0fd0fe745f5e8c568d898cd1513d0083e46204a upstream.
    
    ftgmac100_alloc_rings() allocates rx_skbs, tx_skbs, rxdes, txdes, and
    rx_scratch in stages. On intermediate failures it returned -ENOMEM
    directly, leaking resources allocated earlier in the function.
    
    Rework the failure path to use staged local unwind labels and free
    allocated resources in reverse order before returning -ENOMEM. This
    matches common netdev allocation cleanup style.
    
    Fixes: d72e01a0430f ("ftgmac100: Use a scratch buffer for failed RX allocations")
    Cc: [email protected]
    Signed-off-by: Yufan Chen <[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: hsr: fix VLAN add unwind on slave errors [+ + +]
Author: Luka Gejak <[email protected]>
Date:   Wed Apr 1 11:22:43 2026 +0200

    net: hsr: fix VLAN add unwind on slave errors
    
    [ Upstream commit 2e3514e63bfb0e972b1f19668547a455d0129e88 ]
    
    When vlan_vid_add() fails for a secondary slave, the error path calls
    vlan_vid_del() on the failing port instead of the peer slave that had
    already succeeded. This results in asymmetric VLAN state across the HSR
    pair.
    
    Fix this by switching to a centralized unwind path that removes the VID
    from any slave device that was already programmed.
    
    Fixes: 1a8a63a5305e ("net: hsr: Add VLAN CTAG filter support")
    Signed-off-by: Luka Gejak <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: introduce mangleid_features [+ + +]
Author: Paolo Abeni <[email protected]>
Date:   Wed Jan 21 17:11:27 2026 +0100

    net: introduce mangleid_features
    
    [ Upstream commit 31c5a71d982b57df75858974634c2f0a338f2fc6 ]
    
    Some/most devices implementing gso_partial need to disable the GSO partial
    features when the IP ID can't be mangled; to that extend each of them
    implements something alike the following[1]:
    
            if (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID))
                    features &= ~NETIF_F_TSO;
    
    in the ndo_features_check() op, which leads to a bit of duplicate code.
    
    Later patch in the series will implement GSO partial support for virtual
    devices, and the current status quo will require more duplicate code and
    a new indirect call in the TX path for them.
    
    Introduce the mangleid_features mask, allowing the core to disable NIC
    features based on/requiring MANGLEID, without any further intervention
    from the driver.
    
    The same functionality could be alternatively implemented adding a single
    boolean flag to the struct net_device, but would require an additional
    checks in ndo_features_check().
    
    Also note that [1] is incorrect if the NIC additionally implements
    NETIF_F_GSO_UDP_L4, mangleid_features transparently handle even such a
    case.
    
    Signed-off-by: Paolo Abeni <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://patch.msgid.link/5a7cdaeea40b0a29b88e525b6c942d73ed3b8ce7.1769011015.git.pabeni@redhat.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: ddc748a391dd ("net: use skb_header_pointer() for TCPv4 GSO frag_off check")
    Signed-off-by: Sasha Levin <[email protected]>

net: ipv6: flowlabel: defer exclusive option free until RCU teardown [+ + +]
Author: Zhengchuan Liang <[email protected]>
Date:   Mon Mar 30 16:46:24 2026 +0800

    net: ipv6: flowlabel: defer exclusive option free until RCU teardown
    
    [ Upstream commit 9ca562bb8e66978b53028fa32b1a190708e6a091 ]
    
    `ip6fl_seq_show()` walks the global flowlabel hash under the seq-file
    RCU read-side lock and prints `fl->opt->opt_nflen` when an option block
    is present.
    
    Exclusive flowlabels currently free `fl->opt` as soon as `fl->users`
    drops to zero in `fl_release()`. However, the surrounding
    `struct ip6_flowlabel` remains visible in the global hash table until
    later garbage collection removes it and `fl_free_rcu()` finally tears it
    down.
    
    A concurrent `/proc/net/ip6_flowlabel` reader can therefore race that
    early `kfree()` and dereference freed option state, triggering a crash
    in `ip6fl_seq_show()`.
    
    Fix this by keeping `fl->opt` alive until `fl_free_rcu()`. That matches
    the lifetime already required for the enclosing flowlabel while readers
    can still reach it under RCU.
    
    Fixes: d3aedd5ebd4b ("ipv6 flowlabel: Convert hash list to RCU.")
    Reported-by: Yifan Wu <[email protected]>
    Reported-by: Juefei Pu <[email protected]>
    Co-developed-by: Yuan Tan <[email protected]>
    Signed-off-by: Yuan Tan <[email protected]>
    Suggested-by: Xin Liu <[email protected]>
    Tested-by: Ren Wei <[email protected]>
    Signed-off-by: Zhengchuan Liang <[email protected]>
    Signed-off-by: Ren Wei <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://patch.msgid.link/07351f0ec47bcee289576f39f9354f4a64add6e4.1774855883.git.zcliangcn@gmail.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: ipv6: ndisc: fix ndisc_ra_useropt to initialize nduseropt_padX fields to zero to prevent an info-leak [+ + +]
Author: Yochai Eisenrich <[email protected]>
Date:   Wed Mar 25 00:49:25 2026 +0200

    net: ipv6: ndisc: fix ndisc_ra_useropt to initialize nduseropt_padX fields to zero to prevent an info-leak
    
    [ Upstream commit ae05340ccaa9d347fe85415609e075545bec589f ]
    
    When processing Router Advertisements with user options the kernel
    builds an RTM_NEWNDUSEROPT netlink message. The nduseroptmsg struct
    has three padding fields that are never zeroed and can leak kernel data
    
    The fix is simple, just zeroes the padding fields.
    
    Fixes: 31910575a9de ("[IPv6]: Export userland ND options through netlink (RDNSS support)")
    Signed-off-by: Yochai Eisenrich <[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: macb: fix clk handling on PCI glue driver removal [+ + +]
Author: Fedor Pchelkin <[email protected]>
Date:   Mon Mar 30 21:45:40 2026 +0300

    net: macb: fix clk handling on PCI glue driver removal
    
    [ Upstream commit ce8fe5287b87e24e225c342f3b0ec04f0b3680fe ]
    
    platform_device_unregister() may still want to use the registered clks
    during runtime resume callback.
    
    Note that there is a commit d82d5303c4c5 ("net: macb: fix use after free
    on rmmod") that addressed the similar problem of clk vs platform device
    unregistration but just moved the bug to another place.
    
    Save the pointers to clks into local variables for reuse after platform
    device is unregistered.
    
    BUG: KASAN: use-after-free in clk_prepare+0x5a/0x60
    Read of size 8 at addr ffff888104f85e00 by task modprobe/597
    
    CPU: 2 PID: 597 Comm: modprobe Not tainted 6.1.164+ #114
    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_lvl+0x8d/0xba
     print_report+0x17f/0x496
     kasan_report+0xd9/0x180
     clk_prepare+0x5a/0x60
     macb_runtime_resume+0x13d/0x410 [macb]
     pm_generic_runtime_resume+0x97/0xd0
     __rpm_callback+0xc8/0x4d0
     rpm_callback+0xf6/0x230
     rpm_resume+0xeeb/0x1a70
     __pm_runtime_resume+0xb4/0x170
     bus_remove_device+0x2e3/0x4b0
     device_del+0x5b3/0xdc0
     platform_device_del+0x4e/0x280
     platform_device_unregister+0x11/0x50
     pci_device_remove+0xae/0x210
     device_remove+0xcb/0x180
     device_release_driver_internal+0x529/0x770
     driver_detach+0xd4/0x1a0
     bus_remove_driver+0x135/0x260
     driver_unregister+0x72/0xb0
     pci_unregister_driver+0x26/0x220
     __do_sys_delete_module+0x32e/0x550
     do_syscall_64+0x35/0x80
     entry_SYSCALL_64_after_hwframe+0x6e/0xd8
     </TASK>
    
    Allocated by task 519:
     kasan_save_stack+0x2c/0x50
     kasan_set_track+0x21/0x30
     __kasan_kmalloc+0x8e/0x90
     __clk_register+0x458/0x2890
     clk_hw_register+0x1a/0x60
     __clk_hw_register_fixed_rate+0x255/0x410
     clk_register_fixed_rate+0x3c/0xa0
     macb_probe+0x1d8/0x42e [macb_pci]
     local_pci_probe+0xd7/0x190
     pci_device_probe+0x252/0x600
     really_probe+0x255/0x7f0
     __driver_probe_device+0x1ee/0x330
     driver_probe_device+0x4c/0x1f0
     __driver_attach+0x1df/0x4e0
     bus_for_each_dev+0x15d/0x1f0
     bus_add_driver+0x486/0x5e0
     driver_register+0x23a/0x3d0
     do_one_initcall+0xfd/0x4d0
     do_init_module+0x18b/0x5a0
     load_module+0x5663/0x7950
     __do_sys_finit_module+0x101/0x180
     do_syscall_64+0x35/0x80
     entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    
    Freed by task 597:
     kasan_save_stack+0x2c/0x50
     kasan_set_track+0x21/0x30
     kasan_save_free_info+0x2a/0x50
     __kasan_slab_free+0x106/0x180
     __kmem_cache_free+0xbc/0x320
     clk_unregister+0x6de/0x8d0
     macb_remove+0x73/0xc0 [macb_pci]
     pci_device_remove+0xae/0x210
     device_remove+0xcb/0x180
     device_release_driver_internal+0x529/0x770
     driver_detach+0xd4/0x1a0
     bus_remove_driver+0x135/0x260
     driver_unregister+0x72/0xb0
     pci_unregister_driver+0x26/0x220
     __do_sys_delete_module+0x32e/0x550
     do_syscall_64+0x35/0x80
     entry_SYSCALL_64_after_hwframe+0x6e/0xd8
    
    Fixes: d82d5303c4c5 ("net: macb: fix use after free on rmmod")
    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: properly unregister fixed rate clocks [+ + +]
Author: Fedor Pchelkin <[email protected]>
Date:   Mon Mar 30 21:45:41 2026 +0300

    net: macb: properly unregister fixed rate clocks
    
    [ Upstream commit f0f367a4f459cc8118aadc43c6bba53c60d93f8d ]
    
    The additional resources allocated with clk_register_fixed_rate() need
    to be released with clk_unregister_fixed_rate(), otherwise they are lost.
    
    Fixes: 83a77e9ec415 ("net: macb: Added PCI wrapper for Platform Driver.")
    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: mana: Fix RX skb truesize accounting [+ + +]
Author: Dipayaan Roy <[email protected]>
Date:   Tue Mar 24 11:14:28 2026 -0700

    net: mana: Fix RX skb truesize accounting
    
    [ Upstream commit f73896b4197ed53cf0894657c899265ef7c86b7a ]
    
    MANA passes rxq->alloc_size to napi_build_skb() for all RX buffers.
    It is correct for fragment-backed RX buffers, where alloc_size matches
    the actual backing allocation used for each packet buffer. However, in
    the non-fragment RX path mana allocates a full page, or a higher-order
    page, per RX buffer. In that case alloc_size only reflects the usable
    packet area and not the actual backing memory.
    
    This causes napi_build_skb() to underestimate the skb backing allocation
    in the single-buffer RX path, so skb->truesize is derived from a value
    smaller than the real RX buffer allocation.
    
    Fix this by updating alloc_size in the non-fragment RX path to the
    actual backing allocation size before it is passed to napi_build_skb().
    
    Fixes: 730ff06d3f5c ("net: mana: Use page pool fragments for RX buffers instead of full pages to improve memory efficiency.")
    Signed-off-by: Dipayaan Roy <[email protected]>
    Reviewed-by: Haiyang Zhang <[email protected]>
    Link: https://patch.msgid.link/acLUhLpLum6qrD/N@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: mana: fix use-after-free in add_adev() error path [+ + +]
Author: Guangshuo Li <[email protected]>
Date:   Tue Mar 31 12:30:38 2026 -0400

    net: mana: fix use-after-free in add_adev() error path
    
    [ Upstream commit c4ea7d8907cf72b259bf70bd8c2e791e1c4ff70f ]
    
    If auxiliary_device_add() fails, add_adev() jumps to add_fail and calls
    auxiliary_device_uninit(adev).
    
    The auxiliary device has its release callback set to adev_release(),
    which frees the containing struct mana_adev. Since adev is embedded in
    struct mana_adev, the subsequent fall-through to init_fail and access
    to adev->id may result in a use-after-free.
    
    Fix this by saving the allocated auxiliary device id in a local
    variable before calling auxiliary_device_add(), and use that saved id
    in the cleanup path after auxiliary_device_uninit().
    
    Fixes: a69839d4327d ("net: mana: Add support for auxiliary device")
    Cc: [email protected]
    Reviewed-by: Long Li <[email protected]>
    Signed-off-by: Guangshuo Li <[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: qrtr: replace qrtr_tx_flow radix_tree with xarray to fix memory leak [+ + +]
Author: Jiayuan Chen <[email protected]>
Date:   Tue Mar 24 16:06:44 2026 +0800

    net: qrtr: replace qrtr_tx_flow radix_tree with xarray to fix memory leak
    
    [ Upstream commit 2428083101f6883f979cceffa76cd8440751ffe6 ]
    
    __radix_tree_create() allocates and links intermediate nodes into the
    tree one by one. If a subsequent allocation fails, the already-linked
    nodes remain in the tree with no corresponding leaf entry. These orphaned
    internal nodes are never reclaimed because radix_tree_for_each_slot()
    only visits slots containing leaf values.
    
    The radix_tree API is deprecated in favor of xarray. As suggested by
    Matthew Wilcox, migrate qrtr_tx_flow from radix_tree to xarray instead
    of fixing the radix_tree itself [1]. xarray properly handles cleanup of
    internal nodes — xa_destroy() frees all internal xarray nodes when the
    qrtr_node is released, preventing the leak.
    
    [1] https://lore.kernel.org/all/[email protected]/T/
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/all/[email protected]/T/
    Fixes: 5fdeb0d372ab ("net: qrtr: Implement outgoing flow control")
    Signed-off-by: Jiayuan Chen <[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: sched: cls_api: fix tc_chain_fill_node to initialize tcm_info to zero to prevent an info-leak [+ + +]
Author: Yochai Eisenrich <[email protected]>
Date:   Sun Mar 29 00:14:36 2026 +0300

    net: sched: cls_api: fix tc_chain_fill_node to initialize tcm_info to zero to prevent an info-leak
    
    [ Upstream commit e6e3eb5ee89ac4c163d46429391c889a1bb5e404 ]
    
    When building netlink messages, tc_chain_fill_node() never initializes
    the tcm_info field of struct tcmsg. Since the allocation is not zeroed,
    kernel heap memory is leaked to userspace through this 4-byte field.
    
    The fix simply zeroes tcm_info alongside the other fields that are
    already initialized.
    
    Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi")
    Signed-off-by: Yochai Eisenrich <[email protected]>
    Acked-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: sfp: Fix Ubiquiti U-Fiber Instant SFP module on mvneta [+ + +]
Author: Marek Behún <[email protected]>
Date:   Thu Mar 26 13:20:38 2026 +0100

    net: sfp: Fix Ubiquiti U-Fiber Instant SFP module on mvneta
    
    [ Upstream commit eeee5a710f26ce57807024ef330fe5a850eaecd8 ]
    
    In commit 8110633db49d7de2 ("net: sfp-bus: allow SFP quirks to override
    Autoneg and pause bits") we moved the setting of Autoneg and pause bits
    before the call to SFP quirk when parsing SFP module support.
    
    Since the quirk for Ubiquiti U-Fiber Instant SFP module zeroes the
    support bits and sets 1000baseX_Full only, the above mentioned commit
    changed the overall computed support from
      1000baseX_Full, Autoneg, Pause, Asym_Pause
    to just
      1000baseX_Full.
    
    This broke the SFP module for mvneta, which requires Autoneg for
    1000baseX since commit c762b7fac1b249a9 ("net: mvneta: deny disabling
    autoneg for 802.3z modes").
    
    Fix this by setting back the Autoneg, Pause and Asym_Pause bits in the
    quirk.
    
    Fixes: 8110633db49d7de2 ("net: sfp-bus: allow SFP quirks to override Autoneg and pause bits")
    Signed-off-by: Marek Behún <[email protected]>
    Reviewed-by: Russell King (Oracle) <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: stmmac: skip VLAN restore when VLAN hash ops are missing [+ + +]
Author: Michal Piekos <[email protected]>
Date:   Sat Mar 28 09:55:51 2026 +0100

    net: stmmac: skip VLAN restore when VLAN hash ops are missing
    
    [ Upstream commit 48b3cd69265f346f64b93064723492da46206e9b ]
    
    stmmac_vlan_restore() unconditionally calls stmmac_vlan_update() when
    NETIF_F_VLAN_FEATURES is set. On platforms where priv->hw->vlan (or
    ->update_vlan_hash) is not provided, stmmac_update_vlan_hash() returns
    -EINVAL via stmmac_do_void_callback(), resulting in a spurious
    "Failed to restore VLANs" error even when no VLAN filtering is in use.
    
    Remove not needed comment.
    Remove not used return value from stmmac_vlan_restore().
    
    Tested on Orange Pi Zero 3.
    
    Fixes: bd7ad51253a7 ("net: stmmac: Fix VLAN HW state restore")
    Signed-off-by: Michal Piekos <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: use skb_header_pointer() for TCPv4 GSO frag_off check [+ + +]
Author: Guoyu Su <[email protected]>
Date:   Fri Mar 27 23:35:07 2026 +0800

    net: use skb_header_pointer() for TCPv4 GSO frag_off check
    
    [ Upstream commit ddc748a391dd8642ba6b2e4fe22e7f2ddf84b7f0 ]
    
    Syzbot reported a KMSAN uninit-value warning in gso_features_check()
    called from netif_skb_features() [1].
    
    gso_features_check() reads iph->frag_off to decide whether to clear
    mangleid_features. Accessing the IPv4 header via ip_hdr()/inner_ip_hdr()
    can rely on skb header offsets that are not always safe for direct
    dereference on packets injected from PF_PACKET paths.
    
    Use skb_header_pointer() for the TCPv4 frag_off check so the header read
    is robust whether data is already linear or needs copying.
    
    [1] https://syzkaller.appspot.com/bug?extid=1543a7d954d9c6d00407
    
    Link: https://lore.kernel.org/netdev/[email protected]/
    Fixes: cbc53e08a793 ("GSO: Add GSO type for fixed IPv4 ID")
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=1543a7d954d9c6d00407
    Tested-by: [email protected]
    Signed-off-by: Guoyu Su <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: xilinx: axienet: Correct BD length masks to match AXIDMA IP spec [+ + +]
Author: Suraj Gupta <[email protected]>
Date:   Fri Mar 27 13:02:37 2026 +0530

    net: xilinx: axienet: Correct BD length masks to match AXIDMA IP spec
    
    [ Upstream commit 393e0b4f178ec7fce1141dacc3304e3607a92ee9 ]
    
    The XAXIDMA_BD_CTRL_LENGTH_MASK and XAXIDMA_BD_STS_ACTUAL_LEN_MASK
    macros were defined as 0x007FFFFF (23 bits), but the AXI DMA IP
    product guide (PG021) specifies the buffer length field as bits 25:0
    (26 bits). Update both masks to match the IP documentation.
    
    In practice this had no functional impact, since Ethernet frames are
    far smaller than 2^23 bytes and the extra bits were always zero, but
    the masks should still reflect the hardware specification.
    
    Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
    Signed-off-by: Suraj Gupta <[email protected]>
    Reviewed-by: Sean Anderson <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: xilinx: axienet: Fix BQL accounting for multi-BD TX packets [+ + +]
Author: Suraj Gupta <[email protected]>
Date:   Fri Mar 27 13:02:38 2026 +0530

    net: xilinx: axienet: Fix BQL accounting for multi-BD TX packets
    
    [ Upstream commit d1978d03e86785872871bff9c2623174b10740de ]
    
    When a TX packet spans multiple buffer descriptors (scatter-gather),
    axienet_free_tx_chain sums the per-BD actual length from descriptor
    status into a caller-provided accumulator. That sum is reset on each
    NAPI poll. If the BDs for a single packet complete across different
    polls, the earlier bytes are lost and never credited to BQL. This
    causes BQL to think bytes are permanently in-flight, eventually
    stalling the TX queue.
    
    The SKB pointer is stored only on the last BD of a packet. When that
    BD completes, use skb->len for the byte count instead of summing
    per-BD status lengths. This matches netdev_sent_queue(), which debits
    skb->len, and naturally survives across polls because no partial
    packet contributes to the accumulator.
    
    Fixes: c900e49d58eb ("net: xilinx: axienet: Implement BQL")
    Signed-off-by: Suraj Gupta <[email protected]>
    Reviewed-by: Sean Anderson <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
netdevsim: fix build if SKB_EXTENSIONS=n [+ + +]
Author: Qingfang Deng <[email protected]>
Date:   Tue Mar 24 22:08:56 2026 +0800

    netdevsim: fix build if SKB_EXTENSIONS=n
    
    [ Upstream commit 57a04a13aac1f247d171c3f3aef93efc69e6979e ]
    
    __skb_ext_put() is not declared if SKB_EXTENSIONS is not enabled, which
    causes a build error:
    
    drivers/net/netdevsim/netdev.c: In function 'nsim_forward_skb':
    drivers/net/netdevsim/netdev.c:114:25: error: implicit declaration of function '__skb_ext_put'; did you mean 'skb_ext_put'? [-Werror=implicit-function-declaration]
      114 |                         __skb_ext_put(psp_ext);
          |                         ^~~~~~~~~~~~~
          |                         skb_ext_put
    cc1: some warnings being treated as errors
    
    Add a stub to fix the build.
    
    Fixes: 7d9351435ebb ("netdevsim: drop PSP ext ref on forward failure")
    Signed-off-by: Qingfang Deng <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
netfilter: ctnetlink: ignore explicit helper on new expectations [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Mon Mar 30 11:26:22 2026 +0200

    netfilter: ctnetlink: ignore explicit helper on new expectations
    
    [ Upstream commit 917b61fa2042f11e2af4c428e43f08199586633a ]
    
    Use the existing master conntrack helper, anything else is not really
    supported and it just makes validation more complicated, so just ignore
    what helper userspace suggests for this expectation.
    
    This was uncovered when validating CTA_EXPECT_CLASS via different helper
    provided by userspace than the existing master conntrack helper:
    
      BUG: KASAN: slab-out-of-bounds in nf_ct_expect_related_report+0x2479/0x27c0
      Read of size 4 at addr ffff8880043fe408 by task poc/102
      Call Trace:
       nf_ct_expect_related_report+0x2479/0x27c0
       ctnetlink_create_expect+0x22b/0x3b0
       ctnetlink_new_expect+0x4bd/0x5c0
       nfnetlink_rcv_msg+0x67a/0x950
       netlink_rcv_skb+0x120/0x350
    
    Allowing to read kernel memory bytes off the expectation boundary.
    
    CTA_EXPECT_HELP_NAME is still used to offer the helper name to userspace
    via netlink dump.
    
    Fixes: bd0779370588 ("netfilter: nfnetlink_queue: allow to attach expectations to conntracks")
    Reported-by: Qi Tang <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent [+ + +]
Author: Qi Tang <[email protected]>
Date:   Tue Mar 31 14:17:12 2026 +0800

    netfilter: ctnetlink: zero expect NAT fields when CTA_EXPECT_NAT absent
    
    [ Upstream commit 35177c6877134a21315f37d57a5577846225623e ]
    
    ctnetlink_alloc_expect() allocates expectations from a non-zeroing
    slab cache via nf_ct_expect_alloc().  When CTA_EXPECT_NAT is not
    present in the netlink message, saved_addr and saved_proto are
    never initialized.  Stale data from a previous slab occupant can
    then be dumped to userspace by ctnetlink_exp_dump_expect(), which
    checks these fields to decide whether to emit CTA_EXPECT_NAT.
    
    The safe sibling nf_ct_expect_init(), used by the packet path,
    explicitly zeroes these fields.
    
    Zero saved_addr, saved_proto and dir in the else branch, guarded
    by IS_ENABLED(CONFIG_NF_NAT) since these fields only exist when
    NAT is enabled.
    
    Confirmed by priming the expect slab with NAT-bearing expectations,
    freeing them, creating a new expectation without CTA_EXPECT_NAT,
    and observing that the ctnetlink dump emits a spurious
    CTA_EXPECT_NAT containing stale data from the prior allocation.
    
    Fixes: 076a0ca02644 ("netfilter: ctnetlink: add NAT support for expectations")
    Reported-by: kernel test robot <[email protected]>
    Signed-off-by: Qi Tang <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: flowtable: strictly check for maximum number of actions [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Thu Mar 26 00:17:09 2026 +0100

    netfilter: flowtable: strictly check for maximum number of actions
    
    [ Upstream commit 76522fcdbc3a02b568f5d957f7e66fc194abb893 ]
    
    The maximum number of flowtable hardware offload actions in IPv6 is:
    
    * ethernet mangling (4 payload actions, 2 for each ethernet address)
    * SNAT (4 payload actions)
    * DNAT (4 payload actions)
    * Double VLAN (4 vlan actions, 2 for popping vlan, and 2 for pushing)
      for QinQ.
    * Redirect (1 action)
    
    Which makes 17, while the maximum is 16. But act_ct supports for tunnels
    actions too. Note that payload action operates at 32-bit word level, so
    mangling an IPv6 address takes 4 payload actions.
    
    Update flow_action_entry_next() calls to check for the maximum number of
    supported actions.
    
    While at it, rise the maximum number of actions per flow from 16 to 24
    so this works fine with IPv6 setups.
    
    Fixes: c29f74e0df7a ("netfilter: nf_flow_table: hardware offload support")
    Reported-by: Hyunwoo Kim <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: ipset: drop logically empty buckets in mtype_del [+ + +]
Author: Yifan Wu <[email protected]>
Date:   Mon Mar 30 14:39:24 2026 -0700

    netfilter: ipset: drop logically empty buckets in mtype_del
    
    commit 9862ef9ab0a116c6dca98842aab7de13a252ae02 upstream.
    
    mtype_del() counts empty slots below n->pos in k, but it only drops the
    bucket when both n->pos and k are zero. This misses buckets whose live
    entries have all been removed while n->pos still points past deleted slots.
    
    Treat a bucket as empty when all positions below n->pos are unused and
    release it directly instead of shrinking it further.
    
    Fixes: 8af1c6fbd923 ("netfilter: ipset: Fix forceadd evaluation path")
    Cc: [email protected]
    Reported-by: Juefei Pu <[email protected]>
    Reported-by: Xin Liu <[email protected]>
    Signed-off-by: Yifan Wu <[email protected]>
    Co-developed-by: Yuan Tan <[email protected]>
    Signed-off-by: Yuan Tan <[email protected]>
    Reviewed-by: Phil Sutter <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Mon Mar 30 14:16:34 2026 +0200

    netfilter: ipset: use nla_strcmp for IPSET_ATTR_NAME attr
    
    [ Upstream commit b7e8590987aa94c9dc51518fad0e58cb887b1db5 ]
    
    IPSET_ATTR_NAME and IPSET_ATTR_NAMEREF are of NLA_STRING type, they
    cannot be treated like a c-string.
    
    They either have to be switched to NLA_NUL_STRING, or the compare
    operations need to use the nla functions.
    
    Fixes: f830837f0eed ("netfilter: ipset: list:set set type support")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_conntrack_expect: honor expectation helper field [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Wed Mar 25 14:11:02 2026 +0100

    netfilter: nf_conntrack_expect: honor expectation helper field
    
    [ Upstream commit 9c42bc9db90a154bc61ae337a070465f3393485a ]
    
    The expectation helper field is mostly unused. As a result, the
    netfilter codebase relies on accessing the helper through exp->master.
    
    Always set on the expectation helper field so it can be used to reach
    the helper.
    
    nf_ct_expect_init() is called from packet path where the skb owns
    the ct object, therefore accessing exp->master for the newly created
    expectation is safe. This saves a lot of updates in all callsites
    to pass the ct object as parameter to nf_ct_expect_init().
    
    This is a preparation patches for follow up fixes.
    
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: 917b61fa2042 ("netfilter: ctnetlink: ignore explicit helper on new expectations")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_conntrack_expect: store netns and zone in expectation [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Wed Mar 25 22:39:55 2026 +0100

    netfilter: nf_conntrack_expect: store netns and zone in expectation
    
    [ Upstream commit 02a3231b6d82efe750da6554ebf280e4a6f78756 ]
    
    __nf_ct_expect_find() and nf_ct_expect_find_get() are called under
    rcu_read_lock() but they dereference the master conntrack via
    exp->master.
    
    Since the expectation does not hold a reference on the master conntrack,
    this could be dying conntrack or different recycled conntrack than the
    real master due to SLAB_TYPESAFE_RCU.
    
    Store the netns, the master_tuple and the zone in struct
    nf_conntrack_expect as a safety measure.
    
    This patch is required by the follow up fix not to dump expectations
    that do not belong to this netns.
    
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: 917b61fa2042 ("netfilter: ctnetlink: ignore explicit helper on new expectations")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_conntrack_expect: use expect->helper [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Wed Mar 25 14:11:03 2026 +0100

    netfilter: nf_conntrack_expect: use expect->helper
    
    [ Upstream commit f01794106042ee27e54af6fdf5b319a2fe3df94d ]
    
    Use expect->helper in ctnetlink and /proc to dump the helper name.
    Using nfct_help() without holding a reference to the master conntrack
    is unsafe.
    
    Use exp->master->helper in ctnetlink path if userspace does not provide
    an explicit helper when creating an expectation to retain the existing
    behaviour. The ctnetlink expectation path holds the reference on the
    master conntrack and nf_conntrack_expect lock and the nfnetlink glue
    path refers to the master ct that is attached to the skb.
    
    Reported-by: Hyunwoo Kim <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Stable-dep-of: 917b61fa2042 ("netfilter: ctnetlink: ignore explicit helper on new expectations")
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_conntrack_helper: pass helper to expect cleanup [+ + +]
Author: Qi Tang <[email protected]>
Date:   Mon Mar 30 00:50:36 2026 +0800

    netfilter: nf_conntrack_helper: pass helper to expect cleanup
    
    [ Upstream commit a242a9ae58aa46ff7dae51ce64150a93957abe65 ]
    
    nf_conntrack_helper_unregister() calls nf_ct_expect_iterate_destroy()
    to remove expectations belonging to the helper being unregistered.
    However, it passes NULL instead of the helper pointer as the data
    argument, so expect_iter_me() never matches any expectation and all
    of them survive the cleanup.
    
    After unregister returns, nfnl_cthelper_del() frees the helper
    object immediately.  Subsequent expectation dumps or packet-driven
    init_conntrack() calls then dereference the freed exp->helper,
    causing a use-after-free.
    
    Pass the actual helper pointer so expectations referencing it are
    properly destroyed before the helper object is freed.
    
      BUG: KASAN: slab-use-after-free in string+0x38f/0x430
      Read of size 1 at addr ffff888003b14d20 by task poc/103
      Call Trace:
       string+0x38f/0x430
       vsnprintf+0x3cc/0x1170
       seq_printf+0x17a/0x240
       exp_seq_show+0x2e5/0x560
       seq_read_iter+0x419/0x1280
       proc_reg_read+0x1ac/0x270
       vfs_read+0x179/0x930
       ksys_read+0xef/0x1c0
      Freed by task 103:
      The buggy address is located 32 bytes inside of
       freed 192-byte region [ffff888003b14d00, ffff888003b14dc0)
    
    Fixes: ac7b84839003 ("netfilter: expect: add and use nf_ct_expect_iterate helpers")
    Signed-off-by: Qi Tang <[email protected]>
    Reviewed-by: Phil Sutter <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nf_tables: reject immediate NF_QUEUE verdict [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Tue Mar 31 23:08:02 2026 +0200

    netfilter: nf_tables: reject immediate NF_QUEUE verdict
    
    [ Upstream commit da107398cbd4bbdb6bffecb2ce86d5c9384f4cec ]
    
    nft_queue is always used from userspace nftables to deliver the NF_QUEUE
    verdict. Immediately emitting an NF_QUEUE verdict is never used by the
    userspace nft tools, so reject immediate NF_QUEUE verdicts.
    
    The arp family does not provide queue support, but such an immediate
    verdict is still reachable. Globally reject NF_QUEUE immediate verdicts
    to address this issue.
    
    Fixes: f342de4e2f33 ("netfilter: nf_tables: reject QUEUE/DROP verdict parameters")
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: nfnetlink_log: account for netlink header size [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Thu Mar 26 16:17:24 2026 +0100

    netfilter: nfnetlink_log: account for netlink header size
    
    [ Upstream commit 6d52a4a0520a6696bdde51caa11f2d6821cd0c01 ]
    
    This is a followup to an old bug fix: NLMSG_DONE needs to account
    for the netlink header size, not just the attribute size.
    
    This can result in a WARN splat + drop of the netlink message,
    but other than this there are no ill effects.
    
    Fixes: 9dfa1dfe4d5e ("netfilter: nf_log: account for size of NLMSG_DONE attribute")
    Reported-by: Yiming Qian <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: x_tables: ensure names are nul-terminated [+ + +]
Author: Florian Westphal <[email protected]>
Date:   Tue Mar 31 23:13:36 2026 +0200

    netfilter: x_tables: ensure names are nul-terminated
    
    [ Upstream commit a958a4f90ddd7de0800b33ca9d7b886b7d40f74e ]
    
    Reject names that lack a \0 character before feeding them
    to functions that expect c-strings.
    
    Fixes tag is the most recent commit that needs this change.
    
    Fixes: c38c4597e4bf ("netfilter: implement xt_cgroup cgroup2 path match")
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

netfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARP [+ + +]
Author: Pablo Neira Ayuso <[email protected]>
Date:   Tue Mar 31 16:41:25 2026 +0200

    netfilter: x_tables: restrict xt_check_match/xt_check_target extensions for NFPROTO_ARP
    
    [ Upstream commit 3d5d488f11776738deab9da336038add95d342d1 ]
    
    Weiming Shi says:
    
    xt_match and xt_target structs registered with NFPROTO_UNSPEC can be
    loaded by any protocol family through nft_compat. When such a
    match/target sets .hooks to restrict which hooks it may run on, the
    bitmask uses NF_INET_* constants. This is only correct for families
    whose hook layout matches NF_INET_*: IPv4, IPv6, INET, and bridge
    all share the same five hooks (PRE_ROUTING ... POST_ROUTING).
    
    ARP only has three hooks (IN=0, OUT=1, FORWARD=2) with different
    semantics. Because NF_ARP_OUT == 1 == NF_INET_LOCAL_IN, the .hooks
    validation silently passes for the wrong reasons, allowing matches to
    run on ARP chains where the hook assumptions (e.g. state->in being
    set on input hooks) do not hold. This leads to NULL pointer
    dereferences; xt_devgroup is one concrete example:
    
     Oops: general protection fault, probably for non-canonical address 0xdffffc0000000044: 0000 [#1] SMP KASAN NOPTI
     KASAN: null-ptr-deref in range [0x0000000000000220-0x0000000000000227]
     RIP: 0010:devgroup_mt+0xff/0x350
     Call Trace:
      <TASK>
      nft_match_eval (net/netfilter/nft_compat.c:407)
      nft_do_chain (net/netfilter/nf_tables_core.c:285)
      nft_do_chain_arp (net/netfilter/nft_chain_filter.c:61)
      nf_hook_slow (net/netfilter/core.c:623)
      arp_xmit (net/ipv4/arp.c:666)
      </TASK>
     Kernel panic - not syncing: Fatal exception in interrupt
    
    Fix it by restricting arptables to NFPROTO_ARP extensions only.
    Note that arptables-legacy only supports:
    
    - arpt_CLASSIFY
    - arpt_mangle
    - arpt_MARK
    
    that provide explicit NFPROTO_ARP match/target declarations.
    
    Fixes: 9291747f118d ("netfilter: xtables: add device group match")
    Reported-by: Xiang Mei <[email protected]>
    Signed-off-by: Florian Westphal <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFC: pn533: bound the UART receive buffer [+ + +]
Author: Pengpeng Hou <[email protected]>
Date:   Thu Mar 26 22:20:33 2026 +0800

    NFC: pn533: bound the UART receive buffer
    
    [ Upstream commit 30fe3f5f6494f827d812ff179f295a8e532709d6 ]
    
    pn532_receive_buf() appends every incoming byte to dev->recv_skb and
    only resets the buffer after pn532_uart_rx_is_frame() recognizes a
    complete frame. A continuous stream of bytes without a valid PN532 frame
    header therefore keeps growing the skb until skb_put_u8() hits the tail
    limit.
    
    Drop the accumulated partial frame once the fixed receive buffer is full
    so malformed UART traffic cannot grow the skb past
    PN532_UART_SKB_BUFF_LEN.
    
    Fixes: c656aa4c27b1 ("nfc: pn533: add UART phy driver")
    Signed-off-by: Pengpeng Hou <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
nvmem: imx: assign nvmem_cell_info::raw_len [+ + +]
Author: Christian Eggers <[email protected]>
Date:   Fri Mar 27 13:16:44 2026 +0000

    nvmem: imx: assign nvmem_cell_info::raw_len
    
    commit 48b5163c957548f5854f14c90bfdedc33afbea3c upstream.
    
    Avoid getting error messages at startup like the following on i.MX6ULL:
    
    nvmem imx-ocotp0: cell mac-addr raw len 6 unaligned to nvmem word size 4
    nvmem imx-ocotp0: cell mac-addr raw len 6 unaligned to nvmem word size 4
    
    This shouldn't cause any functional change as this alignment would
    otherwise be done in nvmem_cell_info_to_nvmem_cell_entry_nodup().
    
    Cc: [email protected]
    Fixes: 13bcd440f2ff ("nvmem: core: verify cell's raw_len")
    Signed-off-by: Christian Eggers <[email protected]>
    Signed-off-by: Fabio Estevam <[email protected]>
    Signed-off-by: Srinivas Kandagatla <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

nvmem: zynqmp_nvmem: Fix buffer size in DMA and memcpy [+ + +]
Author: Ivan Vera <[email protected]>
Date:   Fri Mar 27 13:16:45 2026 +0000

    nvmem: zynqmp_nvmem: Fix buffer size in DMA and memcpy
    
    commit f9b88613ff402aa6fe8fd020573cb95867ae947e upstream.
    
    Buffer size used in dma allocation and memcpy is wrong.
    It can lead to undersized DMA buffer access and possible
    memory corruption. use correct buffer size in dma_alloc_coherent
    and memcpy.
    
    Fixes: 737c0c8d07b5 ("nvmem: zynqmp_nvmem: Add support to access efuse")
    Cc: [email protected]
    Signed-off-by: Ivan Vera <[email protected]>
    Signed-off-by: Harish Ediga <[email protected]>
    Signed-off-by: Harsh Jain <[email protected]>
    Signed-off-by: Srinivas Kandagatla <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
objtool: Fix Clang jump table detection [+ + +]
Author: Josh Poimboeuf <[email protected]>
Date:   Mon Mar 9 09:03:05 2026 -0700

    objtool: Fix Clang jump table detection
    
    [ Upstream commit 4e5019216402ad0b4a84cff457b662d26803f103 ]
    
    With Clang, there can be a conditional forward jump between the load of
    the jump table address and the indirect branch.
    
    Fixes the following warning:
    
      vmlinux.o: warning: objtool: ___bpf_prog_run+0x1c5: sibling call from callable instruction with modified stack frame
    
    Reported-by: Arnd Bergmann <[email protected]>
    Closes: https://lore.kernel.org/[email protected]
    Link: https://patch.msgid.link/7d8600caed08901b6679767488acd639f6df9688.1773071992.git.jpoimboe@kernel.org
    Signed-off-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
perf/x86: Fix potential bad container_of in intel_pmu_hw_config [+ + +]
Author: Ian Rogers <[email protected]>
Date:   Thu Mar 12 12:43:05 2026 -0700

    perf/x86: Fix potential bad container_of in intel_pmu_hw_config
    
    [ Upstream commit dbde07f06226438cd2cf1179745fa1bec5d8914a ]
    
    Auto counter reload may have a group of events with software events
    present within it. The software event PMU isn't the x86_hybrid_pmu and
    a container_of operation in intel_pmu_set_acr_caused_constr (via the
    hybrid helper) could cause out of bound memory reads. Avoid this by
    guarding the call to intel_pmu_set_acr_caused_constr with an
    is_x86_event check.
    
    Fixes: ec980e4facef ("perf/x86/intel: Support auto counter reload")
    Signed-off-by: Ian Rogers <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Reviewed-by: Thomas Falcon <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
rds: ib: reject FRMR registration before IB connection is established [+ + +]
Author: Weiming Shi <[email protected]>
Date:   Tue Mar 31 00:32:38 2026 +0800

    rds: ib: reject FRMR registration before IB connection is established
    
    [ Upstream commit a54ecccfae62c5c85259ae5ea5d9c20009519049 ]
    
    rds_ib_get_mr() extracts the rds_ib_connection from conn->c_transport_data
    and passes it to rds_ib_reg_frmr() for FRWR memory registration. On a
    fresh outgoing connection, ic is allocated in rds_ib_conn_alloc() with
    i_cm_id = NULL because the connection worker has not yet called
    rds_ib_conn_path_connect() to create the rdma_cm_id. When sendmsg() with
    RDS_CMSG_RDMA_MAP is called on such a connection, the sendmsg path parses
    the control message before any connection establishment, allowing
    rds_ib_post_reg_frmr() to dereference ic->i_cm_id->qp and crash the
    kernel.
    
    The existing guard in rds_ib_reg_frmr() only checks for !ic (added in
    commit 9e630bcb7701), which does not catch this case since ic is allocated
    early and is always non-NULL once the connection object exists.
    
     KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
     RIP: 0010:rds_ib_post_reg_frmr+0x50e/0x920
     Call Trace:
      rds_ib_post_reg_frmr (net/rds/ib_frmr.c:167)
      rds_ib_map_frmr (net/rds/ib_frmr.c:252)
      rds_ib_reg_frmr (net/rds/ib_frmr.c:430)
      rds_ib_get_mr (net/rds/ib_rdma.c:615)
      __rds_rdma_map (net/rds/rdma.c:295)
      rds_cmsg_rdma_map (net/rds/rdma.c:860)
      rds_sendmsg (net/rds/send.c:1363)
      ____sys_sendmsg
      do_syscall_64
    
    Add a check in rds_ib_get_mr() that verifies ic, i_cm_id, and qp are all
    non-NULL before proceeding with FRMR registration, mirroring the guard
    already present in rds_ib_post_inv(). Return -ENODEV when the connection
    is not ready, which the existing error handling in rds_cmsg_send() converts
    to -EAGAIN for userspace retry and triggers rds_conn_connect_if_down() to
    start the connection worker.
    
    Fixes: 1659185fb4d0 ("RDS: IB: Support Fastreg MR (FRMR) memory registration mode")
    Reported-by: Xiang Mei <[email protected]>
    Signed-off-by: Weiming Shi <[email protected]>
    Reviewed-by: Allison Henderson <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Revert "drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug" [+ + +]
Author: Maarten Lankhorst <[email protected]>
Date:   Thu Mar 26 08:07:29 2026 +0100

    Revert "drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug"
    
    commit 45ebe43ea00d6b9f5b3e0db9c35b8ca2a96b7e70 upstream.
    
    This reverts commit 6bee098b91417654703e17eb5c1822c6dfd0c01d.
    
    Den 2026-03-25 kl. 22:11, skrev Simona Vetter:
    > On Wed, Mar 25, 2026 at 10:26:40AM -0700, Guenter Roeck wrote:
    >> Hi,
    >>
    >> On Fri, Mar 13, 2026 at 04:17:27PM +0100, Maarten Lankhorst wrote:
    >>> 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().
    >>>
    >>
    >> With this patch in v6.18.20, I get the warning backtraces below.
    >> The backtraces are gone with the patch reverted.
    >
    > Yeah, this needs to be reverted, reasoning below. Maarten, can you please
    > take care of that and feed the revert through the usual channels? I don't
    > think it's critical enough that we need to fast-track this into drm.git
    > directly.
    >
    > Quoting the patch here again:
    >
    >>  drivers/gpu/drm/drm_file.c        | 5 ++++-
    >>  drivers/gpu/drm/drm_mode_config.c | 9 ++++++---
    >>  2 files changed, 10 insertions(+), 4 deletions(-)
    >>
    >> diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
    >> index ec820686b3021..f52141f842a1f 100644
    >> --- a/drivers/gpu/drm/drm_file.c
    >> +++ b/drivers/gpu/drm/drm_file.c
    >> @@ -233,6 +233,7 @@ static void drm_events_release(struct drm_file *file_priv)
    >>  void drm_file_free(struct drm_file *file)
    >>  {
    >>      struct drm_device *dev;
    >> +    int idx;
    >>
    >>      if (!file)
    >>              return;
    >> @@ -249,9 +250,11 @@ void drm_file_free(struct drm_file *file)
    >>
    >>      drm_events_release(file);
    >>
    >> -    if (drm_core_check_feature(dev, DRIVER_MODESET)) {
    >> +    if (drm_core_check_feature(dev, DRIVER_MODESET) &&
    >> +        drm_dev_enter(dev, &idx)) {
    >
    > This is misplaced for two reasons:
    >
    > - Even if we'd want to guarantee that we hold a drm_dev_enter/exit
    >   reference during framebuffer teardown, we'd need to do this
    >   _consistently over all callsites. Not ad-hoc in just one place that a
    >   testcase hits. This also means kerneldoc updates of the relevant hooks
    >   and at least a bunch of acks from other driver people to document the
    >   consensus.
    >
    > - More importantly, this is driver responsibilities in general unless we
    >   have extremely good reasons to the contrary. Which means this must be
    >   placed in xe.
    >
    >>              drm_fb_release(file);
    >>              drm_property_destroy_user_blobs(dev, file);
    >> +            drm_dev_exit(idx);
    >>      }
    >>
    >>      if (drm_core_check_feature(dev, DRIVER_SYNCOBJ))
    >> diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
    >> index 84ae8a23a3678..e349418978f79 100644
    >> --- a/drivers/gpu/drm/drm_mode_config.c
    >> +++ b/drivers/gpu/drm/drm_mode_config.c
    >> @@ -583,10 +583,13 @@ void drm_mode_config_cleanup(struct drm_device *dev)
    >>       */
    >>      WARN_ON(!list_empty(&dev->mode_config.fb_list));
    >>      list_for_each_entry_safe(fb, fbt, &dev->mode_config.fb_list, head) {
    >> -            struct drm_printer p = drm_dbg_printer(dev, DRM_UT_KMS, "[leaked fb]");
    >> +            if (list_empty(&fb->filp_head) || drm_framebuffer_read_refcount(fb) > 1) {
    >> +                    struct drm_printer p = drm_dbg_printer(dev, DRM_UT_KMS, "[leaked fb]");
    >
    > This is also wrong:
    >
    > - Firstly, it's a completely independent bug, we do not smash two bugfixes
    >   into one patch.
    >
    > - Secondly, it's again a driver bug: drm_mode_cleanup must be called when
    >   the last drm_device reference disappears (hence the existence of
    >   drmm_mode_config_init), not when the driver gets unbound. The fact that
    >   this shows up in a callchain from a devres cleanup means the intel
    >   driver gets this wrong (like almost everyone else because historically
    >   we didn't know better).
    >
    >   If we don't follow this rule, then we get races with this code here
    >   running concurrently with drm_file fb cleanups, which just does not
    >   work. Review pointed that out, but then shrugged it off with a confused
    >   explanation:
    >
    >   https://lore.kernel.org/all/[email protected]/
    >
    >   Yes this also means a lot of the other drm_device teardown that drivers
    >   do happens way too early. There is a massive can of worms here of a
    >   magnitude that most likely is much, much bigger than what you can
    >   backport to stable kernels. Hotunplug is _hard_.
    
    Back to the drawing board, and fixing it in the intel display driver
    instead.
    
    Cc: Thomas Hellström <[email protected]>
    Fixes: 6bee098b9141 ("drm: Fix use-after-free on framebuffers and property blobs when calling drm_dev_unplug")
    Reported-by: Guenter Roeck <[email protected]>
    Tested-by: Guenter Roeck <[email protected]>
    Acked-by: Simona Vetter <[email protected]>
    Signed-off-by: Maarten Lankhorst <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
riscv: kgdb: fix several debug register assignment bugs [+ + +]
Author: Paul Walmsley <[email protected]>
Date:   Mon Mar 23 17:43:47 2026 -0600

    riscv: kgdb: fix several debug register assignment bugs
    
    [ Upstream commit 834911eb8eef2501485d819b4eabebadc25c3497 ]
    
    Fix several bugs in the RISC-V kgdb implementation:
    
    - The element of dbg_reg_def[] that is supposed to pertain to the S1
      register embeds instead the struct pt_regs offset of the A1
      register.  Fix this to use the S1 register offset in struct pt_regs.
    
    - The sleeping_thread_to_gdb_regs() function copies the value of the
      S10 register into the gdb_regs[] array element meant for the S9
      register, and copies the value of the S11 register into the array
      element meant for the S10 register.  It also neglects to copy the
      value of the S11 register.  Fix all of these issues.
    
    Fixes: fe89bd2be8667 ("riscv: Add KGDB support")
    Cc: Vincent Chen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paul Walmsley <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

riscv: Reset pmm when PR_TAGGED_ADDR_ENABLE is not set [+ + +]
Author: Zishun Yi <[email protected]>
Date:   Mon Mar 23 00:00:22 2026 +0800

    riscv: Reset pmm when PR_TAGGED_ADDR_ENABLE is not set
    
    [ Upstream commit 3033b2b1e3949274f33a140e2a97571b5a307298 ]
    
    In set_tagged_addr_ctrl(), when PR_TAGGED_ADDR_ENABLE is not set, pmlen
    is correctly set to 0, but it forgets to reset pmm. This results in the
    CPU pmm state not corresponding to the software pmlen state.
    
    Fix this by resetting pmm along with pmlen.
    
    Fixes: 2e1743085887 ("riscv: Add support for the tagged address ABI")
    Signed-off-by: Zishun Yi <[email protected]>
    Reviewed-by: Samuel Holland <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paul Walmsley <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
rust_binder: use AssertSync for BINDER_VM_OPS [+ + +]
Author: Alice Ryhl <[email protected]>
Date:   Sat Mar 14 11:19:51 2026 +0000

    rust_binder: use AssertSync for BINDER_VM_OPS
    
    commit ec327abae5edd1d5b60ea9f920212970133171d2 upstream.
    
    When declaring an immutable global variable in Rust, the compiler checks
    that it looks thread safe, because it is generally safe to access said
    global variable. When using C bindings types for these globals, we don't
    really want this check, because it is conservative and assumes pointers
    are not thread safe.
    
    In the case of BINDER_VM_OPS, this is a challenge when combined with the
    patch 'userfaultfd: introduce vm_uffd_ops' [1], which introduces a
    pointer field to vm_operations_struct. It previously only held function
    pointers, which are considered thread safe.
    
    Rust Binder should not be assuming that vm_operations_struct contains no
    pointer fields, so to fix this, use AssertSync (which Rust Binder has
    already declared for another similar global of type struct
    file_operations with the same problem). This ensures that even if
    another commit adds a pointer field to vm_operations_struct, this does
    not cause problems.
    
    Fixes: 8ef2c15aeae0 ("rust_binder: check ownership before using vma")
    Cc: stable <[email protected]>
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Link: https://lore.kernel.org/r/[email protected] [1]
    Signed-off-by: Alice Ryhl <[email protected]>
    Reviewed-by: Gary Guo <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
s390/cpum_sf: Cap sampling rate to prevent lsctl exception [+ + +]
Author: Thomas Richter <[email protected]>
Date:   Fri Mar 6 13:50:31 2026 +0100

    s390/cpum_sf: Cap sampling rate to prevent lsctl exception
    
    commit 57ad0d4a00f5d3e80f33ba2da8d560c73d83dc22 upstream.
    
    commit fcc43a7e294f ("s390/configs: Set HZ=1000") changed the interrupt
    frequency of the system. On machines with heavy load and many perf event
    overflows, this might lead to an exception. Dmesg displays these entries:
      [112.242542] cpum_sf: Loading sampling controls failed: op 1 err -22
    One line per CPU online.
    
    The root cause is the CPU Measurement sampling facility overflow
    adjustment. Whenever an overflow (too much samples per tick) occurs, the
    sampling rate is adjusted and increased. This was done without observing
    the maximum sampling rate limit. When the current sampling interval is
    higher than the maximum sampling rate limit, the lsctl instruction raises
    an exception. The error messages is the result of such an exception.
    Observe the upper limit when the new sampling rate is recalculated.
    
    Cc: [email protected]
    Fixes: 39d4a501a9ef ("s390/cpum_sf: Adjust sampling interval to avoid hitting sample limits")
    Signed-off-by: Thomas Richter <[email protected]>
    Reviewed-by: Sumanth Korikkar <[email protected]>
    Reviewed-by: Hendrik Brueckner <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
s390/zcrypt: Fix memory leak with CCA cards used as accelerator [+ + +]
Author: Harald Freudenberger <[email protected]>
Date:   Thu Mar 19 09:06:52 2026 +0100

    s390/zcrypt: Fix memory leak with CCA cards used as accelerator
    
    commit c8d46f17c2fc7d25c18e60c008928aecab26184d upstream.
    
    Tests showed that there is a memory leak if CCA cards are used as
    accelerator for clear key RSA requests (ME and CRT). With the last
    rework for the memory allocation the AP messages are allocated by
    ap_init_apmsg() but for some reason on two places (ME and CRT) the
    older allocation was still in place. So the first allocation simple
    was never freed.
    
    Fixes: 57db62a130ce ("s390/ap/zcrypt: Rework AP message buffer allocation")
    Reported-by: Yi Zhang <[email protected]>
    Closes: https://lore.kernel.org/linux-s390/CAHj4cs9H67Uz0iVaRQv447p7JFPRPy3TKAT4=Y6_e=wSHCZM5w@mail.gmail.com/
    Reported-by: Nadja Hariz <[email protected]>
    Cc: [email protected]
    Reviewed-by: Ingo Franzki <[email protected]>
    Reviewed-by: Holger Dengler <[email protected]>
    Acked-by: Heiko Carstens <[email protected]>
    Signed-off-by: Harald Freudenberger <[email protected]>
    Signed-off-by: Vasily Gorbik <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
sched/fair: Fix zero_vruntime tracking fix [+ + +]
Author: Peter Zijlstra <[email protected]>
Date:   Wed Apr 1 15:20:20 2026 +0200

    sched/fair: Fix zero_vruntime tracking fix
    
    [ Upstream commit 1319ea57529e131822bab56bf417c8edc2db9ae8 ]
    
    John reported that stress-ng-yield could make his machine unhappy and
    managed to bisect it to commit b3d99f43c72b ("sched/fair: Fix
    zero_vruntime tracking").
    
    The combination of yield and that commit was specific enough to
    hypothesize the following scenario:
    
    Suppose we have 2 runnable tasks, both doing yield. Then one will be
    eligible and one will not be, because the average position must be in
    between these two entities.
    
    Therefore, the runnable task will be eligible, and be promoted a full
    slice (all the tasks do is yield after all). This causes it to jump over
    the other task and now the other task is eligible and current is no
    longer. So we schedule.
    
    Since we are runnable, there is no {de,en}queue. All we have is the
    __{en,de}queue_entity() from {put_prev,set_next}_task(). But per the
    fingered commit, those two no longer move zero_vruntime.
    
    All that moves zero_vruntime are tick and full {de,en}queue.
    
    This means, that if the two tasks playing leapfrog can reach the
    critical speed to reach the overflow point inside one tick's worth of
    time, we're up a creek.
    
    Additionally, when multiple cgroups are involved, there is no guarantee
    the tick will in fact hit every cgroup in a timely manner. Statistically
    speaking it will, but that same statistics does not rule out the
    possibility of one cgroup not getting a tick for a significant amount of
    time -- however unlikely.
    
    Therefore, just like with the yield() case, force an update at the end
    of every slice. This ensures the update is never more than a single
    slice behind and the whole thing is within 2 lag bounds as per the
    comment on entity_key().
    
    Fixes: b3d99f43c72b ("sched/fair: Fix zero_vruntime tracking")
    Reported-by: John Stultz <[email protected]>
    Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
    Reviewed-by: Vincent Guittot <[email protected]>
    Tested-by: K Prateek Nayak <[email protected]>
    Tested-by: John Stultz <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
sched_ext: Fix inconsistent NUMA node lookup in scx_select_cpu_dfl() [+ + +]
Author: Cheng-Yang Chou <[email protected]>
Date:   Sat Mar 21 18:54:58 2026 +0800

    sched_ext: Fix inconsistent NUMA node lookup in scx_select_cpu_dfl()
    
    commit db08b1940f4beb25460b4a4e9da3446454f2e8fe upstream.
    
    In the WAKE_SYNC path of scx_select_cpu_dfl(), waker_node was computed
    with cpu_to_node(), while node (for prev_cpu) was computed with
    scx_cpu_node_if_enabled(). When scx_builtin_idle_per_node is disabled,
    idle_cpumask(waker_node) is called with a real node ID even though
    per-node idle tracking is disabled, resulting in undefined behavior.
    
    Fix by using scx_cpu_node_if_enabled() for waker_node as well, ensuring
    both variables are computed consistently.
    
    Fixes: 48849271e6611 ("sched_ext: idle: Per-node idle cpumasks")
    Cc: [email protected] # v6.15+
    Signed-off-by: Cheng-Yang Chou <[email protected]>
    Reviewed-by: Andrea Righi <[email protected]>
    Signed-off-by: Tejun Heo <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

sched_ext: Fix is_bpf_migration_disabled() false negative on non-PREEMPT_RCU [+ + +]
Author: Changwoo Min <[email protected]>
Date:   Thu Apr 2 11:31:50 2026 +0900

    sched_ext: Fix is_bpf_migration_disabled() false negative on non-PREEMPT_RCU
    
    commit 0c4a59df370bea245695c00aaae6ae75747139bd upstream.
    
    Since commit 8e4f0b1ebcf2 ("bpf: use rcu_read_lock_dont_migrate() for
    trampoline.c"), the BPF prolog (__bpf_prog_enter) calls migrate_disable()
    only when CONFIG_PREEMPT_RCU is enabled, via rcu_read_lock_dont_migrate().
    Without CONFIG_PREEMPT_RCU, the prolog never touches migration_disabled,
    so migration_disabled == 1 always means the task is truly
    migration-disabled regardless of whether it is the current task.
    
    The old unconditional p == current check was a false negative in this
    case, potentially allowing a migration-disabled task to be dispatched to
    a remote CPU and triggering scx_error in task_can_run_on_remote_rq().
    
    Only apply the p == current disambiguation when CONFIG_PREEMPT_RCU is
    enabled, where the ambiguity with the BPF prolog still exists.
    
    Fixes: 8e4f0b1ebcf2 ("bpf: use rcu_read_lock_dont_migrate() for trampoline.c")
    Cc: [email protected] # v6.18+
    Link: https://lore.kernel.org/lkml/[email protected]/
    Signed-off-by: Changwoo Min <[email protected]>
    Reviewed-by: Andrea Righi <[email protected]>
    Signed-off-by: Tejun Heo <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

sched_ext: Fix stale direct dispatch state in ddsp_dsq_id [+ + +]
Author: Andrea Righi <[email protected]>
Date:   Wed Apr 8 08:47:41 2026 -0400

    sched_ext: Fix stale direct dispatch state in ddsp_dsq_id
    
    [ Upstream commit 7e0ffb72de8aa3b25989c2d980e81b829c577010 ]
    
    @p->scx.ddsp_dsq_id can be left set (non-SCX_DSQ_INVALID) triggering a
    spurious warning in mark_direct_dispatch() when the next wakeup's
    ops.select_cpu() calls scx_bpf_dsq_insert(), such as:
    
     WARNING: kernel/sched/ext.c:1273 at scx_dsq_insert_commit+0xcd/0x140
    
    The root cause is that ddsp_dsq_id was only cleared in dispatch_enqueue(),
    which is not reached in all paths that consume or cancel a direct dispatch
    verdict.
    
    Fix it by clearing it at the right places:
    
     - direct_dispatch(): cache the direct dispatch state in local variables
       and clear it before dispatch_enqueue() on the synchronous path. For
       the deferred path, the direct dispatch state must remain set until
       process_ddsp_deferred_locals() consumes them.
    
     - process_ddsp_deferred_locals(): cache the dispatch state in local
       variables and clear it before calling dispatch_to_local_dsq(), which
       may migrate the task to another rq.
    
     - do_enqueue_task(): clear the dispatch state on the enqueue path
       (local/global/bypass fallbacks), where the direct dispatch verdict is
       ignored.
    
     - dequeue_task_scx(): clear the dispatch state after dispatch_dequeue()
       to handle both the deferred dispatch cancellation and the holding_cpu
       race, covering all cases where a pending direct dispatch is
       cancelled.
    
     - scx_disable_task(): clear the direct dispatch state when
       transitioning a task out of the current scheduler. Waking tasks may
       have had the direct dispatch state set by the outgoing scheduler's
       ops.select_cpu() and then been queued on a wake_list via
       ttwu_queue_wakelist(), when SCX_OPS_ALLOW_QUEUED_WAKEUP is set. Such
       tasks are not on the runqueue and are not iterated by scx_bypass(),
       so their direct dispatch state won't be cleared. Without this clear,
       any subsequent SCX scheduler that tries to direct dispatch the task
       will trigger the WARN_ON_ONCE() in mark_direct_dispatch().
    
    Fixes: 5b26f7b920f7 ("sched_ext: Allow SCX_DSQ_LOCAL_ON for direct dispatches")
    Cc: [email protected] # v6.12+
    Cc: Daniel Hodges <[email protected]>
    Cc: Patrick Somaru <[email protected]>
    Signed-off-by: Andrea Righi <[email protected]>
    Signed-off-by: Tejun Heo <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

sched_ext: Refactor do_enqueue_task() local and global DSQ paths [+ + +]
Author: Tejun Heo <[email protected]>
Date:   Wed Apr 8 08:47:40 2026 -0400

    sched_ext: Refactor do_enqueue_task() local and global DSQ paths
    
    [ Upstream commit 3546119f18647d7ddbba579737d8a222b430cb1c ]
    
    The local and global DSQ enqueue paths in do_enqueue_task() share the same
    slice refill logic. Factor out the common code into a shared enqueue label.
    This makes adding new enqueue cases easier. No functional changes.
    
    Reviewed-by: Andrea Righi <[email protected]>
    Reviewed-by: Emil Tsalapatis <[email protected]>
    Signed-off-by: Tejun Heo <[email protected]>
    Stable-dep-of: 7e0ffb72de8a ("sched_ext: Fix stale direct dispatch state in ddsp_dsq_id")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
scsi: target: file: Use kzalloc_flex for aio_cmd [+ + +]
Author: Thinh Nguyen <[email protected]>
Date:   Tue Mar 31 11:29:10 2026 -0400

    scsi: target: file: Use kzalloc_flex for aio_cmd
    
    [ Upstream commit 01f784fc9d0ab2a6dac45ee443620e517cb2a19b ]
    
    The target_core_file doesn't initialize the aio_cmd->iocb for the
    ki_write_stream. When a write command fd_execute_rw_aio() is executed,
    we may get a bogus ki_write_stream value, causing unintended write
    failure status when checking iocb->ki_write_stream > max_write_streams
    in the block device.
    
    Let's just use kzalloc_flex when allocating the aio_cmd and let
    ki_write_stream=0 to fix this issue.
    
    Fixes: 732f25a2895a ("fs: add a write stream field to the kiocb")
    Fixes: c27683da6406 ("block: expose write streams for block device nodes")
    Cc: [email protected]
    Signed-off-by: Thinh Nguyen <[email protected]>
    Link: https://patch.msgid.link/f1a2f81c62f043e31f80bb92d5f29893400c8ee2.1773450782.git.Thinh.Nguyen@synopsys.com
    Signed-off-by: Martin K. Petersen <[email protected]>
    [ changed kmalloc() to kzalloc() ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

scsi: target: tcm_loop: Drain commands in target_reset handler [+ + +]
Author: Josef Bacik <[email protected]>
Date:   Tue Mar 31 10:43:24 2026 -0400

    scsi: target: tcm_loop: Drain commands in target_reset handler
    
    [ Upstream commit 1333eee56cdf3f0cf67c6ab4114c2c9e0a952026 ]
    
    tcm_loop_target_reset() violates the SCSI EH contract: it returns SUCCESS
    without draining any in-flight commands.  The SCSI EH documentation
    (scsi_eh.rst) requires that when a reset handler returns SUCCESS the driver
    has made lower layers "forget about timed out scmds" and is ready for new
    commands.  Every other SCSI LLD (virtio_scsi, mpt3sas, ipr, scsi_debug,
    mpi3mr) enforces this by draining or completing outstanding commands before
    returning SUCCESS.
    
    Because tcm_loop_target_reset() doesn't drain, the SCSI EH reuses in-flight
    scsi_cmnd structures for recovery commands (e.g. TUR) while the target core
    still has async completion work queued for the old se_cmd.  The memset in
    queuecommand zeroes se_lun and lun_ref_active, causing
    transport_lun_remove_cmd() to skip its percpu_ref_put().  The leaked LUN
    reference prevents transport_clear_lun_ref() from completing, hanging
    configfs LUN unlink forever in D-state:
    
      INFO: task rm:264 blocked for more than 122 seconds.
      rm              D    0   264    258 0x00004000
      Call Trace:
       __schedule+0x3d0/0x8e0
       schedule+0x36/0xf0
       transport_clear_lun_ref+0x78/0x90 [target_core_mod]
       core_tpg_remove_lun+0x28/0xb0 [target_core_mod]
       target_fabric_port_unlink+0x50/0x60 [target_core_mod]
       configfs_unlink+0x156/0x1f0 [configfs]
       vfs_unlink+0x109/0x290
       do_unlinkat+0x1d5/0x2d0
    
    Fix this by making tcm_loop_target_reset() actually drain commands:
    
     1. Issue TMR_LUN_RESET via tcm_loop_issue_tmr() to drain all commands that
        the target core knows about (those not yet CMD_T_COMPLETE).
    
     2. Use blk_mq_tagset_busy_iter() to iterate all started requests and
        flush_work() on each se_cmd — this drains any deferred completion work
        for commands that already had CMD_T_COMPLETE set before the TMR (which
        the TMR skips via __target_check_io_state()).  This is the same pattern
        used by mpi3mr, scsi_debug, and libsas to drain outstanding commands
        during reset.
    
    Fixes: e0eb5d38b732 ("scsi: target: tcm_loop: Use block cmd allocator for se_cmds")
    Cc: [email protected]
    Assisted-by: Claude:claude-opus-4-6
    Signed-off-by: Josef Bacik <[email protected]>
    Link: https://patch.msgid.link/27011aa34c8f6b1b94d2e3cf5655b6d037f53428.1773706803.git.josef@toxicpanda.com
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
smb: client: fix generic/694 due to wrong ->i_blocks [+ + +]
Author: Paulo Alcantara <[email protected]>
Date:   Wed Mar 18 21:43:51 2026 -0300

    smb: client: fix generic/694 due to wrong ->i_blocks
    
    [ Upstream commit 23b5df09c27aec13962b30d32a4167ebdd043f8e ]
    
    When updating ->i_size, make sure to always update ->i_blocks as well
    until we query new allocation size from the server.
    
    generic/694 was failing because smb3_simple_falloc() was missing the
    update of ->i_blocks after calling cifs_setsize().  So, fix this by
    updating ->i_blocks directly in cifs_setsize(), so all places that
    call it doesn't need to worry about updating ->i_blocks later.
    
    Reported-by: Shyam Prasad N <[email protected]>
    Closes: https://lore.kernel.org/r/CANT5p=rqgRwaADB=b_PhJkqXjtfq3SFv41SSTXSVEHnuh871pA@mail.gmail.com
    Signed-off-by: Paulo Alcantara (Red Hat) <[email protected]>
    Cc: David Howells <[email protected]>
    Cc: [email protected]
    Signed-off-by: Steve French <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
spi: amlogic: spifc-a4: unregister ECC engine on probe failure and remove() callback [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sun Mar 22 22:28:45 2026 +0800

    spi: amlogic: spifc-a4: unregister ECC engine on probe failure and remove() callback
    
    [ Upstream commit b0dc7e7c56573e7a52080f25f3179a45f3dd7e6f ]
    
    aml_sfc_probe() registers the on-host NAND ECC engine, but teardown was
    missing from both probe unwind and remove-time cleanup. Add a devm cleanup
    action after successful registration so
    nand_ecc_unregister_on_host_hw_engine() runs automatically on probe
    failures and during device removal.
    
    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: cadence-qspi: Fix exec_mem_op error handling [+ + +]
Author: Emanuele Ghidoli <[email protected]>
Date:   Fri Mar 13 14:52:31 2026 +0100

    spi: cadence-qspi: Fix exec_mem_op error handling
    
    commit 59e1be1278f064d7172b00473b7e0c453cb1ec52 upstream.
    
    cqspi_exec_mem_op() increments the runtime PM usage counter before all
    refcount checks are performed. If one of these checks fails, the function
    returns without dropping the PM reference.
    
    Move the pm_runtime_resume_and_get() call after the refcount checks so
    that runtime PM is only acquired when the operation can proceed and
    drop the inflight_ops refcount if the PM resume fails.
    
    Cc: [email protected]
    Fixes: 7446284023e8 ("spi: cadence-quadspi: Implement refcount to handle unbind during busy")
    Signed-off-by: Emanuele Ghidoli <[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: geni-qcom: Check DMA interrupts early in ISR [+ + +]
Author: Praveen Talari <[email protected]>
Date:   Fri Mar 13 21:49:01 2026 +0530

    spi: geni-qcom: Check DMA interrupts early in ISR
    
    [ Upstream commit 8c89a077ca796a2fe248c584e9d7e66cff0388c8 ]
    
    The current interrupt handler only checks the GENI main IRQ status
    (m_irq) before deciding to return IRQ_NONE. This can lead to spurious
    IRQ_NONE returns when DMA interrupts are pending but m_irq is zero.
    
    Move the DMA TX/RX status register reads to the beginning of the ISR,
    right after reading m_irq. Update the early return condition to check
    all three status registers (m_irq, dma_tx_status, dma_rx_status) before
    returning IRQ_NONE.
    
    Signed-off-by: Praveen Talari <[email protected]>
    Reviewed-by: Konrad Dybcio <[email protected]>
    Link: https://patch.msgid.link/20260313-spi-geni-qcom-fix-dma-irq-handling-v1-1-0bd122589e02@oss.qualcomm.com
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

spi: stm32-ospi: Fix reset control leak on probe error [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sun Mar 29 00:07:06 2026 +0800

    spi: stm32-ospi: Fix reset control leak on probe error
    
    [ Upstream commit 5a570c8d6e55689253f6fcc4a198c56cca7e39d6 ]
    
    When spi_register_controller() fails after reset_control_acquire()
    succeeds, the reset control is never released. This causes a resource
    leak in the error path.
    
    Add the missing reset_control_release() call in the error path.
    
    Fixes: cf2c3eceb757 ("spi: stm32-ospi: Make usage of reset_control_acquire/release() API")
    Signed-off-by: Felix Gu <[email protected]>
    Reviewed-by: Patrice Chotard <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

spi: stm32-ospi: Fix resource leak in remove() callback [+ + +]
Author: Felix Gu <[email protected]>
Date:   Sun Mar 29 19:14:05 2026 +0800

    spi: stm32-ospi: Fix resource leak in remove() callback
    
    [ Upstream commit 73cd1f97946ae3796544448ff12c07f399bb2881 ]
    
    The remove() callback returned early if pm_runtime_resume_and_get()
    failed, skipping the cleanup of spi controller and other resources.
    
    Remove the early return so cleanup completes regardless of PM resume
    result.
    
    Fixes: 79b8a705e26c ("spi: stm32: Add OSPI driver")
    Signed-off-by: Felix Gu <[email protected]>
    Reviewed-by: Patrice Chotard <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tg3: Fix race for querying speed/duplex [+ + +]
Author: Thomas Bogendoerfer <[email protected]>
Date:   Wed Mar 25 12:20:53 2026 +0100

    tg3: Fix race for querying speed/duplex
    
    [ Upstream commit bb417456c7814d1493d98b7dd9c040bf3ce3b4ed ]
    
    When driver signals carrier up via netif_carrier_on() its internal
    link_up state isn't updated immediately. This leads to inconsistent
    speed/duplex in /proc/net/bonding/bondX where the speed and duplex
    is shown as unknown while ethtool shows correct values. Fix this by
    using netif_carrier_ok() for link checking in get_ksettings function.
    
    Fixes: 84421b99cedc ("tg3: Update link_up flag for phylib devices")
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Reviewed-by: Pavan Chebbi <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

tg3: replace placeholder MAC address with device property [+ + +]
Author: Paul SAGE <[email protected]>
Date:   Sun Mar 15 03:24:30 2026 +0530

    tg3: replace placeholder MAC address with device property
    
    [ Upstream commit e4c00ba7274b613e3ab19e27eb009f0ec2e28379 ]
    
    On some systems (e.g. iMac 20,1 with BCM57766), the tg3 driver reads
    a default placeholder mac address (00:10:18:00:00:00) from the
    mailbox. The correct value on those systems are stored in the
    'local-mac-address' property.
    
    This patch, detect the default value and tries to retrieve
    the correct address from the device_get_mac_address
    function instead.
    
    The patch has been tested on two different systems:
    - iMac 20,1 (BCM57766) model which use the local-mac-address property
    - iMac 13,2 (BCM57766) model which can use the mailbox,
        NVRAM or MAC control registers
    
    Tested-by: Rishon Jonathan R <[email protected]>
    
    Co-developed-by: Vincent MORVAN <[email protected]>
    Signed-off-by: Vincent MORVAN <[email protected]>
    Signed-off-by: Paul SAGE <[email protected]>
    Signed-off-by: Atharva Tiwari <[email protected]>
    Reviewed-by: Michael Chan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
thermal: core: Address thermal zone removal races with resume [+ + +]
Author: Rafael J. Wysocki <[email protected]>
Date:   Fri Mar 27 10:49:52 2026 +0100

    thermal: core: Address thermal zone removal races with resume
    
    commit 45b859b0728267a6199ee5002d62e6c6f3e8c89d upstream.
    
    Since thermal_zone_pm_complete() and thermal_zone_device_resume()
    re-initialize the poll_queue delayed work for the given thermal zone,
    the cancel_delayed_work_sync() in thermal_zone_device_unregister()
    may miss some already running work items and the thermal zone may
    be freed prematurely [1].
    
    There are two failing scenarios that both start with
    running thermal_pm_notify_complete() right before invoking
    thermal_zone_device_unregister() for one of the thermal zones.
    
    In the first scenario, there is a work item already running for
    the given thermal zone when thermal_pm_notify_complete() calls
    thermal_zone_pm_complete() for that thermal zone and it continues to
    run when thermal_zone_device_unregister() starts.  Since the poll_queue
    delayed work has been re-initialized by thermal_pm_notify_complete(), the
    running work item will be missed by the cancel_delayed_work_sync() in
    thermal_zone_device_unregister() and if it continues to run past the
    freeing of the thermal zone object, a use-after-free will occur.
    
    In the second scenario, thermal_zone_device_resume() queued up by
    thermal_pm_notify_complete() runs right after the thermal_zone_exit()
    called by thermal_zone_device_unregister() has returned.  The poll_queue
    delayed work is re-initialized by it before cancel_delayed_work_sync() is
    called by thermal_zone_device_unregister(), so it may continue to run
    after the freeing of the thermal zone object, which also leads to a
    use-after-free.
    
    Address the first failing scenario by ensuring that no thermal work
    items will be running when thermal_pm_notify_complete() is called.
    For this purpose, first move the cancel_delayed_work() call from
    thermal_zone_pm_complete() to thermal_zone_pm_prepare() to prevent
    new work from entering the workqueue going forward.  Next, switch
    over to using a dedicated workqueue for thermal events and update
    the code in thermal_pm_notify() to flush that workqueue after
    thermal_pm_notify_prepare() has returned which will take care of
    all leftover thermal work already on the workqueue (that leftover
    work would do nothing useful anyway because all of the thermal zones
    have been flagged as suspended).
    
    The second failing scenario is addressed by adding a tz->state check
    to thermal_zone_device_resume() to prevent it from re-initializing
    the poll_queue delayed work if the thermal zone is going away.
    
    Note that the above changes will also facilitate relocating the suspend
    and resume of thermal zones closer to the suspend and resume of devices,
    respectively.
    
    Fixes: 5a5efdaffda5 ("thermal: core: Resume thermal zones asynchronously")
    Reported-by: [email protected]
    Closes: https://syzbot.org/bug?extid=3b3852c6031d0f30dfaf
    Reported-by: Mauricio Faria de Oliveira <[email protected]>
    Closes: https://lore.kernel.org/linux-pm/20260324-thermal-core-uaf-init_delayed_work-v1-1-6611ae76a8a1@igalia.com/ [1]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Reviewed-by: Mauricio Faria de Oliveira <[email protected]>
    Tested-by: Mauricio Faria de Oliveira <[email protected]>
    Reviewed-by: Lukasz Luba <[email protected]>
    Cc: All applicable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

thermal: core: Fix thermal zone device registration error path [+ + +]
Author: Rafael J. Wysocki <[email protected]>
Date:   Wed Apr 1 16:33:53 2026 +0200

    thermal: core: Fix thermal zone device registration error path
    
    commit 9e07e3b81807edd356e1f794cffa00a428eff443 upstream.
    
    If thermal_zone_device_register_with_trips() fails after registering
    a thermal zone device, it needs to wait for the tz->removal completion
    like thermal_zone_device_unregister(), in case user space has managed
    to take a reference to the thermal zone device's kobject, in which case
    thermal_release() may not be called by the error path itself and tz may
    be freed prematurely.
    
    Add the missing wait_for_completion() call to the thermal zone device
    registration error path.
    
    Fixes: 04e6ccfc93c5 ("thermal: core: Fix NULL pointer dereference in zone registration error path")
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Cc: All applicable <[email protected]>
    Reviewed-by: Lukasz Luba <[email protected]>
    Tested-by: Lukasz Luba <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
thunderbolt: Fix property read in nhi_wake_supported() [+ + +]
Author: Konrad Dybcio <[email protected]>
Date:   Mon Mar 9 10:39:49 2026 +0100

    thunderbolt: Fix property read in nhi_wake_supported()
    
    commit 73a505dc48144ec72e25874e2b2a72487b02d3bc upstream.
    
    device_property_read_foo() returns 0 on success and only then modifies
    'val'. Currently, val is left uninitialized if the aforementioned
    function returns non-zero, making nhi_wake_supported() return true
    almost always (random != 0) if the property is not present in device
    firmware.
    
    Invert the check to make it make sense.
    
    Fixes: 3cdb9446a117 ("thunderbolt: Add support for Intel Ice Lake")
    Cc: [email protected]
    Signed-off-by: Konrad Dybcio <[email protected]>
    Signed-off-by: Mika Westerberg <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
usb: cdns3: gadget: fix NULL pointer dereference in ep_queue [+ + +]
Author: Yongchao Wu <[email protected]>
Date:   Tue Mar 31 08:04:07 2026 +0800

    usb: cdns3: gadget: fix NULL pointer dereference in ep_queue
    
    commit 7f6f127b9bc34bed35f56faf7ecb1561d6b39000 upstream.
    
    When the gadget endpoint is disabled or not yet configured, the ep->desc
    pointer can be NULL. This leads to a NULL pointer dereference when
    __cdns3_gadget_ep_queue() is called, causing a kernel crash.
    
    Add a check to return -ESHUTDOWN if ep->desc is NULL, which is the
    standard return code for unconfigured endpoints.
    
    This prevents potential crashes when ep_queue is called on endpoints
    that are not ready.
    
    Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
    Cc: stable <[email protected]>
    Signed-off-by: Yongchao Wu <[email protected]>
    Acked-by: Peter Chen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: cdns3: gadget: fix state inconsistency on gadget init failure [+ + +]
Author: Yongchao Wu <[email protected]>
Date:   Wed Apr 1 08:10:00 2026 +0800

    usb: cdns3: gadget: fix state inconsistency on gadget init failure
    
    commit c32f8748d70c8fc77676ad92ed76cede17bf2c48 upstream.
    
    When cdns3_gadget_start() fails, the DRD hardware is left in gadget mode
    while software state remains INACTIVE, creating hardware/software state
    inconsistency.
    
    When switching to host mode via sysfs:
      echo host > /sys/class/usb_role/13180000.usb-role-switch/role
    
    The role state is not set to CDNS_ROLE_STATE_ACTIVE due to the error,
    so cdns_role_stop() skips cleanup because state is still INACTIVE.
    This violates the DRD controller design specification (Figure22),
    which requires returning to idle state before switching roles.
    
    This leads to a synchronous external abort in xhci_gen_setup() when
    setting up the host controller:
    
    [  516.440698] configfs-gadget 13180000.usb: failed to start g1: -19
    [  516.442035] cdns-usb3 13180000.usb: Failed to add gadget
    [  516.443278] cdns-usb3 13180000.usb: set role 2 has failed
    ...
    [ 1301.375722] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [ 1301.377716] Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP
    [ 1301.382485] pc : xhci_gen_setup+0xa4/0x408
    [ 1301.393391] backtrace:
        ...
        xhci_gen_setup+0xa4/0x408    <-- CRASH
        xhci_plat_setup+0x44/0x58
        usb_add_hcd+0x284/0x678
        ...
        cdns_role_set+0x9c/0xbc        <-- Role switch
    
    Fix by calling cdns_drd_gadget_off() in the error path to properly
    clean up the DRD gadget state.
    
    Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
    Cc: stable <[email protected]>
    Signed-off-by: Yongchao Wu <[email protected]>
    Acked-by: Peter Chen <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam [+ + +]
Author: JP Hein <[email protected]>
Date:   Mon Mar 30 17:38:04 2026 -0700

    USB: core: add NO_LPM quirk for Razer Kiyo Pro webcam
    
    commit 8b7a42ecdcdeb55580d9345412f7f8fc5aca3f6c upstream.
    
    The Razer Kiyo Pro (1532:0e05) is a USB 3.0 UVC webcam whose firmware
    does not handle USB Link Power Management transitions reliably. When LPM
    is active, the device can enter a state where it fails to respond to
    control transfers, producing EPIPE (-32) errors on UVC probe control
    SET_CUR requests. In the worst case, the stalled endpoint triggers an
    xHCI stop-endpoint command that times out, causing the host controller
    to be declared dead and every USB device on the bus to be disconnected.
    
    This has been reported as Ubuntu Launchpad Bug #2061177. The failure
    mode is:
    
      1. UVC probe control SET_CUR returns -32 (EPIPE)
      2. xHCI host not responding to stop endpoint command
      3. xHCI host controller not responding, assume dead
      4. All USB devices on the affected xHCI controller disconnect
    
    Disabling LPM prevents the firmware from entering the problematic low-
    power states that precede the stall. This is the same approach used for
    other webcams with similar firmware issues (e.g., Logitech HD Webcam C270).
    
    Cc: stable <[email protected]>
    Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2061177
    Signed-off-by: JP Hein <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
usb: core: phy: avoid double use of 'usb3-phy' [+ + +]
Author: Gabor Juhos <[email protected]>
Date:   Mon Mar 30 17:02:42 2026 +0200

    usb: core: phy: avoid double use of 'usb3-phy'
    
    commit 0179c6da0793ae03607002c284b53b6d584172d0 upstream.
    
    Commit 53a2d95df836 ("usb: core: add phy notify connect and disconnect")
    causes double use of the 'usb3-phy' in certain cases.
    
    Since that commit, if a generic PHY named 'usb3-phy' is specified in
    the device tree, that is getting added to the 'phy_roothub' list of the
    secondary HCD by the usb_phy_roothub_alloc_usb3_phy() function. However,
    that PHY is getting added also to the primary HCD's 'phy_roothub' list
    by usb_phy_roothub_alloc() if there is no generic PHY specified with
    'usb2-phy' name.
    
    This causes that the usb_add_hcd() function executes each phy operations
    twice on the 'usb3-phy'. Once when the primary HCD is added, then once
    again when the secondary HCD is added.
    
    The issue affects the Marvell Armada 3700 platform at least, where a
    custom name is used for the USB2 PHY:
    
      $ git grep 'phy-names.*usb3' arch/arm64/boot/dts/marvell/armada-37xx.dtsi | tr '\t' ' '
      arch/arm64/boot/dts/marvell/armada-37xx.dtsi:    phy-names = "usb3-phy", "usb2-utmi-otg-phy";
    
    Extend the usb_phy_roothub_alloc_usb3_phy() function to skip adding the
    'usb3-phy' to the 'phy_roothub' list of the secondary HCD when 'usb2-phy'
    is not specified in the device tree to avoid the double use.
    
    Fixes: 53a2d95df836 ("usb: core: add phy notify connect and disconnect")
    Cc: stable <[email protected]>
    Signed-off-by: Gabor Juhos <[email protected]>
    Link: https://patch.msgid.link/20260330-usb-avoid-usb3-phy-double-use-v1-1-d2113aecb535@gmail.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: core: use dedicated spinlock for offload state [+ + +]
Author: Guan-Yu Lin <[email protected]>
Date:   Wed Apr 1 12:32:17 2026 +0000

    usb: core: use dedicated spinlock for offload state
    
    commit bd3d245b0fef571f93504904df62b8865b1c0d34 upstream.
    
    Replace the coarse USB device lock with a dedicated offload_lock
    spinlock to reduce contention during offload operations. Use
    offload_pm_locked to synchronize with PM transitions and replace
    the legacy offload_at_suspend flag.
    
    Optimize usb_offload_get/put by switching from auto-resume/suspend
    to pm_runtime_get_if_active(). This ensures offload state is only
    modified when the device is already active, avoiding unnecessary
    power transitions.
    
    Cc: stable <[email protected]>
    Fixes: ef82a4803aab ("xhci: sideband: add api to trace sideband usage")
    Signed-off-by: Guan-Yu Lin <[email protected]>
    Tested-by: Hailong Liu <[email protected]>
    Acked-by: Mathias Nyman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
USB: dummy-hcd: Fix interrupt synchronization error [+ + +]
Author: Alan Stern <[email protected]>
Date:   Sun Mar 15 14:31:00 2026 -0400

    USB: dummy-hcd: Fix interrupt synchronization error
    
    commit 2ca9e46f8f1f5a297eb0ac83f79d35d5b3a02541 upstream.
    
    This fixes an error in synchronization in the dummy-hcd driver.  The
    error has a somewhat involved history.  The synchronization mechanism
    was introduced by commit 7dbd8f4cabd9 ("USB: dummy-hcd: Fix erroneous
    synchronization change"), which added an emulated "interrupts enabled"
    flag together with code emulating synchronize_irq() (it waits until
    all current handler callbacks have returned).
    
    But the emulated interrupt-disable occurred too late, after the driver
    containing the handler callback routines had been told that it was
    unbound and no more callbacks would occur.  Commit 4a5d797a9f9c ("usb:
    gadget: dummy_hcd: fix gpf in gadget_setup") tried to fix this by
    moving the synchronize_irq() emulation code from dummy_stop() to
    dummy_pullup(), which runs before the unbind callback.
    
    There still were races, though, because the emulated interrupt-disable
    still occurred too late.  It couldn't be moved to dummy_pullup(),
    because that routine can be called for reasons other than an impending
    unbind.  Therefore commits 7dc0c55e9f30 ("USB: UDC core: Add
    udc_async_callbacks gadget op") and 04145a03db9d ("USB: UDC: Implement
    udc_async_callbacks in dummy-hcd") added an API allowing the UDC core
    to tell dummy-hcd exactly when emulated interrupts and their callbacks
    should be disabled.
    
    That brings us to the current state of things, which is still wrong
    because the emulated synchronize_irq() occurs before the emulated
    interrupt-disable!  That's no good, beause it means that more emulated
    interrupts can occur after the synchronize_irq() emulation has run,
    leading to the possibility that a callback handler may be running when
    the gadget driver is unbound.
    
    To fix this, we have to move the synchronize_irq() emulation code yet
    again, to the dummy_udc_async_callbacks() routine, which takes care of
    enabling and disabling emulated interrupt requests.  The
    synchronization will now run immediately after emulated interrupts are
    disabled, which is where it belongs.
    
    Signed-off-by: Alan Stern <[email protected]>
    Fixes: 04145a03db9d ("USB: UDC: Implement udc_async_callbacks in dummy-hcd")
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

USB: dummy-hcd: Fix locking/synchronization error [+ + +]
Author: Alan Stern <[email protected]>
Date:   Sun Mar 15 14:30:43 2026 -0400

    USB: dummy-hcd: Fix locking/synchronization error
    
    commit 616a63ff495df12863692ab3f9f7b84e3fa7a66d upstream.
    
    Syzbot testing was able to provoke an addressing exception and crash
    in the usb_gadget_udc_reset() routine in
    drivers/usb/gadgets/udc/core.c, resulting from the fact that the
    routine was called with a second ("driver") argument of NULL.  The bad
    caller was set_link_state() in dummy_hcd.c, and the problem arose
    because of a race between a USB reset and driver unbind.
    
    These sorts of races were not supposed to be possible; commit
    7dbd8f4cabd9 ("USB: dummy-hcd: Fix erroneous synchronization change"),
    along with a few followup commits, was written specifically to prevent
    them.  As it turns out, there are (at least) two errors remaining in
    the code.  Another patch will address the second error; this one is
    concerned with the first.
    
    The error responsible for the syzbot crash occurred because the
    stop_activity() routine will sometimes drop and then re-acquire the
    dum->lock spinlock.  A call to stop_activity() occurs in
    set_link_state() when handling an emulated USB reset, after the test
    of dum->ints_enabled and before the increment of dum->callback_usage.
    This allowed another thread (doing a driver unbind) to sneak in and
    grab the spinlock, and then clear dum->ints_enabled and dum->driver.
    Normally this other thread would have to wait for dum->callback_usage
    to go down to 0 before it would clear dum->driver, but in this case it
    didn't have to wait since dum->callback_usage had not yet been
    incremented.
    
    The fix is to increment dum->callback_usage _before_ calling
    stop_activity() instead of after.  Then the thread doing the unbind
    will not clear dum->driver until after the call to
    usb_gadget_udc_reset() safely returns and dum->callback_usage has been
    decremented again.
    
    Signed-off-by: Alan Stern <[email protected]>
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/linux-usb/[email protected]/
    Tested-by: [email protected]
    Fixes: 7dbd8f4cabd9 ("USB: dummy-hcd: Fix erroneous synchronization change")
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
usb: dwc2: gadget: Fix spin_lock/unlock mismatch in dwc2_hsotg_udc_stop() [+ + +]
Author: Juno Choi <[email protected]>
Date:   Tue Mar 24 10:49:10 2026 +0900

    usb: dwc2: gadget: Fix spin_lock/unlock mismatch in dwc2_hsotg_udc_stop()
    
    commit 9bb4b5ed7f8c4f95cc556bdf042b0ba2fa13557a upstream.
    
    dwc2_gadget_exit_clock_gating() internally calls call_gadget() macro,
    which expects hsotg->lock to be held since it does spin_unlock/spin_lock
    around the gadget driver callback invocation.
    
    However, dwc2_hsotg_udc_stop() calls dwc2_gadget_exit_clock_gating()
    without holding the lock. This leads to:
     - spin_unlock on a lock that is not held (undefined behavior)
     - The lock remaining held after dwc2_gadget_exit_clock_gating() returns,
       causing a deadlock when spin_lock_irqsave() is called later in the
       same function.
    
    Fix this by acquiring hsotg->lock before calling
    dwc2_gadget_exit_clock_gating() and releasing it afterwards, which
    satisfies the locking requirement of the call_gadget() macro.
    
    Fixes: af076a41f8a2 ("usb: dwc2: also exit clock_gating when stopping udc while suspended")
    Cc: stable <[email protected]>
    Signed-off-by: Juno Choi <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: ehci-brcm: fix sleep during atomic [+ + +]
Author: Justin Chen <[email protected]>
Date:   Wed Mar 18 11:57:07 2026 -0700

    usb: ehci-brcm: fix sleep during atomic
    
    commit 679b771ea05ad0f8eeae83e14a91b8f4f39510c4 upstream.
    
    echi_brcm_wait_for_sof() gets called after disabling interrupts
    in ehci_brcm_hub_control(). Use the atomic version of poll_timeout
    to fix the warning.
    
    Fixes: 9df231511bd6 ("usb: ehci: Add new EHCI driver for Broadcom STB SoC's")
    Cc: stable <[email protected]>
    Signed-off-by: Justin Chen <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: dummy_hcd: fix premature URB completion when ZLP follows partial transfer [+ + +]
Author: Sebastian Urban <[email protected]>
Date:   Sun Mar 15 16:10:45 2026 +0100

    usb: gadget: dummy_hcd: fix premature URB completion when ZLP follows partial transfer
    
    commit f50200dd44125e445a6164e88c217472fa79cdbc upstream.
    
    When a gadget request is only partially transferred in transfer()
    because the per-frame bandwidth budget is exhausted, the loop advances
    to the next queued request. If that next request is a zero-length
    packet (ZLP), len evaluates to zero and the code takes the
    unlikely(len == 0) path, which sets is_short = 1. This bypasses the
    bandwidth guard ("limit < ep->ep.maxpacket && limit < len") that
    lives in the else branch and would otherwise break out of the loop for
    non-zero requests. The is_short path then completes the URB before all
    data from the first request has been transferred.
    
    Reproducer (bulk IN, high speed):
    
      Device side (FunctionFS with Linux AIO):
        1. Queue a 65024-byte write via io_submit (127 * 512, i.e. a
           multiple of the HS bulk max packet size).
        2. Immediately queue a zero-length write (ZLP) via io_submit.
    
      Host side:
        3. Submit a 65536-byte bulk IN URB.
    
      Expected: URB completes with actual_length = 65024.
      Actual:   URB completes with actual_length = 53248, losing 11776
                bytes that leak into subsequent URBs.
    
    At high speed the per-frame budget is 53248 bytes (512 * 13 * 8).
    The 65024-byte request exhausts this budget after 53248 bytes, leaving
    the request incomplete (req->req.actual < req->req.length). Neither
    the request nor the URB is finished, and rescan is 0, so the loop
    advances to the ZLP. For the ZLP, dev_len = 0, so len = min(12288, 0)
    = 0, taking the unlikely(len == 0) path and setting is_short = 1.
    The is_short handler then sets *status = 0, completing the URB with
    only 53248 of the expected 65024 bytes.
    
    Fix this by breaking out of the loop when the current request has
    remaining data (req->req.actual < req->req.length). The request
    resumes on the next timer tick, preserving correct data ordering.
    
    Signed-off-by: Sebastian Urban <[email protected]>
    Cc: stable <[email protected]>
    Reviewed-by: Alan Stern <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_ecm: Fix net_device lifecycle with device_move [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Fri Mar 20 16:54:47 2026 +0800

    usb: gadget: f_ecm: Fix net_device lifecycle with device_move
    
    commit b2cc4fae67a51f60d81d6af2678696accb07c656 upstream.
    
    The net_device is allocated during function instance creation and
    registered during the bind phase with the gadget device as its sysfs
    parent. When the function unbinds, the parent device is destroyed, but
    the net_device survives, resulting in dangling sysfs symlinks:
    
      console:/ # ls -l /sys/class/net/usb0
      lrwxrwxrwx ... /sys/class/net/usb0 ->
      /sys/devices/platform/.../gadget.0/net/usb0
      console:/ # ls -l /sys/devices/platform/.../gadget.0/net/usb0
      ls: .../gadget.0/net/usb0: No such file or directory
    
    Use device_move() to reparent the net_device between the gadget device
    tree and /sys/devices/virtual across bind and unbind cycles. During the
    final unbind, calling device_move(NULL) moves the net_device to the
    virtual device tree before the gadget device is destroyed. On rebinding,
    device_move() reparents the device back under the new gadget, ensuring
    proper sysfs topology and power management ordering.
    
    To maintain compatibility with legacy composite drivers (e.g., multi.c),
    the bound flag is used to indicate whether the network device is shared
    and pre-registered during the legacy driver's bind phase.
    
    Fixes: fee562a6450b ("usb: gadget: f_ecm: convert to new function interface with backward compatibility")
    Cc: [email protected]
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_eem: Fix net_device lifecycle with device_move [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Fri Mar 20 16:54:48 2026 +0800

    usb: gadget: f_eem: Fix net_device lifecycle with device_move
    
    commit d9270c9a8118c1535409db926ac1e2545dc97b81 upstream.
    
    The net_device is allocated during function instance creation and
    registered during the bind phase with the gadget device as its sysfs
    parent. When the function unbinds, the parent device is destroyed, but
    the net_device survives, resulting in dangling sysfs symlinks:
    
    console:/ # ls -l /sys/class/net/usb0
    lrwxrwxrwx ... /sys/class/net/usb0 ->
    /sys/devices/platform/.../gadget.0/net/usb0
    console:/ # ls -l /sys/devices/platform/.../gadget.0/net/usb0
    ls: .../gadget.0/net/usb0: No such file or directory
    
    Use device_move() to reparent the net_device between the gadget device
    tree and /sys/devices/virtual across bind and unbind cycles. During the
    final unbind, calling device_move(NULL) moves the net_device to the
    virtual device tree before the gadget device is destroyed. On rebinding,
    device_move() reparents the device back under the new gadget, ensuring
    proper sysfs topology and power management ordering.
    
    To maintain compatibility with legacy composite drivers (e.g., multi.c),
    the bound flag is used to indicate whether the network device is shared
    and pre-registered during the legacy driver's bind phase.
    
    Fixes: b29002a15794 ("usb: gadget: f_eem: convert to new function interface with backward compatibility")
    Cc: [email protected]
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_hid: move list and spinlock inits from bind to alloc [+ + +]
Author: Michael Zimmermann <[email protected]>
Date:   Tue Mar 31 20:48:44 2026 +0200

    usb: gadget: f_hid: move list and spinlock inits from bind to alloc
    
    commit 4e0a88254ad59f6c53a34bf5fa241884ec09e8b2 upstream.
    
    There was an issue when you did the following:
    - setup and bind an hid gadget
    - open /dev/hidg0
    - use the resulting fd in EPOLL_CTL_ADD
    - unbind the UDC
    - bind the UDC
    - use the fd in EPOLL_CTL_DEL
    
    When CONFIG_DEBUG_LIST was enabled, a list_del corruption was reported
    within remove_wait_queue (via ep_remove_wait_queue). After some
    debugging I found out that the queues, which f_hid registers via
    poll_wait were the problem. These were initialized using
    init_waitqueue_head inside hidg_bind. So effectively, the bind function
    re-initialized the queues while there were still items in them.
    
    The solution is to move the initialization from hidg_bind to hidg_alloc
    to extend their lifetimes to the lifetime of the function instance.
    
    Additionally, I found many other possibly problematic init calls in the
    bind function, which I moved as well.
    
    Signed-off-by: Michael Zimmermann <[email protected]>
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_rndis: Fix net_device lifecycle with device_move [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Fri Mar 20 16:54:50 2026 +0800

    usb: gadget: f_rndis: Fix net_device lifecycle with device_move
    
    commit e367599529dc42578545a7f85fde517b35b3cda7 upstream.
    
    The net_device is allocated during function instance creation and
    registered during the bind phase with the gadget device as its sysfs
    parent. When the function unbinds, the parent device is destroyed, but
    the net_device survives, resulting in dangling sysfs symlinks:
    
      console:/ # ls -l /sys/class/net/usb0
      lrwxrwxrwx ... /sys/class/net/usb0 ->
      /sys/devices/platform/.../gadget.0/net/usb0
      console:/ # ls -l /sys/devices/platform/.../gadget.0/net/usb0
      ls: .../gadget.0/net/usb0: No such file or directory
    
    Use device_move() to reparent the net_device between the gadget device
    tree and /sys/devices/virtual across bind and unbind cycles. During the
    final unbind, calling device_move(NULL) moves the net_device to the
    virtual device tree before the gadget device is destroyed. On rebinding,
    device_move() reparents the device back under the new gadget, ensuring
    proper sysfs topology and power management ordering.
    
    To maintain compatibility with legacy composite drivers (e.g., multi.c),
    the borrowed_net flag is used to indicate whether the network device is
    shared and pre-registered during the legacy driver's bind phase.
    
    Fixes: f466c6353819 ("usb: gadget: f_rndis: convert to new function interface with backward compatibility")
    Cc: [email protected]
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_rndis: Protect RNDIS options with mutex [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Fri Mar 20 16:54:45 2026 +0800

    usb: gadget: f_rndis: Protect RNDIS options with mutex
    
    commit 8d8c68b1fc06ece60cf43e1306ff0f4ac121547e upstream.
    
    The class/subclass/protocol options are suspectible to race conditions
    as they can be accessed concurrently through configfs.
    
    Use existing mutex to protect these options. This issue was identified
    during code inspection.
    
    Fixes: 73517cf49bd4 ("usb: gadget: add RNDIS configfs options for class/subclass/protocol")
    Cc: [email protected]
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_subset: Fix net_device lifecycle with device_move [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Fri Mar 20 16:54:49 2026 +0800

    usb: gadget: f_subset: Fix net_device lifecycle with device_move
    
    commit 06524cd1c9011bee141a87e43ab878641ed3652b upstream.
    
    The net_device is allocated during function instance creation and
    registered during the bind phase with the gadget device as its sysfs
    parent. When the function unbinds, the parent device is destroyed, but
    the net_device survives, resulting in dangling sysfs symlinks:
    
      console:/ # ls -l /sys/class/net/usb0
      lrwxrwxrwx ... /sys/class/net/usb0 ->
      /sys/devices/platform/.../gadget.0/net/usb0
      console:/ # ls -l /sys/devices/platform/.../gadget.0/net/usb0
      ls: .../gadget.0/net/usb0: No such file or directory
    
    Use device_move() to reparent the net_device between the gadget device
    tree and /sys/devices/virtual across bind and unbind cycles. During the
    final unbind, calling device_move(NULL) moves the net_device to the
    virtual device tree before the gadget device is destroyed. On rebinding,
    device_move() reparents the device back under the new gadget, ensuring
    proper sysfs topology and power management ordering.
    
    To maintain compatibility with legacy composite drivers (e.g., multi.c),
    the bound flag is used to indicate whether the network device is shared
    and pre-registered during the legacy driver's bind phase.
    
    Fixes: 8cedba7c73af ("usb: gadget: f_subset: convert to new function interface with backward compatibility")
    Cc: [email protected]
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_subset: Fix unbalanced refcnt in geth_free [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Fri Mar 20 16:54:44 2026 +0800

    usb: gadget: f_subset: Fix unbalanced refcnt in geth_free
    
    commit caa27923aacd8a5869207842f2ab1657c6c0c7bc upstream.
    
    geth_alloc() increments the reference count, but geth_free() fails to
    decrement it. This prevents the configuration of attributes via configfs
    after unlinking the function.
    
    Decrement the reference count in geth_free() to ensure proper cleanup.
    
    Fixes: 02832e56f88a ("usb: gadget: f_subset: add configfs support")
    Cc: [email protected]
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_uac1_legacy: validate control request size [+ + +]
Author: Taegu Ha <[email protected]>
Date:   Thu Apr 2 04:13:11 2026 +0900

    usb: gadget: f_uac1_legacy: validate control request size
    
    commit 6e0e34d85cd46ceb37d16054e97a373a32770f6c upstream.
    
    f_audio_complete() copies req->length bytes into a 4-byte stack
    variable:
    
      u32 data = 0;
      memcpy(&data, req->buf, req->length);
    
    req->length is derived from the host-controlled USB request path,
    which can lead to a stack out-of-bounds write.
    
    Validate req->actual against the expected payload size for the
    supported control selectors and decode only the expected amount
    of data.
    
    This avoids copying a host-influenced length into a fixed-size
    stack object.
    
    Signed-off-by: Taegu Ha <[email protected]>
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: u_ether: Fix NULL pointer deref in eth_get_drvinfo [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Mon Mar 16 15:49:09 2026 +0800

    usb: gadget: u_ether: Fix NULL pointer deref in eth_get_drvinfo
    
    commit e002e92e88e12457373ed096b18716d97e7bbb20 upstream.
    
    Commit ec35c1969650 ("usb: gadget: f_ncm: Fix net_device lifecycle with
    device_move") reparents the gadget device to /sys/devices/virtual during
    unbind, clearing the gadget pointer. If the userspace tool queries on
    the surviving interface during this detached window, this leads to a
    NULL pointer dereference.
    
    Unable to handle kernel NULL pointer dereference
    Call trace:
     eth_get_drvinfo+0x50/0x90
     ethtool_get_drvinfo+0x5c/0x1f0
     __dev_ethtool+0xaec/0x1fe0
     dev_ethtool+0x134/0x2e0
     dev_ioctl+0x338/0x560
    
    Add a NULL check for dev->gadget in eth_get_drvinfo(). When detached,
    skip copying the fw_version and bus_info strings, which is natively
    handled by ethtool_get_drvinfo for empty strings.
    
    Suggested-by: Val Packett <[email protected]>
    Reported-by: Val Packett <[email protected]>
    Closes: https://lore.kernel.org/linux-usb/[email protected]/
    Fixes: ec35c1969650 ("usb: gadget: f_ncm: Fix net_device lifecycle with device_move")
    Cc: stable <[email protected]>
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: u_ether: Fix race between gether_disconnect and eth_stop [+ + +]
Author: Kuen-Han Tsai <[email protected]>
Date:   Wed Mar 11 17:12:15 2026 +0800

    usb: gadget: u_ether: Fix race between gether_disconnect and eth_stop
    
    commit e1eabb072c75681f78312c484ccfffb7430f206e upstream.
    
    A race condition between gether_disconnect() and eth_stop() leads to a
    NULL pointer dereference. Specifically, if eth_stop() is triggered
    concurrently while gether_disconnect() is tearing down the endpoints,
    eth_stop() attempts to access the cleared endpoint descriptor, causing
    the following NPE:
    
      Unable to handle kernel NULL pointer dereference
      Call trace:
       __dwc3_gadget_ep_enable+0x60/0x788
       dwc3_gadget_ep_enable+0x70/0xe4
       usb_ep_enable+0x60/0x15c
       eth_stop+0xb8/0x108
    
    Because eth_stop() crashes while holding the dev->lock, the thread
    running gether_disconnect() fails to acquire the same lock and spins
    forever, resulting in a hardlockup:
    
      Core - Debugging Information for Hardlockup core(7)
      Call trace:
       queued_spin_lock_slowpath+0x94/0x488
       _raw_spin_lock+0x64/0x6c
       gether_disconnect+0x19c/0x1e8
       ncm_set_alt+0x68/0x1a0
       composite_setup+0x6a0/0xc50
    
    The root cause is that the clearing of dev->port_usb in
    gether_disconnect() is delayed until the end of the function.
    
    Move the clearing of dev->port_usb to the very beginning of
    gether_disconnect() while holding dev->lock. This cuts off the link
    immediately, ensuring eth_stop() will see dev->port_usb as NULL and
    safely bail out.
    
    Fixes: 2b3d942c4878 ("usb ethernet gadget: split out network core")
    Cc: stable <[email protected]>
    Signed-off-by: Kuen-Han Tsai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: uvc: fix NULL pointer dereference during unbind race [+ + +]
Author: Jimmy Hu <[email protected]>
Date:   Fri Mar 20 14:54:27 2026 +0800

    usb: gadget: uvc: fix NULL pointer dereference during unbind race
    
    commit eba2936bbe6b752a31725a9eb5c674ecbf21ee7d upstream.
    
    Commit b81ac4395bbe ("usb: gadget: uvc: allow for application to cleanly
    shutdown") introduced two stages of synchronization waits totaling 1500ms
    in uvc_function_unbind() to prevent several types of kernel panics.
    However, this timing-based approach is insufficient during power
    management (PM) transitions.
    
    When the PM subsystem starts freezing user space processes, the
    wait_event_interruptible_timeout() is aborted early, which allows the
    unbind thread to proceed and nullify the gadget pointer
    (cdev->gadget = NULL):
    
    [  814.123447][  T947] configfs-gadget.g1 gadget.0: uvc: uvc_function_unbind()
    [  814.178583][ T3173] PM: suspend entry (deep)
    [  814.192487][ T3173] Freezing user space processes
    [  814.197668][  T947] configfs-gadget.g1 gadget.0: uvc: uvc_function_unbind no clean disconnect, wait for release
    
    When the PM subsystem resumes or aborts the suspend and tasks are
    restarted, the V4L2 release path is executed and attempts to access the
    already nullified gadget pointer, triggering a kernel panic:
    
    [  814.292597][    C0] PM: pm_system_irq_wakeup: 479 triggered dhdpcie_host_wake
    [  814.386727][ T3173] Restarting tasks ...
    [  814.403522][ T4558] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000030
    [  814.404021][ T4558] pc : usb_gadget_deactivate+0x14/0xf4
    [  814.404031][ T4558] lr : usb_function_deactivate+0x54/0x94
    [  814.404078][ T4558] Call trace:
    [  814.404080][ T4558]  usb_gadget_deactivate+0x14/0xf4
    [  814.404083][ T4558]  usb_function_deactivate+0x54/0x94
    [  814.404087][ T4558]  uvc_function_disconnect+0x1c/0x5c
    [  814.404092][ T4558]  uvc_v4l2_release+0x44/0xac
    [  814.404095][ T4558]  v4l2_release+0xcc/0x130
    
    Address the race condition and NULL pointer dereference by:
    
    1. State Synchronization (flag + mutex)
    Introduce a 'func_unbound' flag in struct uvc_device. This allows
    uvc_function_disconnect() to safely skip accessing the nullified
    cdev->gadget pointer. As suggested by Alan Stern, this flag is protected
    by a new mutex (uvc->lock) to ensure proper memory ordering and prevent
    instruction reordering or speculative loads. This mutex is also used to
    protect 'func_connected' for consistent state management.
    
    2. Explicit Synchronization (completion)
    Use a completion to synchronize uvc_function_unbind() with the
    uvc_vdev_release() callback. This prevents Use-After-Free (UAF) by
    ensuring struct uvc_device is freed after all video device resources
    are released.
    
    Fixes: b81ac4395bbe ("usb: gadget: uvc: allow for application to cleanly shutdown")
    Cc: stable <[email protected]>
    Suggested-by: Alan Stern <[email protected]>
    Signed-off-by: Jimmy Hu <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: host: xhci-sideband: delegate offload_usage tracking to class drivers [+ + +]
Author: Guan-Yu Lin <[email protected]>
Date:   Wed Apr 1 12:32:18 2026 +0000

    usb: host: xhci-sideband: delegate offload_usage tracking to class drivers
    
    commit 5abbe6ecc6203355c770bf232ade88e29c960049 upstream.
    
    Remove usb_offload_get() and usb_offload_put() from the xHCI sideband
    interrupter creation and removal paths.
    
    The responsibility of manipulating offload_usage now lies entirely with
    the USB class drivers. They have the precise context of when an offload
    data stream actually starts and stops, ensuring a much more accurate
    representation of offload activity for power management.
    
    Cc: stable <[email protected]>
    Fixes: ef82a4803aab ("xhci: sideband: add api to trace sideband usage")
    Signed-off-by: Guan-Yu Lin <[email protected]>
    Tested-by: Hailong Liu <[email protected]>
    Tested-by: [email protected]
    Acked-by: Mathias Nyman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: misc: usbio: Fix URB memory leak on submit failure [+ + +]
Author: Felix Gu <[email protected]>
Date:   Tue Mar 31 20:05:08 2026 +0800

    usb: misc: usbio: Fix URB memory leak on submit failure
    
    commit 33cfe0709b6bf1a7f1a16d5e8d65d003a71b6a21 upstream.
    
    When usb_submit_urb() fails in usbio_probe(), the previously allocated
    URB is never freed, causing a memory leak.
    
    Fix this by jumping to err_free_urb label to properly release the URB
    on the error path.
    
    Fixes: 121a0f839dbb ("usb: misc: Add Intel USBIO bridge driver")
    Cc: stable <[email protected]>
    Signed-off-by: Felix Gu <[email protected]>
    Reviewed-by: Oliver Neukum <[email protected]>
    Reviewed-by: Hans de Goede <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: quirks: add DELAY_INIT quirk for another Silicon Motion flash drive [+ + +]
Author: Miao Li <[email protected]>
Date:   Thu Mar 19 13:39:27 2026 +0800

    usb: quirks: add DELAY_INIT quirk for another Silicon Motion flash drive
    
    commit dd36014ec6042f424ef51b923e607772f7502ee7 upstream.
    
    Another Silicon Motion flash drive also randomly work incorrectly
    (lsusb does not list the device) on Huawei hisi platforms during
    500 reboot cycles, and the DELAY_INIT quirk fixes this issue.
    
    Signed-off-by: Miao Li <[email protected]>
    Cc: stable <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
USB: serial: io_edgeport: add support for Blackbox IC135A [+ + +]
Author: Frej Drejhammar <[email protected]>
Date:   Sun Feb 22 18:00:42 2026 +0100

    USB: serial: io_edgeport: add support for Blackbox IC135A
    
    commit 0e01c3416eb863ee7f156a9d7e7421ec0a9f68a0 upstream.
    
    The Blackbox 724-746-5500 USB Director USB-RS-232 HUB, part number
    IC135A, is a rebadged Edgeport/4 with its own USB device id.
    
    Signed-off-by: Frej Drejhammar <[email protected]>
    Cc: [email protected]
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

USB: serial: option: add MeiG Smart SRM825WN [+ + +]
Author: Ernestas Kulik <[email protected]>
Date:   Tue Mar 24 13:07:16 2026 +0200

    USB: serial: option: add MeiG Smart SRM825WN
    
    commit e8d0ed37bd51da52da6225d278e330c2f18a6198 upstream.
    
    Add support for the SDX62-based MeiG Smart SRM825WN module.
    
    If#= 0: RNDIS
    If#= 1: RNDIS
    If#= 2: Diag
    If#= 3: AT
    If#= 4: AT
    If#= 5: NMEA
    
    T:  Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 19 Spd=480  MxCh= 0
    D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=2dee ProdID=4d38 Rev= 5.04
    S:  Manufacturer=MEIG
    S:  Product=LTE-A Module
    S:  SerialNumber=da47a175
    C:* #Ifs= 6 Cfg#= 1 Atr=80 MxPwr=500mA
    A:  FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
    I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
    E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
    I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
    E:  Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=30 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=84(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=40 Driver=option
    E:  Ad=86(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=60 Driver=option
    E:  Ad=88(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    Signed-off-by: Ernestas Kulik <[email protected]>
    Cc: [email protected]
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

USB: serial: option: add support for Rolling Wireless RW135R-GL [+ + +]
Author: Wanquan Zhong <[email protected]>
Date:   Mon Mar 16 19:55:12 2026 +0800

    USB: serial: option: add support for Rolling Wireless RW135R-GL
    
    commit 01e8d0f742222f1e68f48180d5480097adf7ae9f upstream.
    
    Add VID/PID 33f8:1003 for the Rolling Wireless RW135R-GL M.2 module,
    which is used in laptop debug cards with MBIM interface for
    Linux/Chrome OS. The device supports mbim, pipe functionalities.
    
    Here are the outputs of usb-devices:
    T:  Bus=04 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#=  2 Spd=5000 MxCh= 0
    D:  Ver= 3.20 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 9 #Cfgs=  1
    P:  Vendor=33f8 ProdID=1003 Rev=05.15
    S:  Manufacturer=Rolling Wireless S.a.r.l.
    S:  Product=Rolling RW135R-GL Module
    S:  SerialNumber=12345678
    C:  #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=896mA
    I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
    E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=32ms
    I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
    E:  Ad=0f(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
    E:  Ad=8e(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=40 Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS=1024 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS=1024 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
    
    Signed-off-by: Wanquan Zhong <[email protected]>
    Cc: [email protected]
    Signed-off-by: Johan Hovold <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
usb: typec: thunderbolt: Set enter_vdo during initialization [+ + +]
Author: Andrei Kuchynski <[email protected]>
Date:   Tue Mar 24 10:30:12 2026 +0000

    usb: typec: thunderbolt: Set enter_vdo during initialization
    
    commit 3b8ae9817686efb3ea789ca9d4efdff2ce9c1c04 upstream.
    
    In the current implementation, if a cable's alternate mode enter operation
    is not supported, the tbt->plug[TYPEC_PLUG_SOP_P] pointer is cleared by the
    time tbt_enter_mode() is called. This prevents the driver from identifying
    the cable's VDO.
    
    As a result, the Thunderbolt connection falls back to the default
    TBT_CABLE_USB3_PASSIVE speed, even if the cable supports higher speeds.
    To ensure the correct VDO value is used during mode entry, calculate and
    store the enter_vdo earlier during the initialization phase in tbt_ready().
    
    Cc: stable <[email protected]>
    Fixes: 100e25738659 ("usb: typec: Add driver for Thunderbolt 3 Alternate Mode")
    Tested-by: Madhu M <[email protected]>
    Signed-off-by: Andrei Kuchynski <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Reviewed-by: Benson Leung <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: typec: ucsi: validate connector number in ucsi_notify_common() [+ + +]
Author: Nathan Rebello <[email protected]>
Date:   Fri Mar 13 18:24:53 2026 -0400

    usb: typec: ucsi: validate connector number in ucsi_notify_common()
    
    commit d2d8c17ac01a1b1f638ea5d340a884ccc5015186 upstream.
    
    The connector number extracted from CCI via UCSI_CCI_CONNECTOR() is a
    7-bit field (0-127) that is used to index into the connector array in
    ucsi_connector_change(). However, the array is only allocated for the
    number of connectors reported by the device (typically 2-4 entries).
    
    A malicious or malfunctioning device could report an out-of-range
    connector number in the CCI, causing an out-of-bounds array access in
    ucsi_connector_change().
    
    Add a bounds check in ucsi_notify_common(), the central point where CCI
    is parsed after arriving from hardware, so that bogus connector numbers
    are rejected before they propagate further.
    
    Fixes: bdc62f2bae8f ("usb: typec: ucsi: Simplified registration and I/O API")
    Cc: stable <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Signed-off-by: Nathan Rebello <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: ulpi: fix double free in ulpi_register_interface() error path [+ + +]
Author: Guangshuo Li <[email protected]>
Date:   Wed Apr 1 10:51:42 2026 +0800

    usb: ulpi: fix double free in ulpi_register_interface() error path
    
    commit 01af542392b5d41fd659d487015a71f627accce3 upstream.
    
    When device_register() fails, ulpi_register() calls put_device() on
    ulpi->dev.
    
    The device release callback ulpi_dev_release() drops the OF node
    reference and frees ulpi, but the current error path in
    ulpi_register_interface() then calls kfree(ulpi) again, causing a
    double free.
    
    Let put_device() handle the cleanup through ulpi_dev_release() and
    avoid freeing ulpi again in ulpi_register_interface().
    
    Fixes: 289fcff4bcdb1 ("usb: add bus type for USB ULPI")
    Cc: stable <[email protected]>
    Signed-off-by: Guangshuo Li <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: usbtmc: Flush anchored URBs in usbtmc_release [+ + +]
Author: Heitor Alves de Siqueira <[email protected]>
Date:   Thu Mar 12 09:27:28 2026 -0300

    usb: usbtmc: Flush anchored URBs in usbtmc_release
    
    commit 8a768552f7a8276fb9e01d49773d2094ace7c8f1 upstream.
    
    When calling usbtmc_release, pending anchored URBs must be flushed or
    killed to prevent use-after-free errors (e.g. in the HCD giveback
    path). Call usbtmc_draw_down() to allow anchored URBs to be completed.
    
    Fixes: 4f3c8d6eddc2 ("usb: usbtmc: Support Read Status Byte with SRQ per file")
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=9a3c54f52bd1edbd975f
    Cc: stable <[email protected]>
    Signed-off-by: Heitor Alves de Siqueira <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
virtio_net: clamp rss_max_key_size to NETDEV_RSS_KEY_LEN [+ + +]
Author: Srujana Challa <[email protected]>
Date:   Thu Mar 26 19:53:44 2026 +0530

    virtio_net: clamp rss_max_key_size to NETDEV_RSS_KEY_LEN
    
    commit b4e5f04c58a29c499faa85d12952ca9a4faf1cb9 upstream.
    
    rss_max_key_size in the virtio spec is the maximum key size supported by
    the device, not a mandatory size the driver must use. Also the value 40
    is a spec minimum, not a spec maximum.
    
    The current code rejects RSS and can fail probe when the device reports a
    larger rss_max_key_size than the driver buffer limit. Instead, clamp the
    effective key length to min(device rss_max_key_size, NETDEV_RSS_KEY_LEN)
    and keep RSS enabled.
    
    This keeps probe working on devices that advertise larger maximum key sizes
    while respecting the netdev RSS key buffer size limit.
    
    Fixes: 3f7d9c1964fc ("virtio_net: Add hash_key_length check")
    Cc: [email protected]
    Signed-off-by: Srujana Challa <[email protected]>
    Acked-by: Michael S. Tsirkin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
vt: discard stale unicode buffer on alt screen exit after resize [+ + +]
Author: Liav Mordouch <[email protected]>
Date:   Fri Mar 27 20:02:04 2026 +0300

    vt: discard stale unicode buffer on alt screen exit after resize
    
    commit 40014493cece72a0be5672cd86763e53fb3ec613 upstream.
    
    When enter_alt_screen() saves vc_uni_lines into vc_saved_uni_lines and
    sets vc_uni_lines to NULL, a subsequent console resize via vc_do_resize()
    skips reallocating the unicode buffer because vc_uni_lines is NULL.
    However, vc_saved_uni_lines still points to the old buffer allocated for
    the original dimensions.
    
    When leave_alt_screen() later restores vc_saved_uni_lines, the buffer
    dimensions no longer match vc_rows/vc_cols. Any operation that iterates
    over the unicode buffer using the current dimensions (e.g. csi_J clearing
    the screen) will access memory out of bounds, causing a kernel oops:
    
      BUG: unable to handle page fault for address: 0x0000002000000020
      RIP: 0010:csi_J+0x133/0x2d0
    
    The faulting address 0x0000002000000020 is two adjacent u32 space
    characters (0x20) interpreted as a pointer, read from the row data area
    past the end of the 25-entry pointer array in a buffer allocated for
    80x25 but accessed with 240x67 dimensions.
    
    Fix this by checking whether the console dimensions changed while in the
    alternate screen. If they did, free the stale saved buffer instead of
    restoring it. The unicode screen will be lazily rebuilt via
    vc_uniscr_check() when next needed.
    
    Fixes: 5eb608319bb5 ("vt: save/restore unicode screen buffer for alternate screen")
    Cc: stable <[email protected]>
    Tested-by: Liav Mordouch <[email protected]>
    Signed-off-by: Liav Mordouch <[email protected]>
    Reviewed-by: Nicolas Pitre <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

vt: resize saved unicode buffer on alt screen exit after resize [+ + +]
Author: Nicolas Pitre <[email protected]>
Date:   Fri Mar 27 23:09:47 2026 -0400

    vt: resize saved unicode buffer on alt screen exit after resize
    
    commit 3ddbea7542ae529c1a88ef9a8b1ce169126211f6 upstream.
    
    Instead of discarding the saved unicode buffer when the console was
    resized while in the alternate screen, resize it to the current
    dimensions using vc_uniscr_copy_area() to preserve its content. This
    properly restores the unicode screen on alt screen exit rather than
    lazily rebuilding it from a lossy reverse glyph translation.
    
    On allocation failure the stale buffer is freed and vc_uni_lines is
    set to NULL so it gets lazily rebuilt via vc_uniscr_check() when next
    needed.
    
    Fixes: 40014493cece ("vt: discard stale unicode buffer on alt screen exit after resize")
    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]>

 
vxlan: validate ND option lengths in vxlan_na_create [+ + +]
Author: Yang Yang <[email protected]>
Date:   Thu Mar 26 03:44:41 2026 +0000

    vxlan: validate ND option lengths in vxlan_na_create
    
    commit afa9a05e6c4971bd5586f1b304e14d61fb3d9385 upstream.
    
    vxlan_na_create() walks ND options according to option-provided
    lengths. A malformed option can make the parser advance beyond the
    computed option span or use a too-short source LLADDR option payload.
    
    Validate option lengths against the remaining NS option area before
    advancing, and only read source LLADDR when the option is large enough
    for an Ethernet address.
    
    Fixes: 4b29dba9c085 ("vxlan: fix nonfunctional neigh_reduce()")
    Cc: [email protected]
    Reported-by: Yifan Wu <[email protected]>
    Reported-by: Juefei Pu <[email protected]>
    Tested-by: Ao Zhou <[email protected]>
    Co-developed-by: Yuan Tan <[email protected]>
    Signed-off-by: Yuan Tan <[email protected]>
    Suggested-by: Xin Liu <[email protected]>
    Signed-off-by: Yang Yang <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Acked-by: Nikolay Aleksandrov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
wifi: ath11k: Pass the correct value of each TID during a stop AMPDU session [+ + +]
Author: Reshma Immaculate Rajkumar <[email protected]>
Date:   Thu Mar 19 12:26:08 2026 +0530

    wifi: ath11k: Pass the correct value of each TID during a stop AMPDU session
    
    [ Upstream commit e225b36f83d7926c1f2035923bb0359d851fdb73 ]
    
    During ongoing traffic, a request to stop an AMPDU session
    for one TID could incorrectly affect other active sessions.
    This can happen because an incorrect TID reference would be
    passed when updating the BA session state, causing the wrong
    session to be stopped. As a result, the affected session would
    be reduced to a minimal BA size, leading to a noticeable
    throughput degradation.
    
    Fix this issue by passing the correct argument from
    ath11k_dp_rx_ampdu_stop() to ath11k_peer_rx_tid_reo_update()
    during a stop AMPDU session. Instead of passing peer->tx_tid, which
    is the base address of the array, corresponding to TID 0; pass
    the value of &peer->rx_tid[params->tid], where the different TID numbers
    are accounted for.
    
    Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.9.0.1-02146-QCAHKSWPL_SILICONZ-1
    
    Fixes: d5c65159f2895 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
    Signed-off-by: Reshma Immaculate Rajkumar <[email protected]>
    Reviewed-by: Baochen Qiang <[email protected]>
    Reviewed-by: Vasanthakumar Thiagarajan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jeff Johnson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: iwlwifi: cfg: add new device names [+ + +]
Author: Johannes Berg <[email protected]>
Date:   Mon Sep 15 11:34:27 2025 +0300

    wifi: iwlwifi: cfg: add new device names
    
    [ Upstream commit 30d47d8fe781469ebd4e38240999767f139effb2 ]
    
    Add a couple of device names so that these new devices will
    be shown correctly.
    
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://patch.msgid.link/20250915113137.1cbc0251532f.I6183a6a08a7998e598042a50c7d7a6b82f9fa58e@changeid
    Stable-dep-of: 687a95d204e7 ("wifi: iwlwifi: mld: correctly set wifi generation data")
    Signed-off-by: Sasha Levin <[email protected]>

wifi: iwlwifi: disable EHT if the device doesn't allow it [+ + +]
Author: Emmanuel Grumbach <[email protected]>
Date:   Sun Oct 19 11:45:13 2025 +0300

    wifi: iwlwifi: disable EHT if the device doesn't allow it
    
    [ Upstream commit 7ed47d42943fba8ced505f62d4358f63963bb968 ]
    
    We have a few devices that don't allow EHT. Make sure we reflect this
    towards mac80211 so that we won't try to enable it.
    
    Signed-off-by: Emmanuel Grumbach <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://patch.msgid.link/20251019114304.71121f4e5557.I49e2329d4121f9e52d0889156d0c3e8778e27d88@changeid
    Stable-dep-of: 687a95d204e7 ("wifi: iwlwifi: mld: correctly set wifi generation data")
    Signed-off-by: Sasha Levin <[email protected]>

wifi: iwlwifi: fix remaining kernel-doc warnings [+ + +]
Author: Johannes Berg <[email protected]>
Date:   Mon Sep 15 11:34:29 2025 +0300

    wifi: iwlwifi: fix remaining kernel-doc warnings
    
    [ Upstream commit 58a4ebe3168813a04bef08f7858a63b199e866e1 ]
    
    Fix the remaining kernel-doc warnings across the driver.
    
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://patch.msgid.link/20250915113137.f94b6d4ef142.I91007eed4cf37125ca7a012f2021615b4fa9eb66@changeid
    Stable-dep-of: ec66ec6a5a8f ("wifi: iwlwifi: mld: Fix MLO scan timing")
    Signed-off-by: Sasha Levin <[email protected]>

wifi: iwlwifi: mld: correctly set wifi generation data [+ + +]
Author: Johannes Berg <[email protected]>
Date:   Tue Mar 24 11:33:26 2026 +0200

    wifi: iwlwifi: mld: correctly set wifi generation data
    
    [ Upstream commit 687a95d204e72e52f2e6bc7a994cc82f76b2678f ]
    
    In each MAC context, the firmware expects the wifi generation
    data, i.e. whether or not HE/EHT (and in the future UHR) is
    enabled on that MAC.
    
    However, this is currently handled wrong in two ways:
     - EHT is only enabled when the interface is also an MLD, but
       we currently allow (despite the spec) connecting with EHT
       but without MLO.
     - when HE or EHT are used by TDLS peers, the firmware needs
       to have them enabled regardless of the AP
    
    Fix this by iterating setting up the data depending on the
    interface type:
     - for AP, just set it according to the BSS configuration
     - for monitor, set it according to HW capabilities
     - otherwise, particularly for client, iterate all stations
       and then their links on the interface in question and set
       according to their capabilities, this handles the AP and
       TDLS peers. Re-calculate this whenever a TDLS station is
       marked associated or removed so that it's kept updated,
       for the AP it's already updated on assoc/disassoc.
    
    Fixes: d1e879ec600f ("wifi: iwlwifi: add iwlmld sub-driver")
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://patch.msgid.link/20260319110722.404713b22177.Ic972b5e557d011a5438f8f97c1e793cc829e2ea9@changeid
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

wifi: iwlwifi: mld: Fix MLO scan timing [+ + +]
Author: Pagadala Yesu Anjaneyulu <[email protected]>
Date:   Tue Mar 24 11:33:24 2026 +0200

    wifi: iwlwifi: mld: Fix MLO scan timing
    
    [ Upstream commit ec66ec6a5a8f53e7c70085749e8d68f4431c630f ]
    
    Calculate MLO scan start time based on actual
    scan start notification from firmware instead of recording
    time when scan command is sent.
    
    Currently, MLO scan start time was captured immediately
    after sending the scan command to firmware. However, the
    actual scan start time may differ due to the FW being busy
    with a previous scan.
    
    In that case, the link selection code will think that the MLO
    scan is too old, and will warn.
    
    To fix it, Implement start scan notification handling to
    capture the precise moment when firmware begins the scan
    operation.
    
    Fixes: 9324731b9985 ("wifi: iwlwifi: mld: avoid selecting bad links")
    Signed-off-by: Pagadala Yesu Anjaneyulu <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://patch.msgid.link/20260324113316.4c56b8bac533.I6e656d8cc30bb82c96aabadedd62bd67f4c46bf9@changeid
    Signed-off-by: Sasha Levin <[email protected]>

wifi: iwlwifi: mvm: don't send a 6E related command when not supported [+ + +]
Author: Emmanuel Grumbach <[email protected]>
Date:   Tue Mar 24 11:33:25 2026 +0200

    wifi: iwlwifi: mvm: don't send a 6E related command when not supported
    
    [ Upstream commit 323156c3541e23da7e582008a7ac30cd51b60acd ]
    
    MCC_ALLOWED_AP_TYPE_CMD is related to 6E support. Do not send it if the
    device doesn't support 6E.
    Apparently, the firmware is mistakenly advertising support for this
    command even on AX201 which does not support 6E and then the firmware
    crashes.
    
    Fixes: 0d2fc8821a7d ("wifi: iwlwifi: nvm: parse the VLP/AFC bit from regulatory")
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220804
    Signed-off-by: Emmanuel Grumbach <[email protected]>
    Reviewed-by: Johannes Berg <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://patch.msgid.link/20260324113316.e171f0163f2a.I0c444d1f82d1773054e7ffc391ad49697d58f44e@changeid
    Signed-off-by: Sasha Levin <[email protected]>

wifi: iwlwifi: mvm: fix potential out-of-bounds read in iwl_mvm_nd_match_info_handler() [+ + +]
Author: Alexey Velichayshiy <[email protected]>
Date:   Sat Feb 7 18:03:22 2026 +0300

    wifi: iwlwifi: mvm: fix potential out-of-bounds read in iwl_mvm_nd_match_info_handler()
    
    commit 744fabc338e87b95c4d1ff7c95bc8c0f834c6d99 upstream.
    
    The memcpy function assumes the dynamic array notif->matches is at least
    as large as the number of bytes to copy. Otherwise, results->matches may
    contain unwanted data. To guarantee safety, extend the validation in one
    of the checks to ensure sufficient packet length.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Cc: [email protected]
    Fixes: 5ac54afd4d97 ("wifi: iwlwifi: mvm: Add handling for scan offload match info notification")
    Signed-off-by: Alexey Velichayshiy <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

wifi: mac80211: check tdls flag in ieee80211_tdls_oper [+ + +]
Author: Deepanshu Kartikey <[email protected]>
Date:   Fri Mar 13 14:54:17 2026 +0530

    wifi: mac80211: check tdls flag in ieee80211_tdls_oper
    
    [ Upstream commit 7d73872d949c488a1d7c308031d6a9d89b5e0a8b ]
    
    When NL80211_TDLS_ENABLE_LINK is called, the code only checks if the
    station exists but not whether it is actually a TDLS station. This
    allows the operation to proceed for non-TDLS stations, causing
    unintended side effects like modifying channel context and HT
    protection before failing.
    
    Add a check for sta->sta.tdls early in the ENABLE_LINK case, before
    any side effects occur, to ensure the operation is only allowed for
    actual TDLS peers.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=56b6a844a4ea74487b7b
    Tested-by: [email protected]
    Suggested-by: Johannes Berg <[email protected]>
    Signed-off-by: Deepanshu Kartikey <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: virt_wifi: remove SET_NETDEV_DEV to avoid use-after-free [+ + +]
Author: Alexander Popov <[email protected]>
Date:   Wed Mar 25 01:46:02 2026 +0300

    wifi: virt_wifi: remove SET_NETDEV_DEV to avoid use-after-free
    
    commit 789b06f9f39cdc7e895bdab2c034e39c41c8f8d6 upstream.
    
    Currently we execute `SET_NETDEV_DEV(dev, &priv->lowerdev->dev)` for
    the virt_wifi net devices. However, unregistering a virt_wifi device in
    netdev_run_todo() can happen together with the device referenced by
    SET_NETDEV_DEV().
    
    It can result in use-after-free during the ethtool operations performed
    on a virt_wifi device that is currently being unregistered. Such a net
    device can have the `dev.parent` field pointing to the freed memory,
    but ethnl_ops_begin() calls `pm_runtime_get_sync(dev->dev.parent)`.
    
    Let's remove SET_NETDEV_DEV for virt_wifi to avoid bugs like this:
    
     ==================================================================
     BUG: KASAN: slab-use-after-free in __pm_runtime_resume+0xe2/0xf0
     Read of size 2 at addr ffff88810cfc46f8 by task pm/606
    
     Call Trace:
      <TASK>
      dump_stack_lvl+0x4d/0x70
      print_report+0x170/0x4f3
      ? __pfx__raw_spin_lock_irqsave+0x10/0x10
      kasan_report+0xda/0x110
      ? __pm_runtime_resume+0xe2/0xf0
      ? __pm_runtime_resume+0xe2/0xf0
      __pm_runtime_resume+0xe2/0xf0
      ethnl_ops_begin+0x49/0x270
      ethnl_set_features+0x23c/0xab0
      ? __pfx_ethnl_set_features+0x10/0x10
      ? kvm_sched_clock_read+0x11/0x20
      ? local_clock_noinstr+0xf/0xf0
      ? local_clock+0x10/0x30
      ? kasan_save_track+0x25/0x60
      ? __kasan_kmalloc+0x7f/0x90
      ? genl_family_rcv_msg_attrs_parse.isra.0+0x150/0x2c0
      genl_family_rcv_msg_doit+0x1e7/0x2c0
      ? __pfx_genl_family_rcv_msg_doit+0x10/0x10
      ? __pfx_cred_has_capability.isra.0+0x10/0x10
      ? stack_trace_save+0x8e/0xc0
      genl_rcv_msg+0x411/0x660
      ? __pfx_genl_rcv_msg+0x10/0x10
      ? __pfx_ethnl_set_features+0x10/0x10
      netlink_rcv_skb+0x121/0x380
      ? __pfx_genl_rcv_msg+0x10/0x10
      ? __pfx_netlink_rcv_skb+0x10/0x10
      ? __pfx_down_read+0x10/0x10
      genl_rcv+0x23/0x30
      netlink_unicast+0x60f/0x830
      ? __pfx_netlink_unicast+0x10/0x10
      ? __pfx___alloc_skb+0x10/0x10
      netlink_sendmsg+0x6ea/0xbc0
      ? __pfx_netlink_sendmsg+0x10/0x10
      ? __futex_queue+0x10b/0x1f0
      ____sys_sendmsg+0x7a2/0x950
      ? copy_msghdr_from_user+0x26b/0x430
      ? __pfx_____sys_sendmsg+0x10/0x10
      ? __pfx_copy_msghdr_from_user+0x10/0x10
      ___sys_sendmsg+0xf8/0x180
      ? __pfx____sys_sendmsg+0x10/0x10
      ? __pfx_futex_wait+0x10/0x10
      ? fdget+0x2e4/0x4a0
      __sys_sendmsg+0x11f/0x1c0
      ? __pfx___sys_sendmsg+0x10/0x10
      do_syscall_64+0xe2/0x570
      ? exc_page_fault+0x66/0xb0
      entry_SYSCALL_64_after_hwframe+0x77/0x7f
      </TASK>
    
    This fix may be combined with another one in the ethtool subsystem:
    https://lore.kernel.org/all/[email protected]/T/#u
    
    Fixes: d43c65b05b848e0b ("ethtool: runtime-resume netdev parent in ethnl_ops_begin")
    Cc: [email protected]
    Signed-off-by: Alexander Popov <[email protected]>
    Acked-by: Greg Kroah-Hartman <[email protected]>
    Reviewed-by: Breno Leitao <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

wifi: wilc1000: fix u8 overflow in SSID scan buffer size calculation [+ + +]
Author: Yasuaki Torimaru <[email protected]>
Date:   Tue Mar 24 19:06:24 2026 +0900

    wifi: wilc1000: fix u8 overflow in SSID scan buffer size calculation
    
    commit d049e56b1739101d1c4d81deedb269c52a8dbba0 upstream.
    
    The variable valuesize is declared as u8 but accumulates the total
    length of all SSIDs to scan. Each SSID contributes up to 33 bytes
    (IEEE80211_MAX_SSID_LEN + 1), and with WILC_MAX_NUM_PROBED_SSID (10)
    SSIDs the total can reach 330, which wraps around to 74 when stored
    in a u8.
    
    This causes kmalloc to allocate only 75 bytes while the subsequent
    memcpy writes up to 331 bytes into the buffer, resulting in a 256-byte
    heap buffer overflow.
    
    Widen valuesize from u8 to u32 to accommodate the full range.
    
    Fixes: c5c77ba18ea6 ("staging: wilc1000: Add SDIO/SPI 802.11 driver")
    Cc: [email protected]
    Signed-off-by: Yasuaki Torimaru <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86/kexec: Disable KCOV instrumentation after load_segments() [+ + +]
Author: Aleksandr Nogikh <[email protected]>
Date:   Wed Mar 25 16:48:24 2026 +0100

    x86/kexec: Disable KCOV instrumentation after load_segments()
    
    commit 917e3ad3321e75ca0223d5ccf26ceda116aa51e1 upstream.
    
    The load_segments() function changes segment registers, invalidating GS base
    (which KCOV relies on for per-cpu data). When CONFIG_KCOV is enabled, any
    subsequent instrumented C code call (e.g. native_gdt_invalidate()) begins
    crashing the kernel in an endless loop.
    
    To reproduce the problem, it's sufficient to do kexec on a KCOV-instrumented
    kernel:
    
      $ kexec -l /boot/otherKernel
      $ kexec -e
    
    The real-world context for this problem is enabling crash dump collection in
    syzkaller. For this, the tool loads a panic kernel before fuzzing and then
    calls makedumpfile after the panic. This workflow requires both CONFIG_KEXEC
    and CONFIG_KCOV to be enabled simultaneously.
    
    Adding safeguards directly to the KCOV fast-path (__sanitizer_cov_trace_pc())
    is also undesirable as it would introduce an extra performance overhead.
    
    Disabling instrumentation for the individual functions would be too fragile,
    so disable KCOV instrumentation for the entire machine_kexec_64.c and
    physaddr.c. If coverage-guided fuzzing ever needs these components in the
    future, other approaches should be considered.
    
    The problem is not relevant for 32 bit kernels as CONFIG_KCOV is not supported
    there.
    
      [ bp: Space out comment for better readability. ]
    
    Fixes: 0d345996e4cb ("x86/kernel: increase kcov coverage under arch/x86/kernel folder")
    Signed-off-by: Aleksandr Nogikh <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Dmitry Vyukov <[email protected]>
    Cc: [email protected]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>