]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mac80211: fix prep_connection error path
authorJohannes Berg <johannes.berg@intel.com>
Mon, 18 Mar 2024 16:53:30 +0000 (18:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 May 2024 10:14:38 +0000 (12:14 +0200)
commit6ebdead876c3b2752d022f755df0069df6556ffa
tree19b155206e5f119c64d40d460ff33af08159cc32
parent1160ef9b9090a9f039e20a5c3eea17cc43dc6cfc
wifi: mac80211: fix prep_connection error path

[ Upstream commit 2e6bd24339a6ff04413b2e49c0f2672d6f0edfa5 ]

If prep_channel fails in prep_connection, the code releases
the deflink's chanctx, which is wrong since we may be using
a different link. It's already wrong to even do that always
though, since we might still have the station. Remove it
only if prep_channel succeeded and later updates fail.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240318184907.2780c1f08c3d.I033c9b15483933088f32a2c0789612a33dd33d82@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/mlme.c