Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Roland McGrath and committed by
Linus Torvalds
6efcae46 84c6f604

+1 -1
+1 -1
kernel/exit.c
··· 1378 1378 if (!retval && infop) 1379 1379 retval = put_user(0, &infop->si_errno); 1380 1380 if (!retval && infop) 1381 - retval = put_user(why, &infop->si_code); 1381 + retval = put_user((short)why, &infop->si_code); 1382 1382 if (!retval && infop) 1383 1383 retval = put_user(exit_code, &infop->si_status); 1384 1384 if (!retval && infop)