diff --git a/mm/vmalloc.c b/mm/vmalloc.c index b7a65c5db044..e34c48259859 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -2259,6 +2259,14 @@ struct vm_struct *alloc_vm_area(size_t size, pte_t **ptes) return NULL; } + /* + * If the allocated address space is passed to a hypercall + * before being used then we cannot rely on a page fault to + * trigger an update of the page tables. So sync all the page + * tables here. + */ + vmalloc_sync_all(); + return area; } EXPORT_SYMBOL_GPL(alloc_vm_area);