diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-06-11 11:12:00 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-06-15 11:37:19 -0400 |
commit | c7b0930857e2278f2e7714db6294e94c57f623b0 (patch) | |
tree | b43f113aa02063362d2e0f984d29c78afae87a02 /kernel/trace/trace_stat.h | |
parent | 0ac2058f686a19fe8ab25c4f3104fc1580dce7cf (diff) |
ring-buffer: prevent adding write in discarded area
This a very tight race where an interrupt could come in and not
have enough data to put into the end of a buffer page, and that
it would fail to write and need to go to the next page.
But if this happened when another writer was about to reserver
their data, and that writer has smaller data to reserve, then
it could succeed even though the interrupt moved the tail page.
To pervent that, if we fail to store data, and by subtracting the
amount we reserved we still have room for smaller data, we need
to fill that space with "discarded" data.
[ Impact: prevent race were buffer data may be lost ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_stat.h')
0 files changed, 0 insertions, 0 deletions