Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106833
b: refs/heads/master
c: f2fb4e4
h: refs/heads/master
i:
  106831: 124ccc1
v: v3
  • Loading branch information
Stuart Menefy authored and Paul Mundt committed Jul 28, 2008
1 parent eae9c45 commit e030c68
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 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: 068f59143d821553e7a55cdbd69142b05e245d47
refs/heads/master: f2fb4e4f647dabf1177d3ce164988e73482d76b1
3 changes: 1 addition & 2 deletions trunk/arch/sh/kernel/signal_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ static int setup_frame(int sig, struct k_sigaction *ka,
err |= __put_user(OR_R0_R0, &frame->retcode[6]);
err |= __put_user((__NR_sigreturn), &frame->retcode[7]);
regs->pr = (unsigned long) frame->retcode;
flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));
}

if (err)
Expand All @@ -398,8 +399,6 @@ static int setup_frame(int sig, struct k_sigaction *ka,
pr_debug("SIG deliver (%s:%d): sp=%p pc=%08lx pr=%08lx\n",
current->comm, task_pid_nr(current), frame, regs->pc, regs->pr);

flush_icache_range(regs->pr, regs->pr + sizeof(frame->retcode));

return 0;

give_sigsegv:
Expand Down
12 changes: 8 additions & 4 deletions trunk/arch/sh/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,12 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
int fault;
siginfo_t info;

trace_hardirqs_on();
local_irq_enable();

#ifdef CONFIG_SH_KGDB
if (kgdb_nofault && kgdb_bus_err_hook)
kgdb_bus_err_hook();
#endif

tsk = current;
mm = tsk->mm;
si_code = SEGV_MAPERR;

if (unlikely(address >= TASK_SIZE)) {
Expand Down Expand Up @@ -88,6 +84,14 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
return;
}

/* Only enable interrupts if they were on before the fault */
if ((regs->sr & SR_IMASK) != SR_IMASK) {
trace_hardirqs_on();
local_irq_enable();
}

mm = tsk->mm;

/*
* If we're in an interrupt or have no user
* context, we must not take the fault..
Expand Down

0 comments on commit e030c68

Please sign in to comment.