Skip to content

Commit 808e9df

Browse files
glebfmtorvalds
authored andcommitted
userfaultfd: uapi: fix UFFDIO_CONTINUE ioctl request definition
This ioctl request reads from uffdio_continue structure written by userspace which justifies _IOC_WRITE flag. It also writes back to that structure which justifies _IOC_READ flag. See NOTEs in include/uapi/asm-generic/ioctl.h for more information. Fixes: f619147 ("userfaultfd: add UFFDIO_CONTINUE ioctl") Signed-off-by: Gleb Fotengauer-Malinovskiy <[email protected]> Acked-by: Peter Xu <[email protected]> Reviewed-by: Axel Rasmussen <[email protected]> Reviewed-by: Dmitry V. Levin <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 55fcd44 commit 808e9df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/uapi/linux/userfaultfd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
struct uffdio_zeropage)
8181
#define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \
8282
struct uffdio_writeprotect)
83-
#define UFFDIO_CONTINUE _IOR(UFFDIO, _UFFDIO_CONTINUE, \
84-
struct uffdio_continue)
83+
#define UFFDIO_CONTINUE _IOWR(UFFDIO, _UFFDIO_CONTINUE, \
84+
struct uffdio_continue)
8585

8686
/* read() structure */
8787
struct uffd_msg {

0 commit comments

Comments
 (0)