ANDROID: mm: fix build issue in spf when CONFIG_USERFAULTFD=n
When CONFIG_USERFAULTFD=n __VM_UFFD_FLAGS mask is undefined and produces build error. Fix it by making the check conditional on CONFIG_USERFAULTFD. Fixes: ("ANDROID: mm: prevent speculative page fault handling for userfaults") Bug: 257443051 Change-Id: Ie9ff98b840032eb18183b49e3566cf178359948f Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
@@ -5021,11 +5021,13 @@ static vm_fault_t ___handle_speculative_fault(struct mm_struct *mm,
|
||||
vmf.vma_flags = READ_ONCE(vmf.vma->vm_flags);
|
||||
vmf.vma_page_prot = READ_ONCE(vmf.vma->vm_page_prot);
|
||||
|
||||
#ifdef CONFIG_USERFAULTFD
|
||||
/* Can't call userland page fault handler in the speculative path */
|
||||
if (unlikely(vmf.vma_flags & __VM_UFFD_FLAGS)) {
|
||||
trace_spf_vma_notsup(_RET_IP_, vmf.vma, address);
|
||||
return VM_FAULT_RETRY;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (vmf.vma_flags & VM_GROWSDOWN || vmf.vma_flags & VM_GROWSUP) {
|
||||
/*
|
||||
|
Reference in New Issue
Block a user