From 3195311b5382cd424fd73bc515feba21d42383ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Thu, 21 Apr 2016 14:09:01 +0200 Subject: [PATCH] usb_drv: fix nullptr access in EP stop cmd Issue #1945. --- repos/dde_linux/patches/usb_xhci-ring.patch | 14 ++++++++++++++ repos/dde_linux/ports/dde_linux.hash | 2 +- repos/dde_linux/ports/dde_linux.port | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 repos/dde_linux/patches/usb_xhci-ring.patch diff --git a/repos/dde_linux/patches/usb_xhci-ring.patch b/repos/dde_linux/patches/usb_xhci-ring.patch new file mode 100644 index 0000000000..b2cc506f6e --- /dev/null +++ b/repos/dde_linux/patches/usb_xhci-ring.patch @@ -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", diff --git a/repos/dde_linux/ports/dde_linux.hash b/repos/dde_linux/ports/dde_linux.hash index 0c81e45d8e..235ae14211 100644 --- a/repos/dde_linux/ports/dde_linux.hash +++ b/repos/dde_linux/ports/dde_linux.hash @@ -1 +1 @@ -05e511f67c46656002d976289a648ec58684bce2 +4bb8e968b614220a0c3931aa669e06f1ad99579b diff --git a/repos/dde_linux/ports/dde_linux.port b/repos/dde_linux/ports/dde_linux.port index 50f36fc019..d7d98befbd 100644 --- a/repos/dde_linux/ports/dde_linux.port +++ b/repos/dde_linux/ports/dde_linux.port @@ -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)