usb:fix disconnect vs. open race in rio500 On SMP disconnect and open can race. Fix it with BKL, as this was caused by removing BKL in disconnect(). Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx> -- --- a/drivers/usb/misc/rio500.c.alt 2010-01-14 17:11:42.344005497 +0100 +++ b/drivers/usb/misc/rio500.c 2010-01-14 17:12:37.116881581 +0100 @@ -490,6 +490,7 @@ static void disconnect_rio(struct usb_in struct rio_usb_data *rio = usb_get_intfdata (intf); usb_set_intfdata (intf, NULL); + lock_kernel(); if (rio) { usb_deregister_dev(intf, &usb_rio_class); @@ -509,6 +510,7 @@ static void disconnect_rio(struct usb_in rio->present = 0; mutex_unlock(&(rio->lock)); } + unlock_kernel(); } static struct usb_device_id rio_table [] = { -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html