usb: xhci: fix wild pointers in xhci_mem_cleanup
authorLu Baolu <baolu.lu@linux.intel.com>
Fri, 8 Apr 2016 13:25:09 +0000 (16:25 +0300)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:12:51 +0000 (13:12 +0000)
commit761c50467b93ad84931be2afcbfc31b32ec88327
treed2451a6d26c8a9c2b01666077a2f9162b94c0989
parent7deba12ad2543a299c06a81036936b3c98842419
usb: xhci: fix wild pointers in xhci_mem_cleanup

commit 71504062a7c34838c3fccd92c447f399d3cb5797 upstream.

This patch fixes some wild pointers produced by xhci_mem_cleanup.
These wild pointers will cause system crash if xhci_mem_cleanup()
is called twice.

Reported-and-tested-by: Pengcheng Li <lpc.li@hisilicon.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[wt: struct xhci_hcd has no ext_caps members in 3.10 ]

Signed-off-by: Willy Tarreau <w@1wt.eu>
drivers/usb/host/xhci-mem.c