Patch "wifi: rsi: Do not configure WoWlan in shutdown hook if not enabled" 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: rsi: Do not configure WoWlan in shutdown hook if not enabled

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-rsi-do-not-configure-wowlan-in-shutdown-hook-if.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 920fbffad648582276372819dc70c810566d03f1
Author: Marek Vasut <marex@xxxxxxx>
Date:   Sun May 28 00:28:33 2023 +0200

    wifi: rsi: Do not configure WoWlan in shutdown hook if not enabled
    
    [ Upstream commit b241e260820b68c09586e8a0ae0fc23c0e3215bd ]
    
    In case WoWlan was never configured during the operation of the system,
    the hw->wiphy->wowlan_config will be NULL. rsi_config_wowlan() checks
    whether wowlan_config is non-NULL and if it is not, then WARNs about it.
    The warning is valid, as during normal operation the rsi_config_wowlan()
    should only ever be called with non-NULL wowlan_config. In shutdown this
    rsi_config_wowlan() should only ever be called if WoWlan was configured
    before by the user.
    
    Add checks for non-NULL wowlan_config into the shutdown hook. While at it,
    check whether the wiphy is also non-NULL before accessing wowlan_config .
    Drop the single-use wowlan_config variable, just inline it into function
    call.
    
    Fixes: 16bbc3eb8372 ("rsi: fix null pointer dereference during rsi_shutdown()")
    Signed-off-by: Marek Vasut <marex@xxxxxxx>
    Reviewed-by: Simon Horman <simon.horman@xxxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230527222833.273741-1-marex@xxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 8108f941ccd3f..2c26376faeacc 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1463,10 +1463,8 @@ static void rsi_shutdown(struct device *dev)
 
 	rsi_dbg(ERR_ZONE, "SDIO Bus shutdown =====>\n");
 
-	if (hw) {
-		struct cfg80211_wowlan *wowlan = hw->wiphy->wowlan_config;
-
-		if (rsi_config_wowlan(adapter, wowlan))
+	if (hw && hw->wiphy && hw->wiphy->wowlan_config) {
+		if (rsi_config_wowlan(adapter, hw->wiphy->wowlan_config))
 			rsi_dbg(ERR_ZONE, "Failed to configure WoWLAN\n");
 	}
 



[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