mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Eric Dumazet <eric.dumazet@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	eric.dumazet@gmail.com, rostedt@goodmis.org, tglx@linutronix.de
Subject: [tip:tracing/urgent] ring-buffer: Fix memleak in ring_buffer_free()
Date: Sat, 8 Aug 2009 14:57:37 GMT	[thread overview]
Message-ID: <tip-bd3f02212d6a457267e0c9c02c426151c436d9d4@git.kernel.org> (raw)
In-Reply-To: <4A7C06B9.2090302@gmail.com>

Commit-ID:  bd3f02212d6a457267e0c9c02c426151c436d9d4
Gitweb:     http://git.kernel.org/tip/bd3f02212d6a457267e0c9c02c426151c436d9d4
Author:     Eric Dumazet <eric.dumazet@gmail.com>
AuthorDate: Fri, 7 Aug 2009 12:49:29 +0200
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Fri, 7 Aug 2009 12:46:39 -0400

ring-buffer: Fix memleak in ring_buffer_free()

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

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <4A7C06B9.2090302@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>


---
 kernel/trace/ring_buffer.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index d4d3580..a330513 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);

      parent reply	other threads:[~2009-08-08 14:58 UTC|newest]

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

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=tip-bd3f02212d6a457267e0c9c02c426151c436d9d4@git.kernel.org \
    --to=eric.dumazet@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®