diff options
Diffstat (limited to 'kernel/trace/ring_buffer.c')
-rw-r--r-- | kernel/trace/ring_buffer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index b59aea2c48c2..e444ff88f0a4 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -620,6 +620,9 @@ int ring_buffer_poll_wait(struct ring_buffer *buffer, int cpu, | |||
620 | if (cpu == RING_BUFFER_ALL_CPUS) | 620 | if (cpu == RING_BUFFER_ALL_CPUS) |
621 | work = &buffer->irq_work; | 621 | work = &buffer->irq_work; |
622 | else { | 622 | else { |
623 | if (!cpumask_test_cpu(cpu, buffer->cpumask)) | ||
624 | return -EINVAL; | ||
625 | |||
623 | cpu_buffer = buffer->buffers[cpu]; | 626 | cpu_buffer = buffer->buffers[cpu]; |
624 | work = &cpu_buffer->irq_work; | 627 | work = &cpu_buffer->irq_work; |
625 | } | 628 | } |