panic(): code wrong?

Manfred Spraul (manfreds@colorfullife.com)
Thu, 23 Dec 1999 16:40:17 +0100


panic() contains the following if statement:

> printk(KERN_EMERG "Kernel panic: %s\n",buf);
> if (current == init_tasks[0])
^^^^^^^^^^^^
> printk(KERN_EMERG "In swapper task - not syncing\n");
> else

I think this is wrong, it AFAICS it should be:

> if(current == init_tasks[hard_smp_processor_id()])
> printk(KERN_EMERG "In idle task - not syncing\n");

Additionally, smp_call_function() is broken, could I disallow calling
the function with disabled local interrupts?
If 2 cpu's disable the local interrupts, send an IPI message and poll
until the second cpu has received the interrupt, then we have a
dead-lock.
Currently mtrr[easy to fix], machine_restart() and panic() call
smp_call_function() with disabled interrupts.

I could hide the problem within smp_call_function(), but the result
would be extremely ugly.

Any better ideas?

Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/