diff options
author | Peter Zijlstra <peterz@infradead.org> | 2022-10-04 10:46:58 +0200 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2022-10-04 13:32:08 +0200 |
commit | 0ce38047e82a02017839b6cae837f13a1383a3a0 (patch) | |
tree | df16785f23556ef32cff654c6e33f3168114087f | |
parent | 3f9a1b3591003b122a6ea2d69f89a0fd96ec58b9 (diff) | |
download | lwn-0ce38047e82a02017839b6cae837f13a1383a3a0.tar.gz lwn-0ce38047e82a02017839b6cae837f13a1383a3a0.zip |
perf: Fix lockdep_assert_event_ctx()
I'm a flamin' moron; because even after Mark told me it should be '&&'
I still got it wrong in the final commit.
Fixes: f3c0eba28704 ("perf: Add a few assertions")
Reported-by: Borislav Petkov <bp@alien8.de>
Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Borislav Petkov <bp@alien8.de>
Link: https://lkml.kernel.org/r/YvvIWmDBWdIUCMZj@FVFF77S0Q05N
-rw-r--r-- | include/linux/perf_event.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index e9b151cde491..853f64b6c8c2 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -644,7 +644,7 @@ struct pmu_event_list { #ifdef CONFIG_PROVE_LOCKING #define lockdep_assert_event_ctx(event) \ WARN_ON_ONCE(__lockdep_enabled && \ - (this_cpu_read(hardirqs_enabled) || \ + (this_cpu_read(hardirqs_enabled) && \ lockdep_is_held(&(event)->ctx->mutex) != LOCK_STATE_HELD)) #else #define lockdep_assert_event_ctx(event) |