Patch "wilc1000: fix crash observed in AP mode with cfg80211_register_netdevice()" 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

    wilc1000: fix crash observed in AP mode with cfg80211_register_netdevice()

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:
     wilc1000-fix-crash-observed-in-ap-mode-with-cfg80211.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 334af8f4c0c5376eab92c933d1f4581c1715d91d
Author: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx>
Date:   Wed May 4 16:19:26 2022 +0000

    wilc1000: fix crash observed in AP mode with cfg80211_register_netdevice()
    
    [ Upstream commit 868f0e28290c7a33e8cb79bfe97ebdcbb756e048 ]
    
    Monitor(mon.) interface is used for handling the AP mode and 'ieee80211_ptr'
    reference is not getting set for it. Like earlier implementation,
    use register_netdevice() instead of cfg80211_register_netdevice() which
    expects valid 'ieee80211_ptr' reference to avoid the possible crash.
    
    Fixes: 2fe8ef106238 ("cfg80211: change netdev registration/unregistration semantics")
    Signed-off-by: Ajay Singh <ajay.kathat@xxxxxxxxxxxxx>
    Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220504161924.2146601-3-ajay.kathat@xxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/microchip/wilc1000/mon.c b/drivers/net/wireless/microchip/wilc1000/mon.c
index 6bd63934c2d8..b5a1b65c087c 100644
--- a/drivers/net/wireless/microchip/wilc1000/mon.c
+++ b/drivers/net/wireless/microchip/wilc1000/mon.c
@@ -233,7 +233,7 @@ struct net_device *wilc_wfi_init_mon_interface(struct wilc *wl,
 	wl->monitor_dev->netdev_ops = &wilc_wfi_netdev_ops;
 	wl->monitor_dev->needs_free_netdev = true;
 
-	if (cfg80211_register_netdevice(wl->monitor_dev)) {
+	if (register_netdevice(wl->monitor_dev)) {
 		netdev_err(real_dev, "register_netdevice failed\n");
 		free_netdev(wl->monitor_dev);
 		return NULL;
@@ -251,7 +251,7 @@ void wilc_wfi_deinit_mon_interface(struct wilc *wl, bool rtnl_locked)
 		return;
 
 	if (rtnl_locked)
-		cfg80211_unregister_netdevice(wl->monitor_dev);
+		unregister_netdevice(wl->monitor_dev);
 	else
 		unregister_netdev(wl->monitor_dev);
 	wl->monitor_dev = NULL;



[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