aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-16 14:25:20 -0600
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:53 -0600
commitb5b4aa67da65aeb58718e0a39158b293873ac572 (patch)
tree03128da070f7110e882c58866478415575d577bf /drivers
parent1af46fd72d6c18c1d96ce7f3491b841055e9dcfd (diff)
usbdev: BKL pushdown
Add explicit lock_kernel() calls to usbdev_open() Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/core/devio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index de17738f3ac..9218cca2104 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -565,6 +565,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
struct dev_state *ps;
int ret;
+ lock_kernel();
/* Protect against simultaneous removal or release */
mutex_lock(&usbfs_mutex);
@@ -611,6 +612,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
if (ret)
kfree(ps);
mutex_unlock(&usbfs_mutex);
+ unlock_kernel();
return ret;
}