Commit 183eeb98 authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: fix rtnl_lock issue when bringing down brcmfmac

When bringing down the netdevice interface a deadlock occurred
sporadically due to the rtnl_lock being held by a task that was
waiting for another task trying to get the lock. This patch fixes
that issue.
Reviewed-by: default avatarFranky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 60be7ec5
...@@ -3189,7 +3189,14 @@ static void brcmf_term_iscan(struct brcmf_cfg80211_priv *cfg_priv) ...@@ -3189,7 +3189,14 @@ static void brcmf_term_iscan(struct brcmf_cfg80211_priv *cfg_priv)
if (cfg_priv->iscan_on && iscan->tsk) { if (cfg_priv->iscan_on && iscan->tsk) {
iscan->state = WL_ISCAN_STATE_IDLE; iscan->state = WL_ISCAN_STATE_IDLE;
send_sig(SIGTERM, iscan->tsk, 1); send_sig(SIGTERM, iscan->tsk, 1);
/*
* The iscan task may want to acquire the rtnl_lock
* so release it here upon stopping the task.
*/
rtnl_unlock();
kthread_stop(iscan->tsk); kthread_stop(iscan->tsk);
rtnl_lock();
iscan->tsk = NULL; iscan->tsk = NULL;
/* Abort iscan running in FW */ /* Abort iscan running in FW */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment