Skip to content

Commit 42b0f8d

Browse files
committed
nsfs: fix ioctl declaration
The kernel is writing an object of type __u64, so the ioctl has to be defined to _IOR(NSIO, 0x5, __u64) instead of _IO(NSIO, 0x5). Reported-by: Dmitry V. Levin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent f71aa06 commit 42b0f8d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/uapi/linux/nsfs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#define __LINUX_NSFS_H
44

55
#include <linux/ioctl.h>
6+
#include <linux/types.h>
67

78
#define NSIO 0xb7
89

@@ -16,7 +17,7 @@
1617
/* Get owner UID (in the caller's user namespace) for a user namespace */
1718
#define NS_GET_OWNER_UID _IO(NSIO, 0x4)
1819
/* Get the id for a mount namespace */
19-
#define NS_GET_MNTNS_ID _IO(NSIO, 0x5)
20+
#define NS_GET_MNTNS_ID _IOR(NSIO, 0x5, __u64)
2021
/* Translate pid from target pid namespace into the caller's pid namespace. */
2122
#define NS_GET_PID_FROM_PIDNS _IOR(NSIO, 0x6, int)
2223
/* Return thread-group leader id of pid in the callers pid namespace. */

0 commit comments

Comments
 (0)