android_kernel_samsung_msm8976/arch/alpha
Al Viro 392fb6e354 alpha: unb0rk sigsuspend() and rt_sigsuspend()
Old code used to set regs->r0 and regs->r19 to force the right
return value.  Leaving that after switch to ERESTARTNOHAND
was a Bad Idea(tm), since now that screws the restart - if we
hit the case when get_signal_to_deliver() returns 0, we will
step back to syscall insn, with v0 set to EINTR and a3 to 1.
The latter won't matter, since EINTR is 4, aka __NR_write.

Testcase:

	#include <signal.h>
	#define _GNU_SOURCE
	#include <unistd.h>
	#include <sys/syscall.h>

	main()
	{
		sigset_t mask;
		sigemptyset(&mask);
		sigaddset(&mask, SIGCONT);
		sigprocmask(SIG_SETMASK, &mask, NULL);
		kill(0, SIGCONT);
		syscall(__NR_sigsuspend, 1, "b0rken\n", 7);
	}

results on alpha in immediate message to stdout...

Fix is obvious; moreover, since we don't need regs anymore, we can
switch to normal prototypes for these guys and lose the wrappers.
Even better, rt_sigsuspend() is identical to generic version in
kernel/signal.c now.

Tested-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2010-09-18 23:08:28 -04:00
..
boot include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
include/asm alpha: unb0rk sigsuspend() and rt_sigsuspend() 2010-09-18 23:08:28 -04:00
kernel alpha: unb0rk sigsuspend() and rt_sigsuspend() 2010-09-18 23:08:28 -04:00
lib remove __attribute_used__ 2008-01-28 23:21:18 +01:00
math-emu Revert "endian: #define __BYTE_ORDER" 2010-05-26 08:30:15 -07:00
mm alpha: invoke oom-killer from page fault 2010-05-26 00:40:28 +02:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
defconfig defconfig reduction 2010-08-14 22:26:53 +02:00
Kconfig time: Kill off CONFIG_GENERIC_TIME 2010-07-27 12:40:54 +02:00
Kconfig.debug alpha/parisc: remove config variable DEBUG_RWLOCK 2008-02-06 10:41:03 -08:00
Makefile alpha: link failure fix 2008-06-20 16:46:10 -07:00