From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] Gpu: drm: tegra - Fix possible NULL derefrence. Date: Mon, 30 Jan 2017 08:11:12 +0100 Message-ID: <20170130071112.GF3585@ulmo.ba.sec> References: <1485752025-29465-1-git-send-email-shailendra.v@samsung.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="twz1s1Hj1O0rHoT0" Return-path: Content-Disposition: inline In-Reply-To: <1485752025-29465-1-git-send-email-shailendra.v-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Shailendra Verma Cc: David Airlie , Stephen Warren , Alexandre Courbot , dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, p.shailesh-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, ashish.kalra-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, Shailendra Verma List-Id: linux-tegra@vger.kernel.org --twz1s1Hj1O0rHoT0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 30, 2017 at 10:23:45AM +0530, Shailendra Verma wrote: > of_match_device could return NULL, and so can cause a NULL > pointer dereference later. >=20 > Signed-off-by: Shailendra Verma > --- > drivers/gpu/drm/tegra/sor.c | 4 ++++ > 1 file changed, 4 insertions(+) No, this will never happen on Tegra. If you reach the ->probe() function this pointer is guaranteed to be non-NULL. Thierry --twz1s1Hj1O0rHoT0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAliO5w8ACgkQ3SOs138+ s6GDxBAAwsJwNLyLjTPPKHf25ChM8l1rZV6dkxhzoQrN8X1XpKr3dPT1Eevkc+gh zY/nKu/TXfaosAXu7Jrr8WDB+4rzFoO1UpjiOiZpJ8rGyRbsuT+/+O8xB8j4txF0 ep6btPx6ltS6XyS/sSQKwOLLCYC7OBPDvXv5V4bbKZfHgNI2zGt2+E6pLLLKuOxW cRqEwSFqanz+A5RpOOXH+y/POq/vPMfs9hq/kVP1hAptnLVmuEz8OuDseYcs/bZR Eh7gbKpr1lK1Zg/OmhyeMGQftU9B7EYxlacUUSjO2/bAa6rITfACxlkdDOQ6Oseh 6jXOEBCDPHvf5YaWVB3ED5ZjSzaly+9gseqjDqglhwYw/HIYvGKpn5Pp+s7FkWUJ vYfwBUgCQYcZ8OhyIbkdAlqTM5Ebmxtdo1g6oDxj7Vm+cCj7XK49qo5Mzau/VUHR vwCdkIcrsti/gOFIbJTjzXcxnekv7mUSMt1V8zUgQUPIc1rEc5Vj7qwHd1dyRhjt f+ivumeVgO4biMh22TkhBT3F/GoyT7Z7NNoOwymGqPGr8IeEXWILPKs4K1ZCJ52v aUcUQShOqtGX1NSYP390YgAurG7Fvaj1ZR4fMuU8vZ2ZT7PbbEgIjvma43tckYB7 n32S6GxwUrCFmgh2XJkjAc/aiZEXDIlis1XOTO4XTVR4DWIYzs8= =9rQr -----END PGP SIGNATURE----- --twz1s1Hj1O0rHoT0-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752477AbdA3HLX (ORCPT ); Mon, 30 Jan 2017 02:11:23 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35997 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752192AbdA3HLP (ORCPT ); Mon, 30 Jan 2017 02:11:15 -0500 Date: Mon, 30 Jan 2017 08:11:12 +0100 From: Thierry Reding To: Shailendra Verma Cc: David Airlie , Stephen Warren , Alexandre Courbot , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, p.shailesh@samsung.com, ashish.kalra@samsung.com, Shailendra Verma Subject: Re: [PATCH] Gpu: drm: tegra - Fix possible NULL derefrence. Message-ID: <20170130071112.GF3585@ulmo.ba.sec> References: <1485752025-29465-1-git-send-email-shailendra.v@samsung.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="twz1s1Hj1O0rHoT0" Content-Disposition: inline In-Reply-To: <1485752025-29465-1-git-send-email-shailendra.v@samsung.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --twz1s1Hj1O0rHoT0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 30, 2017 at 10:23:45AM +0530, Shailendra Verma wrote: > of_match_device could return NULL, and so can cause a NULL > pointer dereference later. >=20 > Signed-off-by: Shailendra Verma > --- > drivers/gpu/drm/tegra/sor.c | 4 ++++ > 1 file changed, 4 insertions(+) No, this will never happen on Tegra. If you reach the ->probe() function this pointer is guaranteed to be non-NULL. Thierry --twz1s1Hj1O0rHoT0 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAliO5w8ACgkQ3SOs138+ s6GDxBAAwsJwNLyLjTPPKHf25ChM8l1rZV6dkxhzoQrN8X1XpKr3dPT1Eevkc+gh zY/nKu/TXfaosAXu7Jrr8WDB+4rzFoO1UpjiOiZpJ8rGyRbsuT+/+O8xB8j4txF0 ep6btPx6ltS6XyS/sSQKwOLLCYC7OBPDvXv5V4bbKZfHgNI2zGt2+E6pLLLKuOxW cRqEwSFqanz+A5RpOOXH+y/POq/vPMfs9hq/kVP1hAptnLVmuEz8OuDseYcs/bZR Eh7gbKpr1lK1Zg/OmhyeMGQftU9B7EYxlacUUSjO2/bAa6rITfACxlkdDOQ6Oseh 6jXOEBCDPHvf5YaWVB3ED5ZjSzaly+9gseqjDqglhwYw/HIYvGKpn5Pp+s7FkWUJ vYfwBUgCQYcZ8OhyIbkdAlqTM5Ebmxtdo1g6oDxj7Vm+cCj7XK49qo5Mzau/VUHR vwCdkIcrsti/gOFIbJTjzXcxnekv7mUSMt1V8zUgQUPIc1rEc5Vj7qwHd1dyRhjt f+ivumeVgO4biMh22TkhBT3F/GoyT7Z7NNoOwymGqPGr8IeEXWILPKs4K1ZCJ52v aUcUQShOqtGX1NSYP390YgAurG7Fvaj1ZR4fMuU8vZ2ZT7PbbEgIjvma43tckYB7 n32S6GxwUrCFmgh2XJkjAc/aiZEXDIlis1XOTO4XTVR4DWIYzs8= =9rQr -----END PGP SIGNATURE----- --twz1s1Hj1O0rHoT0--