Re: [PATCH] staging: rtl8723bs: fix monitor netdev register/unregister

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

 



On Mon, Apr 26, 2021 at 09:28:02PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@xxxxxxxxx>
> 
> Due to the locking changes and callbacks happening inside
> cfg80211, we need to use cfg80211 versions of the register
> and unregister functions if called within cfg80211 methods,
> otherwise deadlocks occur.
> 
> Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
> ---
>  drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index ff164a8c8679..0619a7510e83 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -2579,7 +2579,7 @@ static int rtw_cfg80211_add_monitor_if(struct adapter *padapter, char *name, str
>  	mon_wdev->iftype = NL80211_IFTYPE_MONITOR;
>  	mon_ndev->ieee80211_ptr = mon_wdev;
>  
> -	ret = register_netdevice(mon_ndev);
> +	ret = cfg80211_register_netdevice(mon_ndev);

Is this now a requirement for all wireless drivers?

If so, do other drivers/staging/ drivers need to also be fixed up?

I'm guessing this will be going through the wireless tree, so:

Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

thanks,

greg k-h




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux