Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp2319111pxb; Mon, 20 Sep 2021 18:41:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9eEcuIkSLWa2asaIhygm6LQ1Y/YxNGL/h2c/TXPmdJ/hBhXKe3JusdHljdejOfNxOFv0S X-Received: by 2002:a05:6e02:2194:: with SMTP id j20mr18283750ila.268.1632188518548; Mon, 20 Sep 2021 18:41:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632188518; cv=none; d=google.com; s=arc-20160816; b=XDet+P5hmeJoFHVZc/5xHpxYh92o2XzbntcLsqyuAKDoIcc7HRhiIv241nCCGTqC+T vwwj2Pd6PEqeCcb6S7RBktxqXvOE03Q28LXSaxuyAM07JCNzvSotD43gX2vGXGSPjVUk Fv0GRzpN1efnjrYpUGfAq5qXBARfZkd91b+u4sNJZmWNPC1Zxrz7VtRoiK5FO+zXvm9c uT7dqDiQN1TaZg4tzRVfQURbP9JL7fFKTpxFY6s3vkCyXbEcOeue34iKK1KlNCpemHua 0Cg8khP/o8tQOefHmi08ZAgUEKt6b9B+vDaRkomUG4k34rbk8HCVKdSFhjhmbKFYuc9/ VQBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=daymNb1dyoPoHA7fPRg006wTF28F/l/bW9UilPcG5QA=; b=J8fYURgq9NL9FQSX1tvgna5ppjU6CBOl1G7TTfbsQs03oNlVCln5LqvIkr7Q+8Xk5T xh6AQbMmnQXscD2R5kX3S/vlOd46X9xgagB48IpK+XID0H9qEGouUfJvbOGoMSk2JGxK /8Fsh1fBkK80Oc0Fpz7x0DKiq4hXu0k17UI8+o+5xhkZy4qrxnh1fRTVw+PGVo2o3LBm 2zbawlJsS1onSQXP9VxhAindfWF5umCd9ce6gr6kkSvspNxYsH8gCK8Zr3tVYoYwSF3b ZhsM2uFWwgeqz8USEob7oEVH4XGg9G4jHVLXxz14HhYuOi6ABQ+Kg2EakCT1e4keU7zR w22g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=o22W7Gvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c1si14777607ilo.83.2021.09.20.18.41.47; Mon, 20 Sep 2021 18:41:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=o22W7Gvp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243632AbhITQsC (ORCPT + 99 others); Mon, 20 Sep 2021 12:48:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbhITQrf (ORCPT ); Mon, 20 Sep 2021 12:47:35 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 059FC6124A; Mon, 20 Sep 2021 16:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632156367; bh=2jJz1KLIvvL3Bgi0Ak3ad2MPjouSKyBs23J1FA16MlU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o22W7GvpNJ6fA0hCFgE2EdGhlClaau5DS+hkojBIe5Pyzw2XFnvM0KiSHyAfa6MW2 wE66d5qPAtYJHVBDaMMqTYVPK/aRxeUfsP+h5RAylPfJPm7kBj22/+35fAymeYock4 /r/JgA1WjprTyDt0UxpBOqpnyUxzXhXtsMf+ImcI= 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.4 009/133] ath9k: Clear key cache explicitly on disabling hardware Date: Mon, 20 Sep 2021 18:41:27 +0200 Message-Id: <20210920163912.907746005@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210920163912.603434365@linuxfoundation.org> References: <20210920163912.603434365@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 @@ -890,6 +890,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;