From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out2-smtp.messagingengine.com ([66.111.4.26]:40311 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751170AbdH0MVd (ORCPT ); Sun, 27 Aug 2017 08:21:33 -0400 Date: Sun, 27 Aug 2017 14:21:39 +0200 From: Greg KH To: Nhan Nguyen Cc: Laurent Pinchart , stable@vger.kernel.org, Thong Ho Subject: Re: [PATCH 4.4.y] drm: rcar-du: Fix crash in encoder failure error path Message-ID: <20170827122139.GA2963@kroah.com> References: <20170816085350.3180-1-nhan.nguyen.yb@renesas.com> <20170816085350.3180-3-nhan.nguyen.yb@renesas.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170816085350.3180-3-nhan.nguyen.yb@renesas.com> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Aug 16, 2017 at 03:53:48PM +0700, Nhan Nguyen wrote: > From: Laurent Pinchart > > commit 05ee29e94acf0d4b3998c3f93374952de8f90176 upstream. > > When an encoder fails to initialize the driver prints an error message > to the kernel log. The message contains the name of the encoder's DT > node, which is NULL for internal encoders. Use the of_node_full_name() > macro to avoid dereferencing a NULL pointer, print the output number to > add more context to the error, and make sure we still own a reference to > the encoder's DT node by delaying the of_node_put() call. > > Cc: stable@vger.kernel.org > Signed-off-by: Laurent Pinchart > Reviewed-by: Gustavo Padovan > Signed-off-by: Thong Ho > Signed-off-by: Nhan Nguyen > --- > drivers/gpu/drm/rcar-du/rcar_du_kms.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) I also added this to 4.9-stable.