diff options
author | Roland McGrath <roland@redhat.com> | 2008-03-08 20:41:22 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-08 20:54:00 +0100 |
commit | 6efcae460186c0c1c94afff58a92784e1fc0d10b (patch) | |
tree | da67b86b65e8dde1f52245e25b1889f87cc96b4e /kernel/exit.c | |
parent | x86_64: make ptrace always sign-extend orig_ax to 64 bits (diff) | |
download | linux-6efcae460186c0c1c94afff58a92784e1fc0d10b.tar.xz linux-6efcae460186c0c1c94afff58a92784e1fc0d10b.zip |
Fix waitid si_code regression
In commit ee7c82da830ea860b1f9274f1f0cdf99f206e7c2 ("wait_task_stopped:
simplify and fix races with SIGCONT/SIGKILL/untrace"), the magic (short)
cast when storing si_code was lost in wait_task_stopped. This leaks the
in-kernel CLD_* values that do not match what userland expects.
Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r-- | kernel/exit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index cd20bf07e9e3..53872bf993fa 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -1378,7 +1378,7 @@ unlock_sig: if (!retval && infop) retval = put_user(0, &infop->si_errno); if (!retval && infop) - retval = put_user(why, &infop->si_code); + retval = put_user((short)why, &infop->si_code); if (!retval && infop) retval = put_user(exit_code, &infop->si_status); if (!retval && infop) |