linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] b43: Fix locking problem when stopping rfkill polling
@ 2009-10-07 15:06 Larry Finger
  2009-10-07 19:01 ` John W. Linville
  0 siblings, 1 reply; 9+ messages in thread
From: Larry Finger @ 2009-10-07 15:06 UTC (permalink / raw)
  To: John W Linville; +Cc: linux-wireless

In commit 26e5ab35b4c7b1d4cb487a11084520aed9a8d05e entitled "b43: Fix PPC
crash in rfkill polling on unload", the call to stop polling should not have
been placed inside the wl->mutex. The result was incorrect locking messages.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

John,

I had not intended for the previous patch to be applied as I was waiting for
the Bugzilla OP to test. He promised to do that today. In any case, that patch
introduced a locking problem that needs to be fixed.

Why do the one-liners cause so many problems?

Larry
---

Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/main.c
+++ wireless-testing/drivers/net/wireless/b43/main.c
@@ -4501,8 +4501,8 @@ static void b43_op_stop(struct ieee80211
 
 	cancel_work_sync(&(wl->beacon_update_trigger));
 
-	mutex_lock(&wl->mutex);
 	wiphy_rfkill_stop_polling(hw->wiphy);
+	mutex_lock(&wl->mutex);
 	if (b43_status(dev) >= B43_STAT_STARTED) {
 		dev = b43_wireless_core_stop(dev);
 		if (!dev)

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

end of thread, other threads:[~2009-10-08 22:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 15:06 [PATCH] b43: Fix locking problem when stopping rfkill polling Larry Finger
2009-10-07 19:01 ` John W. Linville
2009-10-07 19:28   ` Larry Finger
2009-10-07 19:46     ` Michael Buesch
2009-10-07 22:36     ` Johannes Berg
2009-10-07 22:43       ` Larry Finger
2009-10-07 23:08         ` Michael Buesch
2009-10-08 20:23   ` Larry Finger
2009-10-08 22:31     ` John W. Linville

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).