From 608fc3fa2c4902d84fd925b328b730d3b2dbff50 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 10 Oct 2025 15:14:07 +0900 Subject: [PATCH] pidfd-util: add missing trailing argument for ioctl(PIDFD_GET_*_NAMESPACE) Otherwise, it always fails with EINVAL. --- src/basic/pidfd-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/pidfd-util.c b/src/basic/pidfd-util.c index 9910819aa79..b6614ffd3a5 100644 --- a/src/basic/pidfd-util.c +++ b/src/basic/pidfd-util.c @@ -56,7 +56,7 @@ int pidfd_get_namespace(int fd, unsigned long ns_type_cmd) { if (have_pidfs == 0 || !cached_supported) return -EOPNOTSUPP; - int nsfd = ioctl(fd, ns_type_cmd); + int nsfd = ioctl(fd, ns_type_cmd, 0); if (nsfd < 0) { /* Kernel returns EOPNOTSUPP if the ns type in question is disabled. Hence we need to look * at precise errno instead of generic ERRNO_IS_(IOCTL_)NOT_SUPPORTED. */