[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Thu, 12 Dec 2013 13:47:25 +1100
From: Anton Blanchard <anton@...ba.org>
To: cody@...ux.vnet.ibm.com, a.p.zijlstra@...llo.nl, paulus@...ba.org,
mingo@...hat.com, acme@...stprotocols.net, mpe@...erman.id.au
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] perf symbols: symbol-minimal.c causes random fd to be
closed
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@...r.kernel.org # v3.8+
Signed-off-by: Anton Blanchard <anton@...ba.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:
--
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