Skip to content

Commit

Permalink
wlcore: take the mutex before resetting Tx queues
Browse files Browse the repository at this point in the history
Otherwise we risk contention for private members of our global structure
while op_stop_locked is running.

Reported-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Arik Nemtsov authored and Luciano Coelho committed Dec 5, 2012
1 parent 4c14518 commit d935e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1852,8 +1852,8 @@ static void wlcore_op_stop_locked(struct wl1271 *wl)
cancel_delayed_work_sync(&wl->tx_watchdog_work);

/* let's notify MAC80211 about the remaining pending TX frames */
wl12xx_tx_reset(wl);
mutex_lock(&wl->mutex);
wl12xx_tx_reset(wl);

wl1271_power_off(wl);
/*
Expand Down

0 comments on commit d935e38

Please sign in to comment.