diff options
author | Alexander Nyberg <alexn@telia.com> | 2005-06-25 23:58:27 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-26 01:24:55 +0200 |
commit | 4f339ecb30c759f94a29992d4635d9194132b6cf (patch) | |
tree | 9a1438b35d87a1d3a3359c273a39ac4895578e1c /arch/i386/mm/fault.c | |
parent | [PATCH] kdump: Use real pt_regs from exception (diff) | |
download | linux-4f339ecb30c759f94a29992d4635d9194132b6cf.tar.xz linux-4f339ecb30c759f94a29992d4635d9194132b6cf.zip |
[PATCH] kdump: Save trap information for later analysis
If we are faulting in kernel it is quite possible this will lead to a
panic. Save trap number, cr2 (in case of page fault) and error_code in the
current thread (these fields already exist for signal delivery but are not
used here).
This helps later kdump crash analyzing from user-space (a script has been
submitted to dig this info out in gdb).
Signed-off-by: Alexander Nyberg <alexn@telia.com>
Cc: <fastboot@lists.osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to '')
-rw-r--r-- | arch/i386/mm/fault.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index a509237c4815..92ed6c0a55da 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -463,6 +463,9 @@ no_context: printk(KERN_ALERT "*pte = %08lx\n", page); } #endif + tsk->thread.cr2 = address; + tsk->thread.trap_no = 14; + tsk->thread.error_code = error_code; die("Oops", regs, error_code); bust_spinlocks(0); do_exit(SIGKILL); |