[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <356c24cf-625b-eea2-2c04-ce132d881cac@gmail.com>
Date: Sat, 2 Apr 2022 22:47:27 +0200
From: Michael Straube <straube.linux@...il.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: 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>,
straube.linux@...il.com
Subject: staging: r8188eu: how to handle nested mutex under spinlock
Hi all,
smatch reported a sleeping in atomic context.
rtw_set_802_11_disassociate() <- disables preempt
-> _rtw_pwr_wakeup()
-> ips_leave()
rtw_set_802_11_disassociate() takes a spinlock and ips_leave() uses a
mutex.
I'm fairly new to the locking stuff, but as far as I know this is not a
false positive since mutex can sleep, but that's not allowed under a
spinlock.
What is the best way to handle this?
I'm not sure if converting the mutex to a spinlock (including all the
other places where the mutex is used) is the right thing to do?
thanks,
Michael
Powered by blists - more mailing lists