Skip to content

Commit 3c67f47

Browse files
Mel Gormantorvalds
authored andcommitted
sched: numa: skip inaccessible VMAs
Inaccessible VMA should not be trapping NUMA hint faults. Skip them. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Alex Thorlton <athorlton@sgi.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent eb4489f commit 3c67f47

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

kernel/sched/fair.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1738,6 +1738,13 @@ void task_numa_work(struct callback_head *work)
17381738
(vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ)))
17391739
continue;
17401740

1741+
/*
1742+
* Skip inaccessible VMAs to avoid any confusion between
1743+
* PROT_NONE and NUMA hinting ptes
1744+
*/
1745+
if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
1746+
continue;
1747+
17411748
do {
17421749
start = max(start, vma->vm_start);
17431750
end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);

0 commit comments

Comments
 (0)