diff options
author | Johannes Berg <johannes.berg@intel.com> | 2021-12-20 10:22:40 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-29 12:28:58 +0100 |
commit | c1d1ec4db5f7264cfc21993e59e8f2dcecf4b44f (patch) | |
tree | cbcd321c8b9f05680e6e4ee07176510eb617206e /net/mac80211 | |
parent | a2c144d17623984fdafa4634ecf4ab64580d29bb (diff) | |
download | linux-stable-c1d1ec4db5f7264cfc21993e59e8f2dcecf4b44f.tar.gz linux-stable-c1d1ec4db5f7264cfc21993e59e8f2dcecf4b44f.tar.bz2 linux-stable-c1d1ec4db5f7264cfc21993e59e8f2dcecf4b44f.zip |
mac80211: fix locking in ieee80211_start_ap error path
commit 87a270625a89fc841f1a7e21aae6176543d8385c upstream.
We need to hold the local->mtx to release the channel context,
as even encoded by the lockdep_assert_held() there. Fix it.
Cc: stable@vger.kernel.org
Fixes: 295b02c4be74 ("mac80211: Add FILS discovery support")
Reported-and-tested-by: syzbot+11c342e5e30e9539cabd@syzkaller.appspotmail.com
Link: https://lore.kernel.org/r/20211220090836.cee3d59a1915.I36bba9b79dc2ff4d57c3c7aa30dff9a003fe8c5c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/cfg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d3f62fd12f0b..1bf83b8d8402 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1226,7 +1226,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev, return 0; error: + mutex_lock(&local->mtx); ieee80211_vif_release_channel(sdata); + mutex_unlock(&local->mtx); + return err; } |