Commit 55ffe233 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: fix a nasty use-after-free bug in the usb-serial core.

parent 9c9e072e
......@@ -530,7 +530,9 @@ static void serial_close(struct tty_struct *tty, struct file * filp)
/* if disconnect beat us to the punch here, there's nothing to do */
if (tty && tty->driver_data) {
__serial_close(port, filp);
tty->driver_data = NULL;
}
port->tty = NULL;
}
static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment