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-Url: https://git.stricted.de/?a=commitdiff_plain;h=512626a04e72aca60effe111fa0333ed0b195d21;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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 7917695bf71,9d759d68d7a..5616661eac0 --- 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 2bd611fa87b,859067f8e4f..f46b65d124e --- 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 323513858c2,b7db9357279..f8189a4b3e1 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@@ -23,7 -23,9 +23,8 @@@ #include #include #include -#include #include + #include #include #include