usbdev: BKL pushdown
Add explicit lock_kernel() calls to usbdev_open() Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
@@ -565,6 +565,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
|
|||||||
struct dev_state *ps;
|
struct dev_state *ps;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
|
lock_kernel();
|
||||||
/* Protect against simultaneous removal or release */
|
/* Protect against simultaneous removal or release */
|
||||||
mutex_lock(&usbfs_mutex);
|
mutex_lock(&usbfs_mutex);
|
||||||
|
|
||||||
@@ -611,6 +612,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
|
|||||||
if (ret)
|
if (ret)
|
||||||
kfree(ps);
|
kfree(ps);
|
||||||
mutex_unlock(&usbfs_mutex);
|
mutex_unlock(&usbfs_mutex);
|
||||||
|
unlock_kernel();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user