]> git.baikalelectronics.ru Git - kernel.git/commit
ath9k: Fix a locking bug in ath9k_add_interface()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 19 Oct 2018 20:08:43 +0000 (23:08 +0300)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 6 Nov 2018 16:43:30 +0000 (18:43 +0200)
commit61f40aec937046039fdb7d946c7593fdb89412c9
treef35f5b24b731fa2f406e1eef279d5f6a1c1b1303
parentf630c74755763954e46ada22cb887770a3c4fdd4
ath9k: Fix a locking bug in ath9k_add_interface()

We tried to revert commit 468ec98c9bfb ("ath9k: fix tx99 with monitor
mode interface") but accidentally missed part of the locking change.

The lock has to be held earlier so that we're holding it when we do
"sc->tx99_vif = vif;" and also there in the current code there is a
stray unlock before we have taken the lock.

Fixes: 961248b1e68c ("ath9k: add back support for using active monitor interfaces for tx99")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath9k/main.c