Re: [PATCH] xhci-ring: Fix Null pointer dereference

From: Mathias Nyman
Date: Fri Aug 29 2014 - 11:07:25 EST


On 08/28/2014 06:09 PM, Ricardo Ribalda Delgado wrote:
> Sure, but the hw leaves my desk until next monday in 30 minutes.
>
> So unless you send the patch right now you will have to wait for
> results until next Monday
>
> Thanks!
>

Great, anytime you can test it is appreciated.
Added the patch to the bug:
https://bugzilla.kernel.org/show_bug.cgi?id=75521

Patch looks like this:

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index c020b09..7aee5a3 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3544,6 +3544,10 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)
for (i = 1; i < 31; ++i) {
struct xhci_virt_ep *ep = &virt_dev->eps[i];

+ /* reset device sets ep states to disabled, also halted ones */
+ ep->ep_state &= ~(EP_HALTED || SET_DEQ_PENDING);
+ ep->stopped_td = NULL;
+
if (ep->ep_state & EP_HAS_STREAMS) {
xhci_warn(xhci, "WARN: endpoint 0x%02x has streams on device reset, freeing streams.\n",
xhci_get_endpoint_address(i));


-Mathias

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/