Tejun Heo
8a32c441c1
freezer: implement and use kthread_freezable_should_stop()
...
Writeback and thinkpad_acpi have been using thaw_process() to prevent
deadlock between the freezer and kthread_stop(); unfortunately, this
is inherently racy - nothing prevents freezing from happening between
thaw_process() and kthread_stop().
This patch implements kthread_freezable_should_stop() which enters
refrigerator if necessary but is guaranteed to return if
kthread_stop() is invoked. Both thaw_process() users are converted to
use the new function.
Note that this deadlock condition exists for many of freezable
kthreads. They need to be converted to use the new should_stop or
freezable workqueue.
Tested with synthetic test case.
Signed-off-by: Tejun Heo <tj@kernel.org >
Acked-by: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br >
Cc: Jens Axboe <axboe@kernel.dk >
Cc: Oleg Nesterov <oleg@redhat.com >
2011-11-21 12:32:23 -08:00
..
2011-11-06 19:44:47 -08:00
2011-11-06 19:44:47 -08:00
2011-11-17 11:46:26 -02:00
2011-11-19 14:37:57 +01:00
2011-10-31 19:30:05 -04:00
2011-10-31 19:30:05 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-02 16:07:03 -07:00
2011-10-31 19:30:05 -04:00
2011-09-23 12:05:29 +05:30
2011-11-06 19:44:47 -08:00
2011-11-06 19:44:47 -08:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:45 -07:00
2011-11-06 19:02:23 -08:00
2011-11-21 12:32:23 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-25 11:55:15 -07:00
2011-10-30 15:16:42 +01:00
2011-10-31 09:20:12 -04:00
2011-10-26 13:10:39 +10:30
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:13 -04:00
2011-11-21 12:32:23 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-26 16:26:53 +02:00
2011-10-28 12:02:27 -07:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-07 07:54:42 +10:30
2011-10-31 09:20:13 -04:00
2011-10-31 09:20:12 -04:00
2011-10-26 16:17:32 +02:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:53 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:11 -04:00
2011-09-28 21:38:21 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:13 -04:00
2011-10-31 09:20:13 -04:00
2011-09-28 21:38:46 -07:00
2011-09-28 21:38:48 -07:00
2011-09-28 21:38:22 -07:00
2011-10-31 09:20:12 -04:00
2011-09-28 21:38:48 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-06 12:46:56 +02:00
2011-10-06 12:47:04 +02:00
2011-11-06 17:12:03 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 17:30:44 -07:00
2011-11-06 19:44:47 -08:00
2011-10-03 14:13:01 -04:00
2011-10-31 17:46:07 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-11-06 19:44:47 -08:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:53 -07:00
2011-10-31 09:20:12 -04:00