diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 1134dfb3dab0..87515949b09d 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1710,6 +1710,7 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf, else if (ret < 0) break; + flags &= ~PT_TYPE_NONE pt_type = pt_range_walk_start(&ptw, vma, vma->vm_start, vma->vm_end, flags); while (pt_type != PTW_DONE) {