From: Greg KH <gregkh@linuxfoundation.org>
To: "Léo Lam" <leo@leolam.fr>
Cc: stable@vger.kernel.org, "Philip Müller" <philm@manjaro.org>,
"Johannes Berg" <johannes.berg@intel.com>
Subject: Re: [PATCH 2/2] wifi: nl80211: fix deadlock in nl80211_set_cqm_rssi (6.6.x)
Date: Sat, 30 Dec 2023 11:43:15 +0000 [thread overview]
Message-ID: <2023123005-annuity-numbly-e6d8@gregkh> (raw)
In-Reply-To: <20231216054715.7729-4-leo@leolam.fr>
On Sat, Dec 16, 2023 at 05:47:17AM +0000, Léo Lam wrote:
> Commit 008afb9f3d57 ("wifi: cfg80211: fix CQM for non-range use"
> backported to 6.6.x) causes nl80211_set_cqm_rssi not to release the
> wdev lock in some of the error paths.
>
> 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 7e7efdda6adb ("wifi: cfg80211: fix CQM for non-range
> use"), committed in November 2023, is completely fine because there was
> another commit in August 2023 that removed the wdev lock:
> see commit 076fc8775daf ("wifi: cfg80211: remove wdev mutex").
>
> The reason things broke in 6.6.5 is that commit 4338058f6009 was applied
> without also applying 076fc8775daf.
>
> Commit 076fc8775daf ("wifi: cfg80211: remove wdev mutex") is a rather
> large commit; adjusting the error handling (which is what this commit does)
> yields a much simpler patch and was tested to work properly.
>
> 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@turtle.gmx.de/
>
> Link: https://lore.kernel.org/stable/e374bb16-5b13-44cc-b11a-2f4eefb1ecf5@manjaro.org/
> Fixes: 008afb9f3d57 ("wifi: cfg80211: fix CQM for non-range use")
> Tested-by: Léo Lam <leo@leolam.fr>
> Tested-by: Philip Müller <philm@manjaro.org>
> Cc: stable@vger.kernel.org
> Cc: Johannes Berg <johannes.berg@intel.com>
> Signed-off-by: Léo Lam <leo@leolam.fr>
> ---
> net/wireless/nl80211.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
Both now queued up, thanks.
greg k-h
next prev parent reply other threads:[~2023-12-30 11:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-16 5:47 [PATCH 1/2] wifi: cfg80211: fix CQM for non-range use Léo Lam
2023-12-16 5:47 ` [PATCH 2/2] wifi: nl80211: fix deadlock in nl80211_set_cqm_rssi (6.6.x) Léo Lam
2023-12-30 11:43 ` Greg KH [this message]
2023-12-31 0:52 ` Philip Müller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023123005-annuity-numbly-e6d8@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=johannes.berg@intel.com \
--cc=leo@leolam.fr \
--cc=philm@manjaro.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox