* [PATCH] perf/hwbp: Fix cleanup in case of kzalloc failure
@ 2013-02-06 21:29 Daniel Baluta
2013-02-06 22:58 ` Frederic Weisbecker
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Daniel Baluta @ 2013-02-06 21:29 UTC (permalink / raw)
To: a.p.zijlstra, paulus, mingo, acme, linux-kernel, fweisbec; +Cc: Daniel Baluta
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>
---
kernel/events/hw_breakpoint.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf/hwbp: Fix cleanup in case of kzalloc failure
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:perf/urgent] perf/hwbp: Fix cleanup in case of kzalloc() failure tip-bot for Daniel Baluta
2013-02-15 16:40 ` [tip:perf/core] perf/hwbp: Fix cleanup in case of kzalloc failure tip-bot for Daniel Baluta
2 siblings, 0 replies; 4+ messages in thread
From: Frederic Weisbecker @ 2013-02-06 22:58 UTC (permalink / raw)
To: Daniel Baluta, Ingo Molnar
Cc: a.p.zijlstra, paulus, mingo, acme, linux-kernel
2013/2/6 Daniel Baluta <dbaluta@ixiacom.com>:
> 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>
Good catch!
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
> ---
> kernel/events/hw_breakpoint.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> 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;
> }
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/urgent] perf/hwbp: Fix cleanup in case of kzalloc() failure
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
2013-02-15 16:40 ` [tip:perf/core] perf/hwbp: Fix cleanup in case of kzalloc failure tip-bot for Daniel Baluta
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Daniel Baluta @ 2013-02-07 12:11 UTC (permalink / raw)
To: linux-tip-commits; +Cc: linux-kernel, dbaluta, hpa, mingo, fweisbec, tglx
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;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:perf/core] perf/hwbp: Fix cleanup in case of kzalloc failure
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:perf/urgent] perf/hwbp: Fix cleanup in case of kzalloc() failure tip-bot for Daniel Baluta
@ 2013-02-15 16:40 ` tip-bot for Daniel Baluta
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Daniel Baluta @ 2013-02-15 16:40 UTC (permalink / raw)
To: linux-tip-commits
Cc: acme, linux-kernel, paulus, mingo, dbaluta, hpa, mingo,
a.p.zijlstra, fweisbec, tglx
Commit-ID: 02e176af92f3e2e9ec3a48792036566af2dcd534
Gitweb: http://git.kernel.org/tip/02e176af92f3e2e9ec3a48792036566af2dcd534
Author: Daniel Baluta <dbaluta@ixiacom.com>
AuthorDate: Wed, 6 Feb 2013 23:29:20 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 14 Feb 2013 17:06:39 -0300
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: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1360186160-7566-1-git-send-email-dbaluta@ixiacom.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
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;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-15 16:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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:perf/urgent] perf/hwbp: Fix cleanup in case of kzalloc() failure tip-bot for Daniel Baluta
2013-02-15 16:40 ` [tip:perf/core] perf/hwbp: Fix cleanup in case of kzalloc failure tip-bot for Daniel Baluta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).