diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-14 09:33:12 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-11-14 09:33:12 -0800 |
commit | f7018be29253b89175d03284f8f49ac4ffed0472 (patch) | |
tree | f8a7c2a66848774e7b421ad506b43a0dda34c8d1 /arch/x86/events/intel/core.c | |
parent | 1654e95ee30a82bec843e73a591f9ea3db8da8db (diff) | |
parent | 4716023a8f6a0f4a28047f14dd7ebdc319606b84 (diff) | |
download | linux-stable-f7018be29253b89175d03284f8f49ac4ffed0472.tar.gz linux-stable-f7018be29253b89175d03284f8f49ac4ffed0472.tar.bz2 linux-stable-f7018be29253b89175d03284f8f49ac4ffed0472.zip |
Merge tag 'perf_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Borislav Petkov:
- Prevent unintentional page sharing by checking whether a page
reference to a PMU samples page has been acquired properly before
that
- Make sure the LBR_SELECT MSR is saved/restored too
- Reset the LBR_SELECT MSR when resetting the LBR PMU to clear any
residual data left
* tag 'perf_urgent_for_v5.16_rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Avoid put_page() when GUP fails
perf/x86/vlbr: Add c->flags to vlbr event constraints
perf/x86/lbr: Reset LBR_SELECT during vlbr reset
Diffstat (limited to 'arch/x86/events/intel/core.c')
-rw-r--r-- | arch/x86/events/intel/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c index 603964408d2d..42cf01ecdd13 100644 --- a/arch/x86/events/intel/core.c +++ b/arch/x86/events/intel/core.c @@ -3048,8 +3048,10 @@ intel_vlbr_constraints(struct perf_event *event) { struct event_constraint *c = &vlbr_constraint; - if (unlikely(constraint_match(c, event->hw.config))) + if (unlikely(constraint_match(c, event->hw.config))) { + event->hw.flags |= c->flags; return c; + } return NULL; } |