summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/iowarrior.c
diff options
context:
space:
mode:
authorOliver Neukum2010-01-13 15:33:15 +0100
committerGreg Kroah-Hartman2010-03-02 23:54:23 +0100
commit86266452f80545285c14e20a8024f79c4fb88a86 (patch)
treeebb0a287f9bf189737d4924536d18b36492fd330 /drivers/usb/misc/iowarrior.c
parentUSB: Remove BKL from lseek implementations (diff)
downloadkernel-qcow2-linux-86266452f80545285c14e20a8024f79c4fb88a86.tar.gz
kernel-qcow2-linux-86266452f80545285c14e20a8024f79c4fb88a86.tar.xz
kernel-qcow2-linux-86266452f80545285c14e20a8024f79c4fb88a86.zip
USB: Push BKL on open down into the drivers
Straightforward push into the drivers to allow auditing individual drivers separately Signed-off-by: Oliver Neukum <oliver@neukum.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/iowarrior.c')
-rw-r--r--drivers/usb/misc/iowarrior.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
index 5206423211fb..d3c852363883 100644
--- a/drivers/usb/misc/iowarrior.c
+++ b/drivers/usb/misc/iowarrior.c
@@ -602,10 +602,12 @@ static int iowarrior_open(struct inode *inode, struct file *file)
dbg("%s", __func__);
+ lock_kernel();
subminor = iminor(inode);
interface = usb_find_interface(&iowarrior_driver, subminor);
if (!interface) {
+ unlock_kernel();
err("%s - error, can't find device for minor %d", __func__,
subminor);
return -ENODEV;
@@ -615,6 +617,7 @@ static int iowarrior_open(struct inode *inode, struct file *file)
dev = usb_get_intfdata(interface);
if (!dev) {
mutex_unlock(&iowarrior_open_disc_lock);
+ unlock_kernel();
return -ENODEV;
}
@@ -641,6 +644,7 @@ static int iowarrior_open(struct inode *inode, struct file *file)
out:
mutex_unlock(&dev->mutex);
+ unlock_kernel();
return retval;
}