From: Arjan van de Ven Date: Thu, 8 Jan 2009 20:35:11 +0000 (-0800) Subject: async: make async_synchronize_full() more serializing X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=33b04b9308959af7febc1c111c766fa3fd8b1934;p=deliverable%2Flinux.git async: make async_synchronize_full() more serializing turns out that there are real problems with allowing async tasks that are scheduled from async tasks to run after the async_synchronize_full() returns. This patch makes the _full more strict and a complete synchronization. Later I might need to add back a lighter form of synchronization for other uses.. but not right now. Signed-off-by: Arjan van de Ven Signed-off-by: Linus Torvalds --- diff --git a/kernel/async.c b/kernel/async.c index 97373380c9e7..64cc916299a5 100644 --- a/kernel/async.c +++ b/kernel/async.c @@ -206,7 +206,9 @@ EXPORT_SYMBOL_GPL(async_schedule_special); void async_synchronize_full(void) { - async_synchronize_cookie(next_cookie); + do { + async_synchronize_cookie(next_cookie); + } while (!list_empty(&async_running) || !list_empty(&async_pending)); } EXPORT_SYMBOL_GPL(async_synchronize_full);