mac80211: fix locking in ieee80211_start_ap error path
authorJohannes Berg <johannes.berg@intel.com>
Mon, 20 Dec 2021 09:22:40 +0000 (10:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Dec 2021 11:26:04 +0000 (12:26 +0100)
commitac61b9c6c0549aaeb98194cf429d93c41bfe5f79
tree38f68d6dc8a869cd7175939cbbafe590dcd98dc2
parent89876d10830db6ac55ae4379764c9e9dd1268277
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>
net/mac80211/cfg.c