From patchwork Thu Apr 29 03:42:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frederic Weisbecker X-Patchwork-Id: 95852 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3T3gpNN022279 for ; Thu, 29 Apr 2010 03:42:52 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757005Ab0D2Dmu (ORCPT ); Wed, 28 Apr 2010 23:42:50 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]:40342 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752234Ab0D2Dmr (ORCPT ); Wed, 28 Apr 2010 23:42:47 -0400 Received: by wwi14 with SMTP id 14so1334923wwi.19 for ; Wed, 28 Apr 2010 20:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:x-mailer-version:in-reply-to:references; bh=uN5PZd9RxfGe+mFKr4grUy7B9mjZU/2geQECZvRSK2E=; b=txy8ukiToQnZSK7noKG6/trJxZ3Lu6oK89SiNUaN9/FrYLwDoWEnY7eK5b4e0T41KC nQHWGyNGFxW+7Z9bFdvqYfYn0VaeO1r67/GOQ18y219Mw7qh8b6ndvhODw3bS/2ozhxJ swYQL7hGss8NQhE4eVOK8VcnFwhywvfZv12K4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:x-mailer-version :in-reply-to:references; b=abjleDGlUhbgFO5WIkAEYkGsd/tyPrQuVPU3Lbr4bvCCQakwclanqR6dx/631+Ra/l 4/BStfB5rp7VthY2ctrn8yGAGqFQVqQOLnla0Bf35Z7gfaxfX/cr2ThMAI62PlRZX41a 8w6WFcjYIpr4540wrwBlHy8yFz1OtpsV6zyy4= Received: by 10.216.173.202 with SMTP id v52mr2490900wel.200.1272512566034; Wed, 28 Apr 2010 20:42:46 -0700 (PDT) Received: from localhost.localdomain (ADijon-551-1-34-36.w90-26.abo.wanadoo.fr [90.26.105.36]) by mx.google.com with ESMTPS id x1sm3671682wbx.13.2010.04.28.20.42.44 (version=SSLv3 cipher=RC4-MD5); Wed, 28 Apr 2010 20:42:45 -0700 (PDT) From: Frederic Weisbecker To: LKML Cc: LKML , Frederic Weisbecker , Laurent Pinchart , Hans Verkuil , Arnd Bergmann , John Kacur , Linus Torvalds , Jan Blunck , Thomas Gleixner , Mauro Carvalho Chehab , Linux Media Mailing List Subject: [PATCH 1/5] v4l: Pushdown bkl into video_ioctl2 Date: Thu, 29 Apr 2010 05:42:40 +0200 Message-Id: <1272512564-14683-2-git-send-regression-fweisbec@gmail.com> X-Mailer: git-send-regression X-Mailer-version: 0.1, "The maintainer couldn't reproduce after one week full time debugging" special version. In-Reply-To: References: Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 29 Apr 2010 03:42:52 +0000 (UTC) diff --git a/drivers/media/video/v4l2-ioctl.c b/drivers/media/video/v4l2-ioctl.c index 3da8d8f..0ff2595 100644 --- a/drivers/media/video/v4l2-ioctl.c +++ b/drivers/media/video/v4l2-ioctl.c @@ -16,6 +16,7 @@ #include #include #include +#include #define __OLD_VIDIOC_ /* To allow fixing old calls */ #include @@ -2007,8 +2008,8 @@ static unsigned long cmd_input_size(unsigned int cmd) } } -long video_ioctl2(struct file *file, - unsigned int cmd, unsigned long arg) +long video_ioctl2_unlocked(struct file *file, + unsigned int cmd, unsigned long arg) { char sbuf[128]; void *mbuf = NULL; @@ -2102,4 +2103,16 @@ out: kfree(mbuf); return err; } +EXPORT_SYMBOL(video_ioctl2_unlocked); + +long video_ioctl2(struct file *file, unsigned int cmd, unsigned long arg) +{ + long ret; + + lock_kernel(); + ret = video_ioctl2_unlocked(file, cmd, arg); + unlock_kernel(); + + return ret; +} EXPORT_SYMBOL(video_ioctl2); diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index e8ba0f2..08b3e42 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -316,5 +316,7 @@ extern long video_usercopy(struct file *file, unsigned int cmd, /* Standard handlers for V4L ioctl's */ extern long video_ioctl2(struct file *file, unsigned int cmd, unsigned long arg); +extern long video_ioctl2_unlocked(struct file *file, + unsigned int cmd, unsigned long arg); #endif /* _V4L2_IOCTL_H */