Changelog in Linux kernel 5.15.183

 
can: gw: fix RCU/BH usage in cgw_create_job() [+ + +]
Author: Oliver Hartkopp <[email protected]>
Date:   Tue Apr 29 09:05:55 2025 +0200

    can: gw: fix RCU/BH usage in cgw_create_job()
    
    [ Upstream commit 511e64e13d8cc72853275832e3f372607466c18c ]
    
    As reported by Sebastian Andrzej Siewior the use of local_bh_disable()
    is only feasible in uni processor systems to update the modification rules.
    The usual use-case to update the modification rules is to update the data
    of the modifications but not the modification types (AND/OR/XOR/SET) or
    the checksum functions itself.
    
    To omit additional memory allocations to maintain fast modification
    switching times, the modification description space is doubled at gw-job
    creation time so that only the reference to the active modification
    description is changed under rcu protection.
    
    Rename cgw_job::mod to cf_mod and make it a RCU pointer. Allocate in
    cgw_create_job() and free it together with cgw_job in
    cgw_job_free_rcu(). Update all users to dereference cgw_job::cf_mod with
    a RCU accessor and if possible once.
    
    [bigeasy: Replace mod1/mod2 from the Oliver's original patch with dynamic
    allocation, use RCU annotation and accessor]
    
    Reported-by: Sebastian Andrzej Siewior <[email protected]>
    Closes: https://lore.kernel.org/linux-can/[email protected]/
    Fixes: dd895d7f21b2 ("can: cangw: introduce optional uid to reference created routing jobs")
    Tested-by: Oliver Hartkopp <[email protected]>
    Signed-off-by: Oliver Hartkopp <[email protected]>
    Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

can: gw: use call_rcu() instead of costly synchronize_rcu() [+ + +]
Author: Eric Dumazet <[email protected]>
Date:   Mon Feb 7 11:07:06 2022 -0800

    can: gw: use call_rcu() instead of costly synchronize_rcu()
    
    [ Upstream commit 181d4447905d551cc664f1e7e796b482c1eec992 ]
    
    Commit fb8696ab14ad ("can: gw: synchronize rcu operations
    before removing gw job entry") added three synchronize_rcu() calls
    to make sure one rcu grace period was observed before freeing
    a "struct cgw_job" (which are tiny objects).
    
    This should be converted to call_rcu() to avoid adding delays
    in device / network dismantles.
    
    Use the rcu_head that was already in struct cgw_job,
    not yet used.
    
    Link: https://lore.kernel.org/all/[email protected]
    Signed-off-by: Eric Dumazet <[email protected]>
    Cc: Oliver Hartkopp <[email protected]>
    Tested-by: Oliver Hartkopp <[email protected]>
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Stable-dep-of: 511e64e13d8c ("can: gw: fix RCU/BH usage in cgw_create_job()")
    Signed-off-by: Sasha Levin <[email protected]>

can: mcan: m_can_class_unregister(): fix order of unregistration calls [+ + +]
Author: Marc Kleine-Budde <[email protected]>
Date:   Fri May 2 16:13:46 2025 +0200

    can: mcan: m_can_class_unregister(): fix order of unregistration calls
    
    commit 0713a1b3276b98c7dafbeefef00d7bc3a9119a84 upstream.
    
    If a driver is removed, the driver framework invokes the driver's
    remove callback. A CAN driver's remove function calls
    unregister_candev(), which calls net_device_ops::ndo_stop further down
    in the call stack for interfaces which are in the "up" state.
    
    The removal of the module causes a warning, as can_rx_offload_del()
    deletes the NAPI, while it is still active, because the interface is
    still up.
    
    To fix the warning, first unregister the network interface, which
    calls net_device_ops::ndo_stop, which disables the NAPI, and then call
    can_rx_offload_del().
    
    Fixes: 1be37d3b0414 ("can: m_can: fix periph RX path: use rx-offload to ensure skbs are sent from softirq context")
    Cc: [email protected]
    Link: https://patch.msgid.link/[email protected]
    Reviewed-by: Markus Schneider-Pargmann <[email protected]>
    Signed-off-by: Marc Kleine-Budde <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>
can: mcp251xfd: mcp251xfd_remove(): fix order of unregistration calls [+ + +]
Author: Marc Kleine-Budde <[email protected]>
Date:   Fri May 2 16:13:44 2025 +0200

    can: mcp251xfd: mcp251xfd_remove(): fix order of unregistration calls
    
    commit 84f5eb833f53ae192baed4cfb8d9eaab43481fc9 upstream.
    
    If a driver is removed, the driver framework invokes the driver's
    remove callback. A CAN driver's remove function calls
    unregister_candev(), which calls net_device_ops::ndo_stop further down
    in the call stack for interfaces which are in the "up" state.
    
    With the mcp251xfd driver the removal of the module causes the
    following warning:
    
    | WARNING: CPU: 0 PID: 352 at net/core/dev.c:7342 __netif_napi_del_locked+0xc8/0xd8
    
    as can_rx_offload_del() deletes the NAPI, while it is still active,
    because the interface is still up.
    
    To fix the warning, first unregister the network interface, which
    calls net_device_ops::ndo_stop, which disables the NAPI, and then call
    can_rx_offload_del().
    
    Fixes: 55e5b97f003e ("can: mcp25xxfd: add driver for Microchip MCP25xxFD SPI CAN")
    Cc: [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]>

 
do_umount(): add missing barrier before refcount checks in sync case [+ + +]
Author: Al Viro <[email protected]>
Date:   Mon Apr 28 23:56:14 2025 -0400

    do_umount(): add missing barrier before refcount checks in sync case
    
    [ Upstream commit 65781e19dcfcb4aed1167d87a3ffcc2a0c071d47 ]
    
    do_umount() analogue of the race fixed in 119e1ef80ecf "fix
    __legitimize_mnt()/mntput() race".  Here we want to make sure that
    if __legitimize_mnt() doesn't notice our lock_mount_hash(), we will
    notice their refcount increment.  Harder to hit than mntput_no_expire()
    one, fortunately, and consequences are milder (sync umount acting
    like umount -l on a rare race with RCU pathwalk hitting at just the
    wrong time instead of use-after-free galore mntput_no_expire()
    counterpart used to be hit).  Still a bug...
    
    Fixes: 48a066e72d97 ("RCU'd vfsmounts")
    Reviewed-by: Christian Brauner <[email protected]>
    Signed-off-by: Al Viro <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
drm/amd/display: Fix wrong handling for AUX_DEFER case [+ + +]
Author: Wayne Lin <[email protected]>
Date:   Sun Apr 20 19:22:14 2025 +0800

    drm/amd/display: Fix wrong handling for AUX_DEFER case
    
    commit 65924ec69b29296845c7f628112353438e63ea56 upstream.
    
    [Why]
    We incorrectly ack all bytes get written when the reply actually is defer.
    When it's defer, means sink is not ready for the request. We should
    retry the request.
    
    [How]
    Only reply all data get written when receive I2C_ACK|AUX_ACK. Otherwise,
    reply the number of actual written bytes received from the sink.
    Add some messages to facilitate debugging as well.
    
    Fixes: ad6756b4d773 ("drm/amd/display: Shift dc link aux to aux_payload")
    Cc: Mario Limonciello <[email protected]>
    Cc: Alex Deucher <[email protected]>
    Reviewed-by: Ray Wu <[email protected]>
    Signed-off-by: Wayne Lin <[email protected]>
    Signed-off-by: Ray Wu <[email protected]>
    Tested-by: Daniel Wheeler <[email protected]>
    Signed-off-by: Alex Deucher <[email protected]>
    (cherry picked from commit 3637e457eb0000bc37d8bbbec95964aad2fb29fd)
    Cc: [email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
drm/panel: simple: Update timings for AUO G101EVN010 [+ + +]
Author: Kevin Baker <[email protected]>
Date:   Mon May 5 12:02:56 2025 -0500

    drm/panel: simple: Update timings for AUO G101EVN010
    
    [ Upstream commit 7c6fa1797a725732981f2d77711c867166737719 ]
    
    Switch to panel timings based on datasheet for the AUO G101EVN01.0
    LVDS panel. Default timings were tested on the panel.
    
    Previous mode-based timings resulted in horizontal display shift.
    
    Signed-off-by: Kevin Baker <[email protected]>
    Fixes: 4fb86404a977 ("drm/panel: simple: Add AUO G101EVN010 panel support")
    Reviewed-by: Neil Armstrong <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Neil Armstrong <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Sasha Levin <[email protected]>

 
gre: Fix again IPv6 link-local address generation. [+ + +]
Author: Guillaume Nault <[email protected]>
Date:   Sat May 3 00:57:52 2025 +0200

    gre: Fix again IPv6 link-local address generation.
    
    [ Upstream commit 3e6a0243ff002ddbd7ee18a8974ae61d2e6ed00d ]
    
    Use addrconf_addr_gen() to generate IPv6 link-local addresses on GRE
    devices in most cases and fall back to using add_v4_addrs() only in
    case the GRE configuration is incompatible with addrconf_addr_gen().
    
    GRE used to use addrconf_addr_gen() until commit e5dd729460ca ("ip/ip6_gre:
    use the same logic as SIT interfaces when computing v6LL address")
    restricted this use to gretap and ip6gretap devices, and created
    add_v4_addrs() (borrowed from SIT) for non-Ethernet GRE ones.
    
    The original problem came when commit 9af28511be10 ("addrconf: refuse
    isatap eui64 for INADDR_ANY") made __ipv6_isatap_ifid() fail when its
    addr parameter was 0. The commit says that this would create an invalid
    address, however, I couldn't find any RFC saying that the generated
    interface identifier would be wrong. Anyway, since gre over IPv4
    devices pass their local tunnel address to __ipv6_isatap_ifid(), that
    commit broke their IPv6 link-local address generation when the local
    address was unspecified.
    
    Then commit e5dd729460ca ("ip/ip6_gre: use the same logic as SIT
    interfaces when computing v6LL address") tried to fix that case by
    defining add_v4_addrs() and calling it to generate the IPv6 link-local
    address instead of using addrconf_addr_gen() (apart for gretap and
    ip6gretap devices, which would still use the regular
    addrconf_addr_gen(), since they have a MAC address).
    
    That broke several use cases because add_v4_addrs() isn't properly
    integrated into the rest of IPv6 Neighbor Discovery code. Several of
    these shortcomings have been fixed over time, but add_v4_addrs()
    remains broken on several aspects. In particular, it doesn't send any
    Router Sollicitations, so the SLAAC process doesn't start until the
    interface receives a Router Advertisement. Also, add_v4_addrs() mostly
    ignores the address generation mode of the interface
    (/proc/sys/net/ipv6/conf/*/addr_gen_mode), thus breaking the
    IN6_ADDR_GEN_MODE_RANDOM and IN6_ADDR_GEN_MODE_STABLE_PRIVACY cases.
    
    Fix the situation by using add_v4_addrs() only in the specific scenario
    where the normal method would fail. That is, for interfaces that have
    all of the following characteristics:
    
      * run over IPv4,
      * transport IP packets directly, not Ethernet (that is, not gretap
        interfaces),
      * tunnel endpoint is INADDR_ANY (that is, 0),
      * device address generation mode is EUI64.
    
    In all other cases, revert back to the regular addrconf_addr_gen().
    
    Also, remove the special case for ip6gre interfaces in add_v4_addrs(),
    since ip6gre devices now always use addrconf_addr_gen() instead.
    
    Note:
      This patch was originally applied as commit 183185a18ff9 ("gre: Fix
      IPv6 link-local address generation."). However, it was then reverted
      by commit fc486c2d060f ("Revert "gre: Fix IPv6 link-local address
      generation."") because it uncovered another bug that ended up
      breaking net/forwarding/ip6gre_custom_multipath_hash.sh. That other
      bug has now been fixed by commit 4d0ab3a6885e ("ipv6: Start path
      selection from the first nexthop"). Therefore we can now revive this
      GRE patch (no changes since original commit 183185a18ff9 ("gre: Fix
      IPv6 link-local address generation.").
    
    Fixes: e5dd729460ca ("ip/ip6_gre: use the same logic as SIT interfaces when computing v6LL address")
    Signed-off-by: Guillaume Nault <[email protected]>
    Reviewed-by: Ido Schimmel <[email protected]>
    Link: https://patch.msgid.link/a88cc5c4811af36007645d610c95102dccb360a6.1746225214.git.gnault@redhat.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
iio: adc: ad7606: fix serial register access [+ + +]
Author: Angelo Dureghello <[email protected]>
Date:   Fri Apr 18 20:37:53 2025 +0200

    iio: adc: ad7606: fix serial register access
    
    commit f083f8a21cc785ebe3a33f756a3fa3660611f8db upstream.
    
    Fix register read/write routine as per datasheet.
    
    When reading multiple consecutive registers, only the first one is read
    properly. This is due to missing chip select deassert and assert again
    between first and second 16bit transfer, as shown in the datasheet
    AD7606C-16, rev 0, figure 110.
    
    Fixes: f2a22e1e172f ("iio: adc: ad7606: Add support for software mode for ad7616")
    Reviewed-by: David Lechner <[email protected]>
    Signed-off-by: Angelo Dureghello <[email protected]>
    Link: https://patch.msgid.link/20250418-wip-bl-ad7606-fix-reg-access-v3-1-d5eeb440c738@baylibre.com
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: adc: dln2: Use aligned_s64 for timestamp [+ + +]
Author: Jonathan Cameron <[email protected]>
Date:   Sun Apr 13 11:34:26 2025 +0100

    iio: adc: dln2: Use aligned_s64 for timestamp
    
    [ Upstream commit 5097eaae98e53f9ab9d35801c70da819b92ca907 ]
    
    Here the lack of marking allows the overall structure to not be
    sufficiently aligned resulting in misplacement of the timestamp
    in iio_push_to_buffers_with_timestamp(). Use aligned_s64 to
    force the alignment on all architectures.
    
    Fixes: 7c0299e879dd ("iio: adc: Add support for DLN2 ADC")
    Reported-by: David Lechner <[email protected]>
    Reviewed-by: Andy Shevchenko <[email protected]>
    Reviewed-by: Nuno Sá <[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]>

iio: adis16201: Correct inclinometer channel resolution [+ + +]
Author: Gabriel Shahrouzi <[email protected]>
Date:   Mon Apr 21 09:15:39 2025 -0400

    iio: adis16201: Correct inclinometer channel resolution
    
    commit 609bc31eca06c7408e6860d8b46311ebe45c1fef upstream.
    
    The inclinometer channels were previously defined with 14 realbits.
    However, the ADIS16201 datasheet states the resolution for these output
    channels is 12 bits (Page 14, text description; Page 15, table 7).
    
    Correct the realbits value to 12 to accurately reflect the hardware.
    
    Fixes: f7fe1d1dd5a5 ("staging: iio: new adis16201 driver")
    Cc: [email protected]
    Signed-off-by: Gabriel Shahrouzi <[email protected]>
    Reviewed-by: Marcelo Schmitt <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo [+ + +]
Author: Silvano Seva <[email protected]>
Date:   Tue Mar 11 09:49:47 2025 +0100

    iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo
    
    commit 159ca7f18129834b6f4c7eae67de48e96c752fc9 upstream.
    
    Prevent st_lsm6dsx_read_fifo from falling in an infinite loop in case
    pattern_len is equal to zero and the device FIFO is not empty.
    
    Fixes: 290a6ce11d93 ("iio: imu: add support to lsm6dsx driver")
    Signed-off-by: Silvano Seva <[email protected]>
    Acked-by: Lorenzo Bianconi <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo [+ + +]
Author: Silvano Seva <[email protected]>
Date:   Tue Mar 11 09:49:49 2025 +0100

    iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo
    
    commit 8114ef86e2058e2554111b793596f17bee23fa15 upstream.
    
    Prevent st_lsm6dsx_read_tagged_fifo from falling in an infinite loop in
    case pattern_len is equal to zero and the device FIFO is not empty.
    
    Fixes: 801a6e0af0c6 ("iio: imu: st_lsm6dsx: add support to LSM6DSO")
    Signed-off-by: Silvano Seva <[email protected]>
    Acked-by: Lorenzo Bianconi <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Cc: <[email protected]>
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Input: synaptics - enable InterTouch on Dell Precision M3800 [+ + +]
Author: Aditya Garg <[email protected]>
Date:   Wed May 7 12:12:15 2025 -0700

    Input: synaptics - enable InterTouch on Dell Precision M3800
    
    commit a609cb4cc07aa9ab8f50466622814356c06f2c17 upstream.
    
    Enable InterTouch mode on Dell Precision M3800 by adding "DLL060d" to
    the list of SMBus-enabled variants.
    
    Reported-by: Markus Rathgeb <[email protected]>
    Signed-off-by: Aditya Garg <[email protected]>
    Link: https://lore.kernel.org/r/PN3PR01MB959789DD6D574E16141E5DC4B888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: synaptics - enable InterTouch on Dynabook Portege X30-D [+ + +]
Author: Manuel Fombuena <[email protected]>
Date:   Wed May 7 12:05:26 2025 -0700

    Input: synaptics - enable InterTouch on Dynabook Portege X30-D
    
    commit 6d7ea0881000966607772451b789b5fb5766f11d upstream.
    
    [    5.989588] psmouse serio1: synaptics: Your touchpad (PNP: TOS0213 PNP0f03) says it can support a different bus. If i2c-hid and hid-rmi are not used, you might want to try setting psmouse.synaptics_intertouch to 1 and report this to [email protected].
    [    6.039923] psmouse serio1: synaptics: Touchpad model: 1, fw: 9.32, id: 0x1e2a1, caps: 0xf00223/0x840300/0x12e800/0x52d884, board id: 3322, fw id: 2658004
    
    The board is labelled TM3322.
    
    Present on the Toshiba / Dynabook Portege X30-D and possibly others.
    
    Confirmed working well with psmouse.synaptics_intertouch=1 and local build.
    
    Signed-off-by: Manuel Fombuena <[email protected]>
    Signed-off-by: Aditya Garg <[email protected]>
    Link: https://lore.kernel.org/r/PN3PR01MB9597711E7933A08389FEC31DB888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: synaptics - enable InterTouch on Dynabook Portege X30L-G [+ + +]
Author: Aditya Garg <[email protected]>
Date:   Wed May 7 12:06:32 2025 -0700

    Input: synaptics - enable InterTouch on Dynabook Portege X30L-G
    
    commit 47d768b32e644b56901bb4bbbdb1feb01ea86c85 upstream.
    
    Enable InterTouch mode on Dynabook Portege X30L-G by adding "TOS01f6" to
    the list of SMBus-enabled variants.
    
    Reported-by: Xuntao Chi <[email protected]>
    Tested-by: Xuntao Chi <[email protected]>
    Signed-off-by: Aditya Garg <[email protected]>
    Link: https://lore.kernel.org/r/PN3PR01MB959786E4AC797160CDA93012B888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5 [+ + +]
Author: Aditya Garg <[email protected]>
Date:   Wed May 7 12:09:00 2025 -0700

    Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5
    
    commit 2abc698ac77314e0de5b33a6d96a39c5159d88e4 upstream.
    
    Enable InterTouch mode on TUXEDO InfinityBook Pro 14 v5 by adding
    "SYN1221" to the list of SMBus-enabled variants.
    
    Add support for InterTouch on SYN1221 by adding it to the list of
    SMBus-enabled variants.
    
    Reported-by: Matthias Eilert <[email protected]>
    Tested-by: Matthias Eilert <[email protected]>
    Signed-off-by: Aditya Garg <[email protected]>
    Link: https://lore.kernel.org/r/PN3PR01MB9597C033C4BC20EE2A0C4543B888A@PN3PR01MB9597.INDPRD01.PROD.OUTLOOK.COM
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

Input: synaptics - enable SMBus for HP Elitebook 850 G1 [+ + +]
Author: Dmitry Torokhov <[email protected]>
Date:   Wed May 7 14:52:55 2025 -0700

    Input: synaptics - enable SMBus for HP Elitebook 850 G1
    
    commit f04f03d3e99bc8f89b6af5debf07ff67d961bc23 upstream.
    
    The kernel reports that the touchpad for this device can support
    SMBus mode.
    
    Reported-by: jt <[email protected]>
    Link: https://lore.kernel.org/r/iys5dbv3ldddsgobfkxldazxyp54kay4bozzmagga6emy45jop@2ebvuxgaui4u
    Cc: [email protected]
    Signed-off-by: Dmitry Torokhov <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
Linux: Linux 5.15.183 [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Sun May 18 08:20:38 2025 +0200

    Linux 5.15.183
    
    Link: https://lore.kernel.org/r/[email protected]
    Tested-by: Jon Hunter <[email protected]>
    Tested-by: Florian Fainelli <[email protected]>
    Tested-by: Mark Brown <[email protected]>
    Tested-by: Ron Economos <[email protected]>
    Tested-by: Linux Kernel Functional Testing <[email protected]>
    Tested-by: Shuah Khan <[email protected]>
    Tested-by: Vijayendra Suman <[email protected]>
    Tested-by: Hardik Garg <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
MIPS: Fix MAX_REG_OFFSET [+ + +]
Author: Thorsten Blum <[email protected]>
Date:   Sun Apr 27 13:34:24 2025 +0200

    MIPS: Fix MAX_REG_OFFSET
    
    [ Upstream commit c44572e0cc13c9afff83fd333135a0aa9b27ba26 ]
    
    Fix MAX_REG_OFFSET to point to the last register in 'pt_regs' and not to
    the marker itself, which could allow regs_get_register() to return an
    invalid offset.
    
    Fixes: 40e084a506eb ("MIPS: Add uprobes support.")
    Suggested-by: Maciej W. Rozycki <[email protected]>
    Signed-off-by: Thorsten Blum <[email protected]>
    Signed-off-by: Thomas Bogendoerfer <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
module: ensure that kobject_put() is safe for module type kobjects [+ + +]
Author: Dmitry Antipov <[email protected]>
Date:   Wed May 7 09:50:44 2025 +0300

    module: ensure that kobject_put() is safe for module type kobjects
    
    commit a6aeb739974ec73e5217c75a7c008a688d3d5cf1 upstream.
    
    In 'lookup_or_create_module_kobject()', an internal kobject is created
    using 'module_ktype'. So call to 'kobject_put()' on error handling
    path causes an attempt to use an uninitialized completion pointer in
    'module_kobject_release()'. In this scenario, we just want to release
    kobject without an extra synchronization required for a regular module
    unloading process, so adding an extra check whether 'complete()' is
    actually required makes 'kobject_put()' safe.
    
    Reported-by: [email protected]
    Closes: https://syzkaller.appspot.com/bug?extid=7fb8a372e1f6add936dd
    Fixes: 942e443127e9 ("module: Fix mod->mkobj.kobj potentially freed too early")
    Cc: [email protected]
    Suggested-by: Petr Pavlu <[email protected]>
    Signed-off-by: Dmitry Antipov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Petr Pavlu <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
net: dsa: b53: allow leaky reserved multicast [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Tue Apr 29 22:17:00 2025 +0200

    net: dsa: b53: allow leaky reserved multicast
    
    [ Upstream commit 5f93185a757ff38b36f849c659aeef368db15a68 ]
    
    Allow reserved multicast to ignore VLAN membership so STP and other
    management protocols work without a PVID VLAN configured when using a
    vlan aware bridge.
    
    Fixes: 967dd82ffc52 ("net: dsa: b53: Add support for Broadcom RoboSwitch")
    Signed-off-by: Jonas Gorski <[email protected]>
    Tested-by: Florian Fainelli <[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: always rejoin default untagged VLAN on bridge leave [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Tue Apr 29 22:17:05 2025 +0200

    net: dsa: b53: always rejoin default untagged VLAN on bridge leave
    
    [ Upstream commit 13b152ae40495966501697693f048f47430c50fd ]
    
    While JOIN_ALL_VLAN allows to join all VLANs, we still need to keep the
    default VLAN enabled so that untagged traffic stays untagged.
    
    So rejoin the default VLAN even for switches with JOIN_ALL_VLAN support.
    
    Fixes: 48aea33a77ab ("net: dsa: b53: Add JOIN_ALL_VLAN support")
    Signed-off-by: Jonas Gorski <[email protected]>
    Tested-by: Florian Fainelli <[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 clearing PVID of a port [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Tue Apr 29 22:17:02 2025 +0200

    net: dsa: b53: fix clearing PVID of a port
    
    [ Upstream commit f480851981043d9bb6447ca9883ade9247b9a0ad ]
    
    Currently the PVID of ports are only set when adding/updating VLANs with
    PVID set or removing VLANs, but not when clearing the PVID flag of a
    VLAN.
    
    E.g. the following flow
    
    $ ip link add br0 type bridge vlan_filtering 1
    $ ip link set sw1p1 master bridge
    $ bridge vlan add dev sw1p1 vid 10 pvid untagged
    $ bridge vlan add dev sw1p1 vid 10 untagged
    
    Would keep the PVID set as 10, despite the flag being cleared. Fix this
    by checking if we need to unset the PVID on vlan updates.
    
    Fixes: a2482d2ce349 ("net: dsa: b53: Plug in VLAN support")
    Signed-off-by: Jonas Gorski <[email protected]>
    Tested-by: Florian Fainelli <[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 flushing old pvid VLAN on pvid change [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Tue Apr 29 22:17:03 2025 +0200

    net: dsa: b53: fix flushing old pvid VLAN on pvid change
    
    [ Upstream commit 083c6b28c0cbcd83b6af1a10f2c82937129b3438 ]
    
    Presumably the intention here was to flush the VLAN of the old pvid, not
    the added VLAN again, which we already flushed before.
    
    Fixes: a2482d2ce349 ("net: dsa: b53: Plug in VLAN support")
    Signed-off-by: Jonas Gorski <[email protected]>
    Tested-by: Florian Fainelli <[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 learning on VLAN unaware bridges [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Tue Apr 29 22:17:09 2025 +0200

    net: dsa: b53: fix learning on VLAN unaware bridges
    
    [ Upstream commit 9f34ad89bcf0e6df6f8b01f1bdab211493fc66d1 ]
    
    When VLAN filtering is off, we configure the switch to forward, but not
    learn on VLAN table misses. This effectively disables learning while not
    filtering.
    
    Fix this by switching to forward and learn. Setting the learning disable
    register will still control whether learning actually happens.
    
    Fixes: dad8d7c6452b ("net: dsa: b53: Properly account for VLAN filtering")
    Signed-off-by: Jonas Gorski <[email protected]>
    Tested-by: Florian Fainelli <[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 VLAN ID for untagged vlan on bridge leave [+ + +]
Author: Jonas Gorski <[email protected]>
Date:   Tue Apr 29 22:17:04 2025 +0200

    net: dsa: b53: fix VLAN ID for untagged vlan on bridge leave
    
    [ Upstream commit a1c1901c5cc881425cc45992ab6c5418174e9e5a ]
    
    The untagged default VLAN is added to the default vlan, which may be
    one, but we modify the VLAN 0 entry on bridge leave.
    
    Fix this to use the correct VLAN entry for the default pvid.
    
    Fixes: fea83353177a ("net: dsa: b53: Fix default VLAN ID")
    Signed-off-by: Jonas Gorski <[email protected]>
    Tested-by: Florian Fainelli <[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]>

 
netfilter: ipset: fix region locking in hash types [+ + +]
Author: Jozsef Kadlecsik <[email protected]>
Date:   Wed May 7 17:01:59 2025 +0200

    netfilter: ipset: fix region locking in hash types
    
    [ Upstream commit 8478a729c0462273188263136880480729e9efca ]
    
    Region locking introduced in v5.6-rc4 contained three macros to handle
    the region locks: ahash_bucket_start(), ahash_bucket_end() which gave
    back the start and end hash bucket values belonging to a given region
    lock and ahash_region() which should give back the region lock belonging
    to a given hash bucket. The latter was incorrect which can lead to a
    race condition between the garbage collector and adding new elements
    when a hash type of set is defined with timeouts.
    
    Fixes: f66ee0410b1c ("netfilter: ipset: Fix "INFO: rcu detected stall in hash_xxx" reports")
    Reported-by: Kota Toda <[email protected]>
    Signed-off-by: Jozsef Kadlecsik <[email protected]>
    Signed-off-by: Pablo Neira Ayuso <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
nvme: unblock ctrl state transition for firmware update [+ + +]
Author: Daniel Wagner <[email protected]>
Date:   Fri May 2 10:58:00 2025 +0200

    nvme: unblock ctrl state transition for firmware update
    
    [ Upstream commit 650415fca0a97472fdd79725e35152614d1aad76 ]
    
    The original nvme subsystem design didn't have a CONNECTING state; the
    state machine allowed transitions from RESETTING to LIVE directly.
    
    With the introduction of nvme fabrics the CONNECTING state was
    introduce. Over time the nvme-pci started to use the CONNECTING state as
    well.
    
    Eventually, a bug fix for the nvme-fc started to depend that the only
    valid transition to LIVE was from CONNECTING. Though this change didn't
    update the firmware update handler which was still depending on
    RESETTING to LIVE transition.
    
    The simplest way to address it for the time being is to switch into
    CONNECTING state before going to LIVE state.
    
    Fixes: d2fe192348f9 ("nvme: only allow entering LIVE from CONNECTING state")
    Reported-by: Guenter Roeck <[email protected]>
    Signed-off-by: Daniel Wagner <[email protected]>
    Closes: https://lore.kernel.org/all/[email protected]
    Reviewed-by: Keith Busch <[email protected]>
    Reviewed-by: Sagi Grimberg <[email protected]>
    Reviewed-by: Guenter Roeck <[email protected]>
    Signed-off-by: Sasha Levin <[email protected]>

 
ocfs2: implement handshaking with ocfs2 recovery thread [+ + +]
Author: Jan Kara <[email protected]>
Date:   Thu Apr 24 15:45:12 2025 +0200

    ocfs2: implement handshaking with ocfs2 recovery thread
    
    commit 8f947e0fd595951460f5a6e1ac29baa82fa02eab upstream.
    
    We will need ocfs2 recovery thread to acknowledge transitions of
    recovery_state when disabling particular types of recovery.  This is
    similar to what currently happens when disabling recovery completely, just
    more general.  Implement the handshake and use it for exit from recovery.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 5f530de63cfc ("ocfs2: Use s_umount for quota recovery protection")
    Signed-off-by: Jan Kara <[email protected]>
    Reviewed-by: Heming Zhao <[email protected]>
    Tested-by: Heming Zhao <[email protected]>
    Acked-by: Joseph Qi <[email protected]>
    Cc: Changwei Ge <[email protected]>
    Cc: Joel Becker <[email protected]>
    Cc: Jun Piao <[email protected]>
    Cc: Junxiao Bi <[email protected]>
    Cc: Mark Fasheh <[email protected]>
    Cc: Murad Masimov <[email protected]>
    Cc: Shichangkuo <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ocfs2: stop quota recovery before disabling quotas [+ + +]
Author: Jan Kara <[email protected]>
Date:   Thu Apr 24 15:45:13 2025 +0200

    ocfs2: stop quota recovery before disabling quotas
    
    commit fcaf3b2683b05a9684acdebda706a12025a6927a upstream.
    
    Currently quota recovery is synchronized with unmount using sb->s_umount
    semaphore.  That is however prone to deadlocks because
    flush_workqueue(osb->ocfs2_wq) called from umount code can wait for quota
    recovery to complete while ocfs2_finish_quota_recovery() waits for
    sb->s_umount semaphore.
    
    Grabbing of sb->s_umount semaphore in ocfs2_finish_quota_recovery() is
    only needed to protect that function from disabling of quotas from
    ocfs2_dismount_volume().  Handle this problem by disabling quota recovery
    early during unmount in ocfs2_dismount_volume() instead so that we can
    drop acquisition of sb->s_umount from ocfs2_finish_quota_recovery().
    
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 5f530de63cfc ("ocfs2: Use s_umount for quota recovery protection")
    Signed-off-by: Jan Kara <[email protected]>
    Reported-by: Shichangkuo <[email protected]>
    Reported-by: Murad Masimov <[email protected]>
    Reviewed-by: Heming Zhao <[email protected]>
    Tested-by: Heming Zhao <[email protected]>
    Acked-by: Joseph Qi <[email protected]>
    Cc: Changwei Ge <[email protected]>
    Cc: Joel Becker <[email protected]>
    Cc: Jun Piao <[email protected]>
    Cc: Junxiao Bi <[email protected]>
    Cc: Mark Fasheh <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

ocfs2: switch osb->disable_recovery to enum [+ + +]
Author: Jan Kara <[email protected]>
Date:   Thu Apr 24 15:45:11 2025 +0200

    ocfs2: switch osb->disable_recovery to enum
    
    commit c0fb83088f0cc4ee4706e0495ee8b06f49daa716 upstream.
    
    Patch series "ocfs2: Fix deadlocks in quota recovery", v3.
    
    This implements another approach to fixing quota recovery deadlocks.  We
    avoid grabbing sb->s_umount semaphore from ocfs2_finish_quota_recovery()
    and instead stop quota recovery early in ocfs2_dismount_volume().
    
    
    This patch (of 3):
    
    We will need more recovery states than just pure enable / disable to fix
    deadlocks with quota recovery.  Switch osb->disable_recovery to enum.
    
    Link: https://lkml.kernel.org/r/[email protected]
    Link: https://lkml.kernel.org/r/[email protected]
    Fixes: 5f530de63cfc ("ocfs2: Use s_umount for quota recovery protection")
    Signed-off-by: Jan Kara <[email protected]>
    Reviewed-by: Heming Zhao <[email protected]>
    Tested-by: Heming Zhao <[email protected]>
    Acked-by: Joseph Qi <[email protected]>
    Cc: Mark Fasheh <[email protected]>
    Cc: Joel Becker <[email protected]>
    Cc: Junxiao Bi <[email protected]>
    Cc: Changwei Ge <[email protected]>
    Cc: Jun Piao <[email protected]>
    Cc: Murad Masimov <[email protected]>
    Cc: Shichangkuo <[email protected]>
    Cc: <[email protected]>
    Signed-off-by: Andrew Morton <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
openvswitch: Fix unsafe attribute parsing in output_userspace() [+ + +]
Author: Eelco Chaudron <[email protected]>
Date:   Tue May 6 16:28:54 2025 +0200

    openvswitch: Fix unsafe attribute parsing in output_userspace()
    
    commit 6beb6835c1fbb3f676aebb51a5fee6b77fed9308 upstream.
    
    This patch replaces the manual Netlink attribute iteration in
    output_userspace() with nla_for_each_nested(), which ensures that only
    well-formed attributes are processed.
    
    Fixes: ccb1352e76cf ("net: Add Open vSwitch kernel components.")
    Signed-off-by: Eelco Chaudron <[email protected]>
    Acked-by: Ilya Maximets <[email protected]>
    Acked-by: Aaron Conole <[email protected]>
    Link: https://patch.msgid.link/0bd65949df61591d9171c0dc13e42cea8941da10.1746541734.git.echaudro@redhat.com
    Signed-off-by: Jakub Kicinski <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
rcu/kvfree: Add kvfree_rcu_mightsleep() and kfree_rcu_mightsleep() [+ + +]
Author: Uladzislau Rezki (Sony) <[email protected]>
Date:   Wed Feb 1 16:08:07 2023 +0100

    rcu/kvfree: Add kvfree_rcu_mightsleep() and kfree_rcu_mightsleep()
    
    [ Upstream commit 608723c41cd951fb32ade2f8371e61c270816175 ]
    
    The kvfree_rcu() and kfree_rcu() APIs are hazardous in that if you forget
    the second argument, it works, but might sleep.  This sleeping can be a
    correctness bug from atomic contexts, and even in non-atomic contexts
    it might introduce unacceptable latencies.  This commit therefore adds
    kvfree_rcu_mightsleep() and kfree_rcu_mightsleep(), which will replace
    the single-argument kvfree_rcu() and kfree_rcu(), respectively.
    
    This commit enables a series of commits that switch from single-argument
    kvfree_rcu() and kfree_rcu() to their _mightsleep() counterparts.  Once
    all of these commits land, the single-argument versions will be removed.
    
    Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
    Signed-off-by: Paul E. McKenney <[email protected]>
    Stable-dep-of: 511e64e13d8c ("can: gw: fix RCU/BH usage in cgw_create_job()")
    Signed-off-by: Sasha Levin <[email protected]>

 
Revert "net: phy: microchip: force IRQ polling mode for lan88xx" [+ + +]
Author: Greg Kroah-Hartman <[email protected]>
Date:   Mon May 12 16:01:41 2025 +0200

    Revert "net: phy: microchip: force IRQ polling mode for lan88xx"
    
    This reverts commit 853e14cf36f6b16a372444a1eff54a3d7c6c1268 which is
    commit 30a41ed32d3088cd0d682a13d7f30b23baed7e93 upstream.
    
    It is reported to cause NFS boot problems on a Raspberry Pi 3b so revert
    it from this branch for now.
    
    Cc: Fiona Klute <[email protected]>
    Cc: Andrew Lunn <[email protected]>
    Cc: Paolo Abeni <[email protected]>
    Cc: Sasha Levin <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Reported-by: Mark Brown <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
staging: axis-fifo: Correct handling of tx_fifo_depth for size validation [+ + +]
Author: Gabriel Shahrouzi <[email protected]>
Date:   Fri Apr 18 21:29:37 2025 -0400

    staging: axis-fifo: Correct handling of tx_fifo_depth for size validation
    
    commit 2ca34b508774aaa590fc3698a54204706ecca4ba upstream.
    
    Remove erroneous subtraction of 4 from the total FIFO depth read from
    device tree. The stored depth is for checking against total capacity,
    not initial vacancy. This prevented writes near the FIFO's full size.
    
    The check performed just before data transfer, which uses live reads of
    the TDFV register to determine current vacancy, correctly handles the
    initial Depth - 4 hardware state and subsequent FIFO fullness.
    
    Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core")
    Cc: [email protected]
    Signed-off-by: Gabriel Shahrouzi <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

staging: axis-fifo: Remove hardware resets for user errors [+ + +]
Author: Gabriel Shahrouzi <[email protected]>
Date:   Fri Apr 18 20:43:06 2025 -0400

    staging: axis-fifo: Remove hardware resets for user errors
    
    commit c6e8d85fafa7193613db37da29c0e8d6e2515b13 upstream.
    
    The axis-fifo driver performs a full hardware reset (via
    reset_ip_core()) in several error paths within the read and write
    functions. This reset flushes both TX and RX FIFOs and resets the
    AXI-Stream links.
    
    Allow the user to handle the error without causing hardware disruption
    or data loss in other FIFO paths.
    
    Fixes: 4a965c5f89de ("staging: add driver for Xilinx AXI-Stream FIFO v4.1 IP core")
    Cc: [email protected]
    Signed-off-by: Gabriel Shahrouzi <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

staging: iio: adc: ad7816: Correct conditional logic for store mode [+ + +]
Author: Gabriel Shahrouzi <[email protected]>
Date:   Mon Apr 14 11:40:49 2025 -0400

    staging: iio: adc: ad7816: Correct conditional logic for store mode
    
    commit 2e922956277187655ed9bedf7b5c28906e51708f upstream.
    
    The mode setting logic in ad7816_store_mode was reversed due to
    incorrect handling of the strcmp return value. strcmp returns 0 on
    match, so the `if (strcmp(buf, "full"))` block executed when the
    input was not "full".
    
    This resulted in "full" setting the mode to AD7816_PD (power-down) and
    other inputs setting it to AD7816_FULL.
    
    Fix this by checking it against 0 to correctly check for "full" and
    "power-down", mapping them to AD7816_FULL and AD7816_PD respectively.
    
    Fixes: 7924425db04a ("staging: iio: adc: new driver for AD7816 devices")
    Cc: [email protected]
    Signed-off-by: Gabriel Shahrouzi <[email protected]>
    Acked-by: Nuno Sá <[email protected]>
    Link: https://lore.kernel.org/stable/20250414152920.467505-1-gshahrouzi%40gmail.com
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
types: Complement the aligned types with signed 64-bit one [+ + +]
Author: Andy Shevchenko <[email protected]>
Date:   Tue Sep 3 20:59:04 2024 +0300

    types: Complement the aligned types with signed 64-bit one
    
    [ Upstream commit e4ca0e59c39442546866f3dd514a3a5956577daf ]
    
    Some user may want to use aligned signed 64-bit type.
    Provide it for them.
    
    Signed-off-by: Andy Shevchenko <[email protected]>
    Link: https://patch.msgid.link/[email protected]
    Signed-off-by: Jonathan Cameron <[email protected]>
    Stable-dep-of: 5097eaae98e5 ("iio: adc: dln2: Use aligned_s64 for timestamp")
    Signed-off-by: Sasha Levin <[email protected]>

 
usb: cdnsp: Fix issue with resuming from L1 [+ + +]
Author: Pawel Laszczak <[email protected]>
Date:   Fri Apr 18 04:55:16 2025 +0000

    usb: cdnsp: Fix issue with resuming from L1
    
    commit 241e2ce88e5a494be7a5d44c0697592f1632fbee upstream.
    
    In very rare cases after resuming controller from L1 to L0 it reads
    registers before the clock UTMI have been enabled and as the result
    driver reads incorrect value.
    Most of registers are in APB domain clock but some of them (e.g. PORTSC)
    are in UTMI domain clock.
    After entering to L1 state the UTMI clock can be disabled.
    When controller transition from L1 to L0 the port status change event is
    reported and in interrupt runtime function driver reads PORTSC.
    During this read operation controller synchronize UTMI and APB domain
    but UTMI clock is still disabled and in result it reads 0xFFFFFFFF value.
    To fix this issue driver increases APB timeout value.
    
    The issue is platform specific and if the default value of APB timeout
    is not sufficient then this time should be set Individually for each
    platform.
    
    Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
    Cc: stable <[email protected]>
    Signed-off-by: Pawel Laszczak <[email protected]>
    Acked-by: Peter Chen <[email protected]>
    Link: https://lore.kernel.org/r/PH7PR07MB953846C57973E4DB134CAA71DDBF2@PH7PR07MB9538.namprd07.prod.outlook.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: cdnsp: fix L1 resume issue for RTL_REVISION_NEW_LPM version [+ + +]
Author: Pawel Laszczak <[email protected]>
Date:   Fri Apr 25 05:55:40 2025 +0000

    usb: cdnsp: fix L1 resume issue for RTL_REVISION_NEW_LPM version
    
    commit 8614ecdb1570e4fffe87ebdc62b613ed66f1f6a6 upstream.
    
    The controllers with rtl version larger than
    RTL_REVISION_NEW_LPM (0x00002700) has bug which causes that controller
    doesn't resume from L1 state. It happens if after receiving LPM packet
    controller starts transitioning to L1 and in this moment the driver force
    resuming by write operation to PORTSC.PLS.
    It's corner case and happens when write operation to PORTSC occurs during
    device delay before transitioning to L1 after transmitting ACK
    time (TL1TokenRetry).
    
    Forcing transition from L1->L0 by driver for revision larger than
    RTL_REVISION_NEW_LPM is not needed, so driver can simply fix this issue
    through block call of cdnsp_force_l0_go function.
    
    Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
    Cc: stable <[email protected]>
    Signed-off-by: Pawel Laszczak <[email protected]>
    Acked-by: Peter Chen <[email protected]>
    Link: https://lore.kernel.org/r/PH7PR07MB9538B55C3A6E71F9ED29E980DD842@PH7PR07MB9538.namprd07.prod.outlook.com
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: gadget: tegra-xudc: ACK ST_RC after clearing CTRL_RUN [+ + +]
Author: Wayne Chang <[email protected]>
Date:   Fri Apr 18 16:12:28 2025 +0800

    usb: gadget: tegra-xudc: ACK ST_RC after clearing CTRL_RUN
    
    commit 59820fde001500c167342257650541280c622b73 upstream.
    
    We identified a bug where the ST_RC bit in the status register was not
    being acknowledged after clearing the CTRL_RUN bit in the control
    register. This could lead to unexpected behavior in the USB gadget
    drivers.
    
    This patch resolves the issue by adding the necessary code to explicitly
    acknowledge ST_RC after clearing CTRL_RUN based on the programming
    sequence, ensuring proper state transition.
    
    Fixes: 49db427232fe ("usb: gadget: Add UDC driver for tegra XUSB device mode controller")
    Cc: stable <[email protected]>
    Signed-off-by: Wayne Chang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: host: tegra: Prevent host controller crash when OTG port is used [+ + +]
Author: Jim Lin <[email protected]>
Date:   Tue Apr 22 19:40:01 2025 +0800

    usb: host: tegra: Prevent host controller crash when OTG port is used
    
    commit 732f35cf8bdfece582f6e4a9c659119036577308 upstream.
    
    When a USB device is connected to the OTG port, the tegra_xhci_id_work()
    routine transitions the PHY to host mode and calls xhci_hub_control()
    with the SetPortFeature command to enable port power.
    
    In certain cases, the XHCI controller may be in a low-power state
    when this operation occurs. If xhci_hub_control() is invoked while
    the controller is suspended, the PORTSC register may return 0xFFFFFFFF,
    indicating a read failure. This causes xhci_hc_died() to be triggered,
    leading to host controller shutdown.
    
    Example backtrace:
    [  105.445736] Workqueue: events tegra_xhci_id_work
    [  105.445747]  dump_backtrace+0x0/0x1e8
    [  105.445759]  xhci_hc_died.part.48+0x40/0x270
    [  105.445769]  tegra_xhci_set_port_power+0xc0/0x240
    [  105.445774]  tegra_xhci_id_work+0x130/0x240
    
    To prevent this, ensure the controller is fully resumed before
    interacting with hardware registers by calling pm_runtime_get_sync()
    prior to the host mode transition and xhci_hub_control().
    
    Fixes: f836e7843036 ("usb: xhci-tegra: Add OTG support")
    Cc: stable <[email protected]>
    Signed-off-by: Jim Lin <[email protected]>
    Signed-off-by: Wayne Chang <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition [+ + +]
Author: RD Babiera <[email protected]>
Date:   Tue Apr 29 23:47:01 2025 +0000

    usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition
    
    commit e918d3959b5ae0e793b8f815ce62240e10ba03a4 upstream.
    
    This patch fixes Type-C Compliance Test TD 4.7.6 - Try.SNK DRP Connect
    SNKAS.
    
    The compliance tester moves into SNK_UNATTACHED during toggling and
    expects the PUT to apply Rp after tPDDebounce of detection. If the port
    is in SNK_TRY_WAIT_DEBOUNCE, it will move into SRC_TRYWAIT immediately
    and apply Rp. This violates TD 4.7.5.V.3, where the tester confirms that
    the PUT attaches Rp after the transitions to Unattached.SNK for
    tPDDebounce.
    
    Change the tcpm_set_state delay between SNK_TRY_WAIT_DEBOUNCE and
    SRC_TRYWAIT to tPDDebounce.
    
    Fixes: a0a3e04e6b2c ("staging: typec: tcpm: Check for Rp for tPDDebounce")
    Cc: stable <[email protected]>
    Signed-off-by: RD Babiera <[email protected]>
    Reviewed-by: Badhri Jagan Sridharan <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: typec: ucsi: displayport: Fix NULL pointer access [+ + +]
Author: Andrei Kuchynski <[email protected]>
Date:   Thu Apr 24 08:44:29 2025 +0000

    usb: typec: ucsi: displayport: Fix NULL pointer access
    
    commit 312d79669e71283d05c05cc49a1a31e59e3d9e0e upstream.
    
    This patch ensures that the UCSI driver waits for all pending tasks in the
    ucsi_displayport_work workqueue to finish executing before proceeding with
    the partner removal.
    
    Cc: stable <[email protected]>
    Fixes: af8622f6a585 ("usb: typec: ucsi: Support for DisplayPort alt mode")
    Signed-off-by: Andrei Kuchynski <[email protected]>
    Reviewed-by: Heikki Krogerus <[email protected]>
    Reviewed-by: Benson Leung <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: uhci-platform: Make the clock really optional [+ + +]
Author: Alexey Charkov <[email protected]>
Date:   Fri Apr 25 18:11:11 2025 +0400

    usb: uhci-platform: Make the clock really optional
    
    commit a5c7973539b010874a37a0e846e62ac6f00553ba upstream.
    
    Device tree bindings state that the clock is optional for UHCI platform
    controllers, and some existing device trees don't provide those - such
    as those for VIA/WonderMedia devices.
    
    The driver however fails to probe now if no clock is provided, because
    devm_clk_get returns an error pointer in such case.
    
    Switch to devm_clk_get_optional instead, so that it could probe again
    on those platforms where no clocks are given.
    
    Cc: stable <[email protected]>
    Fixes: 26c502701c52 ("usb: uhci: Add clk support to uhci-platform")
    Signed-off-by: Alexey Charkov <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: usbtmc: Fix erroneous generic_read ioctl return [+ + +]
Author: Dave Penkler <[email protected]>
Date:   Fri May 2 09:09:41 2025 +0200

    usb: usbtmc: Fix erroneous generic_read ioctl return
    
    commit 4e77d3ec7c7c0d9535ccf1138827cb9bb5480b9b upstream.
    
    wait_event_interruptible_timeout returns a long
    The return value was being assigned to an int causing an integer overflow
    when the remaining jiffies > INT_MAX which resulted in random error
    returns.
    
    Use a long return value, converting to the int ioctl return only on error.
    
    Fixes: bb99794a4792 ("usb: usbtmc: Add ioctl for vendor specific read")
    Cc: [email protected]
    Signed-off-by: Dave Penkler <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: usbtmc: Fix erroneous get_stb ioctl error returns [+ + +]
Author: Dave Penkler <[email protected]>
Date:   Fri May 2 09:09:39 2025 +0200

    usb: usbtmc: Fix erroneous get_stb ioctl error returns
    
    commit cac01bd178d6a2a23727f138d647ce1a0e8a73a1 upstream.
    
    wait_event_interruptible_timeout returns a long
    The return was being assigned to an int causing an integer overflow when
    the remaining jiffies > INT_MAX resulting in random error returns.
    
    Use a long return value and convert to int ioctl return only on error.
    
    When the return value of wait_event_interruptible_timeout was <= INT_MAX
    the number of remaining jiffies was returned which has no meaning for the
    user. Return 0 on success.
    
    Reported-by: Michael Katzmann <[email protected]>
    Fixes: dbf3e7f654c0 ("Implement an ioctl to support the USMTMC-USB488 READ_STATUS_BYTE operation.")
    Cc: [email protected]
    Signed-off-by: Dave Penkler <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

usb: usbtmc: Fix erroneous wait_srq ioctl return [+ + +]
Author: Dave Penkler <[email protected]>
Date:   Fri May 2 09:09:40 2025 +0200

    usb: usbtmc: Fix erroneous wait_srq ioctl return
    
    commit a9747c9b8b59ab4207effd20eb91a890acb44e16 upstream.
    
    wait_event_interruptible_timeout returns a long
    The return was being assigned to an int causing an integer overflow when
    the remaining jiffies > INT_MAX resulting in random error returns.
    
    Use a long return value,  converting to the int ioctl return only on
    error.
    
    Fixes: 739240a9f6ac ("usb: usbtmc: Add ioctl USBTMC488_IOCTL_WAIT_SRQ")
    Cc: [email protected]
    Signed-off-by: Dave Penkler <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
USB: usbtmc: use interruptible sleep in usbtmc_read [+ + +]
Author: Oliver Neukum <[email protected]>
Date:   Wed Apr 30 15:48:10 2025 +0200

    USB: usbtmc: use interruptible sleep in usbtmc_read
    
    commit 054c5145540e5ad5b80adf23a5e3e2fc281fb8aa upstream.
    
    usbtmc_read() calls usbtmc_generic_read()
    which uses interruptible sleep, but usbtmc_read()
    itself uses uninterruptble sleep for mutual exclusion
    between threads. That makes no sense.
    Both should use interruptible sleep.
    
    Fixes: 5b775f672cc99 ("USB: add USB test and measurement class driver")
    Cc: stable <[email protected]>
    Signed-off-by: Oliver Neukum <[email protected]>
    Link: https://lore.kernel.org/r/[email protected]
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86/bhi: Do not set BHI_DIS_S in 32-bit mode [+ + +]
Author: Pawan Gupta <[email protected]>
Date:   Mon May 5 14:35:12 2025 -0700

    x86/bhi: Do not set BHI_DIS_S in 32-bit mode
    
    commit 073fdbe02c69c43fb7c0d547ec265c7747d4a646 upstream.
    
    With the possibility of intra-mode BHI via cBPF, complete mitigation for
    BHI is to use IBHF (history fence) instruction with BHI_DIS_S set. Since
    this new instruction is only available in 64-bit mode, setting BHI_DIS_S in
    32-bit mode is only a partial mitigation.
    
    Do not set BHI_DIS_S in 32-bit mode so as to avoid reporting misleading
    mitigated status. With this change IBHF won't be used in 32-bit mode, also
    remove the CONFIG_X86_64 check from emit_spectre_bhb_barrier().
    
    Suggested-by: Josh Poimboeuf <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Reviewed-by: Josh Poimboeuf <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86/bpf: Add IBHF call at end of classic BPF [+ + +]
Author: Daniel Sneddon <[email protected]>
Date:   Mon May 5 14:35:12 2025 -0700

    x86/bpf: Add IBHF call at end of classic BPF
    
    commit 9f725eec8fc0b39bdc07dcc8897283c367c1a163 upstream.
    
    Classic BPF programs can be run by unprivileged users, allowing
    unprivileged code to execute inside the kernel. Attackers can use this to
    craft branch history in kernel mode that can influence the target of
    indirect branches.
    
    BHI_DIS_S provides user-kernel isolation of branch history, but cBPF can be
    used to bypass this protection by crafting branch history in kernel mode.
    To stop intra-mode attacks via cBPF programs, Intel created a new
    instruction Indirect Branch History Fence (IBHF). IBHF prevents the
    predicted targets of subsequent indirect branches from being influenced by
    branch history prior to the IBHF. IBHF is only effective while BHI_DIS_S is
    enabled.
    
    Add the IBHF instruction to cBPF jitted code's exit path. Add the new fence
    when the hardware mitigation is enabled (i.e., X86_FEATURE_CLEAR_BHB_HW is
    set) or after the software sequence (X86_FEATURE_CLEAR_BHB_LOOP) is being
    used in a virtual machine. Note that X86_FEATURE_CLEAR_BHB_HW and
    X86_FEATURE_CLEAR_BHB_LOOP are mutually exclusive, so the JIT compiler will
    only emit the new fence, not the SW sequence, when X86_FEATURE_CLEAR_BHB_HW
    is set.
    
    Hardware that enumerates BHI_NO basically has BHI_DIS_S protections always
    enabled, regardless of the value of BHI_DIS_S. Since BHI_DIS_S doesn't
    protect against intra-mode attacks, enumerate BHI bug on BHI_NO hardware as
    well.
    
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Acked-by: Daniel Borkmann <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

x86/bpf: Call branch history clearing sequence on exit [+ + +]
Author: Daniel Sneddon <[email protected]>
Date:   Mon May 5 14:35:12 2025 -0700

    x86/bpf: Call branch history clearing sequence on exit
    
    commit d4e89d212d401672e9cdfe825d947ee3a9fbe3f5 upstream.
    
    Classic BPF programs have been identified as potential vectors for
    intra-mode Branch Target Injection (BTI) attacks. Classic BPF programs can
    be run by unprivileged users. They allow unprivileged code to execute
    inside the kernel. Attackers can use unprivileged cBPF to craft branch
    history in kernel mode that can influence the target of indirect branches.
    
    Introduce a branch history buffer (BHB) clearing sequence during the JIT
    compilation of classic BPF programs. The clearing sequence is the same as
    is used in previous mitigations to protect syscalls. Since eBPF programs
    already have their own mitigations in place, only insert the call on
    classic programs that aren't run by privileged users.
    
    Signed-off-by: Daniel Sneddon <[email protected]>
    Signed-off-by: Pawan Gupta <[email protected]>
    Signed-off-by: Dave Hansen <[email protected]>
    Acked-by: Daniel Borkmann <[email protected]>
    Reviewed-by: Alexandre Chartre <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
x86/mm: Eliminate window where TLB flushes may be inadvertently skipped [+ + +]
Author: Dave Hansen <[email protected]>
Date:   Thu May 8 15:41:32 2025 -0700

    x86/mm: Eliminate window where TLB flushes may be inadvertently skipped
    
    commit fea4e317f9e7e1f449ce90dedc27a2d2a95bee5a upstream.
    
    tl;dr: There is a window in the mm switching code where the new CR3 is
    set and the CPU should be getting TLB flushes for the new mm.  But
    should_flush_tlb() has a bug and suppresses the flush.  Fix it by
    widening the window where should_flush_tlb() sends an IPI.
    
    Long Version:
    
    === History ===
    
    There were a few things leading up to this.
    
    First, updating mm_cpumask() was observed to be too expensive, so it was
    made lazier.  But being lazy caused too many unnecessary IPIs to CPUs
    due to the now-lazy mm_cpumask().  So code was added to cull
    mm_cpumask() periodically[2].  But that culling was a bit too aggressive
    and skipped sending TLB flushes to CPUs that need them.  So here we are
    again.
    
    === Problem ===
    
    The too-aggressive code in should_flush_tlb() strikes in this window:
    
            // Turn on IPIs for this CPU/mm combination, but only
            // if should_flush_tlb() agrees:
            cpumask_set_cpu(cpu, mm_cpumask(next));
    
            next_tlb_gen = atomic64_read(&next->context.tlb_gen);
            choose_new_asid(next, next_tlb_gen, &new_asid, &need_flush);
            load_new_mm_cr3(need_flush);
            // ^ After 'need_flush' is set to false, IPIs *MUST*
            // be sent to this CPU and not be ignored.
    
            this_cpu_write(cpu_tlbstate.loaded_mm, next);
            // ^ Not until this point does should_flush_tlb()
            // become true!
    
    should_flush_tlb() will suppress TLB flushes between load_new_mm_cr3()
    and writing to 'loaded_mm', which is a window where they should not be
    suppressed.  Whoops.
    
    === Solution ===
    
    Thankfully, the fuzzy "just about to write CR3" window is already marked
    with loaded_mm==LOADED_MM_SWITCHING.  Simply checking for that state in
    should_flush_tlb() is sufficient to ensure that the CPU is targeted with
    an IPI.
    
    This will cause more TLB flush IPIs.  But the window is relatively small
    and I do not expect this to cause any kind of measurable performance
    impact.
    
    Update the comment where LOADED_MM_SWITCHING is written since it grew
    yet another user.
    
    Peter Z also raised a concern that should_flush_tlb() might not observe
    'loaded_mm' and 'is_lazy' in the same order that switch_mm_irqs_off()
    writes them.  Add a barrier to ensure that they are observed in the
    order they are written.
    
    Signed-off-by: Dave Hansen <[email protected]>
    Acked-by: Rik van Riel <[email protected]>
    Link: https://lore.kernel.org/oe-lkp/[email protected]/ [1]
    Fixes: 6db2526c1d69 ("x86/mm/tlb: Only trim the mm_cpumask once a second") [2]
    Reported-by: Stephen Dolan <[email protected]>
    Cc: [email protected]
    Acked-by: Ingo Molnar <[email protected]>
    Acked-by: Peter Zijlstra (Intel) <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>

 
xenbus: Use kref to track req lifetime [+ + +]
Author: Jason Andryuk <[email protected]>
Date:   Tue May 6 17:09:33 2025 -0400

    xenbus: Use kref to track req lifetime
    
    commit 1f0304dfd9d217c2f8b04a9ef4b3258a66eedd27 upstream.
    
    Marek reported seeing a NULL pointer fault in the xenbus_thread
    callstack:
    BUG: kernel NULL pointer dereference, address: 0000000000000000
    RIP: e030:__wake_up_common+0x4c/0x180
    Call Trace:
     <TASK>
     __wake_up_common_lock+0x82/0xd0
     process_msg+0x18e/0x2f0
     xenbus_thread+0x165/0x1c0
    
    process_msg+0x18e is req->cb(req).  req->cb is set to xs_wake_up(), a
    thin wrapper around wake_up(), or xenbus_dev_queue_reply().  It seems
    like it was xs_wake_up() in this case.
    
    It seems like req may have woken up the xs_wait_for_reply(), which
    kfree()ed the req.  When xenbus_thread resumes, it faults on the zero-ed
    data.
    
    Linux Device Drivers 2nd edition states:
    "Normally, a wake_up call can cause an immediate reschedule to happen,
    meaning that other processes might run before wake_up returns."
    ... which would match the behaviour observed.
    
    Change to keeping two krefs on each request.  One for the caller, and
    one for xenbus_thread.  Each will kref_put() when finished, and the last
    will free it.
    
    This use of kref matches the description in
    Documentation/core-api/kref.rst
    
    Link: https://lore.kernel.org/xen-devel/ZO0WrR5J0xuwDIxW@mail-itl/
    Reported-by: Marek Marczykowski-Górecki <[email protected]>
    Fixes: fd8aa9095a95 ("xen: optimize xenbus driver for multiple concurrent xenstore accesses")
    Cc: [email protected]
    Signed-off-by: Jason Andryuk <[email protected]>
    Reviewed-by: Juergen Gross <[email protected]>
    Signed-off-by: Juergen Gross <[email protected]>
    Message-ID: <[email protected]>
    Signed-off-by: Greg Kroah-Hartman <[email protected]>