Skip to content

Was: pidns : PR_SET_PDEATHSIG + SIGKILL regression

Oleg Nesterov containers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4signals: SEND_SIG_NOINFO should be considered as SI_FROMUSER()include/linux/sched.h kernel/signal.c+13 -89 replies
2/4signals: send_signal: use si_fromuser() to detect from_ancestor_nskernel/signal.c+2 -311 replies
3/4signals: cosmetic, collect_signal: use SI_USERkernel/signal.c+1 -11 reply
4/4signals: kill force_sig_specific()include/linux/sched.h kernel/signal.c+0 -71 reply

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchSukadev Bhattiprolu
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Was: pidns : PR_SET_PDEATHSIG + SIGKILL regression
Quoted 10 lines · Sukadev Bhattiprolu

static void reparent_thread(struct task_struct *father, struct task_struct *p,

(quoted diff) +4 -2
 				struct list_head *dead)
 {
-	if (p->pdeath_signal)
-		group_send_sig_info(p->pdeath_signal, SEND_SIG_NOINFO, p);
+	if (p->pdeath_signal) {
+		struct siginfo info;
+
+		info.si_code = SI_USER;

Review

Quoted 10 lines
(quoted diff) +10 -0
+		info.si_signo = p->pdeath_signal;
+		info.si_errno = 0;
+
+		rcu_read_lock();
+		info.si_pid = task_tgid_nr_ns(father, task_active_pid_ns(p));
+		info.si_uid = __task_cred(father)->uid;
+		rcu_read_unlock();
+
+		group_send_sig_info(p->pdeath_signal, &info, p);
+	}

I think the patch is correct.

But afaics we should clarify the "from user" semantics and fix send_signal() instead.

What do you think about this simple series? (the last 2 patches are pure cosmetic and off-topic).

Oleg.