linux_dsm_epyc7002/drivers/net
Michal Kazior 18ae68fff3 ath10k: fix null deref on wmi-tlv when trying spectral scan
WMI ops wrappers did not properly check for null
function pointers for spectral scan. This caused
null dereference crash with WMI-TLV based firmware
which doesn't implement spectral scan.

The crash could be triggered with:

  ip link set dev wlan0 up
  echo background > /sys/kernel/debug/ieee80211/phy0/ath10k/spectral_scan_ctl

The crash looked like this:

  [  168.031989] BUG: unable to handle kernel NULL pointer dereference at           (null)
  [  168.037406] IP: [<          (null)>]           (null)
  [  168.040395] PGD cdd4067 PUD fa0f067 PMD 0
  [  168.043303] Oops: 0010 [#1] SMP
  [  168.045377] Modules linked in: ath10k_pci(O) ath10k_core(O) ath mac80211 cfg80211 [last unloaded: cfg80211]
  [  168.051560] CPU: 1 PID: 1380 Comm: bash Tainted: G        W  O    4.8.0 #78
  [  168.054336] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.7.5-20140531_083030-gandalf 04/01/2014
  [  168.059183] task: ffff88000c460c00 task.stack: ffff88000d4bc000
  [  168.061736] RIP: 0010:[<0000000000000000>]  [<          (null)>]           (null)
  ...
  [  168.100620] Call Trace:
  [  168.101910]  [<ffffffffa03b9566>] ? ath10k_spectral_scan_config+0x96/0x200 [ath10k_core]
  [  168.104871]  [<ffffffff811386e2>] ? filemap_fault+0xb2/0x4a0
  [  168.106696]  [<ffffffffa03b97e6>] write_file_spec_scan_ctl+0x116/0x280 [ath10k_core]
  [  168.109618]  [<ffffffff812da3a1>] full_proxy_write+0x51/0x80
  [  168.111443]  [<ffffffff811957b8>] __vfs_write+0x28/0x120
  [  168.113090]  [<ffffffff812f1a2d>] ? security_file_permission+0x3d/0xc0
  [  168.114932]  [<ffffffff8109b912>] ? percpu_down_read+0x12/0x60
  [  168.116680]  [<ffffffff811965f8>] vfs_write+0xb8/0x1a0
  [  168.118293]  [<ffffffff81197966>] SyS_write+0x46/0xa0
  [  168.119912]  [<ffffffff818f2972>] entry_SYSCALL_64_fastpath+0x1a/0xa4
  [  168.121737] Code:  Bad RIP value.
  [  168.123318] RIP  [<          (null)>]           (null)

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2016-11-23 15:55:38 +02:00
..
appletalk net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
arcnet
bonding net: bonding: Flip to the new dev walk API 2016-10-18 11:44:58 -04:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-10-02 22:20:41 -04:00
cris net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
dsa net: dsa: mv88e6xxx: use setup_timer to simplify the code 2016-10-26 17:21:59 -04:00
ethernet net: netcp: add missing of_node_put() in netcp_probe() 2016-10-26 17:21:59 -04:00
fddi net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
fjes net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
hamradio 6pack: fix buffer length mishandling 2016-09-20 22:51:30 -04:00
hippi net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
hyperv hv_netvsc: fix a race between netvsc_send() and netvsc_init_buf() 2016-10-21 11:27:31 -04:00
ieee802154 fakelb: fix schedule while atomic 2016-09-19 20:19:34 +02:00
ipvlan ipvlan: constify l3mdev_ops structure 2016-10-15 17:49:57 -04:00
irda
phy net: phy: broadcom: Add support for BCM54612E 2016-10-26 17:15:26 -04:00
plip net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
ppp ppp: declare PPP devices as LLTX 2016-08-31 14:33:09 -07:00
slip net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
team team: loadbalance: push lacpdus to exact delivery 2016-08-26 13:08:59 -07:00
usb net: use core MTU range checking in USB NIC drivers 2016-10-20 14:51:08 -04:00
vmxnet3 net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00
wan net: use core MTU range checking in WAN drivers 2016-10-20 14:51:09 -04:00
wimax net: use core MTU range checking in wireless drivers 2016-10-20 14:51:08 -04:00
wireless ath10k: fix null deref on wmi-tlv when trying spectral scan 2016-11-23 15:55:38 +02:00
xen-netback net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00
dummy.c
eql.c
geneve.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
gtp.c
ifb.c
Kconfig ipvlan: Fix dependency issue 2016-09-20 22:55:23 -04:00
LICENSE.SRC
loopback.c
macsec.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
macvlan.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
macvtap.c
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
rionet.c net: use core MTU range checking in misc drivers 2016-10-20 14:51:10 -04:00
sb1000.c net: deprecate eth_change_mtu, remove usage 2016-10-13 09:36:57 -04:00
Space.c
sungem_phy.c
tun.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
veth.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
virtio_net.c net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00
vrf.c net: vrf: Remove RT_FL_TOS 2016-09-17 10:05:05 -04:00
vxlan.c net: use core MTU range checking in core net infra 2016-10-20 14:51:09 -04:00
xen-netfront.c net: use core MTU range checking in virt drivers 2016-10-20 14:51:09 -04:00