diff options
author | Seth Forshee <seth.forshee@canonical.com> | 2011-07-26 09:56:07 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:36:43 -0800 |
commit | 6eb006c6079fd54a260caf7dfb3c750f65f4b1fc (patch) | |
tree | e7827f6fe9bbf0b2ffc7ea972840b1c82e2271cd /kernel/itimer.c | |
parent | b710365a9a762cb6cf931a066648daf9a941a9af (diff) |
usb_storage: Don't freeze in usb-stor-scan
commit f02fe890ece7d695a5744b20525d45312382e6e4 upstream.
Scanning cannot be run during suspend or hibernation, but if
usb-stor-scan freezes another thread waiting on scanning to
complete may fail to freeze.
However, if usb-stor-scan is left freezable without ever actually
freezing then the freezer will wait on it to exit, and threads
waiting for scanning to finish will no longer be blocked. One
problem with this approach is that usb-stor-scan has a delay to
wait for devices to settle (which is currently the only point where
it can freeze). To work around this we can request that the freezer
send a fake signal when freezing, then use interruptible sleep to
wake the thread early when freezing happens.
To make this happen, the following changes are made to
usb-stor-scan:
* Use set_freezable_with_signal() instead of set_freezable() to
request a fake signal when freezing
* Use wait_event_interruptible_timeout() instead of
wait_event_freezable_timeout() to avoid freezing
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/itimer.c')
0 files changed, 0 insertions, 0 deletions