]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerLuis Henriques <luis.henriques@canonical.com>
Fri, 20 Jan 2017 11:26:38 +0000 (11:26 +0000)
commit833d476281848cf3e3fe8c7854b0a8b1ba3f284a
tree57cee6ce32a0245d36e21ff04c8e5d3c4e9ad493
parentb51c4b2af2c57472f49bc818bc8ab341327e7828
USB: serial: mos7720: fix parport use-after-free on probe errors

BugLink: http://bugs.launchpad.net/bugs/1655969
commit 75dd211e773afcbc264677b0749d1cf7d937ab2d upstream.

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: b69578df7e98 ("USB: usbserial: mos7720: add support for parallel port on moschip 7715")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
drivers/usb/serial/mos7720.c