mirror of
https://github.com/torvalds/linux.git
synced 2024-12-18 09:02:17 +00:00
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>
This commit is contained in:
parent
65b5a69860
commit
3da7429ce9
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user