Explorar o código

[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 <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: maurice barnum <pixi+kbug@burble.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Rafael J. Wysocki %!s(int64=18) %!d(string=hai) anos
pai
achega
3eb1b3a407
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      kernel/power/process.c

+ 3 - 1
kernel/power/process.c

@@ -97,7 +97,9 @@ int freeze_processes(void)
 				continue;
 				continue;
 			if (frozen(p))
 			if (frozen(p))
 				continue;
 				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);
 				cancel_freezing(p);
 				continue;
 				continue;
 			}
 			}