public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
	Roland McGrath <roland@redhat.com>,
	linux-kernel@vger.kernel.org,
	Michael Kerrisk <michael.kerrisk@gmx.net>
Subject: Re: [PATCH] make fork() atomic wrt pgrp/session signals
Date: Thu, 16 Mar 2006 09:27:31 -0700	[thread overview]
Message-ID: <m164mebbik.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <44198BC4.EE653B1@tv-sign.ru> (Oleg Nesterov's message of "Thu, 16 Mar 2006 19:01:08 +0300")

Oleg Nesterov <oleg@tv-sign.ru> writes:

> Eric W. Biederman wrote:
>>
>> Ok. SUSV3/Posix is clear, fork is atomic with respect
>> to signals.  Either a signal comes before or after a
>> fork but not during. (See the rationale section).
>> http://www.opengroup.org/onlinepubs/000095399/functions/fork.html
>>
>> The tasklist_lock does not stop forks from adding to a process
>> group. The forks stall while the tasklist_lock is held, but a fork
>> that began before we grabbed the tasklist_lock simply completes
>> afterwards, and the child does not receive the signal.
>
> This also means that SIGSTOP or sig_kernel_coredump() signal can't
> be delivered to pgrp/session reliably.
>
> With this patch copy_process() returns -ERESTARTNOINTR when it
> detects a pending signal, fork() will be restarted transparently
> after handling the signals.
>
> This patch also deletes now unneeded "group_stop_count > 0" check,
> copy_process() can no longer succeed while group stop in progress.
>
> Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>

Looks like what we discussed and I can't see any flaws with it.

Acked-By: Eric Biederman <ebiederm@xmission.com>

      reply	other threads:[~2006-03-16 16:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-16 16:01 [PATCH] make fork() atomic wrt pgrp/session signals Oleg Nesterov
2006-03-16 16:27 ` Eric W. Biederman [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=m164mebbik.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael.kerrisk@gmx.net \
    --cc=mingo@elte.hu \
    --cc=oleg@tv-sign.ru \
    --cc=roland@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