diff options
| author | Steven Rostedt <[email protected]> | 2010-03-13 00:48:41 +0000 |
|---|---|---|
| committer | Steven Rostedt <[email protected]> | 2010-03-13 01:29:20 +0000 |
| commit | 283740c619d211e34572cc93c8cdba92ccbdb9cc (patch) | |
| tree | 3bdce475017ff9a5fe82c6d214d27b27e555320c /net/lapb/lapb_in.c | |
| parent | function-graph: Init curr_ret_stack with ret_stack (diff) | |
| download | kernel-283740c619d211e34572cc93c8cdba92ccbdb9cc.tar.gz kernel-283740c619d211e34572cc93c8cdba92ccbdb9cc.zip | |
tracing: Use same local variable when resetting the ring buffer
In the ftrace code that resets the ring buffer it references the
buffer with a local variable, but then uses the tr->buffer as the
parameter to reset. If the wakeup tracer is running, which can
switch the tr->buffer with the max saved buffer, this can break
the requirement of disabling the buffer before the reset.
buffer = tr->buffer;
ring_buffer_record_disable(buffer);
synchronize_sched();
__tracing_reset(tr->buffer, cpu);
If the tr->buffer is swapped, then the reset is not happening to the
buffer that was disabled. This will cause the ring buffer to fail.
Found with Li Zefan's ftrace_stress_test.
Cc: [email protected]
Reported-by: Lai Jiangshan <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions
