diff options
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r-- | kernel/events/core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index d3b9df5962c2..58690af323e4 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -3558,9 +3558,13 @@ static void ring_buffer_wakeup(struct perf_event *event) | |||
3558 | 3558 | ||
3559 | rcu_read_lock(); | 3559 | rcu_read_lock(); |
3560 | rb = rcu_dereference(event->rb); | 3560 | rb = rcu_dereference(event->rb); |
3561 | list_for_each_entry_rcu(event, &rb->event_list, rb_entry) { | 3561 | if (!rb) |
3562 | goto unlock; | ||
3563 | |||
3564 | list_for_each_entry_rcu(event, &rb->event_list, rb_entry) | ||
3562 | wake_up_all(&event->waitq); | 3565 | wake_up_all(&event->waitq); |
3563 | } | 3566 | |
3567 | unlock: | ||
3564 | rcu_read_unlock(); | 3568 | rcu_read_unlock(); |
3565 | } | 3569 | } |
3566 | 3570 | ||