From: Johannes Berg <johannes.berg@xxxxxxxxx> We should not take the RTNL if we come here already with the RTNL held, so don't take it again. The Fixes tag below might not be completely accurate, that might just have made the problem obvious by showing that the function can be called with RTNL already held. Fixes: b50ddfa8530e ("brcmfmac: fix lockup when removing P2P interface after event timeout") Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index ea78fe527c5d..ce9d8781b62b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -926,9 +926,11 @@ static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx, if (ifp->ndev) { if (bsscfgidx == 0) { if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) { - rtnl_lock(); + if (!locked) + rtnl_lock(); brcmf_netdev_stop(ifp->ndev); - rtnl_unlock(); + if (!locked) + rtnl_unlock(); } } else { netif_stop_queue(ifp->ndev); -- 2.30.2