提交 b5b4aa67 编写于 作者: J Jonathan Corbet

usbdev: BKL pushdown

Add explicit lock_kernel() calls to usbdev_open()
Signed-off-by: NJonathan Corbet <corbet@lwn.net>
上级 1af46fd7
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册