Commit [8c4af3]  Maximize  Restore  History

gcc-4.6: printk: use stable variable to dump kmsg buffer

kmsg_dump takes care to sample the global variables
inside a spinlock, but then goes on to use the same
variables outside the spinlock region too.

Use the correct variable. This will make the race
window smaller.

Found by gcc 4.6's new warnings.

Signed-off-by: Andi Kleen <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>

Andi Kleen Andi Kleen 2010-08-10

Linus Torvalds Linus Torvalds 2010-08-10

changed kernel/printk.c
kernel/printk.c Diff Switch to side-by-side view

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks