Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock

ath10k_wmi_tlv_op_pull_peer_stats_info() could try to unlock RCU lock
winthout locking it first when peer reason doesn't match the valid
cases for this function.

Add a default case to return without unlocking.

Fixes: 09078368d516 ("ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()")
Reported-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210406230228.31301-1-skhan@linuxfoundation.org

authored by

Shuah Khan and committed by
Kalle Valo
eaaf52e4 8392df5d

+3
+3
drivers/net/wireless/ath/ath10k/wmi-tlv.c
··· 592 592 GFP_ATOMIC 593 593 ); 594 594 break; 595 + default: 596 + kfree(tb); 597 + return; 595 598 } 596 599 597 600 exit: