Re: [PATCH spice-gtk] usb-device-manager: Fix coldplug race

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

 



ack

----- Mensaje original -----
> It is possible for us to see a device show up twice, if it gets
> plugged
> in between us starting listening for new devices and doing
> "coldplug", then
> it will get added once from the coldplug code, and then again from
> from
> the hotplug code path. We already have code checking for this, but
> the check
> is only compiled in under Windows -> Remove the #ifdef to also catch
> this
> under Linux.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> ---
>  gtk/usb-device-manager.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
> index 3f4c272..34ff37c 100644
> --- a/gtk/usb-device-manager.c
> +++ b/gtk/usb-device-manager.c
> @@ -699,13 +699,11 @@ static void
> spice_usb_device_manager_add_dev(SpiceUsbDeviceManager  *self,
>          return;
>      }
>  
> -#ifdef G_OS_WIN32
>      device = spice_usb_device_manager_find_device(self, bus,
>      address);
>      if (device) {
>          SPICE_DEBUG("USB device at %d.%d already exists, ignored",
>          bus, address);
>          return;
>      }
> -#endif
>  
>      if (priv->coldplug_list)
>          dev_list = priv->coldplug_list;
> --
> 1.8.1.2
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]