Revert "wifi: mac80211: fix potential key use-after-free"
This reverts commit e5e07ee6ec
.
This commit is contained in:
parent
f172b138b7
commit
bfa37c9cf0
2 changed files with 1 additions and 4 deletions
|
@ -509,9 +509,6 @@ static int ieee80211_add_key(struct wiphy *wiphy, struct net_device *dev,
|
|||
sta->cipher_scheme = cs;
|
||||
|
||||
err = ieee80211_key_link(key, sdata, sta);
|
||||
/* KRACK protection, shouldn't happen but just silently accept key */
|
||||
if (err == -EALREADY)
|
||||
err = 0;
|
||||
|
||||
out_unlock:
|
||||
mutex_unlock(&local->sta_mtx);
|
||||
|
|
|
@ -843,7 +843,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
|
|||
*/
|
||||
if (ieee80211_key_identical(sdata, old_key, key)) {
|
||||
ieee80211_key_free_unused(key);
|
||||
ret = -EALREADY;
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue