Changelog in Linux kernel 6.6.134

 
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]>

 
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]>

 
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]>

 
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_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_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: 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]>

 
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: 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: do not free data reservation in fallback from inline due to -ENOSPC [+ + +]
Author: Filipe Manana <[email protected]>
Date:   Fri Dec 12 17:10:10 2025 +0000

    btrfs: do not free data reservation in fallback from inline due to -ENOSPC
    
    [ Upstream commit f8da41de0bff9eb1d774a7253da0c9f637c4470a ]
    
    If we fail to create an inline extent due to -ENOSPC, we will attempt to
    go through the normal COW path, reserve an extent, create an ordered
    extent, etc. However we were always freeing the reserved qgroup data,
    which is wrong since we will use data. Fix this by freeing the reserved
    qgroup data in __cow_file_range_inline() only if we are not doing the
    fallback (ret is <= 0).
    
    Reviewed-by: Qu Wenruo <[email protected]>
    Signed-off-by: Filipe Manana <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[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: fix the qgroup data free range for inline data extents [+ + +]
Author: Qu Wenruo <[email protected]>
Date:   Fri Nov 15 16:33:43 2024 +1030

    btrfs: fix the qgroup data free range for inline data extents
    
    [ Upstream commit 0bb067ca64e35536f1f5d9ef6aaafc40f4833623 ]
    
    Inside function __cow_file_range_inline() since the inlined data no
    longer take any data space, we need to free up the reserved space.
    
    However the code is still using the old page size == sector size
    assumption, and will not handle subpage case well.
    
    Thankfully it is not going to cause any problems because we have two extra
    safe nets:
    
    - Inline data extents creation is disabled for sector size < page size
      cases for now
      But it won't stay that for long.
    
    - btrfs_qgroup_free_data() will only clear ranges which have been already
      reserved
      So even if we pass a range larger than what we need, it should still
      be fine, especially there is only reserved space for a single block at
      file offset 0 of an inline data extent.
    
    But just for the sake of consistency, fix the call site to use
    sectorsize instead of page size.
    
    Reviewed-by: Filipe Manana <[email protected]>
    Signed-off-by: Qu Wenruo <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Stable-dep-of: f8da41de0bff ("btrfs: do not free data reservation in fallback from inline due to -ENOSPC")
    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]>

 
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: 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]>

 
dmaengine: fsl-edma: change to guard(mutex) within fsl_edma3_xlate() [+ + +]
Author: Joy Zou <[email protected]>
Date:   Tue Mar 31 19:37:04 2026 -0400

    dmaengine: fsl-edma: change to guard(mutex) within fsl_edma3_xlate()
    
    [ Upstream commit 90d21f6e57a898ef02810404dd3866acaf707ebf ]
    
    Introduce a scope guard to automatically unlock the mutex within
    fsl_edma3_xlate() to simplify the code.
    
    Prepare to add source ID checks in the future.
    
    Signed-off-by: Joy Zou <[email protected]>
    Reviewed-by: Frank Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Stable-dep-of: 2e7b5cf72e51 ("dmaengine: fsl-edma: fix channel parameter config for fixed channel requests")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

dmaengine: fsl-edma: fix channel parameter config for fixed channel requests [+ + +]
Author: Joy Zou <[email protected]>
Date:   Tue Mar 31 19:37:05 2026 -0400

    dmaengine: fsl-edma: fix channel parameter config for fixed channel requests
    
    [ Upstream commit 2e7b5cf72e51c9cf9c8b75190189c757df31ddd9 ]
    
    Configure only the requested channel when a fixed channel is specified
    to avoid modifying other channels unintentionally.
    
    Fix parameter configuration when a fixed DMA channel is requested on
    i.MX9 AON domain and i.MX8QM/QXP/DXL platforms. When a client requests
    a fixed channel (e.g., channel 6), the driver traverses channels 0-5
    and may unintentionally modify their configuration if they are unused.
    
    This leads to issues such as setting the `is_multi_fifo` flag unexpectedly,
    causing memcpy tests to fail when using the dmatest tool.
    
    Only affect edma memcpy test when the channel is fixed.
    
    Fixes: 72f5801a4e2b ("dmaengine: fsl-edma: integrate v3 support")
    Signed-off-by: Joy Zou <[email protected]>
    Cc: [email protected]
    Reviewed-by: Frank Li <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[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/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]>

 
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]>

 
ext4: handle wraparound when searching for blocks for indirect mapped blocks [+ + +]
Author: Theodore Ts'o <[email protected]>
Date:   Fri Apr 3 07:50:27 2026 -0400

    ext4: handle wraparound when searching for blocks for indirect mapped blocks
    
    [ Upstream commit bb81702370fad22c06ca12b6e1648754dbc37e0f ]
    
    Commit 4865c768b563 ("ext4: always allocate blocks only from groups
    inode can use") restricts what blocks will be allocated for indirect
    block based files to block numbers that fit within 32-bit block
    numbers.
    
    However, when using a review bot running on the latest Gemini LLM to
    check this commit when backporting into an LTS based kernel, it raised
    this concern:
    
       If ac->ac_g_ex.fe_group is >= ngroups (for instance, if the goal
       group was populated via stream allocation from s_mb_last_groups),
       then start will be >= ngroups.
    
       Does this allow allocating blocks beyond the 32-bit limit for
       indirect block mapped files? The commit message mentions that
       ext4_mb_scan_groups_linear() takes care to not select unsupported
       groups. However, its loop uses group = *start, and the very first
       iteration will call ext4_mb_scan_group() with this unsupported
       group because next_linear_group() is only called at the end of the
       iteration.
    
    After reviewing the code paths involved and considering the LLM
    review, I determined that this can happen when there is a file system
    where some files/directories are extent-mapped and others are
    indirect-block mapped.  To address this, add a safety clamp in
    ext4_mb_scan_groups().
    
    Fixes: 4865c768b563 ("ext4: always allocate blocks only from groups inode can use")
    Cc: Jan Kara <[email protected]>
    Reviewed-by: Baokun Li <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Signed-off-by: Theodore Ts'o <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Cc: [email protected]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ext4: publish jinode after initialization [+ + +]
Author: Li Chen <[email protected]>
Date:   Thu Apr 2 13:13:31 2026 -0400

    ext4: publish jinode after initialization
    
    [ Upstream commit 1aec30021edd410b986c156f195f3d23959a9d11 ]
    
    ext4_inode_attach_jinode() publishes ei->jinode to concurrent users.
    It used to set ei->jinode before jbd2_journal_init_jbd_inode(),
    allowing a reader to observe a non-NULL jinode with i_vfs_inode
    still unset.
    
    The fast commit flush path can then pass this jinode to
    jbd2_wait_inode_data(), which dereferences i_vfs_inode->i_mapping and
    may crash.
    
    Below is the crash I observe:
    ```
    BUG: unable to handle page fault for address: 000000010beb47f4
    PGD 110e51067 P4D 110e51067 PUD 0
    Oops: Oops: 0000 [#1] SMP NOPTI
    CPU: 1 UID: 0 PID: 4850 Comm: fc_fsync_bench_ Not tainted 6.18.0-00764-g795a690c06a5 #1 PREEMPT(voluntary)
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.17.0-2-2 04/01/2014
    RIP: 0010:xas_find_marked+0x3d/0x2e0
    Code: e0 03 48 83 f8 02 0f 84 f0 01 00 00 48 8b 47 08 48 89 c3 48 39 c6 0f 82 fd 01 00 00 48 85 c9 74 3d 48 83 f9 03 77 63 4c 8b 0f <49> 8b 71 08 48 c7 47 18 00 00 00 00 48 89 f1 83 e1 03 48 83 f9 02
    RSP: 0018:ffffbbee806e7bf0 EFLAGS: 00010246
    RAX: 000000000010beb4 RBX: 000000000010beb4 RCX: 0000000000000003
    RDX: 0000000000000001 RSI: 0000002000300000 RDI: ffffbbee806e7c10
    RBP: 0000000000000001 R08: 0000002000300000 R09: 000000010beb47ec
    R10: ffff9ea494590090 R11: 0000000000000000 R12: 0000002000300000
    R13: ffffbbee806e7c90 R14: ffff9ea494513788 R15: ffffbbee806e7c88
    FS: 00007fc2f9e3e6c0(0000) GS:ffff9ea6b1444000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000000010beb47f4 CR3: 0000000119ac5000 CR4: 0000000000750ef0
    PKRU: 55555554
    Call Trace:
    <TASK>
    filemap_get_folios_tag+0x87/0x2a0
    __filemap_fdatawait_range+0x5f/0xd0
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? __schedule+0x3e7/0x10c0
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? preempt_count_sub+0x5f/0x80
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? cap_safe_nice+0x37/0x70
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? preempt_count_sub+0x5f/0x80
    ? srso_alias_return_thunk+0x5/0xfbef5
    filemap_fdatawait_range_keep_errors+0x12/0x40
    ext4_fc_commit+0x697/0x8b0
    ? ext4_file_write_iter+0x64b/0x950
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? preempt_count_sub+0x5f/0x80
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? vfs_write+0x356/0x480
    ? srso_alias_return_thunk+0x5/0xfbef5
    ? preempt_count_sub+0x5f/0x80
    ext4_sync_file+0xf7/0x370
    do_fsync+0x3b/0x80
    ? syscall_trace_enter+0x108/0x1d0
    __x64_sys_fdatasync+0x16/0x20
    do_syscall_64+0x62/0x2c0
    entry_SYSCALL_64_after_hwframe+0x76/0x7e
    ...
    ```
    
    Fix this by initializing the jbd2_inode first.
    Use smp_wmb() and WRITE_ONCE() to publish ei->jinode after
    initialization. Readers use READ_ONCE() to fetch the pointer.
    
    Fixes: a361293f5fede ("jbd2: Fix oops in jbd2_journal_file_inode()")
    Cc: [email protected]
    Signed-off-by: Li Chen <[email protected]>
    Reviewed-by: Jan Kara <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Theodore Ts'o <[email protected]>
    Cc: [email protected]
    [ adapted READ_ONCE(ei->jinode) to use pos->jinode ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
fork: defer linking file vma until vma is fully initialized [+ + +]
Author: Miaohe Lin <[email protected]>
Date:   Thu Apr 2 18:13:11 2026 +0200

    fork: defer linking file vma until vma is fully initialized
    
    [ Upstream commit 35e351780fa9d8240dd6f7e4f245f9ea37e96c19 ]
    
    Thorvald reported a WARNING [1]. And the root cause is below race:
    
     CPU 1                                  CPU 2
     fork                                   hugetlbfs_fallocate
      dup_mmap                               hugetlbfs_punch_hole
       i_mmap_lock_write(mapping);
       vma_interval_tree_insert_after -- Child vma is visible through i_mmap tree.
       i_mmap_unlock_write(mapping);
       hugetlb_dup_vma_private -- Clear vma_lock outside i_mmap_rwsem!
                                             i_mmap_lock_write(mapping);
                                             hugetlb_vmdelete_list
                                              vma_interval_tree_foreach
                                               hugetlb_vma_trylock_write -- Vma_lock is cleared.
       tmp->vm_ops->open -- Alloc new vma_lock outside i_mmap_rwsem!
                                               hugetlb_vma_unlock_write -- Vma_lock is assigned!!!
                                             i_mmap_unlock_write(mapping);
    
    hugetlb_dup_vma_private() and hugetlb_vm_op_open() are called outside
    i_mmap_rwsem lock while vma lock can be used in the same time.  Fix this
    by deferring linking file vma until vma is fully initialized.  Those vmas
    should be initialized first before they can be used.
    
    [tk: Adapted to 6.6 stable where vma_iter_bulk_store() can fail
    (unlike mainline which uses __mt_dup() for pre-allocation).
    Preserved error handling via goto fail_nomem_vmi_store. Previous
    backport (cec11fa2eb512) was reverted (dd782da470761) due to
    xfstests failures.]
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 8d9bfb260814 ("hugetlb: add vma based lock for pmd sharing")
    Signed-off-by: Miaohe Lin <[email protected]>
    Reported-by: Thorvald Natvig <[email protected]>
    Closes: https://lore.kernel.org/linux-mm/20240129161735.6gmjsswx62o4pbja@revolver/T/ [1]
    Reviewed-by: Jane Chu <[email protected]>
    Cc: Christian Brauner <[email protected]>
    Cc: Heiko Carstens <[email protected]>
    Cc: Kent Overstreet <[email protected]>
    Cc: Liam R. Howlett <[email protected]>
    Cc: Mateusz Guzik <[email protected]>
    Cc: Matthew Wilcox (Oracle) <[email protected]>
    Cc: Miaohe Lin <[email protected]>
    Cc: Muchun Song <[email protected]>
    Cc: Oleg Nesterov <[email protected]>
    Cc: Peng Zhang <[email protected]>
    Cc: Tycho Andersen <[email protected]>
    Cc: [email protected]
    Signed-off-by: Andrew Morton <[email protected]>
    Assisted-by: Claude:claude-opus-4.6
    Suggested-by: David Nyström <[email protected]>
    Signed-off-by: Tugrul Kukul <[email protected]>
    Acked-by: Alex Williamson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
gfs2: Improve gfs2_consist_inode() usage [+ + +]
Author: Andrew Price <[email protected]>
Date:   Fri Apr 3 13:51:53 2026 +0800

    gfs2: Improve gfs2_consist_inode() usage
    
    [ Upstream commit 10398ef57aa189153406c110f5957145030f08fe ]
    
    gfs2_consist_inode() logs an error message with the source file and line
    number. When we jump before calling it, the line number becomes less
    useful as it no longer relates to the source of the error. To aid
    troubleshooting, replace the gotos with the gfs2_consist_inode() calls
    so that the error messages are more informative.
    
    Signed-off-by: Andrew Price <[email protected]>
    Signed-off-by: Andreas Gruenbacher <[email protected]>
    Signed-off-by: Ruohan Lan <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

gfs2: Validate i_depth for exhash directories [+ + +]
Author: Andrew Price <[email protected]>
Date:   Fri Apr 3 13:51:54 2026 +0800

    gfs2: Validate i_depth for exhash directories
    
    [ Upstream commit 557c024ca7250bb65ae60f16c02074106c2f197b ]
    
    A fuzzer test introduced corruption that ends up with a depth of 0 in
    dir_e_read(), causing an undefined shift by 32 at:
    
      index = hash >> (32 - dip->i_depth);
    
    As calculated in an open-coded way in dir_make_exhash(), the minimum
    depth for an exhash directory is ilog2(sdp->sd_hash_ptrs) and 0 is
    invalid as sdp->sd_hash_ptrs is fixed as sdp->bsize / 16 at mount time.
    
    So we can avoid the undefined behaviour by checking for depth values
    lower than the minimum in gfs2_dinode_in(). Values greater than the
    maximum are already being checked for there.
    
    Also switch the calculation in dir_make_exhash() to use ilog2() to
    clarify how the depth is calculated.
    
    Tested with the syzkaller repro.c and xfstests '-g quick'.
    
    Reported-by: [email protected]
    Signed-off-by: Andrew Price <[email protected]>
    Signed-off-by: Andreas Gruenbacher <[email protected]>
    Signed-off-by: Sasha Levin <[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]>

 
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: (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 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]>

 
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: 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: 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: 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: inv_icm42600: fix odr switch when turning buffer off [+ + +]
Author: Jean-Baptiste Maneyrol <[email protected]>
Date:   Tue Mar 17 16:59:03 2026 +0000

    iio: imu: inv_icm42600: fix odr switch when turning buffer off
    
    [ Upstream commit ffd32db8263d2d785a2c419486a450dc80693235 ]
    
    ODR switch is done in 2 steps when FIFO is on : change the ODR register
    value and acknowledge change when reading the FIFO ODR change flag.
    When we are switching odr and turning buffer off just afterward, we are
    losing the FIFO ODR change flag and ODR switch is blocked.
    
    Fix the issue by force applying any waiting ODR change when turning
    buffer off.
    
    Fixes: ec74ae9fd37c ("iio: imu: inv_icm42600: add accurate timestamping")
    Signed-off-by: Jean-Baptiste Maneyrol <[email protected]>
    Cc: [email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[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]>

 
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]>

 
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]>

 
Linux: Linux 6.6.134 [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Sat Apr 11 14:19:36 2026 +0200

    Linux 6.6.134
    
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Shung-Hsi Yu <[email protected]>
    Tested-by: Peter Schneider <[email protected]>
    Tested-by: Francesco Dolcini <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Tested-by: Miguel Ojeda <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Barry K. Nathan <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
LoongArch: vDSO: Emit GNU_EH_FRAME correctly [+ + +]
Author: Xi Ruoyao <[email protected]>
Date:   Wed Apr 1 00:34:17 2026 +0800

    LoongArch: vDSO: Emit GNU_EH_FRAME correctly
    
    With -fno-asynchronous-unwind-tables and --no-eh-frame-hdr (the default
    of the linker), the GNU_EH_FRAME segment (specified by vdso.lds.S) is
    empty.  This is not valid, as the current DWARF specification mandates
    the first byte of the EH frame to be the version number 1.  It causes
    some unwinders to complain, for example the ClickHouse query profiler
    spams the log with messages:
    
        clickhouse-server[365854]: libunwind: unsupported .eh_frame_hdr
        version: 127 at 7ffffffb0000
    
    Here "127" is just the byte located at the p_vaddr (0, i.e. the
    beginning of the vDSO) of the empty GNU_EH_FRAME segment. Cross-
    checking with /proc/365854/maps has also proven 7ffffffb0000 is the
    start of vDSO in the process VM image.
    
    In LoongArch the -fno-asynchronous-unwind-tables option seems just a
    MIPS legacy, and MIPS only uses this option to satisfy the MIPS-specific
    "genvdso" program, per the commit cfd75c2db17e ("MIPS: VDSO: Explicitly
    use -fno-asynchronous-unwind-tables").  IIRC it indicates some inherent
    limitation of the MIPS ELF ABI and has nothing to do with LoongArch.  So
    we can simply flip it over to -fasynchronous-unwind-tables and pass
    --eh-frame-hdr for linking the vDSO, allowing the profilers to unwind the
    stack for statistics even if the sample point is taken when the PC is in
    the vDSO.
    
    However simply adjusting the options above would exploit an issue: when
    the libgcc unwinder saw the invalid GNU_EH_FRAME segment, it silently
    falled back to a machine-specific routine to match the code pattern of
    rt_sigreturn() and extract the registers saved in the sigframe if the
    code pattern is matched.  As unwinding from signal handlers is vital for
    libgcc to support pthread cancellation etc., the fall-back routine had
    been silently keeping the LoongArch Linux systems functioning since
    Linux 5.19.  But when we start to emit GNU_EH_FRAME with the correct
    format, fall-back routine will no longer be used and libgcc will fail
    to unwind the sigframe, and unwinding from signal handlers will no
    longer work, causing dozens of glibc test failures.  To make it possible
    to unwind from signal handlers again, it's necessary to code the unwind
    info in __vdso_rt_sigreturn via .cfi_* directives.
    
    The offsets in the .cfi_* directives depend on the layout of struct
    sigframe, notably the offset of sigcontext in the sigframe.  To use the
    offset in the assembly file, factor out struct sigframe into a header to
    allow asm-offsets.c to output the offset for assembly.
    
    To work around a long-term issue in the libgcc unwinder (the pc is
    unconditionally substracted by 1: doing so is technically incorrect for
    a signal frame), a nop instruction is included with the two real
    instructions in __vdso_rt_sigreturn in the same FDE PC range.  The same
    hack has been used on x86 for a long time.
    
    (cherry picked from commit e4878c37f6679fdea91b27a0f4e60a871f0b7bad)
    
    Cc: [email protected]
    Fixes: c6b99bed6b8f ("LoongArch: Add VDSO and VSYSCALL support")
    Signed-off-by: Xi Ruoyao <[email protected]>
    Signed-off-by: Huacai Chen <[email protected]>
    Signed-off-by: Xi Ruoyao <[email protected]>
    Signed-off-by: Sasha Levin <[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]>

 
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/huge_memory: fix folio isn't locked in softleaf_to_folio() [+ + +]
Author: Jinjiang Tu <[email protected]>
Date:   Tue Mar 31 07:51:22 2026 -0400

    mm/huge_memory: fix folio isn't locked in softleaf_to_folio()
    
    [ Upstream commit 4c5e7f0fcd592801c9cc18f29f80fbee84eb8669 ]
    
    On arm64 server, we found folio that get from migration entry isn't locked
    in softleaf_to_folio().  This issue triggers when mTHP splitting and
    zap_nonpresent_ptes() races, and the root cause is lack of memory barrier
    in softleaf_to_folio().  The race is as follows:
    
            CPU0                                             CPU1
    
    deferred_split_scan()                              zap_nonpresent_ptes()
      lock folio
      split_folio()
        unmap_folio()
          change ptes to migration entries
        __split_folio_to_order()                         softleaf_to_folio()
          set flags(including PG_locked) for tail pages    folio = pfn_folio(softleaf_to_pfn(entry))
          smp_wmb()                                        VM_WARN_ON_ONCE(!folio_test_locked(folio))
          prep_compound_page() for tail pages
    
    In __split_folio_to_order(), smp_wmb() guarantees page flags of tail pages
    are visible before the tail page becomes non-compound.  smp_wmb() should
    be paired with smp_rmb() in softleaf_to_folio(), which is missed.  As a
    result, if zap_nonpresent_ptes() accesses migration entry that stores tail
    pfn, softleaf_to_folio() may see the updated compound_head of tail page
    before page->flags.
    
    This issue will trigger VM_WARN_ON_ONCE() in pfn_swap_entry_folio()
    because of the race between folio split and zap_nonpresent_ptes()
    leading to a folio incorrectly undergoing modification without a folio
    lock being held.
    
    This is a BUG_ON() before commit 93976a20345b ("mm: eliminate further
    swapops predicates"), which in merged in v6.19-rc1.
    
    To fix it, add missing smp_rmb() if the softleaf entry is migration entry
    in softleaf_to_folio() and softleaf_to_page().
    
    [[email protected]: update function name and comments]
      Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: e9b61f19858a ("thp: reintroduce split_huge_page()")
    Signed-off-by: Jinjiang Tu <[email protected]>
    Acked-by: David Hildenbrand (Arm) <[email protected]>
    Reviewed-by: Lorenzo Stoakes (Oracle) <[email protected]>
    Cc: Barry Song <[email protected]>
    Cc: Kefeng Wang <[email protected]>
    Cc: Liam Howlett <[email protected]>
    Cc: Michal Hocko <[email protected]>
    Cc: Mike Rapoport <[email protected]>
    Cc: Nanyong Sun <[email protected]>
    Cc: Ryan Roberts <[email protected]>
    Cc: Suren Baghdasaryan <[email protected]>
    Cc: Vlastimil Babka <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    [ adapted fix from leafops.h softleaf_to_page()/softleaf_to_folio() ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
MPTCP: fix lock class name family in pm_nl_create_listen_socket [+ + +]
Author: Li Xiasong <[email protected]>
Date:   Thu Apr 2 19:36:17 2026 +0200

    MPTCP: fix lock class name family in pm_nl_create_listen_socket
    
    commit 7ab4a7c5d969642782b8a5b608da0dd02aa9f229 upstream.
    
    In mptcp_pm_nl_create_listen_socket(), use entry->addr.family
    instead of sk->sk_family for lock class setup. The 'sk' parameter
    is a netlink socket, not the MPTCP subflow socket being created.
    
    Fixes: cee4034a3db1 ("mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket()")
    Signed-off-by: Li Xiasong <[email protected]>
    Reviewed-by: Matthieu Baerts (NGI0) <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    [ Conflict in pm_kernel.c, because commit 8617e85e04bd ("mptcp: pm:
      split in-kernel PM specific code") is not in this version, and moves
      code from pm_netlink.c to pm_kernel.c. ]
    Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[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: 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: correctly handle tunneled traffic on IPV6_CSUM GSO fallback [+ + +]
Author: Willem de Bruijn <[email protected]>
Date:   Tue Mar 31 15:40:11 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: 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: 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: Move devm_{free,request}_irq() out of spin lock area [+ + +]
Author: Kevin Hao <[email protected]>
Date:   Tue Mar 31 15:40:40 2026 -0400

    net: macb: Move devm_{free,request}_irq() out of spin lock area
    
    [ Upstream commit 317e49358ebbf6390fa439ef3c142f9239dd25fb ]
    
    The devm_free_irq() and devm_request_irq() functions should not be
    executed in an atomic context.
    
    During device suspend, all userspace processes and most kernel threads
    are frozen. Additionally, we flush all tx/rx status, disable all macb
    interrupts, and halt rx operations. Therefore, it is safe to split the
    region protected by bp->lock into two independent sections, allowing
    devm_free_irq() and devm_request_irq() to run in a non-atomic context.
    This modification resolves the following lockdep warning:
      BUG: sleeping function called from invalid context at kernel/locking/mutex.c:591
      in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 501, name: rtcwake
      preempt_count: 1, expected: 0
      RCU nest depth: 1, expected: 0
      7 locks held by rtcwake/501:
       #0: ffff0008038c3408 (sb_writers#5){.+.+}-{0:0}, at: vfs_write+0xf8/0x368
       #1: ffff0008049a5e88 (&of->mutex#2){+.+.}-{4:4}, at: kernfs_fop_write_iter+0xbc/0x1c8
       #2: ffff00080098d588 (kn->active#70){.+.+}-{0:0}, at: kernfs_fop_write_iter+0xcc/0x1c8
       #3: ffff800081c84888 (system_transition_mutex){+.+.}-{4:4}, at: pm_suspend+0x1ec/0x290
       #4: ffff0008009ba0f8 (&dev->mutex){....}-{4:4}, at: device_suspend+0x118/0x4f0
       #5: ffff800081d00458 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire+0x4/0x48
       #6: ffff0008031fb9e0 (&bp->lock){-.-.}-{3:3}, at: macb_suspend+0x144/0x558
      irq event stamp: 8682
      hardirqs last  enabled at (8681): [<ffff8000813c7d7c>] _raw_spin_unlock_irqrestore+0x44/0x88
      hardirqs last disabled at (8682): [<ffff8000813c7b58>] _raw_spin_lock_irqsave+0x38/0x98
      softirqs last  enabled at (7322): [<ffff8000800f1b4c>] handle_softirqs+0x52c/0x588
      softirqs last disabled at (7317): [<ffff800080010310>] __do_softirq+0x20/0x2c
      CPU: 1 UID: 0 PID: 501 Comm: rtcwake Not tainted 7.0.0-rc3-next-20260310-yocto-standard+ #125 PREEMPT
      Hardware name: ZynqMP ZCU102 Rev1.1 (DT)
      Call trace:
       show_stack+0x24/0x38 (C)
       __dump_stack+0x28/0x38
       dump_stack_lvl+0x64/0x88
       dump_stack+0x18/0x24
       __might_resched+0x200/0x218
       __might_sleep+0x38/0x98
       __mutex_lock_common+0x7c/0x1378
       mutex_lock_nested+0x38/0x50
       free_irq+0x68/0x2b0
       devm_irq_release+0x24/0x38
       devres_release+0x40/0x80
       devm_free_irq+0x48/0x88
       macb_suspend+0x298/0x558
       device_suspend+0x218/0x4f0
       dpm_suspend+0x244/0x3a0
       dpm_suspend_start+0x50/0x78
       suspend_devices_and_enter+0xec/0x560
       pm_suspend+0x194/0x290
       state_store+0x110/0x158
       kobj_attr_store+0x1c/0x30
       sysfs_kf_write+0xa8/0xd0
       kernfs_fop_write_iter+0x11c/0x1c8
       vfs_write+0x248/0x368
       ksys_write+0x7c/0xf8
       __arm64_sys_write+0x28/0x40
       invoke_syscall+0x4c/0xe8
       el0_svc_common+0x98/0xf0
       do_el0_svc+0x28/0x40
       el0_svc+0x54/0x1e0
       el0t_64_sync_handler+0x84/0x130
       el0t_64_sync+0x198/0x1a0
    
    Fixes: 558e35ccfe95 ("net: macb: WoL support for GEM type of Ethernet controller")
    Cc: [email protected]
    Reviewed-by: Théo Lebrun <[email protected]>
    Signed-off-by: Kevin Hao <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    [ replaced `tmp` variable with direct `MACB_BIT(MAG)` ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[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 use-after-free in add_adev() error path [+ + +]
Author: Guangshuo Li <[email protected]>
Date:   Tue Mar 31 15:40:19 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:   Tue Apr 7 10:11:15 2026 +0200

    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: Greg Kroah-Hartman <[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]>

 
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]>

 
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]>

 
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]>

 
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]>

 
scsi: target: tcm_loop: Drain commands in target_reset handler [+ + +]
Author: Josef Bacik <[email protected]>
Date:   Tue Mar 31 11:20:32 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]>

 
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]>

 
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: 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: 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_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 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 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: 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: 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]>

 
vfio/pci: Insert full vma on mmap'd MMIO fault [+ + +]
Author: Alex Williamson <[email protected]>
Date:   Thu Apr 2 18:13:10 2026 +0200

    vfio/pci: Insert full vma on mmap'd MMIO fault
    
    commit d71a989cf5d961989c273093cdff2550acdde314 upstream.
    
    In order to improve performance of typical scenarios we can try to insert
    the entire vma on fault.  This accelerates typical cases, such as when
    the MMIO region is DMA mapped by QEMU.  The vfio_iommu_type1 driver will
    fault in the entire DMA mapped range through fixup_user_fault().
    
    In synthetic testing, this improves the time required to walk a PCI BAR
    mapping from userspace by roughly 1/3rd.
    
    This is likely an interim solution until vmf_insert_pfn_{pmd,pud}() gain
    support for pfnmaps.
    
    Suggested-by: Yan Zhao <[email protected]>
    Link: https://lore.kernel.org/all/Zl6XdUkt%[email protected]/
    Reviewed-by: Yan Zhao <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alex Williamson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

vfio/pci: Use unmap_mapping_range() [+ + +]
Author: Alex Williamson <[email protected]>
Date:   Thu Apr 2 18:13:09 2026 +0200

    vfio/pci: Use unmap_mapping_range()
    
    commit aac6db75a9fc2c7a6f73e152df8f15101dda38e6 upstream.
    
    With the vfio device fd tied to the address space of the pseudo fs
    inode, we can use the mm to track all vmas that might be mmap'ing
    device BARs, which removes our vma_list and all the complicated lock
    ordering necessary to manually zap each related vma.
    
    Note that we can no longer store the pfn in vm_pgoff if we want to use
    unmap_mapping_range() to zap a selective portion of the device fd
    corresponding to BAR mappings.
    
    This also converts our mmap fault handler to use vmf_insert_pfn()
    because we no longer have a vma_list to avoid the concurrency problem
    with io_remap_pfn_range().  The goal is to eventually use the vm_ops
    huge_fault handler to avoid the additional faulting overhead, but
    vmf_insert_pfn_{pmd,pud}() need to learn about pfnmaps first.
    
    Also, Jason notes that a race exists between unmap_mapping_range() and
    the fops mmap callback if we were to call io_remap_pfn_range() to
    populate the vma on mmap.  Specifically, mmap_region() does call_mmap()
    before it does vma_link_file() which gives a window where the vma is
    populated but invisible to unmap_mapping_range().
    
    Suggested-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alex Williamson <[email protected]>
    Signed-off-by: Axel Rasmussen <[email protected]>
    Signed-off-by: Tugrul Kukul <[email protected]>
    Acked-by: Alex Williamson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
vfio: Create vfio_fs_type with inode per device [+ + +]
Author: Alex Williamson <[email protected]>
Date:   Thu Apr 2 18:13:08 2026 +0200

    vfio: Create vfio_fs_type with inode per device
    
    commit b7c5e64fecfa88764791679cca4786ac65de739e upstream.
    
    By linking all the device fds we provide to userspace to an
    address space through a new pseudo fs, we can use tools like
    unmap_mapping_range() to zap all vmas associated with a device.
    
    Suggested-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Jason Gunthorpe <[email protected]>
    Reviewed-by: Kevin Tian <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alex Williamson <[email protected]>
    Signed-off-by: Sasha Levin <[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: ath11k: skip status ring entry processing [+ + +]
Author: Venkateswara Naralasetty <[email protected]>
Date:   Fri May 3 16:24:16 2024 +0300

    wifi: ath11k: skip status ring entry processing
    
    [ Upstream commit 4c2b796be3a12a11ab611917fafdabc9d3862a1d ]
    
    If STATUS_BUFFER_DONE is not set for a monitor status ring entry,
    we don't process the status ring until STATUS_BUFFER_DONE set
    for that status ring entry.
    
    During LMAC reset it may happen that hardware will not write
    STATUS_BUFFER_DONE tlv in status buffer, in that case we end up
    waiting for STATUS_BUFFER_DONE leading to backpressure on monitor
    status ring.
    
    To fix the issue, when HP (Head Pointer) + 1 entry is peeked and if DMA is not
    done and if HP + 2 entry's DMA done is set, replenish HP + 1 entry and start
    processing in next interrupt. If HP + 2 entry's DMA done is not set, poll onto
    HP + 1 entry DMA done to be set.
    
    Also, during monitor attach HP points to the end of the ring and TP (Tail
    Pointer) points to the start of the ring.  Using ath11k_hal_srng_src_peek() may
    result in processing invalid buffer for the very first interrupt. Since, HW
    starts writing buffer from TP.
    
    To avoid this issue call ath11k_hal_srng_src_next_peek() instead of
    calling ath11k_hal_srng_src_peek().
    
    Tested-on: IPQ5018 hw1.0 AHB WLAN.HK.2.6.0.1-00861-QCAHKSWPL_SILICONZ-1
    
    Signed-off-by: Venkateswara Naralasetty <[email protected]>
    Co-developed-by: Tamizh Chelvam Raja <[email protected]>
    Signed-off-by: Tamizh Chelvam Raja <[email protected]>
    Signed-off-by: Kalle Valo <[email protected]>
    Link: https://msgid.link/[email protected]
    Stable-dep-of: e225b36f83d7 ("wifi: ath11k: Pass the correct value of each TID during a stop AMPDU session")
    Signed-off-by: Sasha Levin <[email protected]>

wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation [+ + +]
Author: P Praneesh <[email protected]>
Date:   Sun Jan 19 22:12:19 2025 +0530

    wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
    
    [ Upstream commit eeadc6baf8b3dcd32787cc84f0473dc2a2850370 ]
    
    Currently, the driver allocates cacheable DMA buffers for the rx_tid
    structure using kzalloc() and dma_map_single(). These buffers are
    long-lived and can persist for the lifetime of the peer, which is not
    advisable. Instead of using kzalloc() and dma_map_single() for allocating
    cacheable DMA buffers, utilize the dma_alloc_noncoherent() helper for the
    allocation of long-lived cacheable DMA buffers, such as the peer's rx_tid.
    Since dma_alloc_noncoherent() returns unaligned physical and virtual
    addresses, align them internally before use within the driver. This
    ensures proper allocation of non-coherent memory through the kernel
    helper.
    
    Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
    Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
    
    Signed-off-by: P Praneesh <[email protected]>
    Tested-by: Tim Harvey <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jeff Johnson <[email protected]>
    Stable-dep-of: e225b36f83d7 ("wifi: ath11k: Pass the correct value of each TID during a stop AMPDU session")
    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: 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/cpu: Enable FSGSBASE early in cpu_init_exception_handling() [+ + +]
Author: Nikunj A Dadhania <[email protected]>
Date:   Tue Mar 31 07:39:33 2026 -0400

    x86/cpu: Enable FSGSBASE early in cpu_init_exception_handling()
    
    [ Upstream commit 05243d490bb7852a8acca7b5b5658019c7797a52 ]
    
    Move FSGSBASE enablement from identify_cpu() to cpu_init_exception_handling()
    to ensure it is enabled before any exceptions can occur on both boot and
    secondary CPUs.
    
    == Background ==
    
    Exception entry code (paranoid_entry()) uses ALTERNATIVE patching based on
    X86_FEATURE_FSGSBASE to decide whether to use RDGSBASE/WRGSBASE instructions
    or the slower RDMSR/SWAPGS sequence for saving/restoring GSBASE.
    
    On boot CPU, ALTERNATIVE patching happens after enabling FSGSBASE in CR4.
    When the feature is available, the code is permanently patched to use
    RDGSBASE/WRGSBASE, which require CR4.FSGSBASE=1 to execute without triggering
    
    == Boot Sequence ==
    
    Boot CPU (with CR pinning enabled):
      trap_init()
        cpu_init()                   <- Uses unpatched code (RDMSR/SWAPGS)
          x2apic_setup()
      ...
      arch_cpu_finalize_init()
        identify_boot_cpu()
          identify_cpu()
            cr4_set_bits(X86_CR4_FSGSBASE)  # Enables the feature
            # This becomes part of cr4_pinned_bits
        ...
        alternative_instructions()   <- Patches code to use RDGSBASE/WRGSBASE
    
    Secondary CPUs (with CR pinning enabled):
      start_secondary()
        cr4_init()                   <- Code already patched, CR4.FSGSBASE=1
                                        set implicitly via cr4_pinned_bits
    
        cpu_init()                   <- exceptions work because FSGSBASE is
                                        already enabled
    
    Secondary CPU (with CR pinning disabled):
      start_secondary()
        cr4_init()                   <- Code already patched, CR4.FSGSBASE=0
        cpu_init()
          x2apic_setup()
            rdmsrq(MSR_IA32_APICBASE)  <- Triggers #VC in SNP guests
              exc_vmm_communication()
                paranoid_entry()       <- Uses RDGSBASE with CR4.FSGSBASE=0
                                          (patched code)
        ...
        ap_starting()
          identify_secondary_cpu()
            identify_cpu()
              cr4_set_bits(X86_CR4_FSGSBASE)  <- Enables the feature, which is
                                                 too late
    
    == CR Pinning ==
    
    Currently, for secondary CPUs, CR4.FSGSBASE is set implicitly through
    CR-pinning: the boot CPU sets it during identify_cpu(), it becomes part of
    cr4_pinned_bits, and cr4_init() applies those pinned bits to secondary CPUs.
    This works but creates an undocumented dependency between cr4_init() and the
    pinning mechanism.
    
    == Problem ==
    
    Secondary CPUs boot after alternatives have been applied globally. They
    execute already-patched paranoid_entry() code that uses RDGSBASE/WRGSBASE
    instructions, which require CR4.FSGSBASE=1. Upcoming changes to CR pinning
    behavior will break the implicit dependency, causing secondary CPUs to
    generate #UD.
    
    This issue manifests itself on AMD SEV-SNP guests, where the rdmsrq() in
    x2apic_setup() triggers a #VC exception early during cpu_init(). The #VC
    handler (exc_vmm_communication()) executes the patched paranoid_entry() path.
    Without CR4.FSGSBASE enabled, RDGSBASE instructions trigger #UD.
    
    == Fix ==
    
    Enable FSGSBASE explicitly in cpu_init_exception_handling() before loading
    exception handlers. This makes the dependency explicit and ensures both
    boot and secondary CPUs have FSGSBASE enabled before paranoid_entry()
    executes.
    
    Fixes: c82965f9e530 ("x86/entry/64: Handle FSGSBASE enabled paranoid entry/exit")
    Reported-by: Borislav Petkov <[email protected]>
    Suggested-by: Sohil Mehta <[email protected]>
    Signed-off-by: Nikunj A Dadhania <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Sohil Mehta <[email protected]>
    Cc: <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    [ adapted to cpu_init_exception_handling(void) lacking FRED and LASS support ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>