From: "Michal Koutný" <mkoutny@suse.com>
To: netdev@vger.kernel.org
Cc: mkoutny@suse.com, mkubecek@suse.cz
Subject: [PATCH] ss: Tone down cgroup path resolution
Date: Mon, 10 Feb 2025 15:11:03 +0100 [thread overview]
Message-ID: <20250210141103.44270-1-mkoutny@suse.com> (raw)
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.
Improve user experience by silencing these specific errors.
---
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
next reply other threads:[~2025-02-10 14:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 14:11 Michal Koutný [this message]
2025-02-18 13:11 ` [PATCH] ss: Tone down cgroup path resolution Davide Benini
2025-02-18 13:40 ` Michal Koutný
2025-02-20 22:20 ` Stephen Hemminger
2025-02-21 9:32 ` Michal Koutný
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250210141103.44270-1-mkoutny@suse.com \
--to=mkoutny@suse.com \
--cc=mkubecek@suse.cz \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.