diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-06-09 19:13:14 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-06-09 19:13:14 -0700 |
| commit | 04ca6ecc24aa96a2b2fcc24f5a8e9df9e169c25a (patch) | |
| tree | c69be97c751f97a855dd6208d077939332ceafe9 /usb | |
| parent | dfd1146fdc69d3b5e21dcbb0d835671b2c081aea (diff) | |
| download | patches-04ca6ecc24aa96a2b2fcc24f5a8e9df9e169c25a.tar.gz | |
removed hiddev unlocked ioctl patch
Diffstat (limited to 'usb')
| -rw-r--r-- | usb/usb-hiddev-switch-to-unlocked_ioctl.patch | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/usb/usb-hiddev-switch-to-unlocked_ioctl.patch b/usb/usb-hiddev-switch-to-unlocked_ioctl.patch deleted file mode 100644 index e9bcea751f06e6..00000000000000 --- a/usb/usb-hiddev-switch-to-unlocked_ioctl.patch +++ /dev/null @@ -1,74 +0,0 @@ -From alan@lxorguk.ukuu.org.uk Fri Jun 6 15:14:50 2008 -From: Alan Cox <alan@lxorguk.ukuu.org.uk> -Date: Thu, 22 May 2008 22:22:17 +0100 -Subject: USB: hiddev: Switch to unlocked_ioctl -To: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, linux-usb@vger.kernel.org -Message-ID: <20080522222217.3a785487@core> - - -Push down the BKL. In some cases compat_ioctl already doesn't take the -BKL so we don't either. Some of the locking here seems already dubious -and object lifetimes want documenting - -Signed-off-by: Alan Cox <alan@redhat.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/hid/usbhid/hiddev.c | 11 +++++++++-- - 1 file changed, 9 insertions(+), 2 deletions(-) - ---- a/drivers/hid/usbhid/hiddev.c -+++ b/drivers/hid/usbhid/hiddev.c -@@ -406,6 +406,7 @@ static noinline int hiddev_ioctl_usage(s - uref_multi = kmalloc(sizeof(struct hiddev_usage_ref_multi), GFP_KERNEL); - if (!uref_multi) - return -ENOMEM; -+ lock_kernel(); - uref = &uref_multi->uref; - if (cmd == HIDIOCGUSAGES || cmd == HIDIOCSUSAGES) { - if (copy_from_user(uref_multi, user_arg, -@@ -501,12 +502,15 @@ static noinline int hiddev_ioctl_usage(s - } - - goodreturn: -+ unlock_kernel(); - kfree(uref_multi); - return 0; - fault: -+ unlock_kernel(); - kfree(uref_multi); - return -EFAULT; - inval: -+ unlock_kernel(); - kfree(uref_multi); - return -EINVAL; - } -@@ -540,7 +544,7 @@ static noinline int hiddev_ioctl_string( - return len; - } - --static int hiddev_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) -+static long hiddev_ioctl(struct file *file, unsigned int cmd, unsigned long arg) - { - struct hiddev_list *list = file->private_data; - struct hiddev *hiddev = list->hiddev; -@@ -555,7 +559,10 @@ static int hiddev_ioctl(struct inode *in - struct usbhid_device *usbhid = hid->driver_data; - void __user *user_arg = (void __user *)arg; - int i; -+ -+ /* Called without BKL by compat methods so no BKL taken */ - -+ /* FIXME: Who or what stop this racing with a disconnect ?? */ - if (!hiddev->exist) - return -EIO; - -@@ -768,7 +775,7 @@ static const struct file_operations hidd - .poll = hiddev_poll, - .open = hiddev_open, - .release = hiddev_release, -- .ioctl = hiddev_ioctl, -+ .unlocked_ioctl = hiddev_ioctl, - .fasync = hiddev_fasync, - #ifdef CONFIG_COMPAT - .compat_ioctl = hiddev_compat_ioctl, |
