[PATCH 2/3] freezer: do not send a fake signal to a PF_DUMPCOREthread

From: Oleg Nesterov
Date: Sun Feb 24 2013 - 12:33:43 EST


A coredumping thread can't be frozen anyway but the fake signal sent
by freeze_task() can confuse dump_write/wait_for_dump_helpers/etc
and interrupt the coredump.

We are going to make the do_coredump() paths freezable but the fake
TIF_SIGPENDING doesn't help, it only makes sense when we assume that
the target can return to user-mode and call get_signal_to_deliver().

Change freeze_task() to check PF_DUMPCORE along with PF_KTHREAD.

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
---
kernel/freezer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/freezer.c b/kernel/freezer.c
index c38893b..88d2644 100644
--- a/kernel/freezer.c
+++ b/kernel/freezer.c
@@ -116,7 +116,7 @@ bool freeze_task(struct task_struct *p)
return false;
}

- if (!(p->flags & PF_KTHREAD))
+ if (!(p->flags & (PF_KTHREAD | PF_DUMPCORE)))
fake_signal_wake_up(p);
else
wake_up_state(p, TASK_INTERRUPTIBLE);
--
1.5.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/