> -----Original Message-----
> From: Dexuan Cui
> Sent: Tuesday, March 6, 2018 10:22 AM
> To: bhelg...@google.com; linux-...@vger.kernel.org; KY Srinivasan 
> <k...@microsoft.com>;
> Stephen Hemminger <sthem...@microsoft.com>; o...@aepfle.de; 
> a...@canonical.com;
> jasow...@redhat.com
> Cc: linux-ker...@vger.kernel.org; driverdev-devel@linuxdriverproject.org; 
> Haiyang Zhang
> <haiya...@microsoft.com>; vkuzn...@redhat.com; marcelo.ce...@canonical.com; 
> Michael
> Kelley (EOSG) <michael.h.kel...@microsoft.com>; Dexuan Cui 
> <de...@microsoft.com>; Jack
> Morgenstein <ja...@mellanox.com>; sta...@vger.kernel.org
> Subject: [PATCH v3 3/6] PCI: hv: serialize the present/eject work items
> 
> When we hot-remove the device, we first receive a PCI_EJECT message and
> then receive a PCI_BUS_RELATIONS message with bus_rel->device_count == 0.
> 
> The first message is offloaded to hv_eject_device_work(), and the second
> is offloaded to pci_devices_present_work(). Both the paths can be running
> list_del(&hpdev->list_entry), causing general protection fault, because
> system_wq can run them concurrently.
> 
> The patch eliminates the race condition.
> 
> Signed-off-by: Dexuan Cui <de...@microsoft.com>
> Tested-by: Adrian Suhov <v-ads...@microsoft.com>
> Tested-by: Chris Valean <v-chv...@microsoft.com>
> Cc: Vitaly Kuznetsov <vkuzn...@redhat.com>
> Cc: Jack Morgenstein <ja...@mellanox.com>
> Cc: sta...@vger.kernel.org
> Cc: Stephen Hemminger <sthem...@microsoft.com>
> Cc: K. Y. Srinivasan <k...@microsoft.com>
> ---
>  drivers/pci/host/pci-hyperv.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 

Reviewed-by: Michael Kelley <mikel...@microsoft.com>
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to