Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp2904288pxb; Tue, 24 Aug 2021 10:15:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjCLNOKDrSy1X92jlCJBQtGVfr9juUMkME4oG+OqzMfU471snN0Zvbi8UeEHGNlYX2K643 X-Received: by 2002:a6b:ec0b:: with SMTP id c11mr16729863ioh.207.1629825346303; Tue, 24 Aug 2021 10:15:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629825346; cv=none; d=google.com; s=arc-20160816; b=P2hK7MqzaCUiIxiixYgFIy1p/J6iUtJmdfo4Z88z+fnx84j1iWorwUnRGg3/dlO2Zj e+pJneimeQisy32PDD6ATJwU5L6MCx8WOq7dxXxozIk9raq/zeyssALO0DuOw3d7eTnn tuGJyHsGcWWD6pYb9NlNBUq9WzqWMK34Qt2lRMmrlgppx+YTI7eRcvibA5uhk+bAfv6M gCxr+YWtz0xN1lwJBUYwS6NMKF4LBghcxUY5aogTcB+MGKUtR5oEL6+csVXTp8BpJLuR 7uYoz18YXU0/ASrQmFX18L0BTVXgKbZgXWvkIi9GkjVRk3VI1k7Isrn/eG4xEWpSNyJb XW7A== 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=rujC7lBLtk3IaVsXA/ueHEbaxYS6HCRZ2hP+kH4fWJM=; b=Fl4Q9rNEj1zi9Fwd1trPG8xUDjtFZxwi69ngpatMYDZvYonkN7mN/g+14/CGz191ht y4ykADIg0755lg+2re7bQGq81cjAdFla+8DYGc8NOV3wWn5qUoHCXYlG5aI41xx4q5+e V65ya5+B9HeINcQfjtuGMRdnDTNQwfhqoYYjBSg0oeSOq6sZexGc7216+maBIqoj6/25 DKvLtHjyMAA/mSr/Fm+qM13ucgHbyBQ4Yu4NEzsZcPk7OOppAGpbUK2kqZDEvW4bZK2Q iWKW3i1NwwTPa/y195ywAY8o+NHDHHxCG1IJDfT5DNKjnd2yddcjgF4eN6NxMtkbwTOs 4DQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WYcRJSJc; 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 ay23si12144642iob.33.2021.08.24.10.15.30; Tue, 24 Aug 2021 10:15:46 -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=WYcRJSJc; 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 S239604AbhHXRP2 (ORCPT + 99 others); Tue, 24 Aug 2021 13:15:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:52012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239568AbhHXRMB (ORCPT ); Tue, 24 Aug 2021 13:12:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0DB156135F; Tue, 24 Aug 2021 17:01:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629824472; bh=+5RnqnAUnRU31h0EaVgdGqEgIvz2OpQ65SjDoBFkUBA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WYcRJSJcPmSK8d9FXBL2EgYSU+Mx2In1/f02111jf4XK6/1Br0CefETLXKxwiTKrQ 8E3WyXDzSwup1LJF4KzqdR/QqXlKXFejXbjgM0YSNBEClXDRGj0jbeklc/6ld9MwOL egwujZIdInbONjHQzZjJrPDN7h7+ynYCtqx1D1EUDyZiAd15O5LpoABCiNM5bQfQUN n8ZQjE+26509bDPEoHaGLcJVKirQIsEmBNsZMKTEdvR6taChX28JHnZHsVZGDFmCmu CQByhFjrQ+I65X/vwcQB9X1kghEy6TBiG5hFt6klAJmakwoznv/kCZqIR3WKlSh/2F thdCqGC9g3NOg== 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 5.4 04/61] ath9k: Clear key cache explicitly on disabling hardware Date: Tue, 24 Aug 2021 13:00:09 -0400 Message-Id: <20210824170106.710221-5-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210824170106.710221-1-sashal@kernel.org> References: <20210824170106.710221-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-KernelTest-Patch: http://kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.143-rc1.gz X-KernelTest-Tree: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git X-KernelTest-Branch: linux-5.4.y X-KernelTest-Patches: git://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git X-KernelTest-Version: 5.4.143-rc1 X-KernelTest-Deadline: 2021-08-26T17:01+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 d14e01da3c31..eae7b7e58429 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -896,6 +896,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