From patchwork Mon Nov 19 05:10:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 12909 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 24D5F23FC0 for ; Mon, 19 Nov 2012 05:16:25 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id C4DF9A1811F for ; Mon, 19 Nov 2012 05:16:24 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so5961494iej.11 for ; Sun, 18 Nov 2012 21:16:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=1GHftd6CWaYUk222Y1dUsykcBbaSYWyAZTuLJfZs4U0=; b=d2APUuvAL1rbhdOYpMQRQZRt87ll5TeWp5ENiDh2inDPXyI+6NMDgZlGiTS64Uoc1W FG8k4BSqV/Xx4NuWTQZ8cGH2qUSPaQ+JQXcUxFoVe+Y1QIic/ckjv6sFdPNuC9njBEDw lI0kxLR6Ggu1PGACCMde9H7hQdO+oZGUngOJX6i3iNSxIUPoWV5wGsY4ybEcXeKhEmTp eYNKmxaU8ze+eNBzDl4L60KK6rzG6dAWcgdF7gjYUfFPP+OGysrHvulrmYuLUAf3ks4M tsUMfCYRcJYiTurHMrhFN2QAWhAHB+T9KG5WBUgLaL1/Y3sKcuUG8Sc/M4CXUNg0pgTR +jJg== Received: by 10.43.7.132 with SMTP id oo4mr10114787icb.6.1353302184190; Sun, 18 Nov 2012 21:16:24 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp116356igt; Sun, 18 Nov 2012 21:16:23 -0800 (PST) Received: by 10.66.76.39 with SMTP id h7mr32726525paw.61.1353302183403; Sun, 18 Nov 2012 21:16:23 -0800 (PST) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx.google.com with ESMTPS id bf10si11940717pab.311.2012.11.18.21.16.22 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Nov 2012 21:16:23 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.160.47; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) smtp.mail=tushar.behera@linaro.org Received: by mail-pb0-f47.google.com with SMTP id un1so1688657pbc.34 for ; Sun, 18 Nov 2012 21:16:22 -0800 (PST) Received: by 10.68.245.167 with SMTP id xp7mr36529238pbc.75.1353302182883; Sun, 18 Nov 2012 21:16:22 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id i4sm5527479pav.20.2012.11.18.21.16.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Nov 2012 21:16:21 -0800 (PST) From: Tushar Behera To: linux-omap@vger.kernel.org Cc: archit@ti.com, patches@linaro.org, tomi.valkeinen@ti.com Subject: [PATCH] OMAPDSS: OMAPFB: Fix possible null pointer dereferencing Date: Mon, 19 Nov 2012 10:40:15 +0530 Message-Id: <1353301815-21277-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlyK6oDZQXl/v15qEk6irLVh2VLYY5Lp9ZRksFKp16sZq8GGr9UIilcZGxgJ9V2fj+lyxv6 If display is NULL, display->output would lead to kernel panic. Signed-off-by: Tushar Behera --- drivers/video/omap2/omapfb/omapfb-ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index 55a39be..532a31b 100644 --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c @@ -787,7 +787,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) case OMAPFB_WAITFORVSYNC: DBG("ioctl WAITFORVSYNC\n"); - if (!display && !display->output && !display->output->manager) { + if (!display || !display->output || !display->output->manager) { r = -EINVAL; break; }