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] [day] [month] [year] [list]
Message-ID: <fd356230-c9b1-2824-d073-83975bd31be9@gmail.com>
Date:   Sun, 3 Apr 2022 15:19:57 +0300
From:   Pavel Skripkin <paskripkin@...il.com>
To:     Michael Straube <straube.linux@...il.com>,
        "Fabio M. De Francesco" <fmdefrancesco@...il.com>
Cc:     Greg KH <gregkh@...uxfoundation.org>,
        Larry Finger <Larry.Finger@...inger.net>,
        Phillip Potter <phil@...lpotter.co.uk>,
        "open list:STAGING SUBSYSTEM" <linux-staging@...ts.linux.dev>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: staging: r8188eu: how to handle nested mutex under spinlock

On 4/3/22 14:48, Pavel Skripkin wrote:
> On 4/3/22 14:41, Michael Straube wrote:
>> 
>> Hi Fabio,
>> 
>> wait..
>> 
>> rtw_set_802_11_disassociate() calls rtw_pwr_wakeup() only if
>> check_fwstate(pmlmepriv, _FW_LINKED) is true.
>> 
>> 
>> 	if (check_fwstate(pmlmepriv, _FW_LINKED)) {
>> 		rtw_disassoc_cmd(padapter, 0, true);
>> 		rtw_indicate_disconnect(padapter);
>> 		rtw_free_assoc_resources(padapter, 1);
>> 		rtw_pwr_wakeup(padapter);
>> 	}
>> 
> 
> msleep() cannot be called in atomic context:
> 
> drivers/staging/r8188eu/core/rtw_pwrctrl.c:379
> 
>    	if (pwrpriv->ps_processing) {
>    		while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
>    			msleep(10);
>    	}
> 

Hm, just wondering, shouldn't we annotate load from 
pwrpriv->ps_processing with READ_ONCE() inside while loop?

IIUC compiler might want to cache first load into register and we will 
stuck here forever.


Am I missing something?



With regards,
Pavel Skripkin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ