perf/ring_buffer: Allow the EPOLLRDNORM flag for poll
[ Upstream commitc96fff391c] The poll man page says POLLRDNORM is equivalent to POLLIN. For poll(), it seems that if user sets pollfd with POLLRDNORM in userspace, perf_poll will not return until timeout even if perf_output_wakeup called, whereas POLLIN returns. Fixes:76369139ce("perf: Split up buffer handling from core code") Signed-off-by: Tao Chen <chen.dylane@linux.dev> Signed-off-by: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: https://lore.kernel.org/r/20250314030036.2543180-1-chen.dylane@linux.dev Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
345957c1cf
commit
5108828fec
@@ -19,7 +19,7 @@
|
||||
|
||||
static void perf_output_wakeup(struct perf_output_handle *handle)
|
||||
{
|
||||
atomic_set(&handle->rb->poll, EPOLLIN);
|
||||
atomic_set(&handle->rb->poll, EPOLLIN | EPOLLRDNORM);
|
||||
|
||||
handle->event->pending_wakeup = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user