ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock
authorShuah Khan <skhan@linuxfoundation.org>
Tue, 6 Apr 2021 23:02:28 +0000 (17:02 -0600)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 22 Apr 2021 13:59:56 +0000 (16:59 +0300)
commiteaaf52e4b866f265eb791897d622961293fd48c1
tree4ad908cc5e7060f08c30e87691dc4fcf0d3520f8
parent8392df5d7e0b6a7d21440da1fc259f9938f4dec3
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
drivers/net/wireless/ath/ath10k/wmi-tlv.c