Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140654
b: refs/heads/master
c: 97b17ef
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Ingo Molnar committed Jan 22, 2009
1 parent aabf57e commit 856516b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5bc4564b224c3d9fe6dddafa25f56059bd978231
refs/heads/master: 97b17efe4537e11bf6669106cfe4ee2c5331b267
15 changes: 15 additions & 0 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2266,9 +2266,24 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a,
if (buffer_a->pages != buffer_b->pages)
return -EINVAL;

if (ring_buffer_flags != RB_BUFFERS_ON)
return -EAGAIN;

if (atomic_read(&buffer_a->record_disabled))
return -EAGAIN;

if (atomic_read(&buffer_b->record_disabled))
return -EAGAIN;

cpu_buffer_a = buffer_a->buffers[cpu];
cpu_buffer_b = buffer_b->buffers[cpu];

if (atomic_read(&cpu_buffer_a->record_disabled))
return -EAGAIN;

if (atomic_read(&cpu_buffer_b->record_disabled))
return -EAGAIN;

/*
* We can't do a synchronize_sched here because this
* function can be called in atomic context.
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ update_max_tr_single(struct trace_array *tr, struct task_struct *tsk, int cpu)

ftrace_enable_cpu();

WARN_ON_ONCE(ret);
WARN_ON_ONCE(ret && ret != -EAGAIN);

__update_max_tr(tr, tsk, cpu);
__raw_spin_unlock(&ftrace_max_lock);
Expand Down

0 comments on commit 856516b

Please sign in to comment.