lkml.org 
[lkml]   [2009]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [patch] x86: optimise page fault entry
    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@cmpxchg.org>
    ---
    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;

    \
     
     \ /
      Last update: 2009-01-21 20:49    [W:0.028 / U:1.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site