Hi, On Thu, Jan 12, 2012 at 5:54 PM, Oliver Neukum <oneukum@xxxxxxx> wrote: > you should however hold the lock while you unset hiddev->exist The patch doesn't change the rule. > and you should unset hiddev->exist before you call usb_deregister_dev(). The lock is not hold before reading hiddev->exist and writing list->hiddev->open in hiddev_open, so I choose to put usb_deregister_dev before unsetting hiddev->exist in hiddev_disconnect to avoid possible race. thanks, -- Ming Lei -- 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