Files
linux-stable-mirror/drivers
Lu Baolu d6e6e57e60 usb: xhci: Fix potential memory leak in xhci_disable_slot()
commit cd3f1790b0 upstream.

xhci_disable_slot() allows the invoker to pass a command pointer
as paramenter. Otherwise, it will allocate one. This will cause
memory leak when a command structure was allocated inside of this
function while queuing command trb fails. Another problem comes up
when the invoker passed a command pointer, but xhci_disable_slot()
frees it when it detects a dead host.

This patch fixes these two problems by removing the command parameter
from xhci_disable_slot().

Fixes: f9e609b824 ("usb: xhci: Add helper function xhci_disable_slot().")
Cc: Guoqing Zhang <guoqing.zhang@intel.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>
2018-03-28 18:24:50 +02:00
..
…
2018-02-25 11:07:52 +01:00
2017-12-14 09:53:13 +01:00
…
…
…
…
…
…
2018-03-19 08:42:47 +01:00
…
…
…
…
2018-03-24 11:01:26 +01:00
2017-12-29 17:53:46 +01:00
2018-01-17 09:45:27 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-03-28 18:24:45 +02:00
…
…
…
…
…
…