Skip to content

Commit

Permalink
usbdev: BKL pushdown
Browse files Browse the repository at this point in the history
Add explicit lock_kernel() calls to usbdev_open()

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 1af46fd commit b5b4aa6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit b5b4aa6

Please sign in to comment.