[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1268936453-3727-3-git-send-email-brgerst@gmail.com>
Date: Thu, 18 Mar 2010 14:20:50 -0400
From: Brian Gerst <brgerst@...il.com>
To: hpa@...or.com
Cc: x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 2/5] x86-32: Remove die_if_kernel()
Merge die_if_kernel() into do_cache_flush_error().
Signed-off-by: Brian Gerst <brgerst@...il.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists