Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5b4aa67 authored by Jonathan Corbet's avatar Jonathan Corbet
Browse files

usbdev: BKL pushdown



Add explicit lock_kernel() calls to usbdev_open()

Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent 1af46fd7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
}