]> err.no Git - linux-2.6/commit
printk: make printk more robust by not allowing recursion
authorIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:07:58 +0000 (21:07 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 25 Jan 2008 20:07:58 +0000 (21:07 +0100)
commit32a76006683f7b28ae3cc491da37716e002f198e
treeab4bf487f675ab1a19b3ad0eac78a0e48f5144e9
parentb47711bfbcd4eb77ca61ef0162487b20e023ae55
printk: make printk more robust by not allowing recursion

make printk more robust by allowing recursion only if there's a crash
going on. Also add recursion detection.

I've tested it with an artificially injected printk recursion - instead
of a lockup or spontaneous reboot or other crash, the output was a well
controlled:

[   41.057335] SysRq : <2>BUG: recent printk recursion!
[   41.057335] loglevel0-8 reBoot Crashdump show-all-locks(D) tErm Full kIll saK showMem Nice powerOff showPc show-all-timers(Q) unRaw Sync showTasks Unmount shoW-blocked-tasks

also do all this printk-debug logic with irqs disabled.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Reviewed-by: Nick Piggin <npiggin@suse.de>
kernel/printk.c