From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: Anton Blanchard <anton@samba.org>
Cc: cody@linux.vnet.ibm.com, a.p.zijlstra@chello.nl,
paulus@samba.org, mingo@redhat.com, mpe@ellerman.id.au,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf symbols: symbol-minimal.c causes random fd to be closed
Date: Thu, 12 Dec 2013 11:21:21 -0300 [thread overview]
Message-ID: <20131212142121.GA8164@ghostprotocols.net> (raw)
In-Reply-To: <20131212134725.4dacdd06@kryten>
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:
prev parent reply other threads:[~2013-12-12 14:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
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=20131212142121.GA8164@ghostprotocols.net \
--to=acme@ghostprotocols.net \
--cc=a.p.zijlstra@chello.nl \
--cc=anton@samba.org \
--cc=cody@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mpe@ellerman.id.au \
--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