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, 27 May 2014 22:04:02 +0000 (15:04 -0700)
commit8452727de70f6ad850cd6d0aaa18b5d9050aa63b
tree7419d97cde020b99369a2caaf45af4bd4199e493
parent353fe198602e8b4d1c7bdcceb8e60955087201b1
USB: sierra: fix use after free at suspend/resume

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")

Cc: <stable@vger.kernel.org> # v2.6.32
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/sierra.c