Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Aswin Sreekumar
Mon, 30 Nov 2026 13:03
[PATCH net-next] netfilter: xt_cgroup: use %pe to print error pointer
Author: Aswin Sreekumar
Date: Mon, 30 Nov 2026 13:03
Date: Mon, 30 Nov 2026 13:03
40 lines
12000 bytes
12000 bytes
cgroup_mt_check_v1() and cgroup_mt_check_v2() log the failure from
cgroup_get_from_path() with %ld and PTR_ERR(). Switch to the %pe format
specifier and pass the error pointer directly. This prints the symbolic
error name (e.g. errno=-EINVAL instead of errno=-22) and drops the
explicit PTR_ERR() conversion.
Only the error message format changes; behaviour is otherwise unchanged.
Signed-off-by: Aswin Sreekumar <ash1994achu@gmail.com>
---
net/netfilter/xt_cgroup.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net/netfilter/xt_cgroup.c b/net/netfilter/xt_cgroup.c
index 28e6cd51b..619b1eb4d 100644
--- a/net/netfilter/xt_cgroup.c
+++ b/net/netfilter/xt_cgroup.c
@@ -70,8 +70,7 @@ static int cgroup_mt_check_v1(const struct xt_mtchk_param *par)
cgrp = cgroup_get_from_path(info->path);
if (IS_ERR(cgrp)) {
- pr_info_ratelimited("invalid path, errno=%ld\n",
- PTR_ERR(cgrp));
+ pr_info_ratelimited("invalid path, errno=%pe\n", cgrp);
return -EINVAL;
}
info->priv = cgrp;
@@ -110,8 +109,7 @@ static int cgroup_mt_check_v2(const struct xt_mtchk_param *par)
cgrp = cgroup_get_from_path(info->path);
if (IS_ERR(cgrp)) {
- pr_info_ratelimited("invalid path, errno=%ld\n",
- PTR_ERR(cgrp));
+ pr_info_ratelimited("invalid path, errno=%pe\n", cgrp);
return -EINVAL;
}
info->priv = cgrp;
--
2.56.1
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads