[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181201024847.GH28501@garbanzo.do-not-panic.com>
Date: Fri, 30 Nov 2018 18:48:47 -0800
From: Luis Chamberlain <mcgrof@...nel.org>
To: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
linux-nvdimm@...ts.01.org, tj@...nel.org,
akpm@...ux-foundation.org, linux-pm@...r.kernel.org,
jiangshanlai@...il.com, rafael@...nel.org, len.brown@...el.com,
pavel@....cz, zwisler@...nel.org, dan.j.williams@...el.com,
dave.jiang@...el.com, bvanassche@....org,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
brendanhiggins@...gle.com
Subject: Re: [driver-core PATCH v7 4/9] driver core: Probe devices
asynchronously instead of the driver
On Wed, Nov 28, 2018 at 04:32:26PM -0800, Alexander Duyck wrote:
> Probe devices asynchronously instead of the driver.
> +static void __driver_attach_async_helper(void *_dev, async_cookie_t cookie)
> +{
> + struct device *dev = _dev;
> + struct device_driver *drv;
> +
> + __device_driver_lock(dev, dev->parent);
> +
> + /*
> + * If someone attempted to bind a driver either successfully or
> + * unsuccessfully before we got here we should just skip the driver
> + * probe call.
> + */
> + drv = dev_get_drv_async(dev);
> + if (drv && !dev->driver)
> + driver_probe_device(drv, dev);
I believe this should mean drivers which have async work on probe can
deadlock. For instance, if a driver does call async_schedule() or a
derivative call does this for it, the kernel will call
async_synchronize_full() and I believe we deadlock.
Are we sure most subsystems which would use async probe will not have
an async_schedule() call?
Luis
Powered by blists - more mailing lists