Commit 4b67301b authored by Jan Kiszka's avatar Jan Kiszka
Browse files

ftrace: ipipe: Fix hardening of trace_recursive_lock

cpu_buffer->current_context is supposed to be protected by irq
disabling, just like in dovetail.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 4aee52a0
......@@ -2726,9 +2726,9 @@ rb_wakeups(struct ring_buffer *buffer, struct ring_buffer_per_cpu *cpu_buffer)
static __always_inline int
trace_recursive_lock(struct ring_buffer_per_cpu *cpu_buffer)
unsigned int val = cpu_buffer->current_context;
unsigned long pc = preempt_count();
unsigned long flags;
unsigned int val;
int bit;
......@@ -2739,6 +2739,8 @@ trace_recursive_lock(struct ring_buffer_per_cpu *cpu_buffer)
flags = hard_local_irq_save();
val = cpu_buffer->current_context;
if (unlikely(val & (1 << (bit + cpu_buffer->nest)))) {
* It is possible that this was called by transitioning
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment