diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-12-27 05:27:30 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-12-27 05:27:14 -0500 |
commit | 207a05499bf11216ac96f76b38be728f4ee49304 (patch) | |
tree | 89cf68c8cb41dcb29cd94e0624d33938063ad9c9 /arch/s390 | |
parent | 77ecd06ae40d0d9532c6aebc81f3d09462f20358 (diff) |
[S390] return address of compat signals
A 31-bit kernel always sets the high order bit in the return address
for a signal handler.
git commit d4e81b35b882d96f "[S390] allow all addressing modes" makes
sure that the high order bit is set in the signal return address for
standard signals of a 31-bit compat process but fails to do the same
for real-time signals. To make things consistent the bit needs to be
set by setup_rt_frame32 as well.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/compat_signal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index 60c268b16f91..6fe78c2f95d9 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
@@ -548,9 +548,9 @@ static int setup_rt_frame32(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
548 | /* Set up to return from userspace. If provided, use a stub | 548 | /* Set up to return from userspace. If provided, use a stub |
549 | already in userspace. */ | 549 | already in userspace. */ |
550 | if (ka->sa.sa_flags & SA_RESTORER) { | 550 | if (ka->sa.sa_flags & SA_RESTORER) { |
551 | regs->gprs[14] = (__u64) ka->sa.sa_restorer; | 551 | regs->gprs[14] = (__u64) ka->sa.sa_restorer | PSW32_ADDR_AMODE; |
552 | } else { | 552 | } else { |
553 | regs->gprs[14] = (__u64) frame->retcode; | 553 | regs->gprs[14] = (__u64) frame->retcode | PSW32_ADDR_AMODE; |
554 | err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn, | 554 | err |= __put_user(S390_SYSCALL_OPCODE | __NR_rt_sigreturn, |
555 | (u16 __force __user *)(frame->retcode)); | 555 | (u16 __force __user *)(frame->retcode)); |
556 | } | 556 | } |