From: Roland McGrath <roland@redhat.com>
To: Oleg Nesterov <oleg@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Jerome Marchand <jmarchan@redhat.com>,
Denys Vlasenko <dvlasenk@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] ptrace: simplify ptrace_exit()->ignoring_children() path
Date: Wed, 4 Feb 2009 17:09:51 -0800 (PST) [thread overview]
Message-ID: <20090205010951.648CCFC381@magilla.sf.frob.com> (raw)
In-Reply-To: Oleg Nesterov's message of Thursday, 29 January 2009 05:29:17 +0100 <20090129042917.GA5108@redhat.com>
> ignoring_children() takes parent->sighand->siglock and checks
> k_sigaction[SIGCHLD] atomically. But this buys nothing, we can't get
> the "really" wrong result even if we race with sigaction(SIGCHLD).
> If we read the "stale" sa_handler/sa_flags we can pretend it was
> changed right after the check.
Agreed. There is no real synchronization anyway, since sigaction does not
cause reaping of zombies already extant (and POSIX says it does not). All
that really matters is that ignoring_children() never have a false-negative
after sigaction has been called synchronously (i.e. earlier in the same
thread, or in another thread before intervening synchronization preceding
this thread's exit).
> Perhaps it makes sense to export this helper, do_notify_parent() can
> use it too.
It's now quite trivial. Might as well make it a signal.h inline.
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Thanks,
Roland
prev parent reply other threads:[~2009-02-05 1:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 4:29 Oleg Nesterov
2009-02-05 1:09 ` Roland McGrath [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090205010951.648CCFC381@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dvlasenk@redhat.com \
--cc=jmarchan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®