]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
freezer: fix vfork problem
authorRafael J. Wysocki <rjw@sisk.pl>
Wed, 23 May 2007 20:57:25 +0000 (13:57 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 24 May 2007 03:14:11 +0000 (20:14 -0700)
commitba96a0c88098697a63e80157718b7440414ed24d
treebdd999761eed452cc162f5b63166d1014aaf2e3e
parent33e1c288da62a6a5aa9077a6b7bfa690b1b02cf4
freezer: fix vfork problem

Currently try_to_freeze_tasks() has to wait until all of the vforked processes
exit and for this reason every user can make it fail.  To fix this problem we
can introduce the additional process flag PF_FREEZER_SKIP to be used by tasks
that do not want to be counted as freezable by the freezer and want to have
TIF_FREEZE set nevertheless.  Then, this flag can be set by tasks using
sys_vfork() before they call wait_for_completion(&vfork) and cleared after
they have woken up.  After clearing it, the tasks should call try_to_freeze()
as soon as possible.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Gautham R Shenoy <ego@in.ibm.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/freezer.h
include/linux/sched.h
kernel/fork.c
kernel/power/process.c