mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-09-22 22:54:19 +00:00
USB: serial: don't call release without attach
commit a4720c650b68a5fe7faed2edeb0ad12645f7ae63 upstream. This patch (as1295) fixes a recently-added bug in the USB serial core. If certain kinds of errors occur during probing, the core may call a serial driver's release method without previously calling the attach method. This causes some drivers (io_ti in particular) to perform an invalid memory access. The patch adds a new flag to keep track of whether or not attach has been called. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Jean-Denis Girard <jd.girard@sysnux.pf> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f33206c1e3
commit
dd02f3999f
@@ -148,6 +148,7 @@ struct usb_serial {
|
||||
struct usb_interface *interface;
|
||||
unsigned char disconnected:1;
|
||||
unsigned char suspending:1;
|
||||
unsigned char attached:1;
|
||||
unsigned char minor;
|
||||
unsigned char num_ports;
|
||||
unsigned char num_port_pointers;
|
||||
|
||||
Reference in New Issue
Block a user