lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Jul 2008 13:17:33 +0200
From:	Jiri Slaby <jirislaby@...il.com>
To:	linville@...driver.com
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
	ath5k-devel@...ema.h4ckr.net, Jiri Slaby <jirislaby@...il.com>,
	Johannes Berg <johannes@...solutions.net>,
	Nick Kossifidis <mickflemm@...il.com>,
	"Luis R. Rodriguez" <mcgrof@...il.com>
Subject: [PATCH 1/3] Ath5k: fix beacon-update deadlock

Commit 9d139c810a2aa17365cc548d0cd2a189d8433c65 introduced
AA deadlock -- ath5k_config_interface(); holds sc->lock
and it calls ath5k_beacon_update(); which tries to grab the
lock again.

Don't grab the lock in beacon update, since only caller is
config iface for now.

Signed-off-by: Jiri Slaby <jirislaby@...il.com>
Cc: Johannes Berg <johannes@...solutions.net>
Cc: John W. Linville <linville@...driver.com>
Cc: Nick Kossifidis <mickflemm@...il.com>
Cc: Luis R. Rodriguez <mcgrof@...il.com>
---
 drivers/net/wireless/ath5k/base.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 7273e9f..898a969 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -3065,8 +3065,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;
@@ -3081,9 +3079,7 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
 		ath5k_beacon_config(sc);
 		mmiowb();
 	}
-
 end:
-	mutex_unlock(&sc->lock);
 	return ret;
 }
 
-- 
1.5.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ