From: Gautham R Shenoy Date: Wed, 23 May 2007 20:57:28 +0000 (-0700) Subject: freezer: fix PF_NOFREEZE vs freezeable race X-Git-Tag: v2.6.22-rc3~80 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fcc57f2d5d558056668159f9153bf21d2c53d16;p=pandora-kernel.git freezer: fix PF_NOFREEZE vs freezeable race This patch fixes the race pointed out by Oleg Nesterov. * Freezer marks a thread as freezeable. * The thread now marks itself PF_NOFREEZE, but it will be frozen on on calling try_to_freeze(). Thus the task is frozen, even though it doesn't want to. * Subsequent thaw_processes() will also fail to thaw the task since it is marked PF_NOFREEZE. Avoid this problem by checking the task's PF_NOFREEZE status in frozen_processes() before marking the task as frozen. Signed-off-by: Gautham R Shenoy Signed-off-by: Rafael J. Wysocki Cc: Oleg Nesterov Cc: Pavel Machek Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed