Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: f619147104c8 ("userfaultfd: add UFFDIO_CONTINUE ioctl")
Signed-off-by: Gleb Fotengauer-Malinovskiy <glebfm@altlinux.org>
Acked-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Axel Rasmussen <axelrasmussen@google.com>
Reviewed-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Gleb Fotengauer-Malinovskiy and committed by
Linus Torvalds
808e9df4 55fcd449

+2 -2
+2 -2
include/uapi/linux/userfaultfd.h
··· 80 80 struct uffdio_zeropage) 81 81 #define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \ 82 82 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) 85 85 86 86 /* read() structure */ 87 87 struct uffd_msg {