USB-BKL: Convert usb_driver ioctl to unlocked_ioctl
And audit all the users. None needed the BKL. That was easy because there was only very few around. Tested with allmodconfig build on x86-64 Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> From: Andi Kleen <ak@linux.intel.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6e12ea4658
commit
c532b29a6f
@@ -1668,13 +1668,10 @@ static int proc_ioctl(struct dev_state *ps, struct usbdevfs_ioctl *ctl)
|
||||
default:
|
||||
if (intf->dev.driver)
|
||||
driver = to_usb_driver(intf->dev.driver);
|
||||
if (driver == NULL || driver->ioctl == NULL) {
|
||||
if (driver == NULL || driver->unlocked_ioctl == NULL) {
|
||||
retval = -ENOTTY;
|
||||
} else {
|
||||
/* keep API that guarantees BKL */
|
||||
lock_kernel();
|
||||
retval = driver->ioctl(intf, ctl->ioctl_code, buf);
|
||||
unlock_kernel();
|
||||
retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf);
|
||||
if (retval == -ENOIOCTLCMD)
|
||||
retval = -ENOTTY;
|
||||
}
|
||||
|
Reference in New Issue
Block a user