All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@intel.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux USB Mailing List <linux-usb@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] xhci-ring: Fix Null pointer dereference
Date: Fri, 29 Aug 2014 18:20:48 +0300	[thread overview]
Message-ID: <54009A50.9010707@intel.com> (raw)
In-Reply-To: <CAPybu_2rgn-DEUKfdmGsaAsFSQJ_zz6fsdnD0dHmyCPW4B-+WA@mail.gmail.com>

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


  reply	other threads:[~2014-08-29 15:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-26 15:47 [PATCH] xhci-ring: Fix Null pointer dereference Ricardo Ribalda Delgado
2014-08-27 14:25 ` Mathias Nyman
2014-08-27 14:14   ` Ricardo Ribalda Delgado
2014-08-27 15:27     ` Mathias Nyman
2014-08-27 16:10       ` Ricardo Ribalda Delgado
2014-08-28 10:41         ` Mathias Nyman
2014-08-28 10:50           ` Ricardo Ribalda Delgado
2014-08-28 12:36             ` Ricardo Ribalda Delgado
2014-08-28 15:20               ` Mathias Nyman
2014-08-28 15:09                 ` Ricardo Ribalda Delgado
2014-08-29 15:20                   ` Mathias Nyman [this message]
2014-09-01  9:02                     ` Ricardo Ribalda Delgado
2014-09-01  9:36                       ` Ricardo Ribalda Delgado
2014-09-01 10:37                         ` Mathias Nyman
2014-09-01 10:26                           ` Ricardo Ribalda Delgado
2014-09-01 11:12                             ` Mathias Nyman
2014-09-01 11:19                               ` Ricardo Ribalda Delgado
2014-09-01 12:25                                 ` Mathias Nyman
2014-09-01 12:14                                   ` Ricardo Ribalda Delgado
2014-09-01 14:16                           ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54009A50.9010707@intel.com \
    --to=mathias.nyman@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ricardo.ribalda@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.