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 9B7F21B0F2F; Sun, 24 Nov 2024 12:39:51 +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=1732451991; cv=none; b=anZrPbptnpo4C5IH9FyOsRFLJ6Qad8/w8aGYJG3yQe0AW/7+CMrh6Mixxt3/q48Il0lbLH/xmBx2y9nFi0sqXes+GPygjshbWrkIrgVw6rNlUUnsEpLFDfNqbd+AHhaU8sTVtP5itJC1onl0o/t6WHWbPT5juLwPh8j3bL1XCAo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732451991; c=relaxed/simple; bh=dStXZbOZ68pcA4OHVXBepn0T/jxDTGEotO0Yx2wAYpY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NvauP6pIfTttS1PcOrV1ioU2/aasohfI4fjtspByd5WMYQhqitQsqxMP17e+/VP2uG6W8vauiVyyHiFGA4ROs4Ukcxk66eHfZu8kjpns5ZN2tqFLAqDTWgPhnz4/fWq+wixi7GVMNwL0q3In0Y/6DwhCst82CHmOTN0AzjYISF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qx6yk44f; 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="Qx6yk44f" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 813E3C4CED1; Sun, 24 Nov 2024 12:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1732451991; bh=dStXZbOZ68pcA4OHVXBepn0T/jxDTGEotO0Yx2wAYpY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qx6yk44fVSMcWnREQgvqdxeFMZ0yNkWt2IrW5znnHDAOqbSbpjp17FH7XX70vBcgj A3Vc7VV8LJRUfETiAOks0npccU+5JiuRoG4HGSkhl/KYuWurHhnYvx5o/Anw4ITTgM JNhMZLCTKACf3Pr+3COlXL0MZhyr/wzq8vH4fqZnD67KUhv9TTwYF5NJZA+4+d9mX1 IdiqjpkhzJhg67RD5sV1+YdcCcqU88Vb1GGfr/NYvhXuLy3btFTS5WA+ATLVsSaITF OhTJDT+4JgH9tRLxzQI0F1iCaNJAwFzj/I5THHYcGeHljsXxNfNu7aL9KUldq7BZej Wp7pI7BeBPRfw== 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.12 18/19] kselftest/arm64: Don't leak pipe fds in pac.exec_sign_all() Date: Sun, 24 Nov 2024 07:38:53 -0500 Message-ID: <20241124123912.3335344-18-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241124123912.3335344-1-sashal@kernel.org> References: <20241124123912.3335344-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kselftest@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.12.1 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