From: Oleg Nesterov Date: Wed, 23 May 2007 20:57:27 +0000 (-0700) Subject: freezer: fix kthread_create vs freezer theoretical race X-Git-Tag: v2.6.22-rc3~81 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a076e4bca2fdabb9e45d86722cc72c0944da5f94;p=pandora-kernel.git freezer: fix kthread_create vs freezer theoretical race kthread() sleeps in TASK_INTERRUPTIBLE state waiting for the first wakeup. In theory, this wakeup may come from freeze_process()->signal_wake_up(), so the task can disappear even before kthread_create() sets its ->comm. Change kthread() to use TASK_UNINTERRUPTIBLE. [akpm@linux-foundation.org: s/BUG_ON/WARN_ON+recover] Signed-off-by: Oleg Nesterov Acked-by: "Eric W. Biederman" Signed-off-by: Rafael J. Wysocki Cc: Gautham R Shenoy Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed