Received: by 10.223.185.116 with SMTP id b49csp818937wrg; Sat, 10 Feb 2018 21:06:13 -0800 (PST) X-Google-Smtp-Source: AH8x225rVBpUNHjbJK3nvdTIBHfuiCm7ciFnZhe/JEo5pAtKeZPzJH9NzLZtc9zW6AdfBUlHDm6k X-Received: by 10.98.34.15 with SMTP id i15mr7750348pfi.168.1518325573682; Sat, 10 Feb 2018 21:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518325573; cv=none; d=google.com; s=arc-20160816; b=mi4vaGYZ725SYwuTF4+MybCodG63D7MZP48eITIZX+Ps8PEzZze+tqLBtO6mz49YmJ nUkcRMwACNV8tk3RZF+qgSOa+DB0tjE/Krt1mmbo6Ck7TnB5ar98zpWtoFm0NUZGdIr+ PfYk9GIpgADNIf5qkxWfjz8qMWNtXhCHu9oO2p9sg+PKEE2Fu6XqdH3pJxCcydzz6jvG SX9NXzyCl1CTao+IIMI4Y7fHRsyVdbxSNp07X2ZEIDmBXaU1NSvEUNtlT2IK/4aeZ6Om duFJlru3RyIJ3EB+lh5ABp8EmANDFzDW3vgWu/+Cjrojs3ZG+PlyURMZC+zUVCAYTqRy Eekg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=G3gJItvIsBy0Wqv5zp9byJggE0/dNpKKEtI9triE0NA=; b=a3nWY7J6xq6fXstiDg6kFIZ43ZN9HGyTtaoILCKa4GYf3wMpVflKhtOZSUbpJbixuU /Vn3cLgEb5amOfzdaezvQScVTdI0pShilxx4TccueHmTv74YXPAOh9c0tNmnk7XnXhKY ZiO6GaSOnvXJ9Y5fus/rpBVG9wvp83a2XCFLNn3s11Xvqd6xdMYIXMSRa2tgV4hzEsdh OelMHL+dNKtGn/OtHR0vQO9Q5ETgMXdS0Z/3jxgbi5wYbhiC7slSOlnfuC9HHMApDk9R yc5x3j7MNvsW//wA0HwlamAoY45Dp4qgQaQbUJz1/P8s27/tDFIkWV4L/p0+zcUZ9Elf MhkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c83si450246pfd.185.2018.02.10.21.06.00; Sat, 10 Feb 2018 21:06:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753646AbeBKFFK (ORCPT + 99 others); Sun, 11 Feb 2018 00:05:10 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:41540 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752701AbeBKEdn (ORCPT ); Sat, 10 Feb 2018 23:33:43 -0500 Received: from [2a02:8011:400e:2:6f00:88c8:c921:d332] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ekjKe-0002hG-UU; Sun, 11 Feb 2018 04:33:41 +0000 Received: from ben by deadeye with local (Exim 4.90) (envelope-from ) id 1ekjKX-0004TC-Ix; Sun, 11 Feb 2018 04:33:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Mauro Carvalho Chehab" , "Hans Verkuil" , "Markus Elfring" Date: Sun, 11 Feb 2018 04:20:06 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.2 22/79] media: omap_vout: Fix a possible null pointer dereference in omap_vout_open() In-Reply-To: X-SA-Exim-Connect-IP: 2a02:8011:400e:2:6f00:88c8:c921:d332 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.2.99-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Markus Elfring commit bfba2b3e21b9426c0f9aca00f3cad8631b2da170 upstream. Move a debug message so that a null pointer access can not happen for the variable "vout" in this function. Fixes: 5c7ab6348e7b3fcca2b8ee548306c774472971e2 ("V4L/DVB: V4L2: Add support for OMAP2/3 V4L2 display driver on top of DSS2") Signed-off-by: Markus Elfring Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab [bwh: Backported to 3.2: adjust filename] Signed-off-by: Ben Hutchings --- drivers/media/video/omap/omap_vout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -1003,11 +1003,12 @@ static int omap_vout_open(struct file *f struct omap_vout_device *vout = NULL; vout = video_drvdata(file); - v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "Entering %s\n", __func__); if (vout == NULL) return -ENODEV; + v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev, "Entering %s\n", __func__); + /* for now, we only support single open */ if (vout->opened) return -EBUSY;