[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200807260806.24859.david-b@pacbell.net>
Date: Sat, 26 Jul 2008 08:06:24 -0700
From: David Brownell <david-b@...bell.net>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Ingo Molnar <mingo@...e.hu>, Greg KH <gregkh@...e.de>,
linux-kernel@...r.kernel.org, linux-usb@...r.kernel.org,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: Re: [USB boot crash, -git] ecm_do_notify(), list_add corruption. prev->next should be next (ffff88003b8f82f8)
On Thursday 24 July 2008, Alan Stern wrote:
> Can you make the necessary change and try it out?
This resolves the problem for me ... and, I'd expect, for Ingo.
======= CUT HERE
From: David Brownell <dbrownell@...rs.sourceforge.net>
This fixes a BUG() turned up by Ingo via randconfig testing, where
CONFIG_LIST_DEBUG turned up list corruption. The corruption was
caused by the dummy_hcd (single-machine test harness for gadget and
HCD code) trashing the request queue when driven by the new CDC
composite gadget an I/O pattern that was previously uncommon.
Fix suggested by Alan Stern.
Signed-off-by: David Brownell <dbrownell@...rs.sourceforge.net>
---
drivers/usb/gadget/dummy_hcd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/usb/gadget/dummy_hcd.c 2008-07-24 18:27:52.000000000 -0700
+++ b/drivers/usb/gadget/dummy_hcd.c 2008-07-26 07:35:12.000000000 -0700
@@ -542,13 +542,14 @@ dummy_queue (struct usb_ep *_ep, struct
req->req.context = dum;
req->req.complete = fifo_complete;
+ list_add_tail(&req->queue, &ep->queue);
spin_unlock (&dum->lock);
_req->actual = _req->length;
_req->status = 0;
_req->complete (_ep, _req);
spin_lock (&dum->lock);
- }
- list_add_tail (&req->queue, &ep->queue);
+ } else
+ list_add_tail(&req->queue, &ep->queue);
spin_unlock_irqrestore (&dum->lock, flags);
/* real hardware would likely enable transfers here, in case
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists