[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3949e1fc-c050-73e0-d02f-63a25c4821ef@nbd.name>
Date: Fri, 12 Feb 2021 06:36:26 +0100
From: Felix Fietkau <nbd@....name>
To: Shuah Khan <skhan@...uxfoundation.org>,
lorenzo.bianconi83@...il.com, ryder.lee@...iatek.com,
kvalo@...eaurora.org, davem@...emloft.net, kuba@...nel.org,
matthias.bgg@...il.com
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mt76: hold RCU lock when calling
ieee80211_find_sta_by_ifaddr()
On 2021-02-12 03:13, Shuah Khan 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 mt76_check_sta() to hold RCU read 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() and a subsequent manual audit
> of other callers of ieee80211_find_sta_by_ifaddr() that don't hold
> RCU read lock.
>
> Signed-off-by: Shuah Khan <skhan@...uxfoundation.org>
If I'm not mistaken, this patch is unnecessary. mt76_check_sta is only
called from mt76_rx_poll_complete, which itself is only called under RCU
lock.
- Felix
Powered by blists - more mailing lists