From: Rafael J. Wysocki Date: Thu, 7 Dec 2006 04:34:34 +0000 (-0800) Subject: [PATCH] suspend to disk fails if gdb is suspended with a traced child X-Git-Tag: v2.6.20-rc1~145^2^2~273 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3eb1b3a40722cbb46631db373af66d13d1e7ac81;p=linux-2.6-omap-h63xx.git [PATCH] suspend to disk fails if gdb is suspended with a traced child Fix http://bugzilla.kernel.org/show_bug.cgi?id=7534 Fix the freezing of processes so that it won't fail if there is a traced process the parent of which has been stopped. Signed-off-by: Rafael J. Wysocki Acked-by: Pavel Machek Cc: maurice barnum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/power/process.c b/kernel/power/process.c index cba8a5890ed..1badb9a89ad 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c @@ -97,7 +97,9 @@ int freeze_processes(void) continue; if (frozen(p)) continue; - if (p->state == TASK_TRACED && frozen(p->parent)) { + if (p->state == TASK_TRACED && + (frozen(p->parent) || + p->parent->state == TASK_STOPPED)) { cancel_freezing(p); continue; }