lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <8cd249e878a07a7b97f14a7f7aef280420522805.1481620625.git.baolin.wang@linaro.org>
Date:   Tue, 13 Dec 2016 17:22:21 +0800
From:   Baolin Wang <baolin.wang@...aro.org>
To:     mathias.nyman@...el.com, gregkh@...uxfoundation.org
Cc:     baolu.lu@...ux.intel.com, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org, broonie@...nel.org,
        baolin.wang@...aro.org
Subject: [PATCH] usb: host: xhci: Clean up commands when stop endpoint command is timeout

Since the stop endpoint command is timeout, we will halt the xHCI
controller and issuing the usb_hc_died() to report abnormal shutdown
of a host controller, but before that, we should clean up the command
queue to free commands memory and complete the pending commands.

Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
 drivers/usb/host/xhci-ring.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index edc9ac2..92b48fe 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -904,6 +904,7 @@ void xhci_stop_endpoint_command_watchdog(unsigned long arg)
 			xhci_kill_endpoint_urbs(xhci, i, j);
 	}
 	spin_unlock_irqrestore(&xhci->lock, flags);
+	xhci_cleanup_command_queue(xhci);
 	xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
 			"Calling usb_hc_died()");
 	usb_hc_died(xhci_to_hcd(xhci));
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ