On Mon, Jun 07, 2021 at 09:55:46PM -0300, Jason Gunthorpe wrote: > int device_driver_attach(struct device_driver *drv, struct device *dev) > { > @@ -1061,6 +1073,8 @@ int device_driver_attach(struct device_driver *drv, struct device *dev) > > __device_driver_unlock(dev, dev->parent); > > + if (ret == -EPROBE_DEFER) > + return -EAGAIN; > return ret; I'd move this check into bind_store() instead. That would also play well with my earlier suggestion for a simple locking wrapper around driver_probe_device which would get passed the flags argument as well.