USB: Push BKL on open down into the drivers
Straightforward push into the drivers to allow auditing individual drivers separately Signed-off-by: Oliver Neukum <oliver@neukum.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
f9de332ebf
commit
86266452f8
@@ -25,6 +25,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/usb.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/smp_lock.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#ifdef CONFIG_USB_DEBUG
|
||||
@@ -274,6 +275,7 @@ static int adu_open(struct inode *inode, struct file *file)
|
||||
|
||||
dbg(2,"%s : enter", __func__);
|
||||
|
||||
lock_kernel();
|
||||
subminor = iminor(inode);
|
||||
|
||||
if ((retval = mutex_lock_interruptible(&adutux_mutex))) {
|
||||
@@ -332,6 +334,7 @@ static int adu_open(struct inode *inode, struct file *file)
|
||||
exit_no_device:
|
||||
mutex_unlock(&adutux_mutex);
|
||||
exit_no_lock:
|
||||
unlock_kernel();
|
||||
dbg(2,"%s : leave, return value %d ", __func__, retval);
|
||||
return retval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user