linux/drivers/net/wireless/ath/ath9k
Sujith Manoharan af690092ce ath9k: Fix crash on module unload
Make sure that any open relayfs files are closed before
unregistering with mac80211, otherwise this crash is seen:

[ 1331.097846] BUG: unable to handle kernel paging request at 6b6b6b8b
[ 1331.098170] IP: [<c063d0d6>] debugfs_remove+0x26/0x80
[ 1331.098170] *pdpt = 000000002f9aa001 *pde = 0000000000000000
[ 1331.098170] Oops: 0000 [#1] PREEMPT SMP
[ 1331.098170] Modules linked in: iptable_raw xt_CT nf_conntrack_ipv4 nf_defrag]
[ 1331.098170] Pid: 4794, comm: rmmod Tainted: G        WC   3.9.1+ #5 To Be Fi.
[ 1331.098170] EIP: 0060:[<c063d0d6>] EFLAGS: 00010202 CPU: 0
[ 1331.098170] EIP is at debugfs_remove+0x26/0x80
[ 1331.098170] EAX: f2f3acd0 EBX: f2f3acd0 ECX: 00000006 EDX: f8622348
[ 1331.098170] ESI: 6b6b6b6b EDI: 00000001 EBP: ee251e14 ESP: ee251e0c
[ 1331.098170]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[ 1331.098170] CR0: 8005003b CR2: 6b6b6b8b CR3: 2e7b7000 CR4: 000007e0
[ 1331.098170] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[ 1331.098170] DR6: ffff0ff0 DR7: 00000400
[ 1331.098170] Process rmmod (pid: 4794, ti=ee250000 task=efaa2560 task.ti=ee25)
[ 1331.098170] Stack:
[ 1331.098170]  f241e170 0000000a ee251e1c f861394d ee251e28 c04e3088 f241e170 4
[ 1331.098170]  c04e30fe f45482b0 ee251e54 c04e3187 f25e86b0 ee251e54 f8618748 0
[ 1331.098170]  0000000a 00000001 ee251e68 f860065b f2509e20 f25085a0 f5b6e8a4 8
[ 1331.098170] Call Trace:
[ 1331.098170]  [<f861394d>] remove_buf_file_handler+0xd/0x20 [ath9k]
[ 1331.098170]  [<c04e3088>] relay_remove_buf+0x18/0x30
[ 1331.098170]  [<c04e30fe>] relay_close_buf+0x2e/0x40
[ 1331.098170]  [<c04e3187>] relay_close+0x77/0xf0
[ 1331.098170]  [<f8618748>] ? dpd_exit+0x38/0x40 [ath9k]
[ 1331.098170]  [<f860065b>] ath9k_deinit_softc+0x8b/0xa0 [ath9k]
[ 1331.098170]  [<f86006b8>] ath9k_deinit_device+0x48/0x60 [ath9k]
[ 1331.098170]  [<f86107f1>] ath_pci_remove+0x31/0x50 [ath9k]
[ 1331.098170]  [<c06dbff8>] pci_device_remove+0x38/0xc0
[ 1331.098170]  [<c079daa4>] __device_release_driver+0x64/0xc0
[ 1331.098170]  [<c079db97>] driver_detach+0x97/0xa0
[ 1331.098170]  [<c079cacc>] bus_remove_driver+0x6c/0xe0
[ 1331.098170]  [<c079c197>] ? bus_put+0x17/0x20
[ 1331.098170]  [<c079cae3>] ? bus_remove_driver+0x83/0xe0
[ 1331.098170]  [<c079e709>] driver_unregister+0x49/0x80
[ 1331.098170]  [<c06dc138>] pci_unregister_driver+0x18/0x80
[ 1331.098170]  [<f8610602>] ath_pci_exit+0x12/0x20 [ath9k]
[ 1331.098170]  [<f8619ce0>] ath9k_exit+0x17/0x337 [ath9k]
[ 1331.098170]  [<c09e537d>] ? mutex_unlock+0xd/0x10
[ 1331.098170]  [<c04bd36c>] sys_delete_module+0x17c/0x250
[ 1331.098170]  [<c0540dc4>] ? do_munmap+0x244/0x2d0
[ 1331.098170]  [<c0540e96>] ? vm_munmap+0x46/0x60
[ 1331.098170]  [<c09e8dc4>] ? restore_all+0xf/0xf
[ 1331.098170]  [<c09ebf50>] ? __do_page_fault+0x4c0/0x4c0
[ 1331.098170]  [<c04b18e4>] ? trace_hardirqs_on_caller+0xf4/0x180
[ 1331.098170]  [<c09ef28d>] sysenter_do_call+0x12/0x38
[ 1331.098170] Code: 90 8d 74 26 00 55 89 e5 83 ec 08 89 1c 24 89 74 24 04 3e 82
[ 1331.098170] EIP: [<c063d0d6>] debugfs_remove+0x26/0x80 SS:ESP 0068:ee251e0c
[ 1331.098170] CR2: 000000006b6b6b8b
[ 1331.727971] ---[ end trace b5bb9f2066cef7f9 ]---

Cc: <stable@vger.kernel.org>
Acked-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Tested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-05-17 14:31:06 -04:00
..
ahb.c ath9k: use the devres API for allocations/mappings 2013-01-07 15:16:51 -05:00
ani.c ath9k_hw: remove a useless WARN_ON 2013-01-22 16:05:32 -05:00
ani.h ath9k_hw: reduce struct ar5416AniState size 2013-01-22 16:05:31 -05:00
antenna.c
ar955x_1p0_initvals.h ath9k_hw: Update initvals for QCA955x 2013-01-09 14:37:11 -05:00
ar5008_initvals.h ath9k: fix column header comments for some initval arrays 2013-01-07 15:16:53 -05:00
ar5008_phy.c ath9k_hw: make various ar5416/ar91xx rf banks const 2013-04-10 14:10:32 -04:00
ar9001_initvals.h ath9k: fix column header comments for some initval arrays 2013-01-07 15:16:53 -05:00
ar9002_calib.c Show actual timeout value in failed calibration messages. 2013-03-27 13:39:08 -04:00
ar9002_hw.c ath9k_hw: make various ar5416/ar91xx rf banks const 2013-04-10 14:10:32 -04:00
ar9002_initvals.h
ar9002_mac.c
ar9002_phy.c ath9k_hw: ar9002_hw_spectral_scan_config() can be static 2013-01-14 15:10:40 -05:00
ar9002_phy.h
ar9003_2p2_initvals.h ath9k_hw: add tx gain tables for newer devices 2013-01-11 14:50:00 -05:00
ar9003_calib.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-03-29 16:41:36 -04:00
ar9003_eeprom.c ath9k_hw: Fix fixed antenna for AR9462 2013-03-06 16:28:57 -05:00
ar9003_eeprom.h
ar9003_hw.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-01-28 13:54:03 -05:00
ar9003_mac.c
ar9003_mac.h
ar9003_mci.c
ar9003_mci.h
ar9003_paprd.c
ar9003_phy.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-01-28 13:54:03 -05:00
ar9003_phy.h ath9k_hw: Add TempCompensation feature for AR9550 2013-01-09 14:37:11 -05:00
ar9003_rtt.c
ar9003_rtt.h
ar9330_1p1_initvals.h
ar9330_1p2_initvals.h
ar9340_initvals.h ath9k_hw: add tx gain tables for newer devices 2013-01-11 14:50:00 -05:00
ar9462_2p0_initvals.h ath9k_hw: Update initvals for AR9462 2013-03-06 16:28:56 -05:00
ar9485_initvals.h ath9k_hw: add tx gain tables for newer devices 2013-01-11 14:50:00 -05:00
ar9565_1p0_initvals.h ath9k: Update initvals for AR9565 2013-05-08 17:15:08 -04:00
ar9580_1p0_initvals.h ath9k_hw: change AR9580 initvals to fix a stability issue 2013-04-12 13:22:09 -04:00
ath9k.h ath9k: add support for the new rate control API 2013-04-23 14:14:53 -04:00
beacon.c mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan 2013-03-25 19:19:35 +01:00
btcoex.c
btcoex.h
calib.c Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2013-04-10 14:09:54 -04:00
calib.h ath9k_hw: make various ar5416/ar91xx rf banks const 2013-04-10 14:10:32 -04:00
common.c ath9k_common: remove ath9k_cmn_padpos 2013-04-10 14:10:33 -04:00
common.h ath9k_common: remove ath9k_cmn_padpos 2013-04-10 14:10:33 -04:00
debug.c ath9k: Fix crash on module unload 2013-05-17 14:31:06 -04:00
debug.h ath9k: Fix crash on module unload 2013-05-17 14:31:06 -04:00
dfs.c ath9k: change DFS logging to use ath_dbg() 2013-04-22 15:17:40 -04:00
dfs.h
dfs_debug.c ath9k: add debugfs based DFS radar simulation 2013-04-08 15:28:38 -04:00
dfs_debug.h
dfs_pattern_detector.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-04-23 14:09:39 -04:00
dfs_pattern_detector.h ath9k: change DFS logging to use ath_dbg() 2013-04-22 15:17:40 -04:00
dfs_pri_detector.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-04-23 14:09:39 -04:00
dfs_pri_detector.h ath9k: change DFS logging to use ath_dbg() 2013-04-22 15:17:40 -04:00
eeprom.c
eeprom.h
eeprom_4k.c
eeprom_9287.c
eeprom_def.c
gpio.c
hif_usb.c
hif_usb.h
htc.h ath9k_htc: fix signal strength handling issues 2013-02-27 14:12:51 -05:00
htc_drv_beacon.c ath9k_common: remove ath9k_cmn_padpos 2013-04-10 14:10:33 -04:00
htc_drv_debug.c
htc_drv_gpio.c
htc_drv_init.c ath9k_htc: accept 1.x firmware newer than 1.3 2013-04-08 14:35:03 -04:00
htc_drv_main.c ath9k_common: remove ath9k_cmn_padpos 2013-04-10 14:10:33 -04:00
htc_drv_txrx.c ath9k_common: remove ath9k_cmn_padpos 2013-04-10 14:10:33 -04:00
htc_hst.c ath9k_htc: Fix memory leak 2013-01-11 14:12:01 -05:00
htc_hst.h
hw-ops.h ath9k_hw: use the devres API for allocations 2013-01-07 15:16:51 -05:00
hw.c ath9k: apply coverage class on slottime too 2013-04-23 14:14:52 -04:00
hw.h ath9k_hw: make various ar5416/ar91xx rf banks const 2013-04-10 14:10:32 -04:00
init.c ath9k: Fix crash on module unload 2013-05-17 14:31:06 -04:00
Kconfig net/wireless: ATH9K should depend on HAS_DMA 2013-05-17 14:31:06 -04:00
link.c Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2013-04-10 14:09:54 -04:00
mac.c ath9k: detect more kinds of invalid descriptors 2013-04-10 14:10:33 -04:00
mac.h ath9k: detect more kinds of invalid descriptors 2013-04-10 14:10:33 -04:00
main.c ath9k: Fix beacon reconfiguration 2013-05-08 17:15:07 -04:00
Makefile
mci.c ath9k: Remove unused variables in ath_mci_cleanup 2013-02-01 14:27:24 -05:00
mci.h
pci.c ath9k: use the devres API for allocations/mappings 2013-01-07 15:16:51 -05:00
phy.h
rc.c mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan 2013-03-25 19:19:35 +01:00
rc.h
recv.c ath9k: Fix RX DMA mapping 2013-04-23 14:14:54 -04:00
reg.h ath: update hardware mac address with bssid mask 2013-04-22 15:20:15 -04:00
wmi.c
wmi.h
wow.c
xmit.c ath9k: add support for the new rate control API 2013-04-23 14:14:53 -04:00