OpenCloudOS-Kernel/drivers/net/wireless/ath/ath10k
Venkateswara Naralasetty acb31476ad ath10k: fix kernel null pointer dereference
Currently sta airtime is updated without any lock in case of
host based airtime calculation. Which may result in accessing the
invalid sta pointer in case of continuous station connect/disconnect.

This patch fix the kernel null pointer dereference by updating the
station airtime with proper RCU lock in case of host based airtime
calculation.

Proceeding with the analysis of "ARM Kernel Panic".
The APSS crash happened due to OOPS on CPU 0.
Crash Signature : Unable to handle kernel NULL pointer dereference
at virtual address 00000300
During the crash,
PC points to "ieee80211_sta_register_airtime+0x1c/0x448 [mac80211]"
LR points to "ath10k_txrx_tx_unref+0x17c/0x364 [ath10k_core]".
The Backtrace obtained is as follows:
[<bf880238>] (ieee80211_sta_register_airtime [mac80211]) from
[<bf945a38>] (ath10k_txrx_tx_unref+0x17c/0x364 [ath10k_core])
[<bf945a38>] (ath10k_txrx_tx_unref [ath10k_core]) from
[<bf9428e4>] (ath10k_htt_txrx_compl_task+0xa50/0xfc0 [ath10k_core])
[<bf9428e4>] (ath10k_htt_txrx_compl_task [ath10k_core]) from
[<bf9b9bc8>] (ath10k_pci_napi_poll+0x50/0xf8 [ath10k_pci])
[<bf9b9bc8>] (ath10k_pci_napi_poll [ath10k_pci]) from
[<c059e3b0>] (net_rx_action+0xac/0x160)
[<c059e3b0>] (net_rx_action) from [<c02329a4>] (__do_softirq+0x104/0x294)
[<c02329a4>] (__do_softirq) from [<c0232b64>] (run_ksoftirqd+0x30/0x90)
[<c0232b64>] (run_ksoftirqd) from [<c024e358>] (smpboot_thread_fn+0x25c/0x274)
[<c024e358>] (smpboot_thread_fn) from [<c02482fc>] (kthread+0xd8/0xec)

Tested HW: QCA9888
Tested FW: 10.4-3.10-00047

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1585736290-17661-1-git-send-email-vnaralas@codeaurora.org
2020-04-07 07:54:53 +03:00
..
Kconfig
Makefile
ahb.c ath10k: fix few checkpatch warnings 2020-02-11 16:17:33 +02:00
ahb.h
bmi.c ath10k: add large size for BMI download data for SDIO 2019-11-25 13:53:46 +02:00
bmi.h ath10k: add large size for BMI download data for SDIO 2019-11-25 13:53:46 +02:00
ce.c wireless: Remove call to memset after dma_alloc_coherent 2019-10-15 08:20:16 +03:00
ce.h
core.c ath10k: add QCA9377 sdio hw_param item 2020-03-11 18:33:02 +02:00
core.h ath10k: Fill GCMP MIC length for PMF 2020-03-22 12:22:01 +02:00
coredump.c ath10k: fix backtrace on coredump 2019-10-01 14:17:45 +03:00
coredump.h ath10k: Enable MSA region dump support for WCN3990 2019-09-21 09:48:16 +03:00
debug.c ath10k: fix unsupported chip reset debugs file write 2020-03-11 18:41:11 +02:00
debug.h
debugfs_sta.c ath10k: Add peer param map for tlv and non-tlv 2019-09-23 10:27:56 +03:00
hif.h
htc.c ath10k: change bundle count for max rx bundle for sdio 2019-12-02 12:06:56 +02:00
htc.h ath10k: change bundle count for max rx bundle for sdio 2019-12-02 12:06:56 +02:00
htt.c
htt.h ath10k: enable napi on RX path for sdio 2019-12-02 11:59:41 +02:00
htt_rx.c ath10k: fix not registering airtime of 11a station with WMM disable 2020-03-11 18:45:43 +02:00
htt_tx.c ath10k: Fill GCMP MIC length for PMF 2020-03-22 12:22:01 +02:00
hw.c ath10k: allow qca988x family to support ack rssi of tx data packets. 2020-03-12 10:20:02 +02:00
hw.h ath10k: add QCA9377 sdio hw_param item 2020-03-11 18:33:02 +02:00
mac.c ath10k: enable VHT160 and VHT80+80 modes 2020-04-06 19:24:43 +03:00
mac.h ath10k: add support for hardware rfkill 2019-10-02 20:20:33 +03:00
p2p.c
p2p.h
pci.c ath10k: Fix the race condition in firmware dump work queue 2020-04-06 19:14:36 +03:00
pci.h
qmi.c ath10k: Don't call SCM interface for statically mapped msa region 2020-01-26 12:36:12 +02:00
qmi.h ath10k: Don't call SCM interface for statically mapped msa region 2020-01-26 12:36:12 +02:00
qmi_wlfw_v01.c ath10k: Fix HOST capability QMI incompatibility 2019-09-17 17:03:13 +03:00
qmi_wlfw_v01.h ath10k: Fix HOST capability QMI incompatibility 2019-09-17 17:03:13 +03:00
rx_desc.h
sdio.c ath10k: use kzalloc to read for ath10k_sdio_hif_diag_read 2020-03-11 18:39:40 +02:00
sdio.h ath10k: sdio: remove struct ath10k_sdio_rx_data::status 2019-11-25 13:50:36 +02:00
snoc.c ath10k: Use device_get_match_data() to simplify code 2020-01-26 16:30:20 +02:00
snoc.h ath10k: Enable MSA region dump support for WCN3990 2019-09-21 09:48:16 +03:00
spectral.c
spectral.h
swap.c
swap.h
targaddrs.h
testmode.c ath10k: Fix some typo in some warning messages 2019-12-17 16:24:17 +02:00
testmode.h
testmode_i.h
thermal.c
thermal.h
trace.c
trace.h ftrace: Rework event_create_dir() 2019-11-27 07:44:25 +01:00
txrx.c ath10k: fix kernel null pointer dereference 2020-04-07 07:54:53 +03:00
txrx.h
usb.c ath10k: Fix a NULL-ptr-deref bug in ath10k_usb_alloc_urb_from_pipe 2019-10-22 11:37:18 +03:00
usb.h
wmi-ops.h
wmi-tlv.c ath10k: enable radar detection in secondary segment 2020-04-06 19:25:03 +03:00
wmi-tlv.h ath10k: add support for hardware rfkill 2019-10-02 20:20:33 +03:00
wmi.c ath10k: enable radar detection in secondary segment 2020-04-06 19:25:03 +03:00
wmi.h ath10k: enable radar detection in secondary segment 2020-04-06 19:25:03 +03:00
wow.c
wow.h