Skip to content

Commit c1d1ec4

Browse files
jmberg-intelgregkh
authored andcommitted
mac80211: fix locking in ieee80211_start_ap error path
commit 87a2706 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: 295b02c ("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>
1 parent a2c144d commit c1d1ec4

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

net/mac80211/cfg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,10 @@ static int ieee80211_start_ap(struct wiphy *wiphy, struct net_device *dev,
12261226
return 0;
12271227

12281228
error:
1229+
mutex_lock(&local->mtx);
12291230
ieee80211_vif_release_channel(sdata);
1231+
mutex_unlock(&local->mtx);
1232+
12301233
return err;
12311234
}
12321235

0 commit comments

Comments
 (0)