Changelog in Linux kernel 6.1.154

 
ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported [+ + +]
Author: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Date:   Sat Aug 30 08:37:49 2025 +0900

    ALSA: firewire-motu: drop EPOLLOUT from poll return values as write is not supported
    
    [ Upstream commit aea3493246c474bc917d124d6fb627663ab6bef0 ]
    
    The ALSA HwDep character device of the firewire-motu driver incorrectly
    returns EPOLLOUT in poll(2), even though the driver implements no operation
    for write(2). This misleads userspace applications to believe write() is
    allowed, potentially resulting in unnecessarily wakeups.
    
    This issue dates back to the driver's initial code added by a commit
    71c3797779d3 ("ALSA: firewire-motu: add hwdep interface"), and persisted
    when POLLOUT was updated to EPOLLOUT by a commit a9a08845e9ac ('vfs: do
    bulk POLL* -> EPOLL* replacement("").').
    
    This commit fixes the bug.
    
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Link: https://patch.msgid.link/20250829233749.366222-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
ALSA: hda/realtek: Fix mute led for HP Laptop 15-dw4xx [+ + +]
Author: Praful Adiga <praful.adiga@gmail.com>
Date:   Thu Sep 18 12:40:18 2025 -0400

    ALSA: hda/realtek: Fix mute led for HP Laptop 15-dw4xx
    
    commit d33c3471047fc54966621d19329e6a23ebc8ec50 upstream.
    
    This laptop uses the ALC236 codec with COEF 0x7 and idx 1 to
    control the mute LED. Enable the existing quirk for this device.
    
    Signed-off-by: Praful Adiga <praful.adiga@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ASoC: q6apm-lpass-dai: close graph on prepare errors [+ + +]
Author: Srinivas Kandagatla <srini@kernel.org>
Date:   Sun Sep 21 19:16:10 2025 -0400

    ASoC: q6apm-lpass-dai: close graph on prepare errors
    
    [ Upstream commit be1fae62cf253a5b67526cee9fbc07689b97c125 ]
    
    There is an issue around with error handling and graph management with
    the exising code, none of the error paths close the graph, which result in
    leaving the loaded graph in dsp, however the driver thinks otherwise.
    
    This can have a nasty side effect specially when we try to load the same
    graph to dsp, dsp returns error which leaves the board with no sound and
    requires restart.
    
    Fix this by properly closing the graph when we hit errors between
    open and close.
    
    Fixes: 30ad723b93ad ("ASoC: qdsp6: audioreach: add q6apm lpass dai support")
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # X13s
    Link: https://lore.kernel.org/r/20240613-q6apm-fixes-v1-1-d88953675ab3@linaro.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Stable-dep-of: 68f27f7c7708 ("ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S interface [+ + +]
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Date:   Mon Sep 8 11:06:29 2025 +0530

    ASoC: qcom: audioreach: Fix lpaif_type configuration for the I2S interface
    
    commit 5f1af203ef964e7f7bf9d32716dfa5f332cc6f09 upstream.
    
    Fix missing lpaif_type configuration for the I2S interface.
    The proper lpaif interface type required to allow DSP to vote
    appropriate clock setting for I2S interface.
    
    Fixes: 25ab80db6b133 ("ASoC: qdsp6: audioreach: add module configuration command helpers")
    Cc: stable@vger.kernel.org
    Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
    Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
    Message-ID: <20250908053631.70978-2-mohammad.rafi.shaik@oss.qualcomm.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one [+ + +]
Author: Srinivas Kandagatla <srini@kernel.org>
Date:   Sun Sep 21 19:16:09 2025 -0400

    ASoC: qcom: q6apm-lpass-dai: close graphs before opening a new one
    
    [ Upstream commit c52615e494f17f44b076ac8ae5a53cfc0041a0dd ]
    
    On multiple prepare calls, its possible that the playback graphs are
    not unloaded from the DSP, which can have some wierd side-effects,
    one of them is that the data not consumed without any errors.
    
    Fixes: c2ac3aec474d("ASoC: qcom: q6apm-lpass-dai: unprepare stream if its already prepared")
    Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    Link: https://lore.kernel.org/r/20230323164403.6654-2-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Stable-dep-of: 68f27f7c7708 ("ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S [+ + +]
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
Date:   Mon Sep 8 11:06:30 2025 +0530

    ASoC: qcom: q6apm-lpass-dais: Fix missing set_fmt DAI op for I2S
    
    commit 33b55b94bca904ca25a9585e3cd43d15f0467969 upstream.
    
    The q6i2s_set_fmt() function was defined but never linked into the
    I2S DAI operations, resulting DAI format settings is being ignored
    during stream setup. This change fixes the issue by properly linking
    the .set_fmt handler within the DAI ops.
    
    Fixes: 30ad723b93ade ("ASoC: qdsp6: audioreach: add q6apm lpass dai support")
    Cc: stable@vger.kernel.org
    Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
    Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
    Message-ID: <20250908053631.70978-3-mohammad.rafi.shaik@oss.qualcomm.com>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed [+ + +]
Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Date:   Sun Sep 21 19:16:11 2025 -0400

    ASoC: qcom: q6apm-lpass-dais: Fix NULL pointer dereference if source graph failed
    
    [ Upstream commit 68f27f7c7708183e7873c585ded2f1b057ac5b97 ]
    
    If earlier opening of source graph fails (e.g. ADSP rejects due to
    incorrect audioreach topology), the graph is closed and
    "dai_data->graph[dai->id]" is assigned NULL.  Preparing the DAI for sink
    graph continues though and next call to q6apm_lpass_dai_prepare()
    receives dai_data->graph[dai->id]=NULL leading to NULL pointer
    exception:
    
      qcom-apm gprsvc:service:2:1: Error (1) Processing 0x01001002 cmd
      qcom-apm gprsvc:service:2:1: DSP returned error[1001002] 1
      q6apm-lpass-dais 30000000.remoteproc:glink-edge:gpr:service@1:bedais: fail to start APM port 78
      q6apm-lpass-dais 30000000.remoteproc:glink-edge:gpr:service@1:bedais: ASoC: error at snd_soc_pcm_dai_prepare on TX_CODEC_DMA_TX_3: -22
      Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a8
      ...
      Call trace:
       q6apm_graph_media_format_pcm+0x48/0x120 (P)
       q6apm_lpass_dai_prepare+0x110/0x1b4
       snd_soc_pcm_dai_prepare+0x74/0x108
       __soc_pcm_prepare+0x44/0x160
       dpcm_be_dai_prepare+0x124/0x1c0
    
    Fixes: 30ad723b93ad ("ASoC: qdsp6: audioreach: add q6apm lpass dai support")
    Cc: stable@vger.kernel.org
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
    Message-ID: <20250904101849.121503-2-krzysztof.kozlowski@linaro.org>
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ASoC: SOF: Intel: hda-stream: Fix incorrect variable used in error message [+ + +]
Author: Colin Ian King <colin.i.king@gmail.com>
Date:   Tue Sep 2 13:06:39 2025 +0100

    ASoC: SOF: Intel: hda-stream: Fix incorrect variable used in error message
    
    [ Upstream commit 35fc531a59694f24a2456569cf7d1a9c6436841c ]
    
    The dev_err message is reporting an error about capture streams however
    it is using the incorrect variable num_playback instead of num_capture.
    Fix this by using the correct variable num_capture.
    
    Fixes: a1d1e266b445 ("ASoC: SOF: Intel: Add Intel specific HDA stream operations")
    Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
    Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
    Link: https://patch.msgid.link/20250902120639.2626861-1-colin.i.king@gmail.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: wm8940: Correct typo in control name [+ + +]
Author: Charles Keepax <ckeepax@opensource.cirrus.com>
Date:   Thu Aug 21 09:26:38 2025 +0100

    ASoC: wm8940: Correct typo in control name
    
    [ Upstream commit b4799520dcd6fe1e14495cecbbe9975d847cd482 ]
    
    Fixes: 0b5e92c5e020 ("ASoC WM8940 Driver")
    Reported-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
    Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
    Tested-by: Ankur Tyagi <ankur.tyagi85@gmail.com>
    Link: https://patch.msgid.link/20250821082639.1301453-3-ckeepax@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

ASoC: wm8974: Correct PLL rate rounding [+ + +]
Author: Charles Keepax <ckeepax@opensource.cirrus.com>
Date:   Thu Aug 21 09:26:39 2025 +0100

    ASoC: wm8974: Correct PLL rate rounding
    
    [ Upstream commit 9b17d3724df55ecc2bc67978822585f2b023be48 ]
    
    Using a single value of 22500000 for both 48000Hz and 44100Hz audio
    will sometimes result in returning wrong dividers due to rounding.
    Update the code to use the actual value for both.
    
    Fixes: 51b2bb3f2568 ("ASoC: wm8974: configure pll and mclk divider automatically")
    Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
    Link: https://patch.msgid.link/20250821082639.1301453-4-ckeepax@opensource.cirrus.com
    Signed-off-by: Mark Brown <broonie@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
bonding: don't set oif to bond dev when getting NS target destination [+ + +]
Author: Hangbin Liu <liuhangbin@gmail.com>
Date:   Tue Sep 16 08:01:26 2025 +0000

    bonding: don't set oif to bond dev when getting NS target destination
    
    [ Upstream commit a8ba87f04ca9cdec06776ce92dce1395026dc3bb ]
    
    Unlike IPv4, IPv6 routing strictly requires the source address to be valid
    on the outgoing interface. If the NS target is set to a remote VLAN interface,
    and the source address is also configured on a VLAN over a bond interface,
    setting the oif to the bond device will fail to retrieve the correct
    destination route.
    
    Fix this by not setting the oif to the bond device when retrieving the NS
    target destination. This allows the correct destination device (the VLAN
    interface) to be determined, so that bond_verify_device_path can return the
    proper VLAN tags for sending NS messages.
    
    Reported-by: David Wilder <wilder@us.ibm.com>
    Closes: https://lore.kernel.org/netdev/aGOKggdfjv0cApTO@fedora/
    Suggested-by: Jay Vosburgh <jv@jvosburgh.net>
    Tested-by: David Wilder <wilder@us.ibm.com>
    Acked-by: Jay Vosburgh <jv@jvosburgh.net>
    Fixes: 4e24be018eb9 ("bonding: add new parameter ns_targets")
    Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
    Link: https://patch.msgid.link/20250916080127.430626-1-liuhangbin@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
btrfs: fix invalid extref key setup when replaying dentry [+ + +]
Author: Filipe Manana <fdmanana@suse.com>
Date:   Wed Sep 3 16:53:21 2025 +0100

    btrfs: fix invalid extref key setup when replaying dentry
    
    [ Upstream commit b62fd63ade7cb573b114972ef8f9fa505be8d74a ]
    
    The offset for an extref item's key is not the object ID of the parent
    dir, otherwise we would not need the extref item and would use plain ref
    items. Instead the offset is the result of a hash computation that uses
    the object ID of the parent dir and the name associated to the entry.
    So fix this by setting the key offset at replay_one_name() to be the
    result of calling btrfs_extref_hash().
    
    Fixes: 725af92a6251 ("btrfs: Open-code name_in_log_ref in replay_one_name")
    Signed-off-by: Filipe Manana <fdmanana@suse.com>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

btrfs: tree-checker: fix the incorrect inode ref size check [+ + +]
Author: Qu Wenruo <wqu@suse.com>
Date:   Tue Sep 16 07:54:06 2025 +0930

    btrfs: tree-checker: fix the incorrect inode ref size check
    
    commit 96fa515e70f3e4b98685ef8cac9d737fc62f10e1 upstream.
    
    [BUG]
    Inside check_inode_ref(), we need to make sure every structure,
    including the btrfs_inode_extref header, is covered by the item.  But
    our code is incorrectly using "sizeof(iref)", where @iref is just a
    pointer.
    
    This means "sizeof(iref)" will always be "sizeof(void *)", which is much
    smaller than "sizeof(struct btrfs_inode_extref)".
    
    This will allow some bad inode extrefs to sneak in, defeating tree-checker.
    
    [FIX]
    Fix the typo by calling "sizeof(*iref)", which is the same as
    "sizeof(struct btrfs_inode_extref)", and will be the correct behavior we
    want.
    
    Fixes: 71bf92a9b877 ("btrfs: tree-checker: Add check for INODE_REF")
    CC: stable@vger.kernel.org # 6.1+
    Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
    Reviewed-by: Filipe Manana <fdmanana@suse.com>
    Signed-off-by: Qu Wenruo <wqu@suse.com>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
cgroup: split cgroup_destroy_wq into 3 workqueues [+ + +]
Author: Chen Ridong <chenridong@huawei.com>
Date:   Tue Aug 19 01:07:24 2025 +0000

    cgroup: split cgroup_destroy_wq into 3 workqueues
    
    [ Upstream commit 79f919a89c9d06816dbdbbd168fa41d27411a7f9 ]
    
    A hung task can occur during [1] LTP cgroup testing when repeatedly
    mounting/unmounting perf_event and net_prio controllers with
    systemd.unified_cgroup_hierarchy=1. The hang manifests in
    cgroup_lock_and_drain_offline() during root destruction.
    
    Related case:
    cgroup_fj_function_perf_event cgroup_fj_function.sh perf_event
    cgroup_fj_function_net_prio cgroup_fj_function.sh net_prio
    
    Call Trace:
            cgroup_lock_and_drain_offline+0x14c/0x1e8
            cgroup_destroy_root+0x3c/0x2c0
            css_free_rwork_fn+0x248/0x338
            process_one_work+0x16c/0x3b8
            worker_thread+0x22c/0x3b0
            kthread+0xec/0x100
            ret_from_fork+0x10/0x20
    
    Root Cause:
    
    CPU0                            CPU1
    mount perf_event                umount net_prio
    cgroup1_get_tree                cgroup_kill_sb
    rebind_subsystems               // root destruction enqueues
                                    // cgroup_destroy_wq
    // kill all perf_event css
                                    // one perf_event css A is dying
                                    // css A offline enqueues cgroup_destroy_wq
                                    // root destruction will be executed first
                                    css_free_rwork_fn
                                    cgroup_destroy_root
                                    cgroup_lock_and_drain_offline
                                    // some perf descendants are dying
                                    // cgroup_destroy_wq max_active = 1
                                    // waiting for css A to die
    
    Problem scenario:
    1. CPU0 mounts perf_event (rebind_subsystems)
    2. CPU1 unmounts net_prio (cgroup_kill_sb), queuing root destruction work
    3. A dying perf_event CSS gets queued for offline after root destruction
    4. Root destruction waits for offline completion, but offline work is
       blocked behind root destruction in cgroup_destroy_wq (max_active=1)
    
    Solution:
    Split cgroup_destroy_wq into three dedicated workqueues:
    cgroup_offline_wq – Handles CSS offline operations
    cgroup_release_wq – Manages resource release
    cgroup_free_wq – Performs final memory deallocation
    
    This separation eliminates blocking in the CSS free path while waiting for
    offline operations to complete.
    
    [1] https://github.com/linux-test-project/ltp/blob/master/runtest/controllers
    Fixes: 334c3679ec4b ("cgroup: reimplement rebind_subsystems() using cgroup_apply_control() and friends")
    Reported-by: Gao Yingjie <gaoyingjie@uniontech.com>
    Signed-off-by: Chen Ridong <chenridong@huawei.com>
    Suggested-by: Teju Heo <tj@kernel.org>
    Signed-off-by: Tejun Heo <tj@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
cnic: Fix use-after-free bugs in cnic_delete_task [+ + +]
Author: Duoming Zhou <duoming@zju.edu.cn>
Date:   Wed Sep 17 13:46:02 2025 +0800

    cnic: Fix use-after-free bugs in cnic_delete_task
    
    [ Upstream commit cfa7d9b1e3a8604afc84e9e51d789c29574fb216 ]
    
    The original code uses cancel_delayed_work() in cnic_cm_stop_bnx2x_hw(),
    which does not guarantee that the delayed work item 'delete_task' has
    fully completed if it was already running. Additionally, the delayed work
    item is cyclic, the flush_workqueue() in cnic_cm_stop_bnx2x_hw() only
    blocks and waits for work items that were already queued to the
    workqueue prior to its invocation. Any work items submitted after
    flush_workqueue() is called are not included in the set of tasks that the
    flush operation awaits. This means that after the cyclic work items have
    finished executing, a delayed work item may still exist in the workqueue.
    This leads to use-after-free scenarios where the cnic_dev is deallocated
    by cnic_free_dev(), while delete_task remains active and attempt to
    dereference cnic_dev in cnic_delete_task().
    
    A typical race condition is illustrated below:
    
    CPU 0 (cleanup)              | CPU 1 (delayed work callback)
    cnic_netdev_event()          |
      cnic_stop_hw()             | cnic_delete_task()
        cnic_cm_stop_bnx2x_hw()  | ...
          cancel_delayed_work()  | /* the queue_delayed_work()
          flush_workqueue()      |    executes after flush_workqueue()*/
                                 | queue_delayed_work()
      cnic_free_dev(dev)//free   | cnic_delete_task() //new instance
                                 |   dev = cp->dev; //use
    
    Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure
    that the cyclic delayed work item is properly canceled and that any
    ongoing execution of the work item completes before the cnic_dev is
    deallocated. Furthermore, since cancel_delayed_work_sync() uses
    __flush_work(work, true) to synchronously wait for any currently
    executing instance of the work item to finish, the flush_workqueue()
    becomes redundant and should be removed.
    
    This bug was identified through static analysis. To reproduce the issue
    and validate the fix, I simulated the cnic PCI device in QEMU and
    introduced intentional delays — such as inserting calls to ssleep()
    within the cnic_delete_task() function — to increase the likelihood
    of triggering the bug.
    
    Fixes: fdf24086f475 ("cnic: Defer iscsi connection cleanup")
    Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg [+ + +]
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Mon Sep 22 14:44:49 2025 -0400

    crypto: af_alg - Disallow concurrent writes in af_alg_sendmsg
    
    [ Upstream commit 1b34cbbf4f011a121ef7b2d7d6e6920a036d5285 ]
    
    Issuing two writes to the same af_alg socket is bogus as the
    data will be interleaved in an unpredictable fashion.  Furthermore,
    concurrent writes may create inconsistencies in the internal
    socket state.
    
    Disallow this by adding a new ctx->write field that indiciates
    exclusive ownership for writing.
    
    Fixes: 8ff590903d5 ("crypto: algif_skcipher - User-space interface for skcipher operations")
    Reported-by: Muhammad Alifa Ramdhan <ramdhan@starlabs.sg>
    Reported-by: Bing-Jhong Billy Jheng <billy@starlabs.sg>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

crypto: af_alg - Set merge to zero early in af_alg_sendmsg [+ + +]
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue Sep 16 15:42:41 2025 +0800

    crypto: af_alg - Set merge to zero early in af_alg_sendmsg
    
    [ Upstream commit 9574b2330dbd2b5459b74d3b5e9619d39299fc6f ]
    
    If an error causes af_alg_sendmsg to abort, ctx->merge may contain
    a garbage value from the previous loop.  This may then trigger a
    crash on the next entry into af_alg_sendmsg when it attempts to do
    a merge that can't be done.
    
    Fix this by setting ctx->merge to zero near the start of the loop.
    
    Fixes: 8ff590903d5 ("crypto: algif_skcipher - User-space interface for skcipher operations")
    Reported-by: Muhammad Alifa Ramdhan <ramdhan@starlabs.sg>
    Reported-by: Bing-Jhong Billy Jheng <billy@starlabs.sg>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

crypto: af_alg: Convert af_alg_sendpage() to use MSG_SPLICE_PAGES [+ + +]
Author: David Howells <dhowells@redhat.com>
Date:   Mon Sep 22 14:44:48 2025 -0400

    crypto: af_alg: Convert af_alg_sendpage() to use MSG_SPLICE_PAGES
    
    [ Upstream commit fb800fa4c1f5aee1238267252e88a7837e645c02 ]
    
    Convert af_alg_sendpage() to use sendmsg() with MSG_SPLICE_PAGES rather
    than directly splicing in the pages itself.
    
    This allows ->sendpage() to be replaced by something that can handle
    multiple multipage folios in a single transaction.
    
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Herbert Xu <herbert@gondor.apana.org.au>
    cc: "David S. Miller" <davem@davemloft.net>
    cc: Eric Dumazet <edumazet@google.com>
    cc: Jakub Kicinski <kuba@kernel.org>
    cc: Paolo Abeni <pabeni@redhat.com>
    cc: Jens Axboe <axboe@kernel.dk>
    cc: Matthew Wilcox <willy@infradead.org>
    cc: linux-crypto@vger.kernel.org
    cc: netdev@vger.kernel.org
    Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

crypto: af_alg: Indent the loop in af_alg_sendmsg() [+ + +]
Author: David Howells <dhowells@redhat.com>
Date:   Tue Jun 6 14:08:53 2023 +0100

    crypto: af_alg: Indent the loop in af_alg_sendmsg()
    
    [ Upstream commit 73d7409cfdad7fd08a9203eb2912c1c77e527776 ]
    
    Put the loop in af_alg_sendmsg() into an if-statement to indent it to make
    the next patch easier to review as that will add another branch to handle
    MSG_SPLICE_PAGES to the if-statement.
    
    Signed-off-by: David Howells <dhowells@redhat.com>
    cc: Herbert Xu <herbert@gondor.apana.org.au>
    cc: "David S. Miller" <davem@davemloft.net>
    cc: Eric Dumazet <edumazet@google.com>
    cc: Jakub Kicinski <kuba@kernel.org>
    cc: Paolo Abeni <pabeni@redhat.com>
    cc: Jens Axboe <axboe@kernel.dk>
    cc: Matthew Wilcox <willy@infradead.org>
    cc: linux-crypto@vger.kernel.org
    cc: netdev@vger.kernel.org
    Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Stable-dep-of: 9574b2330dbd ("crypto: af_alg - Set merge to zero early in af_alg_sendmsg")
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
dpaa2-switch: fix buffer pool seeding for control traffic [+ + +]
Author: Ioana Ciornei <ioana.ciornei@nxp.com>
Date:   Wed Sep 10 17:48:25 2025 +0300

    dpaa2-switch: fix buffer pool seeding for control traffic
    
    [ Upstream commit 2690cb089502b80b905f2abdafd1bf2d54e1abef ]
    
    Starting with commit c50e7475961c ("dpaa2-switch: Fix error checking in
    dpaa2_switch_seed_bp()"), the probing of a second DPSW object errors out
    like below.
    
    fsl_dpaa2_switch dpsw.1: fsl_mc_driver_probe failed: -12
    fsl_dpaa2_switch dpsw.1: probe with driver fsl_dpaa2_switch failed with error -12
    
    The aforementioned commit brought to the surface the fact that seeding
    buffers into the buffer pool destined for control traffic is not
    successful and an access violation recoverable error can be seen in the
    MC firmware log:
    
    [E, qbman_rec_isr:391, QBMAN]  QBMAN recoverable event 0x1000000
    
    This happens because the driver incorrectly used the ID of the DPBP
    object instead of the hardware buffer pool ID when trying to release
    buffers into it.
    
    This is because any DPSW object uses two buffer pools, one managed by
    the Linux driver and destined for control traffic packet buffers and the
    other one managed by the MC firmware and destined only for offloaded
    traffic. And since the buffer pool managed by the MC firmware does not
    have an external facing DPBP equivalent, any subsequent DPBP objects
    created after the first DPSW will have a DPBP id different to the
    underlying hardware buffer ID.
    
    The issue was not caught earlier because these two numbers can be
    identical when all DPBP objects are created before the DPSW objects are.
    This is the case when the DPL file is used to describe the entire DPAA2
    object layout and objects are created at boot time and it's also true
    for the first DPSW being created dynamically using ls-addsw.
    
    Fix this by using the buffer pool ID instead of the DPBP id when
    releasing buffers into the pool.
    
    Fixes: 2877e4f7e189 ("staging: dpaa2-switch: setup buffer pool and RX path rings")
    Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
    Link: https://patch.msgid.link/20250910144825.2416019-1-ioana.ciornei@nxp.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ [+ + +]
Author: Loic Poulain <loic.poulain@oss.qualcomm.com>
Date:   Wed Jul 9 10:54:38 2025 +0200

    drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ
    
    [ Upstream commit a10f910c77f280327b481e77eab909934ec508f0 ]
    
    If the interrupt occurs before resource initialization is complete, the
    interrupt handler/worker may access uninitialized data such as the I2C
    tcpc_client device, potentially leading to NULL pointer dereference.
    
    Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
    Fixes: 8bdfc5dae4e3 ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP")
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Link: https://lore.kernel.org/r/20250709085438.56188-1-loic.poulain@oss.qualcomm.com
    Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path [+ + +]
Author: Qi Xi <xiqi2@huawei.com>
Date:   Thu Sep 4 11:44:47 2025 +0800

    drm: bridge: cdns-mhdp8546: Fix missing mutex unlock on error path
    
    [ Upstream commit 288dac9fb6084330d968459c750c838fd06e10e6 ]
    
    Add missing mutex unlock before returning from the error path in
    cdns_mhdp_atomic_enable().
    
    Fixes: 935a92a1c400 ("drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Qi Xi <xiqi2@huawei.com>
    Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
    Link: https://lore.kernel.org/r/20250904034447.665427-1-xiqi2@huawei.com
    Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
i40e: remove redundant memory barrier when cleaning Tx descs [+ + +]
Author: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Date:   Fri Aug 22 17:16:17 2025 +0200

    i40e: remove redundant memory barrier when cleaning Tx descs
    
    [ Upstream commit e37084a26070c546ae7961ee135bbfb15fbe13fd ]
    
    i40e has a feature which writes to memory location last descriptor
    successfully sent. Memory barrier in i40e_clean_tx_irq() was used to
    avoid forward-reading descriptor fields in case DD bit was not set.
    Having mentioned feature in place implies that such situation will not
    happen as we know in advance how many descriptors HW has dealt with.
    
    Besides, this barrier placement was wrong. Idea is to have this
    protection *after* reading DD bit from HW descriptor, not before.
    Digging through git history showed me that indeed barrier was before DD
    bit check, anyways the commit introducing i40e_get_head() should have
    wiped it out altogether.
    
    Also, there was one commit doing s/read_barrier_depends/smp_rmb when get
    head feature was already in place, but it was only theoretical based on
    ixgbe experiences, which is different in these terms as that driver has
    to read DD bit from HW descriptor.
    
    Fixes: 1943d8ba9507 ("i40e/i40evf: enable hardware feature head write back")
    Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
    Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
    Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
    Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
io_uring: backport io_should_terminate_tw() [+ + +]
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Sep 18 11:27:06 2025 -0600

    io_uring: backport io_should_terminate_tw()
    
    Parts of commit b6f58a3f4aa8dba424356c7a69388a81f4459300 upstream.
    
    Backport io_should_terminate_tw() helper to judge whether task_work
    should be run or terminated.
    
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

io_uring: include dying ring in task_work "should cancel" state [+ + +]
Author: Jens Axboe <axboe@kernel.dk>
Date:   Thu Sep 18 10:21:14 2025 -0600

    io_uring: include dying ring in task_work "should cancel" state
    
    Commit 3539b1467e94336d5854ebf976d9627bfb65d6c3 upstream.
    
    When running task_work for an exiting task, rather than perform the
    issue retry attempt, the task_work is canceled. However, this isn't
    done for a ring that has been closed. This can lead to requests being
    successfully completed post the ring being closed, which is somewhat
    confusing and surprising to an application.
    
    Rather than just check the task exit state, also include the ring
    ref state in deciding whether or not to terminate a given request when
    run from task_work.
    
    Cc: stable@vger.kernel.org # 6.1+
    Link: https://github.com/axboe/liburing/discussions/1459
    Reported-by: Benedek Thaler <thaler@thaler.hu>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
iommu/vt-d: Fix __domain_mapping()'s usage of switch_to_super_page() [+ + +]
Author: Eugene Koira <eugkoira@amazon.com>
Date:   Wed Sep 3 13:53:29 2025 +0800

    iommu/vt-d: Fix __domain_mapping()'s usage of switch_to_super_page()
    
    commit dce043c07ca1ac19cfbe2844a6dc71e35c322353 upstream.
    
    switch_to_super_page() assumes the memory range it's working on is aligned
    to the target large page level. Unfortunately, __domain_mapping() doesn't
    take this into account when using it, and will pass unaligned ranges
    ultimately freeing a PTE range larger than expected.
    
    Take for example a mapping with the following iov_pfn range [0x3fe400,
    0x4c0600), which should be backed by the following mappings:
    
       iov_pfn [0x3fe400, 0x3fffff] covered by 2MiB pages
       iov_pfn [0x400000, 0x4bffff] covered by 1GiB pages
       iov_pfn [0x4c0000, 0x4c05ff] covered by 2MiB pages
    
    Under this circumstance, __domain_mapping() will pass [0x400000, 0x4c05ff]
    to switch_to_super_page() at a 1 GiB granularity, which will in turn
    free PTEs all the way to iov_pfn 0x4fffff.
    
    Mitigate this by rounding down the iov_pfn range passed to
    switch_to_super_page() in __domain_mapping()
    to the target large page level.
    
    Additionally add range alignment checks to switch_to_super_page.
    
    Fixes: 9906b9352a35 ("iommu/vt-d: Avoid duplicate removing in __domain_mapping()")
    Signed-off-by: Eugene Koira <eugkoira@amazon.com>
    Cc: stable@vger.kernel.org
    Reviewed-by: Nicolas Saenz Julienne <nsaenz@amazon.com>
    Reviewed-by: David Woodhouse <dwmw@amazon.co.uk>
    Link: https://lore.kernel.org/r/20250826143816.38686-1-eugkoira@amazon.com
    Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
    Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer [+ + +]
Author: Namjae Jeon <linkinjeon@kernel.org>
Date:   Wed Sep 10 11:22:52 2025 +0900

    ksmbd: smbdirect: validate data_offset and data_length field of smb_direct_data_transfer
    
    commit 5282491fc49d5614ac6ddcd012e5743eecb6a67c upstream.
    
    If data_offset and data_length of smb_direct_data_transfer struct are
    invalid, out of bounds issue could happen.
    This patch validate data_offset and data_length field in recv_done.
    
    Cc: stable@vger.kernel.org
    Fixes: 2ea086e35c3d ("ksmbd: add buffer validation for smb direct")
    Reviewed-by: Stefan Metzmacher <metze@samba.org>
    Reported-by: Luigino Camastra, Aisle Research <luigino.camastra@aisle.com>
    Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size [+ + +]
Author: Stefan Metzmacher <metze@samba.org>
Date:   Thu Sep 11 10:05:23 2025 +0900

    ksmbd: smbdirect: verify remaining_data_length respects max_fragmented_recv_size
    
    commit e1868ba37fd27c6a68e31565402b154beaa65df0 upstream.
    
    This is inspired by the check for data_offset + data_length.
    
    Cc: Steve French <smfrench@gmail.com>
    Cc: Tom Talpey <tom@talpey.com>
    Cc: linux-cifs@vger.kernel.org
    Cc: samba-technical@lists.samba.org
    Cc: stable@vger.kernel.org
    Fixes: 2ea086e35c3d ("ksmbd: add buffer validation for smb direct")
    Acked-by: Namjae Jeon <linkinjeon@kernel.org>
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR even if AVIC is active [+ + +]
Author: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Date:   Mon Aug 25 18:44:28 2025 +0200

    KVM: SVM: Sync TPR from LAPIC into VMCB::V_TPR even if AVIC is active
    
    commit d02e48830e3fce9701265f6c5a58d9bdaf906a76 upstream.
    
    Commit 3bbf3565f48c ("svm: Do not intercept CR8 when enable AVIC")
    inhibited pre-VMRUN sync of TPR from LAPIC into VMCB::V_TPR in
    sync_lapic_to_cr8() when AVIC is active.
    
    AVIC does automatically sync between these two fields, however it does
    so only on explicit guest writes to one of these fields, not on a bare
    VMRUN.
    
    This meant that when AVIC is enabled host changes to TPR in the LAPIC
    state might not get automatically copied into the V_TPR field of VMCB.
    
    This is especially true when it is the userspace setting LAPIC state via
    KVM_SET_LAPIC ioctl() since userspace does not have access to the guest
    VMCB.
    
    Practice shows that it is the V_TPR that is actually used by the AVIC to
    decide whether to issue pending interrupts to the CPU (not TPR in TASKPRI),
    so any leftover value in V_TPR will cause serious interrupt delivery issues
    in the guest when AVIC is enabled.
    
    Fix this issue by doing pre-VMRUN TPR sync from LAPIC into VMCB::V_TPR
    even when AVIC is enabled.
    
    Fixes: 3bbf3565f48c ("svm: Do not intercept CR8 when enable AVIC")
    Cc: stable@vger.kernel.org
    Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
    Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org>
    Link: https://lore.kernel.org/r/c231be64280b1461e854e1ce3595d70cde3a2e9d.1756139678.git.maciej.szmigiero@oracle.com
    [sean: tag for stable@]
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Linux: Linux 6.1.154 [+ + +]
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Thu Sep 25 10:58:55 2025 +0200

    Linux 6.1.154
    
    Link: https://lore.kernel.org/r/20250922192403.524848428@linuxfoundation.org
    Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
    Tested-by: Brett A C Sheffield <bacs@librecast.net>
    Tested-by: Peter Schneider <pschneider1968@googlemail.com>
    Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
    Tested-by: Jon Hunter <jonathanh@nvidia.com>
    Tested-by: Mark Brown <broonie@kernel.org>
    Tested-by: Ron Economos <re@w6rz.net>
    Tested-by: Salvatore Bonaccorso <carnil@debian.org>
    Tested-by: Miguel Ojeda <ojeda@kernel.org>
    Tested-by: Shuah Khan <skhan@linuxfoundation.org>
    Tested-by: Hardik Garg <hargar@linux.microsoft.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled [+ + +]
Author: Huacai Chen <chenhuacai@kernel.org>
Date:   Thu Sep 18 19:44:01 2025 +0800

    LoongArch: Align ACPI structures if ARCH_STRICT_ALIGN enabled
    
    commit a9d13433fe17be0e867e51e71a1acd2731fbef8d upstream.
    
    ARCH_STRICT_ALIGN is used for hardware without UAL, now it only control
    the -mstrict-align flag. However, ACPI structures are packed by default
    so will cause unaligned accesses.
    
    To avoid this, define ACPI_MISALIGNMENT_NOT_SUPPORTED in asm/acenv.h to
    align ACPI structures if ARCH_STRICT_ALIGN enabled.
    
    Cc: stable@vger.kernel.org
    Reported-by: Binbin Zhou <zhoubinbin@loongson.cn>
    Suggested-by: Xi Ruoyao <xry111@xry111.site>
    Suggested-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
    Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

LoongArch: Check the return value when creating kobj [+ + +]
Author: Tao Cui <cuitao@kylinos.cn>
Date:   Thu Sep 18 19:44:04 2025 +0800

    LoongArch: Check the return value when creating kobj
    
    commit 51adb03e6b865c0c6790f29659ff52d56742de2e upstream.
    
    Add a check for the return value of kobject_create_and_add(), to ensure
    that the kobj allocation succeeds for later use.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Tao Cui <cuitao@kylinos.cn>
    Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mmc: mvsdio: Fix dma_unmap_sg() nents value [+ + +]
Author: Thomas Fourier <fourier.thomas@gmail.com>
Date:   Tue Aug 26 09:58:08 2025 +0200

    mmc: mvsdio: Fix dma_unmap_sg() nents value
    
    commit 8ab2f1c35669bff7d7ed1bb16bf5cc989b3e2e17 upstream.
    
    The dma_unmap_sg() functions should be called with the same nents as the
    dma_map_sg(), not the value the map function returned.
    
    Fixes: 236caa7cc351 ("mmc: SDIO driver for Marvell SoCs")
    Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
    Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
    Cc: stable@vger.kernel.org
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
mptcp: pm: nl: announce deny-join-id0 flag [+ + +]
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Sat Sep 20 00:51:20 2025 +0200

    mptcp: pm: nl: announce deny-join-id0 flag
    
    commit 2293c57484ae64c9a3c847c8807db8c26a3a4d41 upstream.
    
    During the connection establishment, a peer can tell the other one that
    it cannot establish new subflows to the initial IP address and port by
    setting the 'C' flag [1]. Doing so makes sense when the sender is behind
    a strict NAT, operating behind a legacy Layer 4 load balancer, or using
    anycast IP address for example.
    
    When this 'C' flag is set, the path-managers must then not try to
    establish new subflows to the other peer's initial IP address and port.
    The in-kernel PM has access to this info, but the userspace PM didn't.
    
    The RFC8684 [1] is strict about that:
    
      (...) therefore the receiver MUST NOT try to open any additional
      subflows toward this address and port.
    
    So it is important to tell the userspace about that as it is responsible
    for the respect of this flag.
    
    When a new connection is created and established, the Netlink events
    now contain the existing but not currently used 'flags' attribute. When
    MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 is set, it means no other subflows
    to the initial IP address and port -- info that are also part of the
    event -- can be established.
    
    Link: https://datatracker.ietf.org/doc/html/rfc8684#section-3.1-20.6 [1]
    Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
    Reported-by: Marek Majkowski <marek@cloudflare.com>
    Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/532
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20250912-net-mptcp-pm-uspace-deny_join_id0-v1-2-40171884ade8@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    [ Conflicts in mptcp_pm.yaml, and mptcp_pm.h, because these files have
      been added later by commit bc8aeb2045e2 ("Documentation: netlink: add
      a YAML spec for mptcp"), and commit 9d1ed17f93ce ("uapi: mptcp: use
      header file generated from YAML spec"), which are not in this version.
      Applying the same modifications, but only in mptcp.h.
      Conflict in pm_netlink.c, because of a difference in the context,
      introduced by commit b9f4554356f6 ("mptcp: annotate lockless access
      for token"), which is not in this version. ]
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

mptcp: propagate shutdown to subflows when possible [+ + +]
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Sun Sep 21 20:44:04 2025 -0400

    mptcp: propagate shutdown to subflows when possible
    
    [ Upstream commit f755be0b1ff429a2ecf709beeb1bcd7abc111c2b ]
    
    When the MPTCP DATA FIN have been ACKed, there is no more MPTCP related
    metadata to exchange, and all subflows can be safely shutdown.
    
    Before this patch, the subflows were actually terminated at 'close()'
    time. That's certainly fine most of the time, but not when the userspace
    'shutdown()' a connection, without close()ing it. When doing so, the
    subflows were staying in LAST_ACK state on one side -- and consequently
    in FIN_WAIT2 on the other side -- until the 'close()' of the MPTCP
    socket.
    
    Now, when the DATA FIN have been ACKed, all subflows are shutdown. A
    consequence of this is that the TCP 'FIN' flag can be set earlier now,
    but the end result is the same. This affects the packetdrill tests
    looking at the end of the MPTCP connections, but for a good reason.
    
    Note that tcp_shutdown() will check the subflow state, so no need to do
    that again before calling it.
    
    Fixes: 3721b9b64676 ("mptcp: Track received DATA_FIN sequence number and add related helpers")
    Cc: stable@vger.kernel.org
    Fixes: 16a9a9da1723 ("mptcp: Add helper to process acks of DATA_FIN")
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Reviewed-by: Geliang Tang <geliang@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20250912-net-mptcp-fix-sft-connect-v1-1-d40e77cbbf02@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    [ Adjust context ]
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

mptcp: set remote_deny_join_id0 on SYN recv [+ + +]
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Fri Sep 12 14:52:20 2025 +0200

    mptcp: set remote_deny_join_id0 on SYN recv
    
    [ Upstream commit 96939cec994070aa5df852c10fad5fc303a97ea3 ]
    
    When a SYN containing the 'C' flag (deny join id0) was received, this
    piece of information was not propagated to the path-manager.
    
    Even if this flag is mainly set on the server side, a client can also
    tell the server it cannot try to establish new subflows to the client's
    initial IP address and port. The server's PM should then record such
    info when received, and before sending events about the new connection.
    
    Fixes: df377be38725 ("mptcp: add deny_join_id0 in mptcp_options_received")
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20250912-net-mptcp-pm-uspace-deny_join_id0-v1-1-40171884ade8@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
net: liquidio: fix overflow in octeon_init_instr_queue() [+ + +]
Author: Alexey Nepomnyashih <sdl@nppct.ru>
Date:   Wed Sep 17 15:30:58 2025 +0000

    net: liquidio: fix overflow in octeon_init_instr_queue()
    
    [ Upstream commit cca7b1cfd7b8a0eff2a3510c5e0f10efe8fa3758 ]
    
    The expression `(conf->instr_type == 64) << iq_no` can overflow because
    `iq_no` may be as high as 64 (`CN23XX_MAX_RINGS_PER_PF`). Casting the
    operand to `u64` ensures correct 64-bit arithmetic.
    
    Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
    Signed-off-by: Alexey Nepomnyashih <sdl@nppct.ru>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: natsemi: fix `rx_dropped` double accounting on `netif_rx()` failure [+ + +]
Author: Yeounsu Moon <yyyynoom@gmail.com>
Date:   Sat Sep 13 15:01:36 2025 +0900

    net: natsemi: fix `rx_dropped` double accounting on `netif_rx()` failure
    
    [ Upstream commit 93ab4881a4e2b9657bdce4b8940073bfb4ed5eab ]
    
    `netif_rx()` already increments `rx_dropped` core stat when it fails.
    The driver was also updating `ndev->stats.rx_dropped` in the same path.
    Since both are reported together via `ip -s -s` command, this resulted
    in drops being counted twice in user-visible stats.
    
    Keep the driver update on `if (unlikely(!skb))`, but skip it after
    `netif_rx()` errors.
    
    Fixes: caf586e5f23c ("net: add a core netdev->rx_dropped counter")
    Signed-off-by: Yeounsu Moon <yyyynoom@gmail.com>
    Reviewed-by: Simon Horman <horms@kernel.org>
    Link: https://patch.msgid.link/20250913060135.35282-3-yyyynoom@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

net: rfkill: gpio: add DT support [+ + +]
Author: Philipp Zabel <p.zabel@pengutronix.de>
Date:   Sun Sep 21 19:29:57 2025 -0400

    net: rfkill: gpio: add DT support
    
    [ Upstream commit d64c732dfc9edcd57feb693c23162117737e426b ]
    
    Allow probing rfkill-gpio via device tree. This hooks up the already
    existing support that was started in commit 262c91ee5e52 ("net:
    rfkill: gpio: prepare for DT and ACPI support") via the "rfkill-gpio"
    compatible, with the "name" and "type" properties renamed to "label"
    and "radio-type", respectively, in the device tree case.
    
    Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    Link: https://lore.kernel.org/r/20230102-rfkill-gpio-dt-v2-2-d1b83758c16d@pengutronix.de
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Stable-dep-of: b6f56a44e4c1 ("net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer [+ + +]
Author: Hans de Goede <hansg@kernel.org>
Date:   Sun Sep 21 19:29:58 2025 -0400

    net: rfkill: gpio: Fix crash due to dereferencering uninitialized pointer
    
    [ Upstream commit b6f56a44e4c1014b08859dcf04ed246500e310e5 ]
    
    Since commit 7d5e9737efda ("net: rfkill: gpio: get the name and type from
    device property") rfkill_find_type() gets called with the possibly
    uninitialized "const char *type_name;" local variable.
    
    On x86 systems when rfkill-gpio binds to a "BCM4752" or "LNV4752"
    acpi_device, the rfkill->type is set based on the ACPI acpi_device_id:
    
            rfkill->type = (unsigned)id->driver_data;
    
    and there is no "type" property so device_property_read_string() will fail
    and leave type_name uninitialized, leading to a potential crash.
    
    rfkill_find_type() does accept a NULL pointer, fix the potential crash
    by initializing type_name to NULL.
    
    Note likely sofar this has not been caught because:
    
    1. Not many x86 machines actually have a "BCM4752"/"LNV4752" acpi_device
    2. The stack happened to contain NULL where type_name is stored
    
    Fixes: 7d5e9737efda ("net: rfkill: gpio: get the name and type from device property")
    Cc: stable@vger.kernel.org
    Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com>
    Signed-off-by: Hans de Goede <hansg@kernel.org>
    Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
    Link: https://patch.msgid.link/20250913113515.21698-1-hansg@kernel.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/* [+ + +]
Author: Nathan Chancellor <nathan@kernel.org>
Date:   Sat Sep 6 23:43:34 2025 +0900

    nilfs2: fix CFI failure when accessing /sys/fs/nilfs2/features/*
    
    commit 025e87f8ea2ae3a28bf1fe2b052bfa412c27ed4a upstream.
    
    When accessing one of the files under /sys/fs/nilfs2/features when
    CONFIG_CFI_CLANG is enabled, there is a CFI violation:
    
      CFI failure at kobj_attr_show+0x59/0x80 (target: nilfs_feature_revision_show+0x0/0x30; expected type: 0xfc392c4d)
      ...
      Call Trace:
       <TASK>
       sysfs_kf_seq_show+0x2a6/0x390
       ? __cfi_kobj_attr_show+0x10/0x10
       kernfs_seq_show+0x104/0x15b
       seq_read_iter+0x580/0xe2b
      ...
    
    When the kobject of the kset for /sys/fs/nilfs2 is initialized, its ktype
    is set to kset_ktype, which has a ->sysfs_ops of kobj_sysfs_ops.  When
    nilfs_feature_attr_group is added to that kobject via
    sysfs_create_group(), the kernfs_ops of each files is sysfs_file_kfops_rw,
    which will call sysfs_kf_seq_show() when ->seq_show() is called.
    sysfs_kf_seq_show() in turn calls kobj_attr_show() through
    ->sysfs_ops->show().  kobj_attr_show() casts the provided attribute out to
    a 'struct kobj_attribute' via container_of() and calls ->show(), resulting
    in the CFI violation since neither nilfs_feature_revision_show() nor
    nilfs_feature_README_show() match the prototype of ->show() in 'struct
    kobj_attribute'.
    
    Resolve the CFI violation by adjusting the second parameter in
    nilfs_feature_{revision,README}_show() from 'struct attribute' to 'struct
    kobj_attribute' to match the expected prototype.
    
    Link: https://lkml.kernel.org/r/20250906144410.22511-1-konishi.ryusuke@gmail.com
    Fixes: aebe17f68444 ("nilfs2: add /sys/fs/nilfs2/features group")
    Signed-off-by: Nathan Chancellor <nathan@kernel.org>
    Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
    Reported-by: kernel test robot <oliver.sang@intel.com>
    Closes: https://lore.kernel.org/oe-lkp/202509021646.bc78d9ef-lkp@intel.com/
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
octeontx2-pf: Fix use-after-free bugs in otx2_sync_tstamp() [+ + +]
Author: Duoming Zhou <duoming@zju.edu.cn>
Date:   Wed Sep 17 14:38:53 2025 +0800

    octeontx2-pf: Fix use-after-free bugs in otx2_sync_tstamp()
    
    [ Upstream commit f8b4687151021db61841af983f1cb7be6915d4ef ]
    
    The original code relies on cancel_delayed_work() in otx2_ptp_destroy(),
    which does not ensure that the delayed work item synctstamp_work has fully
    completed if it was already running. This leads to use-after-free scenarios
    where otx2_ptp is deallocated by otx2_ptp_destroy(), while synctstamp_work
    remains active and attempts to dereference otx2_ptp in otx2_sync_tstamp().
    Furthermore, the synctstamp_work is cyclic, the likelihood of triggering
    the bug is nonnegligible.
    
    A typical race condition is illustrated below:
    
    CPU 0 (cleanup)           | CPU 1 (delayed work callback)
    otx2_remove()             |
      otx2_ptp_destroy()      | otx2_sync_tstamp()
        cancel_delayed_work() |
        kfree(ptp)            |
                              |   ptp = container_of(...); //UAF
                              |   ptp-> //UAF
    
    This is confirmed by a KASAN report:
    
    BUG: KASAN: slab-use-after-free in __run_timer_base.part.0+0x7d7/0x8c0
    Write of size 8 at addr ffff88800aa09a18 by task bash/136
    ...
    Call Trace:
     <IRQ>
     dump_stack_lvl+0x55/0x70
     print_report+0xcf/0x610
     ? __run_timer_base.part.0+0x7d7/0x8c0
     kasan_report+0xb8/0xf0
     ? __run_timer_base.part.0+0x7d7/0x8c0
     __run_timer_base.part.0+0x7d7/0x8c0
     ? __pfx___run_timer_base.part.0+0x10/0x10
     ? __pfx_read_tsc+0x10/0x10
     ? ktime_get+0x60/0x140
     ? lapic_next_event+0x11/0x20
     ? clockevents_program_event+0x1d4/0x2a0
     run_timer_softirq+0xd1/0x190
     handle_softirqs+0x16a/0x550
     irq_exit_rcu+0xaf/0xe0
     sysvec_apic_timer_interrupt+0x70/0x80
     </IRQ>
    ...
    Allocated by task 1:
     kasan_save_stack+0x24/0x50
     kasan_save_track+0x14/0x30
     __kasan_kmalloc+0x7f/0x90
     otx2_ptp_init+0xb1/0x860
     otx2_probe+0x4eb/0xc30
     local_pci_probe+0xdc/0x190
     pci_device_probe+0x2fe/0x470
     really_probe+0x1ca/0x5c0
     __driver_probe_device+0x248/0x310
     driver_probe_device+0x44/0x120
     __driver_attach+0xd2/0x310
     bus_for_each_dev+0xed/0x170
     bus_add_driver+0x208/0x500
     driver_register+0x132/0x460
     do_one_initcall+0x89/0x300
     kernel_init_freeable+0x40d/0x720
     kernel_init+0x1a/0x150
     ret_from_fork+0x10c/0x1a0
     ret_from_fork_asm+0x1a/0x30
    
    Freed by task 136:
     kasan_save_stack+0x24/0x50
     kasan_save_track+0x14/0x30
     kasan_save_free_info+0x3a/0x60
     __kasan_slab_free+0x3f/0x50
     kfree+0x137/0x370
     otx2_ptp_destroy+0x38/0x80
     otx2_remove+0x10d/0x4c0
     pci_device_remove+0xa6/0x1d0
     device_release_driver_internal+0xf8/0x210
     pci_stop_bus_device+0x105/0x150
     pci_stop_and_remove_bus_device_locked+0x15/0x30
     remove_store+0xcc/0xe0
     kernfs_fop_write_iter+0x2c3/0x440
     vfs_write+0x871/0xd70
     ksys_write+0xee/0x1c0
     do_syscall_64+0xac/0x280
     entry_SYSCALL_64_after_hwframe+0x77/0x7f
    ...
    
    Replace cancel_delayed_work() with cancel_delayed_work_sync() to ensure
    that the delayed work item is properly canceled before the otx2_ptp is
    deallocated.
    
    This bug was initially identified through static analysis. To reproduce
    and test it, I simulated the OcteonTX2 PCI device in QEMU and introduced
    artificial delays within the otx2_sync_tstamp() function to increase the
    likelihood of triggering the bug.
    
    Fixes: 2958d17a8984 ("octeontx2-pf: Add support for ptp 1-step mode on CN10K silicon")
    Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
    Reviewed-by: Vadim Fedorenko <vadim.fedorenko@linux.dev>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch [+ + +]
Author: Geert Uytterhoeven <geert+renesas@glider.be>
Date:   Wed Aug 13 17:50:14 2025 +0200

    pcmcia: omap_cf: Mark driver struct with __refdata to prevent section mismatch
    
    [ Upstream commit d1dfcdd30140c031ae091868fb5bed084132bca1 ]
    
    As described in the added code comment, a reference to .exit.text is ok
    for drivers registered via platform_driver_probe().  Make this explicit
    to prevent the following section mismatch warning
    
        WARNING: modpost: drivers/pcmcia/omap_cf: section mismatch in reference: omap_cf_driver+0x4 (section: .data) -> omap_cf_remove (section: .exit.text)
    
    that triggers on an omap1_defconfig + CONFIG_OMAP_CF=m build.
    
    Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
    Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>
    Reviewed-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
    Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
phy: broadcom: ns-usb3: fix Wvoid-pointer-to-enum-cast warning [+ + +]
Author: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Date:   Wed Sep 17 09:29:49 2025 -0400

    phy: broadcom: ns-usb3: fix Wvoid-pointer-to-enum-cast warning
    
    [ Upstream commit bd6e74a2f0a0c76dda8e44d26f9b91a797586c3b ]
    
    'family' is an enum, thus cast of pointer on 64-bit compile test with
    W=1 causes:
    
      drivers/phy/broadcom/phy-bcm-ns-usb3.c:209:17: error: cast to smaller integer type 'enum bcm_ns_family' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast]
    
    Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
    Link: https://lore.kernel.org/r/20230810111958.205705-2-krzysztof.kozlowski@linaro.org
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Stable-dep-of: 64961557efa1 ("phy: ti: omap-usb2: fix device leak at unbind")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

phy: ti: omap-usb2: fix device leak at unbind [+ + +]
Author: Johan Hovold <johan@kernel.org>
Date:   Wed Sep 17 09:29:51 2025 -0400

    phy: ti: omap-usb2: fix device leak at unbind
    
    [ Upstream commit 64961557efa1b98f375c0579779e7eeda1a02c42 ]
    
    Make sure to drop the reference to the control device taken by
    of_find_device_by_node() during probe when the driver is unbound.
    
    Fixes: 478b6c7436c2 ("usb: phy: omap-usb2: Don't use omap_get_control_dev()")
    Cc: stable@vger.kernel.org      # 3.13
    Cc: Roger Quadros <rogerq@kernel.org>
    Signed-off-by: Johan Hovold <johan@kernel.org>
    Link: https://lore.kernel.org/r/20250724131206.2211-3-johan@kernel.org
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

phy: Use device_get_match_data() [+ + +]
Author: Rob Herring <robh@kernel.org>
Date:   Wed Sep 17 09:29:50 2025 -0400

    phy: Use device_get_match_data()
    
    [ Upstream commit 21bf6fc47a1e45031ba8a7084343b7cfd09ed1d3 ]
    
    Use preferred device_get_match_data() instead of of_match_device() to
    get the driver match data. With this, adjust the includes to explicitly
    include the correct headers.
    
    Signed-off-by: Rob Herring <robh@kernel.org>
    Reviewed-by: Heiko Stuebner <heiko@sntech.de>
    Link: https://lore.kernel.org/r/20231009172923.2457844-15-robh@kernel.org
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Stable-dep-of: 64961557efa1 ("phy: ti: omap-usb2: fix device leak at unbind")
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
power: supply: bq27xxx: fix error return in case of no bq27000 hdq battery [+ + +]
Author: H. Nikolaus Schaller <hns@goldelico.com>
Date:   Sat Aug 23 12:34:56 2025 +0200

    power: supply: bq27xxx: fix error return in case of no bq27000 hdq battery
    
    commit 2c334d038466ac509468fbe06905a32d202117db upstream.
    
    Since commit
    
            commit f16d9fb6cf03 ("power: supply: bq27xxx: Retrieve again when busy")
    
    the console log of some devices with hdq enabled but no bq27000 battery
    (like e.g. the Pandaboard) is flooded with messages like:
    
    [   34.247833] power_supply bq27000-battery: driver failed to report 'status' property: -1
    
    as soon as user-space is finding a /sys entry and trying to read the
    "status" property.
    
    It turns out that the offending commit changes the logic to now return the
    value of cache.flags if it is <0. This is likely under the assumption that
    it is an error number. In normal errors from bq27xxx_read() this is indeed
    the case.
    
    But there is special code to detect if no bq27000 is installed or accessible
    through hdq/1wire and wants to report this. In that case, the cache.flags
    are set historically by
    
            commit 3dd843e1c26a ("bq27000: report missing device better.")
    
    to constant -1 which did make reading properties return -ENODEV. So everything
    appeared to be fine before the return value was passed upwards.
    
    Now the -1 is returned as -EPERM instead of -ENODEV, triggering the error
    condition in power_supply_format_property() which then floods the console log.
    
    So we change the detection of missing bq27000 battery to simply set
    
            cache.flags = -ENODEV
    
    instead of -1.
    
    Fixes: f16d9fb6cf03 ("power: supply: bq27xxx: Retrieve again when busy")
    Cc: Jerry Lv <Jerry.Lv@axis.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
    Link: https://lore.kernel.org/r/692f79eb6fd541adb397038ea6e750d4de2deddf.1755945297.git.hns@goldelico.com
    Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

power: supply: bq27xxx: restrict no-battery detection to bq27000 [+ + +]
Author: H. Nikolaus Schaller <hns@goldelico.com>
Date:   Sat Aug 23 12:34:57 2025 +0200

    power: supply: bq27xxx: restrict no-battery detection to bq27000
    
    commit 1e451977e1703b6db072719b37cd1b8e250b9cc9 upstream.
    
    There are fuel gauges in the bq27xxx series (e.g. bq27z561) which may in some
    cases report 0xff as the value of BQ27XXX_REG_FLAGS that should not be
    interpreted as "no battery" like for a disconnected battery with some built
    in bq27000 chip.
    
    So restrict the no-battery detection originally introduced by
    
        commit 3dd843e1c26a ("bq27000: report missing device better.")
    
    to the bq27000.
    
    There is no need to backport further because this was hidden before
    
            commit f16d9fb6cf03 ("power: supply: bq27xxx: Retrieve again when busy")
    
    Fixes: f16d9fb6cf03 ("power: supply: bq27xxx: Retrieve again when busy")
    Suggested-by: Jerry Lv <Jerry.Lv@axis.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com>
    Link: https://lore.kernel.org/r/dd979fa6855fd051ee5117016c58daaa05966e24.1755945297.git.hns@goldelico.com
    Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
qed: Don't collect too many protection override GRC elements [+ + +]
Author: Jamie Bainbridge <jamie.bainbridge@gmail.com>
Date:   Wed Sep 10 16:29:16 2025 +1000

    qed: Don't collect too many protection override GRC elements
    
    [ Upstream commit 56c0a2a9ddc2f5b5078c5fb0f81ab76bbc3d4c37 ]
    
    In the protection override dump path, the firmware can return far too
    many GRC elements, resulting in attempting to write past the end of the
    previously-kmalloc'ed dump buffer.
    
    This will result in a kernel panic with reason:
    
     BUG: unable to handle kernel paging request at ADDRESS
    
    where "ADDRESS" is just past the end of the protection override dump
    buffer. The start address of the buffer is:
     p_hwfn->cdev->dbg_features[DBG_FEATURE_PROTECTION_OVERRIDE].dump_buf
    and the size of the buffer is buf_size in the same data structure.
    
    The panic can be arrived at from either the qede Ethernet driver path:
    
        [exception RIP: qed_grc_dump_addr_range+0x108]
     qed_protection_override_dump at ffffffffc02662ed [qed]
     qed_dbg_protection_override_dump at ffffffffc0267792 [qed]
     qed_dbg_feature at ffffffffc026aa8f [qed]
     qed_dbg_all_data at ffffffffc026b211 [qed]
     qed_fw_fatal_reporter_dump at ffffffffc027298a [qed]
     devlink_health_do_dump at ffffffff82497f61
     devlink_health_report at ffffffff8249cf29
     qed_report_fatal_error at ffffffffc0272baf [qed]
     qede_sp_task at ffffffffc045ed32 [qede]
     process_one_work at ffffffff81d19783
    
    or the qedf storage driver path:
    
        [exception RIP: qed_grc_dump_addr_range+0x108]
     qed_protection_override_dump at ffffffffc068b2ed [qed]
     qed_dbg_protection_override_dump at ffffffffc068c792 [qed]
     qed_dbg_feature at ffffffffc068fa8f [qed]
     qed_dbg_all_data at ffffffffc0690211 [qed]
     qed_fw_fatal_reporter_dump at ffffffffc069798a [qed]
     devlink_health_do_dump at ffffffff8aa95e51
     devlink_health_report at ffffffff8aa9ae19
     qed_report_fatal_error at ffffffffc0697baf [qed]
     qed_hw_err_notify at ffffffffc06d32d7 [qed]
     qed_spq_post at ffffffffc06b1011 [qed]
     qed_fcoe_destroy_conn at ffffffffc06b2e91 [qed]
     qedf_cleanup_fcport at ffffffffc05e7597 [qedf]
     qedf_rport_event_handler at ffffffffc05e7bf7 [qedf]
     fc_rport_work at ffffffffc02da715 [libfc]
     process_one_work at ffffffff8a319663
    
    Resolve this by clamping the firmware's return value to the maximum
    number of legal elements the firmware should return.
    
    Fixes: d52c89f120de8 ("qed*: Utilize FW 8.37.2.0")
    Signed-off-by: Jamie Bainbridge <jamie.bainbridge@gmail.com>
    Link: https://patch.msgid.link/f8e1182934aa274c18d0682a12dbaf347595469c.1757485536.git.jamie.bainbridge@gmail.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
rds: ib: Increment i_fastreg_wrs before bailing out [+ + +]
Author: Håkon Bugge <haakon.bugge@oracle.com>
Date:   Thu Sep 11 15:33:34 2025 +0200

    rds: ib: Increment i_fastreg_wrs before bailing out
    
    commit 4351ca3fcb3ffecf12631b4996bf085a2dad0db6 upstream.
    
    We need to increment i_fastreg_wrs before we bail out from
    rds_ib_post_reg_frmr().
    
    We have a fixed budget of how many FRWR operations that can be
    outstanding using the dedicated QP used for memory registrations and
    de-registrations. This budget is enforced by the atomic_t
    i_fastreg_wrs. If we bail out early in rds_ib_post_reg_frmr(), we will
    "leak" the possibility of posting an FRWR operation, and if that
    accumulates, no FRWR operation can be carried out.
    
    Fixes: 1659185fb4d0 ("RDS: IB: Support Fastreg MR (FRMR) memory registration mode")
    Fixes: 3a2886cca703 ("net/rds: Keep track of and wait for FRWR segments in use upon shutdown")
    Cc: stable@vger.kernel.org
    Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com>
    Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
    Link: https://patch.msgid.link/20250911133336.451212-1-haakon.bugge@oracle.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
Revert "net/mlx5e: Update and set Xon/Xoff upon port speed set" [+ + +]
Author: Tariq Toukan <tariqt@nvidia.com>
Date:   Wed Sep 17 16:48:54 2025 +0300

    Revert "net/mlx5e: Update and set Xon/Xoff upon port speed set"
    
    [ Upstream commit 3fbfe251cc9f6d391944282cdb9bcf0bd02e01f8 ]
    
    This reverts commit d24341740fe48add8a227a753e68b6eedf4b385a.
    It causes errors when trying to configure QoS, as well as
    loss of L2 connectivity (on multi-host devices).
    
    Reported-by: Jakub Kicinski <kuba@kernel.org>
    Link: https://lore.kernel.org/20250910170011.70528106@kernel.org
    Fixes: d24341740fe4 ("net/mlx5e: Update and set Xon/Xoff upon port speed set")
    Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
selftests: mptcp: avoid spurious errors on TCP disconnect [+ + +]
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Fri Sep 12 14:25:52 2025 +0200

    selftests: mptcp: avoid spurious errors on TCP disconnect
    
    commit 8708c5d8b3fb3f6d5d3b9e6bfe01a505819f519a upstream.
    
    The disconnect test-case, with 'plain' TCP sockets generates spurious
    errors, e.g.
    
      07 ns1 TCP   -> ns1 (dead:beef:1::1:10006) MPTCP
      read: Connection reset by peer
      read: Connection reset by peer
      (duration   155ms) [FAIL] client exit code 3, server 3
    
      netns ns1-FloSdv (listener) socket stat for 10006:
      TcpActiveOpens                  2                  0.0
      TcpPassiveOpens                 2                  0.0
      TcpEstabResets                  2                  0.0
      TcpInSegs                       274                0.0
      TcpOutSegs                      276                0.0
      TcpOutRsts                      3                  0.0
      TcpExtPruneCalled               2                  0.0
      TcpExtRcvPruned                 1                  0.0
      TcpExtTCPPureAcks               104                0.0
      TcpExtTCPRcvCollapsed           2                  0.0
      TcpExtTCPBacklogCoalesce        42                 0.0
      TcpExtTCPRcvCoalesce            43                 0.0
      TcpExtTCPChallengeACK           1                  0.0
      TcpExtTCPFromZeroWindowAdv      42                 0.0
      TcpExtTCPToZeroWindowAdv        41                 0.0
      TcpExtTCPWantZeroWindowAdv      13                 0.0
      TcpExtTCPOrigDataSent           164                0.0
      TcpExtTCPDelivered              165                0.0
      TcpExtTCPRcvQDrop               1                  0.0
    
    In the failing scenarios (TCP -> MPTCP), the involved sockets are
    actually plain TCP ones, as fallbacks for passive sockets at 2WHS time
    cause the MPTCP listeners to actually create 'plain' TCP sockets.
    
    Similar to commit 218cc166321f ("selftests: mptcp: avoid spurious errors
    on disconnect"), the root cause is in the user-space bits: the test
    program tries to disconnect as soon as all the pending data has been
    spooled, generating an RST. If such option reaches the peer before the
    connection has reached the closed status, the TCP socket will report an
    error to the user-space, as per protocol specification, causing the
    above failure. Note that it looks like this issue got more visible since
    the "tcp: receiver changes" series from commit 06baf9bfa6ca ("Merge
    branch 'tcp-receiver-changes'").
    
    Address the issue by explicitly waiting for the TCP sockets (-t) to
    reach a closed status before performing the disconnect. More precisely,
    the test program now waits for plain TCP sockets or TCP subflows in
    addition to the MPTCP sockets that were already monitored.
    
    While at it, use 'ss' with '-n' to avoid resolving service names, which
    is not needed here.
    
    Fixes: 218cc166321f ("selftests: mptcp: avoid spurious errors on disconnect")
    Cc: stable@vger.kernel.org
    Suggested-by: Paolo Abeni <pabeni@redhat.com>
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Reviewed-by: Geliang Tang <geliang@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20250912-net-mptcp-fix-sft-connect-v1-3-d40e77cbbf02@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

selftests: mptcp: connect: catch IO errors on listen side [+ + +]
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Sun Sep 21 20:43:04 2025 -0400

    selftests: mptcp: connect: catch IO errors on listen side
    
    [ Upstream commit 14e22b43df25dbd4301351b882486ea38892ae4f ]
    
    IO errors were correctly printed to stderr, and propagated up to the
    main loop for the server side, but the returned value was ignored. As a
    consequence, the program for the listener side was no longer exiting
    with an error code in case of IO issues.
    
    Because of that, some issues might not have been seen. But very likely,
    most issues either had an effect on the client side, or the file
    transfer was not the expected one, e.g. the connection got reset before
    the end. Still, it is better to fix this.
    
    The main consequence of this issue is the error that was reported by the
    selftests: the received and sent files were different, and the MIB
    counters were not printed. Also, when such errors happened during the
    'disconnect' tests, the program tried to continue until the timeout.
    
    Now when an IO error is detected, the program exits directly with an
    error.
    
    Fixes: 05be5e273c84 ("selftests: mptcp: add disconnect tests")
    Cc: stable@vger.kernel.org
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Reviewed-by: Geliang Tang <geliang@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20250912-net-mptcp-fix-sft-connect-v1-2-d40e77cbbf02@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

selftests: mptcp: userspace pm: validate deny-join-id0 flag [+ + +]
Author: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Date:   Sat Sep 20 00:51:21 2025 +0200

    selftests: mptcp: userspace pm: validate deny-join-id0 flag
    
    commit 24733e193a0d68f20d220e86da0362460c9aa812 upstream.
    
    The previous commit adds the MPTCP_PM_EV_FLAG_DENY_JOIN_ID0 flag. Make
    sure it is correctly announced by the other peer when it has been
    received.
    
    pm_nl_ctl will now display 'deny_join_id0:1' when monitoring the events,
    and when this flag was set by the other peer.
    
    The 'Fixes' tag here below is the same as the one from the previous
    commit: this patch here is not fixing anything wrong in the selftests,
    but it validates the previous fix for an issue introduced by this commit
    ID.
    
    Fixes: 702c2f646d42 ("mptcp: netlink: allow userspace-driven subflow establishment")
    Reviewed-by: Mat Martineau <martineau@kernel.org>
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Link: https://patch.msgid.link/20250912-net-mptcp-pm-uspace-deny_join_id0-v1-3-40171884ade8@kernel.org
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    [ Conflict in userspace_pm.sh, because of a difference in the context,
      introduced by commit c66fb480a330 ("selftests: userspace pm: avoid
      relaunching pm events"), which is not in this version. The same lines
      can still be added at the same place.
      Conflicts in userspace_pm.sh, because of different refactoring, like
      with commit ae1fa39da991 ("selftests: mptcp: add evts_get_info
      helper"), and commit e198ad759273 ("selftests: mptcp: userspace_pm:
      uniform results printing"). The modifications have been adapted to the
      old version, without the new helpers. ]
    Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 
smb: client: fix smbdirect_recv_io leak in smbd_negotiate() error path [+ + +]
Author: Stefan Metzmacher <metze@samba.org>
Date:   Thu Sep 18 03:06:46 2025 +0200

    smb: client: fix smbdirect_recv_io leak in smbd_negotiate() error path
    
    [ Upstream commit daac51c7032036a0ca5f1aa419ad1b0471d1c6e0 ]
    
    During tests of another unrelated patch I was able to trigger this
    error: Objects remaining on __kmem_cache_shutdown()
    
    Cc: Steve French <smfrench@gmail.com>
    Cc: Tom Talpey <tom@talpey.com>
    Cc: Long Li <longli@microsoft.com>
    Cc: Namjae Jeon <linkinjeon@kernel.org>
    Cc: linux-cifs@vger.kernel.org
    Cc: samba-technical@lists.samba.org
    Fixes: f198186aa9bb ("CIFS: SMBD: Establish SMB Direct connection")
    Signed-off-by: Stefan Metzmacher <metze@samba.org>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect(). [+ + +]
Author: Kuniyuki Iwashima <kuniyu@google.com>
Date:   Mon Sep 15 17:56:46 2025 +0000

    tcp: Clear tcp_sk(sk)->fastopen_rsk in tcp_disconnect().
    
    [ Upstream commit 45c8a6cc2bcd780e634a6ba8e46bffbdf1fc5c01 ]
    
    syzbot reported the splat below where a socket had tcp_sk(sk)->fastopen_rsk
    in the TCP_ESTABLISHED state. [0]
    
    syzbot reused the server-side TCP Fast Open socket as a new client before
    the TFO socket completes 3WHS:
    
      1. accept()
      2. connect(AF_UNSPEC)
      3. connect() to another destination
    
    As of accept(), sk->sk_state is TCP_SYN_RECV, and tcp_disconnect() changes
    it to TCP_CLOSE and makes connect() possible, which restarts timers.
    
    Since tcp_disconnect() forgot to clear tcp_sk(sk)->fastopen_rsk, the
    retransmit timer triggered the warning and the intended packet was not
    retransmitted.
    
    Let's call reqsk_fastopen_remove() in tcp_disconnect().
    
    [0]:
    WARNING: CPU: 2 PID: 0 at net/ipv4/tcp_timer.c:542 tcp_retransmit_timer (net/ipv4/tcp_timer.c:542 (discriminator 7))
    Modules linked in:
    CPU: 2 UID: 0 PID: 0 Comm: swapper/2 Not tainted 6.17.0-rc5-g201825fb4278 #62 PREEMPT(voluntary)
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
    RIP: 0010:tcp_retransmit_timer (net/ipv4/tcp_timer.c:542 (discriminator 7))
    Code: 41 55 41 54 55 53 48 8b af b8 08 00 00 48 89 fb 48 85 ed 0f 84 55 01 00 00 0f b6 47 12 3c 03 74 0c 0f b6 47 12 3c 04 74 04 90 <0f> 0b 90 48 8b 85 c0 00 00 00 48 89 ef 48 8b 40 30 e8 6a 4f 06 3e
    RSP: 0018:ffffc900002f8d40 EFLAGS: 00010293
    RAX: 0000000000000002 RBX: ffff888106911400 RCX: 0000000000000017
    RDX: 0000000002517619 RSI: ffffffff83764080 RDI: ffff888106911400
    RBP: ffff888106d5c000 R08: 0000000000000001 R09: ffffc900002f8de8
    R10: 00000000000000c2 R11: ffffc900002f8ff8 R12: ffff888106911540
    R13: ffff888106911480 R14: ffff888106911840 R15: ffffc900002f8de0
    FS:  0000000000000000(0000) GS:ffff88907b768000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00007f8044d69d90 CR3: 0000000002c30003 CR4: 0000000000370ef0
    Call Trace:
     <IRQ>
     tcp_write_timer (net/ipv4/tcp_timer.c:738)
     call_timer_fn (kernel/time/timer.c:1747)
     __run_timers (kernel/time/timer.c:1799 kernel/time/timer.c:2372)
     timer_expire_remote (kernel/time/timer.c:2385 kernel/time/timer.c:2376 kernel/time/timer.c:2135)
     tmigr_handle_remote_up (kernel/time/timer_migration.c:944 kernel/time/timer_migration.c:1035)
     __walk_groups.isra.0 (kernel/time/timer_migration.c:533 (discriminator 1))
     tmigr_handle_remote (kernel/time/timer_migration.c:1096)
     handle_softirqs (./arch/x86/include/asm/jump_label.h:36 ./include/trace/events/irq.h:142 kernel/softirq.c:580)
     irq_exit_rcu (kernel/softirq.c:614 kernel/softirq.c:453 kernel/softirq.c:680 kernel/softirq.c:696)
     sysvec_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:1050 (discriminator 35) arch/x86/kernel/apic/apic.c:1050 (discriminator 35))
     </IRQ>
    
    Fixes: 8336886f786f ("tcp: TCP Fast Open Server - support TFO listeners")
    Reported-by: syzkaller <syzkaller@googlegroups.com>
    Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
    Link: https://patch.msgid.link/20250915175800.118793-2-kuniyu@google.com
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
tls: make sure to abort the stream if headers are bogus [+ + +]
Author: Jakub Kicinski <kuba@kernel.org>
Date:   Tue Sep 16 17:28:13 2025 -0700

    tls: make sure to abort the stream if headers are bogus
    
    [ Upstream commit 0aeb54ac4cd5cf8f60131b4d9ec0b6dc9c27b20d ]
    
    Normally we wait for the socket to buffer up the whole record
    before we service it. If the socket has a tiny buffer, however,
    we read out the data sooner, to prevent connection stalls.
    Make sure that we abort the connection when we find out late
    that the record is actually invalid. Retrying the parsing is
    fine in itself but since we copy some more data each time
    before we parse we can overflow the allocated skb space.
    
    Constructing a scenario in which we're under pressure without
    enough data in the socket to parse the length upfront is quite
    hard. syzbot figured out a way to do this by serving us the header
    in small OOB sends, and then filling in the recvbuf with a large
    normal send.
    
    Make sure that tls_rx_msg_size() aborts strp, if we reach
    an invalid record there's really no way to recover.
    
    Reported-by: Lee Jones <lee@kernel.org>
    Fixes: 84c61fe1a75b ("tls: rx: do not use the standard strparser")
    Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Link: https://patch.msgid.link/20250917002814.1743558-1-kuba@kernel.org
    Signed-off-by: Paolo Abeni <pabeni@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
um: virtio_uml: Fix use-after-free after put_device in probe [+ + +]
Author: Miaoqian Lin <linmq006@gmail.com>
Date:   Thu Aug 28 15:00:51 2025 +0800

    um: virtio_uml: Fix use-after-free after put_device in probe
    
    [ Upstream commit 7ebf70cf181651fe3f2e44e95e7e5073d594c9c0 ]
    
    When register_virtio_device() fails in virtio_uml_probe(),
    the code sets vu_dev->registered = 1 even though
    the device was not successfully registered.
    This can lead to use-after-free or other issues.
    
    Fixes: 04e5b1fb0183 ("um: virtio: Remove device on disconnect")
    Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
wifi: mac80211: fix incorrect type for ret [+ + +]
Author: Liao Yuanhong <liaoyuanhong@vivo.com>
Date:   Mon Aug 25 10:29:11 2025 +0800

    wifi: mac80211: fix incorrect type for ret
    
    [ Upstream commit a33b375ab5b3a9897a0ab76be8258d9f6b748628 ]
    
    The variable ret is declared as a u32 type, but it is assigned a value
    of -EOPNOTSUPP. Since unsigned types cannot correctly represent negative
    values, the type of ret should be changed to int.
    
    Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
    Link: https://patch.msgid.link/20250825022911.139377-1-liaoyuanhong@vivo.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

wifi: mac80211: increase scan_ies_len for S1G [+ + +]
Author: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Date:   Tue Aug 26 18:54:37 2025 +1000

    wifi: mac80211: increase scan_ies_len for S1G
    
    [ Upstream commit 7e2f3213e85eba00acb4cfe6d71647892d63c3a1 ]
    
    Currently the S1G capability element is not taken into account
    for the scan_ies_len, which leads to a buffer length validation
    failure in ieee80211_prep_hw_scan() and subsequent WARN in
    __ieee80211_start_scan(). This prevents hw scanning from functioning.
    To fix ensure we accommodate for the S1G capability length.
    
    Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
    Link: https://patch.msgid.link/20250826085437.3493-1-lachlan.hodges@morsemicro.com
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 
xhci: dbc: decouple endpoint allocation from initialization [+ + +]
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Wed Sep 17 10:00:39 2025 -0400

    xhci: dbc: decouple endpoint allocation from initialization
    
    [ Upstream commit 220a0ffde02f962c13bc752b01aa570b8c65a37b ]
    
    Decouple allocation of endpoint ring buffer from initialization
    of the buffer, and initialization of endpoint context parts from
    from the rest of the contexts.
    
    It allows driver to clear up and reinitialize endpoint rings
    after disconnect without reallocating everything.
    
    This is a prerequisite for the next patch that prevents the transfer
    ring from filling up with cancelled (no-op) TRBs if a debug cable is
    reconnected several times without transferring anything.
    
    Cc: stable@vger.kernel.org
    Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Link: https://lore.kernel.org/r/20250902105306.877476-2-mathias.nyman@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

xhci: dbc: Fix full DbC transfer ring after several reconnects [+ + +]
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Wed Sep 17 10:00:40 2025 -0400

    xhci: dbc: Fix full DbC transfer ring after several reconnects
    
    [ Upstream commit a5c98e8b1398534ae1feb6e95e2d3ee5215538ed ]
    
    Pending requests will be flushed on disconnect, and the corresponding
    TRBs will be turned into No-op TRBs, which are ignored by the xHC
    controller once it starts processing the ring.
    
    If the USB debug cable repeatedly disconnects before ring is started
    then the ring will eventually be filled with No-op TRBs.
    No new transfers can be queued when the ring is full, and driver will
    print the following error message:
    
        "xhci_hcd 0000:00:14.0: failed to queue trbs"
    
    This is a normal case for 'in' transfers where TRBs are always enqueued
    in advance, ready to take on incoming data. If no data arrives, and
    device is disconnected, then ring dequeue will remain at beginning of
    the ring while enqueue points to first free TRB after last cancelled
    No-op TRB.
    s
    Solve this by reinitializing the rings when the debug cable disconnects
    and DbC is leaving the configured state.
    Clear the whole ring buffer and set enqueue and dequeue to the beginning
    of ring, and set cycle bit to its initial state.
    
    Cc: stable@vger.kernel.org
    Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Link: https://lore.kernel.org/r/20250902105306.877476-3-mathias.nyman@linux.intel.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>