Skip to content
Snippets Groups Projects
Commit 3de0c269 authored by Zach O'Keefe's avatar Zach O'Keefe Committed by Andrew Morton
Browse files

mm/shmem: restore SHMEM_HUGE_DENY precedence over MADV_COLLAPSE

SHMEM_HUGE_DENY is for emergency use by the admin, to disable allocation
of shmem huge pages if, for example, a dangerous bug is found in their
usage: see "deny" in Documentation/mm/transhuge.rst.  An app using
madvise(,,MADV_COLLAPSE) should not be allowed to override it: restore its
precedence over shmem_huge_force.

Restore SHMEM_HUGE_DENY precedence over MADV_COLLAPSE.

Link: https://lkml.kernel.org/r/20221224082035.3197140-2-zokeefe@google.com


Fixes: 7c6c6cc4 ("mm/shmem: add flag to enforce shmem THP in hugepage_vma_check()")
Signed-off-by: default avatarZach O'Keefe <zokeefe@google.com>
Suggested-by: default avatarHugh Dickins <hughd@google.com>
Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
Cc: Yang Shi <shy828301@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 52dc0310
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment