Patch "wifi: rtlwifi: wait for firmware loading before releasing memory" has been added to the 5.10-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: wait for firmware loading before releasing memory

to the 5.10-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-wait-for-firmware-loading-before-releas.patch
and it can be found in the queue-5.10 subdirectory.

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



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

    wifi: rtlwifi: wait for firmware loading before releasing memory
    
    [ Upstream commit b4b26642b31ef282df6ff7ea8531985edfdef12a ]
    
    At probe error path, the firmware loading work may have already been
    queued. In such a case, it will try to access memory allocated by the probe
    function, which is about to be released. In such paths, wait for the
    firmware worker to finish before releasing memory.
    
    Fixes: a7f7c15e945a ("rtlwifi: rtl8192cu: Free ieee80211_hw if probing fails")
    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-4-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 add6da1ce3602..087e398da36d9 100644
--- a/drivers/net/wireless/realtek/rtlwifi/usb.c
+++ b/drivers/net/wireless/realtek/rtlwifi/usb.c
@@ -1072,13 +1072,15 @@ int rtl_usb_probe(struct usb_interface *intf,
 	err = ieee80211_register_hw(hw);
 	if (err) {
 		pr_err("Can't register mac80211 hw.\n");
-		goto error_out;
+		goto error_init_vars;
 	}
 	rtlpriv->mac80211.mac80211_registered = 1;
 
 	set_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status);
 	return 0;
 
+error_init_vars:
+	wait_for_completion(&rtlpriv->firmware_loading_complete);
 error_out:
 	rtl_deinit_core(hw);
 error_out2:




[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