[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-0ywfthh4lh65swe15f6w2x2q@git.kernel.org>
Date: Sun, 24 Aug 2014 07:59:26 -0700
From: tip-bot for Jiri Olsa <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, mingo@...nel.org, jolsa@...nel.org,
a.p.zijlstra@...llo.nl, peterz@...radead.org,
jean.pihet@...aro.org, acme@...nel.org, fweisbec@...il.com,
dsahern@...il.com, tglx@...utronix.de, cjashfor@...ux.vnet.ibm.com,
hpa@...or.com, linux-kernel@...r.kernel.org, paulus@...ba.org,
namhyung@...nel.org, adrian.hunter@...el.com
Subject: [tip:perf/core] perf:
Fix perf_poll to return proper POLLHUP value
Commit-ID: 61b67684c4a4d04b30d9ed67aa2eadfa0089c590
Gitweb: http://git.kernel.org/tip/61b67684c4a4d04b30d9ed67aa2eadfa0089c590
Author: Jiri Olsa <jolsa@...nel.org>
AuthorDate: Wed, 13 Aug 2014 19:39:56 +0200
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Sun, 24 Aug 2014 08:10:55 -0300
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 <jolsa@...nel.org>
Acked-by: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/20140811120102.GY9918@twins.programming.kicks-ass.net
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Corey Ashford <cjashfor@...ux.vnet.ibm.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jean Pihet <jean.pihet@...aro.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/n/tip-0ywfthh4lh65swe15f6w2x2q@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
kernel/events/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 2d7363a..4575dd6 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);
/*
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists