Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795050050; b=r3jjzdRgWFW5sp9LavbHQ0Q7HkvfqxucXd2dPGDw3Onohbzh4r+Bf0CE4WTQI7ULM7M5 FaKw6XvWAN+6NfLEbBUnaA/KD7ubKdprPniQwCZDpLOfy/vlBHg4dtm8d4kVEeX6Rp/Va X+iHv3ngYPscnkVN3rlHMlQ8/P9B2eKQhhXko5nQfujb8D9hN0XmdRDjNocUpX34BSGuN HxGfbWgEufc85z335u7q6kP40ju8FTeDzG8Z4IwtalUBXeN+zhhtIgFwRyXd212ZGbw5q FEnKUlF+sAb08uuoBfKWra+XwZ/Ce7jKe2fveiTxwkfwqTjRVDwYfI+qoB5Stqo3mCQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795050050; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=HA4X6OnH8g0+WEEIYPdziVgqf8gRae5HzQ9tqCXoEEM=; b=rrDpLGN2U4MOdYgz7tGXSzwekGzZbzGKn48e6l+QaWQrTuyl6FL1mh/Fa4SS7v6JJ0Ol KVJ12KbiEVf2w6tfpr10FyX4HPGs+R398GKZKyiMojW36V08yIsOgC28sEVpdlrZl/R1O OFbUqK9uvP91AYaZxacF/4s7NUaZFj4fk6TfuLR2WN6EvS9UGXYdQBfBlLe89OSxOr/71 5BfGZx49YShp80t/hjpnOR6H+mqCEfLgdH+ZQ9LP3yuZUybD0XComcrlxicBPVCwCXMWw ozFZpAwfv11Og2rsSpKnRwBukztvRz3KUswI/Rhg7+JaluduR/jUjA9wh+unsjWbzWQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rO9Ncwsn; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5129F606A325; Thu, 19 Nov 2026 01:00:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=rO9Ncwsn Received: by smtp.kernel.org (Postfix) with ESMTPSA id A46891F000C4; Thu, 19 Nov 2026 01:00:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795050050; bh=HA4X6OnH8g0+WEEIYPdziVgqf8gRae5HzQ9tqCXoEEM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rO9NcwsngCDjtaTmR/MjPQrJ1kPqmno22klCwbKDgRgvnc41WooZzuGswmmo3ximN tLM1pq/Biv01Rt8uCOgbSg2r2jzNZASJVrZLUNt7vX3KRoZ7HQze5IOqqh9pQ5HldC T9sEVGfl995V6mg35ExnPa86swPzCe598OecGuzg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Qiliang Yuan , Alexei Starovoitov , Yosry Ahmed , Sasha Levin Subject: [PATCH 6.1 2569/2857] selftests/bpf: Unmount the bpffs that cgroup_hierarchical_stats mounted Date: Wed, 18 Nov 2026 16:00:03 +0100 Message-ID: <20261118150333.986234728@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150201.293410965@linuxfoundation.org> References: <20261118150201.293410965@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Qiliang Yuan [ Upstream commit e0645cfd0e1b2ae7b8ad989bef00a30016b16b5f ] setup_bpffs() mounts a bpffs on /sys/fs/bpf and records in mounted_bpffs whether it did, so that cleanup_bpffs() unmounts only a bpffs that the test mounted itself. cleanup_bpffs() checks the flag the other way around. As mounting on /sys/fs/bpf succeeds even when a bpffs is already there, the test never unmounts the bpffs it mounted, and every run leaves another one stacked on /sys/fs/bpf of the mount namespace that the test_progs worker keeps running later tests in. Unmount the bpffs only when setup_bpffs() mounted it. Fixes: 88886309d2e8 ("selftests/bpf: add a selftest for cgroup hierarchical stats collection") Signed-off-by: Qiliang Yuan Signed-off-by: Alexei Starovoitov Reviewed-by: Yosry Ahmed Link: https://patch.msgid.link/20261009-selftests-bpf-cgroup-stats-bpffs-v2-2-f93a111da992@gmail.com Signed-off-by: Sasha Levin --- .../selftests/bpf/prog_tests/cgroup_hierarchical_stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/cgroup_hierarchical_stats.c b/tools/testing/selftests/bpf/prog_tests/cgroup_hierarchical_stats.c index ad19d6d41918a..cc6ab2c263da1 100644 --- a/tools/testing/selftests/bpf/prog_tests/cgroup_hierarchical_stats.c +++ b/tools/testing/selftests/bpf/prog_tests/cgroup_hierarchical_stats.c @@ -110,7 +110,7 @@ static void cleanup_bpffs(void) ASSERT_OK(rmdir(BPFFS_ATTACH_COUNTERS), "rmdir "BPFFS_ATTACH_COUNTERS); /* Unmount bpffs, if it wasn't already mounted when we started */ - if (mounted_bpffs) + if (!mounted_bpffs) return; ASSERT_OK(umount(BPFFS_ROOT), "unmount bpffs"); -- 2.53.0