From 056caa9991512704cb39f65828e1ffea47830c6c Mon Sep 17 00:00:00 2001 From: sadasivan shaiju Date: Wed, 27 Jul 2011 14:54:39 -0700 Subject: [PATCH] kgdb: Ignore DIE_PAGE_FAULT event in notify handler Source: MontaVista Software, LLC MR: 45280 Type: Defect Fix Disposition: Needs submitting to kernel.org ChangeID: 5bec09f7ec0a4775169f5cba16976bc3a6b45598 Description: Ignore notify_die() from do_pagefault(), in kgdb's register_die_notifier() handler Signed-off-by: Sadasivan Signed-off-by: Dale Farnsworth --- arch/mips/kernel/kgdb.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 50c9bb8..3e4ae31 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c @@ -191,6 +191,11 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd, struct pt_regs *regs = args->regs; int trap = (regs->cp0_cause & 0x7c) >> 2; + /* ignore the notify_die() from do_page_fault(), which is meant for kprobes */ + + if(cmd == DIE_PAGE_FAULT) + return NOTIFY_DONE; + /* Userpace events, ignore. */ if (user_mode(regs)) return NOTIFY_DONE; -- 1.7.0.1