diff options
| author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 | 
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-13 15:00:22 +0000 | 
| commit | 4de3a8e101150feaefa1139611a50ff37467f33e (patch) | |
| tree | daada742542518b02d7db7c5d32e715eaa5f166d /arch/s390/kernel/compat_signal.c | |
| parent | 294064f58953f9964e5945424b09c51800330a83 (diff) | |
| parent | 099469502f62fbe0d7e4f0b83a2f22538367f734 (diff) | |
| download | olio-linux-3.10-4de3a8e101150feaefa1139611a50ff37467f33e.tar.xz olio-linux-3.10-4de3a8e101150feaefa1139611a50ff37467f33e.zip  | |
Merge branch 'master' into fixes
Diffstat (limited to 'arch/s390/kernel/compat_signal.c')
| -rw-r--r-- | arch/s390/kernel/compat_signal.c | 12 | 
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 4f68c81d3ff..6fe78c2f95d 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c @@ -501,8 +501,12 @@ static int setup_frame32(int sig, struct k_sigaction *ka,  	/* We forgot to include these in the sigcontext.  	   To avoid breaking binary compatibility, they are passed as args. */ -	regs->gprs[4] = current->thread.trap_no; -	regs->gprs[5] = current->thread.prot_addr; +	if (sig == SIGSEGV || sig == SIGBUS || sig == SIGILL || +	    sig == SIGTRAP || sig == SIGFPE) { +		/* set extra registers only for synchronous signals */ +		regs->gprs[4] = regs->int_code & 127; +		regs->gprs[5] = regs->int_parm_long; +	}  	/* Place signal number on stack to allow backtrace from handler.  */  	if (__put_user(regs->gprs[2], (int __force __user *) &frame->signo)) @@ -544,9 +548,9 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info,  	/* Set up to return from userspace.  If provided, use a stub  	   already in userspace.  */  	if (ka->sa.sa_flags & SA_RESTORER) { -		regs->gprs[14] = (__u64) ka->sa.sa_restorer; +		regs->gprs[14] = (__u64) ka->sa.sa_restorer | PSW32_ADDR_AMODE;  	} else { -		regs->gprs[14] = (__u64) frame->retcode; +		regs->gprs[14] = (__u64) frame->retcode | PSW32_ADDR_AMODE;  		err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn,  				  (u16 __force __user *)(frame->retcode));  	}  |