lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e18e6f8458264262b459c6cda5f4a2a7@realtek.com>
Date:   Thu, 29 Dec 2022 09:39:12 +0000
From:   Ping-Ke Shih <pkshih@...ltek.com>
To:     Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>
CC:     "tony0620emma@...il.com" <tony0620emma@...il.com>,
        "kvalo@...nel.org" <kvalo@...nel.org>,
        "tehuang@...ltek.com" <tehuang@...ltek.com>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 3/4] rtw88: Use rtw_iterate_vifs() for rtw_vif_watch_dog_iter()



> -----Original Message-----
> From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
> Sent: Wednesday, December 28, 2022 9:36 PM
> To: linux-wireless@...r.kernel.org
> Cc: tony0620emma@...il.com; kvalo@...nel.org; Ping-Ke Shih <pkshih@...ltek.com>; tehuang@...ltek.com;
> s.hauer@...gutronix.de; netdev@...r.kernel.org; linux-kernel@...r.kernel.org; Martin Blumenstingl
> <martin.blumenstingl@...glemail.com>
> Subject: [PATCH 3/4] rtw88: Use rtw_iterate_vifs() for rtw_vif_watch_dog_iter()
> 
> USB and (upcoming) SDIO support may sleep in the read/write handlers.
> Make rtw_watch_dog_work() use rtw_iterate_vifs() to prevent "scheduling
> while atomic" or "Voluntary context switch within RCU read-side
> critical section!" warnings when accessing the registers using an SDIO
> card (which is where this issue has been spotted in the real world but
> it also affects USB cards).
> 
> Fixes: 78d5bf925f30 ("wifi: rtw88: iterate over vif/sta list non-atomically")
> Suggested-by: Ping-Ke Shih <pkshih@...ltek.com>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@...glemail.com>

Reviewed-by: Ping-Ke Shih <pkshih@...ltek.com>

> ---
>  drivers/net/wireless/realtek/rtw88/main.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
> index 888427cf3bdf..b2e78737bd5d 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -241,8 +241,10 @@ static void rtw_watch_dog_work(struct work_struct *work)
>  	rtw_phy_dynamic_mechanism(rtwdev);
> 
>  	data.rtwdev = rtwdev;
> -	/* use atomic version to avoid taking local->iflist_mtx mutex */
> -	rtw_iterate_vifs_atomic(rtwdev, rtw_vif_watch_dog_iter, &data);
> +	/* rtw_iterate_vifs internally uses an atomic iterator which is needed
> +	 * to avoid taking local->iflist_mtx mutex
> +	 */
> +	rtw_iterate_vifs(rtwdev, rtw_vif_watch_dog_iter, &data);
> 
>  	/* fw supports only one station associated to enter lps, if there are
>  	 * more than two stations associated to the AP, then we can not enter
> --
> 2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ