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

Commit 147bb826 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mm: skip speculative path for non-anonymous COW faults"

parents f958326a eed0466f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -4594,7 +4594,11 @@ int __handle_speculative_fault(struct mm_struct *mm, unsigned long address,
	 * because vm_next and vm_prev must be safe. This can't be guaranteed
	 * in the speculative path.
	 */
	if (unlikely(vma_is_anonymous(vmf.vma) && !vmf.vma->anon_vma)) {
	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) &&
			!vmf.vma->anon_vma))) {
		trace_spf_vma_notsup(_RET_IP_, vmf.vma, address);
		return VM_FAULT_RETRY;
	}