]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
USB: serial: don't call release without attach
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 9 Oct 2009 16:43:12 +0000 (12:43 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Oct 2009 22:11:49 +0000 (15:11 -0700)
commitdd02f3999f68aadaf7b3e61586fda3f5caac3ead
treee975a59fad89b9a61968fd8eb8163a2b5d1c86e2
parentf33206c1e3c1a34ba76d9a009a0bdde63ef9248d
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>
drivers/usb/serial/usb-serial.c
include/linux/usb/serial.h