Re: [patch] x86: optimise page fault entry
From: Johannes Weiner
Date: Wed Jan 21 2009 - 14:46:08 EST
Nick, here is the patch. Ingo could you fold that one into Nick's as
a micro-mini minor fix?
On Tue, Jan 20, 2009 at 04:24:26AM +0100, Nick Piggin wrote:
> Index: linux-2.6/arch/x86/mm/fault.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/mm/fault.c
> +++ linux-2.6/arch/x86/mm/fault.c
> @@ -409,15 +409,15 @@ static void show_fault_oops(struct pt_re
> }
>
> #ifdef CONFIG_X86_64
> -static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,
> - unsigned long error_code)
> +static noinline void pgtable_bad(struct pt_regs *regs,
> + unsigned long error_code, unsigned long address)
> {
> unsigned long flags = oops_begin();
> int sig = SIGKILL;
> - struct task_struct *tsk;
> + struct task_struct *tsk = current;
>
> printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
> - current->comm, address);
> + tsk->comm, address);
> dump_pagetable(address);
> tsk = current;
---
tsk is already assigned to current, drop the redundant second
assignment which Nick probably just overlooked when doing the cleanup.
Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
---
arch/x86/mm/fault.c | 1 -
1 file changed, 1 deletion(-)
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -419,7 +419,6 @@ static noinline void pgtable_bad(struct
printk(KERN_ALERT "%s: Corrupted page table at address %lx\n",
tsk->comm, address);
dump_pagetable(address);
- tsk = current;
tsk->thread.cr2 = address;
tsk->thread.trap_no = 14;
tsk->thread.error_code = error_code;
--
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/