projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
643952f
)
wifi: mac80211: fix potential deadlock in ieee80211_key_link()
author
Sun Ke
<sunke32@huawei.com>
Sat, 27 Aug 2022 02:24:52 +0000
(10:24 +0800)
committer
Johannes Berg
<johannes.berg@intel.com>
Mon, 29 Aug 2022 09:48:59 +0000
(11:48 +0200)
Add the missing unlock before return in the error handling case.
Fixes: ccdde7c74ffd ("wifi: mac80211: properly implement MLO key handling")
Signed-off-by: Sun Ke <sunke32@huawei.com>
Link:
https://lore.kernel.org/r/20220827022452.823381-1-sunke32@huawei.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/key.c
patch
|
blob
|
history
diff --git
a/net/mac80211/key.c
b/net/mac80211/key.c
index 86aac87e0211f98fae2ed38cdb4bfe426e63cc1e..d89ec93b243bafec0d24de428d49f934ba4ae04f 100644
(file)
--- a/
net/mac80211/key.c
+++ b/
net/mac80211/key.c
@@
-865,8
+865,10
@@
int ieee80211_key_link(struct ieee80211_key *key,
if (link_id >= 0) {
link_sta = rcu_dereference_protected(sta->link[link_id],
lockdep_is_held(&sta->local->sta_mtx));
- if (!link_sta)
- return -ENOLINK;
+ if (!link_sta) {
+ ret = -ENOLINK;
+ goto out;
+ }
}
old_key = key_mtx_dereference(sdata->local, link_sta->gtk[idx]);