dect
/
linux-2.6
Archived
13
0
Fork 0

usbdev: BKL pushdown

Add explicit lock_kernel() calls to usbdev_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Jonathan Corbet 2008-05-16 14:25:20 -06:00
parent 1af46fd72d
commit b5b4aa67da
1 changed files with 2 additions and 0 deletions

View 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;
}