]> git.baikalelectronics.ru Git - kernel.git/commit
USB: usb_wwan: fix potential NULL-deref at resume
authorJohan Hovold <jhovold@gmail.com>
Mon, 26 May 2014 17:23:17 +0000 (19:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 May 2014 22:04:06 +0000 (15:04 -0700)
commitf5dd749d862e962f1298e8170e3febecfe92cb04
treedb0db9168fd162bc424e8e37156783681e36580f
parent605cac5019f3a2947776576d5b035d6e2898fce3
USB: usb_wwan: fix potential NULL-deref at resume

The interrupt urb was submitted unconditionally at resume, something
which could lead to a NULL-pointer dereference in the urb completion
handler as resume may be called after the port and port data is gone.

Fix this by making sure the interrupt urb is only submitted and active
when the port is open.

Fixes: a2521e4271fe ("USB: serial: full autosuspend support for the
option driver")

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