Re: [PATCH v2] ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()
From: Kalle Valo
Date: Thu Feb 11 2021 - 13:29:47 EST
Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx> wrote:
> 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@xxxxxxxxxxxxxxxxxxx/
> Signed-off-by: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Kalle Valo <kvalo@xxxxxxxxxxxxxx>
Patch applied to ath-next branch of ath.git, thanks.
09078368d516 ath10k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr()
--
https://patchwork.kernel.org/project/linux-wireless/patch/20210210212107.40373-1-skhan@xxxxxxxxxxxxxxxxxxx/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches