From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796317606; b=Zwa+3NBEI0/ysX8j+AsWyMk3fPG5/QcptMlnTBCdNRGyCof46NTzf7vGWU89nMEaj1LH C7Esfti6K+UOA8ouB1QrvLDavWnRnUcGFAMxCtfVhgK5aDTC87hDHfRafXn08Ji50Svqx ACgWlrK4/AaSMa7Uhvge76OGMeFTi579jTnbE+mAbymoxbt53JS+CiNrmvrY+sckJH2SG NVP27Nvufg0jcn3p0BOKxAN9Ih53ShrM+jT6rWo5LVH8ksBEGoZw6Y0NsBkvht2RAXKtS q+3ESWB00VplRmlivh7TicPItcWfddrQqBvBwiYtyRhcpnEYJLlGSgh5awl3NyLWPjg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796317606; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=NFUOmmefDr8CN02siYLGJ8F7YmY1wRHX5LuJAOmImWQ=; b=mz3oCMdpKjaU/CncRDXS2/aYewuCgPxl19B6MxfepmsOY8bYTmjw84XvyXHBdASyOtfB PQg/uySm1AWJI1ampON4IApDMwh1YLTkLrFySbqrt2Bjs48KaU6ndkapymmmIvte1UwMx 9+cGQa2oAKOHsHmY0xH+S6ci+rnkC2eVumOBchmS2+W9KufjxP/NXHtgVYZo9YJRF3TBy d06Q3kKcDsD9mOAFtbAx/SsNp25XGQ9TdTHpOZoOAZpjyqzA3Nvuwz2lI6zWFMxXfJMkT IBIj7P6BPUYa2pn2181oWkp2BMVRJqRnbpIdE/MGcxP+55QfQPtITwhdl+O/rPeMBDA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Dm6Z51gw; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A80E2606A322 for ; Thu, 3 Dec 2026 17:06:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Dm6Z51gw Received: by smtp.kernel.org (Postfix) with ESMTPSA id 518C31F00898; Thu, 3 Dec 2026 17:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796317606; bh=NFUOmmefDr8CN02siYLGJ8F7YmY1wRHX5LuJAOmImWQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Dm6Z51gwtpQOWHbiAjhDTQgUmXFtaSizItIVYr8iUVyFEDc6fNshuS0XAkmEJNNMK YemlK4hAcNKcWzb9fiBQkJMzr4axlRN4iLpLJisVYXjg7yqqVtf673HGWkSBUj98Ck vRPptPo8SjsckkMjDZWK0zxP2QeSFvERXE2DYKG9Gkeq8YVC/ceyC9o8CnbayEjXpn fky60rCFREaWvSduAO1mKIzbDz2NS8NwWQdc77Hcpx0Uh8rs9qcohBOuy9Cg7gInf+ MBm5c6hkDSeiDt7gqCgj2r8p8++ed+h/FiN/rJsxj13hvJG539cYmcoSFtYTA/SmFP MYqEoev2O+AbQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v5 2/2] media: qcom: camss: Add Glymur-specific resources Reply-To: sashiko-reviews@lists.linux.dev To: "Nihal Kumar Gupta" Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org In-Reply-To: <20261203-glymur_camss-v5-2-960a6030ca6b@oss.qualcomm.com> References: <20261203-glymur_camss-v5-0-960a6030ca6b@oss.qualcomm.com> <20261203-glymur_camss-v5-2-960a6030ca6b@oss.qualcomm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 17:06:45 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [High] media: qcom: camss: NULL deref in msm_csiphy_subdev_init_legacy() on Glymur -- commit e587f871cdd9e6a0077c83e75057c1e3daa0a4ae Author: Nihal Kumar Gupta media: qcom: camss: Add Glymur-specific resources This commit adds Glymur-specific CSIPHY and CAMSS resource tables for the three CSIPHY instances on Glymur and updates the qcom,glymur-camss match entry to use them instead of x1e80100_resources. > diff --git a/drivers/media/platform/qcom/camss/camss.c b/drivers/media/pl= atform/qcom/camss/camss.c > index 3a5b7c665d3a9..189f4bada15a0 100644 > --- a/drivers/media/platform/qcom/camss/camss.c > +++ b/drivers/media/platform/qcom/camss/camss.c > @@ -4529,6 +4529,13 @@ static const struct resources_icc icc_res_sa8775p[= ] =3D { > }, > }; > =20 > +static const struct camss_subdev_resources csiphy_res_glymur[] =3D { > + /* CSIPHY0 CSIPHY1 CSIPHY4 */ > + { CAMSS_CSIPHY_RES_PHY_API(0, &csiphy_formats_sdm845), }, > + { CAMSS_CSIPHY_RES_PHY_API(1, &csiphy_formats_sdm845), }, > + { CAMSS_CSIPHY_RES_PHY_API(4, &csiphy_formats_sdm845), }, > +}; [Severity: High] Can this cause a NULL pointer dereference on csiphy->res->hw_ops during probe when no remote PHY endpoint is connected? CAMSS_CSIPHY_RES_PHY_API() leaves .csiphy.hw_ops as NULL, while camss_detect_legacy_phy() sets camss->legacy_phy =3D !!camss->res->csiphy_r= es and only clears it if an endpoint resolves to a remote node named "phy". On a Glymur device tree with no connected remote "phy" endpoint (such as TPG-only operation with an empty ports node), camss->legacy_phy stays true. camss_init_subdevices() then calls msm_csiphy_subdev_init_legacy(), which dereferences csiphy->res->hw_ops->init(csiphy) and crashes during probe. Before this change, x1e80100_resources populated .hw_ops, so this path failed cleanly with -EINVAL. Should camss_detect_legacy_phy() check that hw_ops is non-NULL before enabling legacy mode? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203-glymur_cam= ss-v5-0-960a6030ca6b@oss.qualcomm.com?part=3D2