lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1195377204.6070.3.camel@wing-commander>
Date:	Sun, 18 Nov 2007 09:13:24 +0000
From:	Scott James Remnant <scott@...ntu.com>
To:	linux-kernel@...r.kernel.org
Cc:	Oleg Nesterov <oleg@...sign.ru>, Roland McGrath <roland@...hat.com>
Subject: [PATCH] wait_task_stopped: pass correct exit_code to
	wait_noreap_copyout

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.
    
Signed-off-by: Scott James Remnant <scott@...ntu.com>
Signed-off-by: Oleg Nesterov <oleg@...sign.ru>
Signed-off-by: Roland McGrath <roland@...hat.com>

--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -1389,7 +1389,7 @@ static int wait_task_stopped(struct task_struct
*p, int delayed_group_leader,
 		if (unlikely(!exit_code) || unlikely(p->exit_state))
 			goto bail_ref;
 		return wait_noreap_copyout(p, pid, uid,
-					   why, (exit_code << 8) | 0x7f,
+					   why, exit_code,
 					   infop, ru);
 	}
 


Download attachment "signature.asc" of type "application/pgp-signature" (190 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ