USB: usb-serial: replace shutdown with disconnect, release
This patch (as1254) splits up the shutdown method of usb_serial_driver into a disconnect and a release method. The problem is that the usb-serial core was calling shutdown during disconnect handling, but drivers didn't expect it to be called until after all the open file references had been closed. The result was an oops when the close method tried to use memory that had been deallocated by shutdown. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
c706ebdfc8
commit
f9c99bb8b3
@@ -809,7 +809,7 @@ static int keyspan_pda_startup(struct usb_serial *serial)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void keyspan_pda_shutdown(struct usb_serial *serial)
|
||||
static void keyspan_pda_release(struct usb_serial *serial)
|
||||
{
|
||||
dbg("%s", __func__);
|
||||
|
||||
@@ -869,7 +869,7 @@ static struct usb_serial_driver keyspan_pda_device = {
|
||||
.tiocmget = keyspan_pda_tiocmget,
|
||||
.tiocmset = keyspan_pda_tiocmset,
|
||||
.attach = keyspan_pda_startup,
|
||||
.shutdown = keyspan_pda_shutdown,
|
||||
.release = keyspan_pda_release,
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user