From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CF08A354AF3 for ; Fri, 13 Feb 2026 10:45:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770979514; cv=none; b=I0cfQobVcNxM65d3ESl2ykRLyPi3uoivgDGKumaiN+UZjMU6b6gOJjHPeZbL1x0pOxhWntzImAsT88dcgYoLzP9cUf5gvRwZ7KMaq5FvLxSZw3C1o4cubymlzM2Z1/VH3/irhz/Z883Q9JeQPY06bwp+bhOH7vo1E/AsQ82+FEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770979514; c=relaxed/simple; bh=ae4YsFkRL4hT1bL9gebH9ppqG30GrKSaxvB14eYTi+g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OPW+SmD8S2xFVuZu/ToTSD7cXDB1yAkNBkD8mdD61UKI1Lr2UhOwacpwadn3L24eM0djWjj3kEK9IHfygRLCwtNNYB1JY4g9RLME31BVeZvkqKbtUMNrIS2pA85HLnb6xQw2/Fvx8P5VlMFmkxinw+JBMdyI7hz0jrwxfyk+M2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XMtFayh5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XMtFayh5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64611C116C6; Fri, 13 Feb 2026 10:45:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770979514; bh=ae4YsFkRL4hT1bL9gebH9ppqG30GrKSaxvB14eYTi+g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XMtFayh5yjGVeQhZs9ejMf7qdV6Fwuh55BkTCd4cZYIOx2vfrHavqWT6QRGRpgzvY /P2mRLr3ZYJ6Rl4qJ531LndLzA/lNna/c615XSbEEzG2T/JrybrXDMoe9xdlLP3pXy aLQmpwH7dZtqgN4L5qpv1h2nAgo725QZDEcgbhJLyIracSsZW3NwtPHAbr+W9OIpZZ VoaYV1gSdhc2hTClN09d3Olv2guQU+A0UFfLMqWfVj120PLjeNqM/qDNGQs2jvBiEn felkYCHczgkXQTZJN+Khm1vJzPqOAsYBy6tzYB82Mvc33a/PTrGUcZBEntPU07w1hX ubGyqSyv7f8CQ== Received: from johan by rho.lan with local (Exim 4.98.2) (envelope-from ) id 1vqqfa-0000000042q-0HiX; Fri, 13 Feb 2026 11:45:06 +0100 Date: Fri, 13 Feb 2026 11:45:06 +0100 From: Johan Hovold To: Loic Poulain Cc: vkoul@kernel.org, kishon@kernel.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, dmitry.baryshkov@oss.qualcomm.com, neil.armstrong@linaro.org, konrad.dybcio@oss.qualcomm.com, Abel Vesa Subject: Re: [PATCH v3 5/5] phy: qcom: snps-femto-v2: Fix possible NULL-deref on early runtime suspend Message-ID: References: <20260205160240.748371-1-loic.poulain@oss.qualcomm.com> <20260205160240.748371-6-loic.poulain@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Fri, Feb 13, 2026 at 10:45:32AM +0100, Loic Poulain wrote: > On Fri, Feb 13, 2026 at 10:07 AM Johan Hovold wrote: > > > > On Thu, Feb 05, 2026 at 05:02:40PM +0100, Loic Poulain wrote: > > > Enabling runtime PM before attaching the hsphy instance as driver data > > > can lead to a NULL pointer dereference in runtime PM callbacks that > > > expect valid driver data. There is a small window where the suspend > > > callback may run after PM runtime enabling and before runtime forbid. > > > > So here too, the commit should reflect that this cannot really happen in > > practice. > > This happened in practice in the qcom‑qusb2 PHY driver, with the same > code flow. > Bug: https://github.com/qualcomm-linux/qcom-deb-images/issues/208 > Patch: https://lore.kernel.org/linux-arm-msm/20251219085640.114473-1-loic.poulain@oss.qualcomm.com/ Thanks for the link. > I know it may sound unlikely, but this crash has been reported > several times during boot‑stress testing. I haven’t investigated > deeply enough to determine whether it’s caused by an unfortunate > preemption window or a racing CPU. But I'm literally asking for *what* would trigger the suspend in that initial window between enable() and forbid() cause I don't see it. A racing user space daemon re-enabling runtime PM after forbid() is the only thing I can think of that could trigger this. Johan