From: Linus Torvalds Date: Tue, 6 Dec 2011 00:54:00 +0000 (-0800) Subject: Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel... X-Git-Tag: v6.6-pxa1908~28996 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=232ea344550c4a099d35d9df552509d6748a31c0;p=linux.git Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf: Fix loss of notification with multi-event perf, x86: Force IBS LVT offset assignment for family 10h perf, x86: Disable PEBS on SandyBridge chips trace_events_filter: Use rcu_assign_pointer() when setting ftrace_event_call->filter perf session: Fix crash with invalid CPU list perf python: Fix undefined symbol problem perf/x86: Enable raw event access to Intel offcore events perf: Don't use -ENOSPC for out of PMU resources perf: Do not set task_ctx pointer in cpuctx if there are no events in the context perf/x86: Fix PEBS instruction unwind oprofile, x86: Fix crash when unloading module (nmi timer mode) oprofile: Fix crash when unloading module (hr timer mode) --- 232ea344550c4a099d35d9df552509d6748a31c0 diff --cc arch/arm/kernel/perf_event.c index c475379199b1,ff17b17b668e..8e9c98edc068 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@@ -343,17 -343,11 +343,17 @@@ validate_group(struct perf_event *event { struct perf_event *sibling, *leader = event->group_leader; struct pmu_hw_events fake_pmu; + DECLARE_BITMAP(fake_used_mask, ARMPMU_MAX_HWEVENTS); - memset(&fake_pmu, 0, sizeof(fake_pmu)); + /* + * Initialise the fake PMU. We only need to populate the + * used_mask for the purposes of validation. + */ + memset(fake_used_mask, 0, sizeof(fake_used_mask)); + fake_pmu.used_mask = fake_used_mask; if (!validate_event(&fake_pmu, leader)) - return -ENOSPC; + return -EINVAL; list_for_each_entry(sibling, &leader->sibling_list, group_entry) { if (!validate_event(&fake_pmu, sibling))