From 89e44fb838b0beda1d027881e03763d4bb75f607 Mon Sep 17 00:00:00 2001 From: Gleb Fotengauer-Malinovskiy Date: Wed, 2 Jun 2021 13:52:52 +1000 Subject: [PATCH] FROMGIT: userfaultfd: fix UFFDIO_CONTINUE ioctl request definition This ioctl request reads from uffdio_continue structure which justifies _IOC_READ flag. See NOTEs in include/uapi/asm-generic/ioctl.h for more information. Link: https://lkml.kernel.org/r/20210601143432.1002481-1-glebfm@altlinux.org Link: https://lkml.kernel.org/r/20210531140146.481553-1-glebfm@altlinux.org Fixes: f619147104c8 ("userfaultfd: add UFFDIO_CONTINUE ioctl") Signed-off-by: Gleb Fotengauer-Malinovskiy Acked-by: Peter Xu Reviewed-by: Axel Rasmussen Cc: Daniel Colascione Cc: Lokesh Gidra Signed-off-by: Andrew Morton Signed-off-by: Stephen Rothwell (cherry picked from commit 3fe04bff515162ae8192d7eae77b9a92ed1aa945 https: //git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm) Link: https://lore.kernel.org/patchwork/patch/1439728/ Signed-off-by: Lokesh Gidra Bug: 187930641 Change-Id: I85d83958a99e5c68e1118b6c189c78108e47be6c --- include/uapi/linux/userfaultfd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/userfaultfd.h b/include/uapi/linux/userfaultfd.h index 159a74e9564f..05b31d60acf6 100644 --- a/include/uapi/linux/userfaultfd.h +++ b/include/uapi/linux/userfaultfd.h @@ -81,8 +81,8 @@ struct uffdio_zeropage) #define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, \ struct uffdio_writeprotect) -#define UFFDIO_CONTINUE _IOR(UFFDIO, _UFFDIO_CONTINUE, \ - struct uffdio_continue) +#define UFFDIO_CONTINUE _IOWR(UFFDIO, _UFFDIO_CONTINUE, \ + struct uffdio_continue) /* read() structure */ struct uffd_msg {