]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: mac80211_hwsim: disable BHs for hwsim_radio_lock
authorBenjamin Berg <benjamin.berg@intel.com>
Wed, 7 Jan 2026 13:38:05 +0000 (14:38 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Jan 2026 12:33:10 +0000 (13:33 +0100)
The hwsim_radio_lock spinlock expects bottom-half to be disabled, fix
the call in mac80211_hwsim_nan_stop to ensure BHs are disabled.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20260107143805.ce7406511608.I688f8b19346e94c1f8de0cdadde072054d4b861c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/virtual/mac80211_hwsim.c

index 92427f5272865b4a319503b0d26a856fb0adb597..79cc63272134d41855d1a0e2e29b3fbeecd01f73 100644 (file)
@@ -4112,14 +4112,14 @@ static int mac80211_hwsim_stop_nan(struct ieee80211_hw *hw,
        hrtimer_cancel(&data->nan_timer);
        data->nan_device_vif = NULL;
 
-       spin_lock(&hwsim_radio_lock);
+       spin_lock_bh(&hwsim_radio_lock);
        list_for_each_entry(data2, &hwsim_radios, list) {
                if (data2->nan_device_vif) {
                        nan_cluster_running = true;
                        break;
                }
        }
-       spin_unlock(&hwsim_radio_lock);
+       spin_unlock_bh(&hwsim_radio_lock);
 
        if (!nan_cluster_running)
                memset(hwsim_nan_cluster_id, 0, ETH_ALEN);