diff options
| author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-17 10:56:11 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-06-17 10:56:11 -0700 |
| commit | 716f37f0b1935f62d717d0ca930453e10ddb4f08 (patch) | |
| tree | 4a8cf7152623f985bad35ed9f700167602f9e520 /usb/usb-mon-kill-bkl-usage.patch | |
| parent | 257f39f2ae41a2830e6aac990ffcf9d419875ff5 (diff) | |
| download | patches-716f37f0b1935f62d717d0ca930453e10ddb4f08.tar.gz | |
usb patches and 2 serial ones
Diffstat (limited to 'usb/usb-mon-kill-bkl-usage.patch')
| -rw-r--r-- | usb/usb-mon-kill-bkl-usage.patch | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/usb/usb-mon-kill-bkl-usage.patch b/usb/usb-mon-kill-bkl-usage.patch new file mode 100644 index 00000000000000..fece0d81272029 --- /dev/null +++ b/usb/usb-mon-kill-bkl-usage.patch @@ -0,0 +1,100 @@ +From arnd@arndb.de Thu Jun 17 10:45:23 2010 +From: Arnd Bergmann <arnd@arndb.de> +Date: Tue, 1 Jun 2010 23:04:45 +0200 +Subject: USB: mon: kill BKL usage +To: Greg KH <gregkh@suse.de> +Cc: linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, linux-usb@vger.kernel.org, Frederic Weisbecker <fweisbec@gmail.com>, John Kacur <jkacur@redhat.com>, Andi Kleen <andi@firstfloor.org> +Message-ID: <1275426285-9088-7-git-send-email-arnd@arndb.de> + + +compat_ioctl does not use the BKL, so I assume that +the native function does not need it either. + +The open function is already protected by the +driver's mutex, the BKL is probably not needed +here either. + +Signed-off-by: Arnd Bergmann <arnd@arndb.de> +Cc: Alan Stern <stern@rowland.harvard.edu> +Cc: Pete Zaitcev <zaitcev@redhat.com> +Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> + + +--- + drivers/usb/mon/mon_bin.c | 22 ++-------------------- + 1 file changed, 2 insertions(+), 20 deletions(-) + +--- a/drivers/usb/mon/mon_bin.c ++++ b/drivers/usb/mon/mon_bin.c +@@ -646,17 +646,14 @@ static int mon_bin_open(struct inode *in + size_t size; + int rc; + +- lock_kernel(); + mutex_lock(&mon_lock); + if ((mbus = mon_bus_lookup(iminor(inode))) == NULL) { + mutex_unlock(&mon_lock); +- unlock_kernel(); + return -ENODEV; + } + if (mbus != &mon_bus0 && mbus->u_bus == NULL) { + printk(KERN_ERR TAG ": consistency error on open\n"); + mutex_unlock(&mon_lock); +- unlock_kernel(); + return -ENODEV; + } + +@@ -689,7 +686,6 @@ static int mon_bin_open(struct inode *in + + file->private_data = rp; + mutex_unlock(&mon_lock); +- unlock_kernel(); + return 0; + + err_allocbuff: +@@ -698,7 +694,6 @@ err_allocvec: + kfree(rp); + err_alloc: + mutex_unlock(&mon_lock); +- unlock_kernel(); + return rc; + } + +@@ -954,7 +949,7 @@ static int mon_bin_queued(struct mon_rea + + /* + */ +-static int mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ++static long mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg) + { + struct mon_reader_bin *rp = file->private_data; + // struct mon_bus* mbus = rp->r.m_bus; +@@ -1094,19 +1089,6 @@ static int mon_bin_ioctl(struct file *fi + return ret; + } + +-static long mon_bin_unlocked_ioctl(struct file *file, unsigned int cmd, +- unsigned long arg) +-{ +- int ret; +- +- lock_kernel(); +- ret = mon_bin_ioctl(file, cmd, arg); +- unlock_kernel(); +- +- return ret; +-} +- +- + #ifdef CONFIG_COMPAT + static long mon_bin_compat_ioctl(struct file *file, + unsigned int cmd, unsigned long arg) +@@ -1250,7 +1232,7 @@ static const struct file_operations mon_ + .read = mon_bin_read, + /* .write = mon_text_write, */ + .poll = mon_bin_poll, +- .unlocked_ioctl = mon_bin_unlocked_ioctl, ++ .unlocked_ioctl = mon_bin_ioctl, + #ifdef CONFIG_COMPAT + .compat_ioctl = mon_bin_compat_ioctl, + #endif |
