diff options
-rw-r--r-- | kernel/events/core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index a25460559b4f..2d7363adf678 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -3629,6 +3629,7 @@ static unsigned int perf_poll(struct file *file, poll_table *wait) | |||
3629 | struct ring_buffer *rb; | 3629 | struct ring_buffer *rb; |
3630 | unsigned int events = POLL_HUP; | 3630 | unsigned int events = POLL_HUP; |
3631 | 3631 | ||
3632 | poll_wait(file, &event->waitq, wait); | ||
3632 | /* | 3633 | /* |
3633 | * Pin the event->rb by taking event->mmap_mutex; otherwise | 3634 | * Pin the event->rb by taking event->mmap_mutex; otherwise |
3634 | * perf_event_set_output() can swizzle our rb and make us miss wakeups. | 3635 | * perf_event_set_output() can swizzle our rb and make us miss wakeups. |
@@ -3638,9 +3639,6 @@ static unsigned int perf_poll(struct file *file, poll_table *wait) | |||
3638 | if (rb) | 3639 | if (rb) |
3639 | events = atomic_xchg(&rb->poll, 0); | 3640 | events = atomic_xchg(&rb->poll, 0); |
3640 | mutex_unlock(&event->mmap_mutex); | 3641 | mutex_unlock(&event->mmap_mutex); |
3641 | |||
3642 | poll_wait(file, &event->waitq, wait); | ||
3643 | |||
3644 | return events; | 3642 | return events; |
3645 | } | 3643 | } |
3646 | 3644 | ||