Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbdLEPr0 (ORCPT ); Tue, 5 Dec 2017 10:47:26 -0500 Received: from gateway31.websitewelcome.com ([192.185.143.35]:19479 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752732AbdLEPrQ (ORCPT ); Tue, 5 Dec 2017 10:47:16 -0500 Date: Tue, 05 Dec 2017 09:47:13 -0600 Message-ID: <20171205094713.Horde.5_tExSIcsBR4JvXtQE8cQcW@gator4166.hostgator.com> From: "Gustavo A. R. Silva" To: Ville =?utf-8?b?U3lyasOkbMOk?= Cc: VMware Graphics , Sinclair Yeh , Thomas Hellstrom , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH] drm/vmwgfx_kms: Fix potential NULL pointer dereference References: <20171204215418.GA23874@embeddedor.com> <20171205133019.GS10981@intel.com> In-Reply-To: <20171205133019.GS10981@intel.com> User-Agent: Horde Application Framework 5 Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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: 1eMFRB-000mwY-Md X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: gator4166.hostgator.com [108.167.133.22]:35801 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: 589 Lines: 26 Hi Ville, Quoting Ville Syrjälä : > On Mon, Dec 04, 2017 at 03:54:18PM -0600, Gustavo A. R. Silva wrote: >> crtc_state is being null checked in a previous code block, which implies >> that such pointer might be null. >> >> crtc_state is dereferenced in drm_atomic_helper_check_plane_state, hence >> there is a potential null pointer dereference. > > This is a false positive. drm_atomic_helper_check_plane_state() will not > dereference crtc_state when plane_state->crtc is NULL. > You are right. Thank you for clarifying. -- Gustavo A. R. Silva