diff options
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 2bdfbff8a4f6..2879ecdaac43 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -118,6 +118,9 @@ static int x86_pmu_extra_regs(u64 config, struct perf_event *event) | |||
118 | continue; | 118 | continue; |
119 | if (event->attr.config1 & ~er->valid_mask) | 119 | if (event->attr.config1 & ~er->valid_mask) |
120 | return -EINVAL; | 120 | return -EINVAL; |
121 | /* Check if the extra msrs can be safely accessed*/ | ||
122 | if (!er->extra_msr_access) | ||
123 | return -ENXIO; | ||
121 | 124 | ||
122 | reg->idx = er->idx; | 125 | reg->idx = er->idx; |
123 | reg->config = event->attr.config1; | 126 | reg->config = event->attr.config1; |