Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752540AbdLFRHa (ORCPT ); Wed, 6 Dec 2017 12:07:30 -0500 Received: from gateway36.websitewelcome.com ([192.185.198.13]:17000 "EHLO gateway36.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751847AbdLFRH3 (ORCPT ); Wed, 6 Dec 2017 12:07:29 -0500 Date: Wed, 06 Dec 2017 11:07:27 -0600 Message-ID: <20171206110727.Horde.GHd9NQbELyLB7lD0AM2LTxe@gator4166.hostgator.com> From: "Gustavo A. R. Silva" To: Daniel Vetter Cc: Daniel Vetter , Jani Nikula , Gustavo Padovan , Sean Paul , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/fb-helper: Fix potential NULL pointer dereference References: <20171205174628.GA31189@embeddedor.com> <20171206091254.cwc3jxwvt27fd5gu@phenom.ffwll.local> In-Reply-To: <20171206091254.cwc3jxwvt27fd5gu@phenom.ffwll.local> User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 108.167.133.22 X-Source-L: Yes X-Exim-ID: 1eMdAN-002b6o-Ag X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: gator4166.hostgator.com [108.167.133.22]:35990 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 2 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 644 Lines: 27 Quoting Daniel Vetter : > On Tue, Dec 05, 2017 at 11:46:28AM -0600, Gustavo A. R. Silva wrote: >> fb_helper is being dereferenced before it is null checked, >> hence there is a potential null pointer dereference. >> >> Fix this by moving the pointer dereference after fb_helper >> has been null checked. >> >> This issue was detected with the help of Coccinelle. >> >> Fixes: c777990fb45b ("drm/fb-helper: Handle function NULL argument") >> Signed-off-by: Gustavo A. R. Silva > > Oops. Applied to drm-misc-next, thanks for your patch. > -Daniel > Glad to help. :) Thanks -- Gustavo A. R. Silva