From patchwork Sat Jul 11 17:24:39 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 6771131 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 70183C05AC for ; Sat, 11 Jul 2015 17:24:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C27F2068C for ; Sat, 11 Jul 2015 17:24:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9AF9320646 for ; Sat, 11 Jul 2015 17:24:52 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F8EB6E3B5; Sat, 11 Jul 2015 10:24:51 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF02A6E3B5 for ; Sat, 11 Jul 2015 10:24:49 -0700 (PDT) Received: by padck2 with SMTP id ck2so19645645pad.0 for ; Sat, 11 Jul 2015 10:24:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ZyRl0Xg2SxNLTAsm//aZ4ccO6lkyPDSqspN2IPbQ7Bw=; b=gJgM6ddrMpyj/uZ/2GVCxUfDfc3T6j+xhfWD+MPwCWh79tiHx9Q0HCWdMwBEE1QySP NwnbPodHDi1oVKdi4dZbVBfoLofefroof/Xk8qte7AHejhatPy8vWeXMhG1hkgsUoHBk FGPGgPpg61oCjQKuYCzt2pdmAWxMUj0FJoQRuMb3nIILRiu5KVUQTfu+3Jk3M+V3OGAB XF8DNBi9jLXsYAmu9A+CWioDccqtzGFJfrjJoFOIGRZZLDLFu5aNr/U/nPofKc5FmUr4 2Z2iVweHraqtg20dVYviTpzTf96NgDGp8MAiSgKBKwTquT1K58sfiIIpph209bq2/10K +THw== X-Received: by 10.68.69.69 with SMTP id c5mr53826899pbu.160.1436635489507; Sat, 11 Jul 2015 10:24:49 -0700 (PDT) Received: from localhost.localdomain ([49.206.246.192]) by smtp.gmail.com with ESMTPSA id fb3sm13080228pbd.91.2015.07.11.10.24.46 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 Jul 2015 10:24:48 -0700 (PDT) From: Sudip Mukherjee To: David Airlie Subject: [PATCH] drm/atomic: fix null dereference Date: Sat, 11 Jul 2015 22:54:39 +0530 Message-Id: <1436635479-1460-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sudip Mukherjee X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 We are checking the size of e->event but we were doing it when e is known to be NULL. Signed-off-by: Sudip Mukherjee --- drivers/gpu/drm/drm_atomic.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index acebd16..51d3a85 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1311,7 +1311,6 @@ static struct drm_pending_vblank_event *create_vblank_event( e = kzalloc(sizeof *e, GFP_KERNEL); if (e == NULL) { spin_lock_irqsave(&dev->event_lock, flags); - file_priv->event_space += sizeof e->event; spin_unlock_irqrestore(&dev->event_lock, flags); goto out; }