[PATCH 2/5] x86-32: Remove die_if_kernel()

From: Brian Gerst
Date: Thu Mar 18 2010 - 14:21:36 EST


Merge die_if_kernel() into do_cache_flush_error().

Signed-off-by: Brian Gerst <brgerst@xxxxxxxxx>
---
arch/x86/kernel/traps.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 45b9cb0..cea343e 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -108,15 +108,6 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
dec_preempt_count();
}

-#ifdef CONFIG_X86_32
-static inline void
-die_if_kernel(const char *str, struct pt_regs *regs, long err)
-{
- if (!user_mode_vm(regs))
- die(str, regs, err);
-}
-#endif
-
static void __kprobes
do_trap(int trapnr, int signr, char *str, struct pt_regs *regs,
long error_code, siginfo_t *info)
@@ -273,7 +264,8 @@ do_cache_flush_error(struct pt_regs *regs, long error_code)
}
current->thread.trap_no = 19;
current->thread.error_code = error_code;
- die_if_kernel("cache flush denied", regs, error_code);
+ if (!user_mode(regs))
+ die("cache flush denied", regs, error_code);
force_sig(SIGSEGV, current);
}
#endif
--
1.6.6.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/