From 512be15cfd81ac616527bb2dac4a55d758802d37 Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Thu, 5 Feb 2009 17:12:39 -0500 Subject: [PATCH] --- yaml --- r: 131007 b: refs/heads/master c: 9be260a646bf76fa418ee519afa10196b3164681 h: refs/heads/master i: 131005: 105b727a672e22a9b29d7efd0c194573df3960c0 131003: eeaf4b5255bd4e2b68d8a096a549518d19b405d9 130999: be4c10298ce4da26f108cf06b18918db591567ec 130991: 69cbf67b8e7f3f67e3c8da6a33bf471f1c33443f 130975: aa60ef0d61d94c1466f8a8f414ddee4efcced3e1 130943: 33c0295a3809ec816993c94fa594d35a630d5f68 v: v3 --- [refs] | 2 +- trunk/arch/x86/mm/fault.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index d96f3f44aaee..c1117304f416 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 767b5828ad9a1b435488b5d39b5a66aeef4d25e4 +refs/heads/master: 9be260a646bf76fa418ee519afa10196b3164681 diff --git a/trunk/arch/x86/mm/fault.c b/trunk/arch/x86/mm/fault.c index 90dfae511a41..c76ef1d701c9 100644 --- a/trunk/arch/x86/mm/fault.c +++ b/trunk/arch/x86/mm/fault.c @@ -603,8 +603,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) si_code = SEGV_MAPERR; - if (notify_page_fault(regs)) - return; if (unlikely(kmmio_fault(regs, address))) return; @@ -634,6 +632,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) if (spurious_fault(address, error_code)) return; + /* kprobes don't want to hook the spurious faults. */ + if (notify_page_fault(regs)) + return; /* * Don't take the mm semaphore here. If we fixup a prefetch * fault we could otherwise deadlock. @@ -641,6 +642,9 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) goto bad_area_nosemaphore; } + /* kprobes don't want to hook the spurious faults. */ + if (notify_page_fault(regs)) + return; /* * It's safe to allow irq's after cr2 has been saved and the