Skip to content

Commit 8bb7c4b

Browse files
brooniemehmetb0
authored andcommitted
kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all()
BugLink: https://bugs.launchpad.net/bugs/2095283 [ 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Koichiro Den <[email protected]>
1 parent fc83c00 commit 8bb7c4b

File tree

1 file changed

+3
-0
lines changed
  • tools/testing/selftests/arm64/pauth

1 file changed

+3
-0
lines changed

tools/testing/selftests/arm64/pauth/pac.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ int exec_sign_all(struct signatures *signed_vals, size_t val)
182182
return -1;
183183
}
184184

185+
close(new_stdin[1]);
186+
close(new_stdout[0]);
187+
185188
return 0;
186189
}
187190

0 commit comments

Comments
 (0)