From: Sergei Shtylyov Date: Sat, 21 Feb 2009 23:31:01 +0000 (-0800) Subject: USB: musb: host endpoint_disable() oops fixes X-Git-Tag: v2.6.29-rc7~22^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc61d238b8c850c34632ae1fbbdea529f8c41d16;p=pandora-kernel.git USB: musb: host endpoint_disable() oops fixes The musb_h_disable() routine can oops in some cases: - It's not safe to read hep->hcpriv outside musb->lock, since it gets changed on completion IRQ paths. - The list iterators aren't safe to use in that way; just remove the first element while !list_empty(), so deletions on other code paths can't make trouble. We need two "scrub the list" loops because only one branch should touch hardware and advance the schedule. [ dbrownell@users.sourceforge.net: massively simplify patch description; add key points as code comments ] Signed-off-by: Sergei Shtylyov Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed