]> git.ipfire.org Git - people/ms/linux.git/commit
USB: serial: fix potential use-after-free after failed probe
authorJohan Hovold <johan@kernel.org>
Wed, 18 Feb 2015 03:34:50 +0000 (10:34 +0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:22:31 +0000 (13:22 +0100)
commit9fd948c1b776066a84386d146f3a4e848b976bd5
tree990b0b6471ceb2ac067759629509cca3223d9f48
parent565acebb005569dc8527a9b2ad2c904ba92bf9d1
USB: serial: fix potential use-after-free after failed probe

commit 07fdfc5e9f1c966be8722e8fa927e5ea140df5ce upstream.

Fix return value in probe error path, which could end up returning
success (0) on errors. This could in turn lead to use-after-free or
double free (e.g. in port_remove) when the port device is removed.

Fixes: c706ebdfc895 ("USB: usb-serial: call port_probe and port_remove
at the right times")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Greg Kroah-Hartman <greg@kroah.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/bus.c