diff options
Diffstat (limited to 'mm/vmalloc.c')
-rw-r--r-- | mm/vmalloc.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 43b44db..d213fa1 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -1274,6 +1274,10 @@ static void setup_vmalloc_vm(struct vm_struct *vm, struct vmap_area *va, vm->addr = (void *)va->va_start; vm->size = va->va_end - va->va_start; vm->caller = caller; +#ifdef CONFIG_DEBUG_VMALLOC + vm->pid = current->pid; + vm->task_name = current->comm; +#endif va->private = vm; va->flags |= VM_VM_AREA; } @@ -1579,6 +1583,10 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask, } area->pages = pages; area->caller = caller; +#ifdef CONFIG_DEBUG_VMALLOC + area->pid = current->pid; + area->task_name = current->comm; +#endif if (!area->pages) { remove_vm_area(area->addr); kfree(area); @@ -2572,6 +2580,14 @@ static int s_show(struct seq_file *m, void *p) if (v->flags & VM_VPAGES) seq_printf(m, " vpages"); +#ifdef CONFIG_DEBUG_VMALLOC + if (v->pid) + seq_printf(m, " pid=%d", v->pid); + + if (v->task_name) + seq_printf(m, " task name=%s", v->task_name); +#endif + show_numa_info(m, v); seq_putc(m, '\n'); return 0; |