]> git.karo-electronics.de Git - karo-tx-linux.git/commit
freezer: do not send a fake signal to a PF_DUMPCORE thread
authorOleg Nesterov <oleg@redhat.com>
Sun, 10 Mar 2013 10:55:17 +0000 (21:55 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 12 Mar 2013 03:57:29 +0000 (14:57 +1100)
commit02d1c43033202368ea8dfc49e7df004e41b5ff0d
tree1103c2ea4d51ac27048988447ac0f0266a562c25
parent8f1e871e103f37058e9745d4818f170a43204246
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.  We need
to recheck PF_DUMPCORE under ->siglock to avoid the race with
zap_threads() which can set this flag right before we take the lock.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Mandeep Singh Baines <msb@chromium.org>
Cc: Neil Horman <nhorman@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
kernel/freezer.c