+ userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control-v7.patch added to mm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control-v7
has been added to the -mm mm-unstable branch.  Its filename is
     userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control-v7.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control-v7.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Axel Rasmussen <axelrasmussen@xxxxxxxxxx>
Subject: userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control-v7
Date: Fri, 19 Aug 2022 13:51:58 -0700

Handle misc_register() failure properly by propagating the error instead
of just WARN_ON-ing.  

Link: https://lkml.kernel.org/r/20220819205201.658693-3-axelrasmussen@xxxxxxxxxx
Acked-by: Mike Rapoport <rppt@xxxxxxxxxxxxx>
Acked-by: Nadav Amit <namit@xxxxxxxxxx>
Acked-by: Peter Xu <peterx@xxxxxxxxxx>
Signed-off-by: Axel Rasmussen <axelrasmussen@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Cc: Dmitry V. Levin <ldv@xxxxxxxxxxxx>
Cc: Gleb Fotengauer-Malinovskiy <glebfm@xxxxxxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Jonathan Corbet <corbet@xxxxxxx>
Cc: Mel Gorman <mgorman@xxxxxxxxxxxxxxxxxxx>
Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>
Cc: Shuah Khan <shuah@xxxxxxxxxx>
Cc: Shuah Khan <skhan@xxxxxxxxxxxxxxxxxxx>
Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Zhang Yi <yi.zhang@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/userfaultfd.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

--- a/fs/userfaultfd.c~userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control-v7
+++ a/fs/userfaultfd.c
@@ -2114,11 +2114,6 @@ SYSCALL_DEFINE1(userfaultfd, int, flags)
 	return new_userfaultfd(flags);
 }
 
-static int userfaultfd_dev_open(struct inode *inode, struct file *file)
-{
-	return 0;
-}
-
 static long userfaultfd_dev_ioctl(struct file *file, unsigned int cmd, unsigned long flags)
 {
 	if (cmd != USERFAULTFD_IOC_NEW)
@@ -2128,7 +2123,6 @@ static long userfaultfd_dev_ioctl(struct
 }
 
 static const struct file_operations userfaultfd_dev_fops = {
-	.open = userfaultfd_dev_open,
 	.unlocked_ioctl = userfaultfd_dev_ioctl,
 	.compat_ioctl = userfaultfd_dev_ioctl,
 	.owner = THIS_MODULE,
@@ -2143,7 +2137,11 @@ static struct miscdevice userfaultfd_mis
 
 static int __init userfaultfd_init(void)
 {
-	WARN_ON(misc_register(&userfaultfd_misc));
+	int ret;
+
+	ret = misc_register(&userfaultfd_misc);
+	if (ret)
+		return ret;
 
 	userfaultfd_ctx_cachep = kmem_cache_create("userfaultfd_ctx_cache",
 						sizeof(struct userfaultfd_ctx),
_

Patches currently in -mm which might be from axelrasmussen@xxxxxxxxxx are

selftests-vm-add-hugetlb_shared-userfaultfd-test-to-run_vmtestssh.patch
userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control.patch
userfaultfd-add-dev-userfaultfd-for-fine-grained-access-control-v7.patch
userfaultfd-selftests-modify-selftest-to-use-dev-userfaultfd.patch
userfaultfd-selftests-modify-selftest-to-use-dev-userfaultfd-v7.patch
userfaultfd-update-documentation-to-describe-dev-userfaultfd.patch
userfaultfd-update-documentation-to-describe-dev-userfaultfd-v7.patch
selftests-vm-add-dev-userfaultfd-test-cases-to-run_vmtestssh.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux