• Andi Kleen's avatar
    USB-BKL: Remove BKL use for usb serial driver probing · 0daeed38
    Andi Kleen authored
    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: default avatarAndi Kleen <ak@linux.intel.com>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    0daeed38
usb-serial.c 37.3 KB