aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmalloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 93b2dca2aadb..4c9e150e5ad3 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -2125,6 +2125,7 @@ static void vm_remove_mappings(struct vm_struct *area, int deallocate_pages)
2125{ 2125{
2126 unsigned long start = ULONG_MAX, end = 0; 2126 unsigned long start = ULONG_MAX, end = 0;
2127 int flush_reset = area->flags & VM_FLUSH_RESET_PERMS; 2127 int flush_reset = area->flags & VM_FLUSH_RESET_PERMS;
2128 int flush_dmap = 0;
2128 int i; 2129 int i;
2129 2130
2130 /* 2131 /*
@@ -2163,6 +2164,7 @@ static void vm_remove_mappings(struct vm_struct *area, int deallocate_pages)
2163 if (addr) { 2164 if (addr) {
2164 start = min(addr, start); 2165 start = min(addr, start);
2165 end = max(addr + PAGE_SIZE, end); 2166 end = max(addr + PAGE_SIZE, end);
2167 flush_dmap = 1;
2166 } 2168 }
2167 } 2169 }
2168 2170
@@ -2172,7 +2174,7 @@ static void vm_remove_mappings(struct vm_struct *area, int deallocate_pages)
2172 * reset the direct map permissions to the default. 2174 * reset the direct map permissions to the default.
2173 */ 2175 */
2174 set_area_direct_map(area, set_direct_map_invalid_noflush); 2176 set_area_direct_map(area, set_direct_map_invalid_noflush);
2175 _vm_unmap_aliases(start, end, 1); 2177 _vm_unmap_aliases(start, end, flush_dmap);
2176 set_area_direct_map(area, set_direct_map_default_noflush); 2178 set_area_direct_map(area, set_direct_map_default_noflush);
2177} 2179}
2178 2180