OpenCloudOS-Kernel/drivers/net/wireless
Michal Kazior e13cf7a313 ath10k: move fw_crash_dump allocation
The fw_crash_data was allocated too late. Upon
early firmware crash, before registering to
mac80211, it was possible to crash the whole
system:

 ath10k_pci 0000:00:05.0: device has crashed during init
 BUG: unable to handle kernel NULL pointer dereference at           (null)
 IP: [<ffffffffa0058005>] ath10k_debug_get_new_fw_crash_data+0x15/0x30 [ath10k_core]
 PGD 0
 Oops: 0002 [#1] SMP
 Modules linked in: ath10k_pci(O) ath10k_core(O) ath [last unloaded: ath]
 CPU: 3 PID: 29 Comm: kworker/u8:1 Tainted: G           O   3.17.0-rc2-wl-ath+ #447
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
 Workqueue: ath10k_wq ath10k_core_register_work [ath10k_core]
 task: ffff88001eb01ad0 ti: ffff88001eb60000 task.ti: ffff88001eb60000
 RIP: 0010:[<ffffffffa0058005>]  [<ffffffffa0058005>] ath10k_debug_get_new_fw_crash_data+0x15/0x30 [ath10k_core]
 RSP: 0018:ffff88001eb63ce8  EFLAGS: 00010246
 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
 RDX: 0000000000000000 RSI: ffffc90001a09030 RDI: 0000000000000001
 RBP: ffff88001eb63cf0 R08: 0000000000000000 R09: ffff8800000bb200
 R10: 00000000000001e2 R11: ffff88001eb638de R12: ffff88001d7459a0
 R13: ffff88001d746ab0 R14: 00000000fffe14d4 R15: ffff88001d747c60
 FS:  0000000000000000(0000) GS:ffff88001fd80000(0000) knlGS:0000000000000000
 CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
 CR2: 0000000000000000 CR3: 000000001df34000 CR4: 00000000000006e0
 Stack:
  ffff88001d7459a0 ffff88001eb63d58 ffffffffa0083bbe ffff880000000010
  ffff88001eb63d68 ffff88001eb63d18 0000000000000002 0000000000059010
  ffffffffa0086fef 00000000deadbeef ffff88001d747a28 ffff88001d7459a0
 Call Trace:
  [<ffffffffa0083bbe>] ath10k_pci_fw_crashed_dump+0x2e/0xd0 [ath10k_pci]
  [<ffffffffa0085410>] __ath10k_pci_hif_power_up+0x5f0/0x700 [ath10k_pci]
  [<ffffffffa0085550>] ath10k_pci_hif_power_up+0x30/0xe0 [ath10k_pci]
  [<ffffffffa005bc7b>] ath10k_core_register_work+0x2b/0x520 [ath10k_core]
  [<ffffffff810689cc>] process_one_work+0x18c/0x3f0
  [<ffffffff81069011>] worker_thread+0x121/0x4a0
  [<ffffffff81068ef0>] ? rescuer_thread+0x2c0/0x2c0
  [<ffffffff8106daf2>] kthread+0xd2/0xf0
  [<ffffffff8106da20>] ? kthread_create_on_node+0x170/0x170
  [<ffffffff81857cfc>] ret_from_fork+0x7c/0xb0
  [<ffffffff8106da20>] ? kthread_create_on_node+0x170/0x170
 Code: 8b 40 38 48 c7 80 00 01 00 00 00 00 00 00 5b 5d c3 0f 1f 44 00 00 0f 1f 44 00 00 55 48 89 e5 53 48 8b 9f 90 1d 00 00 48 8d 7b 01 <c6> 03 01 e8 e3 ec 2b e1 48 8d 7b 18 e8 6a 4f 05 e1 48 89 d8 5b
 RIP  [<ffffffffa0058005>] ath10k_debug_get_new_fw_crash_data+0x15/0x30 [ath10k_core]
  RSP <ffff88001eb63ce8>
 CR2: 0000000000000000
 ---[ end trace 5d0ed15b050bcc1f ]---
 Kernel panic - not syncing: Fatal exception in interrupt
 Kernel Offset: 0x0 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffff9fffffff)
 ---[ end Kernel panic - not syncing: Fatal exception in interrupt

To prevent that split debug functions and allocate
fw_crash_data earlier.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2014-09-10 14:12:48 +03:00
..
ath ath10k: move fw_crash_dump allocation 2014-09-10 14:12:48 +03:00
b43 b43: N-PHY: support setting custom TX power 2014-08-25 16:00:43 -04:00
b43legacy
brcm80211 brcmfmac: fix memory leakage in msgbuf 2014-08-11 14:43:51 -04:00
cw1200 cw1200: Introduce the use of devm_kzalloc 2014-08-25 16:00:43 -04:00
hostap PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
ipw2x00 net: wireless: ipw2x00: ipw2200.c: Cleaning up missing null-terminate in conjunction with strncpy 2014-08-25 16:17:40 -04:00
iwlegacy PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
iwlwifi PCI changes for the v3.17 merge window (part 2): 2014-08-14 18:10:33 -06:00
libertas net: set name_assign_type in alloc_netdev() 2014-07-15 16:12:48 -07:00
libertas_tf
mwifiex mwifiex: use firmware API revision from GET_HW_SPEC response 2014-08-28 14:41:56 -04:00
orinoco orinoco_usb: use USB API functions rather than constants 2014-08-25 16:17:42 -04:00
p54 PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
prism54 PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
rsi rsi: fix memory leaks and error handling in rsi_91x_usb 2014-07-01 14:26:26 -04:00
rt2x00 rt2x00: support Ralink 5362. 2014-08-28 14:49:39 -04:00
rtl818x PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
rtlwifi PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
ti wireless: wlcore: Use devm_kzalloc 2014-08-25 16:17:39 -04:00
zd1211rw wireless: zd1211rw: new url for fw, remove experimental 2014-07-15 16:00:17 -04:00
Kconfig net: fix USB network driver config option. 2014-08-06 16:00:20 -07:00
Makefile rsi: Add RS9113 wireless driver 2014-03-17 13:51:52 -04:00
adm8211.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
adm8211.h
airo.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
airo.h
airo_cs.c airo_cs: Remove typedef local_info_t 2014-08-11 12:19:53 -07:00
at76c50x-usb.c mac80211: support more than one band in scan request 2014-06-25 09:10:42 +02:00
at76c50x-usb.h at76c50x: fix scan does not work with latest mac80211 2014-06-05 14:15:08 -04:00
atmel.c atmel: Remove typedef atmel_priv_ioctl 2014-08-11 12:19:53 -07:00
atmel.h
atmel_cs.c atmel_cs: Remove typedef local_info_t 2014-08-25 16:17:41 -04:00
atmel_pci.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
mac80211_hwsim.c Merge tag 'master-2014-07-25' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2014-07-28 17:36:25 -07:00
mac80211_hwsim.h
mwl8k.c PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use 2014-08-12 12:15:14 -06:00
ray_cs.c ray_cs: replace del_timer by del_timer_sync 2014-04-22 15:06:28 -04:00
ray_cs.h ray_cs: Add include guards 2014-08-28 14:41:56 -04:00
rayctl.h ray_cs: Add include guards 2014-08-28 14:41:56 -04:00
rndis_wlan.c cfg80211: constify MAC addresses in cfg80211 ops 2014-05-19 17:34:42 +02:00
wl3501.h
wl3501_cs.c
zd1201.c
zd1201.h