Comment 3 for bug 1803942

Revision history for this message
Robert Liu (robertliu) wrote :

I commented out this patch of 876dcb and cannot reproduce the issue afterward.

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index 2c964f5..37c0105 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -868,6 +868,13 @@ static void __device_release_driver(struct device *dev, struct device *parent)
    dev->bus->remove(dev);
   else if (drv->remove)
    drv->remove(dev);
+ /*
+ * A concurrent invocation of the same function might
+ * have released the driver successfully while this one
+ * was waiting, so check for that.
+ */
+ if (dev->driver != drv)
+ return;

   device_links_driver_cleanup(dev);
   dma_deconfigure(dev);