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 2f8f3f1..24e3a4b 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -3360,9 +3360,13 @@ static void ring_buffer_wakeup(struct perf_event *event) rcu_read_lock(); rb = rcu_dereference(event->rb); - list_for_each_entry_rcu(event, &rb->event_list, rb_entry) { + if (!rb) + goto unlock; + + list_for_each_entry_rcu(event, &rb->event_list, rb_entry) wake_up_all(&event->waitq); - } + +unlock: rcu_read_unlock(); } |