From patchwork Fri Feb 12 16:31:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Peres X-Patchwork-Id: 8293371 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE0D19F372 for ; Fri, 12 Feb 2016 16:32:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0B18B2010F for ; Fri, 12 Feb 2016 16:32:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3C09F20123 for ; Fri, 12 Feb 2016 16:32:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 84F376EAFF; Fri, 12 Feb 2016 08:32:05 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 693246EAFF for ; Fri, 12 Feb 2016 08:32:04 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 12 Feb 2016 08:31:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,436,1449561600"; d="scan'208";a="901608931" Received: from linux.intel.com ([10.23.219.25]) by fmsmga001.fm.intel.com with ESMTP; 12 Feb 2016 08:31:46 -0800 Received: from beast.fi.intel.com (unknown [10.237.72.70]) by linux.intel.com (Postfix) with ESMTP id 1DAE36A4002; Fri, 12 Feb 2016 09:19:36 -0800 (PST) From: Martin Peres To: intel-gfx@lists.freedesktop.org Date: Fri, 12 Feb 2016 18:31:24 +0200 Message-Id: <1455294689-29249-3-git-send-email-martin.peres@linux.intel.com> X-Mailer: git-send-email 2.7.1 In-Reply-To: <1455294689-29249-1-git-send-email-martin.peres@linux.intel.com> References: <1455294689-29249-1-git-send-email-martin.peres@linux.intel.com> Subject: [Intel-gfx] [PATCH 2/7] display: prevent a NULL pointer dereference in intel_set_scanout_pixmap X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Caught by Klockwork. Signed-off-by: Martin Peres --- src/uxa/intel_display.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/uxa/intel_display.c b/src/uxa/intel_display.c index 8bf0184..44744a5 100644 --- a/src/uxa/intel_display.c +++ b/src/uxa/intel_display.c @@ -688,6 +688,11 @@ intel_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) } bo = intel_get_pixmap_bo(ppix); + if (!bo) { + ErrorF("pixmap is not backed by a BO\n"); + return FALSE; + } + if (intel->front_buffer) { ErrorF("have front buffer\n"); }