]> git.baikalelectronics.ru Git - kernel.git/commit
USB: serial: mos7720: fix parport use-after-free on probe errors
authorJohan Hovold <johan@kernel.org>
Tue, 3 Jan 2017 15:39:52 +0000 (16:39 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 4 Jan 2017 09:37:19 +0000 (10:37 +0100)
commitf9d5f1f9e9514e14e8a73a679e6f09493c16f062
tree78c903f206950fd0f2573e95ac9e6c98e1f89e01
parentc92e358f6e65bfea6d88fc8c7357ea9c8014bcd1
USB: serial: mos7720: fix parport use-after-free on probe errors

Do not submit the interrupt URB until after the parport has been
successfully registered to avoid another use-after-free in the
completion handler when accessing the freed parport private data in case
of a racing completion.

Fixes: 7e8d093cdbdb ("USB: usbserial: mos7720: add support for parallel
port on moschip 7715")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7720.c