Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 116143
b: refs/heads/master
c: 887f1ae
h: refs/heads/master
i:
  116141: d8c575a
  116139: 8b881a3
  116135: 417737c
  116127: b9acfa5
v: v3
  • Loading branch information
Paul Mundt committed Sep 21, 2008
1 parent d6aa795 commit 87b722a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 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: 4c59e2942e92d2d776bcd038604a5c3c1d56d3ac
refs/heads/master: 887f1ae3bc1701604a7b5ef145e1021072675444
13 changes: 4 additions & 9 deletions trunk/arch/sh/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,21 @@
#include <asm/tlbflush.h>
#include <asm/kgdb.h>

#ifdef CONFIG_KPROBES
static inline int notify_page_fault(struct pt_regs *regs, int trap)
{
int ret = 0;

#ifdef CONFIG_KPROBES
if (!user_mode(regs)) {
preempt_disable();
if (kprobe_running() && kprobe_fault_handler(regs, trap))
ret = 1;
preempt_enable();
}
#endif

return ret;
}
#else
static inline int notify_page_fault(struct pt_regs *regs, int trap)
{
return 0;
}
#endif

/*
* This routine handles page faults. It determines the address,
Expand All @@ -58,7 +53,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
int fault;
siginfo_t info;

if (notify_page_fault(regs, writeaccess))
if (notify_page_fault(regs, lookup_exception_vector()))
return;

#ifdef CONFIG_SH_KGDB
Expand Down Expand Up @@ -293,7 +288,7 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
pte_t *pte;
pte_t entry;

if (notify_page_fault(regs, writeaccess))
if (notify_page_fault(regs, lookup_exception_vector()))
return 0;

#ifdef CONFIG_SH_KGDB
Expand Down

0 comments on commit 87b722a

Please sign in to comment.