wifi: mac80211: check link exists before use
authorJohannes Berg <johannes.berg@intel.com>
Fri, 1 Mar 2024 18:36:33 +0000 (19:36 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 4 Mar 2024 13:24:15 +0000 (14:24 +0100)
commit2a705bc314961e9b3eb8561645b7704ff278f032
treeef4a776ff8c78060982e665d76fc8dadc634b1b0
parent01ad6b7be1d259cdf638eaed5c1b122d043f82bd
wifi: mac80211: check link exists before use

If the assoc link doesn't exist yet at this point, we
cannot use it yet. This isn't normally the case, but
e.g. in case of FT-DS (or just broken userspace) the
link might not be set up yet and will only be created
later in this function. Check that the link exists.

Fixes: 310c8387c638 ("wifi: mac80211: clean up connection process")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/3151f5d0-c18f-413d-b34b-b94f095b947c@moroto.mountain
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240301193633.c886d300e90a.Ie1d5e23b2a033d934d343c37249f6f4dfddcc5fe@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c