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 commit 21a3c273f88c9cbbaf7e ("mm, hugetlb: add thread name and pid to SHM_HUGETLB mlock rlimit warning") marked this as deprecated in 2012, but it is not deleted yet. Mike says he still see that message in log files on occasion, so maybe we should preserve this warning. Link: https://lkml.kernel.org/r/20211009094355.127705-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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/fs/hugetlbfs/inode.c~mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb +++ a/fs/hugetlbfs/inode.c @@ -1467,13 +1467,12 @@ struct file *hugetlb_file_setup(const ch *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", + pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is obsolete\n", current->comm, current->pid); task_unlock(current); - } else { - *ucounts = NULL; - return ERR_PTR(-EPERM); } + *ucounts = NULL; + return ERR_PTR(-EPERM); } file = ERR_PTR(-ENOSPC); _ Patches currently in -mm which might be from zhangyiru3@xxxxxxxxxx are mmhugetlb-remove-mlock-ulimit-for-shm_hugetlb.patch