[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240324230116.1348576-400-sashal@kernel.org>
Date: Sun, 24 Mar 2024 18:57:16 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Cc: Ian Rogers <irogers@...gle.com>,
Ravi Bangoria <ravi.bangoria@....com>,
James Clark <james.clark@....com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Nathan Chancellor <nathan@...nel.org>,
Kan Liang <kan.liang@...ux.intel.com>,
John Garry <john.g.garry@...cle.com>,
Tom Rix <trix@...hat.com>,
llvm@...ts.linux.dev,
Namhyung Kim <namhyung@...nel.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 6.6 399/638] perf srcline: Add missed addr2line closes
From: Ian Rogers <irogers@...gle.com>
[ Upstream commit c7ba9d18ae47924a6ea6a47ca139779f58eb83c0 ]
The child_process for addr2line sets in and out to -1 so that pipes
get created. It is the caller's responsibility to close the pipes,
finish_command doesn't do it. Add the missed closes.
Fixes: b3801e791231 ("perf srcline: Simplify addr2line subprocess")
Signed-off-by: Ian Rogers <irogers@...gle.com>
Cc: Ravi Bangoria <ravi.bangoria@....com>
Cc: James Clark <james.clark@....com>
Cc: Nick Desaulniers <ndesaulniers@...gle.com>
Cc: Nathan Chancellor <nathan@...nel.org>
Cc: Kan Liang <kan.liang@...ux.intel.com>
Cc: John Garry <john.g.garry@...cle.com>
Cc: Tom Rix <trix@...hat.com>
Cc: llvm@...ts.linux.dev
Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Link: https://lore.kernel.org/r/20240201001504.1348511-8-irogers@google.com
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
tools/perf/util/srcline.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 034b496df2978..7addc34afcf5d 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -399,6 +399,8 @@ static void addr2line_subprocess_cleanup(struct child_process *a2l)
kill(a2l->pid, SIGKILL);
finish_command(a2l); /* ignore result, we don't care */
a2l->pid = -1;
+ close(a2l->in);
+ close(a2l->out);
}
free(a2l);
--
2.43.0
Powered by blists - more mailing lists