lkml.org 
[lkml]   [2013]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/3] freezer: do not send a fake signal to a PF_DUMPCORE thread
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@redhat.com>
---
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


\
 
 \ /
  Last update: 2013-02-24 18:41    [W:0.082 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site