Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 216766
b: refs/heads/master
c: 36bf968
h: refs/heads/master
v: v3
  • Loading branch information
Martin Schwidefsky authored and Martin Schwidefsky committed Oct 25, 2010
1 parent efed3d2 commit 85bdc6d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 585b954e1f2fa325d425b0786e4525ac7c9ae575
refs/heads/master: 36bf96801e3a2c4efae0bb8c1897a530fc9ca13e
14 changes: 11 additions & 3 deletions trunk/arch/s390/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,14 +212,21 @@ static noinline void do_sigbus(struct pt_regs *regs, long int_code,
unsigned long trans_exc_code)
{
struct task_struct *tsk = current;
unsigned long address;
struct siginfo si;

/*
* Send a sigbus, regardless of whether we were in kernel
* or user mode.
*/
tsk->thread.prot_addr = trans_exc_code & __FAIL_ADDR_MASK;
address = trans_exc_code & __FAIL_ADDR_MASK;
tsk->thread.prot_addr = address;
tsk->thread.trap_no = int_code;
force_sig(SIGBUS, tsk);
si.si_signo = SIGBUS;
si.si_errno = 0;
si.si_code = BUS_ADRERR;
si.si_addr = (void __user *) address;
force_sig_info(SIGBUS, &si, tsk);
}

#ifdef CONFIG_S390_EXEC_PROTECT
Expand Down Expand Up @@ -279,10 +286,11 @@ static noinline void do_fault_error(struct pt_regs *regs, long int_code,
if (fault & VM_FAULT_OOM)
pagefault_out_of_memory();
else if (fault & VM_FAULT_SIGBUS) {
do_sigbus(regs, int_code, trans_exc_code);
/* Kernel mode? Handle exceptions or die */
if (!(regs->psw.mask & PSW_MASK_PSTATE))
do_no_context(regs, int_code, trans_exc_code);
else
do_sigbus(regs, int_code, trans_exc_code);
} else
BUG();
break;
Expand Down

0 comments on commit 85bdc6d

Please sign in to comment.