mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Daniel Baluta <dbaluta@ixiacom.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, dbaluta@ixiacom.com, hpa@zytor.com,
	mingo@kernel.org, fweisbec@gmail.com, tglx@linutronix.de
Subject: [tip:perf/urgent] perf/hwbp: Fix cleanup in case of kzalloc() failure
Date: Thu, 7 Feb 2013 04:11:25 -0800	[thread overview]
Message-ID: <tip-e97cbe3edf7d88aad4c21dd3de124d9f9d039881@git.kernel.org> (raw)
In-Reply-To: <1360186160-7566-1-git-send-email-dbaluta@ixiacom.com>

Commit-ID:  e97cbe3edf7d88aad4c21dd3de124d9f9d039881
Gitweb:     http://git.kernel.org/tip/e97cbe3edf7d88aad4c21dd3de124d9f9d039881
Author:     Daniel Baluta <dbaluta@ixiacom.com>
AuthorDate: Wed, 6 Feb 2013 23:29:20 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 7 Feb 2013 11:52:19 +0100

perf/hwbp: Fix cleanup in case of kzalloc() failure

Obviously this is a typo and could result in memory leaks
if kzalloc fails on a given cpu.

Signed-off-by: Daniel Baluta <dbaluta@ixiacom.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: a.p.zijlstra@chello.nl
Cc: paulus@samba.org
Cc: acme@ghostprotocols.net
Link: http://lkml.kernel.org/r/1360186160-7566-1-git-send-email-dbaluta@ixiacom.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/events/hw_breakpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index fe8a916..a64f8ae 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -676,7 +676,7 @@ int __init init_hw_breakpoint(void)
  err_alloc:
 	for_each_possible_cpu(err_cpu) {
 		for (i = 0; i < TYPE_MAX; i++)
-			kfree(per_cpu(nr_task_bp_pinned[i], cpu));
+			kfree(per_cpu(nr_task_bp_pinned[i], err_cpu));
 		if (err_cpu == cpu)
 			break;
 	}

  parent reply	other threads:[~2013-02-07 12:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 21:29 [PATCH] perf/hwbp: Fix cleanup in case of kzalloc failure Daniel Baluta
2013-02-06 22:58 ` Frederic Weisbecker
2013-02-07 12:11 ` tip-bot for Daniel Baluta [this message]
2013-02-15 16:40 ` [tip:perf/core] " tip-bot for Daniel Baluta

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-e97cbe3edf7d88aad4c21dd3de124d9f9d039881@git.kernel.org \
    --to=dbaluta@ixiacom.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.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

Powered by JetHome