On Mon, 2007-11-19 at 22:43 -0800, Andrew Morton wrote: > On Sun, 18 Nov 2007 09:13:24 +0000 Scott James Remnant <[email protected]> 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 Scott -- Scott James Remnant [email protected]
Attachment:
signature.asc
Description: This is a digitally signed message part
- Follow-Ups:
- References:
- [PATCH] wait_task_stopped: pass correct exit_code to wait_noreap_copyout
- From: Scott James Remnant <[email protected]>
- Re: [PATCH] wait_task_stopped: pass correct exit_code to wait_noreap_copyout
- From: Andrew Morton <[email protected]>
- [PATCH] wait_task_stopped: pass correct exit_code to wait_noreap_copyout
- Prev by Date: Re: [PATCH 1/3] cciss: export more sysfs attributes
- Next by Date: Re: [PATCH 1/1] x86: convert-cpuinfo_x86-array-to-a-per_cpu-array fix
- Previous by thread: Re: [PATCH] wait_task_stopped: pass correct exit_code to wait_noreap_copyout
- Next by thread: Re: [PATCH] wait_task_stopped: pass correct exit_code to wait_noreap_copyout
- Index(es):