Messages in this thread Patch in this message | | | Date | Tue, 16 Aug 2011 21:44:50 +0200 | From | Oleg Nesterov <> | Subject | [PATCH 1/1] kthreads: allow_signal: don't play with ->blocked |
| |
allow_signal(sig) unblocks the signal. This was only needed because we had the daemonize()'ed kthreads playing with signals. And daemonize() can't use ignore_signals() but does sigprocmask(SIG_BLOCK) because it was used after kernel_thread(CLONE_SIGHAND).
Nobody does this any longer, we can remove this hack. And hopefully we can deprecate daemonize() soon, all current users do not actually need it.
Signed-off-by: Oleg Nesterov <oleg@redhat.com> ---
kernel/exit.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
--- 3.1/kernel/exit.c~4_allow_signal_dont_unblock 2011-08-16 20:14:20.000000000 +0200 +++ 3.1/kernel/exit.c 2011-08-16 21:20:11.000000000 +0200 @@ -365,7 +365,8 @@ static void set_special_pids(struct pid /* * Let kernel threads use this to say that they allow a certain signal. - * Must not be used if kthread was cloned with CLONE_SIGHAND. + * Must not be used if kthread was cloned with CLONE_SIGHAND or daemonize() + * was called. */ int allow_signal(int sig) { @@ -373,8 +374,6 @@ int allow_signal(int sig) return -EINVAL; spin_lock_irq(¤t->sighand->siglock); - /* This is only needed for daemonize()'ed kthreads */ - sigdelset(¤t->blocked, sig); /* * Kernel threads handle their own signals. Let the signal code * know it'll be handled, so that they don't get converted to
| |