Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b39b70366c5be68affe9777de72846540d840464
Commit:     b39b70366c5be68affe9777de72846540d840464
Parent:     12710a56cb56e81bd8f457cc2f50c2ebfc0cb390
Author:     Andrew Morton <[EMAIL PROTECTED]>
AuthorDate: Fri Jun 8 13:47:01 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Jun 8 17:23:34 2007 -0700

    x86_64: oops_begin() fix
    
    We don't want to see this:
    
    >  BUG: using smp_processor_id() in preemptible [00000001] code: bash/3857
    >  caller is oops_begin+0xb/0x6f
    >
    >  Call Trace:
    >  [<ffffffff8020ab4d>] show_trace+0x34/0x4f
    >  [<ffffffff8020ab7a>] dump_stack+0x12/0x17
    >  [<ffffffff8030d92d>] debug_smp_processor_id+0xad/0xbc
    >  [<ffffffff8042388f>] oops_begin+0xb/0x6f
    >  [<ffffffff8042520b>] do_page_fault+0x66a/0x7c0
    >  [<ffffffff804234bd>] error_exit+0x0/0x84
    >
    
    coming out when the kernel is trying to oops.
    
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/x86_64/kernel/traps.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index cb29fb9..aac1c0b 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -465,13 +465,14 @@ static unsigned int die_nest_count;
 
 unsigned __kprobes long oops_begin(void)
 {
-       int cpu = smp_processor_id();
+       int cpu;
        unsigned long flags;
 
        oops_enter();
 
        /* racy, but better than risking deadlock. */
        local_irq_save(flags);
+       cpu = smp_processor_id();
        if (!spin_trylock(&die_lock)) { 
                if (cpu == die_owner) 
                        /* nested oops. should stop eventually */;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to