Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b7ca44c authored by Vinayak Menon's avatar Vinayak Menon
Browse files

mm: fix non-anon COW fault



Speculative page fault should skip non-anon COW
faults. But the check uses flags from vmf which is
not initialized at that point. Fix that.

Fixes: eed0466ffa ("mm: skip speculative path for non-anonymous COW faults")
Change-Id: I86c3032680461b1369650d97a06616fd14472632
Signed-off-by: default avatarVinayak Menon <vinmenon@codeaurora.org>
parent 2c8ec678
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4263,7 +4263,7 @@ int __handle_speculative_fault(struct mm_struct *mm, unsigned long address,
	if (unlikely((vma_is_anonymous(vmf.vma) && !vmf.vma->anon_vma) ||
		(!vma_is_anonymous(vmf.vma) &&
			!(vmf.vma->vm_flags & VM_SHARED) &&
			(vmf.flags & FAULT_FLAG_WRITE) &&
			(flags & FAULT_FLAG_WRITE) &&
			!vmf.vma->anon_vma)))
		return VM_FAULT_RETRY;