* [PATCH] perf symbols: symbol-minimal.c causes random fd to be closed
@ 2013-12-12 2:47 Anton Blanchard
2013-12-12 14:21 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 2+ messages in thread
From: Anton Blanchard @ 2013-12-12 2:47 UTC (permalink / raw)
To: cody, a.p.zijlstra, paulus, mingo, acme, mpe; +Cc: linux-kernel
I hit a cryptic failure when testing a recent version
of perf:
# perf report
write failure on standard output: Bad file descriptor
The issue is in commit b68e2f91 (perf symbols: Introduce symsrc
structure). symsrc__destroy() does a close(ss->fd) but
ss->fd is only initialised in the symbol-elf.c case and
not for symbol-minimal.c.
The issue has been around for a while however most people
will build with libelf which wont use the symbol-minimal.c
code.
Cc: stable@vger.kernel.org # v3.8+
Signed-off-by: Anton Blanchard <anton@samba.org>
---
diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
index 2d2dd05..3528204 100644
--- a/tools/perf/util/symbol-minimal.c
+++ b/tools/perf/util/symbol-minimal.c
@@ -254,6 +254,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso __maybe_unused,
goto out_close;
ss->type = type;
+ ss->fd = fd;
return 0;
out_close:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf symbols: symbol-minimal.c causes random fd to be closed
2013-12-12 2:47 [PATCH] perf symbols: symbol-minimal.c causes random fd to be closed Anton Blanchard
@ 2013-12-12 14:21 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-12-12 14:21 UTC (permalink / raw)
To: Anton Blanchard; +Cc: cody, a.p.zijlstra, paulus, mingo, mpe, linux-kernel
Em Thu, Dec 12, 2013 at 01:47:25PM +1100, Anton Blanchard escreveu:
>
> I hit a cryptic failure when testing a recent version
> of perf:
>
> # perf report
> write failure on standard output: Bad file descriptor
>
> The issue is in commit b68e2f91 (perf symbols: Introduce symsrc
> structure). symsrc__destroy() does a close(ss->fd) but
> ss->fd is only initialised in the symbol-elf.c case and
> not for symbol-minimal.c.
>
> The issue has been around for a while however most people
> will build with libelf which wont use the symbol-minimal.c
> code.
>
> Cc: stable@vger.kernel.org # v3.8+
> Signed-off-by: Anton Blanchard <anton@samba.org>
This was fixed recently, yeah, should go to stable as well:
commit 779e24e2c777bffa9a6e3d5e821859e67008c98b
Author: Adrian Hunter <adrian.hunter@intel.com>
Date: Wed Dec 4 16:23:01 2013 +0200
perf symbols: Fix random fd closing with no libelf
> ---
>
> diff --git a/tools/perf/util/symbol-minimal.c b/tools/perf/util/symbol-minimal.c
> index 2d2dd05..3528204 100644
> --- a/tools/perf/util/symbol-minimal.c
> +++ b/tools/perf/util/symbol-minimal.c
> @@ -254,6 +254,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso __maybe_unused,
> goto out_close;
>
> ss->type = type;
> + ss->fd = fd;
>
> return 0;
> out_close:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-12 14:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-12 2:47 [PATCH] perf symbols: symbol-minimal.c causes random fd to be closed Anton Blanchard
2013-12-12 14:21 ` Arnaldo Carvalho de Melo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.