[Top] [All Lists]

Re: [PATCH] Let us die more gracefully

To: "Maciej W. Rozycki" <>
Subject: Re: [PATCH] Let us die more gracefully
From: Jun Sun <>
Date: Mon, 22 Jul 2002 09:40:18 -0700
Cc:, Ralf Baechle <>
References: <>
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408
Maciej W. Rozycki wrote:
On Fri, 19 Jul 2002, Jun Sun wrote:

This patch dumps the offending code context rather than dumping the context of do_ri() function call itself.

 The message is misleading -- the reason may be any illegal opcode.

That is true.  Here is the revised one.

diff -Nru linux/arch/mips/kernel/traps.c.orig linux/arch/mips/kernel/traps.c
--- linux/arch/mips/kernel/traps.c.orig Thu Jul 18 15:39:50 2002
+++ linux/arch/mips/kernel/traps.c      Thu Jul 18 16:49:32 2002
@@ -614,8 +614,7 @@
 asmlinkage void do_ri(struct pt_regs *regs)
-       if (!user_mode(regs))
-               BUG();
+       die_if_kernel("Reserved instruction in kernel code", regs);
<Prev in Thread] Current Thread [Next in Thread>