summaryrefslogtreecommitdiff
path: root/include/target
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-21 13:16:32 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-29 16:31:08 -0800
commit2ab9cc5409e9871927ef2799b41af3288cf7114c (patch)
treeee51552c86f2a349d9411780004b6b7bded22e3a /include/target
parent1a624979096199f383fc7785a509d1e38b608986 (diff)
downloadlwn-2ab9cc5409e9871927ef2799b41af3288cf7114c.tar.gz
lwn-2ab9cc5409e9871927ef2799b41af3288cf7114c.zip
usb-storage: fix freezing of the scanning thread
commit bb94a406682770a35305daaa241ccdb7cab399de upstream. This patch (as1521b) fixes the interaction between usb-storage's scanning thread and the freezer. The current implementation has a race: If the device is unplugged shortly after being plugged in and just as a system sleep begins, the scanning thread may get frozen before the khubd task. Khubd won't be able to freeze until the disconnect processing is complete, and the disconnect processing can't proceed until the scanning thread finishes, so the sleep transition will fail. The implementation in the 3.2 kernel suffers from an additional problem. There the scanning thread calls set_freezable_with_signal(), and the signals sent by the freezer will mess up the thread's I/O delays, which are all interruptible. The solution to both problems is the same: Replace the kernel thread used for scanning with a delayed-work routine on the system freezable work queue. Freezable work queues have the nice property that you can cancel a work item even while the work queue is frozen, and no signals are needed. The 3.2 version of this patch solves the problem in Bugzilla #42730. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/target')
0 files changed, 0 insertions, 0 deletions