USB: sierra: fix use after free at suspend/resume
authorJohan Hovold <jhovold@gmail.com>
Mon, 26 May 2014 17:22:51 +0000 (19:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 Jul 2014 03:09:43 +0000 (20:09 -0700)
commit188cccffa4a009fe9079a599e5f4604934e5f2a3
tree54c9519ebbd79b903bc28a6c6d83a353e2e4d3fc
parentfba1ebed450d9e1a97fb4cf7c711540ffd2a13bf
USB: sierra: fix use after free at suspend/resume

commit 8452727de70f6ad850cd6d0aaa18b5d9050aa63b upstream.

Fix use after free or NULL-pointer dereference during suspend and
resume.

The port data may never have been allocated (port probe failed)
or may already have been released by port_remove (e.g. driver is
unloaded) when suspend and resume are called.

Fixes: e6929a9020ac ("USB: support for autosuspend in sierra while
online")

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/sierra.c