diff options
author | Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> | 2011-11-01 16:38:50 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2011-11-11 12:59:00 +0200 |
commit | 11f6e40d9f21767a9090e4e559d3c63edf25e6c0 (patch) | |
tree | c3fd39804436cc897756271f3fd1e6ba0d2a53db /drivers/net/wireless/ath/ath6kl/init.c | |
parent | b4b2a0b116d79510640622a5f28f219065e61b03 (diff) | |
download | lwn-11f6e40d9f21767a9090e4e559d3c63edf25e6c0.tar.gz lwn-11f6e40d9f21767a9090e4e559d3c63edf25e6c0.zip |
ath6kl: Fix lockdep warning
The following is the lockdep warning which detects possible
deadlock condition with the way ar->lock and ar->list_lock
are being used.
(&(&ar->lock)->rlock){+.-...}, at: [<ffffffffa0492d13>] ath6kl_indicate_tx_activity+0x83/0x110 [ath6kl]
but this lock took another, SOFTIRQ-unsafe lock in the past:
(&(&ar->list_lock)->rlock){+.+...}
and interrupts could create inverse lock ordering between them.
other info that might help us debug this:
Possible interrupt unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&(&ar->list_lock)->rlock);
local_irq_disable();
lock(&(&ar->lock)->rlock);
lock(&(&ar->list_lock)->rlock);
<Interrupt>
lock(&(&ar->lock)->rlock);
*** DEADLOCK ***
softirqs have to be disabled when acquiring ar->list_lock to avoid
the above deadlock condition. When the above warning printed the
interface is still up and running without issue.
Reported-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index 83b4f165eebf..bb2254d3b439 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c @@ -1685,17 +1685,17 @@ void ath6kl_stop_txrx(struct ath6kl *ar) return; } - spin_lock(&ar->list_lock); + spin_lock_bh(&ar->list_lock); list_for_each_entry_safe(vif, tmp_vif, &ar->vif_list, list) { list_del(&vif->list); - spin_unlock(&ar->list_lock); + spin_unlock_bh(&ar->list_lock); ath6kl_cleanup_vif(vif, test_bit(WMI_READY, &ar->flag)); rtnl_lock(); ath6kl_deinit_if_data(vif); rtnl_unlock(); - spin_lock(&ar->list_lock); + spin_lock_bh(&ar->list_lock); } - spin_unlock(&ar->list_lock); + spin_unlock_bh(&ar->list_lock); clear_bit(WMI_READY, &ar->flag); |