summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-11-11 16:18:55 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-14 19:59:59 +0100
commite8483ae1310049a9d132e7397a2429326f08eebe (patch)
treeee93b4a2bba7a74673aa8359b4a17c14033ebb04 /tools
parent4c7baac247cefcb20265e8e8e2a9a5a3eedd4711 (diff)
downloadlinux-e8483ae1310049a9d132e7397a2429326f08eebe.tar.gz
linux-e8483ae1310049a9d132e7397a2429326f08eebe.tar.bz2
linux-e8483ae1310049a9d132e7397a2429326f08eebe.zip
kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all()
[ Upstream commit 27141b690547da5650a420f26ec369ba142a9ebb ] The PAC exec_sign_all() test spawns some child processes, creating pipes to be stdin and stdout for the child. It cleans up most of the file descriptors that are created as part of this but neglects to clean up the parent end of the child stdin and stdout. Add the missing close() calls. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20241111-arm64-pac-test-collisions-v1-1-171875f37e44@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/arm64/pauth/pac.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/pauth/pac.c b/tools/testing/selftests/arm64/pauth/pac.c
index b743daa772f5..5a07b3958fbf 100644
--- a/tools/testing/selftests/arm64/pauth/pac.c
+++ b/tools/testing/selftests/arm64/pauth/pac.c
@@ -182,6 +182,9 @@ int exec_sign_all(struct signatures *signed_vals, size_t val)
return -1;
}
+ close(new_stdin[1]);
+ close(new_stdout[0]);
+
return 0;
}