]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ring-buffer: prevent false positive warning
authorSteven Rostedt <srostedt@redhat.com>
Tue, 23 Dec 2008 16:32:25 +0000 (11:32 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 18 Jan 2009 18:43:44 +0000 (10:43 -0800)
commit6870fdf3a70ea33f544cb1474916bee1c366ce9d
tree71d66fdc242a0c40525d14887f63f5a7718a848d
parenta94b68d6dcb74563d07c6eaf3f4b1191d0171e19
ring-buffer: prevent false positive warning

commit 98db8df777438e16ad0f44a0fba05ebbdb73db8d upstream.

Impact: eliminate false WARN_ON message

If an interrupt goes off after the setting of the local variable
tail_page and before incrementing the write index of that page,
the interrupt could push the commit forward to the next page.

Later a check is made to see if interrupts pushed the buffer around
the entire ring buffer by comparing the next page to the last commited
page. This can produce a false positive if the interrupt had pushed
the commit page forward as stated above.

Thanks to Jiaying Zhang for finding this race.

Reported-by: Jiaying Zhang <jiayingz@google.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/trace/ring_buffer.c