]> git.baikalelectronics.ru Git - kernel.git/commit
USB-BKL: Remove BKL use for usb serial driver probing
authorAndi Kleen <ak@linux.intel.com>
Tue, 1 Jun 2010 21:04:42 +0000 (23:04 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 10 Aug 2010 21:35:36 +0000 (14:35 -0700)
commitf538c711e71f85fec73fc015513bcf00c1524584
tree01ec5ec82b3b08a20b64e5a16cbcd3a55aaf1002
parent7d72e64e21611fd7eba8604e5f1fe4c073937895
USB-BKL: Remove BKL use for usb serial driver probing

The usb serial driver initialization tried to use the BKL to stop
driver modules from unloading, but that didn't work anyways.

There was already some code to do proper try_module_get,
but it was conditional on having a new probe interface.
I checked all the low level drivers and they all have proper
.owner = THIS_MODULE, so it's ok to always use.

The other problem was the usb_serial_driver_list needing
protection by a lock. This was broken anyways because unregister
did not necessarily have the BKL.

I extended the extending table_lock mutex to protect this case too.

With these changes the BKL can be removed here.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/usb-serial.c