|
|
@@ -1751,6 +1751,12 @@ void *__vmalloc_node_range(unsigned long size, unsigned long align,
|
|
|
if (!addr)
|
|
|
return NULL;
|
|
|
|
|
|
+ /*
|
|
|
+ * First make sure the mappings are removed from all page-tables
|
|
|
+ * before they are freed.
|
|
|
+ */
|
|
|
+ vmalloc_sync_all();
|
|
|
+
|
|
|
/*
|
|
|
* In this function, newly allocated vm_struct has VM_UNINITIALIZED
|
|
|
* flag. It means that vm_struct is not fully initialized.
|
|
|
@@ -2296,6 +2302,9 @@ EXPORT_SYMBOL(remap_vmalloc_range);
|
|
|
/*
|
|
|
* Implement a stub for vmalloc_sync_all() if the architecture chose not to
|
|
|
* have one.
|
|
|
+ *
|
|
|
+ * The purpose of this function is to make sure the vmalloc area
|
|
|
+ * mappings are identical in all page-tables in the system.
|
|
|
*/
|
|
|
void __weak vmalloc_sync_all(void)
|
|
|
{
|