usb_drv: fix nullptr access in EP stop cmd

Issue #1945.
This commit is contained in:
Josef Söntgen 2016-04-21 14:09:01 +02:00 committed by Christian Helmuth
parent 2dfbfd7173
commit 3195311b53
3 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,14 @@
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -688,6 +688,11 @@
{
struct xhci_virt_ep *ep = &xhci->devs[slot_id]->eps[ep_index];
+ if (!deq_state->new_deq_seg) {
+ deq_state->new_deq_ptr = 0;
+ return;
+ }
+
xhci_dbg_trace(xhci, trace_xhci_dbg_cancel_urb,
"Set TR Deq Ptr cmd, new deq seg = %p (0x%llx dma), "
"new deq ptr = %p (0x%llx dma), new cycle = %u",

View File

@ -1 +1 @@
05e511f67c46656002d976289a648ec58684bce2
4bb8e968b614220a0c3931aa669e06f1ad99579b

View File

@ -151,6 +151,7 @@ PATCH_OPT(patches/usb_mem.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_usbnet.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_xchi-quirks.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_wacom.patch) := $(USB_OPT)
PATCH_OPT(patches/usb_xhci-ring.patch) := $(USB_OPT)
#IP stack
LXIP_OPT = -p1 -d$(SRC_DIR_LXIP)