From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F8091D5178; Sun, 24 Nov 2024 12:41:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732452078; cv=none; b=nb1QOlpT6w6o9D5qsZ10gKyWn7/9qy6QhKGIkWtAO6pPeTlLYtngZ5fExuprnvl8OgZ74uvBhQPfdpiIPgQvszELDEy80vZ4Un+flFZbeUK9CaXsrksyG6Vgc/UZ1b9nwyIzgpC/klduMXvZdqmx+0VyYZSDb2O0DYlP42ZYYuQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732452078; c=relaxed/simple; bh=dStXZbOZ68pcA4OHVXBepn0T/jxDTGEotO0Yx2wAYpY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GptA20NgAfg65SsZahrhVHFt8iZcPGeimfu+fDGgMDz0P4wfY6ZEchSiMH7MPQ8EJ+py0dy+7VdIMASrQob51iU0WMiD6GOY2sONRlVNIswS8xQMykotHPCJf14b7W7SOOqx/C/Fx89BsIMoxhutz6H9glZfEaQMAGX2bEGlkks= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eIn6WMv+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eIn6WMv+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EA85C4CED1; Sun, 24 Nov 2024 12:41:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732452078; bh=dStXZbOZ68pcA4OHVXBepn0T/jxDTGEotO0Yx2wAYpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eIn6WMv+isdqbZEnyg25G0vMEm8W8iGI0Oazc0hXWHfNW0aknKK+KprtAm+2COWMn U5ZYvadofV+egQIASNs8GDtloSa1BeG9GH1PenwBYwcYy+P71FKNET0UOENfzCASf/ jYxMNZ+cIxFdBhggqTudqdLAhAN9n5DZo7cRdNt+HT/xnbWR8Tg8hFnSVpLLji9ZIp uoA8BTbUE7YhON36wHG3jLynRRIg1y444BGawDKO4K7uDs/vSoFapeC2oLP9rm3n60 Cb3lTn8XI7sxwDHo0zO2TyKMsQdn+OnBXMYUu+5DZaSzq+HF7qs716fLjpbAmSTRj1 EVc3Fq0YoJj2w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mark Brown , Catalin Marinas , Sasha Levin , will@kernel.org, shuah@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 6.6 9/9] kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all() Date: Sun, 24 Nov 2024 07:40:47 -0500 Message-ID: <20241124124057.3336453-9-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124124057.3336453-1-sashal@kernel.org> References: <20241124124057.3336453-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.6.63 Content-Transfer-Encoding: 8bit From: Mark Brown [ 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 Link: https://lore.kernel.org/r/20241111-arm64-pac-test-collisions-v1-1-171875f37e44@kernel.org Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- tools/testing/selftests/arm64/pauth/pac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/arm64/pauth/pac.c b/tools/testing/selftests/arm64/pauth/pac.c index b743daa772f55..5a07b3958fbf2 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; } -- 2.43.0