linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtl8187: Fix for kernel oops when unloading with LEDs enabled
@ 2009-07-14 20:55 Larry Finger
  2009-08-26  3:46 ` Richard Farina
  0 siblings, 1 reply; 11+ messages in thread
From: Larry Finger @ 2009-07-14 20:55 UTC (permalink / raw)
  To: John W Linville; +Cc: Herton Ronaldo Krzesinski, Hin-Tak Leung, linux-wireless

When rtl8187 is unloaded and CONFIG_RTL8187_LEDS is set, the kernel
may oops when the module is unloaded as the workqueue for led_on was
not being cancelled.

This patch fixes the problem reported in
http://marc.info/?l=linux-wireless&m=124742957615781&w=2.

Reported-by: Gábor Stefanik <netrolller.3d@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger>
---

V2 - Do not create a new workqueue.

John,

This patch is 2.6.31 material. To the best of my knowledge, a formal bug
report was never filed; however, it was reported in the reference given above.

Larry
---

Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_leds.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_leds.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_leds.c
@@ -208,11 +208,12 @@ void rtl8187_leds_exit(struct ieee80211_
 {
 	struct rtl8187_priv *priv = dev->priv;
 
-	rtl8187_unregister_led(&priv->led_tx);
 	/* turn the LED off before exiting */
 	queue_delayed_work(dev->workqueue, &priv->led_off, 0);
 	cancel_delayed_work_sync(&priv->led_off);
+	cancel_delayed_work_sync(&priv->led_on);
 	rtl8187_unregister_led(&priv->led_rx);
+	rtl8187_unregister_led(&priv->led_tx);
 }
 #endif /* def CONFIG_RTL8187_LED */
 

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

end of thread, other threads:[~2009-08-27  2:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-14 20:55 [PATCH] rtl8187: Fix for kernel oops when unloading with LEDs enabled Larry Finger
2009-08-26  3:46 ` Richard Farina
2009-08-26  5:11   ` Larry Finger
2009-08-26 21:34     ` Richard Farina
2009-08-26 22:38       ` Hin-Tak Leung
2009-08-26 23:11         ` Richard Farina
2009-08-27  2:03           ` Andrey Yurovsky
2009-08-27  2:29             ` Gábor Stefanik
2009-08-26 15:03   ` John W. Linville
2009-08-26 16:03     ` Larry Finger
2009-08-26 20:43       ` Luis R. Rodriguez

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