Re: [PATCH] wifi: nl80211: fix deadlock in nl80211_set_cqm_rssi (6.6.x)

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

 



On Mon, 2023-12-11 at 13:45 +0100, Greg KH wrote:
> On Mon, Dec 11, 2023 at 07:47:32AM +0100, Greg KH wrote:
> > On Sun, Dec 10, 2023 at 09:39:30PM +0000, Léo Lam wrote:
> > > Commit 4a7e92551618f3737b305f62451353ee05662f57 ("wifi: cfg80211: fix
> > > CQM for non-range use" on 6.6.x) causes nl80211_set_cqm_rssi not to
> > > release the wdev lock in some situations.
> > > 
> > > Of course, the ensuing deadlock causes userland network managers to
> > > break pretty badly, and on typical systems this also causes lockups on
> > > on suspend, poweroff and reboot. See [1], [2], [3] for example reports.
> > > 
> > > The upstream commit, 7e7efdda6adb385fbdfd6f819d76bc68c923c394
> > > ("wifi: cfg80211: fix CQM for non-range use"), does not trigger this
> > > issue because the wdev lock does not exist there.
> > > 
> > > Fix the deadlock by releasing the lock before returning.
> > > 
> > > [1] https://bugzilla.kernel.org/show_bug.cgi?id=218247
> > > [2] https://bbs.archlinux.org/viewtopic.php?id=290976
> > > [3] https://lore.kernel.org/all/87sf4belmm.fsf@xxxxxxxxxxxxx/
> > > 
> > > Fixes: 4a7e92551618 ("wifi: cfg80211: fix CQM for non-range use")
> > > Cc: stable@xxxxxxxxxxxxxxx
> > > Signed-off-by: Léo Lam <leo@xxxxxxxxx>
> > > ---
> > >  net/wireless/nl80211.c | 18 ++++++++++++------
> > >  1 file changed, 12 insertions(+), 6 deletions(-)
> > 
> > So this is only for the 6.6.y tree?  If so, you should at least cc: the
> > other wireless developers involved in the original fix, right?
> > 
> > And what commit actually fixed this issue upstream, why not take that
> > instead?
> 
> I've reverted the offending commit in the last 6.1.y and 6.6.y release,
> so can you send this as a patch series, first one being the original
> backport, and the second one this one, AFTER it has been tested?
> 

Last night I didn't have the time to do more than just make sure the
patch built fine, but it seems that several people on the Manjaro forum
have since reported that it does fix their issue (when applied on top of
the 6.6.5 tree) [1].

I will re-apply commit 7e7efdda6adb ("wifi: cfg80211: fix CQM for non-
range use") with this patch on top of the latest 6.6.y version and
verify that the deadlock is still fixed.


[1]https://lore.kernel.org/stable/43a1aa34-5109-41ad-88e7-19ba6101dad3@xxxxxxxxxxx/

-- 
Thanks,
Leo






[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux