Commit-ID: 4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb Gitweb: http://git.kernel.org/tip/4cbe75be5c6ae86bdc7daec864eeb2dfd66f48bb Author: Robert Richter <robert.richter@xxxxxxx> AuthorDate: Mon, 30 Aug 2010 18:21:55 +0200 Committer: Robert Richter <robert.richter@xxxxxxx> CommitDate: Tue, 31 Aug 2010 12:51:43 +0200 oprofile, arm: initialize perf_event pointers with NULL The pointers must be NULL'ed to avoid double-freeing the pointers in rare cases during reinitialization. Signed-off-by: Robert Richter <robert.richter@xxxxxxx> --- 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, -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |