We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e31b75 commit cd2375aCopy full SHA for cd2375a
kernel/trace/ring_buffer.c
@@ -4398,8 +4398,13 @@ rb_reserve_next_event(struct trace_buffer *buffer,
4398
int nr_loops = 0;
4399
int add_ts_default;
4400
4401
- /* ring buffer does cmpxchg, make sure it is safe in NMI context */
4402
- if (!IS_ENABLED(CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG) &&
+ /*
+ * ring buffer does cmpxchg as well as atomic64 operations
4403
+ * (which some archs use locking for atomic64), make sure this
4404
+ * is safe in NMI context
4405
+ */
4406
+ if ((!IS_ENABLED(CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG) ||
4407
+ IS_ENABLED(CONFIG_GENERIC_ATOMIC64)) &&
4408
(unlikely(in_nmi()))) {
4409
return NULL;
4410
}
0 commit comments