Hi!
> It should be possible to suspend, either to RAM or to disk, if there's a
> traced process that has just reached a breakpoint. However, this is a special
> case, because its parent process might have been frozen already and then
> we are unable to deliver the "freeze" signal to the traced process. If this
> happens, it's better to cancel the freezing of the traced process.
Thanks for debugging this.
> @@ -85,6 +97,10 @@ int freeze_processes(void)
> continue;
> if (frozen(p))
> continue;
> + if (p->state == TASK_TRACED && frozen(p->parent)) {
> + cancel_freezing(p);
> + continue;
> + }
Could we just add line to freezeable, like this?
...no, this is probably racy, because freezeable() should not change
while we are thawing other processes... I was hoping for one-liner...
diff --git a/kernel/power/process.c b/kernel/power/process.c
index b2a5f67..13dceb8 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -26,6 +26,7 @@ static inline int freezeable(struct task
(p->flags & PF_NOFREEZE) ||
(p->exit_state == EXIT_ZOMBIE) ||
(p->exit_state == EXIT_DEAD) ||
+ ((p->exit_state == TASK_TRACED) && frozen(p->parent)) ||
(p->state == TASK_STOPPED))
return 0;
return 1;
...okay, so ACK on your patch.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]