Changelog in Linux kernel 6.16.5

 
arm64: mm: Fix CFI failure due to kpti_ng_pgd_alloc function signature [+ + +]
Author: Kees Cook <kees@kernel.org>
Date:   Fri Aug 29 12:07:25 2025 -0700

    arm64: mm: Fix CFI failure due to kpti_ng_pgd_alloc function signature
    
    commit ceca927c86e6f72f72d45487a34368bc9509431d upstream.
    
    Seen during KPTI initialization:
    
      CFI failure at create_kpti_ng_temp_pgd+0x124/0xce8 (target: kpti_ng_pgd_alloc+0x0/0x14; expected type: 0xd61b88b6)
    
    The call site is alloc_init_pud() at arch/arm64/mm/mmu.c:
    
      pud_phys = pgtable_alloc(TABLE_PUD);
    
    alloc_init_pud() has the prototype:
    
      static void alloc_init_pud(p4d_t *p4dp, unsigned long addr, unsigned long end,
                                 phys_addr_t phys, pgprot_t prot,
                                 phys_addr_t (*pgtable_alloc)(enum pgtable_type),
                                 int flags)
    
    where the pgtable_alloc() prototype is declared.
    
    The target (kpti_ng_pgd_alloc) is used in arch/arm64/kernel/cpufeature.c:
    
      create_kpti_ng_temp_pgd(kpti_ng_temp_pgd, __pa(alloc), KPTI_NG_TEMP_VA,
                              PAGE_SIZE, PAGE_KERNEL, kpti_ng_pgd_alloc, 0);
    
    which is an alias for __create_pgd_mapping_locked() with prototype:
    
      extern __alias(__create_pgd_mapping_locked)
      void create_kpti_ng_temp_pgd(pgd_t *pgdir, phys_addr_t phys,
                                   unsigned long virt,
                                   phys_addr_t size, pgprot_t prot,
                                   phys_addr_t (*pgtable_alloc)(enum pgtable_type),
                                   int flags);
    
    __create_pgd_mapping_locked() passes the function pointer down:
    
      __create_pgd_mapping_locked() -> alloc_init_p4d() -> alloc_init_pud()
    
    But the target function (kpti_ng_pgd_alloc) has the wrong signature:
    
      static phys_addr_t __init kpti_ng_pgd_alloc(int shift);
    
    The "int" should be "enum pgtable_type".
    
    To make "enum pgtable_type" available to cpufeature.c, move
    enum pgtable_type definition from arch/arm64/mm/mmu.c to
    arch/arm64/include/asm/mmu.h.
    
    Adjust kpti_ng_pgd_alloc to use "enum pgtable_type" instead of "int".
    The function behavior remains identical (parameter is unused).
    
    Fixes: c64f46ee1377 ("arm64: mm: use enum to identify pgtable level instead of *_SHIFT")
    Cc: <stable@vger.kernel.org> # 6.16.x
    Signed-off-by: Kees Cook <kees@kernel.org>
    Acked-by: Ard Biesheuvel <ardb@kernel.org>
    Link: https://lore.kernel.org/r/20250829190721.it.373-kees@kernel.org
    Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
    Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ASoC: codecs: tx-macro: correct tx_macro_component_drv name [+ + +]
Author: Alexey Klimov <alexey.klimov@linaro.org>
Date:   Wed Aug 6 15:00:30 2025 +0100

    ASoC: codecs: tx-macro: correct tx_macro_component_drv name
    
    [ Upstream commit 43e0da37d5cfb23eec6aeee9422f84d86621ce2b ]
    
    We already have a component driver named "RX-MACRO", which is
    lpass-rx-macro.c. The tx macro component driver's name should
    be "TX-MACRO" accordingly. Fix it.
    
    Cc: Srinivas Kandagatla <srini@kernel.org>
    Signed-off-by: Alexey Klimov <alexey.klimov@linaro.org>
    Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
    Link: https://patch.msgid.link/20250806140030.691477-1-alexey.klimov@linaro.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: rt1320: fix random cycle mute issue [+ + +]
Author: Shuming Fan <shumingf@realtek.com>
Date:   Thu Aug 7 17:24:32 2025 +0800

    ASoC: rt1320: fix random cycle mute issue
    
    [ Upstream commit f48d7a1b0bf11d16d8c9f77a5b9c80a82272f625 ]
    
    This patch fixed the random cycle mute issue that occurs during long-time playback.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    Link: https://patch.msgid.link/20250807092432.997989-1-shumingf@realtek.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: rt721: fix FU33 Boost Volume control not working [+ + +]
Author: Shuming Fan <shumingf@realtek.com>
Date:   Fri Aug 8 13:57:06 2025 +0800

    ASoC: rt721: fix FU33 Boost Volume control not working
    
    [ Upstream commit 633e391d45bda3fc848d26bee6bbe57ef2935713 ]
    
    This patch fixed FU33 Boost Volume control not working.
    
    Signed-off-by: Shuming Fan <shumingf@realtek.com>
    Link: https://patch.msgid.link/20250808055706.1110766-1-shumingf@realtek.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
atm: atmtcp: Prevent arbitrary write in atmtcp_recv_control(). [+ + +]
Author: Kuniyuki Iwashima <kuniyu@google.com>
Date:   Thu Aug 21 02:18:24 2025 +0000

    atm: atmtcp: Prevent arbitrary write in atmtcp_recv_control().
    
    [ Upstream commit ec79003c5f9d2c7f9576fc69b8dbda80305cbe3a ]
    
    syzbot reported the splat below. [0]
    
    When atmtcp_v_open() or atmtcp_v_close() is called via connect()
    or close(), atmtcp_send_control() is called to send an in-kernel
    special message.
    
    The message has ATMTCP_HDR_MAGIC in atmtcp_control.hdr.length.
    Also, a pointer of struct atm_vcc is set to atmtcp_control.vcc.
    
    The notable thing is struct atmtcp_control is uAPI but has a
    space for an in-kernel pointer.
    
      struct atmtcp_control {
            struct atmtcp_hdr hdr;  /* must be first */
      ...
            atm_kptr_t vcc;         /* both directions */
      ...
      } __ATM_API_ALIGN;
    
      typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t;
    
    The special message is processed in atmtcp_recv_control() called
    from atmtcp_c_send().
    
    atmtcp_c_send() is vcc->dev->ops->send() and called from 2 paths:
    
      1. .ndo_start_xmit() (vcc->send() == atm_send_aal0())
      2. vcc_sendmsg()
    
    The problem is sendmsg() does not validate the message length and
    userspace can abuse atmtcp_recv_control() to overwrite any kptr
    by atmtcp_control.
    
    Let's add a new ->pre_send() hook to validate messages from sendmsg().
    
    [0]:
    Oops: general protection fault, probably for non-canonical address 0xdffffc00200000ab: 0000 [#1] SMP KASAN PTI
    KASAN: probably user-memory-access in range [0x0000000100000558-0x000000010000055f]
    CPU: 0 UID: 0 PID: 5865 Comm: syz-executor331 Not tainted 6.17.0-rc1-syzkaller-00215-gbab3ce404553 #0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
    RIP: 0010:atmtcp_recv_control drivers/atm/atmtcp.c:93 [inline]
    RIP: 0010:atmtcp_c_send+0x1da/0x950 drivers/atm/atmtcp.c:297
    Code: 4d 8d 75 1a 4c 89 f0 48 c1 e8 03 42 0f b6 04 20 84 c0 0f 85 15 06 00 00 41 0f b7 1e 4d 8d b7 60 05 00 00 4c 89 f0 48 c1 e8 03 <42> 0f b6 04 20 84 c0 0f 85 13 06 00 00 66 41 89 1e 4d 8d 75 1c 4c
    RSP: 0018:ffffc90003f5f810 EFLAGS: 00010203
    RAX: 00000000200000ab RBX: 0000000000000000 RCX: 0000000000000000
    RDX: ffff88802a510000 RSI: 00000000ffffffff RDI: ffff888030a6068c
    RBP: ffff88802699fb40 R08: ffff888030a606eb R09: 1ffff1100614c0dd
    R10: dffffc0000000000 R11: ffffffff8718fc40 R12: dffffc0000000000
    R13: ffff888030a60680 R14: 000000010000055f R15: 00000000ffffffff
    FS:  00007f8d7e9236c0(0000) GS:ffff888125c1c000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 000000000045ad50 CR3: 0000000075bde000 CR4: 00000000003526f0
    Call Trace:
     <TASK>
     vcc_sendmsg+0xa10/0xc60 net/atm/common.c:645
     sock_sendmsg_nosec net/socket.c:714 [inline]
     __sock_sendmsg+0x219/0x270 net/socket.c:729
     ____sys_sendmsg+0x505/0x830 net/socket.c:2614
     ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2668
     __sys_sendmsg net/socket.c:2700 [inline]
     __do_sys_sendmsg net/socket.c:2705 [inline]
     __se_sys_sendmsg net/socket.c:2703 [inline]
     __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2703
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    RIP: 0033:0x7f8d7e96a4a9
    Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
    RSP: 002b:00007f8d7e923198 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
    RAX: ffffffffffffffda RBX: 00007f8d7e9f4308 RCX: 00007f8d7e96a4a9
    RDX: 0000000000000000 RSI: 0000200000000240 RDI: 0000000000000005
    RBP: 00007f8d7e9f4300 R08: 65732f636f72702f R09: 65732f636f72702f
    R10: 65732f636f72702f R11: 0000000000000246 R12: 00007f8d7e9c10ac
    R13: 00007f8d7e9231a0 R14: 0000200000000200 R15: 0000200000000250
     </TASK>
    Modules linked in:
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: syzbot+1741b56d54536f4ec349@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/68a6767c.050a0220.3d78fd.0011.GAE@google.com/
    Tested-by: syzbot+1741b56d54536f4ec349@syzkaller.appspotmail.com
    Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20250821021901.2814721-1-kuniyu@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
blk-zoned: Fix a lockdep complaint about recursive locking [+ + +]
Author: Bart Van Assche <bvanassche@acm.org>
Date:   Mon Aug 25 11:27:19 2025 -0700

    blk-zoned: Fix a lockdep complaint about recursive locking
    
    commit 198f36f902ec7e99b645382505f74b87a4523ed9 upstream.
    
    If preparing a write bio fails then blk_zone_wplug_bio_work() calls
    bio_endio() with zwplug->lock held. If a device mapper driver is stacked
    on top of the zoned block device then this results in nested locking of
    zwplug->lock. The resulting lockdep complaint is a false positive
    because this is nested locking and not recursive locking. Suppress this
    false positive by calling blk_zone_wplug_bio_io_error() without holding
    zwplug->lock. This is safe because no code in
    blk_zone_wplug_bio_io_error() depends on zwplug->lock being held. This
    patch suppresses the following lockdep complaint:
    
    WARNING: possible recursive locking detected
    --------------------------------------------
    kworker/3:0H/46 is trying to acquire lock:
    ffffff882968b830 (&zwplug->lock){-...}-{2:2}, at: blk_zone_write_plug_bio_endio+0x64/0x1f0
    
    but task is already holding lock:
    ffffff88315bc230 (&zwplug->lock){-...}-{2:2}, at: blk_zone_wplug_bio_work+0x8c/0x48c
    
    other info that might help us debug this:
     Possible unsafe locking scenario:
    
           CPU0
           ----
      lock(&zwplug->lock);
      lock(&zwplug->lock);
    
     *** DEADLOCK ***
    
     May be due to missing lock nesting notation
    
    3 locks held by kworker/3:0H/46:
     #0: ffffff8809486758 ((wq_completion)sdd_zwplugs){+.+.}-{0:0}, at: process_one_work+0x1bc/0x65c
     #1: ffffffc085de3d70 ((work_completion)(&zwplug->bio_work)){+.+.}-{0:0}, at: process_one_work+0x1e4/0x65c
     #2: ffffff88315bc230 (&zwplug->lock){-...}-{2:2}, at: blk_zone_wplug_bio_work+0x8c/0x48c
    
    stack backtrace:
    CPU: 3 UID: 0 PID: 46 Comm: kworker/3:0H Tainted: G        W  OE      6.12.38-android16-5-maybe-dirty-4k #1 8b362b6f76e3645a58cd27d86982bce10d150025
    Tainted: [W]=WARN, [O]=OOT_MODULE, [E]=UNSIGNED_MODULE
    Hardware name: Spacecraft board based on MALIBU (DT)
    Workqueue: sdd_zwplugs blk_zone_wplug_bio_work
    Call trace:
     dump_backtrace+0xfc/0x17c
     show_stack+0x18/0x28
     dump_stack_lvl+0x40/0xa0
     dump_stack+0x18/0x24
     print_deadlock_bug+0x38c/0x398
     __lock_acquire+0x13e8/0x2e1c
     lock_acquire+0x134/0x2b4
     _raw_spin_lock_irqsave+0x5c/0x80
     blk_zone_write_plug_bio_endio+0x64/0x1f0
     bio_endio+0x9c/0x240
     __dm_io_complete+0x214/0x260
     clone_endio+0xe8/0x214
     bio_endio+0x218/0x240
     blk_zone_wplug_bio_work+0x204/0x48c
     process_one_work+0x26c/0x65c
     worker_thread+0x33c/0x498
     kthread+0x110/0x134
     ret_from_fork+0x10/0x20
    
    Cc: stable@vger.kernel.org
    Cc: Damien Le Moal <dlemoal@kernel.org>
    Cc: Christoph Hellwig <hch@lst.de>
    Fixes: dd291d77cc90 ("block: Introduce zone write plugging")
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
    Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
    Link: https://lore.kernel.org/r/20250825182720.1697203-1-bvanassche@acm.org
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
block: validate QoS before calling __rq_qos_done_bio() [+ + +]
Author: Nilay Shroff <nilay@linux.ibm.com>
Date:   Tue Aug 26 22:00:32 2025 +0530

    block: validate QoS before calling __rq_qos_done_bio()
    
    [ Upstream commit e3ef9445cd9d90e43de0bd3cd55d437773dfd139 ]
    
    If a bio has BIO_QOS_xxx set, it doesn't guarantee that q->rq_qos is
    also present at-least for stacked block devices. For instance, in case
    of NVMe when multipath is enabled, the bottom device may have QoS
    enabled but top device doesn't. So always validate QoS is enabled and
    q->rq_qos is present before calling __rq_qos_done_bio().
    
    Fixes: 370ac285f23a ("block: avoid cpu_hotplug_lock depedency on freeze_lock")
    Reported-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
    Closes: https://lore.kernel.org/all/3a07b752-06a4-4eee-b302-f4669feb859d@linux.ibm.com/
    Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
    Link: https://lore.kernel.org/r/20250826163128.1952394-1-nilay@linux.ibm.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Bluetooth: hci_conn: Make unacked packet handling more robust [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Fri Aug 22 13:40:18 2025 -0400

    Bluetooth: hci_conn: Make unacked packet handling more robust
    
    [ Upstream commit 5d7eba62e5eb68347de59b31b347b24f304cf21c ]
    
    This attempts to make unacked packet handling more robust by detecting
    if there are no connections left then restore all buffers of the
    respective pool.
    
    Fixes: 5638d9ea9c01 ("Bluetooth: hci_conn: Fix not restoring ISO buffer count on disconnect")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: hci_event: Detect if HCI_EV_NUM_COMP_PKTS is unbalanced [+ + +]
Author: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date:   Wed Aug 20 17:04:00 2025 -0400

    Bluetooth: hci_event: Detect if HCI_EV_NUM_COMP_PKTS is unbalanced
    
    [ Upstream commit 15bf2c6391bafb14a3020d06ec0761bce0803463 ]
    
    This attempts to detect if HCI_EV_NUM_COMP_PKTS contain an unbalanced
    (more than currently considered outstanding) number of packets otherwise
    it could cause the hcon->sent to underflow and loop around breaking the
    tracking of the outstanding packets pending acknowledgment.
    
    Fixes: f42809185896 ("Bluetooth: Simplify num_comp_pkts_evt function")
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: hci_event: Disconnect device when BIG sync is lost [+ + +]
Author: Yang Li <yang.li@amlogic.com>
Date:   Wed Aug 20 10:16:17 2025 +0800

    Bluetooth: hci_event: Disconnect device when BIG sync is lost
    
    [ Upstream commit 55b9551fcdf6a2fe7f3422918d5697b56794da72 ]
    
    When a BIG sync is lost, the device should be set to "disconnected".
    This ensures symmetry with the ISO path setup, where the device is
    marked as "connected" once the path is established. Without this
    change, the device state remains inconsistent and may lead to a
    memory leak.
    
    Fixes: b2a5f2e1c127 ("Bluetooth: hci_event: Add support for handling LE BIG Sync Lost event")
    Signed-off-by: Yang Li <yang.li@amlogic.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: hci_event: Mark connection as closed during suspend disconnect [+ + +]
Author: Ludovico de Nittis <ludovico.denittis@collabora.com>
Date:   Tue Aug 12 17:55:27 2025 +0200

    Bluetooth: hci_event: Mark connection as closed during suspend disconnect
    
    [ Upstream commit b7fafbc499b5ee164018eb0eefe9027f5a6aaad2 ]
    
    When suspending, the disconnect command for an active Bluetooth
    connection could be issued, but the corresponding
    `HCI_EV_DISCONN_COMPLETE` event might not be received before the system
    completes the suspend process. This can lead to an inconsistent state.
    
    On resume, the controller may auto-accept reconnections from the same
    device (due to suspend event filters), but these new connections are
    rejected by the kernel which still has connection objects from before
    suspend. Resulting in errors like:
    ```
    kernel: Bluetooth: hci0: ACL packet for unknown connection handle 1
    kernel: Bluetooth: hci0: Ignoring HCI_Connection_Complete for existing
    connection
    ```
    
    This is a btmon snippet that shows the issue:
    ```
    < HCI Command: Disconnect (0x01|0x0006) plen 3
            Handle: 1 Address: 78:20:A5:4A:DF:28 (Nintendo Co.,Ltd)
            Reason: Remote User Terminated Connection (0x13)
    > HCI Event: Command Status (0x0f) plen 4
          Disconnect (0x01|0x0006) ncmd 2
            Status: Success (0x00)
    [...]
    // Host suspends with the event filter set for the device
    // On resume, the device tries to reconnect with a new handle
    
    > HCI Event: Connect Complete (0x03) plen 11
            Status: Success (0x00)
            Handle: 2
            Address: 78:20:A5:4A:DF:28 (Nintendo Co.,Ltd)
    
    // Kernel ignores this event because there is an existing connection
    with
    // handle 1
    ```
    
    By explicitly setting the connection state to BT_CLOSED we can ensure a
    consistent state, even if we don't receive the disconnect complete event
    in time.
    
    Link: https://github.com/bluez/bluez/issues/1226
    Fixes: 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier")
    Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: hci_event: Treat UNKNOWN_CONN_ID on disconnect as success [+ + +]
Author: Ludovico de Nittis <ludovico.denittis@collabora.com>
Date:   Tue Aug 12 17:55:26 2025 +0200

    Bluetooth: hci_event: Treat UNKNOWN_CONN_ID on disconnect as success
    
    [ Upstream commit 2f050a5392b7a0928bf836d9891df4851463512c ]
    
    When the host sends an HCI_OP_DISCONNECT command, the controller may
    respond with the status HCI_ERROR_UNKNOWN_CONN_ID (0x02). E.g. this can
    happen on resume from suspend, if the link was terminated by the remote
    device before the event mask was correctly set.
    
    This is a btmon snippet that shows the issue:
    ```
    > ACL Data RX: Handle 3 flags 0x02 dlen 12
          L2CAP: Disconnection Request (0x06) ident 5 len 4
            Destination CID: 65
            Source CID: 72
    < ACL Data TX: Handle 3 flags 0x00 dlen 12
          L2CAP: Disconnection Response (0x07) ident 5 len 4
            Destination CID: 65
            Source CID: 72
    > ACL Data RX: Handle 3 flags 0x02 dlen 12
          L2CAP: Disconnection Request (0x06) ident 6 len 4
            Destination CID: 64
            Source CID: 71
    < ACL Data TX: Handle 3 flags 0x00 dlen 12
          L2CAP: Disconnection Response (0x07) ident 6 len 4
            Destination CID: 64
            Source CID: 71
    < HCI Command: Set Event Mask (0x03|0x0001) plen 8
            Mask: 0x3dbff807fffbffff
              Inquiry Complete
              Inquiry Result
              Connection Complete
              Connection Request
              Disconnection Complete
              Authentication Complete
    [...]
    < HCI Command: Disconnect (0x01|0x0006) plen 3
            Handle: 3 Address: 78:20:A5:4A:DF:28 (Nintendo Co.,Ltd)
            Reason: Remote User Terminated Connection (0x13)
    > HCI Event: Command Status (0x0f) plen 4
          Disconnect (0x01|0x0006) ncmd 1
            Status: Unknown Connection Identifier (0x02)
    ```
    
    Currently, the hci_cs_disconnect function treats any non-zero status
    as a command failure. This can be misleading because the connection is
    indeed being terminated and the controller is confirming that is has no
    knowledge of that connection handle. Meaning that the initial request of
    disconnecting a device should be treated as done.
    
    With this change we allow the function to proceed, following the success
    path, which correctly calls `mgmt_device_disconnected` and ensures a
    consistent state.
    
    Link: https://github.com/bluez/bluez/issues/1226
    Fixes: 182ee45da083 ("Bluetooth: hci_sync: Rework hci_suspend_notifier")
    Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

Bluetooth: hci_sync: fix set_local_name race condition [+ + +]
Author: Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
Date:   Fri Aug 22 12:20:55 2025 +0300

    Bluetooth: hci_sync: fix set_local_name race condition
    
    [ Upstream commit 6bbd0d3f0c23fc53c17409dd7476f38ae0ff0cd9 ]
    
    Function set_name_sync() uses hdev->dev_name field to send
    HCI_OP_WRITE_LOCAL_NAME command, but copying from data to hdev->dev_name
    is called after mgmt cmd was queued, so it is possible that function
    set_name_sync() will read old name value.
    
    This change adds name as a parameter for function hci_update_name_sync()
    to avoid race condition.
    
    Fixes: 6f6ff38a1e14 ("Bluetooth: hci_sync: Convert MGMT_OP_SET_LOCAL_NAME")
    Signed-off-by: Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
    Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
bnxt_en: Adjust TX rings if reservation is less than requested [+ + +]
Author: Michael Chan <michael.chan@broadcom.com>
Date:   Mon Aug 25 10:59:26 2025 -0700

    bnxt_en: Adjust TX rings if reservation is less than requested
    
    [ Upstream commit 1ee581c24dfdcbc6de25aac95a48c1f08e9a542c ]
    
    Before we accept an ethtool request to increase a resource (such as
    rings), we call the FW to check that the requested resource is likely
    available first before we commit.  But it is still possible that
    the actual reservation or allocation can fail.  The existing code
    is missing the logic to adjust the TX rings in case the reserved
    TX rings are less than requested.  Add a warning message (a similar
    message for RX rings already exists) and add the logic to adjust
    the TX rings.  Without this fix, the number of TX rings reported
    to the stack can exceed the actual TX rings and ethtool -l will
    report more than the actual TX rings.
    
    Fixes: 674f50a5b026 ("bnxt_en: Implement new method to reserve rings.")
    Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
    Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Link: https://patch.msgid.link/20250825175927.459987-3-michael.chan@broadcom.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

bnxt_en: Fix memory corruption when FW resources change during ifdown [+ + +]
Author: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
Date:   Mon Aug 25 10:59:25 2025 -0700

    bnxt_en: Fix memory corruption when FW resources change during ifdown
    
    [ Upstream commit 2747328ba2714f1a7454208dbbc1dc0631990b4a ]
    
    bnxt_set_dflt_rings() assumes that it is always called before any TC has
    been created.  So it doesn't take bp->num_tc into account and assumes
    that it is always 0 or 1.
    
    In the FW resource or capability change scenario, the FW will return
    flags in bnxt_hwrm_if_change() that will cause the driver to
    reinitialize and call bnxt_cancel_reservations().  This will lead to
    bnxt_init_dflt_ring_mode() calling bnxt_set_dflt_rings() and bp->num_tc
    may be greater than 1.  This will cause bp->tx_ring[] to be sized too
    small and cause memory corruption in bnxt_alloc_cp_rings().
    
    Fix it by properly scaling the TX rings by bp->num_tc in the code
    paths mentioned above.  Add 2 helper functions to determine
    bp->tx_nr_rings and bp->tx_nr_rings_per_tc.
    
    Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.")
    Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
    Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
    Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Link: https://patch.msgid.link/20250825175927.459987-2-michael.chan@broadcom.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

bnxt_en: Fix stats context reservation logic [+ + +]
Author: Michael Chan <michael.chan@broadcom.com>
Date:   Mon Aug 25 10:59:27 2025 -0700

    bnxt_en: Fix stats context reservation logic
    
    [ Upstream commit b4fc8faacfea2538184a1dbd616ae9447a361f3d ]
    
    The HW resource reservation logic allows the L2 driver to use the
    RoCE resources if the RoCE driver is not registered.  When calculating
    the stats contexts available for L2, we should not blindly subtract
    the stats contexts reserved for RoCE unless the RoCE driver is
    registered.  This bug may cause the L2 rings to be less than the
    number requested when we are close to running out of stats contexts.
    
    Fixes: 2e4592dc9bee ("bnxt_en: Change MSIX/NQs allocation policy")
    Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
    Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Link: https://patch.msgid.link/20250825175927.459987-4-michael.chan@broadcom.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
dma/pool: Ensure DMA_DIRECT_REMAP allocations are decrypted [+ + +]
Author: Shanker Donthineni <sdonthineni@nvidia.com>
Date:   Mon Aug 11 13:17:59 2025 -0500

    dma/pool: Ensure DMA_DIRECT_REMAP allocations are decrypted
    
    commit 89a2d212bdb4bc29bed8e7077abe054b801137ea upstream.
    
    When CONFIG_DMA_DIRECT_REMAP is enabled, atomic pool pages are
    remapped via dma_common_contiguous_remap() using the supplied
    pgprot. Currently, the mapping uses
    pgprot_dmacoherent(PAGE_KERNEL), which leaves the memory encrypted
    on systems with memory encryption enabled (e.g., ARM CCA Realms).
    
    This can cause the DMA layer to fail or crash when accessing the
    memory, as the underlying physical pages are not configured as
    expected.
    
    Fix this by requesting a decrypted mapping in the vmap() call:
    pgprot_decrypted(pgprot_dmacoherent(PAGE_KERNEL))
    
    This ensures that atomic pool memory is consistently mapped
    unencrypted.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
    Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
    Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Link: https://lore.kernel.org/r/20250811181759.998805-1-sdonthineni@nvidia.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode [+ + +]
Author: Yang Wang <kevinyang.wang@amd.com>
Date:   Mon Aug 25 12:54:01 2025 +0800

    drm/amd/amdgpu: disable hwmon power1_cap* for gfx 11.0.3 on vf mode
    
    commit 5dff50802b285da8284a7bf17ae2fdc6f1357023 upstream.
    
    the PPSMC_MSG_GetPptLimit msg is not valid for gfx 11.0.3 on vf mode,
    so skiped to create power1_cap* hwmon sysfs node.
    
    Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
    Reviewed-by: Asad Kamal <asad.kamal@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit e82a8d441038d8cb10b63047a9e705c42479d156)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amdgpu/gfx11: set MQD as appriopriate for queue types [+ + +]
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Tue Jun 24 11:37:16 2025 -0400

    drm/amdgpu/gfx11: set MQD as appriopriate for queue types
    
    commit 27f5e0c1321ee280189cea16044de2e157dc4bb9 upstream.
    
    Set the MQD as appropriate for the kernel vs user queues.
    
    Acked-by: Christian König <christian.koenig@amd.com>
    Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 063d6683208722b1875f888a45084e3d112701ac)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amdgpu/gfx12: set MQD as appriopriate for queue types [+ + +]
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Tue Jun 24 11:38:14 2025 -0400

    drm/amdgpu/gfx12: set MQD as appriopriate for queue types
    
    commit 29f155c5e82fe35ff85b1f13612cb8c2dbe1dca3 upstream.
    
    Set the MQD as appropriate for the kernel vs user queues.
    
    Acked-by: Christian König <christian.koenig@amd.com>
    Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 7b9110f2897957efd9715b52fc01986509729db3)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amdgpu/userq: fix error handling of invalid doorbell [+ + +]
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Fri Aug 22 12:12:37 2025 -0400

    drm/amdgpu/userq: fix error handling of invalid doorbell
    
    commit c767d74a9cdd1042046d02319d16b85d9aa8a8aa upstream.
    
    If the doorbell is invalid, be sure to set the r to an error
    state so the function returns an error.
    
    Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 7e2a5b0a9a165a7c51274aa01b18be29491b4345)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/amdgpu: update firmware version checks for user queue support [+ + +]
Author: Jesse.Zhang <Jesse.Zhang@amd.com>
Date:   Tue Aug 26 17:30:58 2025 +0800

    drm/amdgpu: update firmware version checks for user queue support
    
    commit ee38ea0ae4ed13fe33e033dc98d11e76bc7167cd upstream.
    
    The minimum firmware versions required for user queue functionality
    have been increased to address an issue where the queue privilege
    state was lost during queue connect operations.
    
    The problem occurred because the privilege state was being restored
    to its initial value at the beginning of the function, overwriting
    the state that was properly set during the queue connect case.
    
    This commit updates the minimum version requirements:
    - ME firmware from 2390 to 2420
    - PFP firmware from 2530 to 2580
    - MEC firmware from 2600 to 2650
    - MES firmware remains at 120
    
    These updated firmware versions contain the necessary fixes to
    properly maintain queue privilege state throughout connect operations.
    
    Fixes: 61ca97e9590c ("drm/amdgpu: Add fw minimum version check for usermode queue")
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 5f976c9939f0d5916d2b8ef3156a6d1799781df1)
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/mediatek: Add error handling for old state CRTC in atomic_disable [+ + +]
Author: Jason-JH Lin <jason-jh.lin@mediatek.com>
Date:   Mon Jul 28 10:48:50 2025 +0800

    drm/mediatek: Add error handling for old state CRTC in atomic_disable
    
    [ Upstream commit 0c6b24d70da21201ed009a2aca740d2dfddc7ab5 ]
    
    Introduce error handling to address an issue where, after a hotplug
    event, the cursor continues to update. This situation can lead to a
    kernel panic due to accessing the NULL `old_state->crtc`.
    
    E,g.
    Unable to handle kernel NULL pointer dereference at virtual address
    Call trace:
     mtk_crtc_plane_disable+0x24/0x140
     mtk_plane_atomic_update+0x8c/0xa8
     drm_atomic_helper_commit_planes+0x114/0x2c8
     drm_atomic_helper_commit_tail_rpm+0x4c/0x158
     commit_tail+0xa0/0x168
     drm_atomic_helper_commit+0x110/0x120
     drm_atomic_commit+0x8c/0xe0
     drm_atomic_helper_update_plane+0xd4/0x128
     __setplane_atomic+0xcc/0x110
     drm_mode_cursor_common+0x250/0x440
     drm_mode_cursor_ioctl+0x44/0x70
     drm_ioctl+0x264/0x5d8
     __arm64_sys_ioctl+0xd8/0x510
     invoke_syscall+0x6c/0xe0
     do_el0_svc+0x68/0xe8
     el0_svc+0x34/0x60
     el0t_64_sync_handler+0x1c/0xf8
     el0t_64_sync+0x180/0x188
    
    Adding NULL pointer checks to ensure stability by preventing operations
    on an invalid CRTC state.
    
    Fixes: d208261e9f7c ("drm/mediatek: Add wait_event_timeout when disabling plane")
    Signed-off-by: Jason-JH Lin <jason-jh.lin@mediatek.com>
    Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
    Reviewed-by: CK Hu <ck.hu@mediatek.com>
    Link: https://patchwork.kernel.org/project/linux-mediatek/patch/20250728025036.24953-1-jason-jh.lin@mediatek.com/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/mediatek: Fix device/node reference count leaks in mtk_drm_get_all_drm_priv [+ + +]
Author: Ma Ke <make24@iscas.ac.cn>
Date:   Tue Aug 12 15:19:32 2025 +0800

    drm/mediatek: Fix device/node reference count leaks in mtk_drm_get_all_drm_priv
    
    commit 1f403699c40f0806a707a9a6eed3b8904224021a upstream.
    
    Using device_find_child() and of_find_device_by_node() to locate
    devices could cause an imbalance in the device's reference count.
    device_find_child() and of_find_device_by_node() both call
    get_device() to increment the reference count of the found device
    before returning the pointer. In mtk_drm_get_all_drm_priv(), these
    references are never released through put_device(), resulting in
    permanent reference count increments. Additionally, the
    for_each_child_of_node() iterator fails to release node references in
    all code paths. This leaks device node references when loop
    termination occurs before reaching MAX_CRTC. These reference count
    leaks may prevent device/node resources from being properly released
    during driver unbind operations.
    
    As comment of device_find_child() says, 'NOTE: you will need to drop
    the reference with put_device() after use'.
    
    Cc: stable@vger.kernel.org
    Fixes: 1ef7ed48356c ("drm/mediatek: Modify mediatek-drm for mt8195 multi mmsys support")
    Signed-off-by: Ma Ke <make24@iscas.ac.cn>
    Reviewed-by: CK Hu <ck.hu@mediatek.com>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/20250812071932.471730-1-make24@iscas.ac.cn/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/mediatek: mtk_hdmi: Fix inverted parameters in some regmap_update_bits calls [+ + +]
Author: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Date:   Mon Aug 18 16:17:52 2025 +0200

    drm/mediatek: mtk_hdmi: Fix inverted parameters in some regmap_update_bits calls
    
    [ Upstream commit c34414883f773412964404d77cd2fea04c6f7d60 ]
    
    In mtk_hdmi driver, a recent change replaced custom register access
    function calls by regmap ones, but two replacements by regmap_update_bits
    were done incorrectly, because original offset and mask parameters were
    inverted, so fix them.
    
    Fixes: d6e25b3590a0 ("drm/mediatek: hdmi: Use regmap instead of iomem for main registers")
    Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
    Reviewed-by: CK Hu <ck.hu@mediatek.com>
    Link: https://patchwork.kernel.org/project/dri-devel/patch/20250818-mt8173-fix-hdmi-issue-v1-1-55aff9b0295d@collabora.com/
    Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/msm/dpu: Add a null ptr check for dpu_encoder_needs_modeset [+ + +]
Author: Chenyuan Yang <chenyuan0y@gmail.com>
Date:   Tue Jul 22 16:17:40 2025 -0500

    drm/msm/dpu: Add a null ptr check for dpu_encoder_needs_modeset
    
    [ Upstream commit abebfed208515726760d79cf4f9f1a76b9a10a84 ]
    
    The drm_atomic_get_new_connector_state() can return NULL if the
    connector is not part of the atomic state. Add a check to prevent
    a NULL pointer dereference.
    
    This follows the same pattern used in dpu_encoder_update_topology()
    within the same file, which checks for NULL before using conn_state.
    
    Signed-off-by: Chenyuan Yang <chenyuan0y@gmail.com>
    Fixes: 1ce69c265a53 ("drm/msm/dpu: move resource allocation to CRTC")
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Patchwork: https://patchwork.freedesktop.org/patch/665188/
    Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/msm/dpu: correct dpu_plane_virtual_atomic_check() [+ + +]
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Date:   Tue Jul 15 20:28:18 2025 +0300

    drm/msm/dpu: correct dpu_plane_virtual_atomic_check()
    
    [ Upstream commit 1a76b255eceb9c570c6228f6393e1d63d97a22ba ]
    
    Fix c&p error in dpu_plane_virtual_atomic_check(), compare CRTC width
    too, in addition to CRTC height.
    
    Fixes: 8c62a31607f6 ("drm/msm/dpu: allow using two SSPP blocks for a single plane")
    Reported-by: kernel test robot <lkp@intel.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202507150432.U0cALR6W-lkp@intel.com/
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Patchwork: https://patchwork.freedesktop.org/patch/664170/
    Link: https://lore.kernel.org/r/20250715-msm-fix-virt-atomic-check-v1-1-9bab02c9f952@oss.qualcomm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/msm/dpu: Initialize crtc_state to NULL in dpu_plane_virtual_atomic_check() [+ + +]
Author: Nathan Chancellor <nathan@kernel.org>
Date:   Tue Jul 15 16:27:35 2025 -0700

    drm/msm/dpu: Initialize crtc_state to NULL in dpu_plane_virtual_atomic_check()
    
    commit daab47925c06a04792ca720d8438abd37775e357 upstream.
    
    After a recent change in clang to expose uninitialized warnings from
    const variables and pointers [1], there is a warning around crtc_state
    in dpu_plane_virtual_atomic_check():
    
      drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1145:6: error: variable 'crtc_state' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
       1145 |         if (plane_state->crtc)
            |             ^~~~~~~~~~~~~~~~~
      drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1149:58: note: uninitialized use occurs here
       1149 |         ret = dpu_plane_atomic_check_nosspp(plane, plane_state, crtc_state);
            |                                                                 ^~~~~~~~~~
      drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1145:2: note: remove the 'if' if its condition is always true
       1145 |         if (plane_state->crtc)
            |         ^~~~~~~~~~~~~~~~~~~~~~
       1146 |                 crtc_state = drm_atomic_get_new_crtc_state(state,
      drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:1139:35: note: initialize the variable 'crtc_state' to silence this warning
       1139 |         struct drm_crtc_state *crtc_state;
            |                                          ^
            |                                           = NULL
    
    Initialize crtc_state to NULL like other places in the driver do, so
    that it is consistently initialized.
    
    Cc: stable@vger.kernel.org
    Closes: https://github.com/ClangBuiltLinux/linux/issues/2106
    Fixes: 774bcfb73176 ("drm/msm/dpu: add support for virtual planes")
    Link: https://github.com/llvm/llvm-project/commit/2464313eef01c5b1edf0eccf57a32cdee01472c7 [1]
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Reviewed-by: Jessica Zhang <jessica.zhang@oss.qualcomm.com>
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/msm/kms: move snapshot init earlier in KMS init [+ + +]
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Date:   Tue Jul 15 18:50:37 2025 +0300

    drm/msm/kms: move snapshot init earlier in KMS init
    
    [ Upstream commit 553666f839b86545300773954df7426a45c169c4 ]
    
    Various parts of the display driver can be triggering the display
    snapshot (including the IOMMU fault handlers). Move the call to
    msm_disp_snapshot_init() before KMS initialization, otherwise it is
    possible to ocassionally trigger the kernel fault during init:
    
      __lock_acquire+0x44/0x2798 (P)
      lock_acquire+0x114/0x25c
      _raw_spin_lock_irqsave+0x6c/0x90
      kthread_queue_work+0x2c/0xac
      msm_disp_snapshot_state+0x2c/0x4c
      msm_kms_fault_handler+0x2c/0x74
      msm_disp_fault_handler+0x30/0x48
      report_iommu_fault+0x54/0x128
      arm_smmu_context_fault+0x74/0x184
      __handle_irq_event_percpu+0xa4/0x24c
      handle_irq_event_percpu+0x20/0x5c
      handle_irq_event+0x48/0x84
      handle_fasteoi_irq+0xcc/0x170
      generic_handle_domain_irq+0x48/0x70
      gic_handle_irq+0x54/0x11c
      call_on_irq_stack+0x3c/0x50
      do_interrupt_handler+0x54/0x78
      el1_interrupt+0x3c/0x5c
      el1h_64_irq_handler+0x20/0x30
      el1h_64_irq+0x6c/0x70
      _raw_spin_unlock_irqrestore+0x44/0x68 (P)
      klist_next+0xc4/0x124
      bus_for_each_drv+0x9c/0xe8
      __device_attach+0xfc/0x190
      device_initial_probe+0x1c/0x2c
      bus_probe_device+0x44/0xa0
      device_add+0x204/0x3e4
      platform_device_add+0x170/0x244
      platform_device_register_full+0x130/0x138
      drm_connector_hdmi_audio_init+0xc0/0x108
      drm_bridge_connector_init+0x318/0x394
      msm_dsi_manager_connector_init+0xac/0xdc
      msm_dsi_modeset_init+0x78/0xc0
      _dpu_kms_drm_obj_init+0x198/0x75c
      dpu_kms_hw_init+0x2f8/0x494
      msm_drm_kms_init+0xb0/0x230
      msm_drm_init+0x218/0x250
      msm_drm_bind+0x3c/0x4c
      try_to_bring_up_aggregate_device+0x208/0x2a4
      __component_add+0xa8/0x188
      component_add+0x1c/0x2c
      dsi_dev_attach+0x24/0x34
      dsi_host_attach+0x68/0xa0
      devm_mipi_dsi_attach+0x40/0xcc
      lt9611_attach_dsi+0x94/0x118
      lt9611_probe+0x368/0x3c8
      i2c_device_probe+0x2d0/0x3d8
      really_probe+0x130/0x354
      __driver_probe_device+0xac/0x110
      driver_probe_device+0x44/0x110
      __device_attach_driver+0xb0/0x138
      bus_for_each_drv+0x90/0xe8
      __device_attach+0xfc/0x190
      device_initial_probe+0x1c/0x2c
      bus_probe_device+0x44/0xa0
      deferred_probe_work_func+0xac/0x110
      process_one_work+0x20c/0x51c
      process_scheduled_works+0x58/0x88
      worker_thread+0x1ec/0x304
      kthread+0x194/0x1d4
      ret_from_fork+0x10/0x20
    
    Reported-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Fixes: 98659487b845 ("drm/msm: add support to take dpu snapshot")
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Patchwork: https://patchwork.freedesktop.org/patch/664149/
    Link: https://lore.kernel.org/r/20250715-msm-move-snapshot-init-v1-1-f39c396192ab@oss.qualcomm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/msm: Defer fd_install in SUBMIT ioctl [+ + +]
Author: Rob Clark <robin.clark@oss.qualcomm.com>
Date:   Wed Jul 23 13:28:22 2025 -0700

    drm/msm: Defer fd_install in SUBMIT ioctl
    
    [ Upstream commit f22853435bbd1e9836d0dce7fd99c040b94c2bf1 ]
    
    Avoid fd_install() until there are no more potential error paths, to
    avoid put_unused_fd() after the fd is made visible to userspace.
    
    Fixes: 68dc6c2d5eec ("drm/msm: Fix submit error-path leaks")
    Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
    Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
    Patchwork: https://patchwork.freedesktop.org/patch/665363/
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/msm: update the high bitfield of certain DSI registers [+ + +]
Author: Ayushi Makhija <quic_amakhija@quicinc.com>
Date:   Wed Jul 30 18:09:38 2025 +0530

    drm/msm: update the high bitfield of certain DSI registers
    
    [ Upstream commit 494045c561e68945b1183ff416b8db8e37a122d6 ]
    
    Currently, the high bitfield of certain DSI registers
    do not align with the configuration of the SWI registers
    description. This can lead to wrong programming these DSI
    registers, for example for 4k resloution where H_TOTAL is
    taking 13 bits but software is programming only 12 bits
    because of the incorrect bitmask for H_TOTAL bitfeild,
    this is causing DSI FIFO errors. To resolve this issue,
    increase the high bitfield of the DSI registers from 12 bits
    to 16 bits in dsi.xml to match the SWI register configuration.
    
    Signed-off-by: Ayushi Makhija <quic_amakhija@quicinc.com>
    Fixes: 4f52f5e63b62 ("drm/msm: import XML display registers database")
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Patchwork: https://patchwork.freedesktop.org/patch/666229/
    Link: https://lore.kernel.org/r/20250730123938.1038640-1-quic_amakhija@quicinc.com
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/nouveau/disp: Always accept linear modifier [+ + +]
Author: James Jones <jajones@nvidia.com>
Date:   Mon Aug 11 15:00:16 2025 -0700

    drm/nouveau/disp: Always accept linear modifier
    
    commit e2fe0c54fb7401e6ecd3c10348519ab9e23bd639 upstream.
    
    On some chipsets, which block-linear modifiers are
    supported is format-specific. However, linear
    modifiers are always be supported. The prior
    modifier filtering logic was not accounting for
    the linear case.
    
    Cc: stable@vger.kernel.org
    Fixes: c586f30bf74c ("drm/nouveau/kms: Add format mod prop to base/ovly/nvdisp")
    Signed-off-by: James Jones <jajones@nvidia.com>
    Link: https://lore.kernel.org/r/20250811220017.1337-3-jajones@nvidia.com
    Signed-off-by: Danilo Krummrich <dakr@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
drm/nouveau: fix error path in nvkm_gsp_fwsec_v2 [+ + +]
Author: Timur Tabi <ttabi@nvidia.com>
Date:   Tue Aug 12 19:10:02 2025 -0500

    drm/nouveau: fix error path in nvkm_gsp_fwsec_v2
    
    commit 66e82b6e0a28d4970383e1ee5d60f431001128cd upstream.
    
    Function nvkm_gsp_fwsec_v2() sets 'ret' if the kmemdup() call fails, but
    it never uses or returns 'ret' after that point.  We always need to release
    the firmware regardless, so do that and then check for error.
    
    Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM")
    Cc: stable@vger.kernel.org # v6.7+
    Signed-off-by: Timur Tabi <ttabi@nvidia.com>
    Link: https://lore.kernel.org/r/20250813001004.2986092-1-ttabi@nvidia.com
    Signed-off-by: Danilo Krummrich <dakr@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/nouveau: remove unused increment in gm200_flcn_pio_imem_wr [+ + +]
Author: Timur Tabi <ttabi@nvidia.com>
Date:   Tue Aug 12 19:10:03 2025 -0500

    drm/nouveau: remove unused increment in gm200_flcn_pio_imem_wr
    
    [ Upstream commit f529b8915543fb9ceb732cec5571f7fe12bc9530 ]
    
    The 'tag' parameter is passed by value and is not actually used after
    being incremented, so remove the increment.  It's the function that calls
    gm200_flcn_pio_imem_wr that is supposed to (and does) increment 'tag'.
    
    Fixes: 0e44c2170876 ("drm/nouveau/flcn: new code to load+boot simple HS FWs (VPR scrubber)")
    Reviewed-by: Philipp Stanner <phasta@kernel.org>
    Signed-off-by: Timur Tabi <ttabi@nvidia.com>
    Link: https://lore.kernel.org/r/20250813001004.2986092-2-ttabi@nvidia.com
    Signed-off-by: Danilo Krummrich <dakr@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm/nouveau: remove unused memory target test [+ + +]
Author: Timur Tabi <ttabi@nvidia.com>
Date:   Tue Aug 12 19:10:04 2025 -0500

    drm/nouveau: remove unused memory target test
    
    [ Upstream commit 64c722b5e7f6b909b0e448e580f64628a0d76208 ]
    
    The memory target check is a hold-over from a refactor.  It's harmless
    but distracting, so just remove it.
    
    Fixes: 2541626cfb79 ("drm/nouveau/acr: use common falcon HS FW code for ACR FWs")
    Signed-off-by: Timur Tabi <ttabi@nvidia.com>
    Link: https://lore.kernel.org/r/20250813001004.2986092-3-ttabi@nvidia.com
    Signed-off-by: Danilo Krummrich <dakr@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/xe/vm: Clear the scratch_pt pointer on error [+ + +]
Author: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Date:   Thu Aug 21 16:30:45 2025 +0200

    drm/xe/vm: Clear the scratch_pt pointer on error
    
    commit 2b55ddf36229e0278c956215784ab1feeff510aa upstream.
    
    Avoid triggering a dereference of an error pointer on cleanup in
    xe_vm_free_scratch() by clearing any scratch_pt error pointer.
    
    Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Fixes: 06951c2ee72d ("drm/xe: Use NULL PTEs as scratch PTEs")
    Cc: Brian Welty <brian.welty@intel.com>
    Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Cc: Lucas De Marchi <lucas.demarchi@intel.com>
    Cc: <stable@vger.kernel.org> # v6.8+
    Reviewed-by: Matthew Brost <matthew.brost@intel.com>
    Link: https://lore.kernel.org/r/20250821143045.106005-4-thomas.hellstrom@linux.intel.com
    (cherry picked from commit 358ee50ab565f3c8ea32480e9d03127a81ba32f8)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

drm/xe/vm: Don't pin the vm_resv during validation [+ + +]
Author: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Date:   Thu Aug 21 16:30:43 2025 +0200

    drm/xe/vm: Don't pin the vm_resv during validation
    
    [ Upstream commit 7551865cd12af2dc47e5a174eebcfb0b94b5449b ]
    
    The pinning has the odd side-effect that unlocking *any* resv
    during validation triggers an "unlocking pinned lock" warning.
    
    Cc: Matthew Brost <matthew.brost@intel.com>
    Fixes: 5cc3325584c4 ("drm/xe: Rework eviction rejection of bound external bos")
    Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Reviewed-by: Matthew Brost <matthew.brost@intel.com>
    Link: https://lore.kernel.org/r/20250821143045.106005-2-thomas.hellstrom@linux.intel.com
    (cherry picked from commit 0a51bf3e54dd8b77e6f1febbbb66def0660862d2)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/xe/xe_sync: avoid race during ufence signaling [+ + +]
Author: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Date:   Wed Aug 20 10:39:04 2025 +0200

    drm/xe/xe_sync: avoid race during ufence signaling
    
    [ Upstream commit 04e1f683cd28dc9407b238543871a6e09a570dc0 ]
    
    Marking ufence as signalled after copy_to_user() is too late.
    Worker thread which signals ufence by memory write might be raced
    with another userspace vm-bind call. In map/unmap scenario unmap
    may still see ufence is not signalled causing -EBUSY. Change the
    order of marking / write to user-fence fixes this issue.
    
    Fixes: 977e5b82e090 ("drm/xe: Expose user fence from xe_sync_entry")
    Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/5536
    Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
    Cc: Matthew Brost <matthew.brost@intel.com>
    Cc: Matthew Auld <matthew.auld@intel.com>
    Reviewed-by: Matthew Brost <matthew.brost@intel.com>
    Signed-off-by: Matthew Brost <matthew.brost@intel.com>
    Link: https://lore.kernel.org/r/20250820083903.2109891-2-zbigniew.kempczynski@intel.com
    (cherry picked from commit 8ae04fe9ffc93d6bc3bc63ac08375427d69cee06)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm/xe: Don't trigger rebind on initial dma-buf validation [+ + +]
Author: Matthew Brost <matthew.brost@intel.com>
Date:   Mon Aug 25 08:28:41 2025 -0700

    drm/xe: Don't trigger rebind on initial dma-buf validation
    
    [ Upstream commit 16ca06aa2c2218cb21907c0c45a746958c944def ]
    
    On the first validate of an imported dma-buf (initial bind), the device
    has no GPU mappings, so a rebind is unnecessary. Rebinding here is
    harmful in multi-GPU setups and for VMs using preempt-fence mode, as it
    would evict in-flight GPU work.
    
    v2:
     - Drop dma_buf_validated, check for XE_PL_SYSTEM (Thomas)
    
    Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
    Signed-off-by: Matthew Brost <matthew.brost@intel.com>
    Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
    Link: https://lore.kernel.org/r/20250825152841.3837378-1-matthew.brost@intel.com
    (cherry picked from commit ffdf968762e4fb3cdae54e811ec3525e67440a60)
    Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
dt-bindings: display/msm: qcom,mdp5: drop lut clock [+ + +]
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Date:   Sat Aug 9 11:36:54 2025 +0300

    dt-bindings: display/msm: qcom,mdp5: drop lut clock
    
    [ Upstream commit 7ab3b7579a6d2660a3425b9ea93b9a140b07f49c ]
    
    None of MDP5 platforms have a LUT clock on the display-controller, it
    was added by the mistake. Drop it, fixing DT warnings on MSM8976 /
    MSM8956 platforms. Technically it's an ABI break, but no other platforms
    are affected.
    
    Fixes: 385c8ac763b3 ("dt-bindings: display/msm: convert MDP5 schema to YAML format")
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Acked-by: Rob Herring (Arm) <robh@kernel.org>
    Patchwork: https://patchwork.freedesktop.org/patch/667822/
    Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
efi: stmm: Fix incorrect buffer allocation method [+ + +]
Author: Jan Kiszka <jan.kiszka@siemens.com>
Date:   Mon Aug 25 18:07:10 2025 +0200

    efi: stmm: Fix incorrect buffer allocation method
    
    [ Upstream commit c5e81e672699e0c5557b2b755cc8f7a69aa92bff ]
    
    The communication buffer allocated by setup_mm_hdr() is later on passed
    to tee_shm_register_kernel_buf(). The latter expects those buffers to be
    contiguous pages, but setup_mm_hdr() just uses kmalloc(). That can cause
    various corruptions or BUGs, specifically since commit 9aec2fb0fd5e
    ("slab: allocate frozen pages"), though it was broken before as well.
    
    Fix this by using alloc_pages_exact() instead of kmalloc().
    
    Fixes: c44b6be62e8d ("efi: Add tee-based EFI variable driver")
    Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
    Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
    Acked-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
efivarfs: Fix slab-out-of-bounds in efivarfs_d_compare [+ + +]
Author: Li Nan <linan122@huawei.com>
Date:   Wed Aug 27 15:39:54 2025 +0800

    efivarfs: Fix slab-out-of-bounds in efivarfs_d_compare
    
    [ Upstream commit a6358f8cf64850f3f27857b8ed8c1b08cfc4685c ]
    
    Observed on kernel 6.6 (present on master as well):
    
      BUG: KASAN: slab-out-of-bounds in memcmp+0x98/0xd0
      Call trace:
       kasan_check_range+0xe8/0x190
       __asan_loadN+0x1c/0x28
       memcmp+0x98/0xd0
       efivarfs_d_compare+0x68/0xd8
       __d_lookup_rcu_op_compare+0x178/0x218
       __d_lookup_rcu+0x1f8/0x228
       d_alloc_parallel+0x150/0x648
       lookup_open.isra.0+0x5f0/0x8d0
       open_last_lookups+0x264/0x828
       path_openat+0x130/0x3f8
       do_filp_open+0x114/0x248
       do_sys_openat2+0x340/0x3c0
       __arm64_sys_openat+0x120/0x1a0
    
    If dentry->d_name.len < EFI_VARIABLE_GUID_LEN , 'guid' can become
    negative, leadings to oob. The issue can be triggered by parallel
    lookups using invalid filename:
    
      T1                    T2
      lookup_open
       ->lookup
        simple_lookup
         d_add
         // invalid dentry is added to hash list
    
                            lookup_open
                             d_alloc_parallel
                              __d_lookup_rcu
                               __d_lookup_rcu_op_compare
                                hlist_bl_for_each_entry_rcu
                                // invalid dentry can be retrieved
                                 ->d_compare
                                  efivarfs_d_compare
                                  // oob
    
    Fix it by checking 'guid' before cmp.
    
    Fixes: da27a24383b2 ("efivarfs: guid part of filenames are case-insensitive")
    Signed-off-by: Li Nan <linan122@huawei.com>
    Signed-off-by: Wu Guanghao <wuguanghao3@huawei.com>
    Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
erofs: Fallback to normal access if DAX is not supported on extra device [+ + +]
Author: Yuezhang Mo <Yuezhang.Mo@sony.com>
Date:   Mon Aug 4 16:20:31 2025 +0800

    erofs: Fallback to normal access if DAX is not supported on extra device
    
    [ Upstream commit c6993c4cb91803fceb82d6b5e0ec5e0aec2d0ad6 ]
    
    If using multiple devices, we should check if the extra device support
    DAX instead of checking the primary device when deciding if to use DAX
    to access a file.
    
    If an extra device does not support DAX we should fallback to normal
    access otherwise the data on that device will be inaccessible.
    
    Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
    Reviewed-by: Friendy Su <friendy.su@sony.com>
    Reviewed-by: Jacky Cao <jacky.cao@sony.com>
    Reviewed-by: Daniel Palmer <daniel.palmer@sony.com>
    Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
    Reviewed-by: Hongbo Li <lihongbo22@huawei.com>
    Link: https://lore.kernel.org/r/20250804082030.3667257-2-Yuezhang.Mo@sony.com
    Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

erofs: fix atomic context detection when !CONFIG_DEBUG_LOCK_ALLOC [+ + +]
Author: Junli Liu <liujunli@lixiang.com>
Date:   Tue Aug 5 09:19:58 2025 +0800

    erofs: fix atomic context detection when !CONFIG_DEBUG_LOCK_ALLOC
    
    [ Upstream commit c99fab6e80b76422741d34aafc2f930a482afbdd ]
    
    Since EROFS handles decompression in non-atomic contexts due to
    uncontrollable decompression latencies and vmap() usage, it tries
    to detect atomic contexts and only kicks off a kworker on demand
    in order to reduce unnecessary scheduling overhead.
    
    However, the current approach is insufficient and can lead to
    sleeping function calls in invalid contexts, causing kernel
    warnings and potential system instability. See the stacktrace [1]
    and previous discussion [2].
    
    The current implementation only checks rcu_read_lock_any_held(),
    which behaves inconsistently across different kernel configurations:
    
    - When CONFIG_DEBUG_LOCK_ALLOC is enabled: correctly detects
      RCU critical sections by checking rcu_lock_map
    - When CONFIG_DEBUG_LOCK_ALLOC is disabled: compiles to
      "!preemptible()", which only checks preempt_count and misses
      RCU critical sections
    
    This patch introduces z_erofs_in_atomic() to provide comprehensive
    atomic context detection:
    
    1. Check RCU preemption depth when CONFIG_PREEMPTION is enabled,
       as RCU critical sections may not affect preempt_count but still
       require atomic handling
    
    2. Always use async processing when CONFIG_PREEMPT_COUNT is disabled,
       as preemption state cannot be reliably determined
    
    3. Fall back to standard preemptible() check for remaining cases
    
    The function replaces the previous complex condition check and ensures
    that z_erofs always uses (kthread_)work in atomic contexts to minimize
    scheduling overhead and prevent sleeping in invalid contexts.
    
    [1] Problem stacktrace
    [ 61.266692] BUG: sleeping function called from invalid context at kernel/locking/rtmutex_api.c:510
    [ 61.266702] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 107, name: irq/54-ufshcd
    [ 61.266704] preempt_count: 0, expected: 0
    [ 61.266705] RCU nest depth: 2, expected: 0
    [ 61.266710] CPU: 0 UID: 0 PID: 107 Comm: irq/54-ufshcd Tainted: G W O 6.12.17 #1
    [ 61.266714] Tainted: [W]=WARN, [O]=OOT_MODULE
    [ 61.266715] Hardware name: schumacher (DT)
    [ 61.266717] Call trace:
    [ 61.266718] dump_backtrace+0x9c/0x100
    [ 61.266727] show_stack+0x20/0x38
    [ 61.266728] dump_stack_lvl+0x78/0x90
    [ 61.266734] dump_stack+0x18/0x28
    [ 61.266736] __might_resched+0x11c/0x180
    [ 61.266743] __might_sleep+0x64/0xc8
    [ 61.266745] mutex_lock+0x2c/0xc0
    [ 61.266748] z_erofs_decompress_queue+0xe8/0x978
    [ 61.266753] z_erofs_decompress_kickoff+0xa8/0x190
    [ 61.266756] z_erofs_endio+0x168/0x288
    [ 61.266758] bio_endio+0x160/0x218
    [ 61.266762] blk_update_request+0x244/0x458
    [ 61.266766] scsi_end_request+0x38/0x278
    [ 61.266770] scsi_io_completion+0x4c/0x600
    [ 61.266772] scsi_finish_command+0xc8/0xe8
    [ 61.266775] scsi_complete+0x88/0x148
    [ 61.266777] blk_mq_complete_request+0x3c/0x58
    [ 61.266780] scsi_done_internal+0xcc/0x158
    [ 61.266782] scsi_done+0x1c/0x30
    [ 61.266783] ufshcd_compl_one_cqe+0x12c/0x438
    [ 61.266786] __ufshcd_transfer_req_compl+0x2c/0x78
    [ 61.266788] ufshcd_poll+0xf4/0x210
    [ 61.266789] ufshcd_transfer_req_compl+0x50/0x88
    [ 61.266791] ufshcd_intr+0x21c/0x7c8
    [ 61.266792] irq_forced_thread_fn+0x44/0xd8
    [ 61.266796] irq_thread+0x1a4/0x358
    [ 61.266799] kthread+0x12c/0x138
    [ 61.266802] ret_from_fork+0x10/0x20
    
    [2] https://lore.kernel.org/r/58b661d0-0ebb-4b45-a10d-c5927fb791cd@paulmck-laptop
    
    Signed-off-by: Junli Liu <liujunli@lixiang.com>
    Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
    Link: https://lore.kernel.org/r/20250805011957.911186-1-liujunli@lixiang.com
    [ Gao Xiang: Use the original trace in v1. ]
    Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
fbnic: Move phylink resume out of service_task and into open/close [+ + +]
Author: Alexander Duyck <alexanderduyck@fb.com>
Date:   Mon Aug 25 15:56:13 2025 -0700

    fbnic: Move phylink resume out of service_task and into open/close
    
    [ Upstream commit 6ede14a2c6365e7e5d855643c7c8390b5268c467 ]
    
    The fbnic driver was presenting with the following locking assert coming
    out of a PM resume:
    [   42.208116][  T164] RTNL: assertion failed at drivers/net/phy/phylink.c (2611)
    [   42.208492][  T164] WARNING: CPU: 1 PID: 164 at drivers/net/phy/phylink.c:2611 phylink_resume+0x190/0x1e0
    [   42.208872][  T164] Modules linked in:
    [   42.209140][  T164] CPU: 1 UID: 0 PID: 164 Comm: bash Not tainted 6.17.0-rc2-virtme #134 PREEMPT(full)
    [   42.209496][  T164] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.17.0-5.fc42 04/01/2014
    [   42.209861][  T164] RIP: 0010:phylink_resume+0x190/0x1e0
    [   42.210057][  T164] Code: 83 e5 01 0f 85 b0 fe ff ff c6 05 1c cd 3e 02 01 90 ba 33 0a 00 00 48 c7 c6 20 3a 1d a5 48 c7 c7 e0 3e 1d a5 e8 21 b8 90 fe 90 <0f> 0b 90 90 e9 86 fe ff ff e8 42 ea 1f ff e9 e2 fe ff ff 48 89 ef
    [   42.210708][  T164] RSP: 0018:ffffc90000affbd8 EFLAGS: 00010296
    [   42.210983][  T164] RAX: 0000000000000000 RBX: ffff8880078d8400 RCX: 0000000000000000
    [   42.211235][  T164] RDX: 0000000000000000 RSI: 1ffffffff4f10938 RDI: 0000000000000001
    [   42.211466][  T164] RBP: 0000000000000000 R08: ffffffffa2ae79ea R09: fffffbfff4b3eb84
    [   42.211707][  T164] R10: 0000000000000003 R11: 0000000000000000 R12: ffff888007ad8000
    [   42.211997][  T164] R13: 0000000000000002 R14: ffff888006a18800 R15: ffffffffa34c59e0
    [   42.212234][  T164] FS:  00007f0dc8e39740(0000) GS:ffff88808f51f000(0000) knlGS:0000000000000000
    [   42.212505][  T164] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [   42.212704][  T164] CR2: 00007f0dc8e9fe10 CR3: 000000000b56d003 CR4: 0000000000772ef0
    [   42.213227][  T164] PKRU: 55555554
    [   42.213366][  T164] Call Trace:
    [   42.213483][  T164]  <TASK>
    [   42.213565][  T164]  __fbnic_pm_attach.isra.0+0x8e/0xa0
    [   42.213725][  T164]  pci_reset_function+0x116/0x1d0
    [   42.213895][  T164]  reset_store+0xa0/0x100
    [   42.214025][  T164]  ? pci_dev_reset_attr_is_visible+0x50/0x50
    [   42.214221][  T164]  ? sysfs_file_kobj+0xc1/0x1e0
    [   42.214374][  T164]  ? sysfs_kf_write+0x65/0x160
    [   42.214526][  T164]  kernfs_fop_write_iter+0x2f8/0x4c0
    [   42.214677][  T164]  ? kernfs_vma_page_mkwrite+0x1f0/0x1f0
    [   42.214836][  T164]  new_sync_write+0x308/0x6f0
    [   42.214987][  T164]  ? __lock_acquire+0x34c/0x740
    [   42.215135][  T164]  ? new_sync_read+0x6f0/0x6f0
    [   42.215288][  T164]  ? lock_acquire.part.0+0xbc/0x260
    [   42.215440][  T164]  ? ksys_write+0xff/0x200
    [   42.215590][  T164]  ? perf_trace_sched_switch+0x6d0/0x6d0
    [   42.215742][  T164]  vfs_write+0x65e/0xbb0
    [   42.215876][  T164]  ksys_write+0xff/0x200
    [   42.215994][  T164]  ? __ia32_sys_read+0xc0/0xc0
    [   42.216141][  T164]  ? do_user_addr_fault+0x269/0x9f0
    [   42.216292][  T164]  ? rcu_is_watching+0x15/0xd0
    [   42.216442][  T164]  do_syscall_64+0xbb/0x360
    [   42.216591][  T164]  entry_SYSCALL_64_after_hwframe+0x4b/0x53
    [   42.216784][  T164] RIP: 0033:0x7f0dc8ea9986
    
    A bit of digging showed that we were invoking the phylink_resume as a part
    of the fbnic_up path when we were enabling the service task while not
    holding the RTNL lock. We should be enabling this sooner as a part of the
    ndo_open path and then just letting the service task come online later.
    This will help to enforce the correct locking and brings the phylink
    interface online at the same time as the network interface, instead of at a
    later time.
    
    I tested this on QEMU to verify this was working by putting the system to
    sleep using "echo mem > /sys/power/state" to put the system to sleep in the
    guest and then using the command "system_wakeup" in the QEMU monitor.
    
    Fixes: 69684376eed5 ("eth: fbnic: Add link detection")
    Signed-off-by: Alexander Duyck <alexanderduyck@fb.com>
    Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
    Link: https://patch.msgid.link/175616257316.1963577.12238158800417771119.stgit@ahduyck-xeon-server.home.arpa
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
fgraph: Copy args in intermediate storage with entry [+ + +]
Author: Steven Rostedt <rostedt@goodmis.org>
Date:   Wed Aug 20 19:55:22 2025 -0400

    fgraph: Copy args in intermediate storage with entry
    
    [ Upstream commit e3d01979e4bff5c87eb4054a22e7568bb679b1fe ]
    
    The output of the function graph tracer has two ways to display its
    entries. One way for leaf functions with no events recorded within them,
    and the other is for functions with events recorded inside it. As function
    graph has an entry and exit event, to simplify the output of leaf
    functions it combines the two, where as non leaf functions are separate:
    
     2)               |              invoke_rcu_core() {
     2)               |                raise_softirq() {
     2)   0.391 us    |                  __raise_softirq_irqoff();
     2)   1.191 us    |                }
     2)   2.086 us    |              }
    
    The __raise_softirq_irqoff() function above is really two events that were
    merged into one. Otherwise it would have looked like:
    
     2)               |              invoke_rcu_core() {
     2)               |                raise_softirq() {
     2)               |                  __raise_softirq_irqoff() {
     2)   0.391 us    |                  }
     2)   1.191 us    |                }
     2)   2.086 us    |              }
    
    In order to do this merge, the reading of the trace output file needs to
    look at the next event before printing. But since the pointer to the event
    is on the ring buffer, it needs to save the entry event before it looks at
    the next event as the next event goes out of focus as soon as a new event
    is read from the ring buffer. After it reads the next event, it will print
    the entry event with either the '{' (non leaf) or ';' and timestamps (leaf).
    
    The iterator used to read the trace file has storage for this event. The
    problem happens when the function graph tracer has arguments attached to
    the entry event as the entry now has a variable length "args" field. This
    field only gets set when funcargs option is used. But the args are not
    recorded in this temp data and garbage could be printed. The entry field
    is copied via:
    
      data->ent = *curr;
    
    Where "curr" is the entry field. But this method only saves the non
    variable length fields from the structure.
    
    Add a helper structure to the iterator data that adds the max args size to
    the data storage in the iterator. Then simply copy the entire entry into
    this storage (with size protection).
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Link: https://lore.kernel.org/20250820195522.51d4a268@gandalf.local.home
    Reported-by: Sasha Levin <sashal@kernel.org>
    Tested-by: Sasha Levin <sashal@kernel.org>
    Closes: https://lore.kernel.org/all/aJaxRVKverIjF4a6@lappy/
    Fixes: ff5c9c576e75 ("ftrace: Add support for function argument to graph tracer")
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
firmware: qcom: scm: initialize tzmem before marking SCM as available [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Mon Jun 30 14:12:04 2025 +0200

    firmware: qcom: scm: initialize tzmem before marking SCM as available
    
    commit 87be3e7a2d0030cda6314d2ec96b37991f636ccd upstream.
    
    Now that qcom_scm_shm_bridge_enable() uses the struct device passed to
    it as argument to make the QCOM_SCM_MP_SHM_BRIDGE_ENABLE SCM call, we
    can move the TZMem initialization before the assignment of the __scm
    pointer in the SCM driver (which marks SCM as ready to users) thus
    fixing the potential race between consumer calls and the memory pool
    initialization.
    
    Reported-by: Johan Hovold <johan+linaro@kernel.org>
    Closes: https://lore.kernel.org/all/20250120151000.13870-1-johan+linaro@kernel.org/
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Link: https://lore.kernel.org/r/20250630-qcom-scm-race-v2-3-fa3851c98611@linaro.org
    Signed-off-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

firmware: qcom: scm: remove unused arguments from SHM bridge routines [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Mon Jun 30 14:12:02 2025 +0200

    firmware: qcom: scm: remove unused arguments from SHM bridge routines
    
    commit 23972da96e1eee7f10c8ef641d56202ab9af8ba7 upstream.
    
    qcom_scm_shm_bridge_create() and qcom_scm_shm_bridge_delete() take
    struct device as argument but don't use it. Remove it from these
    functions' prototypes.
    
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Link: https://lore.kernel.org/r/20250630-qcom-scm-race-v2-1-fa3851c98611@linaro.org
    Signed-off-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

firmware: qcom: scm: request the waitqueue irq *after* initializing SCM [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Mon Jun 30 14:12:05 2025 +0200

    firmware: qcom: scm: request the waitqueue irq *after* initializing SCM
    
    commit 7ab36b51c6bee56e1a1939063dd10d602fe49d13 upstream.
    
    There's a subtle race in the SCM driver: we assign the __scm pointer
    before requesting the waitqueue interrupt. Assigning __scm marks the SCM
    API as ready to accept calls. It's possible that a user makes a call
    right after we set __scm and the firmware raises an interrupt before the
    driver's ready to service it. Move the __scm assignment after we request
    the interrupt.
    
    This has the added benefit of allowing us to drop the goto label.
    
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Link: https://lore.kernel.org/r/20250630-qcom-scm-race-v2-4-fa3851c98611@linaro.org
    Signed-off-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

firmware: qcom: scm: take struct device as argument in SHM bridge enable [+ + +]
Author: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Date:   Mon Jun 30 14:12:03 2025 +0200

    firmware: qcom: scm: take struct device as argument in SHM bridge enable
    
    commit dc3f4e75c54c19bad9a70419afae00ce6baf3ebf upstream.
    
    qcom_scm_shm_bridge_enable() is used early in the SCM initialization
    routine. It makes an SCM call and so expects the internal __scm pointer
    in the SCM driver to be assigned. For this reason the tzmem memory pool
    is allocated *after* this pointer is assigned. However, this can lead to
    a crash if another consumer of the SCM API makes a call using the memory
    pool between the assignment of the __scm pointer and the initialization
    of the tzmem memory pool.
    
    As qcom_scm_shm_bridge_enable() is a special case, not meant to be
    called by ordinary users, pull it into the local SCM header. Make it
    take struct device as argument. This is the device that will be used to
    make the SCM call as opposed to the global __scm pointer. This will
    allow us to move the tzmem initialization *before* the __scm assignment
    in the core SCM driver.
    
    Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
    Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
    Link: https://lore.kernel.org/r/20250630-qcom-scm-race-v2-2-fa3851c98611@linaro.org
    Signed-off-by: Bjorn Andersson <andersson@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
fs/smb: Fix inconsistent refcnt update [+ + +]
Author: Shuhao Fu <sfual@cse.ust.hk>
Date:   Thu Aug 28 02:24:19 2025 +0800

    fs/smb: Fix inconsistent refcnt update
    
    commit ab529e6ca1f67bcf31f3ea80c72bffde2e9e053e upstream.
    
    A possible inconsistent update of refcount was identified in `smb2_compound_op`.
    Such inconsistent update could lead to possible resource leaks.
    
    Why it is a possible bug:
    1. In the comment section of the function, it clearly states that the
    reference to `cfile` should be dropped after calling this function.
    2. Every control flow path would check and drop the reference to
    `cfile`, except the patched one.
    3. Existing callers would not handle refcount update of `cfile` if
    -ENOMEM is returned.
    
    To fix the bug, an extra goto label "out" is added, to make sure that the
    cleanup logic would always be respected. As the problem is caused by the
    allocation failure of `vars`, the cleanup logic between label "finished"
    and "out" can be safely ignored. According to the definition of function
    `is_replayable_error`, the error code of "-ENOMEM" is not recoverable.
    Therefore, the replay logic also gets ignored.
    
    Signed-off-by: Shuhao Fu <sfual@cse.ust.hk>
    Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ftrace: Fix potential warning in trace_printk_seq during ftrace_dump [+ + +]
Author: Tengda Wu <wutengda@huaweicloud.com>
Date:   Fri Aug 22 03:33:43 2025 +0000

    ftrace: Fix potential warning in trace_printk_seq during ftrace_dump
    
    [ Upstream commit 4013aef2ced9b756a410f50d12df9ebe6a883e4a ]
    
    When calling ftrace_dump_one() concurrently with reading trace_pipe,
    a WARN_ON_ONCE() in trace_printk_seq() can be triggered due to a race
    condition.
    
    The issue occurs because:
    
    CPU0 (ftrace_dump)                              CPU1 (reader)
    echo z > /proc/sysrq-trigger
    
    !trace_empty(&iter)
    trace_iterator_reset(&iter) <- len = size = 0
                                                    cat /sys/kernel/tracing/trace_pipe
    trace_find_next_entry_inc(&iter)
      __find_next_entry
        ring_buffer_empty_cpu <- all empty
      return NULL
    
    trace_printk_seq(&iter.seq)
      WARN_ON_ONCE(s->seq.len >= s->seq.size)
    
    In the context between trace_empty() and trace_find_next_entry_inc()
    during ftrace_dump, the ring buffer data was consumed by other readers.
    This caused trace_find_next_entry_inc to return NULL, failing to populate
    `iter.seq`. At this point, due to the prior trace_iterator_reset, both
    `iter.seq.len` and `iter.seq.size` were set to 0. Since they are equal,
    the WARN_ON_ONCE condition is triggered.
    
    Move the trace_printk_seq() into the if block that checks to make sure the
    return value of trace_find_next_entry_inc() is non-NULL in
    ftrace_dump_one(), ensuring the 'iter.seq' is properly populated before
    subsequent operations.
    
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Link: https://lore.kernel.org/20250822033343.3000289-1-wutengda@huaweicloud.com
    Fixes: d769041f8653 ("ring_buffer: implement new locking")
    Signed-off-by: Tengda Wu <wutengda@huaweicloud.com>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
HID: asus: fix UAF via HID_CLAIMED_INPUT validation [+ + +]
Author: Qasim Ijaz <qasdev00@gmail.com>
Date:   Sun Aug 10 19:10:41 2025 +0100

    HID: asus: fix UAF via HID_CLAIMED_INPUT validation
    
    commit d3af6ca9a8c34bbd8cff32b469b84c9021c9e7e4 upstream.
    
    After hid_hw_start() is called hidinput_connect() will eventually be
    called to set up the device with the input layer since the
    HID_CONNECT_DEFAULT connect mask is used. During hidinput_connect()
    all input and output reports are processed and corresponding hid_inputs
    are allocated and configured via hidinput_configure_usages(). This
    process involves slot tagging report fields and configuring usages
    by setting relevant bits in the capability bitmaps. However it is possible
    that the capability bitmaps are not set at all leading to the subsequent
    hidinput_has_been_populated() check to fail leading to the freeing of the
    hid_input and the underlying input device.
    
    This becomes problematic because a malicious HID device like a
    ASUS ROG N-Key keyboard can trigger the above scenario via a
    specially crafted descriptor which then leads to a user-after-free
    when the name of the freed input device is written to later on after
    hid_hw_start(). Below, report 93 intentionally utilises the
    HID_UP_UNDEFINED Usage Page which is skipped during usage
    configuration, leading to the frees.
    
    0x05, 0x0D,        // Usage Page (Digitizer)
    0x09, 0x05,        // Usage (Touch Pad)
    0xA1, 0x01,        // Collection (Application)
    0x85, 0x0D,        //   Report ID (13)
    0x06, 0x00, 0xFF,  //   Usage Page (Vendor Defined 0xFF00)
    0x09, 0xC5,        //   Usage (0xC5)
    0x15, 0x00,        //   Logical Minimum (0)
    0x26, 0xFF, 0x00,  //   Logical Maximum (255)
    0x75, 0x08,        //   Report Size (8)
    0x95, 0x04,        //   Report Count (4)
    0xB1, 0x02,        //   Feature (Data,Var,Abs)
    0x85, 0x5D,        //   Report ID (93)
    0x06, 0x00, 0x00,  //   Usage Page (Undefined)
    0x09, 0x01,        //   Usage (0x01)
    0x15, 0x00,        //   Logical Minimum (0)
    0x26, 0xFF, 0x00,  //   Logical Maximum (255)
    0x75, 0x08,        //   Report Size (8)
    0x95, 0x1B,        //   Report Count (27)
    0x81, 0x02,        //   Input (Data,Var,Abs)
    0xC0,              // End Collection
    
    Below is the KASAN splat after triggering the UAF:
    
    [   21.672709] ==================================================================
    [   21.673700] BUG: KASAN: slab-use-after-free in asus_probe+0xeeb/0xf80
    [   21.673700] Write of size 8 at addr ffff88810a0ac000 by task kworker/1:2/54
    [   21.673700]
    [   21.673700] CPU: 1 UID: 0 PID: 54 Comm: kworker/1:2 Not tainted 6.16.0-rc4-g9773391cf4dd-dirty #36 PREEMPT(voluntary)
    [   21.673700] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
    [   21.673700] Call Trace:
    [   21.673700]  <TASK>
    [   21.673700]  dump_stack_lvl+0x5f/0x80
    [   21.673700]  print_report+0xd1/0x660
    [   21.673700]  kasan_report+0xe5/0x120
    [   21.673700]  __asan_report_store8_noabort+0x1b/0x30
    [   21.673700]  asus_probe+0xeeb/0xf80
    [   21.673700]  hid_device_probe+0x2ee/0x700
    [   21.673700]  really_probe+0x1c6/0x6b0
    [   21.673700]  __driver_probe_device+0x24f/0x310
    [   21.673700]  driver_probe_device+0x4e/0x220
    [...]
    [   21.673700]
    [   21.673700] Allocated by task 54:
    [   21.673700]  kasan_save_stack+0x3d/0x60
    [   21.673700]  kasan_save_track+0x18/0x40
    [   21.673700]  kasan_save_alloc_info+0x3b/0x50
    [   21.673700]  __kasan_kmalloc+0x9c/0xa0
    [   21.673700]  __kmalloc_cache_noprof+0x139/0x340
    [   21.673700]  input_allocate_device+0x44/0x370
    [   21.673700]  hidinput_connect+0xcb6/0x2630
    [   21.673700]  hid_connect+0xf74/0x1d60
    [   21.673700]  hid_hw_start+0x8c/0x110
    [   21.673700]  asus_probe+0x5a3/0xf80
    [   21.673700]  hid_device_probe+0x2ee/0x700
    [   21.673700]  really_probe+0x1c6/0x6b0
    [   21.673700]  __driver_probe_device+0x24f/0x310
    [   21.673700]  driver_probe_device+0x4e/0x220
    [...]
    [   21.673700]
    [   21.673700] Freed by task 54:
    [   21.673700]  kasan_save_stack+0x3d/0x60
    [   21.673700]  kasan_save_track+0x18/0x40
    [   21.673700]  kasan_save_free_info+0x3f/0x60
    [   21.673700]  __kasan_slab_free+0x3c/0x50
    [   21.673700]  kfree+0xcf/0x350
    [   21.673700]  input_dev_release+0xab/0xd0
    [   21.673700]  device_release+0x9f/0x220
    [   21.673700]  kobject_put+0x12b/0x220
    [   21.673700]  put_device+0x12/0x20
    [   21.673700]  input_free_device+0x4c/0xb0
    [   21.673700]  hidinput_connect+0x1862/0x2630
    [   21.673700]  hid_connect+0xf74/0x1d60
    [   21.673700]  hid_hw_start+0x8c/0x110
    [   21.673700]  asus_probe+0x5a3/0xf80
    [   21.673700]  hid_device_probe+0x2ee/0x700
    [   21.673700]  really_probe+0x1c6/0x6b0
    [   21.673700]  __driver_probe_device+0x24f/0x310
    [   21.673700]  driver_probe_device+0x4e/0x220
    [...]
    
    Fixes: 9ce12d8be12c ("HID: asus: Add i2c touchpad support")
    Cc: stable@vger.kernel.org
    Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
    Link: https://patch.msgid.link/20250810181041.44874-1-qasdev00@gmail.com
    Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: elecom: add support for ELECOM M-DT2DRBK [+ + +]
Author: Martin Hilgendorf <martin.hilgendorf@posteo.de>
Date:   Sat Aug 2 13:45:55 2025 +0000

    HID: elecom: add support for ELECOM M-DT2DRBK
    
    commit 832e5777143e799a97e8f9b96f002a90f06ba548 upstream.
    
    The DT2DRBK trackball has 8 buttons, but the report descriptor only
    specifies 5. This patch adds the device ID and performs a similar fixup as
    for other ELECOM devices to enable the remaining 3 buttons.
    
    Signed-off-by: Martin Hilgendorf <martin.hilgendorf@posteo.de>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: hid-ntrig: fix unable to handle page fault in ntrig_report_version() [+ + +]
Author: Minjong Kim <minbell.kim@samsung.com>
Date:   Wed Aug 13 19:30:22 2025 +0900

    HID: hid-ntrig: fix unable to handle page fault in ntrig_report_version()
    
    commit 185c926283da67a72df20a63a5046b3b4631b7d9 upstream.
    
    in ntrig_report_version(), hdev parameter passed from hid_probe().
    sending descriptor to /dev/uhid can make hdev->dev.parent->parent to null
    if hdev->dev.parent->parent is null, usb_dev has
    invalid address(0xffffffffffffff58) that hid_to_usb_dev(hdev) returned
    when usb_rcvctrlpipe() use usb_dev,it trigger
    page fault error for address(0xffffffffffffff58)
    
    add null check logic to ntrig_report_version()
    before calling hid_to_usb_dev()
    
    Signed-off-by: Minjong Kim <minbell.kim@samsung.com>
    Link: https://patch.msgid.link/20250813-hid-ntrig-page-fault-fix-v2-1-f98581f35106@samsung.com
    Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: input: rename hidinput_set_battery_charge_status() [+ + +]
Author: José Expósito <jose.exposito89@gmail.com>
Date:   Thu Aug 14 12:39:39 2025 +0200

    HID: input: rename hidinput_set_battery_charge_status()
    
    [ Upstream commit a82231b2a8712d0218fc286a9b0da328d419a3f4 ]
    
    In preparation for a patch fixing a bug affecting
    hidinput_set_battery_charge_status(), rename the function to
    hidinput_update_battery_charge_status() and move it up so it can be used
    by hidinput_update_battery().
    
    Refactor, no functional changes.
    
    Tested-by: 卢国宏 <luguohong@xiaomi.com>
    Signed-off-by: José Expósito <jose.exposito89@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Stable-dep-of: e94536e1d181 ("HID: input: report battery status changes immediately")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: input: report battery status changes immediately [+ + +]
Author: José Expósito <jose.exposito89@gmail.com>
Date:   Thu Aug 14 12:39:40 2025 +0200

    HID: input: report battery status changes immediately
    
    [ Upstream commit e94536e1d1818b0989aa19b443b7089f50133c35 ]
    
    Previously, the battery status (charging/discharging) was not reported
    immediately to user-space. 
    
    For most input devices, this wasn't problematic because changing their
    battery status requires connecting them to a different bus.
    For example, a gamepad would report a discharging status while
    connected via Bluetooth and a charging status while connected via USB.
    
    However, certain devices are not connected or disconnected when their
    battery status changes. For example, a phone battery changes its status
    without connecting or disconnecting it.
    In these cases, the battery status was not reported immediately to user
    space.
    
    Report battery status changes immediately to user space to support
    these kinds of devices.
    
    Fixes: a608dc1c0639 ("HID: input: map battery system charging")
    Reported-by: 卢国宏 <luguohong@xiaomi.com>
    Closes: https://lore.kernel.org/linux-input/aI49Im0sGb6fpgc8@fedora/T/
    Tested-by: 卢国宏 <luguohong@xiaomi.com>
    Signed-off-by: José Expósito <jose.exposito89@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: intel-thc-hid: Intel-quicki2c: Enhance driver re-install flow [+ + +]
Author: Even Xu <even.xu@intel.com>
Date:   Wed Aug 6 08:23:32 2025 +0800

    HID: intel-thc-hid: Intel-quicki2c: Enhance driver re-install flow
    
    [ Upstream commit afa17a09c699410113199dc15256c6ea2b4133f7 ]
    
    After driver module is removed and during re-install stage, if there
    is continueous user touching on the screen, it is a risk impacting
    THC hardware initialization which causes driver installation failure.
    
    This patch enhances this flow by quiescing the external touch
    interrupt after driver is removed which keeps THC hardware
    ignore external interrupt during this remove and re-install stage.
    
    Signed-off-by: Even Xu <even.xu@intel.com>
    Tested-by: Rui Zhang <rui1.zhang@intel.com>
    Fixes: 66b59bfce6d9 ("HID: intel-thc-hid: intel-quicki2c: Complete THC QuickI2C driver")
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: intel-thc-hid: intel-quicki2c: Fix ACPI dsd ICRS/ISUB length [+ + +]
Author: Aaron Ma <aaron.ma@canonical.com>
Date:   Sun Aug 3 14:57:25 2025 +0800

    HID: intel-thc-hid: intel-quicki2c: Fix ACPI dsd ICRS/ISUB length
    
    [ Upstream commit 1db9df89a213318a48d958385dc1b17b379dc32b ]
    
    The QuickI2C ACPI _DSD methods return ICRS and ISUB data with a
    trailing byte, making the actual length is one more byte than the
    structs defined.
    
    It caused stack-out-of-bounds and kernel crash:
    
    kernel: BUG: KASAN: stack-out-of-bounds in quicki2c_acpi_get_dsd_property.constprop.0+0x111/0x1b0 [intel_quicki2c]
    kernel: Write of size 12 at addr ffff888106d1f900 by task kworker/u33:2/75
    kernel:
    kernel: CPU: 3 UID: 0 PID: 75 Comm: kworker/u33:2 Not tainted 6.16.0+ #3 PREEMPT(voluntary)
    kernel: Workqueue: async async_run_entry_fn
    kernel: Call Trace:
    kernel:  <TASK>
    kernel:  dump_stack_lvl+0x76/0xa0
    kernel:  print_report+0xd1/0x660
    kernel:  ? __pfx__raw_spin_lock_irqsave+0x10/0x10
    kernel:  ? __kasan_slab_free+0x5d/0x80
    kernel:  ? kasan_addr_to_slab+0xd/0xb0
    kernel:  kasan_report+0xe1/0x120
    kernel:  ? quicki2c_acpi_get_dsd_property.constprop.0+0x111/0x1b0 [intel_quicki2c]
    kernel:  ? quicki2c_acpi_get_dsd_property.constprop.0+0x111/0x1b0 [intel_quicki2c]
    kernel:  kasan_check_range+0x11c/0x200
    kernel:  __asan_memcpy+0x3b/0x80
    kernel:  quicki2c_acpi_get_dsd_property.constprop.0+0x111/0x1b0 [intel_quicki2c]
    kernel:  ? __pfx_quicki2c_acpi_get_dsd_property.constprop.0+0x10/0x10 [intel_quicki2c]
    kernel:  quicki2c_get_acpi_resources+0x237/0x730 [intel_quicki2c]
    [...]
    kernel:  </TASK>
    kernel:
    kernel: The buggy address belongs to stack of task kworker/u33:2/75
    kernel:  and is located at offset 48 in frame:
    kernel:  quicki2c_get_acpi_resources+0x0/0x730 [intel_quicki2c]
    kernel:
    kernel: This frame has 3 objects:
    kernel:  [32, 36) 'hid_desc_addr'
    kernel:  [48, 59) 'i2c_param'
    kernel:  [80, 224) 'i2c_config'
    
    ACPI DSD methods return:
    
    \_SB.PC00.THC0.ICRS Buffer       000000003fdc947b 001 Len 0C = 0A 00 80 1A 06 00 00 00 00 00 00 00
    \_SB.PC00.THC0.ISUB Buffer       00000000f2fcbdc4 001 Len 91 = 00 00 00 00 00 00 00 00 00 00 00 00
    
    Adding reserved padding to quicki2c_subip_acpi_parameter/config.
    
    Fixes: 5282e45ccbfa9 ("HID: intel-thc-hid: intel-quicki2c: Add THC QuickI2C ACPI interfaces")
    Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
    Reviewed-by: Even Xu <even.xu@intel.com>
    Tested-by: Even Xu <even.xu@intel.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: intel-thc-hid: intel-thc: Fix incorrect pointer arithmetic in I2C regs save [+ + +]
Author: Aaron Ma <aaron.ma@canonical.com>
Date:   Sun Aug 3 14:57:26 2025 +0800

    HID: intel-thc-hid: intel-thc: Fix incorrect pointer arithmetic in I2C regs save
    
    [ Upstream commit a7fc15ed629be89e51e09b743277c53e0a0168f5 ]
    
    Improper use of secondary pointer (&dev->i2c_subip_regs) caused
    kernel crash and out-of-bounds error:
    
     BUG: KASAN: slab-out-of-bounds in _regmap_bulk_read+0x449/0x510
     Write of size 4 at addr ffff888136005dc0 by task kworker/u33:5/5107
    
     CPU: 3 UID: 0 PID: 5107 Comm: kworker/u33:5 Not tainted 6.16.0+ #3 PREEMPT(voluntary)
     Workqueue: async async_run_entry_fn
     Call Trace:
      <TASK>
      dump_stack_lvl+0x76/0xa0
      print_report+0xd1/0x660
      ? __pfx__raw_spin_lock_irqsave+0x10/0x10
      ? kasan_complete_mode_report_info+0x26/0x200
      kasan_report+0xe1/0x120
      ? _regmap_bulk_read+0x449/0x510
      ? _regmap_bulk_read+0x449/0x510
      __asan_report_store4_noabort+0x17/0x30
      _regmap_bulk_read+0x449/0x510
      ? __pfx__regmap_bulk_read+0x10/0x10
      regmap_bulk_read+0x270/0x3d0
      pio_complete+0x1ee/0x2c0 [intel_thc]
      ? __pfx_pio_complete+0x10/0x10 [intel_thc]
      ? __pfx_pio_wait+0x10/0x10 [intel_thc]
      ? regmap_update_bits_base+0x13b/0x1f0
      thc_i2c_subip_pio_read+0x117/0x270 [intel_thc]
      thc_i2c_subip_regs_save+0xc2/0x140 [intel_thc]
      ? __pfx_thc_i2c_subip_regs_save+0x10/0x10 [intel_thc]
    [...]
     The buggy address belongs to the object at ffff888136005d00
      which belongs to the cache kmalloc-rnd-12-192 of size 192
     The buggy address is located 0 bytes to the right of
      allocated 192-byte region [ffff888136005d00, ffff888136005dc0)
    
    Replaced with direct array indexing (&dev->i2c_subip_regs[i]) to ensure
    safe memory access.
    
    Fixes: 4228966def884 ("HID: intel-thc-hid: intel-thc: Add THC I2C config interfaces")
    Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
    Reviewed-by: Even Xu <even.xu@intel.com>
    Tested-by: Even Xu <even.xu@intel.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

HID: logitech: Add ids for G PRO 2 LIGHTSPEED [+ + +]
Author: Matt Coffin <mcoffin13@gmail.com>
Date:   Wed Aug 20 01:49:51 2025 -0600

    HID: logitech: Add ids for G PRO 2 LIGHTSPEED
    
    commit ab1bb82f3db20e23eace06db52031b1164a110c2 upstream.
    
    Adds support for the G PRO 2 LIGHTSPEED Wireless via it's nano receiver
    or directly. This nano receiver appears to work identically to the 1_1
    receiver for the case I've verified, which is the battery status through
    lg-hidpp.
    
    The same appears to be the case wired, sharing much with the Pro X
    Superlight 2; differences seemed to lie in userland configuration rather
    than in interfaces used by hid_logitech_hidpp on the kernel side.
    
    I verified the sysfs interface for battery charge/discharge status, and
    capacity read to be working on my 910-007290 device (white).
    
    Signed-off-by: Matt Coffin <mcoffin13@gmail.com>
    Reviewed-by: Bastien Nocera <hadess@hadess.net>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: multitouch: fix slab out-of-bounds access in mt_report_fixup() [+ + +]
Author: Qasim Ijaz <qasdev00@gmail.com>
Date:   Sun Aug 10 19:09:24 2025 +0100

    HID: multitouch: fix slab out-of-bounds access in mt_report_fixup()
    
    commit 0379eb8691b9c4477da0277ae0832036ca4410b4 upstream.
    
    A malicious HID device can trigger a slab out-of-bounds during
    mt_report_fixup() by passing in report descriptor smaller than
    607 bytes. mt_report_fixup() attempts to patch byte offset 607
    of the descriptor with 0x25 by first checking if byte offset
    607 is 0x15 however it lacks bounds checks to verify if the
    descriptor is big enough before conducting this check. Fix
    this bug by ensuring the descriptor size is at least 608
    bytes before accessing it.
    
    Below is the KASAN splat after the out of bounds access happens:
    
    [   13.671954] ==================================================================
    [   13.672667] BUG: KASAN: slab-out-of-bounds in mt_report_fixup+0x103/0x110
    [   13.673297] Read of size 1 at addr ffff888103df39df by task kworker/0:1/10
    [   13.673297]
    [   13.673297] CPU: 0 UID: 0 PID: 10 Comm: kworker/0:1 Not tainted 6.15.0-00005-gec5d573d83f4-dirty #3
    [   13.673297] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/04
    [   13.673297] Call Trace:
    [   13.673297]  <TASK>
    [   13.673297]  dump_stack_lvl+0x5f/0x80
    [   13.673297]  print_report+0xd1/0x660
    [   13.673297]  kasan_report+0xe5/0x120
    [   13.673297]  __asan_report_load1_noabort+0x18/0x20
    [   13.673297]  mt_report_fixup+0x103/0x110
    [   13.673297]  hid_open_report+0x1ef/0x810
    [   13.673297]  mt_probe+0x422/0x960
    [   13.673297]  hid_device_probe+0x2e2/0x6f0
    [   13.673297]  really_probe+0x1c6/0x6b0
    [   13.673297]  __driver_probe_device+0x24f/0x310
    [   13.673297]  driver_probe_device+0x4e/0x220
    [   13.673297]  __device_attach_driver+0x169/0x320
    [   13.673297]  bus_for_each_drv+0x11d/0x1b0
    [   13.673297]  __device_attach+0x1b8/0x3e0
    [   13.673297]  device_initial_probe+0x12/0x20
    [   13.673297]  bus_probe_device+0x13d/0x180
    [   13.673297]  device_add+0xe3a/0x1670
    [   13.673297]  hid_add_device+0x31d/0xa40
    [...]
    
    Fixes: c8000deb6836 ("HID: multitouch: Add support for GT7868Q")
    Cc: stable@vger.kernel.org
    Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
    Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: quirks: add support for Legion Go dual dinput modes [+ + +]
Author: Antheas Kapenekakis <lkml@antheas.dev>
Date:   Sun Aug 3 18:02:53 2025 +0200

    HID: quirks: add support for Legion Go dual dinput modes
    
    commit 1f3214aae9f49faf495f3836216afbc6c5400b2e upstream.
    
    The Legion Go features detachable controllers which support a dual
    dinput mode. In this mode, the controllers appear under a single HID
    device with two applications.
    
    Currently, both controllers appear under the same event device, causing
    their controls to be mixed up. This patch separates the two so that
    they can be used independently.
    
    In addition, the latest firmware update for the Legion Go swaps the IDs
    to the ones used by the Legion Go 2, so add those IDs as well.
    
    [jkosina@suse.com: improved shortlog]
    Signed-off-by: Antheas Kapenekakis <lkml@antheas.dev>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: wacom: Add a new Art Pen 2 [+ + +]
Author: Ping Cheng <pinglinux@gmail.com>
Date:   Sun Aug 10 22:40:30 2025 -0700

    HID: wacom: Add a new Art Pen 2
    
    commit 9fc51941d9e7793da969b2c66e6f8213c5b1237f upstream.
    
    Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ice: don't leave device non-functional if Tx scheduler config fails [+ + +]
Author: Jacob Keller <jacob.e.keller@intel.com>
Date:   Thu Jul 17 09:57:09 2025 -0700

    ice: don't leave device non-functional if Tx scheduler config fails
    
    [ Upstream commit 86aae43f21cf784c1d7f6a9af93e5116b0f232ab ]
    
    The ice_cfg_tx_topo function attempts to apply Tx scheduler topology
    configuration based on NVM parameters, selecting either a 5 or 9 layer
    topology.
    
    As part of this flow, the driver acquires the "Global Configuration Lock",
    which is a hardware resource associated with programming the DDP package
    to the device. This "lock" is implemented by firmware as a way to
    guarantee that only one PF can program the DDP for a device. Unlike a
    traditional lock, once a PF has acquired this lock, no other PF will be
    able to acquire it again (including that PF) until a CORER of the device.
    Future requests to acquire the lock report that global configuration has
    already completed.
    
    The following flow is used to program the Tx topology:
    
     * Read the DDP package for scheduler configuration data
     * Acquire the global configuration lock
     * Program Tx scheduler topology according to DDP package data
     * Trigger a CORER which clears the global configuration lock
    
    This is followed by the flow for programming the DDP package:
    
     * Acquire the global configuration lock (again)
     * Download the DDP package to the device
     * Release the global configuration lock.
    
    However, if configuration of the Tx topology fails, (i.e.
    ice_get_set_tx_topo returns an error code), the driver exits
    ice_cfg_tx_topo() immediately, and fails to trigger CORER.
    
    While the global configuration lock is held, the firmware rejects most
    AdminQ commands, as it is waiting for the DDP package download (or Tx
    scheduler topology programming) to occur.
    
    The current driver flows assume that the global configuration lock has been
    reset by CORER after programming the Tx topology. Thus, the same PF
    attempts to acquire the global lock again, and fails. This results in the
    driver reporting "an unknown error occurred when loading the DDP package".
    It then attempts to enter safe mode, but ultimately fails to finish
    ice_probe() since nearly all AdminQ command report error codes, and the
    driver stops loading the device at some point during its initialization.
    
    The only currently known way that ice_get_set_tx_topo() can fail is with
    certain older DDP packages which contain invalid topology configuration, on
    firmware versions which strictly validate this data. The most recent
    releases of the DDP have resolved the invalid data. However, it is still
    poor practice to essentially brick the device, and prevent access to the
    device even through safe mode or recovery mode. It is also plausible that
    this command could fail for some other reason in the future.
    
    We cannot simply release the global lock after a failed call to
    ice_get_set_tx_topo(). Releasing the lock indicates to firmware that global
    configuration (downloading of the DDP) has completed. Future attempts by
    this or other PFs to load the DDP will fail with a report that the DDP
    package has already been downloaded. Then, PFs will enter safe mode as they
    realize that the package on the device does not meet the minimum version
    requirement to load. The reported error messages are confusing, as they
    indicate the version of the default "safe mode" package in the NVM, rather
    than the version of the file loaded from /lib/firmware.
    
    Instead, we need to trigger CORER to clear global configuration. This is
    the lowest level of hardware reset which clears the global configuration
    lock and related state. It also clears any already downloaded DDP.
    Crucially, it does *not* clear the Tx scheduler topology configuration.
    
    Refactor ice_cfg_tx_topo() to always trigger a CORER after acquiring the
    global lock, regardless of success or failure of the topology
    configuration.
    
    We need to re-initialize the HW structure when we trigger the CORER. Thus,
    it makes sense for this to be the responsibility of ice_cfg_tx_topo()
    rather than its caller, ice_init_tx_topology(). This avoids needless
    re-initialization in cases where we don't attempt to update the Tx
    scheduler topology, such as if it has already been programmed.
    
    There is one catch: failure to re-initialize the HW struct should stop
    ice_probe(). If this function fails, we won't have a valid HW structure and
    cannot ensure the device is functioning properly. To handle this, ensure
    ice_cfg_tx_topo() returns a limited set of error codes. Set aside one
    specifically, -ENODEV, to indicate that the ice_init_tx_topology() should
    fail and stop probe.
    
    Other error codes indicate failure to apply the Tx scheduler topology. This
    is treated as a non-fatal error, with an informational message informing
    the system administrator that the updated Tx topology did not apply. This
    allows the device to load and function with the default Tx scheduler
    topology, rather than failing to load entirely.
    
    Note that this use of CORER will not result in loops with future PFs
    attempting to also load the invalid Tx topology configuration. The first PF
    will acquire the global configuration lock as part of programming the DDP.
    Each PF after this will attempt to acquire the global lock as part of
    programming the Tx topology, and will fail with the indication from
    firmware that global configuration is already complete. Tx scheduler
    topology configuration is only performed during driver init (probe or
    devlink reload) and not during cleanup for a CORER that happens after probe
    completes.
    
    Fixes: 91427e6d9030 ("ice: Support 5 layer topology")
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ice: fix incorrect counter for buffer allocation failures [+ + +]
Author: Michal Kubiak <michal.kubiak@intel.com>
Date:   Fri Aug 8 17:53:10 2025 +0200

    ice: fix incorrect counter for buffer allocation failures
    
    [ Upstream commit b1a0c977c6f1130f7dd125ee3db8c2435d7e3d41 ]
    
    Currently, the driver increments `alloc_page_failed` when buffer allocation fails
    in `ice_clean_rx_irq()`. However, this counter is intended for page allocation
    failures, not buffer allocation issues.
    
    This patch corrects the counter by incrementing `alloc_buf_failed` instead,
    ensuring accurate statistics reporting for buffer allocation failures.
    
    Fixes: 2fba7dc5157b ("ice: Add support for XDP multi-buffer on Rx side")
    Reported-by: Jacob Keller <jacob.e.keller@intel.com>
    Suggested-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
    Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
    Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Tested-by: Priya Singh <priyax.singh@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ice: fix NULL pointer dereference in ice_unplug_aux_dev() on reset [+ + +]
Author: Emil Tantilov <emil.s.tantilov@intel.com>
Date:   Tue Jun 24 07:26:40 2025 -0700

    ice: fix NULL pointer dereference in ice_unplug_aux_dev() on reset
    
    [ Upstream commit 60dfe2434eed13082f26eb7409665dfafb38fa51 ]
    
    Issuing a reset when the driver is loaded without RDMA support, will
    results in a crash as it attempts to remove RDMA's non-existent auxbus
    device:
    echo 1 > /sys/class/net/<if>/device/reset
    
    BUG: kernel NULL pointer dereference, address: 0000000000000008
    ...
    RIP: 0010:ice_unplug_aux_dev+0x29/0x70 [ice]
    ...
    Call Trace:
    <TASK>
    ice_prepare_for_reset+0x77/0x260 [ice]
    pci_dev_save_and_disable+0x2c/0x70
    pci_reset_function+0x88/0x130
    reset_store+0x5a/0xa0
    kernfs_fop_write_iter+0x15e/0x210
    vfs_write+0x273/0x520
    ksys_write+0x6b/0xe0
    do_syscall_64+0x79/0x3b0
    entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
    ice_unplug_aux_dev() checks pf->cdev_info->adev for NULL pointer, but
    pf->cdev_info will also be NULL, leading to the deref in the trace above.
    
    Introduce a flag to be set when the creation of the auxbus device is
    successful, to avoid multiple NULL pointer checks in ice_unplug_aux_dev().
    
    Fixes: c24a65b6a27c7 ("iidc/ice/irdma: Update IDC to support multiple consumers")
    Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
    Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ice: use fixed adapter index for E825C embedded devices [+ + +]
Author: Jacob Keller <jacob.e.keller@intel.com>
Date:   Fri Aug 1 15:27:12 2025 -0700

    ice: use fixed adapter index for E825C embedded devices
    
    [ Upstream commit 5c5e5b52bf05c7fe88768318c041052c5fac36b8 ]
    
    The ice_adapter structure is used by the ice driver to connect multiple
    physical functions of a device in software. It was introduced by
    commit 0e2bddf9e5f9 ("ice: add ice_adapter for shared data across PFs on
    the same NIC") and is primarily used for PTP support, as well as for
    handling certain cross-PF synchronization.
    
    The original design of ice_adapter used PCI address information to
    determine which devices should be connected. This was extended to support
    E825C devices by commit fdb7f54700b1 ("ice: Initial support for E825C
    hardware in ice_adapter"), which used the device ID for E825C devices
    instead of the PCI address.
    
    Later, commit 0093cb194a75 ("ice: use DSN instead of PCI BDF for
    ice_adapter index") replaced the use of Bus/Device/Function addressing with
    use of the device serial number.
    
    E825C devices may appear in "Dual NAC" configuration which has multiple
    physical devices tied to the same clock source and which need to use the
    same ice_adapter. Unfortunately, each "NAC" has its own NVM which has its
    own unique Device Serial Number. Thus, use of the DSN for connecting
    ice_adapter does not work properly. It "worked" in the pre-production
    systems because the DSN was not initialized on the test NVMs and all the
    NACs had the same zero'd serial number.
    
    Since we cannot rely on the DSN, lets fall back to the logic in the
    original E825C support which used the device ID. This is safe for E825C
    only because of the embedded nature of the device. It isn't a discreet
    adapter that can be plugged into an arbitrary system. All E825C devices on
    a given system are connected to the same clock source and need to be
    configured through the same PTP clock.
    
    To make this separation clear, reserve bit 63 of the 64-bit index values as
    a "fixed index" indicator. Always clear this bit when using the device
    serial number as an index.
    
    For E825C, use a fixed value defined as the 0x579C E825C backplane device
    ID bitwise ORed with the fixed index indicator. This is slightly different
    than the original logic of just using the device ID directly. Doing so
    prevents a potential issue with systems where only one of the NACs is
    connected with an external PHY over SGMII. In that case, one NAC would
    have the E825C_SGMII device ID, but the other would not.
    
    Separate the determination of the full 64-bit index from the 32-bit
    reduction logic. Provide both ice_adapter_index() and a wrapping
    ice_adapter_xa_index() which handles reducing the index to a long on 32-bit
    systems. As before, cache the full index value in the adapter structure to
    warn about collisions.
    
    This fixes issues with E825C not initializing PTP on both NACs, due to
    failure to connect the appropriate devices to the same ice_adapter.
    
    Fixes: 0093cb194a75 ("ice: use DSN instead of PCI BDF for ice_adapter index")
    Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
    Reviewed-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
    Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
idpf: add support for Tx refillqs in flow scheduling mode [+ + +]
Author: Joshua Hay <joshua.a.hay@intel.com>
Date:   Fri Jul 25 11:42:18 2025 -0700

    idpf: add support for Tx refillqs in flow scheduling mode
    
    [ Upstream commit cb83b559bea39f207ee214ee2972657e8576ed18 ]
    
    In certain production environments, it is possible for completion tags
    to collide, meaning N packets with the same completion tag are in flight
    at the same time. In this environment, any given Tx queue is effectively
    used to send both slower traffic and higher throughput traffic
    simultaneously. This is the result of a customer's specific
    configuration in the device pipeline, the details of which Intel cannot
    provide. This configuration results in a small number of out-of-order
    completions, i.e., a small number of packets in flight. The existing
    guardrails in the driver only protect against a large number of packets
    in flight. The slower flow completions are delayed which causes the
    out-of-order completions. The fast flow will continue sending traffic
    and generating tags. Because tags are generated on the fly, the fast
    flow eventually uses the same tag for a packet that is still in flight
    from the slower flow. The driver has no idea which packet it should
    clean when it processes the completion with that tag, but it will look
    for the packet on the buffer ring before the hash table.  If the slower
    flow packet completion is processed first, it will end up cleaning the
    fast flow packet on the ring prematurely. This leaves the descriptor
    ring in a bad state resulting in a crash or Tx timeout.
    
    In summary, generating a tag when a packet is sent can lead to the same
    tag being associated with multiple packets. This can lead to resource
    leaks, crashes, and/or Tx timeouts.
    
    Before we can replace the tag generation, we need a new mechanism for
    the send path to know what tag to use next. The driver will allocate and
    initialize a refillq for each TxQ with all of the possible free tag
    values. During send, the driver grabs the next free tag from the refillq
    from next_to_clean. While cleaning the packet, the clean routine posts
    the tag back to the refillq's next_to_use to indicate that it is now
    free to use.
    
    This mechanism works exactly the same way as the existing Rx refill
    queues, which post the cleaned buffer IDs back to the buffer queue to be
    reposted to HW. Since we're using the refillqs for both Rx and Tx now,
    genericize some of the existing refillq support.
    
    Note: the refillqs will not be used yet. This is only demonstrating how
    they will be used to pass free tags back to the send path.
    
    Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
    Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
    Tested-by: Samuel Salin <Samuel.salin@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Stable-dep-of: b61dfa9bc443 ("idpf: simplify and fix splitq Tx packet rollback error path")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

idpf: replace flow scheduling buffer ring with buffer pool [+ + +]
Author: Joshua Hay <joshua.a.hay@intel.com>
Date:   Fri Jul 25 11:42:21 2025 -0700

    idpf: replace flow scheduling buffer ring with buffer pool
    
    [ Upstream commit 5f417d551324d2894168b362f2429d120ab06243 ]
    
    Replace the TxQ buffer ring with one large pool/array of buffers (only
    for flow scheduling). This eliminates the tag generation and makes it
    impossible for a tag to be associated with more than one packet.
    
    The completion tag passed to HW through the descriptor is the index into
    the array. That same completion tag is posted back to the driver in the
    completion descriptor, and used to index into the array to quickly
    retrieve the buffer during cleaning.  In this way, the tags are treated
    as a fix sized resource. If all tags are in use, no more packets can be
    sent on that particular queue (until some are freed up). The tag pool
    size is 64K since the completion tag width is 16 bits.
    
    For each packet, the driver pulls a free tag from the refillq to get the
    next free buffer index. When cleaning is complete, the tag is posted
    back to the refillq. A multi-frag packet spans multiple buffers in the
    driver, therefore it uses multiple buffer indexes/tags from the pool.
    Each frag pulls from the refillq to get the next free buffer index.
    These are tracked in a next_buf field that replaces the completion tag
    field in the buffer struct. This chains the buffers together so that the
    packet can be cleaned from the starting completion tag taken from the
    completion descriptor, then from the next_buf field for each subsequent
    buffer.
    
    In case of a dma_mapping_error occurs or the refillq runs out of free
    buf_ids, the packet will execute the rollback error path. This unmaps
    any buffers previously mapped for the packet. Since several free
    buf_ids could have already been pulled from the refillq, we need to
    restore its original state as well. Otherwise, the buf_ids/tags
    will be leaked and not used again until the queue is reallocated.
    
    Descriptor completions only advance the descriptor ring index to "clean"
    the descriptors. The packet completions only clean the buffers
    associated with the given packet completion tag and do not update the
    descriptor ring index.
    
    When operating in queue based scheduling mode, the array still acts as a
    ring and will only have TxQ descriptor count entries. The tx_bufs are
    still associated 1:1 with the descriptor ring entries and we can use the
    conventional indexing mechanisms.
    
    Fixes: c2d548cad150 ("idpf: add TX splitq napi poll support")
    Signed-off-by: Luigi Rizzo <lrizzo@google.com>
    Signed-off-by: Brian Vazquez <brianvv@google.com>
    Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
    Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Tested-by: Samuel Salin <Samuel.salin@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

idpf: simplify and fix splitq Tx packet rollback error path [+ + +]
Author: Joshua Hay <joshua.a.hay@intel.com>
Date:   Fri Jul 25 11:42:20 2025 -0700

    idpf: simplify and fix splitq Tx packet rollback error path
    
    [ Upstream commit b61dfa9bc4430ad82b96d3a7c1c485350f91b467 ]
    
    Move (and rename) the existing rollback logic to singleq.c since that
    will be the only consumer. Create a simplified splitq specific rollback
    function to loop through and unmap tx_bufs based on the completion tag.
    This is critical before replacing the Tx buffer ring with the buffer
    pool since the previous rollback indexing will not work to unmap the
    chained buffers from the pool.
    
    Cache the next_to_use index before any portion of the packet is put on
    the descriptor ring. In case of an error, the rollback will bump tail to
    the correct next_to_use value. Because the splitq path now supports
    different types of context descriptors (and potentially multiple in the
    future), this will take care of rolling back any and all context
    descriptors encoded on the ring for the erroneous packet. The previous
    rollback logic was broken for PTP packets since it would not account for
    the PTP context descriptor.
    
    Fixes: 1a49cf814fe1 ("idpf: add Tx timestamp flows")
    Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
    Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
    Tested-by: Samuel Salin <Samuel.salin@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

idpf: stop Tx if there are insufficient buffer resources [+ + +]
Author: Joshua Hay <joshua.a.hay@intel.com>
Date:   Fri Jul 25 11:42:22 2025 -0700

    idpf: stop Tx if there are insufficient buffer resources
    
    [ Upstream commit 0c3f135e840d4a2ba4253e15d530ec61bc30718e ]
    
    The Tx refillq logic will cause packets to be silently dropped if there
    are not enough buffer resources available to send a packet in flow
    scheduling mode. Instead, determine how many buffers are needed along
    with number of descriptors. Make sure there are enough of both resources
    to send the packet, and stop the queue if not.
    
    Fixes: 7292af042bcf ("idpf: fix a race in txq wakeup")
    Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
    Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
    Tested-by: Samuel Salin <Samuel.salin@intel.com>
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
io_uring/io-wq: add check free worker before create new worker [+ + +]
Author: Fengnan Chang <changfengnan@bytedance.com>
Date:   Wed Aug 13 20:02:14 2025 +0800

    io_uring/io-wq: add check free worker before create new worker
    
    [ Upstream commit 9d83e1f05c98bab5de350bef89177e2be8b34db0 ]
    
    After commit 0b2b066f8a85 ("io_uring/io-wq: only create a new worker
    if it can make progress"), in our produce environment, we still
    observe that part of io_worker threads keeps creating and destroying.
    After analysis, it was confirmed that this was due to a more complex
    scenario involving a large number of fsync operations, which can be
    abstracted as frequent write + fsync operations on multiple files in
    a single uring instance. Since write is a hash operation while fsync
    is not, and fsync is likely to be suspended during execution, the
    action of checking the hash value in
    io_wqe_dec_running cannot handle such scenarios.
    Similarly, if hash-based work and non-hash-based work are sent at the
    same time, similar issues are likely to occur.
    Returning to the starting point of the issue, when a new work
    arrives, io_wq_enqueue may wake up free worker A, while
    io_wq_dec_running may create worker B. Ultimately, only one of A and
    B can obtain and process the task, leaving the other in an idle
    state. In the end, the issue is caused by inconsistent logic in the
    checks performed by io_wq_enqueue and io_wq_dec_running.
    Therefore, the problem can be resolved by checking for available
    workers in io_wq_dec_running.
    
    Signed-off-by: Fengnan Chang <changfengnan@bytedance.com>
    Reviewed-by: Diangang Li <lidiangang@bytedance.com>
    Link: https://lore.kernel.org/r/20250813120214.18729-1-changfengnan@bytedance.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
io_uring/kbuf: always use READ_ONCE() to read ring provided buffer lengths [+ + +]
Author: Jens Axboe <axboe@kernel.dk>
Date:   Wed Aug 27 15:27:30 2025 -0600

    io_uring/kbuf: always use READ_ONCE() to read ring provided buffer lengths
    
    [ Upstream commit 98b6fa62c84f2e129161e976a5b9b3cb4ccd117b ]
    
    Since the buffers are mapped from userspace, it is prudent to use
    READ_ONCE() to read the value into a local variable, and use that for
    any other actions taken. Having a stable read of the buffer length
    avoids worrying about it changing after checking, or being read multiple
    times.
    
    Similarly, the buffer may well change in between it being picked and
    being committed. Ensure the looping for incremental ring buffer commit
    stops if it hits a zero sized buffer, as no further progress can be made
    at that point.
    
    Fixes: ae98dbf43d75 ("io_uring/kbuf: add support for incremental buffer consumption")
    Link: https://lore.kernel.org/io-uring/tencent_000C02641F6250C856D0C26228DE29A3D30A@qq.com/
    Reported-by: Qingyue Zhang <chunzhennn@qq.com>
    Reported-by: Suoxing Zhang <aftern00n@qq.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

io_uring/kbuf: fix signedness in this_len calculation [+ + +]
Author: Qingyue Zhang <chunzhennn@qq.com>
Date:   Wed Aug 27 19:43:39 2025 +0800

    io_uring/kbuf: fix signedness in this_len calculation
    
    [ Upstream commit c64eff368ac676e8540344d27a3de47e0ad90d21 ]
    
    When importing and using buffers, buf->len is considered unsigned.
    However, buf->len is converted to signed int when committing. This can
    lead to unexpected behavior if the buffer is large enough to be
    interpreted as a negative value. Make min_t calculation unsigned.
    
    Fixes: ae98dbf43d75 ("io_uring/kbuf: add support for incremental buffer consumption")
    Co-developed-by: Suoxing Zhang <aftern00n@qq.com>
    Signed-off-by: Suoxing Zhang <aftern00n@qq.com>
    Signed-off-by: Qingyue Zhang <chunzhennn@qq.com>
    Link: https://lore.kernel.org/r/tencent_4DBB3674C0419BEC2C0C525949DA410CA307@qq.com
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
ixgbe: fix ixgbe_orom_civd_info struct layout [+ + +]
Author: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Date:   Thu Jul 31 14:45:33 2025 +0200

    ixgbe: fix ixgbe_orom_civd_info struct layout
    
    [ Upstream commit ed913b343dcf9f623e7436fa1a153c89b22d109b ]
    
    The current layout of struct ixgbe_orom_civd_info causes incorrect data
    storage due to compiler-inserted padding. This results in issues when
    writing OROM data into the structure.
    
    Add the __packed attribute to ensure the structure layout matches the
    expected binary format without padding.
    
    Fixes: 70db0788a262 ("ixgbe: read the OROM version information")
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
KVM: x86: use array_index_nospec with indices that come from guest [+ + +]
Author: Thijs Raymakers <thijs@raymakers.nl>
Date:   Mon Aug 4 08:44:05 2025 +0200

    KVM: x86: use array_index_nospec with indices that come from guest
    
    commit c87bd4dd43a624109c3cc42d843138378a7f4548 upstream.
    
    min and dest_id are guest-controlled indices. Using array_index_nospec()
    after the bounds checks clamps these values to mitigate speculative execution
    side-channels.
    
    Signed-off-by: Thijs Raymakers <thijs@raymakers.nl>
    Cc: stable@vger.kernel.org
    Cc: Sean Christopherson <seanjc@google.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Fixes: 715062970f37 ("KVM: X86: Implement PV sched yield hypercall")
    Fixes: bdf7ffc89922 ("KVM: LAPIC: Fix pv ipis out-of-bounds access")
    Fixes: 4180bf1b655a ("KVM: X86: Implement "send IPI" hypercall")
    Link: https://lore.kernel.org/r/20250804064405.4802-1-thijs@raymakers.nl
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
l2tp: do not use sock_hold() in pppol2tp_session_get_sock() [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Tue Aug 26 13:44:35 2025 +0000

    l2tp: do not use sock_hold() in pppol2tp_session_get_sock()
    
    [ Upstream commit 9b8c88f875c04d4cb9111bd5dd9291c7e9691bf5 ]
    
    pppol2tp_session_get_sock() is using RCU, it must be ready
    for sk_refcnt being zero.
    
    Commit ee40fb2e1eb5 ("l2tp: protect sock pointer of
    struct pppol2tp_session with RCU") was correct because it
    had a call_rcu(..., pppol2tp_put_sk) which was later removed in blamed commit.
    
    pppol2tp_recv() can use pppol2tp_session_get_sock() as well.
    
    Fixes: c5cbaef992d6 ("l2tp: refactor ppp socket/session relationship")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: James Chapman <jchapman@katalix.com>
    Reviewed-by: Guillaume Nault <gnault@redhat.com>
    Link: https://patch.msgid.link/20250826134435.1683435-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Linux: Linux 6.16.5 [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Sep 4 16:55:53 2025 +0200

    Linux 6.16.5
    
    Link: https://lore.kernel.org/r/20250902131948.154194162@linuxfoundation.org
    Tested-by: Markus Reichelt <lkt+2023@mareichelt.com>
    Tested-by: Brett A C Sheffield <bacs@librecast.net>
    Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
    Tested-by: Ronald Warsow <rwarsow@gmx.de>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-By: Achill Gilgenast <achill@achill.org>=
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Mark Brown <broonie@kernel.org>
    Tested-by: Peter Schneider <pschneider1968@googlemail.com>
    Tested-by: Salvatore Bonaccorso <carnil@debian.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mips: dts: lantiq: danube: add missing burst length property [+ + +]
Author: Aleksander Jan Bajkowski <olek2@wp.pl>
Date:   Sun Aug 17 14:49:06 2025 +0200

    mips: dts: lantiq: danube: add missing burst length property
    
    [ Upstream commit 7b28232921782aa38048249132899c337405eaa8 ]
    
    The upstream dts lacks the lantiq,{rx/tx}-burst-length property. Other
    issues were also fixed:
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: etop@e180000 (lantiq,etop-xway): 'interrupt-names' is a required property
            from schema $id: http://devicetree.org/schemas/net/lantiq,etop-xway.yaml#
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: etop@e180000 (lantiq,etop-xway): 'lantiq,tx-burst-length' is a required property
            from schema $id: http://devicetree.org/schemas/net/lantiq,etop-xway.yaml#
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: etop@e180000 (lantiq,etop-xway): 'lantiq,rx-burst-length' is a required property
            from schema $id: http://devicetree.org/schemas/net/lantiq,etop-xway.yaml#
    
    Fixes: 14d4e308e0aa ("net: lantiq: configure the burst length in ethernet drivers")
    Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
    Acked-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

mips: lantiq: xway: sysctrl: rename the etop node [+ + +]
Author: Aleksander Jan Bajkowski <olek2@wp.pl>
Date:   Sun Aug 17 14:49:07 2025 +0200

    mips: lantiq: xway: sysctrl: rename the etop node
    
    [ Upstream commit 8c431ea8f3f795c4b9cfa57a85bc4166b9cce0ac ]
    
    Bindig requires a node name matching ‘^ethernet@[0-9a-f]+$’. This patch
    changes the clock name from “etop” to “ethernet”.
    
    This fixes the following warning:
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: etop@e180000 (lantiq,etop-xway): $nodename:0: 'etop@e180000' does not match '^ethernet@[0-9a-f]+$'
            from schema $id: http://devicetree.org/schemas/net/lantiq,etop-xway.yaml#
    
    Fixes: dac0bad93741 ("dt-bindings: net: lantiq,etop-xway: Document Lantiq Xway ETOP bindings")
    Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
    Acked-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
mISDN: hfcpci: Fix warning when deleting uninitialized timer [+ + +]
Author: Vladimir Riabchun <ferr.lambarginio@gmail.com>
Date:   Fri Aug 22 20:11:36 2025 +0200

    mISDN: hfcpci: Fix warning when deleting uninitialized timer
    
    [ Upstream commit 97766512a9951b9fd6fc97f1b93211642bb0b220 ]
    
    With CONFIG_DEBUG_OBJECTS_TIMERS unloading hfcpci module leads
    to the following splat:
    
    [  250.215892] ODEBUG: assert_init not available (active state 0) object: ffffffffc01a3dc0 object type: timer_list hint: 0x0
    [  250.217520] WARNING: CPU: 0 PID: 233 at lib/debugobjects.c:612 debug_print_object+0x1b6/0x2c0
    [  250.218775] Modules linked in: hfcpci(-) mISDN_core
    [  250.219537] CPU: 0 UID: 0 PID: 233 Comm: rmmod Not tainted 6.17.0-rc2-g6f713187ac98 #2 PREEMPT(voluntary)
    [  250.220940] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
    [  250.222377] RIP: 0010:debug_print_object+0x1b6/0x2c0
    [  250.223131] Code: fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 4f 41 56 48 8b 14 dd a0 4e 01 9f 48 89 ee 48 c7 c7 20 46 01 9f e8 cb 84d
    [  250.225805] RSP: 0018:ffff888015ea7c08 EFLAGS: 00010286
    [  250.226608] RAX: 0000000000000000 RBX: 0000000000000005 RCX: ffffffff9be93a95
    [  250.227708] RDX: 1ffff1100d945138 RSI: 0000000000000008 RDI: ffff88806ca289c0
    [  250.228993] RBP: ffffffff9f014a00 R08: 0000000000000001 R09: ffffed1002bd4f39
    [  250.230043] R10: ffff888015ea79cf R11: 0000000000000001 R12: 0000000000000001
    [  250.231185] R13: ffffffff9eea0520 R14: 0000000000000000 R15: ffff888015ea7cc8
    [  250.232454] FS:  00007f3208f01540(0000) GS:ffff8880caf5a000(0000) knlGS:0000000000000000
    [  250.233851] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  250.234856] CR2: 00007f32090a7421 CR3: 0000000004d63000 CR4: 00000000000006f0
    [  250.236117] Call Trace:
    [  250.236599]  <TASK>
    [  250.236967]  ? trace_irq_enable.constprop.0+0xd4/0x130
    [  250.237920]  debug_object_assert_init+0x1f6/0x310
    [  250.238762]  ? __pfx_debug_object_assert_init+0x10/0x10
    [  250.239658]  ? __lock_acquire+0xdea/0x1c70
    [  250.240369]  __try_to_del_timer_sync+0x69/0x140
    [  250.241172]  ? __pfx___try_to_del_timer_sync+0x10/0x10
    [  250.242058]  ? __timer_delete_sync+0xc6/0x120
    [  250.242842]  ? lock_acquire+0x30/0x80
    [  250.243474]  ? __timer_delete_sync+0xc6/0x120
    [  250.244262]  __timer_delete_sync+0x98/0x120
    [  250.245015]  HFC_cleanup+0x10/0x20 [hfcpci]
    [  250.245704]  __do_sys_delete_module+0x348/0x510
    [  250.246461]  ? __pfx___do_sys_delete_module+0x10/0x10
    [  250.247338]  do_syscall_64+0xc1/0x360
    [  250.247924]  entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Fix this by initializing hfc_tl timer with DEFINE_TIMER macro.
    Also, use mod_timer instead of manual timeout update.
    
    Fixes: 87c5fa1bb426 ("mISDN: Add different different timer settings for hfc-pci")
    Fixes: 175302f6b79e ("mISDN: hfcpci: Fix use-after-free bug in hfcpci_softirq")
    Signed-off-by: Vladimir Riabchun <ferr.lambarginio@gmail.com>
    Link: https://patch.msgid.link/aKiy2D_LiWpQ5kXq@vova-pc
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net/mlx5: Fix lockdep assertion on sync reset unload event [+ + +]
Author: Moshe Shemesh <moshe@nvidia.com>
Date:   Mon Aug 25 17:34:29 2025 +0300

    net/mlx5: Fix lockdep assertion on sync reset unload event
    
    [ Upstream commit 902a8bc23a24882200f57cadc270e15a2cfaf2bb ]
    
    Fix lockdep assertion triggered during sync reset unload event. When the
    sync reset flow is initiated using the devlink reload fw_activate
    option, the PF already holds the devlink lock while handling unload
    event. In this case, delegate sync reset unload event handling back to
    the devlink callback process to avoid double-locking and resolve the
    lockdep warning.
    
    Kernel log:
    WARNING: CPU: 9 PID: 1578 at devl_assert_locked+0x31/0x40
    [...]
    Call Trace:
    <TASK>
     mlx5_unload_one_devl_locked+0x2c/0xc0 [mlx5_core]
     mlx5_sync_reset_unload_event+0xaf/0x2f0 [mlx5_core]
     process_one_work+0x222/0x640
     worker_thread+0x199/0x350
     kthread+0x10b/0x230
     ? __pfx_worker_thread+0x10/0x10
     ? __pfx_kthread+0x10/0x10
     ret_from_fork+0x8e/0x100
     ? __pfx_kthread+0x10/0x10
     ret_from_fork_asm+0x1a/0x30
    </TASK>
    
    Fixes: 7a9770f1bfea ("net/mlx5: Handle sync reset unload event")
    Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-7-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: HWS, Fix memory leak in hws_action_get_shared_stc_nic error flow [+ + +]
Author: Lama Kayal <lkayal@nvidia.com>
Date:   Mon Aug 25 17:34:25 2025 +0300

    net/mlx5: HWS, Fix memory leak in hws_action_get_shared_stc_nic error flow
    
    [ Upstream commit a630f83592cdad1253523a1b760cfe78fef6cd9c ]
    
    When an invalid stc_type is provided, the function allocates memory for
    shared_stc but jumps to unlock_and_out without freeing it, causing a
    memory leak.
    
    Fix by jumping to free_shared_stc label instead to ensure proper cleanup.
    
    Fixes: 504e536d9010 ("net/mlx5: HWS, added actions handling")
    Signed-off-by: Lama Kayal <lkayal@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-3-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: HWS, Fix memory leak in hws_pool_buddy_init error path [+ + +]
Author: Lama Kayal <lkayal@nvidia.com>
Date:   Mon Aug 25 17:34:24 2025 +0300

    net/mlx5: HWS, Fix memory leak in hws_pool_buddy_init error path
    
    [ Upstream commit 2c0a959bebdc1ada13cf9a8242f177c5400299e6 ]
    
    In the error path of hws_pool_buddy_init(), the buddy allocator cleanup
    doesn't free the allocator structure itself, causing a memory leak.
    
    Add the missing kfree() to properly release all allocated memory.
    
    Fixes: c61afff94373 ("net/mlx5: HWS, added memory management handling")
    Signed-off-by: Lama Kayal <lkayal@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-2-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: HWS, Fix pattern destruction in mlx5hws_pat_get_pattern error path [+ + +]
Author: Lama Kayal <lkayal@nvidia.com>
Date:   Mon Aug 25 17:34:27 2025 +0300

    net/mlx5: HWS, Fix pattern destruction in mlx5hws_pat_get_pattern error path
    
    [ Upstream commit 00a50e4e8974cbf5d6a1dc91cfa5cce4aa7af05a ]
    
    In mlx5hws_pat_get_pattern(), when mlx5hws_pat_add_pattern_to_cache()
    fails, the function attempts to clean up the pattern created by
    mlx5hws_cmd_header_modify_pattern_create(). However, it incorrectly
    uses *pattern_id which hasn't been set yet, instead of the local
    ptrn_id variable that contains the actual pattern ID.
    
    This results in attempting to destroy a pattern using uninitialized
    data from the output parameter, rather than the valid pattern ID
    returned by the firmware.
    
    Use ptrn_id instead of *pattern_id in the cleanup path to properly
    destroy the created pattern.
    
    Fixes: aefc15a0fa1c ("net/mlx5: HWS, added modify header pattern and args handling")
    Signed-off-by: Lama Kayal <lkayal@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-5-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: HWS, Fix uninitialized variables in mlx5hws_pat_calc_nop error flow [+ + +]
Author: Lama Kayal <lkayal@nvidia.com>
Date:   Mon Aug 25 17:34:26 2025 +0300

    net/mlx5: HWS, Fix uninitialized variables in mlx5hws_pat_calc_nop error flow
    
    [ Upstream commit 24b6e53140475b56cadcccd4e82a93aa5bacf1eb ]
    
    In mlx5hws_pat_calc_nop(), src_field and dst_field are passed to
    hws_action_modify_get_target_fields() which should set their values.
    However, if an invalid action type is encountered, these variables
    remain uninitialized and are later used to update prev_src_field
    and prev_dst_field.
    
    Initialize both variables to INVALID_FIELD to ensure they have
    defined values in all code paths.
    
    Fixes: 01e035fd0380 ("net/mlx5: HWS, handle modify header actions dependency")
    Signed-off-by: Lama Kayal <lkayal@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-4-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: Nack sync reset when SFs are present [+ + +]
Author: Moshe Shemesh <moshe@nvidia.com>
Date:   Mon Aug 25 17:34:30 2025 +0300

    net/mlx5: Nack sync reset when SFs are present
    
    [ Upstream commit 26e42ec7712d392d561964514b1f253b1a96f42d ]
    
    If PF (Physical Function) has SFs (Sub-Functions), since the SFs are not
    taking part in the synchronization flow, sync reset can lead to fatal
    error on the SFs, as the function will be closed unexpectedly from the
    SF point of view.
    
    Add a check to prevent sync reset when there are SFs on a PF device
    which is not ECPF, as ECPF is teardowned gracefully before reset.
    
    Fixes: 92501fa6e421 ("net/mlx5: Ack on sync_reset_request only if PF can do reset_now")
    Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
    Reviewed-by: Parav Pandit <parav@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-8-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: Prevent flow steering mode changes in switchdev mode [+ + +]
Author: Moshe Shemesh <moshe@nvidia.com>
Date:   Mon Aug 25 17:34:31 2025 +0300

    net/mlx5: Prevent flow steering mode changes in switchdev mode
    
    [ Upstream commit cf9a8627b9a369ba01d37be6f71b297beb688faa ]
    
    Changing flow steering modes is not allowed when eswitch is in switchdev
    mode. This fix ensures that any steering mode change, including to
    firmware steering, is correctly blocked while eswitch mode is switchdev.
    
    Fixes: e890acd5ff18 ("net/mlx5: Add devlink flow_steering_mode parameter")
    Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-9-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5: Reload auxiliary drivers on fw_activate [+ + +]
Author: Moshe Shemesh <moshe@nvidia.com>
Date:   Mon Aug 25 17:34:28 2025 +0300

    net/mlx5: Reload auxiliary drivers on fw_activate
    
    [ Upstream commit 34cc6a54914f478c93e176450fae6313404f9f74 ]
    
    The devlink reload fw_activate command performs firmware activation
    followed by driver reload, while devlink reload driver_reinit triggers
    only driver reload. However, the driver reload logic differs between the
    two modes, as on driver_reinit mode mlx5 also reloads auxiliary drivers,
    while in fw_activate mode the auxiliary drivers are suspended where
    applicable.
    
    Additionally, following the cited commit, if the device has multiple PFs,
    the behavior during fw_activate may vary between PFs: one PF may suspend
    auxiliary drivers, while another reloads them.
    
    Align devlink dev reload fw_activate behavior with devlink dev reload
    driver_reinit, to reload all auxiliary drivers.
    
    Fixes: 72ed5d5624af ("net/mlx5: Suspend auxiliary devices only in case of PCI device suspend")
    Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Akiva Goldberger <agoldberger@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-6-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net/mlx5e: Set local Xoff after FW update [+ + +]
Author: Alexei Lazar <alazar@nvidia.com>
Date:   Mon Aug 25 17:34:34 2025 +0300

    net/mlx5e: Set local Xoff after FW update
    
    [ Upstream commit aca0c31af61e0d5cf1675a0cbd29460b95ae693c ]
    
    The local Xoff value is being set before the firmware (FW) update.
    In case of a failure where the FW is not updated with the new value,
    there is no fallback to the previous value.
    Update the local Xoff value after the FW has been successfully set.
    
    Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration")
    Signed-off-by: Alexei Lazar <alazar@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-12-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5e: Update and set Xon/Xoff upon MTU set [+ + +]
Author: Alexei Lazar <alazar@nvidia.com>
Date:   Mon Aug 25 17:34:32 2025 +0300

    net/mlx5e: Update and set Xon/Xoff upon MTU set
    
    [ Upstream commit ceddedc969f0532b7c62ca971ee50d519d2bc0cb ]
    
    Xon/Xoff sizes are derived from calculation that include the MTU size.
    Set Xon/Xoff when MTU is set.
    If Xon/Xoff fails, set the previous MTU.
    
    Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration")
    Signed-off-by: Alexei Lazar <alazar@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-10-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net/mlx5e: Update and set Xon/Xoff upon port speed set [+ + +]
Author: Alexei Lazar <alazar@nvidia.com>
Date:   Mon Aug 25 17:34:33 2025 +0300

    net/mlx5e: Update and set Xon/Xoff upon port speed set
    
    [ Upstream commit d24341740fe48add8a227a753e68b6eedf4b385a ]
    
    Xon/Xoff sizes are derived from calculations that include
    the port speed.
    These settings need to be updated and applied whenever the
    port speed is changed.
    The port speed is typically set after the physical link goes down
    and is negotiated as part of the link-up process between the two
    connected interfaces.
    Xon/Xoff parameters being updated at the point where the new
    negotiated speed is established.
    
    Fixes: 0696d60853d5 ("net/mlx5e: Receive buffer configuration")
    Signed-off-by: Alexei Lazar <alazar@nvidia.com>
    Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Mark Bloch <mbloch@nvidia.com>
    Link: https://patch.msgid.link/20250825143435.598584-11-mbloch@nvidia.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net: dlink: fix multicast stats being counted incorrectly [+ + +]
Author: Yeounsu Moon <yyyynoom@gmail.com>
Date:   Sun Aug 24 03:29:24 2025 +0900

    net: dlink: fix multicast stats being counted incorrectly
    
    [ Upstream commit 007a5ffadc4fd51739527f1503b7cf048f31c413 ]
    
    `McstFramesRcvdOk` counts the number of received multicast packets, and
    it reports the value correctly.
    
    However, reading `McstFramesRcvdOk` clears the register to zero. As a
    result, the driver was reporting only the packets since the last read,
    instead of the accumulated total.
    
    Fix this by updating the multicast statistics accumulatively instaed of
    instantaneously.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Tested-on: D-Link DGE-550T Rev-A3
    Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Link: https://patch.msgid.link/20250823182927.6063-3-yyyynoom@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: hv_netvsc: fix loss of early receive events from host during channel open. [+ + +]
Author: Dipayaan Roy <dipayanroy@linux.microsoft.com>
Date:   Mon Aug 25 04:56:27 2025 -0700

    net: hv_netvsc: fix loss of early receive events from host during channel open.
    
    [ Upstream commit 9448ccd853368582efa9db05db344f8bb9dffe0f ]
    
    The hv_netvsc driver currently enables NAPI after opening the primary and
    subchannels. This ordering creates a race: if the Hyper-V host places data
    in the host -> guest ring buffer and signals the channel before
    napi_enable() has been called, the channel callback will run but
    napi_schedule_prep() will return false. As a result, the NAPI poller never
    gets scheduled, the data in the ring buffer is not consumed, and the
    receive queue may remain permanently stuck until another interrupt happens
    to arrive.
    
    Fix this by enabling NAPI and registering it with the RX/TX queues before
    vmbus channel is opened. This guarantees that any early host signal after
    open will correctly trigger NAPI scheduling and the ring buffer will be
    drained.
    
    Fixes: 76bb5db5c749d ("netvsc: fix use after free on module removal")
    Signed-off-by: Dipayaan Roy <dipayanroy@linux.microsoft.com>
    Link: https://patch.msgid.link/20250825115627.GA32189@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: ipv4: fix regression in local-broadcast routes [+ + +]
Author: Oscar Maes <oscmaes92@gmail.com>
Date:   Wed Aug 27 08:23:21 2025 +0200

    net: ipv4: fix regression in local-broadcast routes
    
    [ Upstream commit 5189446ba995556eaa3755a6e875bc06675b88bd ]
    
    Commit 9e30ecf23b1b ("net: ipv4: fix incorrect MTU in broadcast routes")
    introduced a regression where local-broadcast packets would have their
    gateway set in __mkroute_output, which was caused by fi = NULL being
    removed.
    
    Fix this by resetting the fib_info for local-broadcast packets. This
    preserves the intended changes for directed-broadcast packets.
    
    Cc: stable@vger.kernel.org
    Fixes: 9e30ecf23b1b ("net: ipv4: fix incorrect MTU in broadcast routes")
    Reported-by: Brett A C Sheffield <bacs@librecast.net>
    Closes: https://lore.kernel.org/regressions/20250822165231.4353-4-bacs@librecast.net
    Signed-off-by: Oscar Maes <oscmaes92@gmail.com>
    Reviewed-by: David Ahern <dsahern@kernel.org>
    Link: https://patch.msgid.link/20250827062322.4807-1-oscmaes92@gmail.com
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: macb: Disable clocks once [+ + +]
Author: Neil Mandir <neil.mandir@seco.com>
Date:   Tue Aug 26 10:30:22 2025 -0400

    net: macb: Disable clocks once
    
    [ Upstream commit dac978e51cce0c1f00a14c4a82f81d387f79b2d4 ]
    
    When the driver is removed the clocks are disabled twice: once in
    macb_remove and a second time by runtime pm. Disable wakeup in remove so
    all the clocks are disabled and skip the second call to macb_clks_disable.
    Always suspend the device as we always set it active in probe.
    
    Fixes: d54f89af6cc4 ("net: macb: Add pm runtime support")
    Signed-off-by: Neil Mandir <neil.mandir@seco.com>
    Co-developed-by: Sean Anderson <sean.anderson@linux.dev>
    Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
    Link: https://patch.msgid.link/20250826143022.935521-1-sean.anderson@linux.dev
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: macb: Fix offset error in gem_update_stats [+ + +]
Author: Sean Anderson <sean.anderson@linux.dev>
Date:   Mon Aug 25 13:21:34 2025 -0400

    net: macb: Fix offset error in gem_update_stats
    
    [ Upstream commit 16c8a3a67ec799fc731919e3e51be9af6cdf541d ]
    
    hw_stats now has only one variable for tx_octets/rx_octets, so we should
    only increment p once, not twice. This would cause the statistics to be
    reported under the wrong categories in `ethtool -S --all-groups` (which
    uses hw_stats) but not `ethtool -S` (which uses ethtool_stats).
    
    Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
    Fixes: f6af690a295a ("net: cadence: macb: Report standard stats")
    Link: https://patch.msgid.link/20250825172134.681861-1-sean.anderson@linux.dev
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: macb: fix unregister_netdev call order in macb_remove() [+ + +]
Author: luoguangfei <15388634752@163.com>
Date:   Tue Aug 19 07:25:27 2025 +0800

    net: macb: fix unregister_netdev call order in macb_remove()
    
    [ Upstream commit 01b9128c5db1b470575d07b05b67ffa3cb02ebf1 ]
    
    When removing a macb device, the driver calls phy_exit() before
    unregister_netdev(). This leads to a WARN from kernfs:
    
      ------------[ cut here ]------------
      kernfs: can not remove 'attached_dev', no directory
      WARNING: CPU: 1 PID: 27146 at fs/kernfs/dir.c:1683
      Call trace:
        kernfs_remove_by_name_ns+0xd8/0xf0
        sysfs_remove_link+0x24/0x58
        phy_detach+0x5c/0x168
        phy_disconnect+0x4c/0x70
        phylink_disconnect_phy+0x6c/0xc0 [phylink]
        macb_close+0x6c/0x170 [macb]
        ...
        macb_remove+0x60/0x168 [macb]
        platform_remove+0x5c/0x80
        ...
    
    The warning happens because the PHY is being exited while the netdev
    is still registered. The correct order is to unregister the netdev
    before shutting down the PHY and cleaning up the MDIO bus.
    
    Fix this by moving unregister_netdev() ahead of phy_exit() in
    macb_remove().
    
    Fixes: 8b73fa3ae02b ("net: macb: Added ZynqMP-specific initialization")
    Signed-off-by: luoguangfei <15388634752@163.com>
    Link: https://patch.msgid.link/20250818232527.1316-1-15388634752@163.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: rose: convert 'use' field to refcount_t [+ + +]
Author: Takamitsu Iwai <takamitz@amazon.co.jp>
Date:   Sat Aug 23 17:58:56 2025 +0900

    net: rose: convert 'use' field to refcount_t
    
    [ Upstream commit d860d1faa6b2ce3becfdb8b0c2b048ad31800061 ]
    
    The 'use' field in struct rose_neigh is used as a reference counter but
    lacks atomicity. This can lead to race conditions where a rose_neigh
    structure is freed while still being referenced by other code paths.
    
    For example, when rose_neigh->use becomes zero during an ioctl operation
    via rose_rt_ioctl(), the structure may be removed while its timer is
    still active, potentially causing use-after-free issues.
    
    This patch changes the type of 'use' from unsigned short to refcount_t and
    updates all code paths to use rose_neigh_hold() and rose_neigh_put() which
    operate reference counts atomically.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Takamitsu Iwai <takamitz@amazon.co.jp>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20250823085857.47674-3-takamitz@amazon.co.jp
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: rose: fix a typo in rose_clear_routes() [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Wed Aug 27 17:21:49 2025 +0000

    net: rose: fix a typo in rose_clear_routes()
    
    commit 1cc8a5b534e5f9b5e129e54ee2e63c9f5da4f39a upstream.
    
    syzbot crashed in rose_clear_routes(), after a recent patch typo.
    
    KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017]
    CPU: 0 UID: 0 PID: 10591 Comm: syz.3.1856 Not tainted syzkaller #0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
     RIP: 0010:rose_clear_routes net/rose/rose_route.c:565 [inline]
     RIP: 0010:rose_rt_ioctl+0x162/0x1250 net/rose/rose_route.c:760
     <TASK>
      rose_ioctl+0x3ce/0x8b0 net/rose/af_rose.c:1381
      sock_do_ioctl+0xd9/0x300 net/socket.c:1238
      sock_ioctl+0x576/0x790 net/socket.c:1359
      vfs_ioctl fs/ioctl.c:51 [inline]
      __do_sys_ioctl fs/ioctl.c:598 [inline]
      __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
      do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
      do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Fixes: da9c9c877597 ("net: rose: include node references in rose_neigh refcount")
    Reported-by: syzbot+2eb8d1719f7cfcfa6840@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/68af3e29.a70a0220.3cafd4.002e.GAE@google.com/T/#u
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Takamitsu Iwai <takamitz@amazon.co.jp>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20250827172149.5359-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

net: rose: include node references in rose_neigh refcount [+ + +]
Author: Takamitsu Iwai <takamitz@amazon.co.jp>
Date:   Sat Aug 23 17:58:57 2025 +0900

    net: rose: include node references in rose_neigh refcount
    
    [ Upstream commit da9c9c877597170b929a6121a68dcd3dd9a80f45 ]
    
    Current implementation maintains two separate reference counting
    mechanisms: the 'count' field in struct rose_neigh tracks references from
    rose_node structures, while the 'use' field (now refcount_t) tracks
    references from rose_sock.
    
    This patch merges these two reference counting systems using 'use' field
    for proper reference management. Specifically, this patch adds incrementing
    and decrementing of rose_neigh->use when rose_neigh->count is incremented
    or decremented.
    
    This patch also modifies rose_rt_free(), rose_rt_device_down() and
    rose_clear_route() to properly release references to rose_neigh objects
    before freeing a rose_node through rose_remove_node().
    
    These changes ensure rose_neigh structures are properly freed only when
    all references, including those from rose_node structures, are released.
    As a result, this resolves a slab-use-after-free issue reported by Syzbot.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: syzbot+942297eecf7d2d61d1f1@syzkaller.appspotmail.com
    Closes: https://syzkaller.appspot.com/bug?extid=942297eecf7d2d61d1f1
    Signed-off-by: Takamitsu Iwai <takamitz@amazon.co.jp>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20250823085857.47674-4-takamitz@amazon.co.jp
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: rose: split remove and free operations in rose_remove_neigh() [+ + +]
Author: Takamitsu Iwai <takamitz@amazon.co.jp>
Date:   Sat Aug 23 17:58:55 2025 +0900

    net: rose: split remove and free operations in rose_remove_neigh()
    
    [ Upstream commit dcb34659028f856c423a29ef9b4e2571d203444d ]
    
    The current rose_remove_neigh() performs two distinct operations:
    1. Removes rose_neigh from rose_neigh_list
    2. Frees the rose_neigh structure
    
    Split these operations into separate functions to improve maintainability
    and prepare for upcoming refcount_t conversion. The timer cleanup remains
    in rose_remove_neigh() because free operations can be called from timer
    itself.
    
    This patch introduce rose_neigh_put() to handle the freeing of rose_neigh
    structures and modify rose_remove_neigh() to handle removal only.
    
    Signed-off-by: Takamitsu Iwai <takamitz@amazon.co.jp>
    Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20250823085857.47674-2-takamitz@amazon.co.jp
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Stable-dep-of: d860d1faa6b2 ("net: rose: convert 'use' field to refcount_t")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: stmmac: Set CIC bit only for TX queues with COE [+ + +]
Author: Rohan G Thomas <rohan.g.thomas@altera.com>
Date:   Mon Aug 25 12:36:54 2025 +0800

    net: stmmac: Set CIC bit only for TX queues with COE
    
    [ Upstream commit b1eded580ab28119de0b0f21efe37ee2b4419144 ]
    
    Currently, in the AF_XDP transmit paths, the CIC bit of
    TX Desc3 is set for all packets. Setting this bit for
    packets transmitting through queues that don't support
    checksum offloading causes the TX DMA to get stuck after
    transmitting some packets. This patch ensures the CIC bit
    of TX Desc3 is set only if the TX queue supports checksum
    offloading.
    
    Fixes: 132c32ee5bc0 ("net: stmmac: Add TX via XDP zero-copy socket")
    Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
    Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
    Link: https://patch.msgid.link/20250825-xgmac-minor-fixes-v3-3-c225fe4444c0@altera.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: stmmac: xgmac: Correct supported speed modes [+ + +]
Author: Rohan G Thomas <rohan.g.thomas@altera.com>
Date:   Mon Aug 25 12:36:53 2025 +0800

    net: stmmac: xgmac: Correct supported speed modes
    
    [ Upstream commit 42ef11b2bff5b6a2910c28d2ea47cc00e0fbcaec ]
    
    Correct supported speed modes as per the XGMAC databook.
    Commit 9cb54af214a7 ("net: stmmac: Fix IP-cores specific
    MAC capabilities") removes support for 10M, 100M and
    1000HD. 1000HD is not supported by XGMAC IP, but it does
    support 10M and 100M FD mode for XGMAC version >= 2_20,
    and it also supports 10M and 100M HD mode if the HDSEL bit
    is set in the MAC_HW_FEATURE0 reg. This commit enables support
    for 10M and 100M speed modes for XGMAC IP based on XGMAC
    version and MAC capabilities.
    
    Fixes: 9cb54af214a7 ("net: stmmac: Fix IP-cores specific MAC capabilities")
    Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
    Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
    Link: https://patch.msgid.link/20250825-xgmac-minor-fixes-v3-2-c225fe4444c0@altera.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: stmmac: xgmac: Do not enable RX FIFO Overflow interrupts [+ + +]
Author: Rohan G Thomas <rohan.g.thomas@altera.com>
Date:   Mon Aug 25 12:36:52 2025 +0800

    net: stmmac: xgmac: Do not enable RX FIFO Overflow interrupts
    
    [ Upstream commit 4f23382841e67174211271a454811dd17c0ef3c5 ]
    
    Enabling RX FIFO Overflow interrupts is counterproductive
    and causes an interrupt storm when RX FIFO overflows.
    Disabling this interrupt has no side effect and eliminates
    interrupt storms when the RX FIFO overflows.
    
    Commit 8a7cb245cf28 ("net: stmmac: Do not enable RX FIFO
    overflow interrupts") disables RX FIFO overflow interrupts
    for DWMAC4 IP and removes the corresponding handling of
    this interrupt. This patch is doing the same thing for
    XGMAC IP.
    
    Fixes: 2142754f8b9c ("net: stmmac: Add MAC related callbacks for XGMAC2")
    Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
    Reviewed-by: Matthew Gerlach <matthew.gerlach@altera.com>
    Reviewed-by: Andrew Lunn <andrew@lunn.ch>
    Link: https://patch.msgid.link/20250825-xgmac-minor-fixes-v3-1-c225fe4444c0@altera.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: usb: qmi_wwan: add Telit Cinterion LE910C4-WWX new compositions [+ + +]
Author: Fabio Porcedda <fabio.porcedda@gmail.com>
Date:   Fri Aug 22 11:13:24 2025 +0200

    net: usb: qmi_wwan: add Telit Cinterion LE910C4-WWX new compositions
    
    commit e81a7f65288c7e2cfb7e7890f648e099fd885ab3 upstream.
    
    Add the following Telit Cinterion LE910C4-WWX new compositions:
    
    0x1034: tty (AT) + tty (AT) + rmnet
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  8 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1034 Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x1037: tty (diag) + tty (Telit custom) + tty (AT) + tty (AT) + rmnet
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 15 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1037 Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 5 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 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=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    0x1038: tty (Telit custom) + tty (AT) + tty (AT) + rmnet
    T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
    D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
    P:  Vendor=1bc7 ProdID=1038 Rev=00.00
    S:  Manufacturer=Telit
    S:  Product=LE910C4-WWX
    S:  SerialNumber=93f617e7
    C:  #Ifs= 4 Cfg#= 1 Atr=e0 MxPwr=500mA
    I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
    E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=82(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=fe Prot=ff Driver=option
    E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=84(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
    E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    E:  Ad=86(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
    E:  Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
    Link: https://patch.msgid.link/20250822091324.39558-1-Fabio.Porcedda@telit.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Octeontx2-af: Fix NIX X2P calibration failures [+ + +]
Author: Hariprasad Kelam <hkelam@marvell.com>
Date:   Fri Aug 22 16:28:05 2025 +0530

    Octeontx2-af: Fix NIX X2P calibration failures
    
    [ Upstream commit d280233fc86692f495d5e08092e5422bc2f583a8 ]
    
    Before configuring the NIX block, the AF driver initiates the
    "NIX block X2P bus calibration" and verifies that NIX interfaces
    such as CGX and LBK are active and functioning correctly.
    
    On few silicon variants(CNF10KA and CNF10KB), X2P calibration failures
    have been observed on some CGX blocks that are not mapped to the NIX block.
    
    Since both NIX-mapped and non-NIX-mapped CGX blocks share the same
    VENDOR,DEVICE,SUBSYS_DEVID, it's not possible to skip probe based on
    these parameters.
    
    This patch introuduces "is_cgx_mapped_to_nix" API to detect and skip
    probe of non NIX mapped CGX blocks.
    
    Fixes: aba53d5dbcea ("octeontx2-af: NIX block admin queue init")
    Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
    Link: https://patch.msgid.link/20250822105805.2236528-1-hkelam@marvell.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Octeontx2-vf: Fix max packet length errors [+ + +]
Author: Hariprasad Kelam <hkelam@marvell.com>
Date:   Thu Aug 21 11:55:28 2025 +0530

    Octeontx2-vf: Fix max packet length errors
    
    [ Upstream commit a64494aafc56939564e3e9e57f99df5c27204e04 ]
    
    Once driver submits the packets to the hardware, each packet
    traverse through multiple transmit levels in the following
    order:
            SMQ -> TL4 -> TL3 -> TL2 -> TL1
    
    The SMQ supports configurable minimum and maximum packet sizes.
    It enters to a hang state, if driver submits packets with
    out of bound lengths.
    
    To avoid the same, implement packet length validation before
    submitting packets to the hardware. Increment tx_dropped counter
    on failure.
    
    Fixes: 3184fb5ba96e ("octeontx2-vf: Virtual function driver support")
    Fixes: 22f858796758 ("octeontx2-pf: Add basic net_device_ops")
    Fixes: 3ca6c4c882a7 ("octeontx2-pf: Add packet transmission support")
    Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
    Link: https://patch.msgid.link/20250821062528.1697992-1-hkelam@marvell.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
octeontx2: Set appropriate PF, VF masks and shifts based on silicon [+ + +]
Author: Subbaraya Sundeep <sbhatta@marvell.com>
Date:   Wed Jun 11 16:31:51 2025 +0530

    octeontx2: Set appropriate PF, VF masks and shifts based on silicon
    
    [ Upstream commit 25d51ebf0f54f9c2424f28bb29125cf24f120df0 ]
    
    Number of RVU PFs on CN20K silicon have increased to 96 from maximum
    of 32 that were supported on earlier silicons. Every RVU PF and VF is
    identified by HW using a 16bit PF_FUNC value. Due to the change in
    Max number of PFs in CN20K, the bit encoding of this PF_FUNC has changed.
    
    This patch handles the change by using helper functions(using silicon
    check) to use PF,VF masks and shifts to support both new silicon CN20K,
    OcteonTx series. These helper functions are used in different modules.
    
    Also moved the NIX AF register offset macros to other files which
    will be posted in coming patches.
    
    Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: Sai Krishna <saikrishnag@marvell.com>
    Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
    Link: https://patch.msgid.link/1749639716-13868-2-git-send-email-sbhatta@marvell.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Stable-dep-of: d280233fc866 ("Octeontx2-af: Fix NIX X2P calibration failures")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
of: dynamic: Fix memleak when of_pci_add_properties() failed [+ + +]
Author: Lizhi Hou <lizhi.hou@amd.com>
Date:   Mon Aug 18 08:22:21 2025 -0700

    of: dynamic: Fix memleak when of_pci_add_properties() failed
    
    [ Upstream commit c81f6ce16785cc07ae81f53deb07b662ed0bb3a5 ]
    
    When of_pci_add_properties() failed, of_changeset_destroy() is called to
    free the changeset. And of_changeset_destroy() puts device tree node in
    each entry but does not free property in the entry. This leads to memory
    leak in the failure case.
    
    In of_changeset_add_prop_helper(), add the property to the device tree node
    deadprops list. Thus, the property will also be freed along with device
    tree node.
    
    Fixes: b544fc2b8606 ("of: dynamic: Add interfaces for creating device node dynamically")
    Reported-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
    Closes: https://lore.kernel.org/all/aJms+YT8TnpzpCY8@lpieralisi/
    Tested-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
    Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
    Link: https://lore.kernel.org/r/20250818152221.3685724-1-lizhi.hou@amd.com
    Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

of: dynamic: Fix use after free in of_changeset_add_prop_helper() [+ + +]
Author: Dan Carpenter <dan.carpenter@linaro.org>
Date:   Fri Aug 22 11:08:46 2025 +0300

    of: dynamic: Fix use after free in of_changeset_add_prop_helper()
    
    [ Upstream commit 80af3745ca465c6c47e833c1902004a7fa944f37 ]
    
    If the of_changeset_add_property() function call fails, then this code
    frees "new_pp" and then dereference it on the next line.  Return the
    error code directly instead.
    
    Fixes: c81f6ce16785 ("of: dynamic: Fix memleak when of_pci_add_properties() failed")
    Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
    Link: https://lore.kernel.org/r/aKgljjhnpa4lVpdx@stanley.mountain
    Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

of: reserved_mem: Add missing IORESOURCE_MEM flag on resources [+ + +]
Author: Rob Herring (Arm) <robh@kernel.org>
Date:   Wed Aug 20 14:28:04 2025 -0500

    of: reserved_mem: Add missing IORESOURCE_MEM flag on resources
    
    [ Upstream commit aea70964b5a7ca491a3701f2dde6c9d05d51878d ]
    
    Commit f4fcfdda2fd8 ('of: reserved_mem: Add functions to parse
    "memory-region"') failed to set IORESOURCE_MEM flag on the resources.
    The result is functions such as devm_ioremap_resource_wc() will fail.
    Add the missing flag.
    
    Fixes: f4fcfdda2fd8 ('of: reserved_mem: Add functions to parse "memory-region"')
    Reported-by: Iuliana Prodan <iuliana.prodan@nxp.com>
    Reported-by: Daniel Baluta <daniel.baluta@gmail.com>
    Tested-by: Iuliana Prodan <iuliana.prodan@nxp.com>
    Reviewed-by: Iuliana Prodan <iuliana.prodan@nxp.com>
    Reviewed-by: Saravana Kannan <saravanak@google.com>
    Link: https://lore.kernel.org/r/20250820192805.565568-1-robh@kernel.org
    Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

of: reserved_mem: Restructure call site for dma_contiguous_early_fixup() [+ + +]
Author: Oreoluwa Babatunde <oreoluwa.babatunde@oss.qualcomm.com>
Date:   Wed Aug 6 10:24:21 2025 -0700

    of: reserved_mem: Restructure call site for dma_contiguous_early_fixup()
    
    [ Upstream commit 2c223f7239f376a90d71903ec474ba887cf21d94 ]
    
    Restructure the call site for dma_contiguous_early_fixup() to
    where the reserved_mem nodes are being parsed from the DT so that
    dma_mmu_remap[] is populated before dma_contiguous_remap() is called.
    
    Fixes: 8a6e02d0c00e ("of: reserved_mem: Restructure how the reserved memory regions are processed")
    Signed-off-by: Oreoluwa Babatunde <oreoluwa.babatunde@oss.qualcomm.com>
    Tested-by: William Zhang <william.zhang@broadcom.com>
    Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Link: https://lore.kernel.org/r/20250806172421.2748302-1-oreoluwa.babatunde@oss.qualcomm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
page_pool: fix incorrect mp_ops error handling [+ + +]
Author: Mina Almasry <almasrymina@google.com>
Date:   Thu Aug 21 03:03:46 2025 +0000

    page_pool: fix incorrect mp_ops error handling
    
    [ Upstream commit abadf0ff63be488dc502ecfc9f622929a21b7117 ]
    
    Minor fix to the memory provider error handling, we should be jumping to
    free_ptr_ring in this error case rather than returning directly.
    
    Found by code-inspection.
    
    Cc: skhawaja@google.com
    
    Fixes: b400f4b87430 ("page_pool: Set `dma_sync` to false for devmem memory provider")
    Signed-off-by: Mina Almasry <almasrymina@google.com>
    Reviewed-by: Samiullah Khawaja <skhawaja@google.com>
    Link: https://patch.msgid.link/20250821030349.705244-1-almasrymina@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
perf symbol-minimal: Fix ehdr reading in filename__read_build_id [+ + +]
Author: Ian Rogers <irogers@google.com>
Date:   Fri Aug 22 17:00:23 2025 -0700

    perf symbol-minimal: Fix ehdr reading in filename__read_build_id
    
    [ Upstream commit ba0b7081f7a521d7c28b527a4f18666a148471e7 ]
    
    The e_ident is part of the ehdr and so reading it a second time would
    mean the read ehdr was displaced by 16-bytes. Switch from stdio to
    open/read/lseek syscalls for similarity with the symbol-elf version of
    the function and so that later changes can alter then open flags.
    
    Fixes: fef8f648bb47 ("perf symbol: Fix use-after-free in filename__read_build_id")
    Signed-off-by: Ian Rogers <irogers@google.com>
    Link: https://lore.kernel.org/r/20250823000024.724394-2-irogers@google.com
    Signed-off-by: Namhyung Kim <namhyung@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
perf: Avoid undefined behavior from stopping/starting inactive events [+ + +]
Author: Yunseong Kim <ysk@kzalloc.com>
Date:   Tue Aug 12 18:10:47 2025 +0000

    perf: Avoid undefined behavior from stopping/starting inactive events
    
    [ Upstream commit b64fdd422a85025b5e91ead794db9d3ef970e369 ]
    
    Calling pmu->start()/stop() on perf events in PERF_EVENT_STATE_OFF can
    leave event->hw.idx at -1. When PMU drivers later attempt to use this
    negative index as a shift exponent in bitwise operations, it leads to UBSAN
    shift-out-of-bounds reports.
    
    The issue is a logical flaw in how event groups handle throttling when some
    members are intentionally disabled. Based on the analysis and the
    reproducer provided by Mark Rutland (this issue on both arm64 and x86-64).
    
    The scenario unfolds as follows:
    
     1. A group leader event is configured with a very aggressive sampling
        period (e.g., sample_period = 1). This causes frequent interrupts and
        triggers the throttling mechanism.
     2. A child event in the same group is created in a disabled state
        (.disabled = 1). This event remains in PERF_EVENT_STATE_OFF.
        Since it hasn't been scheduled onto the PMU, its event->hw.idx remains
        initialized at -1.
     3. When throttling occurs, perf_event_throttle_group() and later
        perf_event_unthrottle_group() iterate through all siblings, including
        the disabled child event.
     4. perf_event_throttle()/unthrottle() are called on this inactive child
        event, which then call event->pmu->start()/stop().
     5. The PMU driver receives the event with hw.idx == -1 and attempts to
        use it as a shift exponent. e.g., in macros like PMCNTENSET(idx),
        leading to the UBSAN report.
    
    The throttling mechanism attempts to start/stop events that are not
    actively scheduled on the hardware.
    
    Move the state check into perf_event_throttle()/perf_event_unthrottle() so
    that inactive events are skipped entirely. This ensures only active events
    with a valid hw.idx are processed, preventing undefined behavior and
    silencing UBSAN warnings. The corrected check ensures true before
    proceeding with PMU operations.
    
    The problem can be reproduced with the syzkaller reproducer:
    
    Fixes: 9734e25fbf5a ("perf: Fix the throttle logic for a group")
    Signed-off-by: Yunseong Kim <ysk@kzalloc.com>
    Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
    Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
    Link: https://lore.kernel.org/r/20250812181046.292382-2-ysk@kzalloc.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
 
phy: mscc: Fix when PTP clock is register and unregister [+ + +]
Author: Horatiu Vultur <horatiu.vultur@microchip.com>
Date:   Mon Aug 25 08:55:43 2025 +0200

    phy: mscc: Fix when PTP clock is register and unregister
    
    [ Upstream commit 882e57cbc7204662f6c5672d5b04336c1d790b03 ]
    
    It looks like that every time when the interface was set down and up the
    driver was creating a new ptp clock. On top of this the function
    ptp_clock_unregister was never called.
    Therefore fix this by calling ptp_clock_register and initialize the
    mii_ts struct inside the probe function and call ptp_clock_unregister when
    driver is removed.
    
    Fixes: 7d272e63e0979d ("net: phy: mscc: timestamping and PHC support")
    Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
    Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
    Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Link: https://patch.msgid.link/20250825065543.2916334-1-horatiu.vultur@microchip.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
pinctrl: airoha: Fix return value in pinconf callbacks [+ + +]
Author: Lorenzo Bianconi <lorenzo@kernel.org>
Date:   Fri Aug 22 14:14:18 2025 +0200

    pinctrl: airoha: Fix return value in pinconf callbacks
    
    [ Upstream commit 563fcd6475931c5c8c652a4dd548256314cc87ed ]
    
    Pinctrl stack requires ENOTSUPP error code if the parameter is not
    supported by the pinctrl driver. Fix the returned error code in pinconf
    callbacks if the operation is not supported.
    
    Fixes: 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
    Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
    Link: https://lore.kernel.org/20250822-airoha-pinconf-err-val-fix-v1-1-87b4f264ced2@kernel.org
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

pinctrl: STMFX: add missing HAS_IOMEM dependency [+ + +]
Author: Randy Dunlap <rdunlap@infradead.org>
Date:   Thu Aug 14 19:27:21 2025 -0700

    pinctrl: STMFX: add missing HAS_IOMEM dependency
    
    [ Upstream commit a12946bef0407cf2db0899c83d42c47c00af3fbc ]
    
    When building on ARCH=um (which does not set HAS_IOMEM), kconfig
    reports an unmet dependency caused by PINCTRL_STMFX. It selects
    MFD_STMFX, which depends on HAS_IOMEM. To stop this warning,
    PINCTRL_STMFX should also depend on HAS_IOMEM.
    
    kconfig warning:
    WARNING: unmet direct dependencies detected for MFD_STMFX
      Depends on [n]: HAS_IOMEM [=n] && I2C [=y] && OF [=y]
      Selected by [y]:
      - PINCTRL_STMFX [=y] && PINCTRL [=y] && I2C [=y] && OF_GPIO [=y]
    
    Fixes: 1490d9f841b1 ("pinctrl: Add STMFX GPIO expander Pinctrl/GPIO driver")
    Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
    Link: https://lore.kernel.org/20250815022721.1650885-1-rdunlap@infradead.org
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
platform/x86: int3472: add hpd pin support [+ + +]
Author: Dongcheng Yan <dongcheng.yan@intel.com>
Date:   Fri Apr 25 18:43:30 2025 +0800

    platform/x86: int3472: add hpd pin support
    
    commit a032fe30cf09b6723ab61a05aee057311b00f9e1 upstream.
    
    Typically HDMI to MIPI CSI-2 bridges have a pin to signal image data is
    being received. On the host side this is wired to a GPIO for polling or
    interrupts. This includes the Lontium HDMI to MIPI CSI-2 bridges
    lt6911uxe and lt6911uxc.
    
    The GPIO "hpd" is used already by other HDMI to CSI-2 bridges, use it
    here as well.
    
    Signed-off-by: Dongcheng Yan <dongcheng.yan@intel.com>
    Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Fixes: 20244cbafbd6 ("media: i2c: change lt6911uxe irq_gpio name to "hpd"")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
powerpc/kvm: Fix ifdef to remove build warning [+ + +]
Author: Madhavan Srinivasan <maddy@linux.ibm.com>
Date:   Sun May 18 10:11:04 2025 +0530

    powerpc/kvm: Fix ifdef to remove build warning
    
    [ Upstream commit 88688a2c8ac6c8036d983ad8b34ce191c46a10aa ]
    
    When compiling for pseries or powernv defconfig with "make C=1",
    these warning were reported bu sparse tool in powerpc/kernel/kvm.c
    
    arch/powerpc/kernel/kvm.c:635:9: warning: switch with no cases
    arch/powerpc/kernel/kvm.c:646:9: warning: switch with no cases
    
    Currently #ifdef were added after the switch case which are specific
    for BOOKE and PPC_BOOK3S_32. These are not enabled in pseries/powernv
    defconfig. Fix it by moving the #ifdef before switch(){}
    
    Fixes: cbe487fac7fc0 ("KVM: PPC: Add mtsrin PV code")
    Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
    Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
    Link: https://patch.msgid.link/20250518044107.39928-1-maddy@linux.ibm.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
Revert "drm/amdgpu: fix incorrect vm flags to map bo" [+ + +]
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Mon Aug 25 13:40:22 2025 -0400

    Revert "drm/amdgpu: fix incorrect vm flags to map bo"
    
    commit ac4ed2da4c1305a1a002415058aa7deaf49ffe3e upstream.
    
    This reverts commit b08425fa77ad2f305fe57a33dceb456be03b653f.
    
    Revert this to align with 6.17 because the fixes tag
    was wrong on this commit.
    
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit be33e8a239aac204d7e9e673c4220ef244eb1ba3)
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Revert "drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS" [+ + +]
Author: Imre Deak <imre.deak@intel.com>
Date:   Thu Aug 28 20:49:29 2025 +0300

    Revert "drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS"
    
    This reverts commit 944e732be9c3a33e64e9fb0f5451a37fc252ddfc which is
    commit a40c5d727b8111b5db424a1e43e14a1dcce1e77f upstream.
    
    The upstream commit a40c5d727b8111b5db424a1e43e14a1dcce1e77f ("drm/dp:
    Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS") the
    reverted commit backported causes a regression, on one eDP panel at
    least resulting in display flickering, described in detail at the Link:
    below. The issue fixed by the upstream commit will need a different
    solution, revert the backport for now.
    
    Cc: intel-gfx@lists.freedesktop.org
    Cc: dri-devel@lists.freedesktop.org
    Cc: Sasha Levin <sashal@kernel.org>
    Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14558
    Signed-off-by: Imre Deak <imre.deak@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Revert "virtio: reject shm region if length is zero" [+ + +]
Author: Igor Torrente <igor.torrente@collabora.com>
Date:   Thu Aug 7 09:41:45 2025 -0300

    Revert "virtio: reject shm region if length is zero"
    
    [ Upstream commit ced17ee32a9988b8a260628e7c31a100d7dc082e ]
    
    The commit 206cc44588f7 ("virtio: reject shm region if length is zero")
    breaks the Virtio-gpu `host_visible` feature.
    
    As you can see in the snippet below, host_visible_region is zero because
    of the `kzalloc`.  It's using the `vm_get_shm_region`
    (drivers/virtio/virtio_mmio.c:536) to read the `addr` and `len` from
    qemu/crosvm.
    
    ```
    drivers/gpu/drm/virtio/virtgpu_kms.c
    132         vgdev = drmm_kzalloc(dev, sizeof(struct virtio_gpu_device), GFP_KERNEL);
    [...]
    177         if (virtio_get_shm_region(vgdev->vdev, &vgdev->host_visible_region,
    178                                   VIRTIO_GPU_SHM_ID_HOST_VISIBLE)) {
    ```
    Now it always fails.
    
    To fix, revert the offending commit.
    
    Fixes: 206cc44588f7 ("virtio: reject shm region if length is zero")
    Signed-off-by: Igor Torrente <igor.torrente@collabora.com>
    Message-Id: <20250807124145.81816-1-igor.torrente@collabora.com>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
RISC-V: KVM: fix stack overrun when loading vlenb [+ + +]
Author: Radim Krčmář <rkrcmar@ventanamicro.com>
Date:   Tue Aug 5 12:44:21 2025 +0200

    RISC-V: KVM: fix stack overrun when loading vlenb
    
    commit 799766208f09f95677a9ab111b93872d414fbad7 upstream.
    
    The userspace load can put up to 2048 bits into an xlen bit stack
    buffer.  We want only xlen bits, so check the size beforehand.
    
    Fixes: 2fa290372dfe ("RISC-V: KVM: add 'vlenb' Vector CSR")
    Cc: stable@vger.kernel.org
    Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
    Reviewed-by: Nutty Liu <liujingqi@lanxincomputing.com>
    Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
    Link: https://lore.kernel.org/r/20250805104418.196023-4-rkrcmar@ventanamicro.com
    Signed-off-by: Anup Patel <anup@brainfault.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
rtla: Check pkg-config install [+ + +]
Author: Tao Chen <chen.dylane@linux.dev>
Date:   Fri Aug 8 12:05:27 2025 +0800

    rtla: Check pkg-config install
    
    [ Upstream commit 7b128f1d53dcaa324d4aa05d821a6bf4a7b203e7 ]
    
    The tool pkg-config used to check libtraceevent and libtracefs, if not
    installed, it will report the libs not found, even though they have
    already been installed.
    
    Before:
    libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel
    libtracefs is missing. Please install libtracefs-dev/libtracefs-devel
    
    After:
    Makefile.config:10: *** Error: pkg-config needed by libtraceevent/libtracefs is missing
    on this system, please install it.
    
    Link: https://lore.kernel.org/20250808040527.2036023-2-chen.dylane@linux.dev
    Fixes: 01474dc706ca ("tools/rtla: Use tools/build makefiles to build rtla")
    Signed-off-by: Tao Chen <chen.dylane@linux.dev>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
scsi: core: sysfs: Correct sysfs attributes access rights [+ + +]
Author: Damien Le Moal <dlemoal@kernel.org>
Date:   Mon Jul 28 13:17:00 2025 +0900

    scsi: core: sysfs: Correct sysfs attributes access rights
    
    [ Upstream commit a2f54ff15c3bdc0132e20aae041607e2320dbd73 ]
    
    The SCSI sysfs attributes "supported_mode" and "active_mode" do not
    define a store method and thus cannot be modified.  Correct the
    DEVICE_ATTR() call for these two attributes to not include S_IWUSR to
    allow write access as they are read-only.
    
    Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
    Link: https://lore.kernel.org/r/20250728041700.76660-1-dlemoal@kernel.org
    Reviewed-by: John Garry <john.g.garry@oracle.com>
    Reviewed-by: Johannes Thumshin <johannes.thumshirn@wdc.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
sctp: initialize more fields in sctp_v6_from_sk() [+ + +]
Author: Eric Dumazet <edumazet@google.com>
Date:   Tue Aug 26 14:13:14 2025 +0000

    sctp: initialize more fields in sctp_v6_from_sk()
    
    [ Upstream commit 2e8750469242cad8f01f320131fd5a6f540dbb99 ]
    
    syzbot found that sin6_scope_id was not properly initialized,
    leading to undefined behavior.
    
    Clear sin6_scope_id and sin6_flowinfo.
    
    BUG: KMSAN: uninit-value in __sctp_v6_cmp_addr+0x887/0x8c0 net/sctp/ipv6.c:649
      __sctp_v6_cmp_addr+0x887/0x8c0 net/sctp/ipv6.c:649
      sctp_inet6_cmp_addr+0x4f2/0x510 net/sctp/ipv6.c:983
      sctp_bind_addr_conflict+0x22a/0x3b0 net/sctp/bind_addr.c:390
      sctp_get_port_local+0x21eb/0x2440 net/sctp/socket.c:8452
      sctp_get_port net/sctp/socket.c:8523 [inline]
      sctp_listen_start net/sctp/socket.c:8567 [inline]
      sctp_inet_listen+0x710/0xfd0 net/sctp/socket.c:8636
      __sys_listen_socket net/socket.c:1912 [inline]
      __sys_listen net/socket.c:1927 [inline]
      __do_sys_listen net/socket.c:1932 [inline]
      __se_sys_listen net/socket.c:1930 [inline]
      __x64_sys_listen+0x343/0x4c0 net/socket.c:1930
      x64_sys_call+0x271d/0x3e20 arch/x86/include/generated/asm/syscalls_64.h:51
      do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
      do_syscall_64+0xd9/0x210 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Local variable addr.i.i created at:
      sctp_get_port net/sctp/socket.c:8515 [inline]
      sctp_listen_start net/sctp/socket.c:8567 [inline]
      sctp_inet_listen+0x650/0xfd0 net/sctp/socket.c:8636
      __sys_listen_socket net/socket.c:1912 [inline]
      __sys_listen net/socket.c:1927 [inline]
      __do_sys_listen net/socket.c:1932 [inline]
      __se_sys_listen net/socket.c:1930 [inline]
      __x64_sys_listen+0x343/0x4c0 net/socket.c:1930
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Reported-by: syzbot+e69f06a0f30116c68056@syzkaller.appspotmail.com
    Closes: https://lore.kernel.org/netdev/68adc0a2.050a0220.37038e.00c4.GAE@google.com/T/#u
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Acked-by: Xin Long <lucien.xin@gmail.com>
    Link: https://patch.msgid.link/20250826141314.1802610-1-edumazet@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
smb3 client: fix return code mapping of remap_file_range [+ + +]
Author: Steve French <stfrench@microsoft.com>
Date:   Sat Aug 23 21:15:59 2025 -0500

    smb3 client: fix return code mapping of remap_file_range
    
    commit 0e08fa789d39aa01923e3ba144bd808291895c3c upstream.
    
    We were returning -EOPNOTSUPP for various remap_file_range cases
    but for some of these the copy_file_range_syscall() requires -EINVAL
    to be returned (e.g. where source and target file ranges overlap when
    source and target are the same file). This fixes xfstest generic/157
    which was expecting EINVAL for that (and also e.g. for when the src
    offset is beyond end of file).
    
    Cc: stable@vger.kernel.org
    Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
smb: client: fix race with concurrent opens in rename(2) [+ + +]
Author: Paulo Alcantara <pc@manguebit.org>
Date:   Fri Aug 8 11:43:29 2025 -0300

    smb: client: fix race with concurrent opens in rename(2)
    
    [ Upstream commit d84291fc7453df7881a970716f8256273aca5747 ]
    
    Besides sending the rename request to the server, the rename process
    also involves closing any deferred close, waiting for outstanding I/O
    to complete as well as marking all existing open handles as deleted to
    prevent them from deferring closes, which increases the race window
    for potential concurrent opens on the target file.
    
    Fix this by unhashing the dentry in advance to prevent any concurrent
    opens on the target.
    
    Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
    Reviewed-by: David Howells <dhowells@redhat.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: linux-cifs@vger.kernel.org
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

smb: client: fix race with concurrent opens in unlink(2) [+ + +]
Author: Paulo Alcantara <pc@manguebit.org>
Date:   Fri Aug 8 12:20:17 2025 -0300

    smb: client: fix race with concurrent opens in unlink(2)
    
    [ Upstream commit 0af1561b2d60bab2a2b00720a5c7b292ecc549ec ]
    
    According to some logs reported by customers, CIFS client might end up
    reporting unlinked files as existing in stat(2) due to concurrent
    opens racing with unlink(2).
    
    Besides sending the removal request to the server, the unlink process
    could involve closing any deferred close as well as marking all
    existing open handles as deleted to prevent them from deferring
    closes, which increases the race window for potential concurrent
    opens.
    
    Fix this by unhashing the dentry in cifs_unlink() to prevent any
    subsequent opens.  Any open attempts, while we're still unlinking,
    will block on parent's i_rwsem.
    
    Reported-by: Jay Shin <jaeshin@redhat.com>
    Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
    Reviewed-by: David Howells <dhowells@redhat.com>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: linux-cifs@vger.kernel.org
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
thermal/drivers/mediatek/lvts_thermal: Add lvts commands and their sizes to driver data [+ + +]
Author: Mason Chang <mason-cw.chang@mediatek.com>
Date:   Mon May 26 18:26:58 2025 +0800

    thermal/drivers/mediatek/lvts_thermal: Add lvts commands and their sizes to driver data
    
    commit 6203a5e6fd090ed05f6d9b92e33bc7e7679a3dd6 upstream.
    
    Add LVTS commands and their sizes to driver data in preparation for
    adding different commands.
    
    Signed-off-by: Mason Chang <mason-cw.chang@mediatek.com>
    Link: https://lore.kernel.org/r/20250526102659.30225-3-mason-cw.chang@mediatek.com
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: Daniel Golle <daniel@makrotopia.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

thermal/drivers/mediatek/lvts_thermal: Add mt7988 lvts commands [+ + +]
Author: Mason Chang <mason-cw.chang@mediatek.com>
Date:   Mon May 26 18:26:59 2025 +0800

    thermal/drivers/mediatek/lvts_thermal: Add mt7988 lvts commands
    
    commit 685a755089f95b7e205c0202567d9a647f9de096 upstream.
    
    These commands are necessary to avoid severely abnormal and inaccurate
    temperature readings that are caused by using the default commands.
    
    Signed-off-by: Mason Chang <mason-cw.chang@mediatek.com>
    Link: https://lore.kernel.org/r/20250526102659.30225-4-mason-cw.chang@mediatek.com
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: Daniel Golle <daniel@makrotopia.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

thermal/drivers/mediatek/lvts_thermal: Change lvts commands array to static const [+ + +]
Author: Mason Chang <mason-cw.chang@mediatek.com>
Date:   Mon May 26 18:26:57 2025 +0800

    thermal/drivers/mediatek/lvts_thermal: Change lvts commands array to static const
    
    commit c5d5a72c01f7faabe7cc0fd63942c18372101daf upstream.
    
    Change the LVTS commands array to static const in preparation for
    adding different commands.
    
    Signed-off-by: Mason Chang <mason-cw.chang@mediatek.com>
    Link: https://lore.kernel.org/r/20250526102659.30225-2-mason-cw.chang@mediatek.com
    Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
    Signed-off-by: Daniel Golle <daniel@makrotopia.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
tools/latency-collector: Check pkg-config install [+ + +]
Author: Tao Chen <chen.dylane@linux.dev>
Date:   Fri Aug 8 12:05:26 2025 +0800

    tools/latency-collector: Check pkg-config install
    
    [ Upstream commit 26ebba25e210116053609f4c7ee701bffa7ebd7d ]
    
    The tool pkg-config used to check libtraceevent and libtracefs, if not
    installed, it will report the libs not found, even though they have
    already been installed.
    
    Before:
    libtraceevent is missing. Please install libtraceevent-dev/libtraceevent-devel
    libtracefs is missing. Please install libtracefs-dev/libtracefs-devel
    
    After:
    Makefile.config:10: *** Error: pkg-config needed by libtraceevent/libtracefs is missing
    on this system, please install it.
    
    Link: https://lore.kernel.org/20250808040527.2036023-1-chen.dylane@linux.dev
    Fixes: 9d56c88e5225 ("tools/tracing: Use tools/build makefiles on latency-collector")
    Signed-off-by: Tao Chen <chen.dylane@linux.dev>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
trace/fgraph: Fix the warning caused by missing unregister notifier [+ + +]
Author: Ye Weihua <yeweihua4@huawei.com>
Date:   Mon Aug 18 07:33:32 2025 +0000

    trace/fgraph: Fix the warning caused by missing unregister notifier
    
    [ Upstream commit edede7a6dcd7435395cf757d053974aaab6ab1c2 ]
    
    This warning was triggered during testing on v6.16:
    
    notifier callback ftrace_suspend_notifier_call already registered
    WARNING: CPU: 2 PID: 86 at kernel/notifier.c:23 notifier_chain_register+0x44/0xb0
    ...
    Call Trace:
     <TASK>
     blocking_notifier_chain_register+0x34/0x60
     register_ftrace_graph+0x330/0x410
     ftrace_profile_write+0x1e9/0x340
     vfs_write+0xf8/0x420
     ? filp_flush+0x8a/0xa0
     ? filp_close+0x1f/0x30
     ? do_dup2+0xaf/0x160
     ksys_write+0x65/0xe0
     do_syscall_64+0xa4/0x260
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    When writing to the function_profile_enabled interface, the notifier was
    not unregistered after start_graph_tracing failed, causing a warning the
    next time function_profile_enabled was written.
    
    Fixed by adding unregister_pm_notifier in the exception path.
    
    Link: https://lore.kernel.org/20250818073332.3890629-1-yeweihua4@huawei.com
    Fixes: 4a2b8dda3f870 ("tracing/function-graph-tracer: fix a regression while suspend to disk")
    Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
    Signed-off-by: Ye Weihua <yeweihua4@huawei.com>
    Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
vhost/net: Protect ubufs with rcu read lock in vhost_net_ubuf_put() [+ + +]
Author: Nikolay Kuratov <kniv@yandex-team.ru>
Date:   Tue Aug 5 16:09:17 2025 +0300

    vhost/net: Protect ubufs with rcu read lock in vhost_net_ubuf_put()
    
    commit dd54bcf86c91a4455b1f95cbc8e9ac91205f3193 upstream.
    
    When operating on struct vhost_net_ubuf_ref, the following execution
    sequence is theoretically possible:
    CPU0 is finalizing DMA operation                   CPU1 is doing VHOST_NET_SET_BACKEND
                                 // ubufs->refcount == 2
    vhost_net_ubuf_put()                               vhost_net_ubuf_put_wait_and_free(oldubufs)
                                                         vhost_net_ubuf_put_and_wait()
                                                           vhost_net_ubuf_put()
                                                             int r = atomic_sub_return(1, &ubufs->refcount);
                                                             // r = 1
    int r = atomic_sub_return(1, &ubufs->refcount);
    // r = 0
                                                          wait_event(ubufs->wait, !atomic_read(&ubufs->refcount));
                                                          // no wait occurs here because condition is already true
                                                        kfree(ubufs);
    if (unlikely(!r))
      wake_up(&ubufs->wait);  // use-after-free
    
    This leads to use-after-free on ubufs access. This happens because CPU1
    skips waiting for wake_up() when refcount is already zero.
    
    To prevent that use a read-side RCU critical section in vhost_net_ubuf_put(),
    as suggested by Hillf Danton. For this lock to take effect, free ubufs with
    kfree_rcu().
    
    Cc: stable@vger.kernel.org
    Fixes: 0ad8b480d6ee9 ("vhost: fix ref cnt checking deadlock")
    Reported-by: Andrey Ryabinin <arbn@yandex-team.com>
    Suggested-by: Hillf Danton <hdanton@sina.com>
    Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru>
    Message-Id: <20250805130917.727332-1-kniv@yandex-team.ru>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
vhost: Fix ioctl # for VHOST_[GS]ET_FORK_FROM_OWNER [+ + +]
Author: Namhyung Kim <namhyung@kernel.org>
Date:   Mon Aug 18 23:39:57 2025 -0700

    vhost: Fix ioctl # for VHOST_[GS]ET_FORK_FROM_OWNER
    
    [ Upstream commit 24fc631539cc78225f5c61f99c7666fcff48024d ]
    
    The VHOST_[GS]ET_FEATURES_ARRAY ioctl already took 0x83 and it would
    result in a build error when the vhost uapi header is used for perf tool
    build like below.
    
      In file included from trace/beauty/ioctl.c:93:
      tools/perf/trace/beauty/generated/ioctl/vhost_virtio_ioctl_array.c: In function ‘ioctl__scnprintf_vhost_virtio_cmd’:
      tools/perf/trace/beauty/generated/ioctl/vhost_virtio_ioctl_array.c:36:18: error: initialized field overwritten [-Werror=override-init]
         36 |         [0x83] = "SET_FORK_FROM_OWNER",
            |                  ^~~~~~~~~~~~~~~~~~~~~
      tools/perf/trace/beauty/generated/ioctl/vhost_virtio_ioctl_array.c:36:18: note: (near initialization for ‘vhost_virtio_ioctl_cmds[131]’)
    
    Fixes: 7d9896e9f6d02d8a ("vhost: Reintroduce kthread API and add mode selection")
    Signed-off-by: Namhyung Kim <namhyung@kernel.org>
    Message-Id: <20250819063958.833770-1-namhyung@kernel.org>
    Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
    Tested-by: Lei Yang <leiyang@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
x86/cpu/intel: Fix the constant_tsc model check for Pentium 4 [+ + +]
Author: Suchit Karunakaran <suchitkarunakaran@gmail.com>
Date:   Sat Aug 16 12:21:26 2025 +0530

    x86/cpu/intel: Fix the constant_tsc model check for Pentium 4
    
    commit 24963ae1b0b6596dc36e352c18593800056251d8 upstream.
    
    Pentium 4's which are INTEL_P4_PRESCOTT (model 0x03) and later have
    a constant TSC. This was correctly captured until commit fadb6f569b10
    ("x86/cpu/intel: Limit the non-architectural constant_tsc model checks").
    
    In that commit, an error was introduced while selecting the last P4
    model (0x06) as the upper bound. Model 0x06 was transposed to
    INTEL_P4_WILLAMETTE, which is just plain wrong. That was presumably a
    simple typo, probably just copying and pasting the wrong P4 model.
    
    Fix the constant TSC logic to cover all later P4 models. End at
    INTEL_P4_CEDARMILL which accurately corresponds to the last P4 model.
    
    Fixes: fadb6f569b10 ("x86/cpu/intel: Limit the non-architectural constant_tsc model checks")
    Signed-off-by: Suchit Karunakaran <suchitkarunakaran@gmail.com>
    Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: Sohil Mehta <sohil.mehta@intel.com>
    Cc:stable@vger.kernel.org
    Link: https://lore.kernel.org/all/20250816065126.5000-1-suchitkarunakaran%40gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
x86/cpu/topology: Use initial APIC ID from XTOPOLOGY leaf on AMD/HYGON [+ + +]
Author: K Prateek Nayak <kprateek.nayak@amd.com>
Date:   Mon Aug 25 07:57:29 2025 +0000

    x86/cpu/topology: Use initial APIC ID from XTOPOLOGY leaf on AMD/HYGON
    
    commit c2415c407a2cde01290d52ce2a1f81b0616379a3 upstream.
    
    Prior to the topology parsing rewrite and the switchover to the new parsing
    logic for AMD processors in
    
      c749ce393b8f ("x86/cpu: Use common topology code for AMD"),
    
    the initial_apicid on these platforms was:
    
    - First initialized to the LocalApicId from CPUID leaf 0x1 EBX[31:24].
    
    - Then overwritten by the ExtendedLocalApicId in CPUID leaf 0xb
      EDX[31:0] on processors that supported topoext.
    
    With the new parsing flow introduced in
    
      f7fb3b2dd92c ("x86/cpu: Provide an AMD/HYGON specific topology parser"),
    
    parse_8000_001e() now unconditionally overwrites the initial_apicid already
    parsed during cpu_parse_topology_ext().
    
    Although this has not been a problem on baremetal platforms, on virtualized AMD
    guests that feature more than 255 cores, QEMU zeros out the CPUID leaf
    0x8000001e on CPUs with CoreID > 255 to prevent collision of these IDs in
    EBX[7:0] which can only represent a maximum of 255 cores [1].
    
    This results in the following FW_BUG being logged when booting a guest
    with more than 255 cores:
    
        [Firmware Bug]: CPU 512: APIC ID mismatch. CPUID: 0x0000 APIC: 0x0200
    
    AMD64 Architecture Programmer's Manual Volume 2: System Programming Pub.
    24593 Rev. 3.42 [2] Section 16.12 "x2APIC_ID" mentions the Extended
    Enumeration leaf 0xb (Fn0000_000B_EDX[31:0])(which was later superseded by the
    extended leaf 0x80000026) provides the full x2APIC ID under all circumstances
    unlike the one reported by CPUID leaf 0x8000001e EAX which depends on the mode
    in which APIC is configured.
    
    Rely on the APIC ID parsed during cpu_parse_topology_ext() from CPUID leaf
    0x80000026 or 0xb and only use the APIC ID from leaf 0x8000001e if
    cpu_parse_topology_ext() failed (has_topoext is false).
    
    On platforms that support the 0xb leaf (Zen2 or later, AMD guests on
    QEMU) or the extended leaf 0x80000026 (Zen4 or later), the
    initial_apicid is now set to the value parsed from EDX[31:0].
    
    On older AMD/Hygon platforms that do not support the 0xb leaf but support the
    TOPOEXT extension (families 0x15, 0x16, 0x17[Zen1], and Hygon), retain current
    behavior where the initial_apicid is set using the 0x8000001e leaf.
    
    Issue debugged by Naveen N Rao (AMD) <naveen@kernel.org> and Sairaj Kodilkar
    <sarunkod@amd.com>.
    
      [ bp: Massage commit message. ]
    
    Fixes: c749ce393b8f ("x86/cpu: Use common topology code for AMD")
    Suggested-by: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Tested-by: Naveen N Rao (AMD) <naveen@kernel.org>
    Cc: stable@vger.kernel.org
    Link: https://github.com/qemu/qemu/commit/35ac5dfbcaa4b [1]
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 [2]
    Link: https://lore.kernel.org/20250825075732.10694-2-kprateek.nayak@amd.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
x86/microcode/AMD: Handle the case of no BIOS microcode [+ + +]
Author: Borislav Petkov (AMD) <bp@alien8.de>
Date:   Wed Aug 20 11:58:57 2025 +0200

    x86/microcode/AMD: Handle the case of no BIOS microcode
    
    commit fcf8239ad6a5de54fa7ce18e464c6b5951b982cb upstream.
    
    Machines can be shipped without any microcode in the BIOS. Which means,
    the microcode patch revision is 0.
    
    Handle that gracefully.
    
    Fixes: 94838d230a6c ("x86/microcode/AMD: Use the family,model,stepping encoded in the patch ID")
    Reported-by: Vítek Vávra <vit.vavra.kh@gmail.com>
    Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
    Cc: <stable@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
xfs: do not propagate ENODATA disk errors into xattr code [+ + +]
Author: Eric Sandeen <sandeen@redhat.com>
Date:   Fri Aug 22 12:55:56 2025 -0500

    xfs: do not propagate ENODATA disk errors into xattr code
    
    commit ae668cd567a6a7622bc813ee0bb61c42bed61ba7 upstream.
    
    ENODATA (aka ENOATTR) has a very specific meaning in the xfs xattr code;
    namely, that the requested attribute name could not be found.
    
    However, a medium error from disk may also return ENODATA. At best,
    this medium error may escape to userspace as "attribute not found"
    when in fact it's an IO (disk) error.
    
    At worst, we may oops in xfs_attr_leaf_get() when we do:
    
            error = xfs_attr_leaf_hasname(args, &bp);
            if (error == -ENOATTR)  {
                    xfs_trans_brelse(args->trans, bp);
                    return error;
            }
    
    because an ENODATA/ENOATTR error from disk leaves us with a null bp,
    and the xfs_trans_brelse will then null-deref it.
    
    As discussed on the list, we really need to modify the lower level
    IO functions to trap all disk errors and ensure that we don't let
    unique errors like this leak up into higher xfs functions - many
    like this should be remapped to EIO.
    
    However, this patch directly addresses a reported bug in the xattr
    code, and should be safe to backport to stable kernels. A larger-scope
    patch to handle more unique errors at lower levels can follow later.
    
    (Note, prior to 07120f1abdff we did not oops, but we did return the
    wrong error code to userspace.)
    
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
    Fixes: 07120f1abdff ("xfs: Add xfs_has_attr and subroutines")
    Cc: stable@vger.kernel.org # v5.9+
    Reviewed-by: Darrick J. Wong <djwong@kernel.org>
    Signed-off-by: Carlos Maiolino <cem@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>