Skip to contentSkip to conversation

ath5k: fix recursive locking in ath5k_beacon_update

PATCH In review Bob Copeland 2 participants 2 messages Jul 18, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath5k: fix recursive locking in ath5k_beacon_update

Hi all,

I found a lockdep error while playing with AP mode on ath5k. I think this is triggerable today in ad-hoc mode.

From: Bob Copeland <[email protected]>
Date: Fri, 18 Jul 2008 11:11:21 -0400
Subject: [PATCH] ath5k: fix recursive locking in ath5k_beacon_update

ath5k_beacon_update takes sc->lock upon entry. However, it is only called from within ath5k_config_interface, which already holds the lock. Remove the unnecessary locking from ath5k_beacon_update.

---
 drivers/net/wireless/ath5k/base.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/wireless/ath5k/base.c +0 -0
index 217d506..235cba8 100644
@@ -3032,8 +3032,6 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct

sk_buff *skb)

ath5k_debug_dump_skb(sc, skb, "BC ", 1);

- mutex_lock(&sc->lock);
-
if (sc->opmode != IEEE80211_IF_TYPE_IBSS) {
ret = -EIO;
goto end;
@@ -3048,7 +3046,6 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
ath5k_beacon_config(sc);

end:
- mutex_unlock(&sc->lock);
return ret;
}

Signature · 4 lines
1.5.4.2.182.gb3092

-- 
Bob Copeland %% www.bobcopeland.com
#1 lore raw
Quoted 4 lines · Bob Copeland

Hi all,

I found a lockdep error while playing with AP mode on ath5k. I think this is triggerable today in ad-hoc mode.

I think it's a perfect candidate for 2.6.27. If it can affect actual functionality, it should go to 2.6.26.1.

Signature · 2 lines
Regards,
Pavel Roskin