Skip to content
Snippets Groups Projects
Commit 3c67f474 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds
Browse files

sched: numa: skip inaccessible VMAs


Inaccessible VMA should not be trapping NUMA hint faults. Skip them.

Signed-off-by: default avatarMel Gorman <mgorman@suse.de>
Reviewed-by: default avatarRik van Riel <riel@redhat.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent eb4489f6
No related branches found
No related tags found
No related merge requests found
...@@ -1738,6 +1738,13 @@ void task_numa_work(struct callback_head *work) ...@@ -1738,6 +1738,13 @@ void task_numa_work(struct callback_head *work)
(vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ))) (vma->vm_file && (vma->vm_flags & (VM_READ|VM_WRITE)) == (VM_READ)))
continue; continue;
/*
* Skip inaccessible VMAs to avoid any confusion between
* PROT_NONE and NUMA hinting ptes
*/
if (!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE)))
continue;
do { do {
start = max(start, vma->vm_start); start = max(start, vma->vm_start);
end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE); end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);
......
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