public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux kernel <linux-kernel@vger.kernel.org>, stable@kernel.org
Subject: [PATCH] ring-buffer: Fix memleak in ring_buffer_free()
Date: Fri, 07 Aug 2009 12:49:29 +0200	[thread overview]
Message-ID: <4A7C06B9.2090302@gmail.com> (raw)

I noticed oprofile memleaked in linux-2.6 current tree,
and tracked this ring-buffer leak.

This is a stable candidate.

[PATCH] ring-buffer: Fix memleak in ring_buffer_free()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index bf27bb7..c1d874e 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -735,6 +735,7 @@ ring_buffer_free(struct ring_buffer *buffer)
 
 	put_online_cpus();
 
+	kfree(buffer->buffers);
 	free_cpumask_var(buffer->cpumask);
 
 	kfree(buffer);

             reply	other threads:[~2009-08-07 10:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-07 10:49 Eric Dumazet [this message]
2009-08-07 15:15 ` [PATCH] ring-buffer: Fix memleak in ring_buffer_free() Steven Rostedt
2009-08-07 17:36 ` [GIT PULL] " Steven Rostedt
2009-08-08 14:53   ` Ingo Molnar
2009-08-08 14:57 ` [tip:tracing/urgent] " tip-bot for Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A7C06B9.2090302@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox