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, May 29, 2012 at 08:37:32PM +0200, Bjørn Mork wrote:
> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:
> 
> > This is the
> >
> > 	serial->type->disconnect(serial);
> >
> > call near the end of usb_serial_disconnect().  Evidently the crash 
> > occurs because pl2303_device doesn't have a disconnect method.
> >
> > It would help if the serial.h file explained clearly which methods are 
> > optional and which are obligatory.  At any rate, the bug can be fixed 
> > by testing whether serial->type->disconnect is non-NULL before calling 
> > it.
> >
> > This does not appear to be related to Bjørn's problem.
> 
> 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.
 
Thanks,
Johan

--
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