diff options
author | Sergei Shtylyov | 2009-02-21 15:31:01 -0800 |
---|---|---|
committer | Greg Kroah-Hartman | 2009-02-27 14:40:51 -0800 |
commit | dc61d238b8c850c34632ae1fbbdea529f8c41d16 (patch) | |
tree | e800cb6312d12f8347ca60fbab2c8b829d733c17 /drivers/memstick | |
parent | a2fd814e6a9e172f7077b68a2a9391bbde777a92 (diff) |
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 <sshtylyov@ru.mvista.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/memstick')
0 files changed, 0 insertions, 0 deletions