lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250205055031.259710-1-richard120310@gmail.com>
Date: Wed,  5 Feb 2025 13:50:31 +0800
From: I Hsin Cheng <richard120310@...il.com>
To: shuah@...nel.org
Cc: brauner@...nel.org,
	linux-kernel@...r.kernel.org,
	linux-kselftest@...r.kernel.org,
	linux-kernel-mentees@...ts.linux.dev,
	I Hsin Cheng <richard120310@...il.com>
Subject: [PATCH] selftests: pidfd: Fix compiling warning of pidfs_setns

In the compilation of pidfs_setns_test.c , a warning as the following
will pop out.

pidfd_setns_test.c: In function ‘current_nsset_setup’:
pidfd_setns_test.c:173:54: warning: implicit declaration of function \
‘ioctl’ [-Wimplicit-function-declaration]
  173 |                 self->child_pidfd_derived_nsfds[i] = \
ioctl(self->pidfd, info->pidfd_ioctl, 0);

It's caused by wrong import of header file <linux/ioctl.h>, fix it to
<sys/ioctl.h>.

Signed-off-by: I Hsin Cheng <richard120310@...il.com>
---
 tools/testing/selftests/pidfd/pidfd_setns_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/pidfd/pidfd_setns_test.c b/tools/testing/selftests/pidfd/pidfd_setns_test.c
index 7c2a43491..3ed42f1eb 100644
--- a/tools/testing/selftests/pidfd/pidfd_setns_test.c
+++ b/tools/testing/selftests/pidfd/pidfd_setns_test.c
@@ -16,7 +16,7 @@
 #include <unistd.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
-#include <linux/ioctl.h>
+#include <sys/ioctl.h>
 
 #include "pidfd.h"
 #include "../clone3/clone3_selftests.h"
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ