Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2917789pxb; Tue, 24 Aug 2021 10:33:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyJJcniYnGFn0PFCWd/Z7hOLLy+Zhl8ZpRguRY0kEDyLzIiYe1uRCuea3VCcixzwMhg9c3/ X-Received: by 2002:a6b:d915:: with SMTP id r21mr20390707ioc.76.1629826413486; Tue, 24 Aug 2021 10:33:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629826413; cv=none; d=google.com; s=arc-20160816; b=XuniaiAasTgCYq2Jk8o54Tf/C9WswxGLh7Al/psg/Zc7dr/juf5gknZVHl/swpVv46 zQyOVWzGVADkALYEdUtzftPIqLJeDU/FOOeBC+6EWIRPhRgW8luwOT1DuRP0zmfEod9X oOUNJxyl+SjmEfmJXeca7AtLzaA3LmBRQiv9VNr44a/EQ4wAegSn04PtmgXleLoSunPZ WXPqeB2/Ho6TnPbvhMxtQhSo7UTeqHmFXW43R0GeLCm4nZk13vjuKDjylP3wnMUP3kF3 XMFvFqgS57zUaBI1US6lwKIfOvH8+IF9chMyFWst3B/ARglSV7lymlQY+yWPzPwHVLit PvtA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pMWyRtEgGIPdm1ECjeyZdjVSRljoGwqJQV2+TpyeW8o=; b=NDovmVnPzoXRRiuWVTjMKSzRBneg3UHoF4boskE3H06agqn4xcEBWHaAVlIgdkqXjP QGpHfxCqZFtfoePTTWHp18jRWtdIrWqNcyGoY4qMwOirkeV4C5TnMDJym9dyTQ5lV+S7 l/g4mrkhe928Scj/S31MvrHgBaOCy7esEzoA8L+zuEVayw2TZ/vZpg0rC5R/lgh5YUXv aH+LOo2R8kl/7ubg9HBPzg2GV2TR7/A3D7ugmNfH8kV6VarD//LEf0m7TejlF8WWcBp7 pBf/ApEqjGWfoDLjetvwNoat2vH8TvjHq3qjZabsCWggP8uX8RSywBXsSR2E6WhU3qRM ImEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oEsI6ctx; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si19658650ion.51.2021.08.24.10.33.17; Tue, 24 Aug 2021 10:33:33 -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=@kernel.org header.s=k20201202 header.b=oEsI6ctx; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240631AbhHXRch (ORCPT + 99 others); Tue, 24 Aug 2021 13:32:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:34888 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241690AbhHXR3o (ORCPT ); Tue, 24 Aug 2021 13:29:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C446E613B1; Tue, 24 Aug 2021 17:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824732; bh=vMhrW8544lf9t2697q+YrycaAbTA7qviK/k05MMRudg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oEsI6ctxenSOPSSIXiMs9PS6Q5ypUP412YmWZ+8BNubDeJ3BvryUlrFHF1l/bd7vh FQ7oZsVAfFQTRiv9TYk94W6Z5iQMEbIXYYVJtaNB+a4K44U2NER6UdeIV60A6FPiE+ 0FwCyiaDn8gcnO6HXXEDRip1UwFoBZOegBYDRYdh3xWWxzmo35/TqGXkyjJhdygvz7 TaspZaFxbYRbBxr9LMtwxoxv19a7Sc0XLYnpOyc3XEOXpjUY+tdi2gPw3k8Wfm0vKf WOu1NAF7hNjtxFyq97BdO/YTUUM4ShMI4gPkxQMAi+gv2Kb5GmEDZ+ksN3k+ogf+77 RlcxbDrc58RJA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jouni Malinen , Kalle Valo , =?UTF-8?q?Pali=20Roh=C3=A1r?= , Greg Kroah-Hartman Subject: [PATCH 4.14 35/64] ath9k: Clear key cache explicitly on disabling hardware Date: Tue, 24 Aug 2021 13:04:28 -0400 Message-Id: <20210824170457.710623-36-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824170457.710623-1-sashal@kernel.org> References: <20210824170457.710623-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.245-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-4.14.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 4.14.245-rc1 X-KernelTest-Deadline: 2021-08-26T17:04+00:00 X-stable: review X-Patchwork-Hint: Ignore 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 Cc: Pali Rohár Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath9k/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index a678dd8035f3..63081b445f45 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -895,6 +895,11 @@ static void ath9k_stop(struct ieee80211_hw *hw) 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; -- 2.30.2