From nobody Mon Feb 9 13:08:15 2026 Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90D3024A07C for ; Fri, 23 Jan 2026 16:02:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184172; cv=none; b=iB/Jd3swsA8dgscCCeFMEGKcO3/GO3U+akK1QuUEudqfl4Gh7y+w/3MjK4TTKWwlVblri933ySha7bPwm2Zyf5YPPy1ZxzIRdqofV8v5BNP0ZmDHFO4CBiRVXXeo4ED7G+PVDhRBTj0zevu64/wSas2IzZN5M8y92auHO8iX+Fc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769184172; c=relaxed/simple; bh=xc24npT9rAHBSGHPDys4wEQkoai7oXSDgskM7kxJjxw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=dhXfGXRECvn2BTr28ruwYzvjSyZ5bgFwr4WBK6DJ9y76Aw+/sHdIo0eace+tospCAqb9QYK1remqROpI5SM+HRQGwcBTm70petfWLdwEOFMqQ063LQFNxvIGO0LAWtubpaBRH5+iGPoeRc71Jf42auLybnChbl5XQaHcfuLRrts= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu; spf=pass smtp.mailfrom=u.northwestern.edu; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b=LwFdyqjp; arc=none smtp.client-ip=209.85.167.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=u.northwestern.edu Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=u-northwestern-edu.20230601.gappssmtp.com header.i=@u-northwestern-edu.20230601.gappssmtp.com header.b="LwFdyqjp" Received: by mail-oi1-f180.google.com with SMTP id 5614622812f47-45c83c49213so1781849b6e.3 for ; Fri, 23 Jan 2026 08:02:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u-northwestern-edu.20230601.gappssmtp.com; s=20230601; t=1769184168; x=1769788968; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=3tVMdOq+RRmPd7zkB4BscKVMh/SgbBpBunr6VSji3Qs=; b=LwFdyqjpqKiZ6HA1qrycgQMHxz/vIR0FFtcw+f/b7stCAhFjBfAId6jhZ+IW/DlMIe naCxd50+pSHi+EggAWWm0Hl+EZW6dpu1+T0DTyM4lN4nCak8yDfTXBu2PQkRmTlEru2y tqiYO3iYscmx4KCpYAhfdUEg/yi8Ro6Jei9sc+B2PI2z7FMKwwkU9jRso8kwIUn8q70L njFC85ZgLqBDfBXvTshBZNqgitz5zrvz1IlOBlhvAQyoG9lWdJykB9Ur9wQ4Cg/FvDgw tXqBb3xYru0yVESYLfcnEJmbfbLy1cEf8idcwfN9nQWAShO5Pzdci9dfn6RbyeRi0aXm xUHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769184168; x=1769788968; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3tVMdOq+RRmPd7zkB4BscKVMh/SgbBpBunr6VSji3Qs=; b=Dc0dPErDhwTvLgPIRIKIjeVXOkYpMPqN0YPhTMCoDbT1ctvQMX/VodMWa4WKS0NINO hbp1X/npEQpmeHb5Fm8AZ5Vz7g8z+FnojuooEWJqGXq6GeSU43STwoLWpIgsmKxKU3Cj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TP id 5614622812f47-45eb1ec9619mr1597955b6e.67.1769184168229; Fri, 23 Jan 2026 08:02:48 -0800 (PST) Received: from security.cs.northwestern.edu (security.cs.northwestern.edu. [165.124.184.136]) by smtp.gmail.com with ESMTPSA id 5614622812f47-45eb42530e9sm1485317b6e.16.2026.01.23.08.02.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jan 2026 08:02:47 -0800 (PST) From: Ziyi Guo To: Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, linux-kernel@vger.kernel.org, Ziyi Guo Subject: [PATCH] wifi: ath10k: fix lock protection in ath10k_wmi_event_peer_sta_ps_state_chg() Date: Fri, 23 Jan 2026 16:02:44 +0000 Message-Id: <20260123160244.262225-1-n7l8m4@u.northwestern.edu> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ath10k_wmi_event_peer_sta_ps_state_chg() uses lockdep_assert_held() to assert that ar->data_lock should be held by the caller, but neither ath10k_wmi_10_2_op_rx() nor ath10k_wmi_10_4_op_rx() acquire this lock before calling this function. The field arsta->peer_ps_state is documented as protected by ar->data_lock in core.h, and other accessors (ath10k_peer_ps_state_disable, ath10k_dbg_sta_read_peer_ps_state) properly acquire this lock. Add spin_lock_bh()/spin_unlock_bh() around the peer_ps_state update, following the pattern used by other WMI event handlers in the driver. Signed-off-by: Ziyi Guo --- drivers/net/wireless/ath/ath10k/wmi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/a= th/ath10k/wmi.c index b4aad6604d6d..40259504927c 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5305,7 +5305,9 @@ ath10k_wmi_event_peer_sta_ps_state_chg(struct ath10k = *ar, struct sk_buff *skb) } =20 arsta =3D (struct ath10k_sta *)sta->drv_priv; + spin_lock_bh(&ar->data_lock); arsta->peer_ps_state =3D __le32_to_cpu(ev->peer_ps_state); + spin_unlock_bh(&ar->data_lock); =20 exit: rcu_read_unlock(); --=20 2.34.1