]> err.no Git - linux-2.6/commitdiff
usbdev: BKL pushdown
authorJonathan Corbet <corbet@lwn.net>
Fri, 16 May 2008 20:25:20 +0000 (14:25 -0600)
committerJonathan Corbet <corbet@lwn.net>
Fri, 20 Jun 2008 20:05:53 +0000 (14:05 -0600)
Add explicit lock_kernel() calls to usbdev_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
drivers/usb/core/devio.c

index de17738f3acbab5c69066a81a31b041d25c5bf38..9218cca210431dea3b840e85b4fa9a0f0653a3fd 100644 (file)
@@ -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;
 }