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-07-26 16:49:45 -07: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-07-20 14:10:11 -07:00
2011-03-14 09:15:23 -04:00
2011-10-31 09:20:12 -04:00
2011-03-03 10:55:40 -08:00
2011-10-31 09:20:12 -04:00
2011-03-23 19:46:28 -07: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-07-25 20:57:15 -07: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-07-14 12:59:14 +03:00
2011-10-31 09:20:12 -04:00
2011-10-31 17:30:45 -07:00
2011-05-20 08:56:56 +02:00
2011-11-06 19:02:23 -08:00
2011-11-21 12:32:23 -08:00
2011-03-23 19:47:08 -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-25 11:55:15 -07:00
2011-03-25 17:52:22 -07:00
2011-04-10 17:01:05 +02:00
2011-06-10 15:15:40 +02: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-04-14 08:52:33 +02:00
2011-10-31 09:20:12 -04:00
2011-04-14 08:52:33 +02: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-03-23 19:46:58 -07: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-03-23 19:46:22 -07:00
2011-10-31 09:20:12 -04:00
2011-01-27 21:13:51 -05: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-03-31 11:26:23 -03:00
2011-07-01 10:39:08 +02:00
2011-10-31 09:20:12 -04:00
2011-08-14 12:01:11 +02:00
2011-08-14 12:01:11 +02:00
2011-04-24 13:18:38 +02:00
2011-10-06 12:46:56 +02:00
2011-08-14 12:00:41 +02:00
2011-04-14 08:52:36 +02:00
2011-10-06 12:47:04 +02:00
2011-09-13 11:11:55 +02:00
2011-08-14 12:01:13 +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-08-12 16:21:35 -05:00
2011-10-31 17:46:07 -07:00
2011-09-19 17:04:37 -07:00
2011-10-31 09:20:12 -04:00
2011-10-31 09:20:12 -04:00
2011-08-10 20:38:14 -04:00
2011-09-19 17:10:57 -07:00
2011-03-23 19:47:08 -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-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