From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8B66C433EF for ; Mon, 20 Sep 2021 16:55:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B219C6139E for ; Mon, 20 Sep 2021 16:55:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244474AbhITQ5Q (ORCPT ); Mon, 20 Sep 2021 12:57:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:39768 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244672AbhITQyD (ORCPT ); Mon, 20 Sep 2021 12:54:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8227E61371; Mon, 20 Sep 2021 16:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156624; bh=C4mfR34Kt8+8pPBTORIUmL3kQkS3THVY86RLORmnMTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vhzG8Urky3W0blV/0dI0ZBBttU0Z6p4iewD2mluHJLZykI8yhAhNi6aRVq9EzJGAV fIdobPBReQ/1lQpfaI2W3x9ptS4lsmfYMPx2moglgQponGFAiaiLd4pqf3oJx5ws3z 8WDLT6oGi4Ah+tKru8a6pUw03cTwS+aTN0r9bPVM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jouni Malinen , Kalle Valo Subject: [PATCH 4.9 011/175] ath9k: Clear key cache explicitly on disabling hardware Date: Mon, 20 Sep 2021 18:41:00 +0200 Message-Id: <20210920163918.438147356@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163918.068823680@linuxfoundation.org> References: <20210920163918.068823680@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jouni Malinen 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20201214172118.18100-3-jouni@codeaurora.org Signed-off-by: Greg Kroah-Hartman --- 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;