Hi,

On Thu, Jun 27, 2013 at 3:31 AM, Hans de Goede <hdego...@redhat.com> wrote:

> Hi,
>
>  +/* device will still be marked as attached if hotplug monitor thread
>> +* hasn't processed remove event yet */
>> +if (handle->dev->attached) {
>>
>
> This check is racy, you need to take the hotplug lock before making this
> check, also linux_device_disconnected expects the hotplug lock to be
> taken when it is called, so simply but a check around the entire block.


Ok, patch revised. With the current design this race condition is benign,
but better to be safe than sorry if something changes in the future.


> Ok, that makes sense, I can live with having a check in 2 places, please
> respin with the suggested
> fixes and send with git send-email, or attach, so that your mail client
> does not foobar the patch.
>

Patch is attached.

Regards,
Chris

Attachment: 0001-linux-Handle-device-disconnection-early-when-possibl.patch
Description: Binary data

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to