Changelog in Linux kernel 5.4.302

 
9p: fix /sys/fs/9p/caches overwriting itself [+ + +]
Author: Randall P. Embry <[email protected]>
Date:   Fri Sep 26 18:27:30 2025 +0900

    9p: fix /sys/fs/9p/caches overwriting itself
    
    [ Upstream commit 86db0c32f16c5538ddb740f54669ace8f3a1f3d7 ]
    
    caches_show() overwrote its buffer on each iteration,
    so only the last cache tag was visible in sysfs output.
    
    Properly append with snprintf(buf + count, …).
    
    Signed-off-by: Randall P. Embry <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Dominique Martinet <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

9p: sysfs_init: don't hardcode error to ENOMEM [+ + +]
Author: Randall P. Embry <[email protected]>
Date:   Fri Sep 26 18:27:31 2025 +0900

    9p: sysfs_init: don't hardcode error to ENOMEM
    
    [ Upstream commit 528f218b31aac4bbfc58914d43766a22ab545d48 ]
    
    v9fs_sysfs_init() always returned -ENOMEM on failure;
    return the actual sysfs_create_group() error instead.
    
    Signed-off-by: Randall P. Embry <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Dominique Martinet <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ACPI: property: Return present device nodes only on fwnode interface [+ + +]
Author: Sakari Ailus <[email protected]>
Date:   Wed Oct 1 13:26:36 2025 +0300

    ACPI: property: Return present device nodes only on fwnode interface
    
    [ Upstream commit d9f866b2bb3eec38b3734f1fed325ec7c55ccdfa ]
    
    fwnode_graph_get_next_subnode() may return fwnode backed by ACPI
    device nodes and there has been no check these devices are present
    in the system, unlike there has been on fwnode OF backend.
    
    In order to provide consistent behaviour towards callers,
    add a check for device presence by introducing
    a new function acpi_get_next_present_subnode(), used as the
    get_next_child_node() fwnode operation that also checks device
    node presence.
    
    Signed-off-by: Sakari Ailus <[email protected]>
    Reviewed-by: Laurent Pinchart <[email protected]>
    Reviewed-by: Jonathan Cameron <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    [ rjw: Kerneldoc comment and changelog edits ]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ACPI: video: Fix use-after-free in acpi_video_switch_brightness() [+ + +]
Author: Yuhao Jiang <[email protected]>
Date:   Wed Oct 22 15:07:04 2025 -0500

    ACPI: video: Fix use-after-free in acpi_video_switch_brightness()
    
    commit 8f067aa59430266386b83c18b983ca583faa6a11 upstream.
    
    The switch_brightness_work delayed work accesses device->brightness
    and device->backlight, freed by acpi_video_dev_unregister_backlight()
    during device removal.
    
    If the work executes after acpi_video_bus_unregister_backlight()
    frees these resources, it causes a use-after-free when
    acpi_video_switch_brightness() dereferences device->brightness or
    device->backlight.
    
    Fix this by calling cancel_delayed_work_sync() for each device's
    switch_brightness_work in acpi_video_bus_remove_notify_handler()
    after removing the notify handler that queues the work. This ensures
    the work completes before the memory is freed.
    
    Fixes: 8ab58e8e7e097 ("ACPI / video: Fix backlight taking 2 steps on a brightness up/down keypress")
    Cc: All applicable <[email protected]>
    Signed-off-by: Yuhao Jiang <[email protected]>
    Reviewed-by: Hans de Goede <[email protected]>
    [ rjw: Changelog edit ]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ACPI: video: force native for Lenovo 82K8 [+ + +]
Author: Mario Limonciello (AMD) <[email protected]>
Date:   Wed Aug 20 12:09:26 2025 -0500

    ACPI: video: force native for Lenovo 82K8
    
    [ Upstream commit f144bc21befdcf8e54d2f19b23b4e84f13be01f9 ]
    
    Lenovo 82K8 has a broken brightness control provided by nvidia_wmi_ec.
    Add a quirk to prevent using it.
    
    Reported-by: Wilson Alvarez <[email protected]>
    Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4512
    Tested-by: Wilson Alvarez <[email protected]>
    Signed-off-by: Mario Limonciello (AMD) <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ACPICA: dispatcher: Use acpi_ds_clear_operands() in acpi_ds_call_control_method() [+ + +]
Author: Hans de Goede <[email protected]>
Date:   Fri Sep 12 22:00:17 2025 +0200

    ACPICA: dispatcher: Use acpi_ds_clear_operands() in acpi_ds_call_control_method()
    
    [ Upstream commit e9dff11a7a50fcef23fe3e8314fafae6d5641826 ]
    
    When deleting the previous walkstate operand stack
    acpi_ds_call_control_method() was deleting obj_desc->Method.param_count
    operands. But Method.param_count does not necessarily match
    this_walk_state->num_operands, it may be either less or more.
    
    After correcting the for loop to check `i < this_walk_state->num_operands`
    the code is identical to acpi_ds_clear_operands(), so just outright
    replace the code with acpi_ds_clear_operands() to fix this.
    
    Link: https://github.com/acpica/acpica/commit/53fc0220
    Signed-off-by: Hans de Goede <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ACPICA: Update dsmethod.c to get rid of unused variable warning [+ + +]
Author: Saket Dumbre <[email protected]>
Date:   Fri Sep 12 22:01:04 2025 +0200

    ACPICA: Update dsmethod.c to get rid of unused variable warning
    
    [ Upstream commit 761dc71c6020d6aa68666e96373342d49a7e9d0a ]
    
    All the 3 major C compilers (MSVC, GCC, LLVM/Clang) warn about
    the unused variable i after the removal of its usage by PR #1031
    addressing Issue #1027
    
    Link: https://github.com/acpica/acpica/commit/6d235320
    Signed-off-by: Saket Dumbre <[email protected]>
    Signed-off-by: Rafael J. Wysocki <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Linux: allow finish_no_open(file, ERR_PTR(-E...)) [+ + +]
Author: Al Viro <[email protected]>
Date:   Fri Sep 12 11:20:27 2025 -0400

    allow finish_no_open(file, ERR_PTR(-E...))
    
    [ Upstream commit fe91e078b60d1beabf5cef4a37c848457a6d2dfb ]
    
    ... allowing any ->lookup() return value to be passed to it.
    
    Reviewed-by: NeilBrown <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ALSA: usb-audio: apply quirk for MOONDROP Quark2 [+ + +]
Author: Cryolitia PukNgae <[email protected]>
Date:   Wed Sep 3 13:09:48 2025 +0800

    ALSA: usb-audio: apply quirk for MOONDROP Quark2
    
    [ Upstream commit a73349c5dd27bc544b048e2e2c8ef6394f05b793 ]
    
    It reports a MIN value -15360 for volume control, but will mute when
    setting it less than -14208
    
    Tested-by: Guoli An <[email protected]>
    Signed-off-by: Cryolitia PukNgae <[email protected]>
    Signed-off-by: Takashi Iwai <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

ALSA: usb-audio: Fix NULL pointer dereference in snd_usb_mixer_controls_badd [+ + +]
Author: Haein Lee <[email protected]>
Date:   Wed Nov 12 00:37:54 2025 +0900

    ALSA: usb-audio: Fix NULL pointer dereference in snd_usb_mixer_controls_badd
    
    [ Upstream commit 632108ec072ad64c8c83db6e16a7efee29ebfb74 ]
    
    In snd_usb_create_streams(), for UAC version 3 devices, the Interface
    Association Descriptor (IAD) is retrieved via usb_ifnum_to_if(). If this
    call fails, a fallback routine attempts to obtain the IAD from the next
    interface and sets a BADD profile. However, snd_usb_mixer_controls_badd()
    assumes that the IAD retrieved from usb_ifnum_to_if() is always valid,
    without performing a NULL check. This can lead to a NULL pointer
    dereference when usb_ifnum_to_if() fails to find the interface descriptor.
    
    This patch adds a NULL pointer check after calling usb_ifnum_to_if() in
    snd_usb_mixer_controls_badd() to prevent the dereference.
    
    This issue was discovered by syzkaller, which triggered the bug by sending
    a crafted USB device descriptor.
    
    Fixes: 17156f23e93c ("ALSA: usb: add UAC3 BADD profiles support")
    Signed-off-by: Haein Lee <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ALSA: usb-audio: fix uac2 clock source at terminal parser [+ + +]
Author: René Rebe <[email protected]>
Date:   Tue Nov 25 15:41:49 2025 +0100

    ALSA: usb-audio: fix uac2 clock source at terminal parser
    
    [ Upstream commit d26e9f669cc0a6a85cf17180c09a6686db9f4002 ]
    
    Since 8b3a087f7f65 ("ALSA: usb-audio: Unify virtual type units type to
    UAC3 values") usb-audio is using UAC3_CLOCK_SOURCE instead of
    bDescriptorSubtype, later refactored with e0ccdef9265 ("ALSA: usb-audio:
    Clean up check_input_term()") into parse_term_uac2_clock_source().
    
    This breaks the clock source selection for at least my
    1397:0003 BEHRINGER International GmbH FCA610 Pro.
    
    Fix by using UAC2_CLOCK_SOURCE in parse_term_uac2_clock_source().
    
    Fixes: 8b3a087f7f65 ("ALSA: usb-audio: Unify virtual type units type to UAC3 values")
    Signed-off-by: René Rebe <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Takashi Iwai <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
arc: Fix __fls() const-foldability via __builtin_clzl() [+ + +]
Author: Kees Cook <[email protected]>
Date:   Sat Aug 30 19:23:53 2025 -0700

    arc: Fix __fls() const-foldability via __builtin_clzl()
    
    [ Upstream commit a3fecb9160482367365cc384c59dd220b162b066 ]
    
    While tracking down a problem where constant expressions used by
    BUILD_BUG_ON() suddenly stopped working[1], we found that an added static
    initializer was convincing the compiler that it couldn't track the state
    of the prior statically initialized value. Tracing this down found that
    ffs() was used in the initializer macro, but since it wasn't marked with
    __attribute__const__, the compiler had to assume the function might
    change variable states as a side-effect (which is not true for ffs(),
    which provides deterministic math results).
    
    For arc architecture with CONFIG_ISA_ARCV2=y, the __fls() function
    uses __builtin_arc_fls() which lacks GCC's const attribute, preventing
    compile-time constant folding, and KUnit testing of ffs/fls fails on
    arc[3]. A patch[2] to GCC to solve this has been sent.
    
    Add a fix for this by handling compile-time constants with the standard
    __builtin_clzl() builtin (which has const attribute) while preserving
    the optimized arc-specific builtin for runtime cases. This has the added
    benefit of skipping runtime calculation of compile-time constant values.
    Even with the GCC bug fixed (which is about "attribute const") this is a
    good change to avoid needless runtime costs, and should be done
    regardless of the state of GCC's bug.
    
    Build tested ARCH=arc allyesconfig with GCC arc-linux 15.2.0.
    
    Link: https://github.com/KSPP/linux/issues/364 [1]
    Link: https://gcc.gnu.org/pipermail/gcc-patches/2025-August/693273.html
    Reported-by: kernel test robot <[email protected]>
    Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ [3]
    Signed-off-by: Kees Cook <[email protected]>
    Acked-by: Vineet Gupta <[email protected]>
    Signed-off-by: Yury Norov (NVIDIA) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ASoC: cs4271: Fix regulator leak on probe failure [+ + +]
Author: Haotian Zhang <[email protected]>
Date:   Wed Nov 5 14:22:46 2025 +0800

    ASoC: cs4271: Fix regulator leak on probe failure
    
    [ Upstream commit 6b6eddc63ce871897d3a5bc4f8f593e698aef104 ]
    
    The probe function enables regulators at the beginning
    but fails to disable them in its error handling path.
    If any operation after enabling the regulators fails,
    the probe will exit with an error, leaving the regulators
    permanently enabled, which could lead to a resource leak.
    
    Add a proper error handling path to call regulator_bulk_disable()
    before returning an error.
    
    Fixes: 9a397f473657 ("ASoC: cs4271: add regulator consumer support")
    Signed-off-by: Haotian Zhang <[email protected]>
    Reviewed-by: Charles Keepax <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ASoC: max98090/91: fixed max98091 ALSA widget powering up/down [+ + +]
Author: Sharique Mohammad <[email protected]>
Date:   Wed Oct 15 15:42:15 2025 +0200

    ASoC: max98090/91: fixed max98091 ALSA widget powering up/down
    
    [ Upstream commit 7a37291ed40a33a5f6c3d370fdde5ee0d8f7d0e4 ]
    
    The widgets DMIC3_ENA and DMIC4_ENA must be defined in the DAPM
    suppy widget, just like DMICL_ENA and DMICR_ENA. Whenever they
    are turned on or off, the required startup or shutdown sequences
    must be taken care by the max98090_shdn_event.
    
    Signed-off-by: Sharique Mohammad <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

ASoC: qdsp6: q6asm: do not sleep while atomic [+ + +]
Author: Srinivas Kandagatla <[email protected]>
Date:   Fri Oct 17 09:52:56 2025 +0100

    ASoC: qdsp6: q6asm: do not sleep while atomic
    
    commit fdbb53d318aa94a094434e5f226617f0eb1e8f22 upstream.
    
    For some reason we ended up kfree between spinlock lock and unlock,
    which can sleep.
    
    move the kfree out of spinlock section.
    
    Fixes: a2a5d30218fd ("ASoC: qdsp6: q6asm: Add support to memory map and unmap")
    Cc: [email protected]
    Signed-off-by: Srinivas Kandagatla <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ata: libata-scsi: Fix system suspend for a security locked drive [+ + +]
Author: Niklas Cassel <[email protected]>
Date:   Mon Nov 24 14:20:34 2025 -0500

    ata: libata-scsi: Fix system suspend for a security locked drive
    
    [ Upstream commit b11890683380a36b8488229f818d5e76e8204587 ]
    
    Commit cf3fc037623c ("ata: libata-scsi: Fix ata_to_sense_error() status
    handling") fixed ata_to_sense_error() to properly generate sense key
    ABORTED COMMAND (without any additional sense code), instead of the
    previous bogus sense key ILLEGAL REQUEST with the additional sense code
    UNALIGNED WRITE COMMAND, for a failed command.
    
    However, this broke suspend for Security locked drives (drives that have
    Security enabled, and have not been Security unlocked by boot firmware).
    
    The reason for this is that the SCSI disk driver, for the Synchronize
    Cache command only, treats any sense data with sense key ILLEGAL REQUEST
    as a successful command (regardless of ASC / ASCQ).
    
    After commit cf3fc037623c ("ata: libata-scsi: Fix ata_to_sense_error()
    status handling") the code that treats any sense data with sense key
    ILLEGAL REQUEST as a successful command is no longer applicable, so the
    command fails, which causes the system suspend to be aborted:
    
      sd 1:0:0:0: PM: dpm_run_callback(): scsi_bus_suspend returns -5
      sd 1:0:0:0: PM: failed to suspend async: error -5
      PM: Some devices failed to suspend, or early wake event detected
    
    To make suspend work once again, for a Security locked device only,
    return sense data LOGICAL UNIT ACCESS NOT AUTHORIZED, the actual sense
    data which a real SCSI device would have returned if locked.
    The SCSI disk driver treats this sense data as a successful command.
    
    Cc: [email protected]
    Reported-by: Ilia Baryshnikov <[email protected]>
    Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220704
    Fixes: cf3fc037623c ("ata: libata-scsi: Fix ata_to_sense_error() status handling")
    Reviewed-by: Hannes Reinecke <[email protected]>
    Reviewed-by: Martin K. Petersen <[email protected]>
    Reviewed-by: Damien Le Moal <[email protected]>
    Signed-off-by: Niklas Cassel <[email protected]>
    [ Adjust context ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
be2net: pass wrb_params in case of OS2BMC [+ + +]
Author: Andrey Vatoropin <[email protected]>
Date:   Wed Nov 19 10:51:12 2025 +0000

    be2net: pass wrb_params in case of OS2BMC
    
    commit 7d277a7a58578dd62fd546ddaef459ec24ccae36 upstream.
    
    be_insert_vlan_in_pkt() is called with the wrb_params argument being NULL
    at be_send_pkt_to_bmc() call site.  This may lead to dereferencing a NULL
    pointer when processing a workaround for specific packet, as commit
    bc0c3405abbb ("be2net: fix a Tx stall bug caused by a specific ipv6
    packet") states.
    
    The correct way would be to pass the wrb_params from be_xmit().
    
    Fixes: 760c295e0e8d ("be2net: Support for OS2BMC.")
    Cc: [email protected]
    Signed-off-by: Andrey Vatoropin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Bluetooth: 6lowpan: Don't hold spin lock over sleeping functions [+ + +]
Author: Pauli Virtanen <[email protected]>
Date:   Mon Nov 3 20:29:49 2025 +0200

    Bluetooth: 6lowpan: Don't hold spin lock over sleeping functions
    
    [ Upstream commit 98454bc812f3611551e4b1f81732da4aa7b9597e ]
    
    disconnect_all_peers() calls sleeping function (l2cap_chan_close) under
    spinlock.  Holding the lock doesn't actually do any good -- we work on a
    local copy of the list, and the lock doesn't protect against peer->chan
    having already been freed.
    
    Fix by taking refcounts of peer->chan instead.  Clean up the code and
    old comments a bit.
    
    Take devices_lock instead of RCU, because the kfree_rcu();
    l2cap_chan_put(); construct in chan_close_cb() does not guarantee
    peer->chan is necessarily valid in RCU.
    
    Also take l2cap_chan_lock() which is required for l2cap_chan_close().
    
    Log: (bluez 6lowpan-tester Client Connect - Disable)
    ------
    BUG: sleeping function called from invalid context at kernel/locking/mutex.c:575
    ...
    <TASK>
    ...
    l2cap_send_disconn_req (net/bluetooth/l2cap_core.c:938 net/bluetooth/l2cap_core.c:1495)
    ...
    ? __pfx_l2cap_chan_close (net/bluetooth/l2cap_core.c:809)
    do_enable_set (net/bluetooth/6lowpan.c:1048 net/bluetooth/6lowpan.c:1068)
    ------
    
    Fixes: 90305829635d ("Bluetooth: 6lowpan: Converting rwlocks to use RCU")
    Signed-off-by: Pauli Virtanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: 6lowpan: fix BDADDR_LE vs ADDR_LE_DEV address type confusion [+ + +]
Author: Pauli Virtanen <[email protected]>
Date:   Mon Nov 3 20:29:47 2025 +0200

    Bluetooth: 6lowpan: fix BDADDR_LE vs ADDR_LE_DEV address type confusion
    
    [ Upstream commit b454505bf57a2e4f5d49951d4deb03730a9348d9 ]
    
    Bluetooth 6lowpan.c confuses BDADDR_LE and ADDR_LE_DEV address types,
    e.g. debugfs "connect" command takes the former, and "disconnect" and
    "connect" to already connected device take the latter.  This is due to
    using same value both for l2cap_chan_connect and hci_conn_hash_lookup_le
    which take different dst_type values.
    
    Fix address type passed to hci_conn_hash_lookup_le().
    
    Retain the debugfs API difference between "connect" and "disconnect"
    commands since it's been like this since 2015 and nobody apparently
    complained.
    
    Fixes: f5ad4ffceba0 ("Bluetooth: 6lowpan: Use hci_conn_hash_lookup_le() when possible")
    Reviewed-by: Paul Menzel <[email protected]>
    Signed-off-by: Pauli Virtanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: 6lowpan: reset link-local header on ipv6 recv path [+ + +]
Author: Pauli Virtanen <[email protected]>
Date:   Mon Nov 3 20:29:46 2025 +0200

    Bluetooth: 6lowpan: reset link-local header on ipv6 recv path
    
    [ Upstream commit 3b78f50918276ab28fb22eac9aa49401ac436a3b ]
    
    Bluetooth 6lowpan.c netdev has header_ops, so it must set link-local
    header for RX skb, otherwise things crash, eg. with AF_PACKET SOCK_RAW
    
    Add missing skb_reset_mac_header() for uncompressed ipv6 RX path.
    
    For the compressed one, it is done in lowpan_header_decompress().
    
    Log: (BlueZ 6lowpan-tester Client Recv Raw - Success)
    ------
    kernel BUG at net/core/skbuff.c:212!
    Call Trace:
    <IRQ>
    ...
    packet_rcv (net/packet/af_packet.c:2152)
    ...
    <TASK>
    __local_bh_enable_ip (kernel/softirq.c:407)
    netif_rx (net/core/dev.c:5648)
    chan_recv_cb (net/bluetooth/6lowpan.c:294 net/bluetooth/6lowpan.c:359)
    ------
    
    Fixes: 18722c247023 ("Bluetooth: Enable 6LoWPAN support for BT LE devices")
    Reviewed-by: Paul Menzel <[email protected]>
    Signed-off-by: Pauli Virtanen <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: bcsp: receive data only if registered [+ + +]
Author: Ivan Pravdin <[email protected]>
Date:   Sat Aug 30 16:03:40 2025 -0400

    Bluetooth: bcsp: receive data only if registered
    
    [ Upstream commit ca94b2b036c22556c3a66f1b80f490882deef7a6 ]
    
    Currently, bcsp_recv() can be called even when the BCSP protocol has not
    been registered. This leads to a NULL pointer dereference, as shown in
    the following stack trace:
    
        KASAN: null-ptr-deref in range [0x0000000000000108-0x000000000000010f]
        RIP: 0010:bcsp_recv+0x13d/0x1740 drivers/bluetooth/hci_bcsp.c:590
        Call Trace:
         <TASK>
         hci_uart_tty_receive+0x194/0x220 drivers/bluetooth/hci_ldisc.c:627
         tiocsti+0x23c/0x2c0 drivers/tty/tty_io.c:2290
         tty_ioctl+0x626/0xde0 drivers/tty/tty_io.c:2706
         vfs_ioctl fs/ioctl.c:51 [inline]
         __do_sys_ioctl fs/ioctl.c:907 [inline]
         __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:893
         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
    
    To prevent this, ensure that the HCI_UART_REGISTERED flag is set before
    processing received data. If the protocol is not registered, return
    -EUNATCH.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=4ed6852d4da4606c93da
    Tested-by: [email protected]
    Signed-off-by: Ivan Pravdin <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: btusb: reorder cleanup in btusb_disconnect to avoid UAF [+ + +]
Author: Raphael Pinsonneault-Thibeault <[email protected]>
Date:   Wed Nov 5 14:28:41 2025 -0500

    Bluetooth: btusb: reorder cleanup in btusb_disconnect to avoid UAF
    
    [ Upstream commit 23d22f2f71768034d6ef86168213843fc49bf550 ]
    
    There is a KASAN: slab-use-after-free read in btusb_disconnect().
    Calling "usb_driver_release_interface(&btusb_driver, data->intf)" will
    free the btusb data associated with the interface. The same data is
    then used later in the function, hence the UAF.
    
    Fix by moving the accesses to btusb data to before the data is free'd.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=2fc81b50a4f8263a159b
    Tested-by: [email protected]
    Fixes: fd913ef7ce619 ("Bluetooth: btusb: Add out-of-band wakeup support")
    Signed-off-by: Raphael Pinsonneault-Thibeault <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: L2CAP: export l2cap_chan_hold for modules [+ + +]
Author: Pauli Virtanen <[email protected]>
Date:   Mon Nov 3 20:29:48 2025 +0200

    Bluetooth: L2CAP: export l2cap_chan_hold for modules
    
    [ Upstream commit e060088db0bdf7932e0e3c2d24b7371c4c5b867c ]
    
    l2cap_chan_put() is exported, so export also l2cap_chan_hold() for
    modules.
    
    l2cap_chan_hold() has use case in net/bluetooth/6lowpan.c
    
    Signed-off-by: Pauli Virtanen <[email protected]>
    Reviewed-by: Paul Menzel <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

Bluetooth: SCO: Fix UAF on sco_conn_free [+ + +]
Author: Luiz Augusto von Dentz <[email protected]>
Date:   Mon Sep 22 13:13:13 2025 -0400

    Bluetooth: SCO: Fix UAF on sco_conn_free
    
    [ Upstream commit ecb9a843be4d6fd710d7026e359f21015a062572 ]
    
    BUG: KASAN: slab-use-after-free in sco_conn_free net/bluetooth/sco.c:87 [inline]
    BUG: KASAN: slab-use-after-free in kref_put include/linux/kref.h:65 [inline]
    BUG: KASAN: slab-use-after-free in sco_conn_put+0xdd/0x410
    net/bluetooth/sco.c:107
    Write of size 8 at addr ffff88811cb96b50 by task kworker/u17:4/352
    
    CPU: 1 UID: 0 PID: 352 Comm: kworker/u17:4 Not tainted
    6.17.0-rc5-g717368f83676 #4 PREEMPT(voluntary)
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
    Workqueue: hci13 hci_cmd_sync_work
    Call Trace:
     <TASK>
     __dump_stack lib/dump_stack.c:94 [inline]
     dump_stack_lvl+0x10b/0x170 lib/dump_stack.c:120
     print_address_description mm/kasan/report.c:378 [inline]
     print_report+0x191/0x550 mm/kasan/report.c:482
     kasan_report+0xc4/0x100 mm/kasan/report.c:595
     sco_conn_free net/bluetooth/sco.c:87 [inline]
     kref_put include/linux/kref.h:65 [inline]
     sco_conn_put+0xdd/0x410 net/bluetooth/sco.c:107
     sco_connect_cfm+0xb4/0xae0 net/bluetooth/sco.c:1441
     hci_connect_cfm include/net/bluetooth/hci_core.h:2082 [inline]
     hci_conn_failed+0x20a/0x2e0 net/bluetooth/hci_conn.c:1313
     hci_conn_unlink+0x55f/0x810 net/bluetooth/hci_conn.c:1121
     hci_conn_del+0xb6/0x1110 net/bluetooth/hci_conn.c:1147
     hci_abort_conn_sync+0x8c5/0xbb0 net/bluetooth/hci_sync.c:5689
     hci_cmd_sync_work+0x281/0x380 net/bluetooth/hci_sync.c:332
     process_one_work kernel/workqueue.c:3236 [inline]
     process_scheduled_works+0x77e/0x1040 kernel/workqueue.c:3319
     worker_thread+0xbee/0x1200 kernel/workqueue.c:3400
     kthread+0x3c7/0x870 kernel/kthread.c:463
     ret_from_fork+0x13a/0x1e0 arch/x86/kernel/process.c:148
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
     </TASK>
    
    Allocated by task 31370:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x30/0x70 mm/kasan/common.c:68
     poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
     __kasan_kmalloc+0x82/0x90 mm/kasan/common.c:405
     kasan_kmalloc include/linux/kasan.h:260 [inline]
     __do_kmalloc_node mm/slub.c:4382 [inline]
     __kmalloc_noprof+0x22f/0x390 mm/slub.c:4394
     kmalloc_noprof include/linux/slab.h:909 [inline]
     sk_prot_alloc+0xae/0x220 net/core/sock.c:2239
     sk_alloc+0x34/0x5a0 net/core/sock.c:2295
     bt_sock_alloc+0x3c/0x330 net/bluetooth/af_bluetooth.c:151
     sco_sock_alloc net/bluetooth/sco.c:562 [inline]
     sco_sock_create+0xc0/0x350 net/bluetooth/sco.c:593
     bt_sock_create+0x161/0x3b0 net/bluetooth/af_bluetooth.c:135
     __sock_create+0x3ad/0x780 net/socket.c:1589
     sock_create net/socket.c:1647 [inline]
     __sys_socket_create net/socket.c:1684 [inline]
     __sys_socket+0xd5/0x330 net/socket.c:1731
     __do_sys_socket net/socket.c:1745 [inline]
     __se_sys_socket net/socket.c:1743 [inline]
     __x64_sys_socket+0x7a/0x90 net/socket.c:1743
     do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
     do_syscall_64+0xc7/0x240 arch/x86/entry/syscall_64.c:94
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Freed by task 31374:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x30/0x70 mm/kasan/common.c:68
     kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:576
     poison_slab_object mm/kasan/common.c:243 [inline]
     __kasan_slab_free+0x3d/0x50 mm/kasan/common.c:275
     kasan_slab_free include/linux/kasan.h:233 [inline]
     slab_free_hook mm/slub.c:2428 [inline]
     slab_free mm/slub.c:4701 [inline]
     kfree+0x199/0x3b0 mm/slub.c:4900
     sk_prot_free net/core/sock.c:2278 [inline]
     __sk_destruct+0x4aa/0x630 net/core/sock.c:2373
     sco_sock_release+0x2ad/0x300 net/bluetooth/sco.c:1333
     __sock_release net/socket.c:649 [inline]
     sock_close+0xb8/0x230 net/socket.c:1439
     __fput+0x3d1/0x9e0 fs/file_table.c:468
     task_work_run+0x206/0x2a0 kernel/task_work.c:227
     get_signal+0x1201/0x1410 kernel/signal.c:2807
     arch_do_signal_or_restart+0x34/0x740 arch/x86/kernel/signal.c:337
     exit_to_user_mode_loop+0x68/0xc0 kernel/entry/common.c:40
     exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
     syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
     syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
     do_syscall_64+0x1dd/0x240 arch/x86/entry/syscall_64.c:100
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Reported-by: cen zhang <[email protected]>
    Signed-off-by: Luiz Augusto von Dentz <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
bpf: Don't use %pK through printk [+ + +]
Author: Thomas Weißschuh <[email protected]>
Date:   Mon Aug 11 14:08:04 2025 +0200

    bpf: Don't use %pK through printk
    
    [ Upstream commit 2caa6b88e0ba0231fb4ff0ba8e73cedd5fb81fc8 ]
    
    In the past %pK was preferable to %p as it would not leak raw pointer
    values into the kernel log.
    Since commit ad67b74d2469 ("printk: hash addresses printed with %p")
    the regular %p has been improved to avoid this issue.
    Furthermore, restricted pointers ("%pK") were never meant to be used
    through printk(). They can still unintentionally leak raw pointers or
    acquire sleeping locks in atomic contexts.
    
    Switch to the regular pointer formatting which is safer and
    easier to reason about.
    
    Signed-off-by: Thomas Weißschuh <[email protected]>
    Signed-off-by: Andrii Nakryiko <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
bridge: Redirect to backup port when port is administratively down [+ + +]
Author: Ido Schimmel <[email protected]>
Date:   Tue Aug 12 11:02:12 2025 +0300

    bridge: Redirect to backup port when port is administratively down
    
    [ Upstream commit 3d05b24429e1de7a17c8fdccb04a04dbc8ad297b ]
    
    If a backup port is configured for a bridge port, the bridge will
    redirect known unicast traffic towards the backup port when the primary
    port is administratively up but without a carrier. This is useful, for
    example, in MLAG configurations where a system is connected to two
    switches and there is a peer link between both switches. The peer link
    serves as the backup port in case one of the switches loses its
    connection to the multi-homed system.
    
    In order to avoid flooding when the primary port loses its carrier, the
    bridge does not flush dynamic FDB entries pointing to the port upon STP
    disablement, if the port has a backup port.
    
    The above means that known unicast traffic destined to the primary port
    will be blackholed when the port is put administratively down, until the
    FDB entries pointing to it are aged-out.
    
    Given that the current behavior is quite weird and unlikely to be
    depended on by anyone, amend the bridge to redirect to the backup port
    also when the primary port is administratively down and not only when it
    does not have a carrier.
    
    The change is motivated by a report from a user who expected traffic to
    be redirected to the backup port when the primary port was put
    administratively down while debugging a network issue.
    
    Reviewed-by: Petr Machata <[email protected]>
    Signed-off-by: Ido Schimmel <[email protected]>
    Acked-by: Nikolay Aleksandrov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
btrfs: use smp_mb__after_atomic() when forcing COW in create_pending_snapshot() [+ + +]
Author: Filipe Manana <[email protected]>
Date:   Mon Sep 22 12:09:14 2025 +0100

    btrfs: use smp_mb__after_atomic() when forcing COW in create_pending_snapshot()
    
    [ Upstream commit 45c222468d33202c07c41c113301a4b9c8451b8f ]
    
    After setting the BTRFS_ROOT_FORCE_COW flag on the root we are doing a
    full write barrier, smp_wmb(), but we don't need to, all we need is a
    smp_mb__after_atomic().  The use of the smp_wmb() is from the old days
    when we didn't use a bit and used instead an int field in the root to
    signal if cow is forced. After the int field was changed to a bit in
    the root's state (flags field), we forgot to update the memory barrier
    in create_pending_snapshot() to smp_mb__after_atomic(), but we did the
    change in commit_fs_roots() after clearing BTRFS_ROOT_FORCE_COW. That
    happened in commit 27cdeb7096b8 ("Btrfs: use bitfield instead of integer
    data type for the some variants in btrfs_root"). On the reader side, in
    should_cow_block(), we also use the counterpart smp_mb__before_atomic()
    which generates further confusion.
    
    So change the smp_wmb() to smp_mb__after_atomic(). In fact we don't
    even need any barrier at all since create_pending_snapshot() is called
    in the critical section of a transaction commit and therefore no one
    can concurrently join/attach the transaction, or start a new one, until
    the transaction is unblocked. By the time someone starts a new transaction
    and enters should_cow_block(), a lot of implicit memory barriers already
    took place by having acquired several locks such as fs_info->trans_lock
    and extent buffer locks on the root node at least. Nevertlheless, for
    consistency use smp_mb__after_atomic() after setting the force cow bit
    in create_pending_snapshot().
    
    Signed-off-by: Filipe Manana <[email protected]>
    Reviewed-by: David Sterba <[email protected]>
    Signed-off-by: David Sterba <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
can: gs_usb: increase max interface to U8_MAX [+ + +]
Author: Celeste Liu <[email protected]>
Date:   Mon Oct 27 21:11:57 2025 +0800

    can: gs_usb: increase max interface to U8_MAX
    
    commit 2a27f6a8fb5722223d526843040f747e9b0e8060 upstream
    
    This issue was found by Runcheng Lu when develop HSCanT USB to CAN FD
    converter[1]. The original developers may have only 3 interfaces
    device to test so they write 3 here and wait for future change.
    
    During the HSCanT development, we actually used 4 interfaces, so the
    limitation of 3 is not enough now. But just increase one is not
    future-proofed. Since the channel index type in gs_host_frame is u8,
    just make canch[] become a flexible array with a u8 index, so it
    naturally constraint by U8_MAX and avoid statically allocate 256
    pointer for every gs_usb device.
    
    [1]: https://github.com/cherry-embedded/HSCanT-hardware
    
    Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
    Reported-by: Runcheng Lu <[email protected]>
    Cc: [email protected]
    Reviewed-by: Vincent Mailhol <[email protected]>
    Signed-off-by: Celeste Liu <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ceph: add checking of wait_for_completion_killable() return value [+ + +]
Author: Viacheslav Dubeyko <[email protected]>
Date:   Fri Jun 6 12:04:32 2025 -0700

    ceph: add checking of wait_for_completion_killable() return value
    
    [ Upstream commit b7ed1e29cfe773d648ca09895b92856bd3a2092d ]
    
    The Coverity Scan service has detected the calling of
    wait_for_completion_killable() without checking the return
    value in ceph_lock_wait_for_completion() [1]. The CID 1636232
    defect contains explanation: "If the function returns an error
    value, the error value may be mistaken for a normal value.
    In ceph_lock_wait_for_completion(): Value returned from
    a function is not checked for errors before being used. (CWE-252)".
    
    The patch adds the checking of wait_for_completion_killable()
    return value and return the error code from
    ceph_lock_wait_for_completion().
    
    [1] https://scan5.scan.coverity.com/#/project-view/64304/10063?selectedIssue=1636232
    
    Signed-off-by: Viacheslav Dubeyko <[email protected]>
    Reviewed-by: Alex Markuze <[email protected]>
    Signed-off-by: Ilya Dryomov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
char: misc: Does not request module for miscdevice with dynamic minor [+ + +]
Author: Zijun Hu <[email protected]>
Date:   Mon Jul 14 23:34:17 2025 +0800

    char: misc: Does not request module for miscdevice with dynamic minor
    
    [ Upstream commit 1ba0fb42aa6a5f072b1b8c0b0520b32ad4ef4b45 ]
    
    misc_open() may request module for miscdevice with dynamic minor, which
    is meaningless since:
    
    - The dynamic minor allocated is unknown in advance without registering
      miscdevice firstly.
    - Macro MODULE_ALIAS_MISCDEV() is not applicable for dynamic minor.
    
    Fix by only requesting module for miscdevice with fixed minor.
    
    Acked-by: Thadeu Lima de Souza Cascardo <[email protected]>
    Signed-off-by: Zijun Hu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
clocksource/drivers/vf-pit: Replace raw_readl/writel to readl/writel [+ + +]
Author: Daniel Lezcano <[email protected]>
Date:   Mon Aug 4 17:23:19 2025 +0200

    clocksource/drivers/vf-pit: Replace raw_readl/writel to readl/writel
    
    [ Upstream commit 0b781f527d6f99e68e5b3780ae03cd69a7cb5c0c ]
    
    The driver uses the raw_readl() and raw_writel() functions. Those are
    not for MMIO devices. Replace them with readl() and writel()
    
    [ dlezcano: Fixed typo in the subject s/reald/readl/ ]
    
    Signed-off-by: Daniel Lezcano <[email protected]>
    Acked-by: Arnd Bergmann <[email protected]>
    Cc: Arnd Bergmann <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
compiler_types: Move unused static inline functions warning to W=2 [+ + +]
Author: Peter Zijlstra <[email protected]>
Date:   Thu Nov 6 11:50:00 2025 +0100

    compiler_types: Move unused static inline functions warning to W=2
    
    [ Upstream commit 9818af18db4bfefd320d0fef41390a616365e6f7 ]
    
    Per Nathan, clang catches unused "static inline" functions in C files
    since commit 6863f5643dd7 ("kbuild: allow Clang to find unused static
    inline functions for W=1 build").
    
    Linus said:
    
    > So I entirely ignore W=1 issues, because I think so many of the extra
    > warnings are bogus.
    >
    > But if this one in particular is causing more problems than most -
    > some teams do seem to use W=1 as part of their test builds - it's fine
    > to send me a patch that just moves bad warnings to W=2.
    >
    > And if anybody uses W=2 for their test builds, that's THEIR problem..
    
    Here is the change to bump the warning from W=1 to W=2.
    
    Fixes: 6863f5643dd7 ("kbuild: allow Clang to find unused static inline functions for W=1 build")
    Signed-off-by: Peter Zijlstra <[email protected]>
    Signed-off-by: Andy Shevchenko <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    [nathan: Adjust comment as well]
    Signed-off-by: Nathan Chancellor <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
cpufreq/longhaul: handle NULL policy in longhaul_exit [+ + +]
Author: Dennis Beier <[email protected]>
Date:   Sat Aug 30 16:43:59 2025 +0200

    cpufreq/longhaul: handle NULL policy in longhaul_exit
    
    [ Upstream commit 592532a77b736b5153e0c2e4c74aa50af0a352ab ]
    
    longhaul_exit() was calling cpufreq_cpu_get(0) without checking
    for a NULL policy pointer. On some systems, this could lead to a
    NULL dereference and a kernel warning or panic.
    
    This patch adds a check using unlikely() and returns early if the
    policy is NULL.
    
    Bugzilla: #219962
    
    Signed-off-by: Dennis Beier <[email protected]>
    Signed-off-by: Viresh Kumar <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
devcoredump: Fix circular locking dependency with devcd->mutex. [+ + +]
Author: Maarten Lankhorst <[email protected]>
Date:   Mon Oct 27 09:56:54 2025 -0400

    devcoredump: Fix circular locking dependency with devcd->mutex.
    
    [ Upstream commit a91c8096590bd7801a26454789f2992094fe36da ]
    
    The original code causes a circular locking dependency found by lockdep.
    
    ======================================================
    WARNING: possible circular locking dependency detected
    6.16.0-rc6-lgci-xe-xe-pw-151626v3+ #1 Tainted: G S   U
    ------------------------------------------------------
    xe_fault_inject/5091 is trying to acquire lock:
    ffff888156815688 ((work_completion)(&(&devcd->del_wk)->work)){+.+.}-{0:0}, at: __flush_work+0x25d/0x660
    
    but task is already holding lock:
    
    ffff888156815620 (&devcd->mutex){+.+.}-{3:3}, at: dev_coredump_put+0x3f/0xa0
    which lock already depends on the new lock.
    the existing dependency chain (in reverse order) is:
    -> #2 (&devcd->mutex){+.+.}-{3:3}:
           mutex_lock_nested+0x4e/0xc0
           devcd_data_write+0x27/0x90
           sysfs_kf_bin_write+0x80/0xf0
           kernfs_fop_write_iter+0x169/0x220
           vfs_write+0x293/0x560
           ksys_write+0x72/0xf0
           __x64_sys_write+0x19/0x30
           x64_sys_call+0x2bf/0x2660
           do_syscall_64+0x93/0xb60
           entry_SYSCALL_64_after_hwframe+0x76/0x7e
    -> #1 (kn->active#236){++++}-{0:0}:
           kernfs_drain+0x1e2/0x200
           __kernfs_remove+0xae/0x400
           kernfs_remove_by_name_ns+0x5d/0xc0
           remove_files+0x54/0x70
           sysfs_remove_group+0x3d/0xa0
           sysfs_remove_groups+0x2e/0x60
           device_remove_attrs+0xc7/0x100
           device_del+0x15d/0x3b0
           devcd_del+0x19/0x30
           process_one_work+0x22b/0x6f0
           worker_thread+0x1e8/0x3d0
           kthread+0x11c/0x250
           ret_from_fork+0x26c/0x2e0
           ret_from_fork_asm+0x1a/0x30
    -> #0 ((work_completion)(&(&devcd->del_wk)->work)){+.+.}-{0:0}:
           __lock_acquire+0x1661/0x2860
           lock_acquire+0xc4/0x2f0
           __flush_work+0x27a/0x660
           flush_delayed_work+0x5d/0xa0
           dev_coredump_put+0x63/0xa0
           xe_driver_devcoredump_fini+0x12/0x20 [xe]
           devm_action_release+0x12/0x30
           release_nodes+0x3a/0x120
           devres_release_all+0x8a/0xd0
           device_unbind_cleanup+0x12/0x80
           device_release_driver_internal+0x23a/0x280
           device_driver_detach+0x14/0x20
           unbind_store+0xaf/0xc0
           drv_attr_store+0x21/0x50
           sysfs_kf_write+0x4a/0x80
           kernfs_fop_write_iter+0x169/0x220
           vfs_write+0x293/0x560
           ksys_write+0x72/0xf0
           __x64_sys_write+0x19/0x30
           x64_sys_call+0x2bf/0x2660
           do_syscall_64+0x93/0xb60
           entry_SYSCALL_64_after_hwframe+0x76/0x7e
    other info that might help us debug this:
    Chain exists of: (work_completion)(&(&devcd->del_wk)->work) --> kn->active#236 --> &devcd->mutex
     Possible unsafe locking scenario:
           CPU0                    CPU1
           ----                    ----
      lock(&devcd->mutex);
                                   lock(kn->active#236);
                                   lock(&devcd->mutex);
      lock((work_completion)(&(&devcd->del_wk)->work));
     *** DEADLOCK ***
    5 locks held by xe_fault_inject/5091:
     #0: ffff8881129f9488 (sb_writers#5){.+.+}-{0:0}, at: ksys_write+0x72/0xf0
     #1: ffff88810c755078 (&of->mutex#2){+.+.}-{3:3}, at: kernfs_fop_write_iter+0x123/0x220
     #2: ffff8881054811a0 (&dev->mutex){....}-{3:3}, at: device_release_driver_internal+0x55/0x280
     #3: ffff888156815620 (&devcd->mutex){+.+.}-{3:3}, at: dev_coredump_put+0x3f/0xa0
     #4: ffffffff8359e020 (rcu_read_lock){....}-{1:2}, at: __flush_work+0x72/0x660
    stack backtrace:
    CPU: 14 UID: 0 PID: 5091 Comm: xe_fault_inject Tainted: G S   U              6.16.0-rc6-lgci-xe-xe-pw-151626v3+ #1 PREEMPT_{RT,(lazy)}
    Tainted: [S]=CPU_OUT_OF_SPEC, [U]=USER
    Hardware name: Micro-Star International Co., Ltd. MS-7D25/PRO Z690-A DDR4(MS-7D25), BIOS 1.10 12/13/2021
    Call Trace:
     <TASK>
     dump_stack_lvl+0x91/0xf0
     dump_stack+0x10/0x20
     print_circular_bug+0x285/0x360
     check_noncircular+0x135/0x150
     ? register_lock_class+0x48/0x4a0
     __lock_acquire+0x1661/0x2860
     lock_acquire+0xc4/0x2f0
     ? __flush_work+0x25d/0x660
     ? mark_held_locks+0x46/0x90
     ? __flush_work+0x25d/0x660
     __flush_work+0x27a/0x660
     ? __flush_work+0x25d/0x660
     ? trace_hardirqs_on+0x1e/0xd0
     ? __pfx_wq_barrier_func+0x10/0x10
     flush_delayed_work+0x5d/0xa0
     dev_coredump_put+0x63/0xa0
     xe_driver_devcoredump_fini+0x12/0x20 [xe]
     devm_action_release+0x12/0x30
     release_nodes+0x3a/0x120
     devres_release_all+0x8a/0xd0
     device_unbind_cleanup+0x12/0x80
     device_release_driver_internal+0x23a/0x280
     ? bus_find_device+0xa8/0xe0
     device_driver_detach+0x14/0x20
     unbind_store+0xaf/0xc0
     drv_attr_store+0x21/0x50
     sysfs_kf_write+0x4a/0x80
     kernfs_fop_write_iter+0x169/0x220
     vfs_write+0x293/0x560
     ksys_write+0x72/0xf0
     __x64_sys_write+0x19/0x30
     x64_sys_call+0x2bf/0x2660
     do_syscall_64+0x93/0xb60
     ? __f_unlock_pos+0x15/0x20
     ? __x64_sys_getdents64+0x9b/0x130
     ? __pfx_filldir64+0x10/0x10
     ? do_syscall_64+0x1a2/0xb60
     ? clear_bhb_loop+0x30/0x80
     ? clear_bhb_loop+0x30/0x80
     entry_SYSCALL_64_after_hwframe+0x76/0x7e
    RIP: 0033:0x76e292edd574
    Code: c7 00 16 00 00 00 b8 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 80 3d d5 ea 0e 00 00 74 13 b8 01 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 54 c3 0f 1f 00 55 48 89 e5 48 83 ec 20 48 89
    RSP: 002b:00007fffe247a828 EFLAGS: 00000202 ORIG_RAX: 0000000000000001
    RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000076e292edd574
    RDX: 000000000000000c RSI: 00006267f6306063 RDI: 000000000000000b
    RBP: 000000000000000c R08: 000076e292fc4b20 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000202 R12: 00006267f6306063
    R13: 000000000000000b R14: 00006267e6859c00 R15: 000076e29322a000
     </TASK>
    xe 0000:03:00.0: [drm] Xe device coredump has been deleted.
    
    Fixes: 01daccf74832 ("devcoredump : Serialize devcd_del work")
    Cc: Mukesh Ojha <[email protected]>
    Cc: Greg Kroah-Hartman <[email protected]>
    Cc: Johannes Berg <[email protected]>
    Cc: Rafael J. Wysocki <[email protected]>
    Cc: Danilo Krummrich <[email protected]>
    Cc: [email protected]
    Cc: [email protected] # v6.1+
    Signed-off-by: Maarten Lankhorst <[email protected]>
    Cc: Matthew Brost <[email protected]>
    Acked-by: Mukesh Ojha <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    [ replaced disable_delayed_work_sync() with cancel_delayed_work_sync() ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
dmaengine: dw-edma: Set status for callback_result [+ + +]
Author: Devendra K Verma <[email protected]>
Date:   Thu Aug 21 17:45:05 2025 +0530

    dmaengine: dw-edma: Set status for callback_result
    
    [ Upstream commit 5e742de97c806a4048418237ef1283e7d71eaf4b ]
    
    DMA Engine has support for the callback_result which provides
    the status of the request and the residue. This helps in
    determining the correct status of the request and in
    efficient resource management of the request.
    The 'callback_result' method is preferred over the deprecated
    'callback' method.
    
    Signed-off-by: Devendra K Verma <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dmaengine: mv_xor: match alloc_wc and free_wc [+ + +]
Author: Rosen Penev <[email protected]>
Date:   Thu Aug 21 15:09:42 2025 -0700

    dmaengine: mv_xor: match alloc_wc and free_wc
    
    [ Upstream commit a33e3b667d2f004fdfae6b442bd4676f6c510abb ]
    
    dma_alloc_wc is used but not dma_free_wc.
    
    Signed-off-by: Rosen Penev <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

dmaengine: sh: setup_xref error handling [+ + +]
Author: Thomas Andreatta <[email protected]>
Date:   Wed Aug 27 17:24:43 2025 +0200

    dmaengine: sh: setup_xref error handling
    
    [ Upstream commit d9a3e9929452780df16f3414f0d59b5f69d058cf ]
    
    This patch modifies the type of setup_xref from void to int and handles
    errors since the function can fail.
    
    `setup_xref` now returns the (eventual) error from
    `dmae_set_dmars`|`dmae_set_chcr`, while `shdma_tx_submit` handles the
    result, removing the chunks from the queue and marking PM as idle in
    case of an error.
    
    Signed-off-by: Thomas Andreatta <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/amdkfd: return -ENOTTY for unsupported IOCTLs [+ + +]
Author: Geoffrey McRae <[email protected]>
Date:   Tue Jul 8 13:53:40 2025 +1000

    drm/amdkfd: return -ENOTTY for unsupported IOCTLs
    
    [ Upstream commit 57af162bfc8c05332a28c4d458d246cc46d2746d ]
    
    Some kfd ioctls may not be available depending on the kernel version the
    user is running, as such we need to report -ENOTTY so userland can
    determine the cause of the ioctl failure.
    
    Signed-off-by: Geoffrey McRae <[email protected]>
    Acked-by: Alex Deucher <[email protected]>
    Reviewed-by: Felix Kuehling <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

drm/amdkfd: Tie UNMAP_LATENCY to queue_preemption [+ + +]
Author: Amber Lin <[email protected]>
Date:   Fri Aug 15 14:04:15 2025 -0400

    drm/amdkfd: Tie UNMAP_LATENCY to queue_preemption
    
    [ Upstream commit f3820e9d356132e18405cd7606e22dc87ccfa6d1 ]
    
    When KFD asks CP to preempt queues, other than preempt CP queues, CP
    also requests SDMA to preempt SDMA queues with UNMAP_LATENCY timeout.
    Currently queue_preemption_timeout_ms is 9000 ms by default but can be
    configured via module parameter. KFD_UNMAP_LATENCY_MS is hard coded as
    4000 ms though. This patch ties KFD_UNMAP_LATENCY_MS to
    queue_preemption_timeout_ms so in a slow system such as emulator, both
    CP and SDMA slowness are taken into account.
    
    Signed-off-by: Amber Lin <[email protected]>
    Reviewed-by: Harish Kasiviswanathan <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/etnaviv: fix flush sequence logic [+ + +]
Author: Tomeu Vizoso <[email protected]>
Date:   Tue Oct 21 11:37:23 2025 +0200

    drm/etnaviv: fix flush sequence logic
    
    [ Upstream commit a042beac6e6f8ac1e923784cfff98b47cbabb185 ]
    
    The current logic uses the flush sequence from the current address
    space. This is harmless when deducing the flush requirements for the
    current submit, as either the incoming address space is the same one
    as the currently active one or we switch context, in which case the
    flush is unconditional.
    
    However, this sequence is also stored as the current flush sequence
    of the GPU. If we switch context the stored flush sequence will no
    longer belong to the currently active address space. This incoherency
    can then cause missed flushes, resulting in translation errors.
    
    Fixes: 27b67278e007 ("drm/etnaviv: rework MMU handling")
    Signed-off-by: Tomeu Vizoso <[email protected]>
    Signed-off-by: Lucas Stach <[email protected]>
    Reviewed-by: Christian Gmeiner <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/nouveau: replace snprintf() with scnprintf() in nvkm_snprintbf() [+ + +]
Author: Seyediman Seyedarab <[email protected]>
Date:   Thu Jul 24 15:59:13 2025 -0400

    drm/nouveau: replace snprintf() with scnprintf() in nvkm_snprintbf()
    
    [ Upstream commit 6510b62fe9303aaf48ff136ff69186bcfc32172d ]
    
    snprintf() returns the number of characters that *would* have been
    written, which can overestimate how much you actually wrote to the
    buffer in case of truncation. That leads to 'data += this' advancing
    the pointer past the end of the buffer and size going negative.
    
    Switching to scnprintf() prevents potential buffer overflows and ensures
    consistent behavior when building the output string.
    
    Signed-off-by: Seyediman Seyedarab <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Danilo Krummrich <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/vmwgfx: Validate command header size against SVGA_CMD_MAX_DATASIZE [+ + +]
Author: Ian Forbes <[email protected]>
Date:   Tue Oct 21 14:01:28 2025 -0500

    drm/vmwgfx: Validate command header size against SVGA_CMD_MAX_DATASIZE
    
    [ Upstream commit 32b415a9dc2c212e809b7ebc2b14bc3fbda2b9af ]
    
    This data originates from userspace and is used in buffer offset
    calculations which could potentially overflow causing an out-of-bounds
    access.
    
    Fixes: 8ce75f8ab904 ("drm/vmwgfx: Update device includes for DX device functionality")
    Reported-by: Rohit Keshri <[email protected]>
    Signed-off-by: Ian Forbes <[email protected]>
    Reviewed-by: Maaz Mombasawala <[email protected]>
    Signed-off-by: Zack Rusin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
EDAC/altera: Handle OCRAM ECC enable after warm reset [+ + +]
Author: Niravkumar L Rabara <[email protected]>
Date:   Tue Nov 11 16:08:01 2025 +0800

    EDAC/altera: Handle OCRAM ECC enable after warm reset
    
    commit fd3ecda38fe0cb713d167b5477d25f6b350f0514 upstream.
    
    The OCRAM ECC is always enabled either by the BootROM or by the Secure Device
    Manager (SDM) during a power-on reset on SoCFPGA.
    
    However, during a warm reset, the OCRAM content is retained to preserve data,
    while the control and status registers are reset to their default values. As
    a result, ECC must be explicitly re-enabled after a warm reset.
    
    Fixes: 17e47dc6db4f ("EDAC/altera: Add Stratix10 OCRAM ECC support")
    Signed-off-by: Niravkumar L Rabara <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Acked-by: Dinh Nguyen <[email protected]>
    Cc: [email protected]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

EDAC/altera: Use INTTEST register for Ethernet and USB SBE injection [+ + +]
Author: Niravkumar L Rabara <[email protected]>
Date:   Tue Nov 11 16:13:33 2025 +0800

    EDAC/altera: Use INTTEST register for Ethernet and USB SBE injection
    
    commit 281326be67252ac5794d1383f67526606b1d6b13 upstream.
    
    The current single-bit error injection mechanism flips bits directly in ECC RAM
    by performing write and read operations. When the ECC RAM is actively used by
    the Ethernet or USB controller, this approach sometimes trigger a false
    double-bit error.
    
    Switch both Ethernet and USB EDAC devices to use the INTTEST register
    (altr_edac_a10_device_inject_fops) for single-bit error injection, similar to
    the existing double-bit error injection method.
    
    Fixes: 064acbd4f4ab ("EDAC, altera: Add Stratix10 peripheral support")
    Signed-off-by: Niravkumar L Rabara <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Acked-by: Dinh Nguyen <[email protected]>
    Cc: [email protected]
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
extcon: adc-jack: Cleanup wakeup source only if it was enabled [+ + +]
Author: Krzysztof Kozlowski <[email protected]>
Date:   Fri May 9 09:17:04 2025 +0200

    extcon: adc-jack: Cleanup wakeup source only if it was enabled
    
    commit 92bac7d4de9c07933f6b76d8f1c7f8240f911f4f upstream.
    
    Driver in the probe enables wakeup source conditionally, so the cleanup
    path should do the same - do not release the wakeup source memory if it
    was not allocated.
    
    Link: https://lore.kernel.org/lkml/[email protected]/
    Reported-by: Christophe JAILLET <[email protected]>
    Closes: https://lore.kernel.org/r/[email protected]/
    Fixes: 78b6a991eb6c ("extcon: adc-jack: Fix wakeup source leaks on device unbind")
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Chanwoo Choi <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

extcon: adc-jack: Fix wakeup source leaks on device unbind [+ + +]
Author: Krzysztof Kozlowski <[email protected]>
Date:   Thu May 1 16:33:21 2025 +0200

    extcon: adc-jack: Fix wakeup source leaks on device unbind
    
    [ Upstream commit 78b6a991eb6c6f19ed7d0ac91cda3b3b117fda8f ]
    
    Device can be unbound, so driver must also release memory for the wakeup
    source.  Do not use devm interface, because it would change the order of
    cleanup.
    
    Link: https://lore.kernel.org/lkml/[email protected]/
    Acked-by: MyungJoo Ham <[email protected]>
    Signed-off-by: Krzysztof Kozlowski <[email protected]>
    Signed-off-by: Chanwoo Choi <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
fbdev: Add bounds checking in bit_putcs to fix vmalloc-out-of-bounds [+ + +]
Author: Albin Babu Varghese <[email protected]>
Date:   Fri Oct 3 03:32:09 2025 -0400

    fbdev: Add bounds checking in bit_putcs to fix vmalloc-out-of-bounds
    
    [ Upstream commit 3637d34b35b287ab830e66048841ace404382b67 ]
    
    Add bounds checking to prevent writes past framebuffer boundaries when
    rendering text near screen edges. Return early if the Y position is off-screen
    and clip image height to screen boundary. Break from the rendering loop if the
    X position is off-screen. When clipping image width to fit the screen, update
    the character count to match the clipped width to prevent buffer size
    mismatches.
    
    Without the character count update, bit_putcs_aligned and bit_putcs_unaligned
    receive mismatched parameters where the buffer is allocated for the clipped
    width but cnt reflects the original larger count, causing out-of-bounds writes.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=48b0652a95834717f190
    Suggested-by: Helge Deller <[email protected]>
    Tested-by: [email protected]
    Signed-off-by: Albin Babu Varghese <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

fbdev: atyfb: Check if pll_ops->init_pll failed [+ + +]
Author: Daniel Palmer <[email protected]>
Date:   Fri Oct 24 18:37:15 2025 +0900

    fbdev: atyfb: Check if pll_ops->init_pll failed
    
    commit 7073c7fc8d8ba47194e5fc58fcafc0efe7586e9b upstream.
    
    Actually check the return value from pll_ops->init_pll()
    as it can return an error.
    
    If the card's BIOS didn't run because it's not the primary VGA card
    the fact that the xclk source is unsupported is printed as shown
    below but the driver continues on regardless and on my machine causes
    a hard lock up.
    
    [   61.470088] atyfb 0000:03:05.0: enabling device (0080 -> 0083)
    [   61.476191] atyfb: using auxiliary register aperture
    [   61.481239] atyfb: 3D RAGE XL (Mach64 GR, PCI-33) [0x4752 rev 0x27]
    [   61.487569] atyfb: 512K SGRAM (1:1), 14.31818 MHz XTAL, 230 MHz PLL, 83 Mhz MCLK, 63 MHz XCLK
    [   61.496112] atyfb: Unsupported xclk source:  5.
    
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Daniel Palmer <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

fbdev: bitblit: bound-check glyph index in bit_putcs* [+ + +]
Author: Junjie Cao <[email protected]>
Date:   Mon Oct 20 21:47:01 2025 +0800

    fbdev: bitblit: bound-check glyph index in bit_putcs*
    
    commit 18c4ef4e765a798b47980555ed665d78b71aeadf upstream.
    
    bit_putcs_aligned()/unaligned() derived the glyph pointer from the
    character value masked by 0xff/0x1ff, which may exceed the actual font's
    glyph count and read past the end of the built-in font array.
    Clamp the index to the actual glyph count before computing the address.
    
    This fixes a global out-of-bounds read reported by syzbot.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=793cf822d213be1a74f2
    Tested-by: [email protected]
    Signed-off-by: Junjie Cao <[email protected]>
    Reviewed-by: Thomas Zimmermann <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

fbdev: pvr2fb: Fix leftover reference to ONCHIP_NR_DMA_CHANNELS [+ + +]
Author: Florian Fuchs <[email protected]>
Date:   Sun Oct 26 00:38:50 2025 +0200

    fbdev: pvr2fb: Fix leftover reference to ONCHIP_NR_DMA_CHANNELS
    
    commit 5f566c0ac51cd2474e47da68dbe719d3acf7d999 upstream.
    
    Commit e24cca19babe ("sh: Kill off MAX_DMA_ADDRESS leftovers.") removed
    the define ONCHIP_NR_DMA_CHANNELS. So that the leftover reference needs
    to be replaced by CONFIG_NR_ONCHIP_DMA_CHANNELS to compile successfully
    with CONFIG_PVR2_DMA enabled.
    
    Signed-off-by: Florian Fuchs <[email protected]>
    Reviewed-by: John Paul Adrian Glaubitz <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

fbdev: valkyriefb: Fix reference count leak in valkyriefb_init [+ + +]
Author: Miaoqian Lin <[email protected]>
Date:   Mon Oct 27 16:43:37 2025 +0800

    fbdev: valkyriefb: Fix reference count leak in valkyriefb_init
    
    commit eb53368f8d6e2dfba84c8a94d245719bcf9ae270 upstream.
    
    The of_find_node_by_name() function returns a device tree node with its
    reference count incremented. The caller is responsible for calling
    of_node_put() to release this reference when done.
    
    Found via static analysis.
    
    Fixes: cc5d0189b9ba ("[PATCH] powerpc: Remove device_node addrs/n_addr")
    Cc: [email protected]
    Signed-off-by: Miaoqian Lin <[email protected]>
    Signed-off-by: Helge Deller <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
fs/hpfs: Fix error code for new_inode() failure in mkdir/create/mknod/symlink [+ + +]
Author: Yikang Yue <[email protected]>
Date:   Sat May 3 20:44:34 2025 -0500

    fs/hpfs: Fix error code for new_inode() failure in mkdir/create/mknod/symlink
    
    [ Upstream commit 32058c38d3b79a28963a59ac0353644dc24775cd ]
    
    The function call new_inode() is a primitive for allocating an inode in memory,
    rather than planning disk space for it. Therefore, -ENOMEM should be returned
    as the error code rather than -ENOSPC.
    
    To be specific, new_inode()'s call path looks like this:
    new_inode
      new_inode_pseudo
        alloc_inode
          ops->alloc_inode (hpfs_alloc_inode)
            alloc_inode_sb
              kmem_cache_alloc_lru
    
    Therefore, the failure of new_inode() indicates a memory presure issue (-ENOMEM),
    not a lack of disk space. However, the current implementation of
    hpfs_mkdir/create/mknod/symlink incorrectly returns -ENOSPC when new_inode() fails.
    This patch fix this by set err to -ENOMEM before the goto statement.
    
    BTW, we also noticed that other nested calls within these four functions,
    like hpfs_alloc_f/dnode and hpfs_add_dirent, might also fail due to memory presure.
    But similarly, only -ENOSPC is returned. Addressing these will involve code
    modifications in other functions, and we plan to submit dedicated patches for these
    issues in the future. For this patch, we focus on new_inode().
    
    Signed-off-by: Yikang Yue <[email protected]>
    Signed-off-by: Mikulas Patocka <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
fs/proc: fix uaf in proc_readdir_de() [+ + +]
Author: Wei Yang <[email protected]>
Date:   Thu Nov 20 15:23:17 2025 -0500

    fs/proc: fix uaf in proc_readdir_de()
    
    [ Upstream commit 895b4c0c79b092d732544011c3cecaf7322c36a1 ]
    
    Pde is erased from subdir rbtree through rb_erase(), but not set the node
    to EMPTY, which may result in uaf access.  We should use RB_CLEAR_NODE()
    set the erased node to EMPTY, then pde_subdir_next() will return NULL to
    avoid uaf access.
    
    We found an uaf issue while using stress-ng testing, need to run testcase
    getdent and tun in the same time.  The steps of the issue is as follows:
    
    1) use getdent to traverse dir /proc/pid/net/dev_snmp6/, and current
       pde is tun3;
    
    2) in the [time windows] unregister netdevice tun3 and tun2, and erase
       them from rbtree.  erase tun3 first, and then erase tun2.  the
       pde(tun2) will be released to slab;
    
    3) continue to getdent process, then pde_subdir_next() will return
       pde(tun2) which is released, it will case uaf access.
    
    CPU 0                                      |    CPU 1
    -------------------------------------------------------------------------
    traverse dir /proc/pid/net/dev_snmp6/      |   unregister_netdevice(tun->dev)   //tun3 tun2
    sys_getdents64()                           |
      iterate_dir()                            |
        proc_readdir()                         |
          proc_readdir_de()                    |     snmp6_unregister_dev()
            pde_get(de);                       |       proc_remove()
            read_unlock(&proc_subdir_lock);    |         remove_proc_subtree()
                                               |           write_lock(&proc_subdir_lock);
            [time window]                      |           rb_erase(&root->subdir_node, &parent->subdir);
                                               |           write_unlock(&proc_subdir_lock);
            read_lock(&proc_subdir_lock);      |
            next = pde_subdir_next(de);        |
            pde_put(de);                       |
            de = next;    //UAF                |
    
    rbtree of dev_snmp6
                            |
                        pde(tun3)
                         /    \
                      NULL  pde(tun2)
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Wei Yang <[email protected]>
    Cc: Al Viro <[email protected]>
    Cc: Christian Brauner <[email protected]>
    Cc: wangzijie <[email protected]>
    Cc: Alexey Dobriyan <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
gcov: add support for GCC 15 [+ + +]
Author: Peter Oberparleiter <[email protected]>
Date:   Tue Oct 28 12:51:25 2025 +0100

    gcov: add support for GCC 15
    
    commit ec4d11fc4b2dd4a2fa8c9d801ee9753b74623554 upstream.
    
    Using gcov on kernels compiled with GCC 15 results in truncated 16-byte
    long .gcda files with no usable data.  To fix this, update GCOV_COUNTERS
    to match the value defined by GCC 15.
    
    Tested with GCC 14.3.0 and GCC 15.2.0.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Signed-off-by: Peter Oberparleiter <[email protected]>
    Reported-by: Matthieu Baerts <[email protected]>
    Closes: https://github.com/linux-test-project/lcov/issues/445
    Tested-by: Matthieu Baerts <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
HID: quirks: avoid Cooler Master MM712 dongle wakeup bug [+ + +]
Author: Tristan Lobb <[email protected]>
Date:   Sun Sep 28 18:25:43 2025 +0200

    HID: quirks: avoid Cooler Master MM712 dongle wakeup bug
    
    [ Upstream commit 0be4253bf878d9aaa2b96031ac8683fceeb81480 ]
    
    The Cooler Master Mice Dongle includes a vendor defined HID interface
    alongside its mouse interface. Not polling it will cause the mouse to
    stop responding to polls on any interface once woken up again after
    going into power saving mode.
    
    Add the HID_QUIRK_ALWAYS_POLL quirk alongside the Cooler Master VID and
    the Dongle's PID.
    
    Signed-off-by: Tristan Lobb <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

HID: quirks: work around VID/PID conflict for 0x4c4a/0x4155 [+ + +]
Author: Zhang Heng <[email protected]>
Date:   Fri Sep 12 20:38:18 2025 +0800

    HID: quirks: work around VID/PID conflict for 0x4c4a/0x4155
    
    commit beab067dbcff642243291fd528355d64c41dc3b2 upstream.
    
    Based on available evidence, the USB ID 4c4a:4155 used by multiple
    devices has been attributed to Jieli. The commit 1a8953f4f774
    ("HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY") affected touchscreen
    functionality. Added checks for manufacturer and serial number to
    maintain microphone compatibility, enabling both devices to function
    properly.
    
    [[email protected]: edit shortlog]
    Fixes: 1a8953f4f774 ("HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY")
    Cc: [email protected]
    Tested-by: [email protected]
    Reviewed-by: Terry Junge <[email protected]>
    Signed-off-by: Zhang Heng <[email protected]>
    Signed-off-by: Jiri Kosina <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
hwmon: (dell-smm) Add support for Dell OptiPlex 7040 [+ + +]
Author: Armin Wolf <[email protected]>
Date:   Wed Sep 17 20:10:36 2025 +0200

    hwmon: (dell-smm) Add support for Dell OptiPlex 7040
    
    [ Upstream commit 53d3bd48ef6ff1567a75ca77728968f5ab493cb4 ]
    
    The Dell OptiPlex 7040 supports the legacy SMM interface for reading
    sensors and performing fan control. Whitelist this machine so that
    this driver loads automatically.
    
    Closes: https://github.com/Wer-Wolf/i8kutils/issues/15
    Signed-off-by: Armin Wolf <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Guenter Roeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register [+ + +]
Author: Rodrigo Gobbi <[email protected]>
Date:   Thu Jul 17 19:13:49 2025 -0300

    iio: adc: spear_adc: mask SPEAR_ADC_STATUS channel and avg sample before setting register
    
    [ Upstream commit d75c7021c08e8ae3f311ef2464dca0eaf75fab9f ]
    
    avg sample info is a bit field coded inside the following
    bits: 5,6,7 and 8 of a device status register.
    
    Channel num info the same, but over bits: 1, 2 and 3.
    
    Mask both values in order to avoid touching other register bits,
    since the first info (avg sample), came from DT.
    
    Signed-off-by: Rodrigo Gobbi <[email protected]>
    Reviewed-by: David Lechner <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Input: cros_ec_keyb - fix an invalid memory access [+ + +]
Author: Tzung-Bi Shih <[email protected]>
Date:   Tue Nov 4 07:03:10 2025 +0000

    Input: cros_ec_keyb - fix an invalid memory access
    
    commit e08969c4d65ac31297fcb4d31d4808c789152f68 upstream.
    
    If cros_ec_keyb_register_matrix() isn't called (due to
    `buttons_switches_only`) in cros_ec_keyb_probe(), `ckdev->idev` remains
    NULL.  An invalid memory access is observed in cros_ec_keyb_process()
    when receiving an EC_MKBP_EVENT_KEY_MATRIX event in cros_ec_keyb_work()
    in such case.
    
      Unable to handle kernel read from unreadable memory at virtual address 0000000000000028
      ...
      x3 : 0000000000000000 x2 : 0000000000000000
      x1 : 0000000000000000 x0 : 0000000000000000
      Call trace:
      input_event
      cros_ec_keyb_work
      blocking_notifier_call_chain
      ec_irq_thread
    
    It's still unknown about why the kernel receives such malformed event,
    in any cases, the kernel shouldn't access `ckdev->idev` and friends if
    the driver doesn't intend to initialize them.
    
    Signed-off-by: Tzung-Bi Shih <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: pegasus-notetaker - fix potential out-of-bounds access [+ + +]
Author: Seungjin Bae <[email protected]>
Date:   Mon Nov 24 14:20:46 2025 -0500

    Input: pegasus-notetaker - fix potential out-of-bounds access
    
    [ Upstream commit 69aeb507312306f73495598a055293fa749d454e ]
    
    In the pegasus_notetaker driver, the pegasus_probe() function allocates
    the URB transfer buffer using the wMaxPacketSize value from
    the endpoint descriptor. An attacker can use a malicious USB descriptor
    to force the allocation of a very small buffer.
    
    Subsequently, if the device sends an interrupt packet with a specific
    pattern (e.g., where the first byte is 0x80 or 0x42),
    the pegasus_parse_packet() function parses the packet without checking
    the allocated buffer size. This leads to an out-of-bounds memory access.
    
    Fixes: 1afca2b66aac ("Input: add Pegasus Notetaker tablet driver")
    Signed-off-by: Seungjin Bae <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: remove third argument of usb_maxpacket() [+ + +]
Author: Vincent Mailhol <[email protected]>
Date:   Mon Nov 24 14:20:45 2025 -0500

    Input: remove third argument of usb_maxpacket()
    
    [ Upstream commit 948bf187694fc1f4c20cf972fa18b1a6fb3d7603 ]
    
    The third argument of usb_maxpacket(): in_out has been deprecated
    because it could be derived from the second argument (e.g. using
    usb_pipeout(pipe)).
    
    N.B. function usb_maxpacket() was made variadic to accommodate the
    transition from the old prototype with three arguments to the new one
    with only two arguments (so that no renaming is needed). The variadic
    argument is to be removed once all users of usb_maxpacket() get
    migrated.
    
    CC: Ville Syrjala <[email protected]>
    CC: Dmitry Torokhov <[email protected]>
    CC: Henk Vergonet <[email protected]>
    Signed-off-by: Vincent Mailhol <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Stable-dep-of: 69aeb5073123 ("Input: pegasus-notetaker - fix potential out-of-bounds access")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ipv4: route: Prevent rt_bind_exception() from rebinding stale fnhe [+ + +]
Author: Chuang Wang <[email protected]>
Date:   Tue Nov 11 14:43:24 2025 +0800

    ipv4: route: Prevent rt_bind_exception() from rebinding stale fnhe
    
    commit ac1499fcd40fe06479e9b933347b837ccabc2a40 upstream.
    
    The sit driver's packet transmission path calls: sit_tunnel_xmit() ->
    update_or_create_fnhe(), which lead to fnhe_remove_oldest() being called
    to delete entries exceeding FNHE_RECLAIM_DEPTH+random.
    
    The race window is between fnhe_remove_oldest() selecting fnheX for
    deletion and the subsequent kfree_rcu(). During this time, the
    concurrent path's __mkroute_output() -> find_exception() can fetch the
    soon-to-be-deleted fnheX, and rt_bind_exception() then binds it with a
    new dst using a dst_hold(). When the original fnheX is freed via RCU,
    the dst reference remains permanently leaked.
    
    CPU 0                             CPU 1
    __mkroute_output()
      find_exception() [fnheX]
                                      update_or_create_fnhe()
                                        fnhe_remove_oldest() [fnheX]
      rt_bind_exception() [bind dst]
                                      RCU callback [fnheX freed, dst leak]
    
    This issue manifests as a device reference count leak and a warning in
    dmesg when unregistering the net device:
    
      unregister_netdevice: waiting for sitX to become free. Usage count = N
    
    Ido Schimmel provided the simple test validation method [1].
    
    The fix clears 'oldest->fnhe_daddr' before calling fnhe_flush_routes().
    Since rt_bind_exception() checks this field, setting it to zero prevents
    the stale fnhe from being reused and bound to a new dst just before it
    is freed.
    
    [1]
    ip netns add ns1
    ip -n ns1 link set dev lo up
    ip -n ns1 address add 192.0.2.1/32 dev lo
    ip -n ns1 link add name dummy1 up type dummy
    ip -n ns1 route add 192.0.2.2/32 dev dummy1
    ip -n ns1 link add name gretap1 up arp off type gretap \
        local 192.0.2.1 remote 192.0.2.2
    ip -n ns1 route add 198.51.0.0/16 dev gretap1
    taskset -c 0 ip netns exec ns1 mausezahn gretap1 \
        -A 198.51.100.1 -B 198.51.0.0/16 -t udp -p 1000 -c 0 -q &
    taskset -c 2 ip netns exec ns1 mausezahn gretap1 \
        -A 198.51.100.1 -B 198.51.0.0/16 -t udp -p 1000 -c 0 -q &
    sleep 10
    ip netns pids ns1 | xargs kill
    ip netns del ns1
    
    Cc: [email protected]
    Fixes: 67d6d681e15b ("ipv4: make exception cache less predictible")
    Signed-off-by: Chuang Wang <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
ipv6: np->rxpmtu race annotation [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Tue Sep 16 16:09:44 2025 +0000

    ipv6: np->rxpmtu race annotation
    
    [ Upstream commit 9fba1eb39e2f74d2002c5cbcf1d4435d37a4f752 ]
    
    Add READ_ONCE() annotations because np->rxpmtu can be changed
    while udpv6_recvmsg() and rawv6_recvmsg() read it.
    
    Since this is a very rarely used feature, and that udpv6_recvmsg()
    and rawv6_recvmsg() read np->rxopt anyway, change the test order
    so that np->rxpmtu does not need to be in a hot cache line.
    
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Willem de Bruijn <[email protected]>
    Reviewed-by: David Ahern <[email protected]>
    Reviewed-by: Kuniyuki Iwashima <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Reviewed-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
irqchip/gic-v2m: Handle Multiple MSI base IRQ Alignment [+ + +]
Author: Christian Bruel <[email protected]>
Date:   Tue Sep 2 11:10:45 2025 +0200

    irqchip/gic-v2m: Handle Multiple MSI base IRQ Alignment
    
    [ Upstream commit 2ef3886ce626dcdab0cbc452dbbebc19f57133d8 ]
    
    The PCI Local Bus Specification 3.0 (section 6.8.1.6) allows modifying the
    low-order bits of the MSI Message DATA register to encode nr_irqs interrupt
    numbers in the log2(nr_irqs) bits for the domain.
    
    The problem arises if the base vector (GICV2m base spi) is not aligned with
    nr_irqs; in this case, the low-order log2(nr_irqs) bits from the base
    vector conflict with the nr_irqs masking, causing the wrong MSI interrupt
    to be identified.
    
    To fix this, use bitmap_find_next_zero_area_off() instead of
    bitmap_find_free_region() to align the initial base vector with nr_irqs.
    
    Signed-off-by: Christian Bruel <[email protected]>
    Signed-off-by: Thomas Gleixner <[email protected]>
    Reviewed-by: Marc Zyngier <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe() [+ + +]
Author: Abdun Nihaal <[email protected]>
Date:   Thu Oct 30 09:55:22 2025 +0530

    isdn: mISDN: hfcsusb: fix memory leak in hfcsusb_probe()
    
    commit 3f978e3f1570155a1327ffa25f60968bc7b9398f upstream.
    
    In hfcsusb_probe(), the memory allocated for ctrl_urb gets leaked when
    setup_instance() fails with an error code. Fix that by freeing the urb
    before freeing the hw structure. Also change the error paths to use the
    goto ladder style.
    
    Compile tested only. Issue found using a prototype static analysis tool.
    
    Fixes: 69f52adb2d53 ("mISDN: Add HFC USB driver")
    Signed-off-by: Abdun Nihaal <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
jfs: fix uninitialized waitqueue in transaction manager [+ + +]
Author: Shaurya Rane <[email protected]>
Date:   Mon Aug 25 01:43:32 2025 +0530

    jfs: fix uninitialized waitqueue in transaction manager
    
    [ Upstream commit 300b072df72694ea330c4c673c035253e07827b8 ]
    
    The transaction manager initialization in txInit() was not properly
    initializing TxBlock[0].waitor waitqueue, causing a crash when
    txEnd(0) is called on read-only filesystems.
    
    When a filesystem is mounted read-only, txBegin() returns tid=0 to
    indicate no transaction. However, txEnd(0) still gets called and
    tries to access TxBlock[0].waitor via tid_to_tblock(0), but this
    waitqueue was never initialized because the initialization loop
    started at index 1 instead of 0.
    
    This causes a 'non-static key' lockdep warning and system crash:
      INFO: trying to register non-static key in txEnd
    
    Fix by ensuring all transaction blocks including TxBlock[0] have
    their waitqueues properly initialized during txInit().
    
    Reported-by: [email protected]
    
    Signed-off-by: Shaurya Rane <[email protected]>
    Signed-off-by: Dave Kleikamp <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

jfs: Verify inode mode when loading from disk [+ + +]
Author: Tetsuo Handa <[email protected]>
Date:   Fri Sep 12 23:18:44 2025 +0900

    jfs: Verify inode mode when loading from disk
    
    [ Upstream commit 7a5aa54fba2bd591b22b9b624e6baa9037276986 ]
    
    The inode mode loaded from corrupted disk can be invalid. Do like what
    commit 0a9e74051313 ("isofs: Verify inode mode when loading from disk")
    does.
    
    Reported-by: syzbot <[email protected]>
    Closes: https://syzkaller.appspot.com/bug?extid=895c23f6917da440ed0d
    Signed-off-by: Tetsuo Handa <[email protected]>
    Signed-off-by: Dave Kleikamp <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
kconfig/mconf: Initialize the default locale at startup [+ + +]
Author: Jakub Horký <[email protected]>
Date:   Tue Oct 14 17:49:32 2025 +0200

    kconfig/mconf: Initialize the default locale at startup
    
    [ Upstream commit 3927c4a1084c48ef97f11281a0a43ecb2cb4d6f1 ]
    
    Fix bug where make menuconfig doesn't initialize the default locale, which
    causes ncurses menu borders to be displayed incorrectly (lqqqqk) in
    UTF-8 terminals that don't support VT100 ACS by default, such as PuTTY.
    
    Signed-off-by: Jakub Horký <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    [nathan: Alphabetize locale.h include]
    Signed-off-by: Nathan Chancellor <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
kconfig/nconf: Initialize the default locale at startup [+ + +]
Author: Jakub Horký <[email protected]>
Date:   Tue Oct 14 16:44:06 2025 +0200

    kconfig/nconf: Initialize the default locale at startup
    
    [ Upstream commit 43c2931a95e6b295bfe9e3b90dbe0f7596933e91 ]
    
    Fix bug where make nconfig doesn't initialize the default locale, which
    causes ncurses menu borders to be displayed incorrectly (lqqqqk) in
    UTF-8 terminals that don't support VT100 ACS by default, such as PuTTY.
    
    Signed-off-by: Jakub Horký <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    [nathan: Alphabetize locale.h include]
    Signed-off-by: Nathan Chancellor <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
Linux: Linux 5.4.302 [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Wed Dec 3 12:45:22 2025 +0100

    Linux 5.4.302
    
    Last release of the 5.4.y branch.
    
    This branch is now end-of-life, do not use anymore, please move to a
    newer kernel release.  As of this point in time, there are over 1500
    known unfixed CVEs for this branch, and that number will only increase
    over time.
    
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Brett A C Sheffield <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Slade Watkins <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Brett A C Sheffield <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Alok Tiwari <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Brett A C Sheffield <[email protected]>
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Pavel Machek (CIP) <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
media: fix uninitialized symbol warnings [+ + +]
Author: Chelsy Ratnawat <[email protected]>
Date:   Wed Aug 6 23:09:36 2025 -0700

    media: fix uninitialized symbol warnings
    
    [ Upstream commit b4c441310c3baaa7c39a5457e305ca93c7a0400d ]
    
    Initialize variables to fix these smatch warnings
    drivers/media/i2c/ir-kbd-i2c.c:339 ir_key_poll() error: uninitialized
    symbol 'protocol'.
    drivers/media/i2c/ir-kbd-i2c.c:339 ir_key_poll() error: uninitialized
    symbol 'scancode'.
    drivers/media/i2c/ir-kbd-i2c.c:339 ir_key_poll() error: uninitialized
    symbol 'toggle'.
    drivers/media/tuners/xc4000.c:1102 xc_debug_dump() error: uninitialized
    symbol 'adc_envelope'.
    drivers/media/tuners/xc4000.c:1108 xc_debug_dump() error: uninitialized
    symbol 'lock_status'.
    drivers/media/tuners/xc4000.c:1123 xc_debug_dump() error: uninitialized
    symbol 'frame_lines'.
    drivers/media/tuners/xc4000.c:1127 xc_debug_dump() error: uninitialized
    symbol 'quality'.
    drivers/media/tuners/xc5000.c:645 xc_debug_dump() error: uninitialized
    symbol 'adc_envelope'.
    drivers/media/tuners/xc5000.c:651 xc_debug_dump() error: uninitialized
    symbol 'lock_status'.
    drivers/media/tuners/xc5000.c:665 xc_debug_dump() error: uninitialized
    symbol 'frame_lines'.
    drivers/media/tuners/xc5000.c:668 xc_debug_dump() error: uninitialized
    symbol 'quality'.
    drivers/media/tuners/xc5000.c:671 xc_debug_dump() error: uninitialized
    symbol 'snr'.
    drivers/media/tuners/xc5000.c:674 xc_debug_dump() error: uninitialized
    symbol 'totalgain'.
    
    Signed-off-by: Chelsy Ratnawat <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    [hverkuil: dropped ' = 0' from rc in ir-kbd-i2c.c, not needed]
    Signed-off-by: Sasha Levin <[email protected]>

media: imon: make send_packet() more robust [+ + +]
Author: Tetsuo Handa <[email protected]>
Date:   Thu Jul 17 23:21:55 2025 +0900

    media: imon: make send_packet() more robust
    
    [ Upstream commit eecd203ada43a4693ce6fdd3a58ae10c7819252c ]
    
    syzbot is reporting that imon has three problems which result in
    hung tasks due to forever holding device lock [1].
    
    First problem is that when usb_rx_callback_intf0() once got -EPROTO error
    after ictx->dev_present_intf0 became true, usb_rx_callback_intf0()
    resubmits urb after printk(), and resubmitted urb causes
    usb_rx_callback_intf0() to again get -EPROTO error. This results in
    printk() flooding (RCU stalls).
    
    Alan Stern commented [2] that
    
      In theory it's okay to resubmit _if_ the driver has a robust
      error-recovery scheme (such as giving up after some fixed limit on the
      number of errors or after some fixed time has elapsed, perhaps with a
      time delay to prevent a flood of errors).  Most drivers don't bother to
      do this; they simply give up right away.  This makes them more
      vulnerable to short-term noise interference during USB transfers, but in
      reality such interference is quite rare.  There's nothing really wrong
      with giving up right away.
    
    but imon has a poor error-recovery scheme which just retries forever;
    this behavior should be fixed.
    
    Since I'm not sure whether it is safe for imon users to give up upon any
    error code, this patch takes care of only union of error codes chosen from
    modules in drivers/media/rc/ directory which handle -EPROTO error (i.e.
    ir_toy, mceusb and igorplugusb).
    
    Second problem is that when usb_rx_callback_intf0() once got -EPROTO error
    before ictx->dev_present_intf0 becomes true, usb_rx_callback_intf0() always
    resubmits urb due to commit 8791d63af0cf ("[media] imon: don't wedge
    hardware after early callbacks"). Move the ictx->dev_present_intf0 test
    introduced by commit 6f6b90c9231a ("[media] imon: don't parse scancodes
    until intf configured") to immediately before imon_incoming_packet(), or
    the first problem explained above happens without printk() flooding (i.e.
    hung task).
    
    Third problem is that when usb_rx_callback_intf0() is not called for some
    reason (e.g. flaky hardware; the reproducer for this problem sometimes
    prevents usb_rx_callback_intf0() from being called),
    wait_for_completion_interruptible() in send_packet() never returns (i.e.
    hung task). As a workaround for such situation, change send_packet() to
    wait for completion with timeout of 10 seconds.
    
    Link: https://syzkaller.appspot.com/bug?extid=592e2ab8775dbe0bf09a [1]
    Link: https://lkml.kernel.org/r/[email protected] [2]
    Signed-off-by: Tetsuo Handa <[email protected]>
    Signed-off-by: Sean Young <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

media: pci: ivtv: Don't create fake v4l2_fh [+ + +]
Author: Laurent Pinchart <[email protected]>
Date:   Sun Aug 10 04:29:54 2025 +0300

    media: pci: ivtv: Don't create fake v4l2_fh
    
    [ Upstream commit cc6e8d1ccea792d8550428e0831e3a35b0ccfddc ]
    
    The ivtv driver has a structure named ivtv_open_id that models an open
    file handle for the device. It embeds a v4l2_fh instance for file
    handles that correspond to a V4L2 video device, and stores a pointer to
    that v4l2_fh in struct ivtv_stream to identify which open file handle
    owns a particular stream.
    
    In addition to video devices, streams can be owned by ALSA PCM devices.
    Those devices do not make use of the v4l2_fh instance for obvious
    reasons, but the snd_ivtv_pcm_capture_open() function still initializes
    a "fake" v4l2_fh for the sole purpose of using it as an open file handle
    identifier. The v4l2_fh is not properly destroyed when the ALSA PCM
    device is closed, leading to possible resource leaks.
    
    Fortunately, the v4l2_fh instance pointed to by ivtv_stream is not
    accessed, only the pointer value is used for comparison. Replace it with
    a pointer to the ivtv_open_id structure that embeds the v4l2_fh, and
    don't initialize the v4l2_fh for ALSA PCM devices.
    
    Signed-off-by: Laurent Pinchart <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

media: redrat3: use int type to store negative error codes [+ + +]
Author: Qianfeng Rong <[email protected]>
Date:   Wed Aug 27 20:39:13 2025 +0800

    media: redrat3: use int type to store negative error codes
    
    [ Upstream commit ecba852dc9f4993f4f894ea1f352564560e19a3e ]
    
    Change "ret" from u8 to int type in redrat3_enable_detector() to store
    negative error codes or zero returned by redrat3_send_cmd() and
    usb_submit_urb() - this better aligns with the coding standards and
    maintains code consistency.
    
    No effect on runtime.
    
    Signed-off-by: Qianfeng Rong <[email protected]>
    Signed-off-by: Sean Young <[email protected]>
    Signed-off-by: Hans Verkuil <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
memstick: Add timeout to prevent indefinite waiting [+ + +]
Author: Jiayi Li <[email protected]>
Date:   Mon Aug 4 10:48:25 2025 +0800

    memstick: Add timeout to prevent indefinite waiting
    
    [ Upstream commit b65e630a55a490a0269ab1e4a282af975848064c ]
    
    Add timeout handling to wait_for_completion calls in memstick_set_rw_addr()
    and memstick_alloc_card() to prevent indefinite blocking in case of
    hardware or communication failures.
    
    Signed-off-by: Jiayi Li <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
mfd: madera: Work around false-positive -Wininitialized warning [+ + +]
Author: Arnd Bergmann <[email protected]>
Date:   Thu Aug 7 09:19:28 2025 +0200

    mfd: madera: Work around false-positive -Wininitialized warning
    
    [ Upstream commit 364752aa0c6ab0a06a2d5bfdb362c1ca407f1a30 ]
    
    clang-21 warns about one uninitialized variable getting dereferenced
    in madera_dev_init:
    
    drivers/mfd/madera-core.c:739:10: error: variable 'mfd_devs' is uninitialized when used here [-Werror,-Wuninitialized]
      739 |                               mfd_devs, n_devs,
          |                               ^~~~~~~~
    drivers/mfd/madera-core.c:459:33: note: initialize the variable 'mfd_devs' to silence this warning
      459 |         const struct mfd_cell *mfd_devs;
          |                                        ^
          |                                         = NULL
    
    The code is actually correct here because n_devs is only nonzero
    when mfd_devs is a valid pointer, but this is impossible for the
    compiler to see reliably.
    
    Change the logic to check for the pointer as well, to make this easier
    for the compiler to follow.
    
    Signed-off-by: Arnd Bergmann <[email protected]>
    Reviewed-by: Richard Fitzgerald <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

mfd: stmpe-i2c: Add missing MODULE_LICENSE [+ + +]
Author: Alexander Stein <[email protected]>
Date:   Fri Jul 25 09:11:50 2025 +0200

    mfd: stmpe-i2c: Add missing MODULE_LICENSE
    
    [ Upstream commit 00ea54f058cd4cb082302fe598cfe148e0aadf94 ]
    
    This driver is licensed GPL-2.0-only, so add the corresponding module flag.
    
    Signed-off-by: Alexander Stein <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

mfd: stmpe: Remove IRQ domain upon removal [+ + +]
Author: Alexander Stein <[email protected]>
Date:   Fri Jul 25 09:07:48 2025 +0200

    mfd: stmpe: Remove IRQ domain upon removal
    
    [ Upstream commit 57bf2a312ab2d0bc8ee0f4e8a447fa94a2fc877d ]
    
    The IRQ domain is (optionally) added during stmpe_probe, but never removed.
    Add the call to stmpe_remove.
    
    Signed-off-by: Alexander Stein <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
mips: lantiq: danube: add missing device_type in pci node [+ + +]
Author: Aleksander Jan Bajkowski <[email protected]>
Date:   Mon Aug 11 15:34:13 2025 +0200

    mips: lantiq: danube: add missing device_type in pci node
    
    [ Upstream commit d66949a1875352d2ddd52b144333288952a9e36f ]
    
    This fixes the following warning:
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: pci@e105400 (lantiq,pci-xway): 'device_type' is a required property
            from schema $id: http://devicetree.org/schemas/pci/pci-bus-common.yaml#
    
    Signed-off-by: Aleksander Jan Bajkowski <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

mips: lantiq: danube: add missing properties to cpu node [+ + +]
Author: Aleksander Jan Bajkowski <[email protected]>
Date:   Mon Aug 11 13:58:15 2025 +0200

    mips: lantiq: danube: add missing properties to cpu node
    
    [ Upstream commit e8dee66c37085dc9858eb8608bc783c2900e50e7 ]
    
    This fixes the following warnings:
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: cpus: '#address-cells' is a required property
            from schema $id: http://devicetree.org/schemas/cpus.yaml#
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: cpus: '#size-cells' is a required property
            from schema $id: http://devicetree.org/schemas/cpus.yaml#
    arch/mips/boot/dts/lantiq/danube_easy50712.dtb: cpu@0 (mips,mips24Kc): 'reg' is a required property
            from schema $id: http://devicetree.org/schemas/mips/cpus.yaml#
    
    Signed-off-by: Aleksander Jan Bajkowski <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

mips: lantiq: xway: sysctrl: rename stp clock [+ + +]
Author: Aleksander Jan Bajkowski <[email protected]>
Date:   Fri Aug 15 14:12:23 2025 +0200

    mips: lantiq: xway: sysctrl: rename stp clock
    
    [ Upstream commit b0d04fe6a633ada2c7bc1b5ddd011cbd85961868 ]
    
    Bindig requires a node name matching ‘^gpio@[0-9a-f]+$’. This patch
    changes the clock name from “stp” to “gpio”.
    
    Signed-off-by: Aleksander Jan Bajkowski <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
MIPS: Malta: Fix !EVA SOC-it PCI MMIO [+ + +]
Author: Maciej W. Rozycki <[email protected]>
Date:   Mon Oct 20 02:11:49 2025 +0100

    MIPS: Malta: Fix !EVA SOC-it PCI MMIO
    
    commit ebd729fef31620e0bf74cbf8a4c7fda73a2a4e7e upstream.
    
    Fix a regression that has caused accesses to the PCI MMIO window to
    complete unclaimed in non-EVA configurations with the SOC-it family of
    system controllers, preventing PCI devices from working that use MMIO.
    
    In the non-EVA case PHYS_OFFSET is set to 0, meaning that PCI_BAR0 is
    set with an empty mask (and PCI_HEAD4 matches addresses starting from 0
    accordingly).  Consequently all addresses are matched for incoming DMA
    accesses from PCI.  This seems to confuse the system controller's logic
    and outgoing bus cycles targeting the PCI MMIO window seem not to make
    it to the intended devices.
    
    This happens as well when a wider mask is used with PCI_BAR0, such as
    0x80000000 or 0xe0000000, that makes addresses match that overlap with
    the PCI MMIO window, which starts at 0x10000000 in our configuration.
    
    Set the mask in PCI_BAR0 to 0xf0000000 for non-EVA then, covering the
    non-EVA maximum 256 MiB of RAM, which is what YAMON does and which used
    to work correctly up to the offending commit.  Set PCI_P2SCMSKL to match
    PCI_BAR0 as required by the system controller's specification, and match
    PCI_P2SCMAPL to PCI_HEAD4 for identity mapping.
    
    Verified with:
    
    Core board type/revision =      0x0d (Core74K) / 0x01
    System controller/revision =    MIPS SOC-it 101 OCP / 1.3   SDR-FW-4:1
    Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x1c
    Processor ID/revision =         0x97 (MIPS 74Kf) / 0x4c
    
    for non-EVA and with:
    
    Core board type/revision =      0x0c (CoreFPGA-5) / 0x00
    System controller/revision =    MIPS ROC-it2 / 0.0   FW-1:1 (CLK_unknown) GIC
    Processor Company ID/options =  0x01 (MIPS Technologies, Inc.) / 0x00
    Processor ID/revision =         0xa0 (MIPS interAptiv UP) / 0x20
    
    for EVA/non-EVA, fixing:
    
    defxx 0000:00:12.0: assign IRQ: got 10
    defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
    0000:00:12.0: Could not read adapter factory MAC address!
    
    vs:
    
    defxx 0000:00:12.0: assign IRQ: got 10
    defxx: v1.12 2021/03/10  Lawrence V. Stefani and others
    0000:00:12.0: DEFPA at MMIO addr = 0x10142000, IRQ = 10, Hardware addr = 00-00-f8-xx-xx-xx
    0000:00:12.0: registered as fddi0
    
    for non-EVA and causing no change for EVA.
    
    Signed-off-by: Maciej W. Rozycki <[email protected]>
    Fixes: 422dd256642b ("MIPS: Malta: Allow PCI devices DMA to lower 2GB physical")
    Cc: [email protected] # v4.9+
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
mlxsw: spectrum: Fix memory leak in mlxsw_sp_flower_stats() [+ + +]
Author: Zilin Guan <[email protected]>
Date:   Wed Nov 12 05:21:14 2025 +0000

    mlxsw: spectrum: Fix memory leak in mlxsw_sp_flower_stats()
    
    [ Upstream commit 407a06507c2358554958e8164dc97176feddcafc ]
    
    The function mlxsw_sp_flower_stats() calls mlxsw_sp_acl_ruleset_get() to
    obtain a ruleset reference. If the subsequent call to
    mlxsw_sp_acl_rule_lookup() fails to find a rule, the function returns
    an error without releasing the ruleset reference, causing a memory leak.
    
    Fix this by using a goto to the existing error handling label, which
    calls mlxsw_sp_acl_ruleset_put() to properly release the reference.
    
    Fixes: 7c1b8eb175b69 ("mlxsw: spectrum: Add support for TC flower offload statistics")
    Signed-off-by: Zilin Guan <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
mm/ksm: fix flag-dropping behavior in ksm_madvise [+ + +]
Author: Jakub Acs <[email protected]>
Date:   Fri Nov 7 12:19:20 2025 +0000

    mm/ksm: fix flag-dropping behavior in ksm_madvise
    
    [ Upstream commit f04aad36a07cc17b7a5d5b9a2d386ce6fae63e93 ]
    
    syzkaller discovered the following crash: (kernel BUG)
    
    [   44.607039] ------------[ cut here ]------------
    [   44.607422] kernel BUG at mm/userfaultfd.c:2067!
    [   44.608148] Oops: invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN NOPTI
    [   44.608814] CPU: 1 UID: 0 PID: 2475 Comm: reproducer Not tainted 6.16.0-rc6 #1 PREEMPT(none)
    [   44.609635] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
    [   44.610695] RIP: 0010:userfaultfd_release_all+0x3a8/0x460
    
    <snip other registers, drop unreliable trace>
    
    [   44.617726] Call Trace:
    [   44.617926]  <TASK>
    [   44.619284]  userfaultfd_release+0xef/0x1b0
    [   44.620976]  __fput+0x3f9/0xb60
    [   44.621240]  fput_close_sync+0x110/0x210
    [   44.622222]  __x64_sys_close+0x8f/0x120
    [   44.622530]  do_syscall_64+0x5b/0x2f0
    [   44.622840]  entry_SYSCALL_64_after_hwframe+0x76/0x7e
    [   44.623244] RIP: 0033:0x7f365bb3f227
    
    Kernel panics because it detects UFFD inconsistency during
    userfaultfd_release_all().  Specifically, a VMA which has a valid pointer
    to vma->vm_userfaultfd_ctx, but no UFFD flags in vma->vm_flags.
    
    The inconsistency is caused in ksm_madvise(): when user calls madvise()
    with MADV_UNMEARGEABLE on a VMA that is registered for UFFD in MINOR mode,
    it accidentally clears all flags stored in the upper 32 bits of
    vma->vm_flags.
    
    Assuming x86_64 kernel build, unsigned long is 64-bit and unsigned int and
    int are 32-bit wide.  This setup causes the following mishap during the &=
    ~VM_MERGEABLE assignment.
    
    VM_MERGEABLE is a 32-bit constant of type unsigned int, 0x8000'0000.
    After ~ is applied, it becomes 0x7fff'ffff unsigned int, which is then
    promoted to unsigned long before the & operation.  This promotion fills
    upper 32 bits with leading 0s, as we're doing unsigned conversion (and
    even for a signed conversion, this wouldn't help as the leading bit is 0).
    & operation thus ends up AND-ing vm_flags with 0x0000'0000'7fff'ffff
    instead of intended 0xffff'ffff'7fff'ffff and hence accidentally clears
    the upper 32-bits of its value.
    
    Fix it by changing `VM_MERGEABLE` constant to unsigned long, using the
    BIT() macro.
    
    Note: other VM_* flags are not affected: This only happens to the
    VM_MERGEABLE flag, as the other VM_* flags are all constants of type int
    and after ~ operation, they end up with leading 1 and are thus converted
    to unsigned long with leading 1s.
    
    Note 2:
    After commit 31defc3b01d9 ("userfaultfd: remove (VM_)BUG_ON()s"), this is
    no longer a kernel BUG, but a WARNING at the same place:
    
    [   45.595973] WARNING: CPU: 1 PID: 2474 at mm/userfaultfd.c:2067
    
    but the root-cause (flag-drop) remains the same.
    
    [[email protected]: rust bindgen wasn't able to handle BIT(), from Miguel]
      Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 7677f7fd8be7 ("userfaultfd: add minor fault registration mode")
    Signed-off-by: Jakub Acs <[email protected]>
    Signed-off-by: Miguel Ojeda <[email protected]>
    Acked-by: David Hildenbrand <[email protected]>
    Acked-by: SeongJae Park <[email protected]>
    Tested-by: Alice Ryhl <[email protected]>
    Tested-by: Miguel Ojeda <[email protected]>
    Cc: Xu Xin <[email protected]>
    Cc: Chengming Zhou <[email protected]>
    Cc: Peter Xu <[email protected]>
    Cc: Axel Rasmussen <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    [ acsjakub: drop rust-compatibility change (no rust in 5.4) ]
    Signed-off-by: Jakub Acs <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
mm/page_alloc: fix hash table order logging in alloc_large_system_hash() [+ + +]
Author: Isaac J. Manjarres <[email protected]>
Date:   Thu Nov 20 21:34:22 2025 +0200

    mm/page_alloc: fix hash table order logging in alloc_large_system_hash()
    
    [ Upstream commit 0d6c356dd6547adac2b06b461528e3573f52d953 ]
    
    When emitting the order of the allocation for a hash table,
    alloc_large_system_hash() unconditionally subtracts PAGE_SHIFT from log
    base 2 of the allocation size.  This is not correct if the allocation size
    is smaller than a page, and yields a negative value for the order as seen
    below:
    
    TCP established hash table entries: 32 (order: -4, 256 bytes, linear) TCP
    bind hash table entries: 32 (order: -2, 1024 bytes, linear)
    
    Use get_order() to compute the order when emitting the hash table
    information to correctly handle cases where the allocation size is smaller
    than a page:
    
    TCP established hash table entries: 32 (order: 0, 256 bytes, linear) TCP
    bind hash table entries: 32 (order: 0, 1024 bytes, linear)
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
    Signed-off-by: Isaac J. Manjarres <[email protected]>
    Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>
    Reviewed-by: David Hildenbrand <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    (cherry picked from commit 0d6c356dd6547adac2b06b461528e3573f52d953)
    Signed-off-by: Mike Rapoport (Microsoft) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
mmc: host: renesas_sdhi: Fix the actual clock [+ + +]
Author: Biju Das <[email protected]>
Date:   Sun Jun 29 21:38:56 2025 +0100

    mmc: host: renesas_sdhi: Fix the actual clock
    
    [ Upstream commit 9c174e4dacee9fb2014a4ffc953d79a5707b77e4 ]
    
    Wrong actual clock reported, if the SD clock division ratio is other
    than 1:1(bits DIV[7:0] in SD_CLK_CTRL are set to 11111111).
    
    On high speed mode, cat /sys/kernel/debug/mmc1/ios
    Without the patch:
    clock:          50000000 Hz
    actual clock:   200000000 Hz
    
    After the fix:
    clock:          50000000 Hz
    actual clock:   50000000 Hz
    
    Signed-off-by: Biju Das <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card [+ + +]
Author: Sarthak Garg <[email protected]>
Date:   Mon Sep 8 16:11:19 2025 +0530

    mmc: sdhci-msm: Enable tuning for SDR50 mode for SD card
    
    [ Upstream commit 08b68ca543ee9d5a8d2dc406165e4887dd8f170b ]
    
    For Qualcomm SoCs which needs level shifter for SD card, extra delay is
    seen on receiver data path.
    
    To compensate this delay enable tuning for SDR50 mode for targets which
    has level shifter. SDHCI_SDR50_NEEDS_TUNING caps will be set for targets
    with level shifter on Qualcomm SOC's.
    
    Signed-off-by: Sarthak Garg <[email protected]>
    Acked-by: Adrian Hunter <[email protected]>
    Signed-off-by: Ulf Hansson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/cls_cgroup: Fix task_get_classid() during qdisc run [+ + +]
Author: Yafang Shao <[email protected]>
Date:   Tue Sep 2 14:29:33 2025 +0800

    net/cls_cgroup: Fix task_get_classid() during qdisc run
    
    [ Upstream commit 66048f8b3cc7e462953c04285183cdee43a1cb89 ]
    
    During recent testing with the netem qdisc to inject delays into TCP
    traffic, we observed that our CLS BPF program failed to function correctly
    due to incorrect classid retrieval from task_get_classid(). The issue
    manifests in the following call stack:
    
            bpf_get_cgroup_classid+5
            cls_bpf_classify+507
            __tcf_classify+90
            tcf_classify+217
            __dev_queue_xmit+798
            bond_dev_queue_xmit+43
            __bond_start_xmit+211
            bond_start_xmit+70
            dev_hard_start_xmit+142
            sch_direct_xmit+161
            __qdisc_run+102             <<<<< Issue location
            __dev_xmit_skb+1015
            __dev_queue_xmit+637
            neigh_hh_output+159
            ip_finish_output2+461
            __ip_finish_output+183
            ip_finish_output+41
            ip_output+120
            ip_local_out+94
            __ip_queue_xmit+394
            ip_queue_xmit+21
            __tcp_transmit_skb+2169
            tcp_write_xmit+959
            __tcp_push_pending_frames+55
            tcp_push+264
            tcp_sendmsg_locked+661
            tcp_sendmsg+45
            inet_sendmsg+67
            sock_sendmsg+98
            sock_write_iter+147
            vfs_write+786
            ksys_write+181
            __x64_sys_write+25
            do_syscall_64+56
            entry_SYSCALL_64_after_hwframe+100
    
    The problem occurs when multiple tasks share a single qdisc. In such cases,
    __qdisc_run() may transmit skbs created by different tasks. Consequently,
    task_get_classid() retrieves an incorrect classid since it references the
    current task's context rather than the skb's originating task.
    
    Given that dev_queue_xmit() always executes with bh disabled, we can use
    softirq_count() instead to obtain the correct classid.
    
    The simple steps to reproduce this issue:
    1. Add network delay to the network interface:
      such as: tc qdisc add dev bond0 root netem delay 1.5ms
    2. Build two distinct net_cls cgroups, each with a network-intensive task
    3. Initiate parallel TCP streams from both tasks to external servers.
    
    Under this specific condition, the issue reliably occurs. The kernel
    eventually dequeues an SKB that originated from Task-A while executing in
    the context of Task-B.
    
    It is worth noting that it will change the established behavior for a
    slightly different scenario:
    
      <sock S is created by task A>
      <class ID for task A is changed>
      <skb is created by sock S xmit and classified>
    
    prior to this patch the skb will be classified with the 'new' task A
    classid, now with the old/original one. The bpf_get_cgroup_classid_curr()
    function is a more appropriate choice for this case.
    
    Signed-off-by: Yafang Shao <[email protected]>
    Cc: Daniel Borkmann <[email protected]>
    Cc: Thomas Graf <[email protected]>
    Cc: Sebastian Andrzej Siewior <[email protected]>
    Cc: Nikolay Aleksandrov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/mlx5e: Fix maxrate wraparound in threshold between units [+ + +]
Author: Gal Pressman <[email protected]>
Date:   Sun Nov 9 11:37:51 2025 +0200

    net/mlx5e: Fix maxrate wraparound in threshold between units
    
    [ Upstream commit a7bf4d5063c7837096aab2853224eb23628514d9 ]
    
    The previous calculation used roundup() which caused an overflow for
    rates between 25.5Gbps and 26Gbps.
    For example, a rate of 25.6Gbps would result in using 100Mbps units with
    value of 256, which would overflow the 8 bits field.
    
    Simplify the upper_limit_mbps calculation by removing the
    unnecessary roundup, and adjust the comparison to use <= to correctly
    handle the boundary condition.
    
    Fixes: d8880795dabf ("net/mlx5e: Implement DCBNL IEEE max rate")
    Signed-off-by: Gal Pressman <[email protected]>
    Reviewed-by: Nimrod Oren <[email protected]>
    Signed-off-by: Tariq Toukan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net/mlx5e: Fix wraparound in rate limiting for values above 255 Gbps [+ + +]
Author: Gal Pressman <[email protected]>
Date:   Sun Nov 9 11:37:52 2025 +0200

    net/mlx5e: Fix wraparound in rate limiting for values above 255 Gbps
    
    [ Upstream commit 43b27d1bd88a4bce34ec2437d103acfae9655f9e ]
    
    Add validation to reject rates exceeding 255 Gbps that would overflow
    the 8 bits max bandwidth field.
    
    Fixes: d8880795dabf ("net/mlx5e: Implement DCBNL IEEE max rate")
    Signed-off-by: Gal Pressman <[email protected]>
    Reviewed-by: Nimrod Oren <[email protected]>
    Signed-off-by: Tariq Toukan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net/sched: sch_qfq: Fix null-deref in agg_dequeue [+ + +]
Author: Xiang Mei <[email protected]>
Date:   Sat Jul 5 14:21:43 2025 -0700

    net/sched: sch_qfq: Fix null-deref in agg_dequeue
    
    commit dd831ac8221e691e9e918585b1003c7071df0379 upstream.
    
    To prevent a potential crash in agg_dequeue (net/sched/sch_qfq.c)
    when cl->qdisc->ops->peek(cl->qdisc) returns NULL, we check the return
    value before using it, similar to the existing approach in sch_hfsc.c.
    
    To avoid code duplication, the following changes are made:
    
    1. Changed qdisc_warn_nonwc(include/net/pkt_sched.h) into a static
    inline function.
    
    2. Moved qdisc_peek_len from net/sched/sch_hfsc.c to
    include/net/pkt_sched.h so that sch_qfq can reuse it.
    
    3. Applied qdisc_peek_len in agg_dequeue to avoid crashing.
    
    Signed-off-by: Xiang Mei <[email protected]>
    Reviewed-by: Cong Wang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
 
net: call cond_resched() less often in __release_sock() [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Wed Sep 3 17:48:10 2025 +0000

    net: call cond_resched() less often in __release_sock()
    
    [ Upstream commit 16c610162d1f1c332209de1c91ffb09b659bb65d ]
    
    While stress testing TCP I had unexpected retransmits and sack packets
    when a single cpu receives data from multiple high-throughput flows.
    
    super_netperf 4 -H srv -T,10 -l 3000 &
    
    Tcpdump extract:
    
     00:00:00.000007 IP6 clnt > srv: Flags [.], seq 26062848:26124288, ack 1, win 66, options [nop,nop,TS val 651460834 ecr 3100749131], length 61440
     00:00:00.000006 IP6 clnt > srv: Flags [.], seq 26124288:26185728, ack 1, win 66, options [nop,nop,TS val 651460834 ecr 3100749131], length 61440
     00:00:00.000005 IP6 clnt > srv: Flags [P.], seq 26185728:26243072, ack 1, win 66, options [nop,nop,TS val 651460834 ecr 3100749131], length 57344
     00:00:00.000006 IP6 clnt > srv: Flags [.], seq 26243072:26304512, ack 1, win 66, options [nop,nop,TS val 651460844 ecr 3100749141], length 61440
     00:00:00.000005 IP6 clnt > srv: Flags [.], seq 26304512:26365952, ack 1, win 66, options [nop,nop,TS val 651460844 ecr 3100749141], length 61440
     00:00:00.000007 IP6 clnt > srv: Flags [P.], seq 26365952:26423296, ack 1, win 66, options [nop,nop,TS val 651460844 ecr 3100749141], length 57344
     00:00:00.000006 IP6 clnt > srv: Flags [.], seq 26423296:26484736, ack 1, win 66, options [nop,nop,TS val 651460853 ecr 3100749150], length 61440
     00:00:00.000005 IP6 clnt > srv: Flags [.], seq 26484736:26546176, ack 1, win 66, options [nop,nop,TS val 651460853 ecr 3100749150], length 61440
     00:00:00.000005 IP6 clnt > srv: Flags [P.], seq 26546176:26603520, ack 1, win 66, options [nop,nop,TS val 651460853 ecr 3100749150], length 57344
     00:00:00.003932 IP6 clnt > srv: Flags [P.], seq 26603520:26619904, ack 1, win 66, options [nop,nop,TS val 651464844 ecr 3100753141], length 16384
     00:00:00.006602 IP6 clnt > srv: Flags [.], seq 24862720:24866816, ack 1, win 66, options [nop,nop,TS val 651471419 ecr 3100759716], length 4096
     00:00:00.013000 IP6 clnt > srv: Flags [.], seq 24862720:24866816, ack 1, win 66, options [nop,nop,TS val 651484421 ecr 3100772718], length 4096
     00:00:00.000416 IP6 srv > clnt: Flags [.], ack 26619904, win 1393, options [nop,nop,TS val 3100773185 ecr 651484421,nop,nop,sack 1 {24862720:24866816}], length 0
    
    After analysis, it appears this is because of the cond_resched()
    call from  __release_sock().
    
    When current thread is yielding, while still holding the TCP socket lock,
    it might regain the cpu after a very long time.
    
    Other peer TLP/RTO is firing (multiple times) and packets are retransmit,
    while the initial copy is waiting in the socket backlog or receive queue.
    
    In this patch, I call cond_resched() only once every 16 packets.
    
    Modern TCP stack now spends less time per packet in the backlog,
    especially because ACK are no longer sent (commit 133c4c0d3717
    "tcp: defer regular ACK while processing socket backlog")
    
    Before:
    
    clnt:/# nstat -n;sleep 10;nstat|egrep "TcpOutSegs|TcpRetransSegs|TCPFastRetrans|TCPTimeouts|Probes|TCPSpuriousRTOs|DSACK"
    TcpOutSegs                      19046186           0.0
    TcpRetransSegs                  1471               0.0
    TcpExtTCPTimeouts               1397               0.0
    TcpExtTCPLossProbes             1356               0.0
    TcpExtTCPDSACKRecv              1352               0.0
    TcpExtTCPSpuriousRTOs           114                0.0
    TcpExtTCPDSACKRecvSegs          1352               0.0
    
    After:
    
    clnt:/# nstat -n;sleep 10;nstat|egrep "TcpOutSegs|TcpRetransSegs|TCPFastRetrans|TCPTimeouts|Probes|TCPSpuriousRTOs|DSACK"
    TcpOutSegs                      19218936           0.0
    
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Kuniyuki Iwashima <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: Call trace_sock_exceed_buf_limit() for memcg failure with SK_MEM_RECV. [+ + +]
Author: Kuniyuki Iwashima <[email protected]>
Date:   Fri Aug 15 20:16:12 2025 +0000

    net: Call trace_sock_exceed_buf_limit() for memcg failure with SK_MEM_RECV.
    
    [ Upstream commit 9d85c565a7b7c78b732393c02bcaa4d5c275fe58 ]
    
    Initially, trace_sock_exceed_buf_limit() was invoked when
    __sk_mem_raise_allocated() failed due to the memcg limit or the
    global limit.
    
    However, commit d6f19938eb031 ("net: expose sk wmem in
    sock_exceed_buf_limit tracepoint") somehow suppressed the event
    only when memcg failed to charge for SK_MEM_RECV, although the
    memcg failure for SK_MEM_SEND still triggers the event.
    
    Let's restore the event for SK_MEM_RECV.
    
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Reviewed-by: Shakeel Butt <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: dsa/b53: change b53_force_port_config() pause argument [+ + +]
Author: Russell King <[email protected]>
Date:   Tue Jun 30 11:25:00 2020 +0100

    net: dsa/b53: change b53_force_port_config() pause argument
    
    [ Upstream commit 3cad1c8b49e93c62f27f4eb34e0ccfde92f4cdc0 ]
    
    Replace the b53_force_port_config() pause argument, which is based on
    phylink's MLO_PAUSE_* definitions, to use a pair of booleans.  This
    will allow us to move b53_force_port_config() from
    b53_phylink_mac_config() to b53_phylink_mac_link_up().
    
    Reviewed-by: Florian Fainelli <[email protected]>
    Signed-off-by: Russell King <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: b6a8a5477fe9 ("net: dsa: b53: fix resetting speed and pause on forced link")
    Signed-off-by: Sasha Levin <[email protected]>

net: dsa: b53: fix enabling ip multicast [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Sun Nov 2 11:07:56 2025 +0100

    net: dsa: b53: fix enabling ip multicast
    
    [ Upstream commit c264294624e956a967a9e2e5fa41e3273340b089 ]
    
    In the New Control register bit 1 is either reserved, or has a different
    function:
    
        Out of Range Error Discard
    
        When enabled, the ingress port discards any frames
        if the Length field is between 1500 and 1536
        (excluding 1500 and 1536) and with good CRC.
    
    The actual bit for enabling IP multicast is bit 0, which was only
    explicitly enabled for BCM5325 so far.
    
    For older switch chips, this bit defaults to 0, so we want to enable it
    as well, while newer switch chips default to 1, and their documentation
    says "It is illegal to set this bit to zero."
    
    So drop the wrong B53_IPMC_FWD_EN define, enable the IP multicast bit
    also for other switch chips. While at it, rename it to (B53_)IP_MC as
    that is how it is called in Broadcom code.
    
    Fixes: 63cc54a6f073 ("net: dsa: b53: Fix egress flooding settings")
    Signed-off-by: Jonas Gorski <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: dsa: b53: fix resetting speed and pause on forced link [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Sat Nov 1 14:28:06 2025 +0100

    net: dsa: b53: fix resetting speed and pause on forced link
    
    [ Upstream commit b6a8a5477fe9bd6be2b594a88f82f8bba41e6d54 ]
    
    There is no guarantee that the port state override registers have their
    default values, as not all switches support being reset via register or
    have a reset GPIO.
    
    So when forcing port config, we need to make sure to clear all fields,
    which we currently do not do for the speed and flow control
    configuration. This can cause flow control stay enabled, or in the case
    of speed becoming an illegal value, e.g. configured for 1G (0x2), then
    setting 100M (0x1), results in 0x3 which is invalid.
    
    For PORT_OVERRIDE_SPEED_2000M we need to make sure to only clear it on
    supported chips, as the bit can have different meanings on other chips,
    e.g. for BCM5389 this controls scanning PHYs for link/speed
    configuration.
    
    Fixes: 5e004460f874 ("net: dsa: b53: Add helper to set link parameters")
    Signed-off-by: Jonas Gorski <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL access on BCM5325 [+ + +]
Author: Álvaro Fernández Rojas <[email protected]>
Date:   Sat Jun 14 09:59:57 2025 +0200

    net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL access on BCM5325
    
    [ Upstream commit 37883bbc45a8555d6eca88d3a9730504d2dac86c ]
    
    BCM5325 doesn't implement GMII_PORT_OVERRIDE_CTRL register so we should
    avoid reading or writing it.
    PORT_OVERRIDE_RX_FLOW and PORT_OVERRIDE_TX_FLOW aren't defined on BCM5325
    and we should use PORT_OVERRIDE_LP_FLOW_25 instead.
    
    Reviewed-by: Florian Fainelli <[email protected]>
    Signed-off-by: Álvaro Fernández Rojas <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Stable-dep-of: b6a8a5477fe9 ("net: dsa: b53: fix resetting speed and pause on forced link")
    Signed-off-by: Sasha Levin <[email protected]>

net: dsa: b53: stop reading ARL entries if search is done [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Sun Nov 2 11:07:57 2025 +0100

    net: dsa: b53: stop reading ARL entries if search is done
    
    [ Upstream commit 0be04b5fa62a82a9929ca261f6c9f64a3d0a28da ]
    
    The switch clears the ARL_SRCH_STDN bit when the search is done, i.e. it
    finished traversing the ARL table.
    
    This means that there will be no valid result, so we should not attempt
    to read and process any further entries.
    
    We only ever check the validity of the entries for 4 ARL bin chips, and
    only after having passed the first entry to the b53_fdb_copy().
    
    This means that we always pass an invalid entry at the end to the
    b53_fdb_copy(). b53_fdb_copy() does check the validity though before
    passing on the entry, so it never gets passed on.
    
    On < 4 ARL bin chips, we will even continue reading invalid entries
    until we reach the result limit.
    
    Fixes: 1da6df85c6fb ("net: dsa: b53: Implement ARL add/del/dump operations")
    Signed-off-by: Jonas Gorski <[email protected]>
    Reviewed-by: Florian Fainelli <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: ethernet: ti: netcp: Standardize knav_dma_open_channel to return NULL on error [+ + +]
Author: Nishanth Menon <[email protected]>
Date:   Mon Nov 3 10:28:11 2025 -0600

    net: ethernet: ti: netcp: Standardize knav_dma_open_channel to return NULL on error
    
    [ Upstream commit 90a88306eb874fe4bbdd860e6c9787f5bbc588b5 ]
    
    Make knav_dma_open_channel consistently return NULL on error instead
    of ERR_PTR. Currently the header include/linux/soc/ti/knav_dma.h
    returns NULL when the driver is disabled, but the driver
    implementation does not even return NULL or ERR_PTR on failure,
    causing inconsistency in the users. This results in a crash in
    netcp_free_navigator_resources as followed (trimmed):
    
    Unhandled fault: alignment exception (0x221) at 0xfffffff2
    [fffffff2] *pgd=80000800207003, *pmd=82ffda003, *pte=00000000
    Internal error: : 221 [#1] SMP ARM
    Modules linked in:
    CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.17.0-rc7 #1 NONE
    Hardware name: Keystone
    PC is at knav_dma_close_channel+0x30/0x19c
    LR is at netcp_free_navigator_resources+0x2c/0x28c
    
    [... TRIM...]
    
    Call trace:
     knav_dma_close_channel from netcp_free_navigator_resources+0x2c/0x28c
     netcp_free_navigator_resources from netcp_ndo_open+0x430/0x46c
     netcp_ndo_open from __dev_open+0x114/0x29c
     __dev_open from __dev_change_flags+0x190/0x208
     __dev_change_flags from netif_change_flags+0x1c/0x58
     netif_change_flags from dev_change_flags+0x38/0xa0
     dev_change_flags from ip_auto_config+0x2c4/0x11f0
     ip_auto_config from do_one_initcall+0x58/0x200
     do_one_initcall from kernel_init_freeable+0x1cc/0x238
     kernel_init_freeable from kernel_init+0x1c/0x12c
     kernel_init from ret_from_fork+0x14/0x38
    [... TRIM...]
    
    Standardize the error handling by making the function return NULL on
    all error conditions. The API is used in just the netcp_core.c so the
    impact is limited.
    
    Note, this change, in effect reverts commit 5b6cb43b4d62 ("net:
    ethernet: ti: netcp_core: return error while dma channel open issue"),
    but provides a less error prone implementation.
    
    Suggested-by: Simon Horman <[email protected]>
    Suggested-by: Jacob Keller <[email protected]>
    Signed-off-by: Nishanth Menon <[email protected]>
    Reviewed-by: Jacob Keller <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: fec: correct rx_bytes statistic for the case SHIFT16 is set [+ + +]
Author: Wei Fang <[email protected]>
Date:   Thu Nov 6 10:14:21 2025 +0800

    net: fec: correct rx_bytes statistic for the case SHIFT16 is set
    
    [ Upstream commit ad17e7e92a7c52ce70bb764813fcf99464f96903 ]
    
    Two additional bytes in front of each frame received into the RX FIFO if
    SHIFT16 is set, so we need to subtract the extra two bytes from pkt_len
    to correct the statistic of rx_bytes.
    
    Fixes: 3ac72b7b63d5 ("net: fec: align IP header in hardware")
    Signed-off-by: Wei Fang <[email protected]>
    Reviewed-by: Frank Li <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: intel: fm10k: Fix parameter idx set but not used [+ + +]
Author: Brahmajit Das <[email protected]>
Date:   Tue Sep 2 12:54:22 2025 +0530

    net: intel: fm10k: Fix parameter idx set but not used
    
    [ Upstream commit 99e9c5ffbbee0f258a1da4eadf602b943f8c8300 ]
    
    Variable idx is set in the loop, but is never used resulting in dead
    code. Building with GCC 16, which enables
    -Werror=unused-but-set-parameter= by default results in build error.
    This patch removes the idx parameter, since all the callers of the
    fm10k_unbind_hw_stats_q as 0 as idx anyways.
    
    Suggested-by: Vadim Fedorenko <[email protected]>
    Signed-off-by: Brahmajit Das <[email protected]>
    Reviewed-by: Aleksandr Loktionov <[email protected]>
    Signed-off-by: Tony Nguyen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: ipv6: fix field-spanning memcpy warning in AH output [+ + +]
Author: Charalampos Mitrodimas <[email protected]>
Date:   Tue Aug 12 15:51:25 2025 +0000

    net: ipv6: fix field-spanning memcpy warning in AH output
    
    [ Upstream commit 2327a3d6f65ce2fe2634546dde4a25ef52296fec ]
    
    Fix field-spanning memcpy warnings in ah6_output() and
    ah6_output_done() where extension headers are copied to/from IPv6
    address fields, triggering fortify-string warnings about writes beyond
    the 16-byte address fields.
    
      memcpy: detected field-spanning write (size 40) of single field "&top_iph->saddr" at net/ipv6/ah6.c:439 (size 16)
      WARNING: CPU: 0 PID: 8838 at net/ipv6/ah6.c:439 ah6_output+0xe7e/0x14e0 net/ipv6/ah6.c:439
    
    The warnings are false positives as the extension headers are
    intentionally placed after the IPv6 header in memory. Fix by properly
    copying addresses and extension headers separately, and introduce
    helper functions to avoid code duplication.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=01b0667934cdceb4451c
    Signed-off-by: Charalampos Mitrodimas <[email protected]>
    Signed-off-by: Steffen Klassert <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: macb: avoid dealing with endianness in macb_set_hwaddr() [+ + +]
Author: Théo Lebrun <[email protected]>
Date:   Tue Sep 23 18:00:27 2025 +0200

    net: macb: avoid dealing with endianness in macb_set_hwaddr()
    
    [ Upstream commit 70a5ce8bc94545ba0fb47b2498bfb12de2132f4d ]
    
    bp->dev->dev_addr is of type `unsigned char *`. Casting it to a u32
    pointer and dereferencing implies dealing manually with endianness,
    which is error-prone.
    
    Replace by calls to get_unaligned_le32|le16() helpers.
    
    This was found using sparse:
       ⟩ make C=2 drivers/net/ethernet/cadence/macb_main.o
       warning: incorrect type in assignment (different base types)
          expected unsigned int [usertype] bottom
          got restricted __le32 [usertype]
       warning: incorrect type in assignment (different base types)
          expected unsigned short [usertype] top
          got restricted __le16 [usertype]
       ...
    
    Reviewed-by: Sean Anderson <[email protected]>
    Signed-off-by: Théo Lebrun <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: mdio: fix resource leak in mdiobus_register_device() [+ + +]
Author: Buday Csaba <[email protected]>
Date:   Sat Nov 8 07:49:22 2025 +0100

    net: mdio: fix resource leak in mdiobus_register_device()
    
    [ Upstream commit e6ca8f533ed41129fcf052297718f417f021cc7d ]
    
    Fix a possible leak in mdiobus_register_device() when both a
    reset-gpio and a reset-controller are present.
    Clean up the already claimed reset-gpio, when the registration of
    the reset-controller fails, so when an error code is returned, the
    device retains its state before the registration attempt.
    
    Link: https://lore.kernel.org/all/[email protected]/
    Fixes: 71dd6c0dff51 ("net: phy: add support for reset-controller")
    Signed-off-by: Buday Csaba <[email protected]>
    Link: https://patch.msgid.link/4b419377f8dd7d2f63f919d0f74a336c734f8fff.1762584481.git.buday.csaba@prolan.hu
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: netpoll: fix incorrect refcount handling causing incorrect cleanup [+ + +]
Author: Breno Leitao <[email protected]>
Date:   Thu Nov 20 21:05:19 2025 -0500

    net: netpoll: fix incorrect refcount handling causing incorrect cleanup
    
    [ Upstream commit 49c8d2c1f94cc2f4d1a108530d7ba52614b874c2 ]
    
    commit efa95b01da18 ("netpoll: fix use after free") incorrectly
    ignored the refcount and prematurely set dev->npinfo to NULL during
    netpoll cleanup, leading to improper behavior and memory leaks.
    
    Scenario causing lack of proper cleanup:
    
    1) A netpoll is associated with a NIC (e.g., eth0) and netdev->npinfo is
       allocated, and refcnt = 1
       - Keep in mind that npinfo is shared among all netpoll instances. In
         this case, there is just one.
    
    2) Another netpoll is also associated with the same NIC and
       npinfo->refcnt += 1.
       - Now dev->npinfo->refcnt = 2;
       - There is just one npinfo associated to the netdev.
    
    3) When the first netpolls goes to clean up:
       - The first cleanup succeeds and clears np->dev->npinfo, ignoring
         refcnt.
         - It basically calls `RCU_INIT_POINTER(np->dev->npinfo, NULL);`
       - Set dev->npinfo = NULL, without proper cleanup
       - No ->ndo_netpoll_cleanup() is either called
    
    4) Now the second target tries to clean up
       - The second cleanup fails because np->dev->npinfo is already NULL.
         * In this case, ops->ndo_netpoll_cleanup() was never called, and
           the skb pool is not cleaned as well (for the second netpoll
           instance)
      - This leaks npinfo and skbpool skbs, which is clearly reported by
        kmemleak.
    
    Revert commit efa95b01da18 ("netpoll: fix use after free") and adds
    clarifying comments emphasizing that npinfo cleanup should only happen
    once the refcount reaches zero, ensuring stable and correct netpoll
    behavior.
    
    Cc: <[email protected]> # 3.17.x
    Cc: Jay Vosburgh <[email protected]>
    Fixes: efa95b01da18 ("netpoll: fix use after free")
    Signed-off-by: Breno Leitao <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    [ Adjust context ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: nfc: nci: Increase NCI_DATA_TIMEOUT to 3000 ms [+ + +]
Author: Juraj Šarinay <[email protected]>
Date:   Tue Sep 2 13:36:28 2025 +0200

    net: nfc: nci: Increase NCI_DATA_TIMEOUT to 3000 ms
    
    [ Upstream commit 21f82062d0f241e55dd59eb630e8710862cc90b4 ]
    
    An exchange with a NFC target must complete within NCI_DATA_TIMEOUT.
    A delay of 700 ms is not sufficient for cryptographic operations on smart
    cards. CardOS 6.0 may need up to 1.3 seconds to perform 256-bit ECDH
    or 3072-bit RSA. To prevent brute-force attacks, passports and similar
    documents introduce even longer delays into access control protocols
    (BAC/PACE).
    
    The timeout should be higher, but not too much. The expiration allows
    us to detect that a NFC target has disappeared.
    
    Signed-off-by: Juraj Šarinay <[email protected]>
    Reviewed-by: Krzysztof Kozlowski <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: openvswitch: remove never-working support for setting nsh fields [+ + +]
Author: Ilya Maximets <[email protected]>
Date:   Wed Nov 12 12:14:03 2025 +0100

    net: openvswitch: remove never-working support for setting nsh fields
    
    [ Upstream commit dfe28c4167a9259fc0c372d9f9473e1ac95cff67 ]
    
    The validation of the set(nsh(...)) action is completely wrong.
    It runs through the nsh_key_put_from_nlattr() function that is the
    same function that validates NSH keys for the flow match and the
    push_nsh() action.  However, the set(nsh(...)) has a very different
    memory layout.  Nested attributes in there are doubled in size in
    case of the masked set().  That makes proper validation impossible.
    
    There is also confusion in the code between the 'masked' flag, that
    says that the nested attributes are doubled in size containing both
    the value and the mask, and the 'is_mask' that says that the value
    we're parsing is the mask.  This is causing kernel crash on trying to
    write into mask part of the match with SW_FLOW_KEY_PUT() during
    validation, while validate_nsh() doesn't allocate any memory for it:
    
      BUG: kernel NULL pointer dereference, address: 0000000000000018
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD 1c2383067 P4D 1c2383067 PUD 20b703067 PMD 0
      Oops: Oops: 0000 [#1] SMP NOPTI
      CPU: 8 UID: 0 Kdump: loaded Not tainted 6.17.0-rc4+ #107 PREEMPT(voluntary)
      RIP: 0010:nsh_key_put_from_nlattr+0x19d/0x610 [openvswitch]
      Call Trace:
       <TASK>
       validate_nsh+0x60/0x90 [openvswitch]
       validate_set.constprop.0+0x270/0x3c0 [openvswitch]
       __ovs_nla_copy_actions+0x477/0x860 [openvswitch]
       ovs_nla_copy_actions+0x8d/0x100 [openvswitch]
       ovs_packet_cmd_execute+0x1cc/0x310 [openvswitch]
       genl_family_rcv_msg_doit+0xdb/0x130
       genl_family_rcv_msg+0x14b/0x220
       genl_rcv_msg+0x47/0xa0
       netlink_rcv_skb+0x53/0x100
       genl_rcv+0x24/0x40
       netlink_unicast+0x280/0x3b0
       netlink_sendmsg+0x1f7/0x430
       ____sys_sendmsg+0x36b/0x3a0
       ___sys_sendmsg+0x87/0xd0
       __sys_sendmsg+0x6d/0xd0
       do_syscall_64+0x7b/0x2c0
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
    
    The third issue with this process is that while trying to convert
    the non-masked set into masked one, validate_set() copies and doubles
    the size of the OVS_KEY_ATTR_NSH as if it didn't have any nested
    attributes.  It should be copying each nested attribute and doubling
    them in size independently.  And the process must be properly reversed
    during the conversion back from masked to a non-masked variant during
    the flow dump.
    
    In the end, the only two outcomes of trying to use this action are
    either validation failure or a kernel crash.  And if somehow someone
    manages to install a flow with such an action, it will most definitely
    not do what it is supposed to, since all the keys and the masks are
    mixed up.
    
    Fixing all the issues is a complex task as it requires re-writing
    most of the validation code.
    
    Given that and the fact that this functionality never worked since
    introduction, let's just remove it altogether.  It's better to
    re-introduce it later with a proper implementation instead of trying
    to fix it in stable releases.
    
    Fixes: b2d0f5d5dc53 ("openvswitch: enable NSH support")
    Reported-by: Junvy Yang <[email protected]>
    Signed-off-by: Ilya Maximets <[email protected]>
    Acked-by: Eelco Chaudron <[email protected]>
    Reviewed-by: Aaron Conole <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: phy: dp83867: Disable EEE support as not implemented [+ + +]
Author: Emanuele Ghidoli <[email protected]>
Date:   Sun Nov 2 18:43:32 2025 -0500

    net: phy: dp83867: Disable EEE support as not implemented
    
    [ Upstream commit 84a905290cb4c3d9a71a9e3b2f2e02e031e7512f ]
    
    While the DP83867 PHYs report EEE capability through their feature
    registers, the actual hardware does not support EEE (see Links).
    When the connected MAC enables EEE, it causes link instability and
    communication failures.
    
    The issue is reproducible with a iMX8MP and relevant stmmac ethernet port.
    Since the introduction of phylink-managed EEE support in the stmmac driver,
    EEE is now enabled by default, leading to issues on systems using the
    DP83867 PHY.
    
    Call phy_disable_eee during phy initialization to prevent EEE from being
    enabled on DP83867 PHYs.
    
    Link: https://e2e.ti.com/support/interface-group/interface/f/interface-forum/1445244/dp83867ir-dp83867-disable-eee-lpi
    Link: https://e2e.ti.com/support/interface-group/interface/f/interface-forum/658638/dp83867ir-eee-energy-efficient-ethernet
    Fixes: 2a10154abcb7 ("net: phy: dp83867: Add TI dp83867 phy")
    Cc: [email protected]
    Signed-off-by: Emanuele Ghidoli <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    [ replaced phy_disable_eee() call with direct eee_broken_modes assignment ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: qede: Initialize qede_ll_ops with designated initializer [+ + +]
Author: Nathan Chancellor <[email protected]>
Date:   Wed May 7 21:47:45 2025 +0100

    net: qede: Initialize qede_ll_ops with designated initializer
    
    commit 6b3ab7f2cbfaeb6580709cd8ef4d72cfd01bfde4 upstream.
    
    After a recent change [1] in clang's randstruct implementation to
    randomize structures that only contain function pointers, there is an
    error because qede_ll_ops get randomized but does not use a designated
    initializer for the first member:
    
      drivers/net/ethernet/qlogic/qede/qede_main.c:206:2: error: a randomized struct can only be initialized with a designated initializer
        206 |         {
            |         ^
    
    Explicitly initialize the common member using a designated initializer
    to fix the build.
    
    Cc: [email protected]
    Fixes: 035f7f87b729 ("randstruct: Enable Clang support")
    Link: https://github.com/llvm/llvm-project/commit/04364fb888eea6db9811510607bed4b200bcb082 [1]
    Signed-off-by: Nathan Chancellor <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: ravb: Enforce descriptor type ordering [+ + +]
Author: Lad Prabhakar <[email protected]>
Date:   Mon Oct 27 10:59:07 2025 -0400

    net: ravb: Enforce descriptor type ordering
    
    [ Upstream commit 5370c31e84b0e0999c7b5ff949f4e104def35584 ]
    
    Ensure the TX descriptor type fields are published in a safe order so the
    DMA engine never begins processing a descriptor chain before all descriptor
    fields are fully initialised.
    
    For multi-descriptor transmits the driver writes DT_FEND into the last
    descriptor and DT_FSTART into the first. The DMA engine begins processing
    when it observes DT_FSTART. Move the dma_wmb() barrier so it executes
    immediately after DT_FEND and immediately before writing DT_FSTART
    (and before DT_FSINGLE in the single-descriptor case). This guarantees
    that all prior CPU writes to the descriptor memory are visible to the
    device before DT_FSTART is seen.
    
    This avoids a situation where compiler/CPU reordering could publish
    DT_FSTART ahead of DT_FEND or other descriptor fields, allowing the DMA to
    start on a partially initialised chain and causing corrupted transmissions
    or TX timeouts. Such a failure was observed on RZ/G2L with an RT kernel as
    transmit queue timeouts and device resets.
    
    Fixes: 2f45d1902acf ("ravb: minimize TX data copying")
    Cc: [email protected]
    Co-developed-by: Fabrizio Castro <[email protected]>
    Signed-off-by: Fabrizio Castro <[email protected]>
    Signed-off-by: Lad Prabhakar <[email protected]>
    Reviewed-by: Niklas Söderlund <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    [ kept unconditional skb_tx_timestamp() ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: sched: act_ife: initialize struct tc_ife to fix KMSAN kernel-infoleak [+ + +]
Author: Ranganath V N <[email protected]>
Date:   Sun Nov 9 14:43:36 2025 +0530

    net: sched: act_ife: initialize struct tc_ife to fix KMSAN kernel-infoleak
    
    [ Upstream commit ce50039be49eea9b4cd8873ca6eccded1b4a130a ]
    
    Fix a KMSAN kernel-infoleak detected  by the syzbot .
    
    [net?] KMSAN: kernel-infoleak in __skb_datagram_iter
    
    In tcf_ife_dump(), the variable 'opt' was partially initialized using a
    designatied initializer. While the padding bytes are reamined
    uninitialized. nla_put() copies the entire structure into a
    netlink message, these uninitialized bytes leaked to userspace.
    
    Initialize the structure with memset before assigning its fields
    to ensure all members and padding are cleared prior to beign copied.
    
    This change silences the KMSAN report and prevents potential information
    leaks from the kernel memory.
    
    This fix has been tested and validated by syzbot. This patch closes the
    bug reported at the following syzkaller link and ensures no infoleak.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=0c85cae3350b7d486aee
    Tested-by: [email protected]
    Fixes: ef6980b6becb ("introduce IFE action")
    Signed-off-by: Ranganath V N <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Acked-by: Cong Wang <[email protected]>
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: sh_eth: Disable WoL if system can not suspend [+ + +]
Author: Niklas Söderlund <[email protected]>
Date:   Tue Sep 9 10:58:49 2025 +0200

    net: sh_eth: Disable WoL if system can not suspend
    
    [ Upstream commit 9c02ea544ac35a9def5827d30594406947ccd81a ]
    
    The MAC can't facilitate WoL if the system can't go to sleep. Gate the
    WoL support callbacks in ethtool at compile time using CONFIG_PM_SLEEP.
    
    Signed-off-by: Niklas Söderlund <[email protected]>
    Reviewed-by: Andrew Lunn <[email protected]>
    Reviewed-by: Geert Uytterhoeven <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: usb: asix_devices: Check return value of usbnet_get_endpoints [+ + +]
Author: Miaoqian Lin <[email protected]>
Date:   Mon Oct 27 00:43:16 2025 +0800

    net: usb: asix_devices: Check return value of usbnet_get_endpoints
    
    commit dc89548c6926d68dfdda11bebc1a5258bc41d887 upstream.
    
    The code did not check the return value of usbnet_get_endpoints.
    Add checks and return the error if it fails to transfer the error.
    
    Found via static anlaysis and this is similar to
    commit 07161b2416f7 ("sr9800: Add check for usbnet_get_endpoints").
    
    Fixes: 933a27d39e0e ("USB: asix - Add AX88178 support and many other changes")
    Fixes: 2e55cc7210fe ("[PATCH] USB: usbnet (3/9) module for ASIX Ethernet adapters")
    Cc: [email protected]
    Signed-off-by: Miaoqian Lin <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

net: usb: qmi_wwan: initialize MAC header offset in qmimux_rx_fixup [+ + +]
Author: Qendrim Maxhuni <[email protected]>
Date:   Wed Oct 29 08:57:44 2025 +0100

    net: usb: qmi_wwan: initialize MAC header offset in qmimux_rx_fixup
    
    [ Upstream commit e120f46768d98151ece8756ebd688b0e43dc8b29 ]
    
    Raw IP packets have no MAC header, leaving skb->mac_header uninitialized.
    This can trigger kernel panics on ARM64 when xfrm or other subsystems
    access the offset due to strict alignment checks.
    
    Initialize the MAC header to prevent such crashes.
    
    This can trigger kernel panics on ARM when running IPsec over the
    qmimux0 interface.
    
    Example trace:
    
        Internal error: Oops: 000000009600004f [#1] SMP
        CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 6.12.34-gbe78e49cb433 #1
        Hardware name: LS1028A RDB Board (DT)
        pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
        pc : xfrm_input+0xde8/0x1318
        lr : xfrm_input+0x61c/0x1318
        sp : ffff800080003b20
        Call trace:
         xfrm_input+0xde8/0x1318
         xfrm6_rcv+0x38/0x44
         xfrm6_esp_rcv+0x48/0xa8
         ip6_protocol_deliver_rcu+0x94/0x4b0
         ip6_input_finish+0x44/0x70
         ip6_input+0x44/0xc0
         ipv6_rcv+0x6c/0x114
         __netif_receive_skb_one_core+0x5c/0x8c
         __netif_receive_skb+0x18/0x60
         process_backlog+0x78/0x17c
         __napi_poll+0x38/0x180
         net_rx_action+0x168/0x2f0
    
    Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
    Signed-off-by: Qendrim Maxhuni <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: vlan: sync VLAN features with lower device [+ + +]
Author: Hangbin Liu <[email protected]>
Date:   Thu Oct 30 07:35:39 2025 +0000

    net: vlan: sync VLAN features with lower device
    
    [ Upstream commit c211f5d7cbd5cb34489d526648bb9c8ecc907dee ]
    
    After registering a VLAN device and setting its feature flags, we need to
    synchronize the VLAN features with the lower device. For example, the VLAN
    device does not have the NETIF_F_LRO flag, it should be synchronized with
    the lower device based on the NETIF_F_UPPER_DISABLES definition.
    
    As the dev->vlan_features has changed, we need to call
    netdev_update_features(). The caller must run after netdev_upper_dev_link()
    links the lower devices, so this patch adds the netdev_update_features()
    call in register_vlan_dev().
    
    Fixes: fd867d51f889 ("net/core: generic support for disabling netdev features down stack")
    Signed-off-by: Hangbin Liu <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net: When removing nexthops, don't call synchronize_net if it is not necessary [+ + +]
Author: Christoph Paasch <[email protected]>
Date:   Sat Aug 16 16:12:49 2025 -0700

    net: When removing nexthops, don't call synchronize_net if it is not necessary
    
    [ Upstream commit b0ac6d3b56a2384db151696cfda2836a8a961b6d ]
    
    When removing a nexthop, commit
    90f33bffa382 ("nexthops: don't modify published nexthop groups") added a
    call to synchronize_rcu() (later changed to _net()) to make sure
    everyone sees the new nexthop-group before the rtnl-lock is released.
    
    When one wants to delete a large number of groups and nexthops, it is
    fastest to first flush the groups (ip nexthop flush groups) and then
    flush the nexthops themselves (ip -6 nexthop flush). As that way the
    groups don't need to be rebalanced.
    
    However, `ip -6 nexthop flush` will still take a long time if there is
    a very large number of nexthops because of the call to
    synchronize_net(). Now, if there are no more groups, there is no point
    in calling synchronize_net(). So, let's skip that entirely by checking
    if nh->grp_list is empty.
    
    This gives us a nice speedup:
    
    BEFORE:
    =======
    
    $ time sudo ip -6 nexthop flush
    Dump was interrupted and may be inconsistent.
    Flushed 2097152 nexthops
    
    real    1m45.345s
    user    0m0.001s
    sys     0m0.005s
    
    $ time sudo ip -6 nexthop flush
    Dump was interrupted and may be inconsistent.
    Flushed 4194304 nexthops
    
    real    3m10.430s
    user    0m0.002s
    sys     0m0.004s
    
    AFTER:
    ======
    
    $ time sudo ip -6 nexthop flush
    Dump was interrupted and may be inconsistent.
    Flushed 2097152 nexthops
    
    real    0m17.545s
    user    0m0.003s
    sys     0m0.003s
    
    $ time sudo ip -6 nexthop flush
    Dump was interrupted and may be inconsistent.
    Flushed 4194304 nexthops
    
    real    0m35.823s
    user    0m0.002s
    sys     0m0.004s
    
    Signed-off-by: Christoph Paasch <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Reviewed-by: Nikolay Aleksandrov <[email protected]>
    Reviewed-by: Eric Dumazet <[email protected]>
    Reviewed-by: David Ahern <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
net_sched: limit try_bulk_dequeue_skb() batches [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Sun Nov 9 16:12:15 2025 +0000

    net_sched: limit try_bulk_dequeue_skb() batches
    
    [ Upstream commit 0345552a653ce5542affeb69ac5aa52177a5199b ]
    
    After commit 100dfa74cad9 ("inet: dev_queue_xmit() llist adoption")
    I started seeing many qdisc requeues on IDPF under high TX workload.
    
    $ tc -s qd sh dev eth1 handle 1: ; sleep 1; tc -s qd sh dev eth1 handle 1:
    qdisc mq 1: root
     Sent 43534617319319 bytes 268186451819 pkt (dropped 0, overlimits 0 requeues 3532840114)
     backlog 1056Kb 6675p requeues 3532840114
    qdisc mq 1: root
     Sent 43554665866695 bytes 268309964788 pkt (dropped 0, overlimits 0 requeues 3537737653)
     backlog 781164b 4822p requeues 3537737653
    
    This is caused by try_bulk_dequeue_skb() being only limited by BQL budget.
    
    perf record -C120-239 -e qdisc:qdisc_dequeue sleep 1 ; perf script
    ...
     netperf 75332 [146]  2711.138269: qdisc:qdisc_dequeue: dequeue ifindex=5 qdisc handle=0x80150000 parent=0x10013 txq_state=0x0 packets=1292 skbaddr=0xff378005a1e9f200
     netperf 75332 [146]  2711.138953: qdisc:qdisc_dequeue: dequeue ifindex=5 qdisc handle=0x80150000 parent=0x10013 txq_state=0x0 packets=1213 skbaddr=0xff378004d607a500
     netperf 75330 [144]  2711.139631: qdisc:qdisc_dequeue: dequeue ifindex=5 qdisc handle=0x80150000 parent=0x10013 txq_state=0x0 packets=1233 skbaddr=0xff3780046be20100
     netperf 75333 [147]  2711.140356: qdisc:qdisc_dequeue: dequeue ifindex=5 qdisc handle=0x80150000 parent=0x10013 txq_state=0x0 packets=1093 skbaddr=0xff37800514845b00
     netperf 75337 [151]  2711.141037: qdisc:qdisc_dequeue: dequeue ifindex=5 qdisc handle=0x80150000 parent=0x10013 txq_state=0x0 packets=1353 skbaddr=0xff37800460753300
     netperf 75337 [151]  2711.141877: qdisc:qdisc_dequeue: dequeue ifindex=5 qdisc handle=0x80150000 parent=0x10013 txq_state=0x0 packets=1367 skbaddr=0xff378004e72c7b00
     netperf 75330 [144]  2711.142643: qdisc:qdisc_dequeue: dequeue ifindex=5 qdisc handle=0x80150000 parent=0x10013 txq_state=0x0 packets=1202 skbaddr=0xff3780045bd60000
    ...
    
    This is bad because :
    
    1) Large batches hold one victim cpu for a very long time.
    
    2) Driver often hit their own TX ring limit (all slots are used).
    
    3) We call dev_requeue_skb()
    
    4) Requeues are using a FIFO (q->gso_skb), breaking qdisc ability to
       implement FQ or priority scheduling.
    
    5) dequeue_skb() gets packets from q->gso_skb one skb at a time
       with no xmit_more support. This is causing many spinlock games
       between the qdisc and the device driver.
    
    Requeues were supposed to be very rare, lets keep them this way.
    
    Limit batch sizes to /proc/sys/net/core/dev_weight (default 64) as
    __qdisc_run() was designed to use.
    
    Fixes: 5772e9a3463b ("qdisc: bulk dequeue support for qdiscs with TCQ_F_ONETXQUEUE")
    Signed-off-by: Eric Dumazet <[email protected]>
    Reviewed-by: Toke Høiland-Jørgensen <[email protected]>
    Acked-by: Jesper Dangaard Brouer <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

net_sched: remove need_resched() from qdisc_run() [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Tue Oct 1 14:02:36 2019 -0700

    net_sched: remove need_resched() from qdisc_run()
    
    [ Upstream commit b60fa1c5d01a10e358c509b904d4bead6114d593 ]
    
    The introduction of this schedule point was done in commit
    2ba2506ca7ca ("[NET]: Add preemption point in qdisc_run")
    at a time the loop was not bounded.
    
    Then later in commit d5b8aa1d246f ("net_sched: fix dequeuer fairness")
    we added a limit on the number of packets.
    
    Now is the time to remove the schedule point, since the default
    limit of 64 packets matches the number of packets a typical NAPI
    poll can process in a row.
    
    This solves a latency problem for most TCP receivers under moderate load :
    
    1) host receives a packet.
       NET_RX_SOFTIRQ is raised by NIC hard IRQ handler
    
    2) __do_softirq() does its first loop, handling NET_RX_SOFTIRQ
       and calling the driver napi->loop() function
    
    3) TCP stores the skb in socket receive queue:
    
    4) TCP calls sk->sk_data_ready() and wakeups a user thread
       waiting for EPOLLIN (as a result, need_resched() might now be true)
    
    5) TCP cooks an ACK and sends it.
    
    6) qdisc_run() processes one packet from qdisc, and sees need_resched(),
       this raises NET_TX_SOFTIRQ (even if there are no more packets in
       the qdisc)
    
    Then we go back to the __do_softirq() in 2), and we see that new
    softirqs were raised. Since need_resched() is true, we end up waking
    ksoftirqd in this path :
    
        if (pending) {
                if (time_before(jiffies, end) && !need_resched() &&
                    --max_restart)
                        goto restart;
    
                wakeup_softirqd();
        }
    
    So we have many wakeups of ksoftirqd kernel threads,
    and more calls to qdisc_run() with associated lock overhead.
    
    Note that another way to solve the issue would be to change TCP
    to first send the ACK packet, then signal the EPOLLIN,
    but this changes P99 latencies, as sending the ACK packet
    can add a long delay.
    
    Signed-off-by: Eric Dumazet <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 0345552a653c ("net_sched: limit try_bulk_dequeue_skb() batches")
    Signed-off-by: Sasha Levin <[email protected]>

 
NFS4: Fix state renewals missing after boot [+ + +]
Author: Joshua Watt <[email protected]>
Date:   Thu Oct 9 15:48:04 2025 -0600

    NFS4: Fix state renewals missing after boot
    
    [ Upstream commit 9bb3baa9d1604cd20f49ae7dac9306b4037a0e7a ]
    
    Since the last renewal time was initialized to 0 and jiffies start
    counting at -5 minutes, any clients connected in the first 5 minutes
    after a reboot would have their renewal timer set to a very long
    interval. If the connection was idle, this would result in the client
    state timing out on the server and the next call to the server would
    return NFS4ERR_BADSESSION.
    
    Fix this by initializing the last renewal time to the current jiffies
    instead of 0.
    
    Signed-off-by: Joshua Watt <[email protected]>
    Signed-off-by: Anna Schumaker <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
nfs4_setup_readdir(): insufficient locking for ->d_parent->d_inode dereferencing [+ + +]
Author: Al Viro <[email protected]>
Date:   Tue Sep 16 17:22:45 2025 +0100

    nfs4_setup_readdir(): insufficient locking for ->d_parent->d_inode dereferencing
    
    [ Upstream commit a890a2e339b929dbd843328f9a92a1625404fe63 ]
    
    Theoretically it's an oopsable race, but I don't believe one can manage
    to hit it on real hardware; might become doable on a KVM, but it still
    won't be easy to attack.
    
    Anyway, it's easy to deal with - since xdr_encode_hyper() is just a call of
    put_unaligned_be64(), we can put that under ->d_lock and be done with that.
    
    Signed-off-by: Al Viro <[email protected]>
    Signed-off-by: Anna Schumaker <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFSv4.1: fix mount hang after CREATE_SESSION failure [+ + +]
Author: Anthony Iliopoulos <[email protected]>
Date:   Wed Aug 13 11:00:47 2025 +0200

    NFSv4.1: fix mount hang after CREATE_SESSION failure
    
    [ Upstream commit bf75ad096820fee5da40e671ebb32de725a1c417 ]
    
    When client initialization goes through server trunking discovery, it
    schedules the state manager and then sleeps waiting for nfs_client
    initialization completion.
    
    The state manager can fail during state recovery, and specifically in
    lease establishment as nfs41_init_clientid() will bail out in case of
    errors returned from nfs4_proc_create_session(), without ever marking
    the client ready. The session creation can fail for a variety of reasons
    e.g. during backchannel parameter negotiation, with status -EINVAL.
    
    The error status will propagate all the way to the nfs4_state_manager
    but the client status will not be marked, and thus the mount process
    will remain blocked waiting.
    
    Fix it by adding -EINVAL error handling to nfs4_state_manager().
    
    Signed-off-by: Anthony Iliopoulos <[email protected]>
    Signed-off-by: Anna Schumaker <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
NFSv4: handle ERR_GRACE on delegation recalls [+ + +]
Author: Olga Kornievskaia <[email protected]>
Date:   Mon Aug 11 14:18:48 2025 -0400

    NFSv4: handle ERR_GRACE on delegation recalls
    
    [ Upstream commit be390f95242785adbf37d7b8a5101dd2f2ba891b ]
    
    RFC7530 states that clients should be prepared for the return of
    NFS4ERR_GRACE errors for non-reclaim lock and I/O requests.
    
    Signed-off-by: Olga Kornievskaia <[email protected]>
    Signed-off-by: Anna Schumaker <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
orangefs: fix xattr related buffer overflow... [+ + +]
Author: Mike Marshall <[email protected]>
Date:   Mon Sep 15 17:40:46 2025 -0400

    orangefs: fix xattr related buffer overflow...
    
    [ Upstream commit 025e880759c279ec64d0f754fe65bf45961da864 ]
    
    Willy Tarreau <[email protected]> forwarded me a message from
    Disclosure <[email protected]> with the following
    warning:
    
    > The helper `xattr_key()` uses the pointer variable in the loop condition
    > rather than dereferencing it. As `key` is incremented, it remains non-NULL
    > (until it runs into unmapped memory), so the loop does not terminate on
    > valid C strings and will walk memory indefinitely, consuming CPU or hanging
    > the thread.
    
    I easily reproduced this with setfattr and getfattr, causing a kernel
    oops, hung user processes and corrupted orangefs files. Disclosure
    sent along a diff (not a patch) with a suggested fix, which I based
    this patch on.
    
    After xattr_key started working right, xfstest generic/069 exposed an
    xattr related memory leak that lead to OOM. xattr_key returns
    a hashed key.  When adding xattrs to the orangefs xattr cache, orangefs
    used hash_add, a kernel hashing macro. hash_add also hashes the key using
    hash_log which resulted in additions to the xattr cache going to the wrong
    hash bucket. generic/069 tortures a single file and orangefs does a
    getattr for the xattr "security.capability" every time. Orangefs
    negative caches on xattrs which includes a kmalloc. Since adds to the
    xattr cache were going to the wrong bucket, every getattr for
    "security.capability" resulted in another kmalloc, none of which were
    ever freed.
    
    I changed the two uses of hash_add to hlist_add_head instead
    and the memory leak ceased and generic/069 quit throwing furniture.
    
    Signed-off-by: Mike Marshall <[email protected]>
    Reported-by: Stanislav Fort of Aisle Research <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
page_pool: Clamp pool size to max 16K pages [+ + +]
Author: Dragos Tatulea <[email protected]>
Date:   Fri Sep 26 16:16:05 2025 +0300

    page_pool: Clamp pool size to max 16K pages
    
    [ Upstream commit a1b501a8c6a87c9265fd03bd004035199e2e8128 ]
    
    page_pool_init() returns E2BIG when the page_pool size goes above 32K
    pages. As some drivers are configuring the page_pool size according to
    the MTU and ring size, there are cases where this limit is exceeded and
    the queue creation fails.
    
    The page_pool size doesn't have to cover a full queue, especially for
    larger ring size. So clamp the size instead of returning an error. Do
    this in the core to avoid having each driver do the clamping.
    
    The current limit was deemed to high [1] so it was reduced to 16K to avoid
    page waste.
    
    [1] https://lore.kernel.org/all/[email protected]/
    
    Signed-off-by: Dragos Tatulea <[email protected]>
    Reviewed-by: Tariq Toukan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Paolo Abeni <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
PCI/P2PDMA: Fix incorrect pointer usage in devm_kfree() call [+ + +]
Author: Sungho Kim <[email protected]>
Date:   Wed Aug 20 19:57:14 2025 +0900

    PCI/P2PDMA: Fix incorrect pointer usage in devm_kfree() call
    
    [ Upstream commit 6238784e502b6a9fbeb3a6b77284b29baa4135cc ]
    
    The error handling path in pci_p2pdma_add_resource() contains a bug in its
    `pgmap_free` label.
    
    Memory is allocated for the `p2p_pgmap` struct, and the pointer is stored
    in `p2p_pgmap`. However, the error path calls devm_kfree() with `pgmap`,
    which is a pointer to a member field within the `p2p_pgmap` struct, not the
    base pointer of the allocation.
    
    Correct the bug by passing the correct base pointer, `p2p_pgmap`, to
    devm_kfree().
    
    Signed-off-by: Sungho Kim <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Logan Gunthorpe <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
PCI: Disable MSI on RDC PCI to PCIe bridges [+ + +]
Author: Marcos Del Sol Vives <[email protected]>
Date:   Sun Jul 6 01:32:08 2025 +0200

    PCI: Disable MSI on RDC PCI to PCIe bridges
    
    [ Upstream commit ebc7086b39e5e4f3d3ca82caaea20538c9b62d42 ]
    
    RDC PCI to PCIe bridges, present on Vortex86DX3 and Vortex86EX2 SoCs, do
    not support MSIs. If enabled, interrupts generated by PCIe devices never
    reach the processor.
    
    I have contacted the manufacturer (DM&P) and they confirmed that PCI MSIs
    need to be disabled for them.
    
    Signed-off-by: Marcos Del Sol Vives <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
phy: cadence: cdns-dphy: Enable lower resolutions in dphy [+ + +]
Author: Harikrishna Shenoy <[email protected]>
Date:   Thu Aug 7 10:50:02 2025 +0530

    phy: cadence: cdns-dphy: Enable lower resolutions in dphy
    
    [ Upstream commit 43bd2c44515f8ee5c019ce6e6583f5640387a41b ]
    
    Enable support for data lane rates between 80-160 Mbps cdns dphy
    as mentioned in TRM [0] by setting the pll_opdiv field to 16.
    This change enables lower resolutions like 640x480 at 60Hz.
    
    [0]: https://www.ti.com/lit/zip/spruil1
    (Table 12-552. DPHY_TX_PLL_CTRL Register Field Descriptions)
    
    Reviewed-by: Udit Kumar <[email protected]>
    Reviewed-by: Devarsh Thakkar <[email protected]>
    Signed-off-by: Harikrishna Shenoy <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Vinod Koul <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
pmdomain: arm: scmi: Fix genpd leak on provider registration failure [+ + +]
Author: Sudeep Holla <[email protected]>
Date:   Fri Nov 21 12:16:05 2025 -0500

    pmdomain: arm: scmi: Fix genpd leak on provider registration failure
    
    [ Upstream commit 7458f72cc28f9eb0de811effcb5376d0ec19094a ]
    
    If of_genpd_add_provider_onecell() fails during probe, the previously
    created generic power domains are not removed, leading to a memory leak
    and potential kernel crash later in genpd_debug_add().
    
    Add proper error handling to unwind the initialized domains before
    returning from probe to ensure all resources are correctly released on
    failure.
    
    Example crash trace observed without this fix:
    
      | Unable to handle kernel paging request at virtual address fffffffffffffc70
      | CPU: 1 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.18.0-rc1 #405 PREEMPT
      | Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform
      | pstate: 00000005 (nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
      | pc : genpd_debug_add+0x2c/0x160
      | lr : genpd_debug_init+0x74/0x98
      | Call trace:
      |  genpd_debug_add+0x2c/0x160 (P)
      |  genpd_debug_init+0x74/0x98
      |  do_one_initcall+0xd0/0x2d8
      |  do_initcall_level+0xa0/0x140
      |  do_initcalls+0x60/0xa8
      |  do_basic_setup+0x28/0x40
      |  kernel_init_freeable+0xe8/0x170
      |  kernel_init+0x2c/0x140
      |  ret_from_fork+0x10/0x20
    
    Fixes: 898216c97ed2 ("firmware: arm_scmi: add device power domain support using genpd")
    Signed-off-by: Sudeep Holla <[email protected]>
    Reviewed-by: Peng Fan <[email protected]>
    Cc: [email protected]
    Signed-off-by: Ulf Hansson <[email protected]>
    [ drivers/pmdomain/arm/scmi_pm_domain.c -> drivers/firmware/arm_scmi/scmi_pm_domain.c ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

pmdomain: imx: Fix reference count leak in imx_gpc_remove [+ + +]
Author: Miaoqian Lin <[email protected]>
Date:   Fri Nov 21 12:15:53 2025 -0500

    pmdomain: imx: Fix reference count leak in imx_gpc_remove
    
    [ Upstream commit bbde14682eba21d86f5f3d6fe2d371b1f97f1e61 ]
    
    of_get_child_by_name() returns a node pointer with refcount incremented, we
    should use of_node_put() on it when not needed anymore. Add the missing
    of_node_put() to avoid refcount leak.
    
    Fixes: 721cabf6c660 ("soc: imx: move PGC handling to a new GPC driver")
    Cc: [email protected]
    Signed-off-by: Miaoqian Lin <[email protected]>
    Signed-off-by: Ulf Hansson <[email protected]>
    [ drivers/pmdomain/imx/gpc.c -> drivers/soc/imx/gpc.c ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
powerpc/eeh: Use result of error_detected() in uevent [+ + +]
Author: Niklas Schnelle <[email protected]>
Date:   Thu Aug 7 15:55:40 2025 +0200

    powerpc/eeh: Use result of error_detected() in uevent
    
    [ Upstream commit 704e5dd1c02371dfc7d22e1520102b197a3b628b ]
    
    Ever since uevent support was added for AER and EEH with commit
    856e1eb9bdd4 ("PCI/AER: Add uevents in AER and EEH error/resume"), it
    reported PCI_ERS_RESULT_NONE as uevent when recovery begins.
    
    Commit 7b42d97e99d3 ("PCI/ERR: Always report current recovery status for
    udev") subsequently amended AER to report the actual return value of
    error_detected().
    
    Make the same change to EEH to align it with AER and s390.
    
    Suggested-by: Lukas Wunner <[email protected]>
    Link: https://lore.kernel.org/linux-pci/[email protected]/
    Signed-off-by: Niklas Schnelle <[email protected]>
    Signed-off-by: Bjorn Helgaas <[email protected]>
    Reviewed-by: Lukas Wunner <[email protected]>
    Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
    Acked-by: Mahesh Salgaonkar <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
rds: Fix endianness annotation for RDS_MPATH_HASH [+ + +]
Author: Ujwal Kundur <[email protected]>
Date:   Wed Aug 20 23:25:49 2025 +0530

    rds: Fix endianness annotation for RDS_MPATH_HASH
    
    [ Upstream commit 77907a068717fbefb25faf01fecca553aca6ccaa ]
    
    jhash_1word accepts host endian inputs while rs_bound_port is a be16
    value (sockaddr_in6.sin6_port). Use ntohs() for consistency.
    
    Flagged by Sparse.
    
    Signed-off-by: Ujwal Kundur <[email protected]>
    Reviewed-by: Allison Henderson <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
regmap: slimbus: fix bus_context pointer in regmap init calls [+ + +]
Author: Alexey Klimov <[email protected]>
Date:   Wed Oct 22 21:10:12 2025 +0100

    regmap: slimbus: fix bus_context pointer in regmap init calls
    
    commit 434f7349a1f00618a620b316f091bd13a12bc8d2 upstream.
    
    Commit 4e65bda8273c ("ASoC: wcd934x: fix error handling in
    wcd934x_codec_parse_data()") revealed the problem in the slimbus regmap.
    That commit breaks audio playback, for instance, on sdm845 Thundercomm
    Dragonboard 845c board:
    
     Unable to handle kernel paging request at virtual address ffff8000847cbad4
     ...
     CPU: 5 UID: 0 PID: 776 Comm: aplay Not tainted 6.18.0-rc1-00028-g7ea30958b305 #11 PREEMPT
     Hardware name: Thundercomm Dragonboard 845c (DT)
     ...
     Call trace:
      slim_xfer_msg+0x24/0x1ac [slimbus] (P)
      slim_read+0x48/0x74 [slimbus]
      regmap_slimbus_read+0x18/0x24 [regmap_slimbus]
      _regmap_raw_read+0xe8/0x174
      _regmap_bus_read+0x44/0x80
      _regmap_read+0x60/0xd8
      _regmap_update_bits+0xf4/0x140
      _regmap_select_page+0xa8/0x124
      _regmap_raw_write_impl+0x3b8/0x65c
      _regmap_bus_raw_write+0x60/0x80
      _regmap_write+0x58/0xc0
      regmap_write+0x4c/0x80
      wcd934x_hw_params+0x494/0x8b8 [snd_soc_wcd934x]
      snd_soc_dai_hw_params+0x3c/0x7c [snd_soc_core]
      __soc_pcm_hw_params+0x22c/0x634 [snd_soc_core]
      dpcm_be_dai_hw_params+0x1d4/0x38c [snd_soc_core]
      dpcm_fe_dai_hw_params+0x9c/0x17c [snd_soc_core]
      snd_pcm_hw_params+0x124/0x464 [snd_pcm]
      snd_pcm_common_ioctl+0x110c/0x1820 [snd_pcm]
      snd_pcm_ioctl+0x34/0x4c [snd_pcm]
      __arm64_sys_ioctl+0xac/0x104
      invoke_syscall+0x48/0x104
      el0_svc_common.constprop.0+0x40/0xe0
      do_el0_svc+0x1c/0x28
      el0_svc+0x34/0xec
      el0t_64_sync_handler+0xa0/0xf0
      el0t_64_sync+0x198/0x19c
    
    The __devm_regmap_init_slimbus() started to be used instead of
    __regmap_init_slimbus() after the commit mentioned above and turns out
    the incorrect bus_context pointer (3rd argument) was used in
    __devm_regmap_init_slimbus(). It should be just "slimbus" (which is equal
    to &slimbus->dev). Correct it. The wcd934x codec seems to be the only or
    the first user of devm_regmap_init_slimbus() but we should fix it till
    the point where __devm_regmap_init_slimbus() was introduced therefore
    two "Fixes" tags.
    
    While at this, also correct the same argument in __regmap_init_slimbus().
    
    Fixes: 4e65bda8273c ("ASoC: wcd934x: fix error handling in wcd934x_codec_parse_data()")
    Fixes: 7d6f7fb053ad ("regmap: add SLIMbus support")
    Cc: [email protected]
    Cc: Dmitry Baryshkov <[email protected]>
    Cc: Ma Ke <[email protected]>
    Cc: Steev Klimaszewski <[email protected]>
    Cc: Srinivas Kandagatla <[email protected]>
    Reviewed-by: Abel Vesa <[email protected]>
    Signed-off-by: Alexey Klimov <[email protected]>
    Reviewed-by: Dmitry Baryshkov <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
regulator: fixed: fix GPIO descriptor leak on register failure [+ + +]
Author: Haotian Zhang <[email protected]>
Date:   Wed Oct 29 01:28:28 2025 +0800

    regulator: fixed: fix GPIO descriptor leak on register failure
    
    [ Upstream commit 636f4618b1cd96f6b5a2b8c7c4f665c8533ecf13 ]
    
    In the commit referenced by the Fixes tag,
    devm_gpiod_get_optional() was replaced by manual
    GPIO management, relying on the regulator core to release the
    GPIO descriptor. However, this approach does not account for the
    error path: when regulator registration fails, the core never
    takes over the GPIO, resulting in a resource leak.
    
    Add gpiod_put() before returning on regulator registration failure.
    
    Fixes: 5e6f3ae5c13b ("regulator: fixed: Let core handle GPIO descriptor")
    Signed-off-by: Haotian Zhang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

regulator: fixed: use dev_err_probe for register [+ + +]
Author: Chris Morgan <[email protected]>
Date:   Wed Jul 21 11:57:16 2021 -0500

    regulator: fixed: use dev_err_probe for register
    
    [ Upstream commit d0f95e6496a974a890df5eda65ffaee66ab0dc73 ]
    
    Instead of returning error directly, use dev_err_probe. This avoids
    messages in the dmesg log for devices which will be probed again later.
    
    Signed-off-by: Chris Morgan <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Stable-dep-of: 636f4618b1cd ("regulator: fixed: fix GPIO descriptor leak on register failure")
    Signed-off-by: Sasha Levin <[email protected]>

 
remoteproc: qcom: q6v5: Avoid handling handover twice [+ + +]
Author: Stephan Gerhold <[email protected]>
Date:   Wed Aug 20 18:02:34 2025 +0200

    remoteproc: qcom: q6v5: Avoid handling handover twice
    
    [ Upstream commit 54898664e1eb6b5b3e6cdd9343c6eb15da776153 ]
    
    A remoteproc could theoretically signal handover twice. This is unexpected
    and would break the reference counting for the handover resources (power
    domains, clocks, regulators, etc), so add a check to prevent that from
    happening.
    
    Reviewed-by: Dmitry Baryshkov <[email protected]>
    Signed-off-by: Stephan Gerhold <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
s390/ctcm: Fix double-kfree [+ + +]
Author: Aleksei Nikiforov <[email protected]>
Date:   Wed Nov 12 19:27:24 2025 +0100

    s390/ctcm: Fix double-kfree
    
    [ Upstream commit da02a1824884d6c84c5e5b5ac373b0c9e3288ec2 ]
    
    The function 'mpc_rcvd_sweep_req(mpcginfo)' is called conditionally
    from function 'ctcmpc_unpack_skb'. It frees passed mpcginfo.
    After that a call to function 'kfree' in function 'ctcmpc_unpack_skb'
    frees it again.
    
    Remove 'kfree' call in function 'mpc_rcvd_sweep_req(mpcginfo)'.
    
    Bug detected by the clang static analyzer.
    
    Fixes: 0c0b20587b9f25a2 ("s390/ctcm: fix potential memory leak")
    Reviewed-by: Aswin Karuvally <[email protected]>
    Signed-off-by: Aleksei Nikiforov <[email protected]>
    Signed-off-by: Aswin Karuvally <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
scsi: lpfc: Check return status of lpfc_reset_flush_io_context during TGT_RESET [+ + +]
Author: Justin Tee <[email protected]>
Date:   Mon Sep 15 11:08:03 2025 -0700

    scsi: lpfc: Check return status of lpfc_reset_flush_io_context during TGT_RESET
    
    [ Upstream commit f408dde2468b3957e92b25e7438f74c8e9fb9e73 ]
    
    If lpfc_reset_flush_io_context fails to execute, then the wrong return
    status code may be passed back to upper layers when issuing a target
    reset TMF command.  Fix by checking the return status from
    lpfc_reset_flush_io_context() first in order to properly return FAILED
    or FAST_IO_FAIL.
    
    Signed-off-by: Justin Tee <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

scsi: lpfc: Define size of debugfs entry for xri rebalancing [+ + +]
Author: Justin Tee <[email protected]>
Date:   Mon Sep 15 11:08:05 2025 -0700

    scsi: lpfc: Define size of debugfs entry for xri rebalancing
    
    [ Upstream commit 5de09770b1c0e229d2cec93e7f634fcdc87c9bc8 ]
    
    To assist in debugging lpfc_xri_rebalancing driver parameter, a debugfs
    entry is used.  The debugfs file operations for xri rebalancing have
    been previously implemented, but lack definition for its information
    buffer size.  Similar to other pre-existing debugfs entry buffers,
    define LPFC_HDWQINFO_SIZE as 8192 bytes.
    
    Signed-off-by: Justin Tee <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

scsi: pm8001: Use int instead of u32 to store error codes [+ + +]
Author: Qianfeng Rong <[email protected]>
Date:   Tue Aug 26 17:32:42 2025 +0800

    scsi: pm8001: Use int instead of u32 to store error codes
    
    [ Upstream commit bee3554d1a4efbce91d6eca732f41b97272213a5 ]
    
    Use int instead of u32 for 'ret' variable to store negative error codes
    returned by PM8001_CHIP_DISP->set_nvmd_req().
    
    Signed-off-by: Qianfeng Rong <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

scsi: sg: Do not sleep in atomic context [+ + +]
Author: Bart Van Assche <[email protected]>
Date:   Thu Nov 13 10:16:43 2025 -0800

    scsi: sg: Do not sleep in atomic context
    
    commit 90449f2d1e1f020835cba5417234636937dd657e upstream.
    
    sg_finish_rem_req() calls blk_rq_unmap_user(). The latter function may
    sleep. Hence, call sg_finish_rem_req() with interrupts enabled instead
    of disabled.
    
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/linux-scsi/[email protected]/
    Cc: Hannes Reinecke <[email protected]>
    Cc: [email protected]
    Fixes: 97d27b0dd015 ("scsi: sg: close race condition in sg_remove_sfp_usercontext()")
    Signed-off-by: Bart Van Assche <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

scsi: target: tcm_loop: Fix segfault in tcm_loop_tpg_address_show() [+ + +]
Author: Hamza Mahfooz <[email protected]>
Date:   Wed Nov 5 11:25:46 2025 -0800

    scsi: target: tcm_loop: Fix segfault in tcm_loop_tpg_address_show()
    
    commit e6965188f84a7883e6a0d3448e86b0cf29b24dfc upstream.
    
    If the allocation of tl_hba->sh fails in tcm_loop_driver_probe() and we
    attempt to dereference it in tcm_loop_tpg_address_show() we will get a
    segfault, see below for an example. So, check tl_hba->sh before
    dereferencing it.
    
      Unable to allocate struct scsi_host
      BUG: kernel NULL pointer dereference, address: 0000000000000194
      #PF: supervisor read access in kernel mode
      #PF: error_code(0x0000) - not-present page
      PGD 0 P4D 0
      Oops: 0000 [#1] PREEMPT SMP NOPTI
      CPU: 1 PID: 8356 Comm: tokio-runtime-w Not tainted 6.6.104.2-4.azl3 #1
      Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS Hyper-V UEFI Release v4.1 09/28/2024
      RIP: 0010:tcm_loop_tpg_address_show+0x2e/0x50 [tcm_loop]
    ...
      Call Trace:
       <TASK>
       configfs_read_iter+0x12d/0x1d0 [configfs]
       vfs_read+0x1b5/0x300
       ksys_read+0x6f/0xf0
    ...
    
    Cc: [email protected]
    Fixes: 2628b352c3d4 ("tcm_loop: Show address of tpg in configfs")
    Signed-off-by: Hamza Mahfooz <[email protected]>
    Reviewed-by: Chaitanya Kulkarni <[email protected]>
    Reviewed-by: Allen Pais <[email protected]>
    Link: https://patch.msgid.link/1762370746-6304-1-git-send-email-hamzamahfooz@linux.microsoft.com
    Signed-off-by: Martin K. Petersen <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
sctp: get netns from asoc and ep base [+ + +]
Author: Xin Long <[email protected]>
Date:   Mon Dec 9 13:45:18 2019 +0800

    sctp: get netns from asoc and ep base
    
    [ Upstream commit 4e7696d90b51a1a73ce0e8174f3aff58b914619c ]
    
    Commit 312434617cb1 ("sctp: cache netns in sctp_ep_common") set netns
    in asoc and ep base since they're created, and it will never change.
    It's a better way to get netns from asoc and ep base, comparing to
    calling sock_net().
    
    This patch is to replace them.
    
    v1->v2:
      - no change.
    
    Suggested-by: Marcelo Ricardo Leitner <[email protected]>
    Signed-off-by: Xin Long <[email protected]>
    Acked-by: Neil Horman <[email protected]>
    Acked-by: Marcelo Ricardo Leitner <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 1534ff77757e ("sctp: prevent possible shift-out-of-bounds in sctp_transport_update_rto")
    Signed-off-by: Sasha Levin <[email protected]>

sctp: Hold RCU read lock while iterating over address list [+ + +]
Author: Stefan Wiehler <[email protected]>
Date:   Tue Oct 28 17:12:26 2025 +0100

    sctp: Hold RCU read lock while iterating over address list
    
    [ Upstream commit 38f50242bf0f237cdc262308d624d333286ec3c5 ]
    
    With CONFIG_PROVE_RCU_LIST=y and by executing
    
      $ netcat -l --sctp &
      $ netcat --sctp localhost &
      $ ss --sctp
    
    one can trigger the following Lockdep-RCU splat(s):
    
      WARNING: suspicious RCU usage
      6.18.0-rc1-00093-g7f864458e9a6 #5 Not tainted
      -----------------------------
      net/sctp/diag.c:76 RCU-list traversed in non-reader section!!
    
      other info that might help us debug this:
    
      rcu_scheduler_active = 2, debug_locks = 1
      2 locks held by ss/215:
       #0: ffff9c740828bec0 (nlk_cb_mutex-SOCK_DIAG){+.+.}-{4:4}, at: __netlink_dump_start+0x84/0x2b0
       #1: ffff9c7401d72cd0 (sk_lock-AF_INET6){+.+.}-{0:0}, at: sctp_sock_dump+0x38/0x200
    
      stack backtrace:
      CPU: 0 UID: 0 PID: 215 Comm: ss Not tainted 6.18.0-rc1-00093-g7f864458e9a6 #5 PREEMPT(voluntary)
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
      Call Trace:
       <TASK>
       dump_stack_lvl+0x5d/0x90
       lockdep_rcu_suspicious.cold+0x4e/0xa3
       inet_sctp_diag_fill.isra.0+0x4b1/0x5d0
       sctp_sock_dump+0x131/0x200
       sctp_transport_traverse_process+0x170/0x1b0
       ? __pfx_sctp_sock_filter+0x10/0x10
       ? __pfx_sctp_sock_dump+0x10/0x10
       sctp_diag_dump+0x103/0x140
       __inet_diag_dump+0x70/0xb0
       netlink_dump+0x148/0x490
       __netlink_dump_start+0x1f3/0x2b0
       inet_diag_handler_cmd+0xcd/0x100
       ? __pfx_inet_diag_dump_start+0x10/0x10
       ? __pfx_inet_diag_dump+0x10/0x10
       ? __pfx_inet_diag_dump_done+0x10/0x10
       sock_diag_rcv_msg+0x18e/0x320
       ? __pfx_sock_diag_rcv_msg+0x10/0x10
       netlink_rcv_skb+0x4d/0x100
       netlink_unicast+0x1d7/0x2b0
       netlink_sendmsg+0x203/0x450
       ____sys_sendmsg+0x30c/0x340
       ___sys_sendmsg+0x94/0xf0
       __sys_sendmsg+0x83/0xf0
       do_syscall_64+0xbb/0x390
       entry_SYSCALL_64_after_hwframe+0x77/0x7f
       ...
       </TASK>
    
    Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file")
    Signed-off-by: Stefan Wiehler <[email protected]>
    Reviewed-by: Kuniyuki Iwashima <[email protected]>
    Acked-by: Xin Long <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

sctp: prevent possible shift-out-of-bounds in sctp_transport_update_rto [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Thu Nov 6 11:10:54 2025 +0000

    sctp: prevent possible shift-out-of-bounds in sctp_transport_update_rto
    
    [ Upstream commit 1534ff77757e44bcc4b98d0196bc5c0052fce5fa ]
    
    syzbot reported a possible shift-out-of-bounds [1]
    
    Blamed commit added rto_alpha_max and rto_beta_max set to 1000.
    
    It is unclear if some sctp users are setting very large rto_alpha
    and/or rto_beta.
    
    In order to prevent user regression, perform the test at run time.
    
    Also add READ_ONCE() annotations as sysctl values can change under us.
    
    [1]
    
    UBSAN: shift-out-of-bounds in net/sctp/transport.c:509:41
    shift exponent 64 is too large for 32-bit type 'unsigned int'
    CPU: 0 UID: 0 PID: 16704 Comm: syz.2.2320 Not tainted syzkaller #0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025
    Call Trace:
     <TASK>
      __dump_stack lib/dump_stack.c:94 [inline]
      dump_stack_lvl+0x16c/0x1f0 lib/dump_stack.c:120
      ubsan_epilogue lib/ubsan.c:233 [inline]
      __ubsan_handle_shift_out_of_bounds+0x27f/0x420 lib/ubsan.c:494
      sctp_transport_update_rto.cold+0x1c/0x34b net/sctp/transport.c:509
      sctp_check_transmitted+0x11c4/0x1c30 net/sctp/outqueue.c:1502
      sctp_outq_sack+0x4ef/0x1b20 net/sctp/outqueue.c:1338
      sctp_cmd_process_sack net/sctp/sm_sideeffect.c:840 [inline]
      sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1372 [inline]
    
    Fixes: b58537a1f562 ("net: sctp: fix permissions for rto_alpha and rto_beta knobs")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/netdev/[email protected]/T/#u
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Daniel Borkmann <[email protected]>
    Acked-by: Xin Long <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

sctp: Prevent TOCTOU out-of-bounds write [+ + +]
Author: Stefan Wiehler <[email protected]>
Date:   Tue Oct 28 17:12:27 2025 +0100

    sctp: Prevent TOCTOU out-of-bounds write
    
    [ Upstream commit 95aef86ab231f047bb8085c70666059b58f53c09 ]
    
    For the following path not holding the sock lock,
    
      sctp_diag_dump() -> sctp_for_each_endpoint() -> sctp_ep_dump()
    
    make sure not to exceed bounds in case the address list has grown
    between buffer allocation (time-of-check) and write (time-of-use).
    
    Suggested-by: Kuniyuki Iwashima <[email protected]>
    Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file")
    Signed-off-by: Stefan Wiehler <[email protected]>
    Reviewed-by: Kuniyuki Iwashima <[email protected]>
    Acked-by: Xin Long <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
selftests/bpf: Fix bpf_prog_detach2 usage in test_lirc_mode2 [+ + +]
Author: Ricardo B. Marlière <[email protected]>
Date:   Thu Aug 28 10:12:33 2025 -0300

    selftests/bpf: Fix bpf_prog_detach2 usage in test_lirc_mode2
    
    [ Upstream commit 98857d111c53954aa038fcbc4cf48873e4240f7c ]
    
    Commit e9fc3ce99b34 ("libbpf: Streamline error reporting for high-level
    APIs") redefined the way that bpf_prog_detach2() returns. Therefore, adapt
    the usage in test_lirc_mode2_user.c.
    
    Signed-off-by: Ricardo B. Marlière <[email protected]>
    Signed-off-by: Andrii Nakryiko <[email protected]>
    Link: https://lore.kernel.org/bpf/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
selftests/Makefile: include $(INSTALL_DEP_TARGETS) in clean target to clean net/lib dependency [+ + +]
Author: Nai-Chen Cheng <[email protected]>
Date:   Wed Sep 10 19:30:32 2025 +0800

    selftests/Makefile: include $(INSTALL_DEP_TARGETS) in clean target to clean net/lib dependency
    
    [ Upstream commit d3f7457da7b9527a06dbcbfaf666aa51ac2eeb53 ]
    
    The selftests 'make clean' does not clean the net/lib because it only
    processes $(TARGETS) and ignores $(INSTALL_DEP_TARGETS). This leaves
    compiled objects in net/lib after cleaning, requiring manual cleanup.
    
    Include $(INSTALL_DEP_TARGETS) in clean target to ensure net/lib
    dependency is properly cleaned.
    
    Signed-off-by: Nai-Chen Cheng <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Tested-by: Simon Horman <[email protected]> # build-tested
    Acked-by: Shuah Khan <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
selftests/net: Ensure assert() triggers in psock_tpacket.c [+ + +]
Author: Wake Liu <[email protected]>
Date:   Sat Aug 9 14:20:13 2025 +0800

    selftests/net: Ensure assert() triggers in psock_tpacket.c
    
    [ Upstream commit bc4c0a48bdad7f225740b8e750fdc1da6d85e1eb ]
    
    The get_next_frame() function in psock_tpacket.c was missing a return
    statement in its default switch case, leading to a compiler warning.
    
    This was caused by a `bug_on(1)` call, which is defined as an
    `assert()`, being compiled out because NDEBUG is defined during the
    build.
    
    Instead of adding a `return NULL;` which would silently hide the error
    and could lead to crashes later, this change restores the original
    author's intent. By adding `#undef NDEBUG` before including <assert.h>,
    we ensure the assertion is active and will cause the test to abort if
    this unreachable code is ever executed.
    
    Signed-off-by: Wake Liu <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

selftests/net: Replace non-standard __WORDSIZE with sizeof(long) * 8 [+ + +]
Author: Wake Liu <[email protected]>
Date:   Thu Aug 7 16:09:32 2025 +0800

    selftests/net: Replace non-standard __WORDSIZE with sizeof(long) * 8
    
    [ Upstream commit c36748e8733ef9c5f4cd1d7c4327994e5b88b8df ]
    
    The `__WORDSIZE` macro, defined in the non-standard `<bits/wordsize.h>`
    header, is a GNU extension and not universally available with all
    toolchains, such as Clang when used with musl libc.
    
    This can lead to build failures in environments where this header is
    missing.
    
    The intention of the code is to determine the bit width of a C `long`.
    Replace the non-portable `__WORDSIZE` with the standard and portable
    `sizeof(long) * 8` expression to achieve the same result.
    
    This change also removes the inclusion of the now-unused
    `<bits/wordsize.h>` header.
    
    Signed-off-by: Wake Liu <[email protected]>
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
selftests: Disable dad for ipv6 in fcnal-test.sh [+ + +]
Author: David Ahern <[email protected]>
Date:   Tue Sep 9 20:58:27 2025 -0600

    selftests: Disable dad for ipv6 in fcnal-test.sh
    
    [ Upstream commit 53d591730ea34f97a82f7ec6e7c987ca6e34dc21 ]
    
    Constrained test environment; duplicate address detection is not needed
    and causes races so disable it.
    
    Signed-off-by: David Ahern <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

selftests: Replace sleep with slowwait [+ + +]
Author: David Ahern <[email protected]>
Date:   Tue Sep 9 20:58:28 2025 -0600

    selftests: Replace sleep with slowwait
    
    [ Upstream commit 2f186dd5585c3afb415df80e52f71af16c9d3655 ]
    
    Replace the sleep in kill_procs with slowwait.
    
    Signed-off-by: David Ahern <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
serial: 8250_dw: handle reset control deassert error [+ + +]
Author: Artem Shimko <[email protected]>
Date:   Mon Oct 27 15:22:45 2025 -0400

    serial: 8250_dw: handle reset control deassert error
    
    [ Upstream commit daeb4037adf7d3349b4a1fb792f4bc9824686a4b ]
    
    Check the return value of reset_control_deassert() in the probe
    function to prevent continuing probe when reset deassertion fails.
    
    Previously, reset_control_deassert() was called without checking its
    return value, which could lead to probe continuing even when the
    device reset wasn't properly deasserted.
    
    The fix checks the return value and returns an error with dev_err_probe()
    if reset deassertion fails, providing better error handling and
    diagnostics.
    
    Fixes: acbdad8dd1ab ("serial: 8250_dw: simplify optional reset handling")
    Cc: stable <[email protected]>
    Signed-off-by: Artem Shimko <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250_dw: Use devm_add_action_or_reset() [+ + +]
Author: Andy Shevchenko <[email protected]>
Date:   Mon Oct 27 15:22:44 2025 -0400

    serial: 8250_dw: Use devm_add_action_or_reset()
    
    [ Upstream commit 295b09128d12fb1a7a67f771cc0ae0df869eafaf ]
    
    Slightly simplify ->probe() and drop a few goto labels by using
    devm_add_action_or_reset() for clock and reset cleanup.
    
    Signed-off-by: Andy Shevchenko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Stable-dep-of: daeb4037adf7 ("serial: 8250_dw: handle reset control deassert error")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

serial: 8250_dw: Use devm_clk_get_optional() to get the input clock [+ + +]
Author: Andy Shevchenko <[email protected]>
Date:   Mon Oct 27 15:22:43 2025 -0400

    serial: 8250_dw: Use devm_clk_get_optional() to get the input clock
    
    [ Upstream commit a8afc193558a42d5df724c84436ae3b2446d8a30 ]
    
    Simplify the code which fetches the input clock by using
    devm_clk_get_optional(). This comes with a small functional change: previously
    all errors were ignored except deferred probe. Now all errors are
    treated as errors. If no input clock is present devm_clk_get_optional() will
    return NULL instead of an error which matches the behavior of the old code.
    
    Signed-off-by: Andy Shevchenko <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Stable-dep-of: daeb4037adf7 ("serial: 8250_dw: handle reset control deassert error")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
soc: qcom: smem: Fix endian-unaware access of num_entries [+ + +]
Author: Jens Reidel <[email protected]>
Date:   Sun Jul 27 01:56:46 2025 +0200

    soc: qcom: smem: Fix endian-unaware access of num_entries
    
    [ Upstream commit 19e7aa0e9e46d0ad111a4af55b3d681b6ad945e0 ]
    
    Add a missing le32_to_cpu when accessing num_entries, which is always a
    little endian integer.
    
    Fixes booting on Xiaomi Mi 9T (xiaomi-davinci) in big endian.
    
    Signed-off-by: Jens Reidel <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Bjorn Andersson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
sparc/module: Add R_SPARC_UA64 relocation handling [+ + +]
Author: Koakuma <[email protected]>
Date:   Mon Jun 9 20:53:11 2025 +0700

    sparc/module: Add R_SPARC_UA64 relocation handling
    
    [ Upstream commit 05457d96175d25c976ab6241c332ae2eb5e07833 ]
    
    This is needed so that the kernel can handle R_SPARC_UA64 relocations,
    which is emitted by LLVM's IAS.
    
    Signed-off-by: Koakuma <[email protected]>
    Reviewed-by: Andreas Larsson <[email protected]>
    Signed-off-by: Andreas Larsson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
spi: loopback-test: Don't use %pK through printk [+ + +]
Author: Thomas Weißschuh <[email protected]>
Date:   Mon Aug 11 14:10:21 2025 +0200

    spi: loopback-test: Don't use %pK through printk
    
    [ Upstream commit b832b19318534bb4f1673b24d78037fee339c679 ]
    
    In the past %pK was preferable to %p as it would not leak raw pointer
    values into the kernel log.
    Since commit ad67b74d2469 ("printk: hash addresses printed with %p")
    the regular %p has been improved to avoid this issue.
    Furthermore, restricted pointers ("%pK") were never meant to be used
    through printk(). They can still unintentionally leak raw pointers or
    acquire sleeping locks in atomic contexts.
    
    Switch to the regular pointer formatting which is safer and
    easier to reason about.
    There are still a few users of %pK left, but these use it through seq_file,
    for which its usage is safe.
    
    Signed-off-by: Thomas Weißschuh <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

spi: Try to get ACPI GPIO IRQ earlier [+ + +]
Author: Hans de Goede <[email protected]>
Date:   Sun Nov 2 20:09:21 2025 +0100

    spi: Try to get ACPI GPIO IRQ earlier
    
    commit 3cd2018e15b3d66d2187d92867e265f45ad79e6f upstream.
    
    Since commit d24cfee7f63d ("spi: Fix acpi deferred irq probe"), the
    acpi_dev_gpio_irq_get() call gets delayed till spi_probe() is called
    on the SPI device.
    
    If there is no driver for the SPI device then the move to spi_probe()
    results in acpi_dev_gpio_irq_get() never getting called. This may
    cause problems by leaving the GPIO pin floating because this call is
    responsible for setting up the GPIO pin direction and/or bias according
    to the values from the ACPI tables.
    
    Re-add the removed acpi_dev_gpio_irq_get() in acpi_register_spi_device()
    to ensure the GPIO pin is always correctly setup, while keeping the
    acpi_dev_gpio_irq_get() call added to spi_probe() to deal with
    -EPROBE_DEFER returns caused by the GPIO controller not having a driver
    yet.
    
    Link: https://bbs.archlinux.org/viewtopic.php?id=302348
    Fixes: d24cfee7f63d ("spi: Fix acpi deferred irq probe")
    Cc: [email protected]
    Signed-off-by: Hans de Goede <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
strparser: Fix signed/unsigned mismatch bug [+ + +]
Author: Nate Karstens <[email protected]>
Date:   Thu Nov 6 16:28:33 2025 -0600

    strparser: Fix signed/unsigned mismatch bug
    
    commit 4da4e4bde1c453ac5cc2dce5def81d504ae257ee upstream.
    
    The `len` member of the sk_buff is an unsigned int. This is cast to
    `ssize_t` (a signed type) for the first sk_buff in the comparison,
    but not the second sk_buff. On 32-bit systems, this can result in
    an integer underflow for certain values because unsigned arithmetic
    is being used.
    
    This appears to be an oversight: if the intention was to use unsigned
    arithmetic, then the first cast would have been omitted. The change
    ensures both len values are cast to `ssize_t`.
    
    The underflow causes an issue with ktls when multiple TLS PDUs are
    included in a single TCP segment. The mainline kernel does not use
    strparser for ktls anymore, but this is still useful for other
    features that still use strparser, and for backporting.
    
    Signed-off-by: Nate Karstens <[email protected]>
    Cc: [email protected]
    Fixes: 43a0c6751a32 ("strparser: Stream parser for messages")
    Reviewed-by: Jacob Keller <[email protected]>
    Reviewed-by: Sabrina Dubroca <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
tee: allow a driver to allocate a tee_device without a pool [+ + +]
Author: Amirreza Zarrabi <[email protected]>
Date:   Thu Sep 11 21:07:42 2025 -0700

    tee: allow a driver to allocate a tee_device without a pool
    
    [ Upstream commit 6dbcd5a9ab6cb6644e7d728521da1c9035ec7235 ]
    
    A TEE driver doesn't always need to provide a pool if it doesn't
    support memory sharing ioctls and can allocate memory for TEE
    messages in another way. Although this is mentioned in the
    documentation for tee_device_alloc(), it is not handled correctly.
    
    Reviewed-by: Sumit Garg <[email protected]>
    Signed-off-by: Amirreza Zarrabi <[email protected]>
    Signed-off-by: Jens Wiklander <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tipc: Fix use-after-free in tipc_mon_reinit_self(). [+ + +]
Author: Kuniyuki Iwashima <[email protected]>
Date:   Fri Nov 7 06:40:25 2025 +0000

    tipc: Fix use-after-free in tipc_mon_reinit_self().
    
    [ Upstream commit 0725e6afb55128be21a2ca36e9674f573ccec173 ]
    
    syzbot reported use-after-free of tipc_net(net)->monitors[]
    in tipc_mon_reinit_self(). [0]
    
    The array is protected by RTNL, but tipc_mon_reinit_self()
    iterates over it without RTNL.
    
    tipc_mon_reinit_self() is called from tipc_net_finalize(),
    which is always under RTNL except for tipc_net_finalize_work().
    
    Let's hold RTNL in tipc_net_finalize_work().
    
    [0]:
    BUG: KASAN: slab-use-after-free in __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
    BUG: KASAN: slab-use-after-free in _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162
    Read of size 1 at addr ffff88805eae1030 by task kworker/0:7/5989
    
    CPU: 0 UID: 0 PID: 5989 Comm: kworker/0:7 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
    Workqueue: events tipc_net_finalize_work
    Call Trace:
     <TASK>
     dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
     print_address_description mm/kasan/report.c:378 [inline]
     print_report+0xca/0x240 mm/kasan/report.c:482
     kasan_report+0x118/0x150 mm/kasan/report.c:595
     __kasan_check_byte+0x2a/0x40 mm/kasan/common.c:568
     kasan_check_byte include/linux/kasan.h:399 [inline]
     lock_acquire+0x8d/0x360 kernel/locking/lockdep.c:5842
     __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
     _raw_spin_lock_irqsave+0xa7/0xf0 kernel/locking/spinlock.c:162
     rtlock_slowlock kernel/locking/rtmutex.c:1894 [inline]
     rwbase_rtmutex_lock_state kernel/locking/spinlock_rt.c:160 [inline]
     rwbase_write_lock+0xd3/0x7e0 kernel/locking/rwbase_rt.c:244
     rt_write_lock+0x76/0x110 kernel/locking/spinlock_rt.c:243
     write_lock_bh include/linux/rwlock_rt.h:99 [inline]
     tipc_mon_reinit_self+0x79/0x430 net/tipc/monitor.c:718
     tipc_net_finalize+0x115/0x190 net/tipc/net.c:140
     process_one_work kernel/workqueue.c:3236 [inline]
     process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3319
     worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400
     kthread+0x70e/0x8a0 kernel/kthread.c:463
     ret_from_fork+0x439/0x7d0 arch/x86/kernel/process.c:148
     ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
     </TASK>
    
    Allocated by task 6089:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
     poison_kmalloc_redzone mm/kasan/common.c:388 [inline]
     __kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:405
     kasan_kmalloc include/linux/kasan.h:260 [inline]
     __kmalloc_cache_noprof+0x1a8/0x320 mm/slub.c:4407
     kmalloc_noprof include/linux/slab.h:905 [inline]
     kzalloc_noprof include/linux/slab.h:1039 [inline]
     tipc_mon_create+0xc3/0x4d0 net/tipc/monitor.c:657
     tipc_enable_bearer net/tipc/bearer.c:357 [inline]
     __tipc_nl_bearer_enable+0xe16/0x13f0 net/tipc/bearer.c:1047
     __tipc_nl_compat_doit net/tipc/netlink_compat.c:371 [inline]
     tipc_nl_compat_doit+0x3bc/0x5f0 net/tipc/netlink_compat.c:393
     tipc_nl_compat_handle net/tipc/netlink_compat.c:-1 [inline]
     tipc_nl_compat_recv+0x83c/0xbe0 net/tipc/netlink_compat.c:1321
     genl_family_rcv_msg_doit+0x215/0x300 net/netlink/genetlink.c:1115
     genl_family_rcv_msg net/netlink/genetlink.c:1195 [inline]
     genl_rcv_msg+0x60e/0x790 net/netlink/genetlink.c:1210
     netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2552
     genl_rcv+0x28/0x40 net/netlink/genetlink.c:1219
     netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline]
     netlink_unicast+0x846/0xa10 net/netlink/af_netlink.c:1346
     netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896
     sock_sendmsg_nosec net/socket.c:714 [inline]
     __sock_sendmsg+0x21c/0x270 net/socket.c:729
     ____sys_sendmsg+0x508/0x820 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+0x1a1/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
    
    Freed by task 6088:
     kasan_save_stack mm/kasan/common.c:47 [inline]
     kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
     kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576
     poison_slab_object mm/kasan/common.c:243 [inline]
     __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275
     kasan_slab_free include/linux/kasan.h:233 [inline]
     slab_free_hook mm/slub.c:2422 [inline]
     slab_free mm/slub.c:4695 [inline]
     kfree+0x195/0x550 mm/slub.c:4894
     tipc_l2_device_event+0x380/0x650 net/tipc/bearer.c:-1
     notifier_call_chain+0x1b3/0x3e0 kernel/notifier.c:85
     call_netdevice_notifiers_extack net/core/dev.c:2267 [inline]
     call_netdevice_notifiers net/core/dev.c:2281 [inline]
     unregister_netdevice_many_notify+0x14d7/0x1fe0 net/core/dev.c:12166
     unregister_netdevice_many net/core/dev.c:12229 [inline]
     unregister_netdevice_queue+0x33c/0x380 net/core/dev.c:12073
     unregister_netdevice include/linux/netdevice.h:3385 [inline]
     __tun_detach+0xe4d/0x1620 drivers/net/tun.c:621
     tun_detach drivers/net/tun.c:637 [inline]
     tun_chr_close+0x10d/0x1c0 drivers/net/tun.c:3433
     __fput+0x458/0xa80 fs/file_table.c:468
     task_work_run+0x1d4/0x260 kernel/task_work.c:227
     resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
     exit_to_user_mode_loop+0xec/0x110 kernel/entry/common.c:43
     exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
     syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline]
     syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline]
     do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    
    Fixes: 46cb01eeeb86 ("tipc: update mon's self addr when node addr generated")
    Reported-by: [email protected]
    Closes: https://lore.kernel.org/netdev/[email protected]/
    Signed-off-by: Kuniyuki Iwashima <[email protected]>
    Reviewed-by: Simon Horman <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

tipc: simplify the finalize work queue [+ + +]
Author: Xin Long <[email protected]>
Date:   Tue May 18 10:09:08 2021 +0800

    tipc: simplify the finalize work queue
    
    [ Upstream commit be07f056396d6bb40963c45a02951c566ddeef8e ]
    
    This patch is to use "struct work_struct" for the finalize work queue
    instead of "struct tipc_net_work", as it can get the "net" and "addr"
    from tipc_net's other members and there is no need to add extra net
    and addr in tipc_net by defining "struct tipc_net_work".
    
    Note that it's safe to get net from tn->bcl as bcl is always released
    after the finalize work queue is done.
    
    Signed-off-by: Xin Long <[email protected]>
    Acked-by: Jon Maloy <[email protected]>
    Signed-off-by: David S. Miller <[email protected]>
    Stable-dep-of: 0725e6afb551 ("tipc: Fix use-after-free in tipc_mon_reinit_self().")
    Signed-off-by: Sasha Levin <[email protected]>

 
tools/cpupower: Fix incorrect size in cpuidle_state_disable() [+ + +]
Author: Kaushlendra Kumar <[email protected]>
Date:   Wed Sep 17 10:38:20 2025 +0530

    tools/cpupower: Fix incorrect size in cpuidle_state_disable()
    
    [ Upstream commit 23199d2aa6dcaf6dd2da772f93d2c94317d71459 ]
    
    Fix incorrect size parameter passed to cpuidle_state_write_file() in
    cpuidle_state_disable().
    
    The function was incorrectly using sizeof(disable) which returns the
    size of the unsigned int variable (4 bytes) instead of the actual
    length of the string stored in the 'value' buffer.
    
    Since 'value' is populated with snprintf() to contain the string
    representation of the disable value, we should use the length
    returned by snprintf() to get the correct string length for
    writing to the sysfs file.
    
    This ensures the correct number of bytes is written to the cpuidle
    state disable file in sysfs.
    
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Kaushlendra Kumar <[email protected]>
    Signed-off-by: Shuah Khan <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tools/power x86_energy_perf_policy: Enhance HWP enable [+ + +]
Author: Len Brown <[email protected]>
Date:   Fri Sep 19 14:07:02 2025 -0400

    tools/power x86_energy_perf_policy: Enhance HWP enable
    
    [ Upstream commit c97c057d357c4b39b153e9e430bbf8976e05bd4e ]
    
    On enabling HWP, preserve the reserved bits in MSR_PM_ENABLE.
    
    Also, skip writing the MSR_PM_ENABLE if HWP is already enabled.
    
    Signed-off-by: Len Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

tools/power x86_energy_perf_policy: Prefer driver HWP limits [+ + +]
Author: Len Brown <[email protected]>
Date:   Fri Sep 19 15:56:46 2025 -0400

    tools/power x86_energy_perf_policy: Prefer driver HWP limits
    
    [ Upstream commit 2734fdbc9bb8a3aeb309ba0d62212d7f53f30bc7 ]
    
    When we are successful in using cpufreq min/max limits,
    skip setting the raw MSR limits entirely.
    
    This is necessary to avoid undoing any modification that
    the cpufreq driver makes to our sysfs request.
    
    eg. intel_pstate may take our request for a limit
    that is valid according to HWP.CAP.MIN/MAX and clip
    it to be within the range available in PLATFORM_INFO.
    
    Signed-off-by: Len Brown <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
tracing: Fix memory leaks in create_field_var() [+ + +]
Author: Zilin Guan <[email protected]>
Date:   Thu Nov 6 12:01:32 2025 +0000

    tracing: Fix memory leaks in create_field_var()
    
    [ Upstream commit 80f0d631dcc76ee1b7755bfca1d8417d91d71414 ]
    
    The function create_field_var() allocates memory for 'val' through
    create_hist_field() inside parse_atom(), and for 'var' through
    create_var(), which in turn allocates var->type and var->var.name
    internally. Simply calling kfree() to release these structures will
    result in memory leaks.
    
    Use destroy_hist_field() to properly free 'val', and explicitly release
    the memory of var->type and var->var.name before freeing 'var' itself.
    
    Link: https://patch.msgid.link/[email protected]
    Fixes: 02205a6752f22 ("tracing: Add support for 'field variables'")
    Signed-off-by: Zilin Guan <[email protected]>
    Signed-off-by: Steven Rostedt (Google) <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
uio_hv_generic: Set event for all channels on the device [+ + +]
Author: Long Li <[email protected]>
Date:   Mon Mar 10 15:12:01 2025 -0700

    uio_hv_generic: Set event for all channels on the device
    
    commit d062463edf1770427dc2d637df4088df4835aa47 upstream.
    
    Hyper-V may offer a non latency sensitive device with subchannels without
    monitor bit enabled. The decision is entirely on the Hyper-V host not
    configurable within guest.
    
    When a device has subchannels, also signal events for the subchannel
    if its monitor bit is disabled.
    
    This patch also removes the memory barrier when monitor bit is enabled
    as it is not necessary. The memory barrier is only needed between
    setting up interrupt mask and calling vmbus_set_event() when monitor
    bit is disabled.
    
    Signed-off-by: Long Li <[email protected]>
    Reviewed-by: Michael Kelley <[email protected]>
    Reviewed-by: Saurabh Sengar <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Fixes: b15b7d2a1b09 ("uio_hv_generic: Let userspace take care of interrupt mask")
    Closes: https://bugs.debian.org/1120602
    Signed-off-by: Naman Jain <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
uprobe: Do not emulate/sstep original instruction when ip is changed [+ + +]
Author: Jiri Olsa <[email protected]>
Date:   Tue Sep 16 23:52:57 2025 +0200

    uprobe: Do not emulate/sstep original instruction when ip is changed
    
    [ Upstream commit 4363264111e1297fa37aa39b0598faa19298ecca ]
    
    If uprobe handler changes instruction pointer we still execute single
    step) or emulate the original instruction and increment the (new) ip
    with its length.
    
    This makes the new instruction pointer bogus and application will
    likely crash on illegal instruction execution.
    
    If user decided to take execution elsewhere, it makes little sense
    to execute the original instruction, so let's skip it.
    
    Acked-by: Oleg Nesterov <[email protected]>
    Acked-by: Andrii Nakryiko <[email protected]>
    Signed-off-by: Jiri Olsa <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Alexei Starovoitov <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
usb: deprecate the third argument of usb_maxpacket() [+ + +]
Author: Vincent Mailhol <[email protected]>
Date:   Mon Nov 24 14:20:44 2025 -0500

    usb: deprecate the third argument of usb_maxpacket()
    
    [ Upstream commit 0f08c2e7458e25c967d844170f8ad1aac3b57a02 ]
    
    This is a transitional patch with the ultimate goal of changing the
    prototype of usb_maxpacket() from:
    | static inline __u16
    | usb_maxpacket(struct usb_device *udev, int pipe, int is_out)
    
    into:
    | static inline u16 usb_maxpacket(struct usb_device *udev, int pipe)
    
    The third argument of usb_maxpacket(): is_out gets removed because it
    can be derived from its second argument: pipe using
    usb_pipeout(pipe). Furthermore, in the current version,
    ubs_pipeout(pipe) is called regardless in order to sanitize the is_out
    parameter.
    
    In order to make a smooth change, we first deprecate the is_out
    parameter by simply ignoring it (using a variadic function) and will
    remove it later, once all the callers get updated.
    
    The body of the function is reworked accordingly and is_out is
    replaced by usb_pipeout(pipe). The WARN_ON() calls become unnecessary
    and get removed.
    
    Finally, the return type is changed from __u16 to u16 because this is
    not a UAPI function.
    
    Signed-off-by: Vincent Mailhol <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Stable-dep-of: 69aeb5073123 ("Input: pegasus-notetaker - fix potential out-of-bounds access")
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_fs: Fix epfile null pointer access after ep enable. [+ + +]
Author: Owen Gu <[email protected]>
Date:   Mon Sep 15 17:29:07 2025 +0800

    usb: gadget: f_fs: Fix epfile null pointer access after ep enable.
    
    commit cfd6f1a7b42f62523c96d9703ef32b0dbc495ba4 upstream.
    
    A race condition occurs when ffs_func_eps_enable() runs concurrently
    with ffs_data_reset(). The ffs_data_clear() called in ffs_data_reset()
    sets ffs->epfiles to NULL before resetting ffs->eps_count to 0, leading
    to a NULL pointer dereference when accessing epfile->ep in
    ffs_func_eps_enable() after successful usb_ep_enable().
    
    The ffs->epfiles pointer is set to NULL in both ffs_data_clear() and
    ffs_data_close() functions, and its modification is protected by the
    spinlock ffs->eps_lock. And the whole ffs_func_eps_enable() function
    is also protected by ffs->eps_lock.
    
    Thus, add NULL pointer handling for ffs->epfiles in the
    ffs_func_eps_enable() function to fix issues
    
    Signed-off-by: Owen Gu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: f_hid: Fix zero length packet transfer [+ + +]
Author: William Wu <[email protected]>
Date:   Tue Aug 26 18:28:07 2025 +0800

    usb: gadget: f_hid: Fix zero length packet transfer
    
    [ Upstream commit ed6f727c575b1eb8136e744acfd5e7306c9548f6 ]
    
    Set the hid req->zero flag of ep0/in_ep to true by default,
    then the UDC drivers can transfer a zero length packet at
    the end if the hid transfer with size divisible to EPs max
    packet size according to the USB 2.0 spec.
    
    Signed-off-by: William Wu <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

usb: gadget: f_ncm: Fix MAC assignment NCM ethernet [+ + +]
Author: raub camaioni <[email protected]>
Date:   Fri Aug 15 09:07:21 2025 -0400

    usb: gadget: f_ncm: Fix MAC assignment NCM ethernet
    
    [ Upstream commit 956606bafb5fc6e5968aadcda86fc0037e1d7548 ]
    
    This fix is already present in f_ecm.c and was never
    propagated to f_ncm.c
    
    When creating multiple NCM ethernet devices
    on a composite usb gadget device
    each MAC address on the HOST side will be identical.
    Having the same MAC on different network interfaces is bad.
    
    This fix updates the MAC address inside the
    ncm_strings_defs global during the ncm_bind call.
    This ensures each device has a unique MAC.
    In f_ecm.c ecm_string_defs is updated in the same way.
    
    The defunct MAC assignment in ncm_alloc has been removed.
    
    Signed-off-by: raub camaioni <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

usb: mon: Increase BUFF_MAX to 64 MiB to support multi-MB URBs [+ + +]
Author: Forest Crossman <[email protected]>
Date:   Mon Sep 15 15:55:10 2025 -0400

    usb: mon: Increase BUFF_MAX to 64 MiB to support multi-MB URBs
    
    [ Upstream commit 368ed48a5ef52e384f54d5809f0a0b79ac567479 ]
    
    The usbmon binary interface currently truncates captures of large
    transfers from higher-speed USB devices. Because a single event capture
    is limited to one-fifth of the total buffer size, the current maximum
    size of a captured URB is around 240 KiB. This is insufficient when
    capturing traffic from modern devices that use transfers of several
    hundred kilobytes or more, as truncated URBs can make it impossible for
    user-space USB analysis tools like Wireshark to properly defragment and
    reassemble higher-level protocol packets in the captured data.
    
    The root cause of this issue is the 1200 KiB BUFF_MAX limit, which has
    not been changed since the binary interface was introduced in 2006.
    
    To resolve this issue, this patch increases BUFF_MAX to 64 MiB. The
    original comment for BUFF_MAX based the limit's calculation on a
    saturated 480 Mbit/s bus. Applying the same logic to a modern USB 3.2
    Gen 2×2 20 Gbit/s bus (~2500 MB/s over a 20ms window) indicates the
    buffer should be at least 50 MB. The new limit of 64 MiB covers that,
    plus a little extra for any overhead.
    
    With this change, both users and developers should now be able to debug
    and reverse engineer modern USB devices even when running unmodified
    distro kernels.
    
    Please note that this change does not affect the default buffer size. A
    larger buffer is only allocated when a user explicitly requests it via
    the MON_IOCT_RING_SIZE ioctl, so the change to the maximum buffer size
    should not unduly increase memory usage for users that don't
    deliberately request a larger buffer.
    
    Link: https://lore.kernel.org/CAO3ALPzdUkmMr0YMrODLeDSLZqNCkWcAP8NumuPHLjNJ8wC1kQ@mail.gmail.com
    Signed-off-by: Forest Crossman <[email protected]>
    Acked-by: Alan Stern <[email protected]>
    Link: https://lore.kernel.org/r/CAO3ALPxU5RzcoueC454L=WZ1qGMfAcnxm+T+p+9D8O9mcrUbCQ@mail.gmail.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

usb: xhci: plat: Facilitate using autosuspend for xhci plat devices [+ + +]
Author: Krishna Kurapati <[email protected]>
Date:   Tue Sep 16 17:34:36 2025 +0530

    usb: xhci: plat: Facilitate using autosuspend for xhci plat devices
    
    [ Upstream commit 41cf11946b9076383a2222bbf1ef57d64d033f66 ]
    
    Allow autosuspend to be used by xhci plat device. For Qualcomm SoCs,
    when in host mode, it is intended that the controller goes to suspend
    state to save power and wait for interrupts from connected peripheral
    to wake it up. This is particularly used in cases where a HID or Audio
    device is connected. In such scenarios, the usb controller can enter
    auto suspend and resume action after getting interrupts from the
    connected device.
    
    Signed-off-by: Krishna Kurapati <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
usbnet: Prevents free active kevent [+ + +]
Author: Lizhi Xu <[email protected]>
Date:   Wed Oct 22 10:40:07 2025 +0800

    usbnet: Prevents free active kevent
    
    [ Upstream commit 420c84c330d1688b8c764479e5738bbdbf0a33de ]
    
    The root cause of this issue are:
    1. When probing the usbnet device, executing usbnet_link_change(dev, 0, 0);
    put the kevent work in global workqueue. However, the kevent has not yet
    been scheduled when the usbnet device is unregistered. Therefore, executing
    free_netdev() results in the "free active object (kevent)" error reported
    here.
    
    2. Another factor is that when calling usbnet_disconnect()->unregister_netdev(),
    if the usbnet device is up, ndo_stop() is executed to cancel the kevent.
    However, because the device is not up, ndo_stop() is not executed.
    
    The solution to this problem is to cancel the kevent before executing
    free_netdev().
    
    Fixes: a69e617e533e ("usbnet: Fix linkwatch use-after-free on disconnect")
    Reported-by: Sam Sun <[email protected]>
    Closes: https://syzkaller.appspot.com/bug?extid=8bfd7bcc98f7300afb84
    Signed-off-by: Lizhi Xu <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
video: backlight: lp855x_bl: Set correct EPROM start for LP8556 [+ + +]
Author: Svyatoslav Ryhel <[email protected]>
Date:   Tue Sep 9 10:43:04 2025 +0300

    video: backlight: lp855x_bl: Set correct EPROM start for LP8556
    
    [ Upstream commit 07c7efda24453e05951fb2879f5452b720b91169 ]
    
    According to LP8556 datasheet EPROM region starts at 0x98 so adjust value
    in the driver accordingly.
    
    Signed-off-by: Svyatoslav Ryhel <[email protected]>
    Reviewed-by: "Daniel Thompson (RISCstar)" <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Lee Jones <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
vsock: Ignore signal/timeout on connect() if already established [+ + +]
Author: Michal Luczaj <[email protected]>
Date:   Wed Nov 19 15:02:59 2025 +0100

    vsock: Ignore signal/timeout on connect() if already established
    
    [ Upstream commit 002541ef650b742a198e4be363881439bb9d86b4 ]
    
    During connect(), acting on a signal/timeout by disconnecting an already
    established socket leads to several issues:
    
    1. connect() invoking vsock_transport_cancel_pkt() ->
       virtio_transport_purge_skbs() may race with sendmsg() invoking
       virtio_transport_get_credit(). This results in a permanently elevated
       `vvs->bytes_unsent`. Which, in turn, confuses the SOCK_LINGER handling.
    
    2. connect() resetting a connected socket's state may race with socket
       being placed in a sockmap. A disconnected socket remaining in a sockmap
       breaks sockmap's assumptions. And gives rise to WARNs.
    
    3. connect() transitioning SS_CONNECTED -> SS_UNCONNECTED allows for a
       transport change/drop after TCP_ESTABLISHED. Which poses a problem for
       any simultaneous sendmsg() or connect() and may result in a
       use-after-free/null-ptr-deref.
    
    Do not disconnect socket on signal/timeout. Keep the logic for unconnected
    sockets: they don't linger, can't be placed in a sockmap, are rejected by
    sendmsg().
    
    [1]: https://lore.kernel.org/netdev/[email protected]/
    [2]: https://lore.kernel.org/netdev/[email protected]/
    [3]: https://lore.kernel.org/netdev/[email protected]/
    
    Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
    Signed-off-by: Michal Luczaj <[email protected]>
    Reviewed-by: Stefano Garzarella <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
wifi: ath10k: Fix memory leak on unsupported WMI command [+ + +]
Author: Loic Poulain <[email protected]>
Date:   Fri Sep 26 21:56:56 2025 +0200

    wifi: ath10k: Fix memory leak on unsupported WMI command
    
    [ Upstream commit 2e9c1da4ee9d0acfca2e0a3d78f3d8cb5802da1b ]
    
    ath10k_wmi_cmd_send takes ownership of the passed buffer (skb) and has the
    responsibility to release it in case of error. This patch fixes missing
    free in case of early error due to unhandled WMI command ID.
    
    Tested-on: WCN3990 hw1.0 WLAN.HL.3.3.7.c2-00931-QCAHLSWMTPLZ-1
    
    Fixes: 553215592f14 ("ath10k: warn if give WMI command is not supported")
    Suggested-by: Jeff Johnson <[email protected]>
    Signed-off-by: Loic Poulain <[email protected]>
    Reviewed-by: Baochen Qiang <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jeff Johnson <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

wifi: brcmfmac: fix crash while sending Action Frames in standalone AP Mode [+ + +]
Author: Gokul Sivakumar <[email protected]>
Date:   Sun Nov 2 10:19:27 2025 -0500

    wifi: brcmfmac: fix crash while sending Action Frames in standalone AP Mode
    
    [ Upstream commit 3776c685ebe5f43e9060af06872661de55e80b9a ]
    
    Currently, whenever there is a need to transmit an Action frame,
    the brcmfmac driver always uses the P2P vif to send the "actframe" IOVAR to
    firmware. The P2P interfaces were available when wpa_supplicant is managing
    the wlan interface.
    
    However, the P2P interfaces are not created/initialized when only hostapd
    is managing the wlan interface. And if hostapd receives an ANQP Query REQ
    Action frame even from an un-associated STA, the brcmfmac driver tries
    to use an uninitialized P2P vif pointer for sending the IOVAR to firmware.
    This NULL pointer dereferencing triggers a driver crash.
    
     [ 1417.074538] Unable to handle kernel NULL pointer dereference at virtual
     address 0000000000000000
     [...]
     [ 1417.075188] Hardware name: Raspberry Pi 4 Model B Rev 1.5 (DT)
     [...]
     [ 1417.075653] Call trace:
     [ 1417.075662]  brcmf_p2p_send_action_frame+0x23c/0xc58 [brcmfmac]
     [ 1417.075738]  brcmf_cfg80211_mgmt_tx+0x304/0x5c0 [brcmfmac]
     [ 1417.075810]  cfg80211_mlme_mgmt_tx+0x1b0/0x428 [cfg80211]
     [ 1417.076067]  nl80211_tx_mgmt+0x238/0x388 [cfg80211]
     [ 1417.076281]  genl_family_rcv_msg_doit+0xe0/0x158
     [ 1417.076302]  genl_rcv_msg+0x220/0x2a0
     [ 1417.076317]  netlink_rcv_skb+0x68/0x140
     [ 1417.076330]  genl_rcv+0x40/0x60
     [ 1417.076343]  netlink_unicast+0x330/0x3b8
     [ 1417.076357]  netlink_sendmsg+0x19c/0x3f8
     [ 1417.076370]  __sock_sendmsg+0x64/0xc0
     [ 1417.076391]  ____sys_sendmsg+0x268/0x2a0
     [ 1417.076408]  ___sys_sendmsg+0xb8/0x118
     [ 1417.076427]  __sys_sendmsg+0x90/0xf8
     [ 1417.076445]  __arm64_sys_sendmsg+0x2c/0x40
     [ 1417.076465]  invoke_syscall+0x50/0x120
     [ 1417.076486]  el0_svc_common.constprop.0+0x48/0xf0
     [ 1417.076506]  do_el0_svc+0x24/0x38
     [ 1417.076525]  el0_svc+0x30/0x100
     [ 1417.076548]  el0t_64_sync_handler+0x100/0x130
     [ 1417.076569]  el0t_64_sync+0x190/0x198
     [ 1417.076589] Code: f9401e80 aa1603e2 f9403be1 5280e483 (f9400000)
    
    Fix this, by always using the vif corresponding to the wdev on which the
    Action frame Transmission request was initiated by the userspace. This way,
    even if P2P vif is not available, the IOVAR is sent to firmware on AP vif
    and the ANQP Query RESP Action frame is transmitted without crashing the
    driver.
    
    Move init_completion() for "send_af_done" from brcmf_p2p_create_p2pdev()
    to brcmf_p2p_attach(). Because the former function would not get executed
    when only hostapd is managing wlan interface, and it is not safe to do
    reinit_completion() later in brcmf_p2p_tx_action_frame(), without any prior
    init_completion().
    
    And in the brcmf_p2p_tx_action_frame() function, the condition check for
    P2P Presence response frame is not needed, since the wpa_supplicant is
    properly sending the P2P Presense Response frame on the P2P-GO vif instead
    of the P2P-Device vif.
    
    Cc: [email protected]
    Fixes: 18e2f61db3b7 ("brcmfmac: P2P action frame tx")
    Signed-off-by: Gokul Sivakumar <[email protected]>
    Acked-by: Arend van Spriel <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    [Cc stable]
    Signed-off-by: Johannes Berg <[email protected]>
    [ removed hunks for P2P presence response check and dwell_overflow logic ]
    Signed-off-by: Sasha Levin <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

wifi: mac80211: skip rate verification for not captured PSDUs [+ + +]
Author: Benjamin Berg <[email protected]>
Date:   Mon Nov 10 14:26:18 2025 +0200

    wifi: mac80211: skip rate verification for not captured PSDUs
    
    [ Upstream commit 7fe0d21f5633af8c3fab9f0ef0706c6156623484 ]
    
    If for example the sniffer did not follow any AIDs in an MU frame, then
    some of the information may not be filled in or is even expected to be
    invalid. As an example, in that case it is expected that Nss is zero.
    
    Fixes: 2ff5e52e7836 ("radiotap: add 0-length PSDU "not captured" type")
    Signed-off-by: Benjamin Berg <[email protected]>
    Signed-off-by: Miri Korenblit <[email protected]>
    Link: https://patch.msgid.link/20251110142554.83a2858ee15b.I9f78ce7984872f474722f9278691ae16378f0a3e@changeid
    Signed-off-by: Johannes Berg <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
x86/bugs: Fix reporting of LFENCE retpoline [+ + +]
Author: David Kaplan <[email protected]>
Date:   Mon Sep 15 08:47:05 2025 -0500

    x86/bugs: Fix reporting of LFENCE retpoline
    
    [ Upstream commit d1cc1baef67ac6c09b74629ca053bf3fb812f7dc ]
    
    The LFENCE retpoline mitigation is not secure but the kernel prints
    inconsistent messages about this fact.  The dmesg log says 'Mitigation:
    LFENCE', implying the system is mitigated.  But sysfs reports 'Vulnerable:
    LFENCE' implying the system (correctly) is not mitigated.
    
    Fix this by printing a consistent 'Vulnerable: LFENCE' string everywhere
    when this mitigation is selected.
    
    Signed-off-by: David Kaplan <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Link: https://lore.kernel.org/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
x86/resctrl: Fix miscount of bandwidth event when reactivating previously unavailable RMID [+ + +]
Author: Babu Moger <[email protected]>
Date:   Tue Oct 28 14:59:04 2025 -0500

    x86/resctrl: Fix miscount of bandwidth event when reactivating previously unavailable RMID
    
    [ Upstream commit 15292f1b4c55a3a7c940dbcb6cb8793871ed3d92 ]
    
    Users can create as many monitoring groups as the number of RMIDs supported
    by the hardware. However, on AMD systems, only a limited number of RMIDs
    are guaranteed to be actively tracked by the hardware. RMIDs that exceed
    this limit are placed in an "Unavailable" state.
    
    When a bandwidth counter is read for such an RMID, the hardware sets
    MSR_IA32_QM_CTR.Unavailable (bit 62). When such an RMID starts being tracked
    again the hardware counter is reset to zero. MSR_IA32_QM_CTR.Unavailable
    remains set on first read after tracking re-starts and is clear on all
    subsequent reads as long as the RMID is tracked.
    
    resctrl miscounts the bandwidth events after an RMID transitions from the
    "Unavailable" state back to being tracked. This happens because when the
    hardware starts counting again after resetting the counter to zero, resctrl
    in turn compares the new count against the counter value stored from the
    previous time the RMID was tracked.
    
    This results in resctrl computing an event value that is either undercounting
    (when new counter is more than stored counter) or a mistaken overflow (when
    new counter is less than stored counter).
    
    Reset the stored value (arch_mbm_state::prev_msr) of MSR_IA32_QM_CTR to
    zero whenever the RMID is in the "Unavailable" state to ensure accurate
    counting after the RMID resets to zero when it starts to be tracked again.
    
    Example scenario that results in mistaken overflow
    ==================================================
    1. The resctrl filesystem is mounted, and a task is assigned to a
       monitoring group.
    
       $mount -t resctrl resctrl /sys/fs/resctrl
       $mkdir /sys/fs/resctrl/mon_groups/test1/
       $echo 1234 > /sys/fs/resctrl/mon_groups/test1/tasks
    
       $cat /sys/fs/resctrl/mon_groups/test1/mon_data/mon_L3_*/mbm_total_bytes
       21323            <- Total bytes on domain 0
       "Unavailable"    <- Total bytes on domain 1
    
       Task is running on domain 0. Counter on domain 1 is "Unavailable".
    
    2. The task runs on domain 0 for a while and then moves to domain 1. The
       counter starts incrementing on domain 1.
    
       $cat /sys/fs/resctrl/mon_groups/test1/mon_data/mon_L3_*/mbm_total_bytes
       7345357          <- Total bytes on domain 0
       4545             <- Total bytes on domain 1
    
    3. At some point, the RMID in domain 0 transitions to the "Unavailable"
       state because the task is no longer executing in that domain.
    
       $cat /sys/fs/resctrl/mon_groups/test1/mon_data/mon_L3_*/mbm_total_bytes
       "Unavailable"    <- Total bytes on domain 0
       434341           <- Total bytes on domain 1
    
    4.  Since the task continues to migrate between domains, it may eventually
        return to domain 0.
    
        $cat /sys/fs/resctrl/mon_groups/test1/mon_data/mon_L3_*/mbm_total_bytes
        17592178699059  <- Overflow on domain 0
        3232332         <- Total bytes on domain 1
    
    In this case, the RMID on domain 0 transitions from "Unavailable" state to
    active state. The hardware sets MSR_IA32_QM_CTR.Unavailable (bit 62) when
    the counter is read and begins tracking the RMID counting from 0.
    
    Subsequent reads succeed but return a value smaller than the previously
    saved MSR value (7345357). Consequently, the resctrl's overflow logic is
    triggered, it compares the previous value (7345357) with the new, smaller
    value and incorrectly interprets this as a counter overflow, adding a large
    delta.
    
    In reality, this is a false positive: the counter did not overflow but was
    simply reset when the RMID transitioned from "Unavailable" back to active
    state.
    
    Here is the text from APM [1] available from [2].
    
    "In PQOS Version 2.0 or higher, the MBM hardware will set the U bit on the
    first QM_CTR read when it begins tracking an RMID that it was not
    previously tracking. The U bit will be zero for all subsequent reads from
    that RMID while it is still tracked by the hardware. Therefore, a QM_CTR
    read with the U bit set when that RMID is in use by a processor can be
    considered 0 when calculating the difference with a subsequent read."
    
    [1] AMD64 Architecture Programmer's Manual Volume 2: System Programming
        Publication # 24593 Revision 3.41 section 19.3.3 Monitoring L3 Memory
        Bandwidth (MBM).
    
      [ bp: Split commit message into smaller paragraph chunks for better
        consumption. ]
    
    Fixes: 4d05bf71f157d ("x86/resctrl: Introduce AMD QOS feature")
    Signed-off-by: Babu Moger <[email protected]>
    Signed-off-by: Borislav Petkov (AMD) <[email protected]>
    Reviewed-by: Reinette Chatre <[email protected]>
    Tested-by: Reinette Chatre <[email protected]>
    Cc: [email protected] # needs adjustments for <= v6.17
    Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 # [2]
    (cherry picked from commit 15292f1b4c55a3a7c940dbcb6cb8793871ed3d92)
    [[email protected]: Backport for v5.4 stable]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86/vsyscall: Do not require X86_PF_INSTR to emulate vsyscall [+ + +]
Author: Kiryl Shutsemau <[email protected]>
Date:   Tue Jun 24 17:59:18 2025 +0300

    x86/vsyscall: Do not require X86_PF_INSTR to emulate vsyscall
    
    [ Upstream commit 8ba38a7a9a699905b84fa97578a8291010dec273 ]
    
    emulate_vsyscall() expects to see X86_PF_INSTR in PFEC on a vsyscall
    page fault, but the CPU does not report X86_PF_INSTR if neither
    X86_FEATURE_NX nor X86_FEATURE_SMEP are enabled.
    
    X86_FEATURE_NX should be enabled on nearly all 64-bit CPUs, except for
    early P4 processors that did not support this feature.
    
    Instead of explicitly checking for X86_PF_INSTR, compare the fault
    address to RIP.
    
    On machines with X86_FEATURE_NX enabled, issue a warning if RIP is equal
    to fault address but X86_PF_INSTR is absent.
    
    [ dhansen: flesh out code comments ]
    
    Originally-by: Dave Hansen <[email protected]>
    Reported-by: Andrew Cooper <[email protected]>
    Signed-off-by: Kirill A. Shutemov <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Reviewed-by: Andrew Cooper <[email protected]>
    Link: https://lore.kernel.org/all/[email protected]
    Link: https://lore.kernel.org/all/20250624145918.2720487-1-kirill.shutemov%40linux.intel.com
    Signed-off-by: Sasha Levin <[email protected]>