[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110816194450.GB6602@redhat.com>
Date: Tue, 16 Aug 2011 21:44:50 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Matt Fleming <matt@...sole-pimps.org>
Cc: linux-kernel@...r.kernel.org, Tejun Heo <tj@...nel.org>
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@...hat.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists