wifi: mac80211: Fix sparse warning for monitor_sdata

commit 861d0445e72e9e33797f2ceef882c74decb16a87 upstream.

Use rcu_access_pointer() to avoid sparse warning in
drv_remove_interface().

Signed-off-by: Alexander Wetzel <Alexander@wetzel-home.de>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202502130534.bVrZZBK0-lkp@intel.com/
Fixes: 646262c71aca ("wifi: mac80211: remove debugfs dir for virtual monitor")
Link: https://patch.msgid.link/20250213214330.6113-1-Alexander@wetzel-home.de
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Wetzel 2025-02-13 22:43:30 +01:00 committed by Greg Kroah-Hartman
parent 96fa260829
commit 86f327305e

View File

@ -120,7 +120,7 @@ void drv_remove_interface(struct ieee80211_local *local,
* The virtual monitor interface doesn't get a debugfs
* entry, so it's exempt here.
*/
if (sdata != local->monitor_sdata)
if (sdata != rcu_access_pointer(local->monitor_sdata))
ieee80211_debugfs_recreate_netdev(sdata,
sdata->vif.valid_links);