* [PATCH] oprofile, arm: initialize perf_event pointers with NULL
@ 2010-08-30 16:21 Robert Richter
0 siblings, 0 replies; only message in thread
From: Robert Richter @ 2010-08-30 16:21 UTC (permalink / raw)
To: linux-arm-kernel
The pointers must be NULL'ed to avoid double-freeing the pointers in
rare cases during reinitialization.
Signed-off-by: Robert Richter <robert.richter@amd.com>
---
arch/arm/oprofile/common.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index c3652f7..d660cb8 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -351,6 +351,8 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
{
int cpu, ret = 0;
+ memset(&perf_events, 0, sizeof(perf_events));
+
perf_num_counters = armpmu_get_max_events();
counter_config = kcalloc(perf_num_counters,
--
1.7.1.1
--
Advanced Micro Devices, Inc.
Operating System Research Center
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-08-30 16:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-30 16:21 [PATCH] oprofile, arm: initialize perf_event pointers with NULL Robert Richter
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).