Re: [PATCH] USB: serial: Enforce USB driver and USB serial driver match

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

 



On Tue, 29 May 2012, Johan Hovold wrote:

> > I am not too sure about that.  What happens here is that you've got the
> > usbserial_generic driver bound to the interface and serial->type
> > pointing to pl2303.  But pl2303 has already been unloaded successfully,
> > as it wasn't bound to any device as far as the system knew.  You
> > therefore end up calling a serial->type->disconnect pointing into the
> > unloaded pl2303 driver.
> 
> Yes, and the disconnect method gets set in usb_serial_register_drivers
> these days so it could indeed be related to the problem you found. Crash
> doesn't occur on every reload either.

Okay, I see a little of what's going on.  fixup_generic() sets the
pl2303 disconnect method to usb_serial_generic_disconnect().

This means that serial->type->disconnect did not point into the
unloaded pl2303 driver, although serial->type did.  But the dereference 
of serial->type succeeded; the crash didn't occur until 
serial->type->disconnect was dereferenced.  So I still don't 
understand.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

  Powered by Linux