Re: [PATCH] HID: usbhid: fix dead lock between open and disconect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux