ath11k: Fixing dangling pointer issue upon peer delete failure
authorVikas Patel <vikpatel@codeaurora.org>
Wed, 5 Feb 2020 08:31:55 +0000 (14:01 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 11 Feb 2020 18:34:47 +0000 (20:34 +0200)
commit58595c9874c625ceb7004960d8e53b9226abdc92
treec4c793eba8897f99cd19851921ffb3983a3734b2
parent443d2ee758ac63b4a2748f73ecc4ca73775e0c04
ath11k: Fixing dangling pointer issue upon peer delete failure

When there is WMI command failure, 'peer->sta' was not getting
cleaned up, and mac80211 frees the 'sta' memory, which is causing
the below page fault.

Cleaning up the sta pointer in ath11k whenever peer delete command
is sent.

Unable to handle kernel paging request at virtual address 200080000006a
pgd = ffffffc02a774000
[200080000006a] *pgd=0000000000000000, *pud=0000000000000000
Internal error: Oops: 96000004 [#1] PREEMPT SMP
.
.
.
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W       4.4.60 #1
Hardware name: Qualcomm Technologies, Inc. IPQ807x/AP-HK01-C1 (DT)
task: ffffffc00083c6d0 ti: ffffffc00083c6d0 task.ti: ffffffc00083c6d0
PC is at ath11k_dp_rx_process_mon_status+0x114/0x4e0 [ath11k]
LR is at ath11k_dp_rx_process_mon_status+0xe8/0x4e0 [ath11k]
pc : [<ffffffbffcf8e544>] lr : [<ffffffbffcf8e518>] pstate: 60000145
sp : ffffffc000833a30

Signed-off-by: Vikas Patel <vikpatel@codeaurora.org>
Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/ath/ath11k/mac.c