Re: [PATCH 04/10] driver core: Don't return EPROBE_DEFER to userspace during sysfs bind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux