From: Linus Torvalds Date: Thu, 11 Jun 2009 21:15:57 +0000 (-0700) Subject: Merge branch 'for-linus' of git://linux-arm.org/linux-2.6 X-Git-Tag: v2.6.31-rc1~382 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=512626a04e72aca60effe111fa0333ed0b195d21;p=linux.git Merge branch 'for-linus' of git://linux-arm.org/linux-2.6 * 'for-linus' of git://linux-arm.org/linux-2.6: kmemleak: Add the corresponding MAINTAINERS entry kmemleak: Simple testing module for kmemleak kmemleak: Enable the building of the memory leak detector kmemleak: Remove some of the kmemleak false positives kmemleak: Add modules support kmemleak: Add kmemleak_alloc callback from alloc_large_system_hash kmemleak: Add the vmalloc memory allocation/freeing hooks kmemleak: Add the slub memory allocation/freeing hooks kmemleak: Add the slob memory allocation/freeing hooks kmemleak: Add the slab memory allocation/freeing hooks kmemleak: Add documentation on the memory leak detector kmemleak: Add the base support Manual conflict resolution (with the slab/earlyboot changes) in: drivers/char/vt.c init/main.c mm/slab.c --- 512626a04e72aca60effe111fa0333ed0b195d21 diff --cc init/main.c index 7917695bf71e,9d759d68d7a0..5616661eac01 --- a/init/main.c +++ b/init/main.c @@@ -621,6 -604,8 +622,7 @@@ asmlinkage void __init start_kernel(voi /* init some links before init_ISA_irqs() */ early_irq_init(); init_IRQ(); + prio_tree_init(); - pidhash_init(); init_timers(); hrtimers_init(); softirq_init(); @@@ -662,11 -647,16 +664,12 @@@ initrd_start = 0; } #endif - vmalloc_init(); - vfs_caches_init_early(); cpuset_init_early(); page_cgroup_init(); - mem_init(); enable_debug_pagealloc(); cpu_hotplug_init(); - kmem_cache_init(); kmemtrace_init(); + kmemleak_init(); debug_objects_mem_init(); idr_init_cache(); setup_per_cpu_pageset(); diff --cc mm/slab.c index 2bd611fa87bf,859067f8e4fd..f46b65d124e5 --- a/mm/slab.c +++ b/mm/slab.c @@@ -963,7 -964,15 +964,15 @@@ static struct array_cache *alloc_arrayc int memsize = sizeof(void *) * entries + sizeof(struct array_cache); struct array_cache *nc = NULL; - nc = kmalloc_node(memsize, GFP_KERNEL, node); + nc = kmalloc_node(memsize, gfp, node); + /* + * The array_cache structures contain pointers to free object. + * However, when such objects are allocated or transfered to another + * cache the pointers are not cleared and they could be counted as + * valid references during a kmemleak scan. Therefore, kmemleak must + * not scan such objects. + */ + kmemleak_no_scan(nc); if (nc) { nc->avail = 0; nc->limit = entries; diff --cc mm/vmalloc.c index 323513858c20,b7db93572797..f8189a4b3e13 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@@ -23,7 -23,9 +23,8 @@@ #include #include #include -#include #include + #include #include #include