linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: fix recursive locking in ath5k_beacon_update
@ 2008-07-18 13:50 Bob Copeland
  2008-07-18 15:39 ` Pavel Roskin
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Copeland @ 2008-07-18 13:50 UTC (permalink / raw)
  To: ath5k-devel; +Cc: John W. Linville, linux-wireless

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 <me@bobcopeland.com>
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.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
---
 drivers/net/wireless/ath5k/base.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 217d506..235cba8 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -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;
 }
 
-- 
1.5.4.2.182.gb3092

-- 
Bob Copeland %% www.bobcopeland.com



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ath5k: fix recursive locking in ath5k_beacon_update
  2008-07-18 13:50 [PATCH] ath5k: fix recursive locking in ath5k_beacon_update Bob Copeland
@ 2008-07-18 15:39 ` Pavel Roskin
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Roskin @ 2008-07-18 15:39 UTC (permalink / raw)
  To: Bob Copeland; +Cc: ath5k-devel, John W. Linville, linux-wireless

On Fri, 2008-07-18 at 09:50 -0400, Bob Copeland wrote:
> 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.

-- 
Regards,
Pavel Roskin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-18 15:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 13:50 [PATCH] ath5k: fix recursive locking in ath5k_beacon_update Bob Copeland
2008-07-18 15:39 ` Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).