diff mbox series

[v2,4/7] drivers/base, __device_release_driver(): Do not wait for asynchronous probing

Message ID 20181017234006.124251-5-bvanassche@acm.org (mailing list archive)
State Changes Requested
Headers show
Series Increase SCSI disk probing concurrency | expand

Commit Message

Bart Van Assche Oct. 17, 2018, 11:40 p.m. UTC
Since __device_release_driver() is called with the device lock held
and since the same device lock is obtained by the functions that
perform asynchronous probing (driver_attach_async() and
__device_attach_async_helper()), asynchronous probing is already
serialized against __device_release_driver(). Remove the
async_synchronize_full() call from __device_release_driver() to
avoid that a deadlock is triggered.

Fixes: 765230b5f084 ("driver-core: add asynchronous probing support for drivers").
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Lee Duncan <lduncan@suse.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 drivers/base/dd.c | 3 ---
 1 file changed, 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index f8d645aa09be..0a3c9f8702de 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -999,9 +999,6 @@  static void __device_release_driver(struct device *dev, struct device *parent)
 
 	drv = dev->driver;
 	if (drv) {
-		if (driver_allows_async_probing(drv))
-			async_synchronize_full();
-
 		while (device_links_busy(dev)) {
 			device_unlock(dev);
 			if (parent)