[PATCH 5/5] Clear si_pid for signal from ancestor ns
Sukadev Bhattiprolu
sukadev at linux.vnet.ibm.com
Tue Nov 25 11:04:34 PST 2008
Since processes don't have valid pid numbers in a descendant pid namespaces,
the siginfo->si_pid field must be set to 0 when signal is sent from an
ancestor namespace.
TODO:
- siginfo->si_pid may need to be cleared in other locations (eg:
__do_notify(), F_SETSIG) and will be addressed in separate patches.
- rt_sigqueueinfo(): siginfo->si_pid value is unreliable/undefined
when rt_sigqueueinfo() is used to signal a process in a descendant
namespace
Signed-off-by: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
---
kernel/signal.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index 8c294c1..14eb986 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -881,6 +881,8 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
default:
copy_siginfo(&q->info, info);
q->info.si_signo &= ~SIG_FROM_USER;
+ if (from_ancestor_ns)
+ q->info.si_pid = 0;
break;
}
} else if (!is_si_special(info)) {
--
1.5.2.5
More information about the Containers
mailing list