From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jean Pihet <jean.pihet@linaro.org>,
Namhyung Kim <namhyung@kernel.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 12/16] perf: Fix perf_poll to return proper POLLHUP value
Date: Fri, 22 Aug 2014 13:29:24 -0300 [thread overview]
Message-ID: <1408724968-3441-13-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1408724968-3441-1-git-send-email-acme@kernel.org>
From: Jiri Olsa <jolsa@kernel.org>
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.
Acked-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20140811120102.GY9918@twins.programming.kicks-ass.net
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jean Pihet <jean.pihet@linaro.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-0ywfthh4lh65swe15f6w2x2q@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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 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);
/*
--
1.9.3
next prev parent reply other threads:[~2014-08-22 16:30 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 16:29 [GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 01/16] perf symbols: Don't try to find DSOs in SYSV maps Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 02/16] perf tools powerpc: Explicitly include util/debug.h Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 03/16] perf hists browser: Get rid of unused 'remaining' variable Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 04/16] perf hists browser: Fix children overhead dump Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 05/16] perf hists browser: Factor out hist_browser__show_callchain_entry() Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 06/16] perf tests: Add a test for tracking with sched_switch Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 07/16] perf scripting: Add 'flush' callback to scripting API Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 08/16] perf machine: Rename machine__get_kernel_start_addr() method Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 09/16] perf tools: Add machine__kernel_ip() Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 10/16] perf hists browser: Cleanup callchain print functions Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 11/16] perf machine: Fallback to MAP__FUNCTION if daddr maps are NULL Arnaldo Carvalho de Melo
2014-08-22 16:29 ` Arnaldo Carvalho de Melo [this message]
2014-08-22 16:29 ` [PATCH 13/16] perf: Add PERF_EVENT_STATE_EXIT state for events with exited task Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 14/16] perf top: Use set_term_quiet() instead of open coded equivalent Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 15/16] perf tools: Add +field argument support for --field option Arnaldo Carvalho de Melo
2014-08-22 16:29 ` [PATCH 16/16] perf hists browser: Consolidate callchain print functions in TUI Arnaldo Carvalho de Melo
2014-08-24 10:11 ` [GIT PULL 00/16] perf/core improvements and fixes Ingo Molnar
2014-08-24 11:16 ` Arnaldo Carvalho de Melo
2014-08-24 14:47 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408724968-3441-13-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jean.pihet@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).