diff options
author | Johannes Berg <johannes.berg@intel.com> | 2024-02-29 15:38:03 +0100 |
---|---|---|
committer | iwlwifi publisher <> | 2024-04-17 13:01:53 +0000 |
commit | 2f215c0b40190943dccade24955a5972acc083fb (patch) | |
tree | 163332c1f9c1ae1e80e616d9d1801eaf8bf4126d | |
parent | 404601db7f99afcc88b9a51ecb768b9432cc3a54 (diff) | |
download | backport-iwlwifi-2f215c0b40190943dccade24955a5972acc083fb.tar.gz |
[BUGFIX] 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.
type=bugfix
fixes=I3e61f4cfe9da89008e1854160093c76a1e69dc2a
ticket=none
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
Change-Id: Ie1d5e23b2a033d934d343c37249f6f4dfddcc5fe
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-on: https://gerritwcs.ir.intel.com/c/iwlwifi-stack-dev/+/96915
automatic-review: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Tested-by: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
tested: iil_jenkins iil_jenkins <EC.GER.UNIX.IIL.JENKINS@INTEL.COM>
Reviewed-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
x-iwlwifi-stack-dev: 77cf7d331fb4158de94f46323f5582c9a443340a
-rw-r--r-- | net/mac80211/mlme.c | 2 | ||||
-rw-r--r-- | versions | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f9b0049f7b..5f4eea53c5 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -8244,7 +8244,7 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, eth_random_addr(assoc_data->link[i].addr); sband = local->hw.wiphy->bands[link_cbss->channel->band]; - if (match_auth && i == assoc_link_id) + if (match_auth && i == assoc_link_id && link) assoc_data->link[i].conn = link->u.mgd.conn; else assoc_data->link[i].conn = @@ -2,4 +2,4 @@ BACKPORTS_VERSION="(see git)" BACKPORTED_KERNEL_VERSION="(see git)" BACKPORTED_KERNEL_NAME="iwlwifi" BACKPORTS_BUILD_TSTAMP=__DATE__ \" \" __TIME__ -BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11960:70e29adc" +BACKPORTS_GIT_TRACKED="iwlwifi-stack-public:master:11961:77cf7d33" |