Skip to content

Commit e911a81

Browse files
committed
wifi: mac80211: lock wiphy for aggregation debugfs
To change aggregation status may call into the driver, lock the wiphy for this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 0ab6cba commit e911a81

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/mac80211/debugfs_sta.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Copyright 2007 Johannes Berg <johannes@sipsolutions.net>
66
* Copyright 2013-2014 Intel Mobile Communications GmbH
77
* Copyright(c) 2016 Intel Deutschland GmbH
8-
* Copyright (C) 2018 - 2022 Intel Corporation
8+
* Copyright (C) 2018 - 2023 Intel Corporation
99
*/
1010

1111
#include <linux/debugfs.h>
@@ -420,6 +420,7 @@ static ssize_t sta_agg_status_write(struct file *file, const char __user *userbu
420420
if (ret || tid >= IEEE80211_NUM_TIDS)
421421
return -EINVAL;
422422

423+
wiphy_lock(sta->local->hw.wiphy);
423424
if (tx) {
424425
if (start)
425426
ret = ieee80211_start_tx_ba_session(&sta->sta, tid,
@@ -431,6 +432,7 @@ static ssize_t sta_agg_status_write(struct file *file, const char __user *userbu
431432
3, true);
432433
ret = 0;
433434
}
435+
wiphy_unlock(sta->local->hw.wiphy);
434436

435437
return ret ?: count;
436438
}

0 commit comments

Comments
 (0)