diff options
author | Zhu Yi <yi.zhu@intel.com> | 2009-06-15 15:59:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-06-19 11:50:16 -0400 |
commit | 4e9aa52e36a7beb4c0163324a3de759d7cf2e442 (patch) | |
tree | c8dd577dd48b8ab7402557e1b2ecdfac2ef8d002 /drivers/net/wireless | |
parent | d7e057dca3f1b76ff44dd16fefcd493a52614aad (diff) |
iwmc3200wifi: fix potential kernel oops on module removal
The iwm_if_free() is called before destroy_workqueue for isr_wq on
device remove method. But if there is still some pending work in
the isr_wq, the required data structures are already freed at this
point. This leeds a kernel oops. The patch fixes this problem by
moving iwm_if_free after destroy_workqueue.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwmc3200wifi/sdio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/sdio.c b/drivers/net/wireless/iwmc3200wifi/sdio.c index c0405715647a..916681837fd2 100644 --- a/drivers/net/wireless/iwmc3200wifi/sdio.c +++ b/drivers/net/wireless/iwmc3200wifi/sdio.c | |||
@@ -479,10 +479,10 @@ static void iwm_sdio_remove(struct sdio_func *func) | |||
479 | struct iwm_priv *iwm = hw_to_iwm(hw); | 479 | struct iwm_priv *iwm = hw_to_iwm(hw); |
480 | struct device *dev = &func->dev; | 480 | struct device *dev = &func->dev; |
481 | 481 | ||
482 | iwm_debugfs_exit(iwm); | ||
483 | iwm_if_remove(iwm); | 482 | iwm_if_remove(iwm); |
484 | iwm_if_free(iwm); | ||
485 | destroy_workqueue(hw->isr_wq); | 483 | destroy_workqueue(hw->isr_wq); |
484 | iwm_debugfs_exit(iwm); | ||
485 | iwm_if_free(iwm); | ||
486 | 486 | ||
487 | sdio_set_drvdata(func, NULL); | 487 | sdio_set_drvdata(func, NULL); |
488 | 488 | ||