2010/5/15 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>: > On Fri, 14 May 2010 tom.leiming@xxxxxxxxx wrote: > >> From: Ming Lei <tom.leiming@xxxxxxxxx> >> > Instead of changing what the code does in the normal case, why not just > prevent it from being used with root hubs? Add an initial test: > > /* Removing root hubs makes no sense */ > if (!udev->parent) > return -EINVAL; > > usb_lock_device(udev) ... > Yes, it is really doable. My question is that why usb_set_configuration(-1) may avoid races according to the comment, and what is the races ? Thanks, -- Lei Ming -- 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