Re: [PATCH v3] USB: Fix device driver race

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

 



On Thu, 2020-07-23 at 17:58 -0400, Alan Stern wrote:
> On Thu, Jul 23, 2020 at 11:30:39PM +0200, Bastien Nocera wrote:
> > When a new device with a specialised device driver is plugged in,
> > the
> > new driver will be modprobe()'d but the driver core will attach the
> > "generic" driver to the device.
> > 
> > After that, nothing will trigger a reprobe when the modprobe()'d
> > device
> > driver has finished initialising, as the device has the "generic"
> > driver attached to it.
> > 
> > Trigger a reprobe ourselves when new specialised drivers get
> > registered.
> > 
> > Fixes: 88b7381a939d
> > Signed-off-by: Bastien Nocera <hadess@xxxxxxxxxx>
> 
> Better than before, but there are still some things to improve.

That's kind of you to say, but it was really incredibly sloppy. I've
sent a v4 that only runs the reprobe on device that could be attached
to the new driver.

It was closer to an early version I made locally and didn't work
because I forgot that ->id_table could also be used for matching, and
because I was only running it when ->match was present, the reprobe was
never actually run...

This should all be fixed now.

Cheers




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux