[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM5PR2101MB1030ADC2C68C322A91706011DCD90@DM5PR2101MB1030.namprd21.prod.outlook.com>
Date: Tue, 6 Mar 2018 18:30:33 +0000
From: "Michael Kelley (EOSG)" <Michael.H.Kelley@...rosoft.com>
To: Dexuan Cui <decui@...rosoft.com>,
"bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
"olaf@...fle.de" <olaf@...fle.de>,
"apw@...onical.com" <apw@...onical.com>,
"jasowang@...hat.com" <jasowang@...hat.com>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"driverdev-devel@...uxdriverproject.org"
<driverdev-devel@...uxdriverproject.org>,
Haiyang Zhang <haiyangz@...rosoft.com>,
"vkuznets@...hat.com" <vkuznets@...hat.com>,
"marcelo.cerri@...onical.com" <marcelo.cerri@...onical.com>,
Jack Morgenstein <jackm@...lanox.com>,
"stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH v3 3/6] PCI: hv: serialize the present/eject work items
> -----Original Message-----
> From: Dexuan Cui
> Sent: Tuesday, March 6, 2018 10:22 AM
> To: bhelgaas@...gle.com; linux-pci@...r.kernel.org; KY Srinivasan <kys@...rosoft.com>;
> Stephen Hemminger <sthemmin@...rosoft.com>; olaf@...fle.de; apw@...onical.com;
> jasowang@...hat.com
> Cc: linux-kernel@...r.kernel.org; driverdev-devel@...uxdriverproject.org; Haiyang Zhang
> <haiyangz@...rosoft.com>; vkuznets@...hat.com; marcelo.cerri@...onical.com; Michael
> Kelley (EOSG) <Michael.H.Kelley@...rosoft.com>; Dexuan Cui <decui@...rosoft.com>; Jack
> Morgenstein <jackm@...lanox.com>; stable@...r.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 <decui@...rosoft.com>
> Tested-by: Adrian Suhov <v-adsuho@...rosoft.com>
> Tested-by: Chris Valean <v-chvale@...rosoft.com>
> Cc: Vitaly Kuznetsov <vkuznets@...hat.com>
> Cc: Jack Morgenstein <jackm@...lanox.com>
> Cc: stable@...r.kernel.org
> Cc: Stephen Hemminger <sthemmin@...rosoft.com>
> Cc: K. Y. Srinivasan <kys@...rosoft.com>
> ---
> drivers/pci/host/pci-hyperv.c | 17 ++++++++++++++---
> 1 file changed, 14 insertions(+), 3 deletions(-)
>
Reviewed-by: Michael Kelley <mikelley@...rosoft.com>
Powered by blists - more mailing lists