linux_dsm_epyc7002/drivers/net
Kalle Valo 1427228d58 ath10k: fix napi crash during rmmod when probe firmware fails
This fixes the below crash when ath10k probe firmware fails, NAPI polling tries
to access a rx ring resource which was never allocated. An easy way to
reproduce this is easy to remove all the firmware files, load ath10k modules
and ath10k will crash when calling 'rmmod ath10k_pci'. The fix is to call
napi_enable() from ath10k_pci_hif_start() so that it matches with
napi_disable() being called from ath10k_pci_hif_stop().

Big thanks to Mohammed Shafi Shajakhan who debugged this and provided first
version of the fix. In this patch I just fix the actual problem in pci.c
instead of having a workaround in core.c.

BUG: unable to handle kernel NULL pointer dereference at (null)
IP:  __ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core]
__ath10k_htt_rx_ring_fill_n+0x19/0x230 [ath10k_core]

Call Trace:

[<ffffffffa113ec62>] ath10k_htt_rx_msdu_buff_replenish+0x42/0x90
[ath10k_core]
[<ffffffffa113f393>] ath10k_htt_txrx_compl_task+0x433/0x17d0
[ath10k_core]
[<ffffffff8114406d>] ? __wake_up_common+0x4d/0x80
[<ffffffff811349ec>] ? cpu_load_update+0xdc/0x150
[<ffffffffa119301d>] ? ath10k_pci_read32+0xd/0x10 [ath10k_pci]
[<ffffffffa1195b17>] ath10k_pci_napi_poll+0x47/0x110 [ath10k_pci]
[<ffffffff817863af>] net_rx_action+0x20f/0x370

Reported-by: Ben Greear <greearb@candelatech.com>
Fixes: 3c97f5de1f ("ath10k: implement NAPI support")
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
2017-02-14 19:40:16 +02:00
..
appletalk net/appletalk: Fix kernel memory disclosure 2017-01-09 16:34:39 -05:00
arcnet
bonding net: remove ndo_neigh_{construct, destroy} from stacked devices 2017-02-06 11:25:57 -05:00
caif
can can: flexcan: switch imx6 and vf610 to timestamp based offloading 2017-02-06 15:13:45 +01:00
cris
dsa net: dsa: remove unnecessary phy*.h includes 2017-02-10 13:51:04 -05:00
ethernet net: natsemi: ns83820: use new api ethtool_{get|set}_link_ksettings 2017-02-12 22:32:17 -05:00
fddi fddi: skfp: Use more common logging styles 2016-12-29 11:37:14 -05:00
fjes drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
hamradio NET: mkiss: Fix panic 2017-02-10 13:41:13 -05:00
hippi Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-07 16:29:30 -05:00
ieee802154 ieee802154: atusb: fix driver to work with older firmware versions 2017-01-12 22:12:43 +01:00
ipvlan ipvtap: IP-VLAN based tap driver 2017-02-11 20:59:41 -05:00
irda net: Remove usage of net_device last_rx member 2017-01-18 17:22:49 -05:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-11 02:31:11 -05:00
plip
ppp net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
slip net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
team net: remove ndo_neigh_{construct, destroy} from stacked devices 2017-02-06 11:25:57 -05:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-11 02:31:11 -05:00
vmxnet3 drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
wan net: wan: slic_ds26522: Remove .owner field for driver 2017-02-07 11:41:15 -05:00
wimax
wireless ath10k: fix napi crash during rmmod when probe firmware fails 2017-02-14 19:40:16 +02:00
xen-netback drivers: net: generalize napi_complete_done() 2017-01-30 15:10:42 -05:00
dummy.c net: dummy: Introduce dummy virtual functions 2017-01-24 14:07:22 -05:00
eql.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
geneve.c
gtp.c gtp: let userspace handle packets for invalid tunnels 2017-01-29 13:54:00 -05:00
ifb.c net-tc: convert tc_from to tc_from_ingress and tc_redirected 2017-01-08 20:58:52 -05:00
Kconfig ipvtap: IP-VLAN based tap driver 2017-02-11 20:59:41 -05:00
LICENSE.SRC
loopback.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-11 02:31:11 -05:00
macsec.c net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
macvlan.c tap: Abstract type of virtual interface from tap implementation 2017-02-11 20:59:41 -05:00
macvtap.c tap: tap as an independent module 2017-02-11 20:59:41 -05:00
Makefile ipvtap: IP-VLAN based tap driver 2017-02-11 20:59:41 -05:00
mdio.c net: mdio: add mdio45_ethtool_ksettings_get 2017-01-02 16:59:10 -05:00
mii.c
netconsole.c
nlmon.c net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
ntb_netdev.c
rionet.c
sb1000.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
Space.c
sungem_phy.c
tap.c tap: tap as an independent module 2017-02-11 20:59:41 -05:00
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-07 16:29:30 -05:00
veth.c net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00
virtio_net.c virtio_net: XDP support for adjust_head 2017-02-07 10:05:12 -05:00
vrf.c net: rename dst_neigh_output back to neigh_output 2017-02-11 21:25:18 -05:00
vxlan.c vxlan: remove vni zero check and drop for COLLECT_METADATA 2017-02-11 21:25:50 -05:00
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-02-11 02:31:11 -05:00