diff options
| author | Shuah Khan <skhan@linuxfoundation.org> | 2021-04-06 17:02:28 -0600 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-14 10:50:15 +0200 |
| commit | 076495110d0530f6b6aa13bd5f771655b3cbf612 (patch) | |
| tree | a8cf192ba7559adc6f6df6c4dee8ec5eb58114a1 | |
| parent | 3b1ac40c6012140828caa79e592a438a18ebf71b (diff) | |
| download | linux-076495110d0530f6b6aa13bd5f771655b3cbf612.tar.gz linux-076495110d0530f6b6aa13bd5f771655b3cbf612.tar.bz2 linux-076495110d0530f6b6aa13bd5f771655b3cbf612.zip | |
ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock
[ Upstream commit eaaf52e4b866f265eb791897d622961293fd48c1 ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi-tlv.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi-tlv.c b/drivers/net/wireless/ath/ath10k/wmi-tlv.c index e7072fc4f487..4f2fbc610d79 100644 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c @@ -592,6 +592,9 @@ static void ath10k_wmi_event_tdls_peer(struct ath10k *ar, struct sk_buff *skb) GFP_ATOMIC ); break; + default: + kfree(tb); + return; } exit: |
