]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/vmalloc.c
Merge tag 'clk-bulk-get-prep-enable' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / mm / vmalloc.c
index 6211a807cb31ebfa0741d34b8663f4c47a403292..8698c1c86c4dbed685269eae1ecded2f5e714368 100644 (file)
@@ -325,6 +325,7 @@ EXPORT_SYMBOL(vmalloc_to_pfn);
 
 /*** Global kva allocator ***/
 
+#define VM_LAZY_FREE   0x02
 #define VM_VM_AREA     0x04
 
 static DEFINE_SPINLOCK(vmap_area_lock);
@@ -1497,6 +1498,7 @@ struct vm_struct *remove_vm_area(const void *addr)
                spin_lock(&vmap_area_lock);
                va->vm = NULL;
                va->flags &= ~VM_VM_AREA;
+               va->flags |= VM_LAZY_FREE;
                spin_unlock(&vmap_area_lock);
 
                vmap_debug_free_range(va->va_start, va->va_end);
@@ -1793,7 +1795,7 @@ fail:
  *     allocator with @gfp_mask flags.  Map them into contiguous
  *     kernel virtual space, using a pagetable protection of @prot.
  *
- *     Reclaim modifiers in @gfp_mask - __GFP_NORETRY, __GFP_REPEAT
+ *     Reclaim modifiers in @gfp_mask - __GFP_NORETRY, __GFP_RETRY_MAYFAIL
  *     and __GFP_NOFAIL are not supported
  *
  *     Any use of gfp flags outside of GFP_KERNEL should be consulted
@@ -2704,8 +2706,14 @@ static int s_show(struct seq_file *m, void *p)
         * s_show can encounter race with remove_vm_area, !VM_VM_AREA on
         * behalf of vmap area is being tear down or vm_map_ram allocation.
         */
-       if (!(va->flags & VM_VM_AREA))
+       if (!(va->flags & VM_VM_AREA)) {
+               seq_printf(m, "0x%pK-0x%pK %7ld %s\n",
+                       (void *)va->va_start, (void *)va->va_end,
+                       va->va_end - va->va_start,
+                       va->flags & VM_LAZY_FREE ? "unpurged vm_area" : "vm_map_ram");
+
                return 0;
+       }
 
        v = va->vm;