]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: fix race between root-hub resume and wakeup requests
authorAlan Stern <stern@rowland.harvard.edu>
Wed, 2 Feb 2011 18:59:33 +0000 (13:59 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 22:46:44 +0000 (14:46 -0800)
commitc2bbe01f172bf66bb2985d361d2a6e2414e4e24b
tree2d4f301dfaf89900a752d2d16affc42d4b489aa2
parentc2f38a34645bef1c6475dcacbc51c038fd081cfc
USB: fix race between root-hub resume and wakeup requests

commit bf3d7d40e42a85ca73a34e1385ff34f092a384eb upstream.

The USB core keeps track of pending resume requests for root hubs, in
order to resolve races between wakeup requests and suspends.  However
the code that does this is subject to another race (between wakeup
requests and resumes) because the WAKEUP_PENDING flag is cleared
before the resume occurs, leaving a window in which another wakeup
request might arrive.

This patch (as1447) fixes the problem by clearing the WAKEUP_PENDING
flag after the resume instead of before it.

This fixes Bugzilla #24952.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Paul Bender <pebender@san.rr.com>
Tested-by: warpme <warpme@o2.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c