author: Mike Rapoport <rppt@linux.ibm.com> 2021-07-07 18:08:03 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-07-08 11:48:21 -0700
commit: 1507f51255c9ff07d75909a84e7c0d7f3c4b2f49
parent: 6d47c23b16aa78ff93a3050ccf4b1bd1c064b8b3
Commit Summary:
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/mm/mlock.c b/mm/mlock.c
index 0d639bf48794..16d2ee160d43 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -23,6 +23,7 @@
#include <linux/hugetlb.h>
#include <linux/memcontrol.h>
#include <linux/mm_inline.h>
+#include <linux/secretmem.h>
#include "internal.h"
@@ -503,7 +504,7 @@ static int mlock_fixup(struct vm_area_struct *vma, struct vm_area_struct **prev,
if (newflags == vma->vm_flags || (vma->vm_flags & VM_SPECIAL) ||
is_vm_hugetlb_page(vma) || vma == get_gate_vma(current->mm) ||
- vma_is_dax(vma))
+ vma_is_dax(vma) || vma_is_secretmem(vma))
/* don't set VM_LOCKED or VM_LOCKONFAULT and don't count */
goto out;