From: wlf <wulf@rock-chips.com>
Date: Wed, 22 May 2013 09:46:51 +0000 (+0800)
Subject: USB: fix potential qtd use-after-free case in interrupt handler
X-Git-Tag: firefly_0821_release~7050
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=40149bca57d03cc67b2f6807aeabd89628c1918c;p=firefly-linux-kernel-4.4.55.git

USB: fix potential qtd use-after-free case in interrupt handler
---

diff --git a/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c b/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c
index 684e89164918..524ce16943c7 100755
--- a/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c
+++ b/drivers/usb/dwc_otg/dwc_otg_hcd_intr.c
@@ -1948,7 +1948,8 @@ int32_t dwc_otg_hcd_handle_hc_n_intr (dwc_otg_hcd_t *_dwc_otg_hcd, uint32_t _num
 		retval |= handle_hc_nak_intr(_dwc_otg_hcd, hc, hc_regs, qtd);
 	}
 	if (hcint.b.ack) {
-		retval |= handle_hc_ack_intr(_dwc_otg_hcd, hc, hc_regs, qtd);
+		if(!hcint.b.chhltd)
+			retval |= handle_hc_ack_intr(_dwc_otg_hcd, hc, hc_regs, qtd);
 	}
 	if (hcint.b.nyet) {
 		retval |= handle_hc_nyet_intr(_dwc_otg_hcd, hc, hc_regs, qtd);