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 31820342158 for ; Fri, 13 Feb 2026 09:02:52 +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=1770973373; cv=none; b=vFMoaHgcDlsJsQ6+s63aqALsxVWkJOgBleuvE9n1TY6i2TTblElw3X+0mdFzTYNFlYJy1LS08CQLy0pEdVQy2tT0ZLgRdA74Qy0E08CM7AlyMq4WT8gQzdLo4mDZ2XMWTlAsVG9pwHsAxubDQR6wvqymg02hpzcqUc6VmFYG6XQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770973373; c=relaxed/simple; bh=GCNLHpourJK+ggk57xu+21UuS50fiPYl9qw9FnaS074=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HxW97y0qZ417q4GrZnqfbJUKlrggl1odCNjOHbao4tMm5qi/QVReG0TkUh9cXnfJuMedn7J8Q1iGPkHXI2TDbJtwnAjmIT3Dqz4gsxP9YLCSX39S7wXxoD32XbKNBIEZ05SGOevmXz2Y0zVwd+pkv+DnjHzkkNZ8foJzx6z9P9M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PNI9Dw2V; 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="PNI9Dw2V" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80C85C116C6; Fri, 13 Feb 2026 09:02:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1770973372; bh=GCNLHpourJK+ggk57xu+21UuS50fiPYl9qw9FnaS074=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PNI9Dw2Vzi88bVgK5GTgp5hPuv3JBV/acTEX4BdT5rlDJoJhBCCywx09vNT21WSrC H+kk76KSVyTxY/uBvRctWMKzjdPoiD2UKDTciL6lnTps/+SBOMySMuiPzaecKTnS7B cJH1iOP6Ijj9cqbBPDtgI/EXz9WB+vZDurh51sllJDpzAZxMd1zmE1rT1AulS171Oc kdcHvO4yMB5EbK1XZfnXcLfz261Jjh6h3WBHpssFOCkcIa4efOfBeGGaxdB0fABd2n abo6nrwcdYOe3pvZZPsJfoATFWqoAIva4MEdl20gmVRcDFJ3XAstezUOliEofsh1H+ Zf+qScQ/kDozw== Received: from johan by rho.lan with local (Exim 4.98.2) (envelope-from ) id 1vqp4W-0000000010y-1ei7; Fri, 13 Feb 2026 10:02:44 +0100 Date: Fri, 13 Feb 2026 10:02:44 +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 3/5] phy: qcom: qmp-usb-legacy: Fix possible NULL-deref on early runtime suspend Message-ID: References: <20260205160240.748371-1-loic.poulain@oss.qualcomm.com> <20260205160240.748371-4-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=us-ascii Content-Disposition: inline In-Reply-To: <20260205160240.748371-4-loic.poulain@oss.qualcomm.com> On Thu, Feb 05, 2026 at 05:02:38PM +0100, Loic Poulain wrote: > There is a small window where the runtime suspend callback may run > after pm_runtime_enable() and before pm_runtime_forbid(). In this > case, a crash occurs because runtime suspend/resume dereferences > qmp->phy pointer, which is not yet initialized: > `if (!qmp->phy->init_count) {` So here too, what would trigger a suspend in this window? (Except possibly user space disabling and reenabling runtime pm, which can't happen in practice). > This can also happen if user re-enables runtime-pm via the sysfs > attribute before qmp phy is initialized. This I guess can happen in theory, but you'd need to try pretty hard. But I think the commit message should better reflect this is all mostly theoretical (currently it sounds like something you've actually hit). Johan