[PATCH v2 0/2] ss: Tone down cgroup path resolution

STALE570d

3 messages, 1 author, 2025-02-21 · open the first message on its own page

[PATCH v2 0/2] ss: Tone down cgroup path resolution

From: Michal Koutný <mkoutny@suse.com>
Date: 2025-02-21 09:29:32

Changes from v1 (https://lore.kernel.org/r/20250210141103.44270-1-mkoutny@suse.com)
- notice about 'unreachable' in commit message
- add README.devel clarification

Michal Koutný (2):
  ss: Tone down cgroup path resolution
  README.devel: clarify patch rules

 README.devel | 2 ++
 lib/fs.c     | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

-- 
2.48.1

[PATCH v2 1/2] ss: Tone down cgroup path resolution

From: Michal Koutný <mkoutny@suse.com>
Date: 2025-02-21 09:29:33

Sockets and cgroups have different lifetimes (e.g. fd passing between
cgroups) so obtaining a cgroup id to a removed cgroup dir is not an
error. Furthermore, the message is printed for each such a socket (which
is redundant each such socket's cgroup is shown as 'unreachable').
Improve user experience by silencing these specific errors.

Signed-off-by: Michal Koutný <mkoutny@suse.com>
---
 lib/fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/fs.c b/lib/fs.c
index 622f28b3..6fe1d6db 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -223,7 +223,8 @@ char *get_cgroup2_path(__u64 id, bool full)
 
 	fd = open_by_handle_at(mnt_fd, fhp, 0);
 	if (fd < 0) {
-		fprintf(stderr, "Failed to open cgroup2 by ID\n");
+		if (errno != ESTALE)
+			fprintf(stderr, "Failed to open cgroup2 by ID\n");
 		goto out;
 	}
 
-- 
2.48.1

[PATCH v2 2/2] README.devel: clarify patch rules

From: Michal Koutný <mkoutny@suse.com>
Date: 2025-02-21 09:29:34

Signed-off-by: Michal Koutný <mkoutny@suse.com>
---
 README.devel | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/README.devel b/README.devel
index 60c95468..1c80a336 100644
--- a/README.devel
+++ b/README.devel
@@ -16,3 +16,5 @@ aligned on the mainline Linux kernel (ie follows Linus).
 The iproute2-next repository tracks the code intended for the next
 release; it corresponds with networking development tree (net-next)
 in the kernel.
+Patch submitting rules are akin to kernel
+    https://www.kernel.org/doc/html/latest/process/submitting-patches.html
-- 
2.48.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help