From nobody Mon Feb 9 19:05:23 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 CE56538F938 for ; Tue, 3 Feb 2026 06:55:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770101717; cv=none; b=sZbHlzIAMFSku5SgWIOUzYW0mTjN0uf2cIWVIQAXCalPBUqi4E0kYSWuvJVEvJkbV24t+mAVuWZuqBJi3hn0FezBbEusNHQzIT1rRHIribXoVA1TTuyo52YlJp3SivNhoe+CkegnADUAohWQO01rabk3FPHXJf/cSsCgSFPsyGk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770101717; c=relaxed/simple; bh=lxSYBQP96mlT5aJJCUIduL+qGCMMryWk8oKPo1JcZnI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=PKbkyhnriV3webwQ7JITfXJON4nyejQv3QsH221Bh0F83FMVR/IAU8vP6hWBpH1fxwUFtWZUE61rlCB2tSOXhW70nIKG6a3mybVM4okLekEugAo7pCVWAqjuybwM3vJQJIWvMuh2jfo4kdJ4/gAzDT98cj6DQDg1NYOrLBUlGIQ= 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=od2gjrHJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Q7FKDPu2; arc=none smtp.client-ip=205.220.168.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="od2gjrHJ"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Q7FKDPu2" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6136oWBc2884535 for ; Tue, 3 Feb 2026 06:55:15 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= XOXCSYC2A9VCviyNI8z78wUSXKOiy96tkmU2QjAY1o0=; b=od2gjrHJgR6kcKxx UAH99ADuw/DTZoBxDMAbELzqiOmKNlnyIs6s6FpgILXGAT5+rEBNHD1H/1yVj4iy P/OYhxOoD81qV0x1dBUUBNk13o//O327VcSAAkeHhewBn07odrqI7IHlphT101TR BLNHJolZkhYJjvjbjhRXQtxmEaJ1inxd4EtyjQQFDQhw7grBbsc/oS3x8mGyxuxZ GQWxzAdePG97ZOOGmZDK/DRzWv8HSql4nWU9fobLRUqSuTR/2wjHYutKmGQvIuF/ GaYPVnrbcnGOPJ2224IWBDCA63gGhqlTy4iEDCzGUkFYQSWtEtjUwyUcIuctr3XH cghj1A== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4c2uu3k2ne-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 03 Feb 2026 06:55:15 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-b6ce1b57b9cso2876156a12.1 for ; Mon, 02 Feb 2026 22:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1770101714; x=1770706514; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XOXCSYC2A9VCviyNI8z78wUSXKOiy96tkmU2QjAY1o0=; b=Q7FKDPu2kP250UiImPHXQfAR9pIA4qVyzGHLMvYFYgyJKKF79Nhu9cNgJTcUQiiCTc c205Fn2ha9wzFXXxtsR8b2WQthZHFLbr4lvoTL9GiJM4HRuxwiwJC8MHZRTDYQgJBphA 6dO54g1Wak3lzPMjVz0l3zCzAEw2/aCRpLxTE2+tlYFGvr5gisS0DHg997OmY/N9j1Nt Bv+0x5s5ZoNhLiW4P+cDkt45cfqbSgv7yxR29nDWEEKzZTuUrAi55DnERRPNPIkBD0hd pVMU9zFaWDQRCryR2UyTJzCX4mUJ2K5iGjCZcsyOc67j3phr/NRVgxKJD7BBKb7riGiZ BG4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770101714; x=1770706514; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XOXCSYC2A9VCviyNI8z78wUSXKOiy96tkmU2QjAY1o0=; b=pwRBTBn50wjtu7VPzFka5J0bQkA09Gv8/dxRBno1WMd09CxRQoqbzu50TDyagj/lpn Am5ecd3Exq454VNGE+AFNgZ5Ozz/jTGE9DD8Ktnusk2ef69n6bbgGqB/qPlLhLaWJtGB qFTC0cPmRn67RSLpf6K43VPxhCWw1MWy9ZniV98tJmtkUVBtZBTnrRq7AEKo1DCM+P95 cpI/W7LmwN1PNvjC4MeYsQ7MFJt5KMSZL5wI2huh2rIEibByIQdEMV+UD0gN+6k7wnST nMgPnZ/8E4rdzLVwvvgycmNZfsupD8gmUWbzbh3ta7pAC1/d6IEn2/ojWZctTWsoSKfS iTGg== X-Forwarded-Encrypted: i=1; AJvYcCVdXynW6e3sp3neB+oV1tiSOzevifhqbkl5ARMBkbp7N1/h90naSFr4tKttD1E0cS4ewd8OswzfYHfKJ8s=@vger.kernel.org X-Gm-Message-State: AOJu0YzpLU9kfldR3TD5m4vVMMdghAJh9esLy3TBeHF4flqXKTxMGnP7 TqboxKETWeCof34dOiuyFF6Ypeph17SW85qNDKDkfDCC5ryQFerlQrTzYp6KHCrkI9hq0xfP16a aQpPh41WpIHeKHr/19DKzwLU0UXJo8p6ZpySztqkdTZCvj602K20NgK0gDTQX7H5q6U0= X-Gm-Gg: AZuq6aKoRIe1kim5FpYQfBH3LNt0qP9ayW0cFsE4+yHsjULez+AL1JA5auXZ/8Od2OB 6ASO0rWSwabTNVuofxjDCnvuoKr5iQYWCrqLnP8ED5va+AcnFpJyibNV7eun1FVyFv7EajQ5+pJ TxVWJRrzeMp41yPDaFcGkG9ECu4fawAs4XNqn3TIMC47GX3Gx6Xj/48VhN8f093938yYIrLbfVU BnA1eDtzy8mclJ6yWiOHsy1f44LeorP8lZEU4IQlh/sLb91KnCChj6gxiiMnsc6PHn0nXyHZTP5 1qgCSQK42aS3lUBTZXJYXJfepttreT3gQbcRSi4i69X+aCp6VQatX5w2dGs8SsezLyzFv64fBIj 56VSC4EtXUqgOc5OFz1Jcx9sa5slE+Uk4Md4= X-Received: by 2002:a05:6a21:600a:b0:366:1a00:2dab with SMTP id adf61e73a8af0-392dffe0dafmr12386002637.3.1770101714427; Mon, 02 Feb 2026 22:55:14 -0800 (PST) X-Received: by 2002:a05:6a21:600a:b0:366:1a00:2dab with SMTP id adf61e73a8af0-392dffe0dafmr12385977637.3.1770101713886; Mon, 02 Feb 2026 22:55:13 -0800 (PST) Received: from hu-sumk-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3547b1036e6sm837924a91.11.2026.02.02.22.55.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 22:55:13 -0800 (PST) From: Sumit Kumar Date: Tue, 03 Feb 2026 12:25:02 +0530 Subject: [PATCH 2/2] bus: mhi: ep: Add missing state_lock protection for mhi_state accesses Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260203-reset_worker_deadlock-v1-2-7ed889b5bf19@oss.qualcomm.com> References: <20260203-reset_worker_deadlock-v1-0-7ed889b5bf19@oss.qualcomm.com> In-Reply-To: <20260203-reset_worker_deadlock-v1-0-7ed889b5bf19@oss.qualcomm.com> To: Manivannan Sadhasivam , Alex Elder , Greg Kroah-Hartman Cc: mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Veerabhadrarao Badiganti , Subramanian Ananthanarayanan , Akhil Vinod , Sumit Kumar X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1770101702; l=1662; i=sumit.kumar@oss.qualcomm.com; s=20250409; h=from:subject:message-id; bh=lxSYBQP96mlT5aJJCUIduL+qGCMMryWk8oKPo1JcZnI=; b=km0yVdXibT9OTRzqgtmO4t4idXp2sR9f1MHa05U7VsODGYuwBe5nZEWtg1FQdPdOKr4c5Qlbz vDWa542bh5GDeWZ1whMf3S7Tz1K8peJq6cBeT2I05c8+FhtO8aOXYRG X-Developer-Key: i=sumit.kumar@oss.qualcomm.com; a=ed25519; pk=3cys6srXqLACgA68n7n7KjDeM9JiMK1w6VxzMxr0dnM= X-Proofpoint-ORIG-GUID: 0nnY9iYDqtfGxEZgr4SPZ5JTrYUKNKv7 X-Authority-Analysis: v=2.4 cv=OrRCCi/t c=1 sm=1 tr=0 ts=69819bd3 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=HzLeVaNsDn8A:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=0bTHJ2J0XYZ6sYew-2AA:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 X-Proofpoint-GUID: 0nnY9iYDqtfGxEZgr4SPZ5JTrYUKNKv7 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMjAzMDA1MyBTYWx0ZWRfX3DGoL9k2itn2 7Mbl8GZ1LHXQp3vf1sAoaOJMgYnpmyFXbHMensoMPmzaOEqpQ49+YepE1hgIdu4Ma5CKdZ7lZmk sJDFpZaDM6IG97CWRg2AIw4KM7G92/MQbZ/+WfreMhSPfpSQg5TwPTikhIAn7m0VFQ+vZ/X6ZJx gPrZiodEa8yYi0auw1PYMp/cmjiufH1m1EUkGtRd32dW3FNY9Q/05RT++0IGINvvZEE35ufmUQU 6eh/detw/WrHzlIfsh6MELtPIQyL5sHj4mkwrwHbOFTMLaQhv+9dQfQnehQwmJ3IKL9BMWx2uOB cSOLBwEkGQ28j2CjhW9YQaexfOyvssL4esBLz0zIMP5elQAvZ7hE97Rcxu2yKY+p3MKt5MHbfkY 2t4cfuufguppZ6bq5GL0M0cMACUc7we7q7NV2mv2k37O61cgs1U21QrNq9wo0wSPGW1LtCpnfK4 IHqFD41R3xNmdek9B7A== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-02-03_02,2026-02-02_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 adultscore=0 malwarescore=0 phishscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2602030053 The mhi_cntrl->mhi_state field should be protected by state_lock to ensure atomic state transitions. However, mhi_ep_handle_syserr() and mhi_ep_power_up() access mhi_state without holding this lock, which can race with concurrent state transitions and lead to state corruption. Add proper state_lock protection in both functions around their mhi_state accesses. Fixes: fb3a26b7e8af ("bus: mhi: ep: Add support for powering up the MHI end= point stack") Fixes: f7d0806bdb1b3 ("bus: mhi: ep: Add support for handling SYS_ERR condi= tion") Signed-off-by: Sumit Kumar --- drivers/bus/mhi/ep/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/bus/mhi/ep/main.c b/drivers/bus/mhi/ep/main.c index 73597de373ef7e0c428bcbc126d63a9a97f95144..e9d14006453aa8b8999486a1cef= 17ca43f4cc4e1 100644 --- a/drivers/bus/mhi/ep/main.c +++ b/drivers/bus/mhi/ep/main.c @@ -1113,7 +1113,9 @@ void mhi_ep_handle_syserr(struct mhi_ep_cntrl *mhi_cn= trl) struct device *dev =3D &mhi_cntrl->mhi_dev->dev; int ret; =20 + mutex_lock(&mhi_cntrl->state_lock); ret =3D mhi_ep_set_mhi_state(mhi_cntrl, MHI_STATE_SYS_ERR); + mutex_unlock(&mhi_cntrl->state_lock); if (ret) return; =20 @@ -1148,7 +1150,9 @@ int mhi_ep_power_up(struct mhi_ep_cntrl *mhi_cntrl) for (i =3D 0; i < mhi_cntrl->event_rings; i++) mhi_ep_ring_init(&mhi_cntrl->mhi_event[i].ring, RING_TYPE_ER, i); =20 + mutex_lock(&mhi_cntrl->state_lock); mhi_cntrl->mhi_state =3D MHI_STATE_RESET; + mutex_unlock(&mhi_cntrl->state_lock); =20 /* Set AMSS EE before signaling ready state */ mhi_ep_mmio_set_env(mhi_cntrl, MHI_EE_AMSS); --=20 2.34.1