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 61B7F1CCECC; Sun, 24 Nov 2024 12:40:45 +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=1732452045; cv=none; b=k/Lfz3N98OCJSgc/fMy5Pc52iq2JvzNWhENJWVreAntNdw/vnn0VhqxWbZC2lf7JQwOPjl40Eo6q2pBTNmOq6XEgNU0J+iPW2OFCJRXVDNGRJhuSsNGjyfoUp684k0LbNPP46oCdhQybnKUigx+B6gs7jMT57xoyPIkLYhChE0g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732452045; c=relaxed/simple; bh=dStXZbOZ68pcA4OHVXBepn0T/jxDTGEotO0Yx2wAYpY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B4OfNN9Xrl7QxuXJjkdKRuICLP4dDtRWbF5Q/gf4wdBbnuIOklR9S2IGza4zrAgOr7ecgGvmhjCNqDJtV1ykSbEZ6CFMZTp2UaUDDOcmXYMCSnE/bFBnvI/R7P1B8PFfuKvvpRYZF9TC3tlA0b5EC2qF8rjqso7JmGsZhsklDXI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kkU2VbP9; 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="kkU2VbP9" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34617C4CED3; Sun, 24 Nov 2024 12:40:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732452045; bh=dStXZbOZ68pcA4OHVXBepn0T/jxDTGEotO0Yx2wAYpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kkU2VbP9lmGYNNru9C61s9UPiaMSNMj+xCUejfyXvqmuEp++y4UHzoh5MFTzTSMCR UUB/+//huvM38b1xEwcBdW/KrVVbRh92CXCWdIa1EJ0KVrWOPCBrLTPat29GgXK9sy haFl9NmIhPSURI8zhvwFaNqLNQgDcjvbNOwrwaIwtS83MkzKMjLyO1aIAvHEjRRBMt DfryOlQnk2ik9mZ5i4VWIbJn0dtl4Tew/5rdqb1OriwW3XRxbEefTO5XulphahtOSy 0PxX0POH9yjAf//it3IohnFHcI3v4u1p2jyzXU0a3rYhdPZI7gKZFGtZh53jgAY3ip Ibgd25JnRFBfg== 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.11 15/16] kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all() Date: Sun, 24 Nov 2024 07:39:52 -0500 Message-ID: <20241124124009.3336072-15-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124124009.3336072-1-sashal@kernel.org> References: <20241124124009.3336072-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.11.10 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