]> www.infradead.org Git - users/jedix/linux-maple.git/commit
userfaultfd: require UFFDIO_API before other ioctls
authorAndrea Arcangeli <aarcange@redhat.com>
Fri, 4 Sep 2015 22:47:15 +0000 (15:47 -0700)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 18:53:11 +0000 (13:53 -0500)
commit4357fe9bc25fa1397f1cd56ba05bfb1f5f46ec5e
tree57ae963c67ee403f131739ae64874522a4806560
parentdc51750d375d629bdb3c38bcd598ddf2d8848fb1
userfaultfd: require UFFDIO_API before other ioctls

Orabug: 21685254

UFFDIO_API was already forced before read/poll could work.  This makes the
code more strict to force it also for all other ioctls.

All users would already have been required to call UFFDIO_API before
invoking other ioctls but this makes it more explicit.

This will ensure we can change all ioctls (all but UFFDIO_API/struct
uffdio_api) with a bump of uffdio_api.api.

There's no actual plan or need to change the API or the ioctl, the current
API already should cover fine even the non cooperative usage, but this is
just for the longer term future just in case.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit e6485a47b758cae04a496764a1095961ee3249e4)
Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
Reviewed-by: Dhaval Giani <dhaval.giani@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
fs/userfaultfd.c