From mboxrd@z Thu Jan 1 00:00:00 1970 From: maxime.ripard@bootlin.com (Maxime Ripard) Date: Mon, 8 Oct 2018 11:21:11 +0200 Subject: [PATCH v3 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if NULL In-Reply-To: <20181005215951.99003-2-giulio.benetti@micronovasrl.com> References: <20181004195605.txvbkshvxklyzxyb@flea> <20181005215951.99003-1-giulio.benetti@micronovasrl.com> <20181005215951.99003-2-giulio.benetti@micronovasrl.com> Message-ID: <20181008092111.qcufr4o7cy3nnj4b@flea> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Oct 05, 2018 at 11:59:51PM +0200, Giulio Benetti wrote: > If tcon->panel pointer is NULL, trying to dereference from it > (i.e. tcon->panel->connector) will cause a null pointer dereference. > > Add tcon->panel null pointer check before calling > sun4i_tcon0_mode_set_dithering(). > > Signed-off-by: Giulio Benetti > Fixes: f11adcecbd5f ("drm/sun4i: tcon: Add dithering support for > RGB565/RGB666 LCD panels") > Reviewed-by: Chen-Yu Tsai Applied both, thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH v3 2/2] drm/sun4i: tcon: prevent tcon->panel dereference if NULL Date: Mon, 8 Oct 2018 11:21:11 +0200 Message-ID: <20181008092111.qcufr4o7cy3nnj4b@flea> References: <20181004195605.txvbkshvxklyzxyb@flea> <20181005215951.99003-1-giulio.benetti@micronovasrl.com> <20181005215951.99003-2-giulio.benetti@micronovasrl.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mohfoqypvlhtueck" Return-path: Content-Disposition: inline In-Reply-To: <20181005215951.99003-2-giulio.benetti@micronovasrl.com> Sender: linux-kernel-owner@vger.kernel.org To: Giulio Benetti Cc: David Airlie , Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org --mohfoqypvlhtueck Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 05, 2018 at 11:59:51PM +0200, Giulio Benetti wrote: > If tcon->panel pointer is NULL, trying to dereference from it > (i.e. tcon->panel->connector) will cause a null pointer dereference. >=20 > Add tcon->panel null pointer check before calling > sun4i_tcon0_mode_set_dithering(). >=20 > Signed-off-by: Giulio Benetti > Fixes: f11adcecbd5f ("drm/sun4i: tcon: Add dithering support for > RGB565/RGB666 LCD panels") > Reviewed-by: Chen-Yu Tsai Applied both, thanks! Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --mohfoqypvlhtueck Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlu7IYYACgkQ0rTAlCFN r3T2Ig//RX8QMjB1fpCJfjm3Hn9puA1tstV2U8Aar5tL2Z2ucctRxYhk2WBJt/qP Y6fFIRiiAo6+kxo440mp9Emf3g7IWnP2lmtsqCxv13gw964tral3xTr8G088v4Rm rZn8uu4iqdGyIq2D6VM+S7XW1B8T8pCaXsZv2hc4SSSnLrM/3+lPBA+gU7MB5rAK iBUQqUwIVAT0UgNyS+wq1ZWT2+JSy1XKLIL9EiFODGKQ+C8aSGN67+vIY3477+OO BggrNr51rBFwsJHdqvSVG6jN1GDVwgMJLtA039WxIQpni5HIPus0sx+XgjNw9jCV chukRoxi+HBEANCoTCQwROttkYuBSv6wJY1ZEJiiz7eyJZJOyULjmGSF8wSh1XBC +pmGf5+u80WAV56KXGPkULTk/1MTBkuCSTHLwfJX2GvjWVMYqFsdJTW0BMtI/zyW 0PHShRLWgEAtn9XoWD7qwA0mZ2sk+aprvFMYK3lvuMM7DXshiz7sD73c3LW2koj3 ySVHwAQbfX0jQpC7/+qslfi20gSMFE5tXHiQpaSHBboNhA8zfj2DOM6B8UTXQFdU HAQkyEyLWjO0Ng2gYlF70j0g+jZOebejEa8J08RnJ6yAavxvtVs8rARmMGH8FXDq x1YIMDG3Ndhyqu5VIKm4m4nWHLb5yV+DiCKksBHniGrReeLrAkQ= =1Tms -----END PGP SIGNATURE----- --mohfoqypvlhtueck--