diff options
author | 2025-03-06 13:11:02 +0800 | |
---|---|---|
committer | 2025-03-06 22:42:26 +0100 | |
commit | 7a310c644cf571fbdb1d447a1dc39cf048634589 (patch) | |
tree | cbb30b31daebb68a368dd3b3a5d2d094f19de2e0 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | uprobes/x86: Harden uretprobe syscall trampoline check (diff) | |
download | linux-rng-7a310c644cf571fbdb1d447a1dc39cf048634589.tar.xz linux-rng-7a310c644cf571fbdb1d447a1dc39cf048634589.zip |
perf/x86/intel/bts: Check if bts_ctx is allocated when calling BTS functions
bts_ctx might not be allocated, for example if the CPU has X86_FEATURE_PTI,
but intel_bts_disable/enable_local() and intel_bts_interrupt() are called
unconditionally from intel_pmu_handle_irq() and crash on bts_ctx.
So check if bts_ctx is allocated when calling BTS functions.
Fixes: 3acfcefa795c ("perf/x86/intel/bts: Allocate bts_ctx only if necessary")
Reported-by: Jiri Olsa <olsajiri@gmail.com>
Tested-by: Jiri Olsa <jolsa@kernel.org>
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Suggested-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250306051102.2642-1-lirongqing@baidu.com
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions