All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Scott James Remnant <scott@ubuntu.com>
Cc: linux-kernel@vger.kernel.org, Oleg Nesterov <oleg@tv-sign.ru>,
	Roland McGrath <roland@redhat.com>
Subject: Re: [PATCH] wait_task_stopped: pass correct exit_code to wait_noreap_copyout
Date: Tue, 20 Nov 2007 00:16:24 -0800	[thread overview]
Message-ID: <20071120001624.83c7fbce.akpm@linux-foundation.org> (raw)
In-Reply-To: <1195545322.14510.170.camel@wing-commander>

On Tue, 20 Nov 2007 07:55:22 +0000 Scott James Remnant <scott@ubuntu.com> wrote:

> On Mon, 2007-11-19 at 22:43 -0800, Andrew Morton wrote:
> > On Sun, 18 Nov 2007 09:13:24 +0000 Scott James Remnant <scott@ubuntu.com> wrote:
> > 
> > > In wait_task_stopped() exit_code already contains the right value for
> > > the si_status member of siginfo, and this is simply set in the non
> > > WNOWAIT case.
> > >     
> > > Pass it unchanged to wait_noreap_copyout();  we would only need to
> > > shift it and add 0x7f if we were returning it in the user status field
> > > and that isn't used for any function that permits WNOWAIT.
> > >     
> > Is this bug visible to userspace?  If so, I'm surprised that none of the
> > various testsuites (which like to exercise this sort of interface) has
> > detected it.
> > 
> Absolutely;  if you call waitid() with a stopped or traced process,
> you'll get the signal in siginfo.si_status as expected -- however if you
> call waitid(WNOWAIT) at the same time, you'll get the signal << 8 | 0x7f
> 

hm, OK.  Well I guess I'll stick a for-2.6.23 tag on this as well as
queueing it for 2.6.24.


      reply	other threads:[~2007-11-20  8:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-18  9:13 [PATCH] wait_task_stopped: pass correct exit_code to wait_noreap_copyout Scott James Remnant
2007-11-20  6:43 ` Andrew Morton
2007-11-20  7:55   ` Scott James Remnant
2007-11-20  8:16     ` Andrew Morton [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=20071120001624.83c7fbce.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=roland@redhat.com \
    --cc=scott@ubuntu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.