From: Jiri Olsa Date: Wed, 13 Aug 2014 17:39:56 +0000 (+0200) Subject: perf: Fix perf_poll to return proper POLLHUP value X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=61b67684c4a4d04b30d9ed67aa2eadfa0089c590;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git perf: Fix perf_poll to return proper POLLHUP value Currently perf_poll returns POLL_HUP in case of error, which is wrong, because poll syscall expects POLLHUP. The POLL_HUP is meant to be used for SIGIO state. Signed-off-by: Jiri Olsa Acked-by: Peter Zijlstra Link: http://lkml.kernel.org/r/20140811120102.GY9918@twins.programming.kicks-ass.net Cc: Adrian Hunter Cc: Arnaldo Carvalho de Melo Cc: Corey Ashford Cc: David Ahern Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Jean Pihet Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Link: http://lkml.kernel.org/n/tip-0ywfthh4lh65swe15f6w2x2q@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/kernel/events/core.c b/kernel/events/core.c index 2d7363adf678..4575dd6e59ea 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -3627,7 +3627,7 @@ static unsigned int perf_poll(struct file *file, poll_table *wait) { struct perf_event *event = file->private_data; struct ring_buffer *rb; - unsigned int events = POLL_HUP; + unsigned int events = POLLHUP; poll_wait(file, &event->waitq, wait); /*