summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2009-07-14 15:55:16 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-07-21 12:07:42 -0400
commit3da7429ce92abd79b14e2275a28be144ce2c3013 (patch)
treea58e1418d90d3dc5d2bf9b35ca408330a0ab556c /drivers/net
parent65b5a69860ed3bc4224368b804d381cd9cafa90a (diff)
downloadop-kernel-dev-3da7429ce92abd79b14e2275a28be144ce2c3013.zip
op-kernel-dev-3da7429ce92abd79b14e2275a28be144ce2c3013.tar.gz
rtl8187: Fix for kernel oops when unloading with LEDs enabled
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8187_leds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8187_leds.c b/drivers/net/wireless/rtl818x/rtl8187_leds.c
index b442535..cf9f899 100644
--- a/drivers/net/wireless/rtl818x/rtl8187_leds.c
+++ b/drivers/net/wireless/rtl818x/rtl8187_leds.c
@@ -208,11 +208,12 @@ void rtl8187_leds_exit(struct ieee80211_hw *dev)
{
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 */
OpenPOWER on IntegriCloud