Thread (181 messages) 181 messages, 5 authors, 2021-09-21
STALE1832d

[PATCH 4.9 011/175] ath9k: Clear key cache explicitly on disabling hardware

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-09-20 16:55:52
Also in: lkml

From: Jouni Malinen <redacted>

commit 73488cb2fa3bb1ef9f6cf0d757f76958bd4deaca upstream.

Now that ath/key.c may not be explicitly clearing keys from the key
cache, clear all key cache entries when disabling hardware to make sure
no keys are left behind beyond this point.

Signed-off-by: Jouni Malinen <redacted>
Signed-off-by: Kalle Valo <redacted>
Link: https://lore.kernel.org/r/20201214172118.18100-3-jouni@codeaurora.org (local)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/ath/ath9k/main.c |    5 +++++
 1 file changed, 5 insertions(+)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -894,6 +894,11 @@ static void ath9k_stop(struct ieee80211_
 
 	spin_unlock_bh(&sc->sc_pcu_lock);
 
+	/* Clear key cache entries explicitly to get rid of any potentially
+	 * remaining keys.
+	 */
+	ath9k_cmn_init_crypto(sc->sc_ah);
+
 	ath9k_ps_restore(sc);
 
 	sc->ps_idle = prev_idle;

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help