]> bbs.cooldavid.org Git - net-next-2.6.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)
commit0daeed381c6a33fdbdc3b0e9f09d96f0a2a8a195
tree01ec5ec82b3b08a20b64e5a16cbcd3a55aaf1002
parentc532b29a6f6d31e84a7c88f995eebdc75ebd4248
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