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 <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

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
Loading...