[to-be-updated] mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.patch removed from -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 removed from the -mm tree.  Its filename was
     mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
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





[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