Patch "wifi: rtlwifi: usb: fix workqueue leak when probe fails" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: rtlwifi: usb: fix workqueue leak when probe fails

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-rtlwifi-usb-fix-workqueue-leak-when-probe-fails.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 6044294c68ada2bc0ca5dfef4269129c506934bf
Author: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxx>
Date:   Thu Nov 7 10:33:22 2024 -0300

    wifi: rtlwifi: usb: fix workqueue leak when probe fails
    
    [ Upstream commit f79bc5c67867c19ce2762e7934c20dbb835ed82c ]
    
    rtl_init_core creates a workqueue that is then assigned to rtl_wq.
    rtl_deinit_core does not destroy it. It is left to rtl_usb_deinit, which
    must be called in the probe error path.
    
    Fixes: 2ca20f79e0d8 ("rtlwifi: Add usb driver")
    Fixes: 851639fdaeac ("rtlwifi: Modify some USB de-initialize code.")
    Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxx>
    Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
    Link: https://patch.msgid.link/20241107133322.855112-6-cascardo@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/realtek/rtlwifi/usb.c b/drivers/net/wireless/realtek/rtlwifi/usb.c
index 1753eccbefdd9..04590d16874c4 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -1084,6 +1084,7 @@ int rtl_usb_probe(struct usb_interface *intf,
 	wait_for_completion(&rtlpriv->firmware_loading_complete);
 	rtlpriv->cfg->ops->deinit_sw_vars(hw);
 error_out:
+	rtl_usb_deinit(hw);
 	rtl_deinit_core(hw);
 error_out2:
 	_rtl_usb_io_handler_release(hw);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux