Skip to content

Commit

Permalink
staging: brcm80211: fix rtnl_lock issue when bringing down brcmfmac
Browse files Browse the repository at this point in the history
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: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Aug 23, 2011
1 parent 60be7ec commit 183eeb9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -3189,7 +3189,14 @@ static void brcmf_term_iscan(struct brcmf_cfg80211_priv *cfg_priv)
if (cfg_priv->iscan_on && iscan->tsk) {
iscan->state = WL_ISCAN_STATE_IDLE;
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);
rtnl_lock();
iscan->tsk = NULL;

/* Abort iscan running in FW */
Expand Down

0 comments on commit 183eeb9

Please sign in to comment.