From: Oleg Nesterov In my opinion this patch cleans up the code. Signed-off-by: Oleg Nesterov Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton --- kernel/signal.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN kernel/signal.c~introduce-sig_needs_tasklist-helper kernel/signal.c --- devel/kernel/signal.c~introduce-sig_needs_tasklist-helper 2006-02-19 20:40:55.000000000 -0800 +++ devel-akpm/kernel/signal.c 2006-02-19 20:40:55.000000000 -0800 @@ -147,6 +147,9 @@ static kmem_cache_t *sigqueue_cachep; #define sig_kernel_stop(sig) \ (((sig) < SIGRTMIN) && T(sig, SIG_KERNEL_STOP_MASK)) +#define sig_needs_tasklist(sig) \ + (((sig) < SIGRTMIN) && T(sig, SIG_KERNEL_STOP_MASK | M(SIGCONT))) + #define sig_user_defined(t, signr) \ (((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_DFL) && \ ((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_IGN)) @@ -1199,7 +1202,7 @@ kill_proc_info(int sig, struct siginfo * struct task_struct *p; rcu_read_lock(); - if (unlikely(sig_kernel_stop(sig) || sig == SIGCONT)) { + if (unlikely(sig_needs_tasklist(sig))) { read_lock(&tasklist_lock); acquired_tasklist_lock = 1; } _