From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) (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 7F4C13BB10B for ; Thu, 20 Aug 2026 10:15:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787220927; cv=none; b=DSi/PC6SfItrhH1Vr53Jg8LUMZ712hmsLuv2bNe9malrNX58VV8HoKl9DLHmF1fYWmP78J1TgAwEGUoe3wz7vti44ILK+/M7NOiOkvsOWLGvyF7LZ2Nwe4URNrr99XFsuLddBL7b+qLTWZPFfPnVLJ7FEha14nKf1Z+ZBww7BK4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787220927; c=relaxed/simple; bh=yi52HTwj5/V8AkISUNtnecpfAfVpbB7rUItTur0eknE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OiAZC1WYxT0oyCLltiFwoze2Q+R+wkR8d4ErZQ7molN5zZMMbTja3XcRnk2uNaToIPangkc8MF3mcosmIrRFDTkPh1tuuEJhCAkshbj3s8yCNJcE8ZvfU+a7I93YED4wy91HN6/q7dGAUSLpI55BiXlqNsBCoNc6dIG3V4xoIyY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gp7LaGCT; arc=none smtp.client-ip=209.85.221.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gp7LaGCT" Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-481412f1828so810010f8f.1 for ; Thu, 20 Aug 2026 03:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1787220918; x=1787825718; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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:content-type; bh=73EKv/y0Hi9qvT6SwJd1WZqVvHE7yq7MtYlPP4tI3D4=; b=gp7LaGCTV9mM2p67TAdnwWtXn1B05kzyGKw0YbXpsvQx74eq9Z+uzLc4yofEBbYOLd iOeHcUJc47HgdJceYgvAuXKqk0oWV87ZmPdPwPTR6gC0WhM9pjbpEnLzwfRoa3lw6j4g HtW47v4NzHcs6suHdtmbYaiSXgFCFuQrq+It2+BcdmhzpAv/uXlHQQLEwjX+jFBVfPOD JGT/WpR/Whca6xcgE6CgT3mVYHbZn9qe+X4RCL/FFPytFSFMJYGpYoRQKrm9A7jRQplI rg50XcsnVlkRDDAQbz8HTrJaRuHRK5PNf8b0dj7b6IG9iVO245VNE3fgRFo6Xswazztz MBWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787220918; x=1787825718; h=content-transfer-encoding:content-type: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:content-type; bh=73EKv/y0Hi9qvT6SwJd1WZqVvHE7yq7MtYlPP4tI3D4=; b=rGtY/iM8VPwmkHIhfIRHjX5G11L1n4YBoiX3V6antGm1TK1Ri5vW7bV3ggLVOQhDSG NGnfwNT8X3nU1Cg5EDSKbOjMDK7zdlkbs3dtMyPq1pKlGoFvaCgkROYJkq7NU5184Gb0 1fhTajUgRgB8DJJRlqnnhoDccV5nLD2ybyyZkdGE6KUSw7NG8ZyLPOnKYyUAI/HOaQ8m kkNiFi+3aOuEsmqfW3eE/xvlAtTyjOo064IEIqdX+dqKGtMO7KLQ95PODm8Qmwq8big4 3gYdTfL3VvOapcjh1wxzRXLnpX95rJSbmoEurUcx4qcGVjSk724q3PBML7nis/9xlIWI vXSw== X-Forwarded-Encrypted: i=1; AHgh+RoXQ5lRHoZzchLy2VR83QN8RtCzjSqisJAMZDAv1mSGh4r+p+LvBnDLgy0bYkLfInJKFkb7ME6Leo74qSw=@vger.kernel.org X-Gm-Message-State: AFuF++mFoF0Yr2PiTAJ610gf5EaBi4QsqEyvJra9m6vIO3v3pXThUZEv Oj/dXf6okIt20EBle4p32PAzNiDB7XInd3hL/q9pCN/DecOmDOjQZa5EFKkRp7FjMds= X-Gm-Gg: AR+sD131qymBDCOLV42qx7Cup+BjQIhl2tP69V698TnyKHlq579KEWIT7DPYOz7WSm0 H2stic9Z2OZa3zkBgw5/6HkC8A9iwVFAFWvlfyV/FpXpN2Qgxh9is+XaEN8ArdLQcim73HjwQen ZsBKnTxtXbSqkdXQroFc2gimlrJ1vqV2+ASFVzYQ2+SGjn1gXTzhsmUu87in0g97W+5jKdfmRsX WLssnTN+LhZgg3VDn2KBk3FdfOHBruZU0RVY38Ik6+1pFQUBQttkIkU+i9hehV3lRgcAbh46v6p 9s0R7trJZgBv9qTBcAkqS0IkJovSTv5WiBIg33bYwGi5xt1B2/1YSkvrqle3OQHaecCWRcI9CqJ CqHCz9Lsx9hrjb41kJ0sXGbNXigUyDzDNgUWxxcRU+ZJSeD7vbgWtrAsjWCluJpu1Om5bNkU7E/ LkXCAhdEbuH1IsfkfC5pW4NJm543drZzO2c2XnF8rA3+bl4ZFyB3or4N5E7b3pkPzdCF24Qv1L X-Received: by 2002:a05:6000:468c:b0:482:b813:8315 with SMTP id ffacd0b85a97d-482b8138536mr5738861f8f.21.1787220917614; Thu, 20 Aug 2026 03:15:17 -0700 (PDT) Received: from [192.168.0.163] ([109.76.167.53]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482b14d9783sm11601123f8f.37.2026.08.20.03.15.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Aug 2026 03:15:16 -0700 (PDT) Message-ID: Date: Thu, 20 Aug 2026 11:15:15 +0100 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] usb: typec: qcom-pmic: cancel reset_work on stop To: Fan Wu , linux-usb@vger.kernel.org Cc: heikki.krogerus@linux.intel.com, gregkh@linuxfoundation.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <20260819161448.76597-1-fanwu01@zju.edu.cn> From: Bryan O'Donoghue Content-Language: en-GB In-Reply-To: <20260819161448.76597-1-fanwu01@zju.edu.cn> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 19/08/2026 17:14, Fan Wu wrote: > pdphy_stop() disables IRQs but leaves reset_work pending. If the IRQ > handler schedules it just before disable_irq(), the work runs after > remove() frees the struct via devm. > > Call cancel_work_sync() after disabling IRQs to close the window. > > This issue was found by an in-house static analysis tool. > > Fixes: a4422ff22142 ("usb: typec: qcom: Add Qualcomm PMIC Type-C driver") > Cc: stable@vger.kernel.org > Assisted-by: Codex:gpt-5.6 > Signed-off-by: Fan Wu > --- > drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c > index c8b1463e6..abb9d0321 100644 > --- a/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c > +++ b/drivers/usb/typec/tcpm/qcom/qcom_pmic_typec_pdphy.c > @@ -544,6 +544,8 @@ static void qcom_pmic_typec_pdphy_stop(struct pmic_typec *tcpm) > for (i = 0; i < pmic_typec_pdphy->nr_irqs; i++) > disable_irq(pmic_typec_pdphy->irq_data[i].irq); > > + cancel_work_sync(&pmic_typec_pdphy->reset_work); > + > qcom_pmic_typec_pdphy_reset_on(pmic_typec_pdphy); > > regulator_disable(pmic_typec_pdphy->vdd_pdphy); > Reviewed-by: Bryan O'Donoghue