From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 098322248BE for ; Fri, 23 Jan 2026 17:26:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769189181; cv=none; b=grXKMsAWP3G8mxtYRANQnpTPRxVkkOTmTxTy4j6Xq0rAVVun3Qb4LohKQNNEDz1Bt7wDzPKFUlIKGmYc8RrvJpjdX7jQTkFOoSn2+BvJ2eqeiHeE71BAhfCWQYRjGclgbfHJkUOs5YNZAAjdbZgibi6Wp4N3HkEQghIyBiSeQx8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769189181; c=relaxed/simple; bh=eHk+vPthyUGqFVXs3XaT+4XSUiPADjJMf5aAkIcb648=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=kAQRuyPljBQJmzyjVntIgLWQR49msO1fuQra2oCHH8XN8zyfTtGxmnwS3/rINT4L66shLMtadgtiAo2IaFrur3fJIZuKdJj5Ww3OZcbj9xFitlYrgeWepKKZcbCsRvJkJh10wxbksHMSxQhcAL1FMBsV+owcEqtnkLCBws6aKZE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=VqspBZsd; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Mwg7ANrG; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="VqspBZsd"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Mwg7ANrG" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60N9luSH722392 for ; Fri, 23 Jan 2026 17:26:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= g/E+2t1fdfEDSCOIA22/v+4jziQGVAuaEcc3NXgiKYQ=; b=VqspBZsd+V9CJ2kI NdOpx/du69Oxk+ab38K9IkVYiftPD9JCp7uh/Bn00h8WxmYg93ucSTopA6H796xb QhsnJSfQDsPxu8QcAuoMnxsFDNSLzzrHmWhbPmNUJfBfSV3+01mx9bBEhmSRsLR9 N5/YRBZoLNrnzBe07Vpkw61fVBVrIDzbuI00qE6rQGl9Ad8g2FWtnWyZwUZjJH+X vDC6W59GJEuhoXv++EkuSipXTViFbsGEuvaQpeCf3wJc/qMTx/kRtRA+NOwm9FHQ isAw91QpcXXhF9UttqqxDFw3pqBJpJw5gAOhfaDd/8HB9rDoQ7r7Rn+xgP9rtdZx L93txQ== Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bv069jybh-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Jan 2026 17:26:18 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-2b6b9c1249fso4336851eec.1 for ; Fri, 23 Jan 2026 09:26:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769189178; x=1769793978; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=g/E+2t1fdfEDSCOIA22/v+4jziQGVAuaEcc3NXgiKYQ=; b=Mwg7ANrG0R41LmBsbu1h9GG+g2My6Xzn9dAC1Pd/VcmNG5J1/wYsHSGNaB++b61LND m06q8z9rmD5OVZy6jt4noNnsd3cePp/rbGrzTXOoKOc7P+yp2tCDIXy3KrFsoSrPcqu/ 1vhivNtlp5NVcea+f7Su8/RNs/eCbNiIfy4rNfhok7hmix0sjDkWBMjQP16RE4Ry30UL 6uIQp31qI64DH7WHYUuPNFJLxfbUkVidSr1iPGerMhnCKwEGT4r6xSUdtNPPduTlS0E1 38DBlqJzUvVepahzRB8lzit6jtNhNrg5zrTLDINVc8/okiFtyalEJTTiO0oon8eDGqvU 3lJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769189178; x=1769793978; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g/E+2t1fdfEDSCOIA22/v+4jziQGVAuaEcc3NXgiKYQ=; b=guTknLMPBocLVorq6AhxdINT14jZnI2qqEo+KqM5tsTf8D1jisB40IkT41os5uph6X jGxhrnhO/HUfkF6rk7x1AZtfzq1YSL1K5+QkOH+PVJS7mt0mnxc6kxlZXu1e/GFcuhXC WIdpOmhCrkTFre501nMLncz0dbpfZhOYCFom7TqNoqr8zmZAoQ379+Ea75aFB/4/KE22 3lhIC2yP973RTjFD2whWEx0VBfQl0/JmyU/f+aJCrQdmFdkNgnnJQ5J2hHeUuk0l5MK5 xzRjeyk1OdMMO0xkQmXdZIcvu0xfl9RDABqOzKC8KhNtx/R8pbY5oSsXW54aKrFOwC0K zKNg== X-Forwarded-Encrypted: i=1; AJvYcCU8NTKs5YqkHCG26O+w3hXzuhWiXMk9hi1u9T7FicOaXioCLMaoHsoiqB13CwZohKUiX3nv0oHAYKo/45o=@vger.kernel.org X-Gm-Message-State: AOJu0YwD6P26BWMHT6ctv8tfCginbxykwjpGAK/8H5fUBEuplPpdmw8G Uv/hiCwQOv6M0F5PnFHSf5yhJxEUph4OtQP49G34GQVyhA5ImR2926n6UNT3ljYw/RlsKNEGEat YnOyM0hBrJuY8dLqW61rMX3tNTdHilFGnXb8ylCoJy8oMQDSvBO5m0uyecoLPBscdd1Q= X-Gm-Gg: AZuq6aJJK54ety4pOJp/2qU1HCBPOClPYI9QiL8NpuY3q5IopXY3oHivKv7OU0P8Ivu Tg1oYfAQaKLJOecYwS9hHpkmJfeGIPVvhB4uIDZkSaQcUrWTpCdQXe7Ag4BiZkNpxuV6L329cjm SsMA2co5AcGO9ygeE3dYDOLCmhewhgRMc6jtxcJe+C/qsvuMd0A1PCtI/AifVUsNNeNTi8TFPol fbzP6IkpldIqEHMBrF1XSTfDSkBUELObP6odkYCnOJ9YSZ9SWTdinb5VBoqoNvYR7u3PoeJfW75 FhkpqVVC5IQHv/I4QyCw0vHkbbwNWUqwzhb2RSRxtZq6BOFpZoMIsasymWyqEQ+6J1aVUC1q7UX 6b7z49S/sgrsUie7Zj+1636ycgsj7Bd5x4TzvxGyemeLT2mmiAaZYSu0Y6O1m0CcW3T61QoEGe+ CA X-Received: by 2002:a05:7301:4e0b:b0:2a4:3593:c7c5 with SMTP id 5a478bee46e88-2b73995a3abmr1580054eec.5.1769189177611; Fri, 23 Jan 2026 09:26:17 -0800 (PST) X-Received: by 2002:a05:7301:4e0b:b0:2a4:3593:c7c5 with SMTP id 5a478bee46e88-2b73995a3abmr1580039eec.5.1769189177089; Fri, 23 Jan 2026 09:26:17 -0800 (PST) Received: from [192.168.1.3] (c-24-130-122-79.hsd1.ca.comcast.net. [24.130.122.79]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b73a6f5d2asm3809805eec.14.2026.01.23.09.26.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Jan 2026 09:26:16 -0800 (PST) Message-ID: Date: Fri, 23 Jan 2026 09:26:15 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] wifi: ath10k: fix lock protection in ath10k_wmi_event_peer_sta_ps_state_chg() To: Ziyi Guo , Jeff Johnson Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260123160244.262225-1-n7l8m4@u.northwestern.edu> From: Jeff Johnson Content-Language: en-US In-Reply-To: <20260123160244.262225-1-n7l8m4@u.northwestern.edu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Authority-Analysis: v=2.4 cv=eLUeTXp1 c=1 sm=1 tr=0 ts=6973af3a cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=Tg7Z00WN3eLgNEO9NLUKUQ==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=0sZ0xnW9vVDrYtnK7kcA:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-GUID: wXKlJRO1OVI7ETSDYpEyYmtpEKIFaW7I X-Proofpoint-ORIG-GUID: wXKlJRO1OVI7ETSDYpEyYmtpEKIFaW7I X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTIzMDEzMSBTYWx0ZWRfXwYwokbS8Ic1u AKe4hERinwr3HLpOyiXfIKG8wswLnyM+KjmhD9mi55FTMRdxTZdiB4URs8sw+iz6SPvwREY+wzL UXcTWiNTb3LytfBHpMq7ILW5KF+o6gg8qvt8DVu2OFBLEegCdI5LvtbnNTazy/CzY4T2x+aOc1T RuSygGL0gxtXD2Yco84TFicgwqIGOU+Tq66YeSE/yW4uFk25ZAEbFhF1LQYQ3iAbxRA4Flrnvcm HRxnpz/34j3ROJRM5Cu6bzg+AmxUrSw5IXfHZK7hjUv9+wFEcA0+x2cIRKffN+GC83mR/A0Dgj6 Yyn90qcr3Wqs00fpo0if3XpM+iVlagm6jQk9U1GsCWPwBGdm7eXCX+ipHe9fTW7nnnoCF9tF6jh PyV+WaU1TDhjcL9vDmXv8EMDahI6R7fXbTMZuI3txC+V0DIgAusNX4CwvLUir83n1ZltRDxU7FM j5yqx268j6eJ0FDxp7w== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.20,FMLib:17.12.100.49 definitions=2026-01-23_02,2026-01-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 adultscore=0 impostorscore=0 clxscore=1015 phishscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601230131 On 1/23/2026 8:02 AM, Ziyi Guo wrote: > 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/ath/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) > } > > arsta = (struct ath10k_sta *)sta->drv_priv; > + spin_lock_bh(&ar->data_lock); > arsta->peer_ps_state = __le32_to_cpu(ev->peer_ps_state); > + spin_unlock_bh(&ar->data_lock); > > exit: > rcu_read_unlock(); this solution is inconsistent with the lockdep_assert_held(). either the locking should be done by the callers or the lockdep_assert_held() should be removed in conjunction with the new locking you are adding. /jeff