diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-04-29 00:16:21 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2009-04-29 00:16:21 -0400 |
commit | 5beae6efd1004b44c3e257dc96087978e4c763c1 (patch) | |
tree | 8d3e4bb6cc11387197cbd10518201b375cd84fce /kernel/trace/trace.c | |
parent | cd891ae0305601bdb4d2e7e85282961c4ff256cd (diff) |
tracing: fix ref count in splice pages
The pages allocated for the splice binary buffer did not initialize
the ref count correctly. This caused pages not to be freed and causes
a drastic memory leak.
Thanks to logdev I was able to trace the tracer to find where the leak
was.
[ Impact: stop memory leak when using splice ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 5d704a41f836..9058240c85ca 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -3531,6 +3531,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos, | |||
3531 | if (!ref) | 3531 | if (!ref) |
3532 | break; | 3532 | break; |
3533 | 3533 | ||
3534 | ref->ref = 1; | ||
3534 | ref->buffer = info->tr->buffer; | 3535 | ref->buffer = info->tr->buffer; |
3535 | ref->page = ring_buffer_alloc_read_page(ref->buffer); | 3536 | ref->page = ring_buffer_alloc_read_page(ref->buffer); |
3536 | if (!ref->page) { | 3537 | if (!ref->page) { |