aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-01-11 16:42:14 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 22:01:10 -0500
commit6e3f361781573a27296c77a79c9892dec8f2e36c (patch)
treeb08ff3ed470d0e21ce3d462f16d6d3f0a6965a9c /arch/x86_64/mm
parent5c617cfa6422bfba9e79d8d004303a6cc3d2e7d7 (diff)
[PATCH] x86_64: make trap information available to die notification handlers
This adjusts things so that handlers of the die() notifier will have sufficient information about the trap currently being handled. It also adjusts the notify_die() prototype to (again) match that of i386. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r--arch/x86_64/mm/fault.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index 3a63707a698b..21d1596946d6 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -222,10 +222,15 @@ static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,
222 unsigned long error_code) 222 unsigned long error_code)
223{ 223{
224 unsigned long flags = oops_begin(); 224 unsigned long flags = oops_begin();
225 struct task_struct *tsk;
225 226
226 printk(KERN_ALERT "%s: Corrupted page table at address %lx\n", 227 printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
227 current->comm, address); 228 current->comm, address);
228 dump_pagetable(address); 229 dump_pagetable(address);
230 tsk = current;
231 tsk->thread.cr2 = address;
232 tsk->thread.trap_no = 14;
233 tsk->thread.error_code = error_code;
229 __die("Bad pagetable", regs, error_code); 234 __die("Bad pagetable", regs, error_code);
230 oops_end(flags); 235 oops_end(flags);
231 do_exit(SIGKILL); 236 do_exit(SIGKILL);
@@ -521,6 +526,9 @@ no_context:
521 printk_address(regs->rip); 526 printk_address(regs->rip);
522 printk("\n"); 527 printk("\n");
523 dump_pagetable(address); 528 dump_pagetable(address);
529 tsk->thread.cr2 = address;
530 tsk->thread.trap_no = 14;
531 tsk->thread.error_code = error_code;
524 __die("Oops", regs, error_code); 532 __die("Oops", regs, error_code);
525 /* Executive summary in case the body of the oops scrolled away */ 533 /* Executive summary in case the body of the oops scrolled away */
526 printk(KERN_EMERG "CR2: %016lx\n", address); 534 printk(KERN_EMERG "CR2: %016lx\n", address);