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: <423f474e15c948eda4db5bc9a50fd391@realtek.com>
Date:   Fri, 21 Jan 2022 08:10:07 +0000
From:   Pkshih <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@...eaurora.org" <kvalo@...eaurora.org>,
        "johannes@...solutions.net" <johannes@...solutions.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Neo Jou <neojou@...il.com>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Ed Swierk <eswierk@...st>
Subject: RE: [PATCH v3 0/8] rtw88: prepare locking for SDIO support


> -----Original Message-----
> From: Pkshih
> Sent: Wednesday, January 19, 2022 5:38 PM
> To: 'Martin Blumenstingl' <martin.blumenstingl@...glemail.com>; linux-wireless@...r.kernel.org
> Cc: tony0620emma@...il.com; kvalo@...eaurora.org; johannes@...solutions.net; netdev@...r.kernel.org;
> linux-kernel@...r.kernel.org; Neo Jou <neojou@...il.com>; Jernej Skrabec <jernej.skrabec@...il.com>; Ed
> Swierk <eswierk@...st>
> Subject: RE: [PATCH v3 0/8] rtw88: prepare locking for SDIO support
> 
> Hi,
> 
> > -----Original Message-----
> > From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
> > Sent: Saturday, January 8, 2022 8:55 AM
> > To: linux-wireless@...r.kernel.org
> > Cc: tony0620emma@...il.com; kvalo@...eaurora.org; johannes@...solutions.net; netdev@...r.kernel.org;
> > linux-kernel@...r.kernel.org; Neo Jou <neojou@...il.com>; Jernej Skrabec <jernej.skrabec@...il.com>;
> > Pkshih <pkshih@...ltek.com>; Ed Swierk <eswierk@...st>; Martin Blumenstingl
> > <martin.blumenstingl@...glemail.com>
> > Subject: [PATCH v3 0/8] rtw88: prepare locking for SDIO support
> >
> 
> [...]
> 
> I do stressed test of connection and suspend, and it get stuck after about
> 4 hours but no useful messages. I will re-build my kernel and turn on lockdep debug
> to see if it can tell me what is wrong.
> 

I found some deadlock: 

[ 4891.169653]        CPU0                    CPU1
[ 4891.169732]        ----                    ----
[ 4891.169799]   lock(&rtwdev->mutex);
[ 4891.169874]                                lock(&local->sta_mtx);
[ 4891.169948]                                lock(&rtwdev->mutex);
[ 4891.170050]   lock(&local->sta_mtx);


[ 4919.598630]        CPU0                    CPU1
[ 4919.598715]        ----                    ----
[ 4919.598779]   lock(&local->iflist_mtx);
[ 4919.598900]                                lock(&rtwdev->mutex);
[ 4919.598995]                                lock(&local->iflist_mtx);
[ 4919.599092]   lock(&rtwdev->mutex);

So, I add wrappers to iterate rtw_iterate_stas() and rtw_iterate_vifs() that
use _atomic version to collect sta and vif, and use list_for_each() to iterate.
Reference code is attached, and I'm still thinking if we can have better method.

--
Ping-Ke


Download attachment "0001-rtw88-use-atomic-to-collect-stas-and-does-iterators.patch" of type "application/octet-stream" (4314 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ