]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()
authorShuah Khan <skhan@linuxfoundation.org>
Wed, 10 Feb 2021 21:21:07 +0000 (14:21 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 23 Apr 2021 09:58:35 +0000 (11:58 +0200)
commita7e81e90dcf2a65e93e14a9f087b6176fbbcd11b
treed31aee7ad5c52d375ecd4c9b10020cc91eb2de1f
parentddbbaae024b31bf555140a195a465f34ea6be41a
ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()

BugLink: https://bugs.launchpad.net/bugs/1923869
[ Upstream commit 09078368d516918666a0122f2533dc73676d3d7e ]

ieee80211_find_sta_by_ifaddr() must be called under the RCU lock and
the resulting pointer is only valid under RCU lock as well.

Fix ath10k_wmi_tlv_op_pull_peer_stats_info() to hold RCU lock before it
calls ieee80211_find_sta_by_ifaddr() and release it when the resulting
pointer is no longer needed.

This problem was found while reviewing code to debug RCU warn from
ath10k_wmi_tlv_parse_peer_stats_info().

Link: https://lore.kernel.org/linux-wireless/7230c9e5-2632-b77e-c4f9-10eca557a5bb@linuxfoundation.org/
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210210212107.40373-1-skhan@linuxfoundation.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/net/wireless/ath/ath10k/wmi-tlv.c