+ mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.patch added to -mm tree

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

 



The patch titled
     Subject: mm,hugetlb: remove mlock ulimit for SHM_HUGETLB
has been added to the -mm tree.  Its filename is
     mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.patch

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 and is updated
there every 3-4 working days

------------------------------------------------------
From: zhangyiru <zhangyiru3@xxxxxxxxxx>
Subject: mm,hugetlb: remove mlock ulimit for SHM_HUGETLB

Remove mlock ulimit for SHM_HUGETLB.  2584e517320b ("mm: reintroduce and
deprecate rlimit based access for SHM_HUGETLB") marked this as deprecated
in 2012, but it is not deleted yet

Link: https://lkml.kernel.org/r/20210904075458.51012-1-zhangyiru3@xxxxxxxxxx
Signed-off-by: zhangyiru <zhangyiru3@xxxxxxxxxx>
Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxxxx>
Cc: <wuxu.wu@xxxxxxxxxx>
Cc: <liusirui@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/hugetlbfs/inode.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

--- a/fs/hugetlbfs/inode.c~mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb
+++ a/fs/hugetlbfs/inode.c
@@ -1463,18 +1463,8 @@ struct file *hugetlb_file_setup(const ch
 	if (!mnt)
 		return ERR_PTR(-ENOENT);
 
-	if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm()) {
-		*ucounts = current_ucounts();
-		if (user_shm_lock(size, *ucounts)) {
-			task_lock(current);
-			pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n",
-				current->comm, current->pid);
-			task_unlock(current);
-		} else {
-			*ucounts = NULL;
-			return ERR_PTR(-EPERM);
-		}
-	}
+	if (creat_flags == HUGETLB_SHMFS_INODE && !can_do_hugetlb_shm())
+		return ERR_PTR(-EPERM);
 
 	file = ERR_PTR(-ENOSPC);
 	inode = hugetlbfs_get_inode(mnt->mnt_sb, NULL, S_IFREG | S_IRWXUGO, 0);
_

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

mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.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