usb: host: xhci: Fix possible wild pointer when handling abort command
authorBaolin Wang <baolin.wang@linaro.org>
Tue, 3 Jan 2017 16:28:47 +0000 (18:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:45 +0000 (11:22 +0100)
commit86bb666386ee632879c278d9e95378aed5f99ed9
treed498cf66c17aa7c8b5c2658ee15849d0175d5e64
parent3447b37729341141c5e05a879d4caefccf81a3af
usb: host: xhci: Fix possible wild pointer when handling abort command

commit 2a7cfdf37b7c08ac29df4c62ea5ccb01474b6597 upstream.

When current command was supposed to be aborted, host will free the command
in handle_cmd_completion() function. But it might be still referenced by
xhci->current_cmd, which need to set NULL.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c