From: Steven Rostedt Date: Wed, 29 Apr 2009 04:16:21 +0000 (-0400) Subject: tracing: fix ref count in splice pages X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=5beae6efd1004b44c3e257dc96087978e4c763c1;p=deliverable%2Flinux.git 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 --- 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, if (!ref) break; + ref->ref = 1; ref->buffer = info->tr->buffer; ref->page = ring_buffer_alloc_read_page(ref->buffer); if (!ref->page) {