Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456028

Re: [RFC PATCH] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd

From Oleg Nesterov <oleg@redhat.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd
Date 2016-08-03 23:10 +0200
Message-ID <s2bAm-7Up-13@gated-at.bofh.it> (permalink)
References <s1iXf-5ai-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


sorry for delay, I am travelling till the end of the week.

On 08/01, Michal Hocko wrote:
>
> fec1d0115240 ("[PATCH] Disable CLONE_CHILD_CLEARTID for abnormal exit")

almost 10 years ago ;)

> has caused a subtle regression in nscd which uses CLONE_CHILD_CLEARTID
> to clear the nscd_certainly_running flag in the shared databases, so
> that the clients are notified when nscd is restarted.

So iiuc with this patch nscd_certainly_running should be cleared even if
ncsd was killed by !sig_kernel_coredump() signal, right?

> We should also check for vfork because
> this is killable since d68b46fe16ad ("vfork: make it killable").

Hmm, why? Can't understand... In any case this check doesn't look right, the
comment says "a killed vfork parent" while tsk->vfork_done != NULL means it
is a vforked child.

So if we want this change, why we can't simply do

	-	if (!(tsk->flags & PF_SIGNALED) &&
	+	if (!(tsk->signal->flags & SIGNAL_GROUP_COREDUMP) &&

?

And I think PF_SIGNALED must die in any case... but this is off-topic.

Oleg.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd Michal Hocko <mhocko@kernel.org> - 2016-08-01 12:50 +0200
  Re: [RFC PATCH] kernel/fork: fix CLONE_CHILD_CLEARTID regression in  nscd Oleg Nesterov <oleg@redhat.com> - 2016-08-03 23:10 +0200

csiph-web