Re: [PATCH] staging: rtl8723bs: fix wireless regulatory API misuse
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-01-26 11:21:37
Also in:
linux-wireless
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-01-26 11:21:37
Also in:
linux-wireless
On Tue, Jan 26, 2021 at 11:54:09AM +0100, Johannes Berg wrote:
From: Johannes Berg <redacted>
This code ends up calling wiphy_apply_custom_regulatory(), for which
we document that it should be called before wiphy_register(). This
driver doesn't do that, but calls it from ndo_open() with the RTNL
held, which caused deadlocks.
Since the driver just registers static regdomain data and then the
notifier applies the channel changes if any, there's no reason for
it to call this in ndo_open(), move it earlier to fix the deadlock.
Reported-and-tested-by: Hans de Goede <redacted>
Fixes: 51d62f2f2c50 ("cfg80211: Save the regulatory domain with a lock")
Signed-off-by: Johannes Berg <redacted>
---
Greg, can you take this for 5.11 please? Or if you prefer, since the
patch that exposed this and broke the driver went through my tree, I
can take it as well.Please feel free to take it through yours, as I don't think I'll have any more staging patches for 5.11-final (or none have been sent to me yet), so this might be the fastest way in: Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>