lkml.org 
[lkml]   [2018]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH v3 3/6] PCI: hv: serialize the present/eject work items
    Date


    > -----Original Message-----
    > From: Dexuan Cui
    > Sent: Tuesday, March 6, 2018 1:22 PM
    > To: bhelgaas@google.com; linux-pci@vger.kernel.org; KY Srinivasan
    > <kys@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>;
    > olaf@aepfle.de; apw@canonical.com; jasowang@redhat.com
    > Cc: linux-kernel@vger.kernel.org; driverdev-devel@linuxdriverproject.org;
    > Haiyang Zhang <haiyangz@microsoft.com>; vkuznets@redhat.com;
    > marcelo.cerri@canonical.com; Michael Kelley (EOSG)
    > <Michael.H.Kelley@microsoft.com>; Dexuan Cui <decui@microsoft.com>; Jack
    > Morgenstein <jackm@mellanox.com>; stable@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 <decui@microsoft.com>
    > Tested-by: Adrian Suhov <v-adsuho@microsoft.com>
    > Tested-by: Chris Valean <v-chvale@microsoft.com>
    > Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
    > Cc: Jack Morgenstein <jackm@mellanox.com>
    > Cc: stable@vger.kernel.org
    > Cc: Stephen Hemminger <sthemmin@microsoft.com>
    > Cc: K. Y. Srinivasan <kys@microsoft.com>
    > ---

    Acked-by: Haiyang Zhang <haiyangz@microsoft.com>

    \
     
     \ /
      Last update: 2018-03-09 20:39    [W:2.683 / U:0.512 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site