aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/vmalloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index ed3705e4b83f..520a75980269 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -505,6 +505,7 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
505 static DEFINE_SPINLOCK(purge_lock); 505 static DEFINE_SPINLOCK(purge_lock);
506 LIST_HEAD(valist); 506 LIST_HEAD(valist);
507 struct vmap_area *va; 507 struct vmap_area *va;
508 struct vmap_area *n_va;
508 int nr = 0; 509 int nr = 0;
509 510
510 /* 511 /*
@@ -544,7 +545,7 @@ static void __purge_vmap_area_lazy(unsigned long *start, unsigned long *end,
544 545
545 if (nr) { 546 if (nr) {
546 spin_lock(&vmap_area_lock); 547 spin_lock(&vmap_area_lock);
547 list_for_each_entry(va, &valist, purge_list) 548 list_for_each_entry_safe(va, n_va, &valist, purge_list)
548 __free_vmap_area(va); 549 __free_vmap_area(va);
549 spin_unlock(&vmap_area_lock); 550 spin_unlock(&vmap_area_lock);
550 } 551 }