From 3f2a0d1df938bd3507a665dedbf5a9b1701124eb Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 15 Jan 2004 04:47:18 -0800 Subject: [PATCH] [PATCH] fix pdeath_signal SMP locking Obviously almost noone uses the pdeath_signal feature, since this has gone unnoticed for quite some time. This patch calls the function that does the right locking for the context of this call (inside exit_notify). The names of the signal.c entrypoints are a little confusing. --- include/linux/signal.h | 1 + kernel/exit.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/signal.h b/include/linux/signal.h index e051eb0b17dba..0e95116b878a7 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h @@ -207,6 +207,7 @@ static inline void init_sigpending(struct sigpending *sig) INIT_LIST_HEAD(&sig->list); } +extern int group_send_sig_info(int sig, struct siginfo *info, struct task_struct *p); extern long do_sigpending(void __user *, unsigned long); extern int sigprocmask(int, sigset_t *, sigset_t *); diff --git a/kernel/exit.c b/kernel/exit.c index 749da057424a9..34956331ad0f0 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -529,7 +529,8 @@ static inline void reparent_thread(task_t *p, task_t *father, int traced) p->self_exec_id++; if (p->pdeath_signal) - send_group_sig_info(p->pdeath_signal, 0, p); + /* We already hold the tasklist_lock here. */ + group_send_sig_info(p->pdeath_signal, (void *) 0, p); /* Move the child from its dying parent to the new one. */ if (unlikely(traced)) { -- 2.53.0