* [PATCH 5.12 regression fix resend 0/1] brcmfmac: p2p: Fix recently introduced deadlock issue
@ 2021-04-05 20:54 Hans de Goede
2021-04-05 20:54 ` [PATCH 5.12 regression fix resend 1/1] " Hans de Goede
2021-04-06 10:24 ` [PATCH 5.12 regression fix resend 0/1] " Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Hans de Goede @ 2021-04-05 20:54 UTC (permalink / raw)
To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo,
Chi-Hsien Lin, Chung-hsien Hsu
Cc: Hans de Goede, Johannes Berg, linux-wireless, brcm80211-dev-list.pdl
Hi,
Here is a resend of a regression/deadlock fix for 5.12 which I send out
around rc1 but which still is not in Linus' tree.
This is quite a bad bug, breaking things for most broadcom wifi users.
Can we get this regression fix on its way to Linus for 5.12-rc7 ASAP
please ?
Regards,
Hans
Hans de Goede (1):
brcmfmac: p2p: Fix recently introduced deadlock issue
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
2.30.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 5.12 regression fix resend 1/1] brcmfmac: p2p: Fix recently introduced deadlock issue
2021-04-05 20:54 [PATCH 5.12 regression fix resend 0/1] brcmfmac: p2p: Fix recently introduced deadlock issue Hans de Goede
@ 2021-04-05 20:54 ` Hans de Goede
2021-04-06 10:17 ` Kalle Valo
[not found] ` <20210406101705.38F85C43463@smtp.codeaurora.org>
2021-04-06 10:24 ` [PATCH 5.12 regression fix resend 0/1] " Kalle Valo
1 sibling, 2 replies; 5+ messages in thread
From: Hans de Goede @ 2021-04-05 20:54 UTC (permalink / raw)
To: Arend van Spriel, Franky Lin, Hante Meuleman, Kalle Valo,
Chi-Hsien Lin, Chung-hsien Hsu
Cc: Hans de Goede, Johannes Berg, linux-wireless, brcm80211-dev-list.pdl
Commit a05829a7222e ("cfg80211: avoid holding the RTNL when calling the
driver") replaced the rtnl_lock parameter passed to various brcmf
functions with just lock, because since that commit it is not just
about the rtnl_lock but also about the wiphy_lock .
During this search/replace the "if (!rtnl_locked)" check in brcmfmac/p2p.c
was accidentally replaced with "if (locked)", dropping the inversion of
the check. This causes the code to now call rtnl_lock() while already
holding the lock, causing a deadlock.
Add back the "!" to the if-condition to fix this.
Cc: Johannes Berg <johannes.berg@intel.com>
Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index 6d30a0fcecea..34cd8a7401fe 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -2439,7 +2439,7 @@ void brcmf_p2p_ifp_removed(struct brcmf_if *ifp, bool locked)
vif = ifp->vif;
cfg = wdev_to_cfg(&vif->wdev);
cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif = NULL;
- if (locked) {
+ if (!locked) {
rtnl_lock();
wiphy_lock(cfg->wiphy);
cfg80211_unregister_wdev(&vif->wdev);
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 5.12 regression fix resend 1/1] brcmfmac: p2p: Fix recently introduced deadlock issue
2021-04-05 20:54 ` [PATCH 5.12 regression fix resend 1/1] " Hans de Goede
@ 2021-04-06 10:17 ` Kalle Valo
[not found] ` <20210406101705.38F85C43463@smtp.codeaurora.org>
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2021-04-06 10:17 UTC (permalink / raw)
To: Hans de Goede
Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
Chung-hsien Hsu, Hans de Goede, Johannes Berg, linux-wireless,
brcm80211-dev-list.pdl
Hans de Goede <hdegoede@redhat.com> wrote:
> Commit a05829a7222e ("cfg80211: avoid holding the RTNL when calling the
> driver") replaced the rtnl_lock parameter passed to various brcmf
> functions with just lock, because since that commit it is not just
> about the rtnl_lock but also about the wiphy_lock .
>
> During this search/replace the "if (!rtnl_locked)" check in brcmfmac/p2p.c
> was accidentally replaced with "if (locked)", dropping the inversion of
> the check. This causes the code to now call rtnl_lock() while already
> holding the lock, causing a deadlock.
>
> Add back the "!" to the if-condition to fix this.
>
> Cc: Johannes Berg <johannes.berg@intel.com>
> Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This is already applied:
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git/commit/?id=bd83a2fc05ed323d7ae38443a6d2e253ef1c4237
Patch set to Superseded.
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210405205429.19304-2-hdegoede@redhat.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5.12 regression fix resend 0/1] brcmfmac: p2p: Fix recently introduced deadlock issue
2021-04-05 20:54 [PATCH 5.12 regression fix resend 0/1] brcmfmac: p2p: Fix recently introduced deadlock issue Hans de Goede
2021-04-05 20:54 ` [PATCH 5.12 regression fix resend 1/1] " Hans de Goede
@ 2021-04-06 10:24 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2021-04-06 10:24 UTC (permalink / raw)
To: Hans de Goede
Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
Chung-hsien Hsu, Johannes Berg, linux-wireless,
brcm80211-dev-list.pdl
Hans de Goede <hdegoede@redhat.com> writes:
> Hi,
>
> Here is a resend of a regression/deadlock fix for 5.12 which I send out
> around rc1 but which still is not in Linus' tree.
>
> This is quite a bad bug, breaking things for most broadcom wifi users.
>
> Can we get this regression fix on its way to Linus for 5.12-rc7 ASAP
> please ?
The patch has been already applied but I have not yet sent a pull
request, the plan is to send it later this week.
Please don't resend patches which have been already applied, that
creates more work for me.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 5.12 regression fix resend 1/1] brcmfmac: p2p: Fix recently introduced deadlock issue
[not found] ` <20210406101705.38F85C43463@smtp.codeaurora.org>
@ 2021-04-06 10:29 ` Hans de Goede
0 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2021-04-06 10:29 UTC (permalink / raw)
To: Kalle Valo
Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
Chung-hsien Hsu, Johannes Berg, linux-wireless,
brcm80211-dev-list.pdl
Hi,
On 4/6/21 12:17 PM, Kalle Valo wrote:
> Hans de Goede <hdegoede@redhat.com> wrote:
>
>> Commit a05829a7222e ("cfg80211: avoid holding the RTNL when calling the
>> driver") replaced the rtnl_lock parameter passed to various brcmf
>> functions with just lock, because since that commit it is not just
>> about the rtnl_lock but also about the wiphy_lock .
>>
>> During this search/replace the "if (!rtnl_locked)" check in brcmfmac/p2p.c
>> was accidentally replaced with "if (locked)", dropping the inversion of
>> the check. This causes the code to now call rtnl_lock() while already
>> holding the lock, causing a deadlock.
>>
>> Add back the "!" to the if-condition to fix this.
>>
>> Cc: Johannes Berg <johannes.berg@intel.com>
>> Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>
> This is already applied:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers.git/commit/?id=bd83a2fc05ed323d7ae38443a6d2e253ef1c4237
But it is not yet in 5.12-rc6, even though this is a regression fix for a
regression introduced in 5.12. What is the plan to get this into 5.12 ?
Regards,
Hans
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-06 10:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05 20:54 [PATCH 5.12 regression fix resend 0/1] brcmfmac: p2p: Fix recently introduced deadlock issue Hans de Goede
2021-04-05 20:54 ` [PATCH 5.12 regression fix resend 1/1] " Hans de Goede
2021-04-06 10:17 ` Kalle Valo
[not found] ` <20210406101705.38F85C43463@smtp.codeaurora.org>
2021-04-06 10:29 ` Hans de Goede
2021-04-06 10:24 ` [PATCH 5.12 regression fix resend 0/1] " Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).