public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] perf: Don't call release_callchain_buffers if alloc fails
@ 2012-01-20  1:12 Namhyung Kim
  2012-01-20  1:12 ` [PATCH 2/2] perf: Call perf_cgroup_event_time directly Namhyung Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Namhyung Kim @ 2012-01-20  1:12 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: Namhyung Kim, Peter Zijlstra, Paul Mackerras,
	Arnaldo Carvalho de Melo, linux-kernel

When alloc_callchain_buffers() fails, it frees all of
entries before return. In addition, calling the
release_callchain_buffers() will cause a NULL pointer
dereference since callchain_cpu_entries is not set.

Signed-off-by: Namhyung Kim <namhyung.kim@lge.com>
---
 kernel/events/callchain.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/kernel/events/callchain.c b/kernel/events/callchain.c
index 057e24b665cf..6581a040f399 100644
--- a/kernel/events/callchain.c
+++ b/kernel/events/callchain.c
@@ -115,8 +115,6 @@ int get_callchain_buffers(void)
 	}
 
 	err = alloc_callchain_buffers();
-	if (err)
-		release_callchain_buffers();
 exit:
 	mutex_unlock(&callchain_mutex);
 
-- 
1.7.9.rc1.dirty


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-22 21:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20  1:12 [PATCH 1/2] perf: Don't call release_callchain_buffers if alloc fails Namhyung Kim
2012-01-20  1:12 ` [PATCH 2/2] perf: Call perf_cgroup_event_time directly Namhyung Kim
2012-01-22 21:08   ` [tip:perf/urgent] perf: Call perf_cgroup_event_time() directly tip-bot for Namhyung Kim
2012-01-20  3:59 ` [PATCH 1/2] perf: Don't call release_callchain_buffers if alloc fails Frederic Weisbecker
2012-01-22 21:07 ` [tip:perf/urgent] perf: Don't call release_callchain_buffers() if allocation fails tip-bot for Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox