Merge branch 'kmemleak' of git://linux-arm.org/linux-2.6

* 'kmemleak' of git://linux-arm.org/linux-2.6:
kmemleak: Fix some typos in comments
kmemleak: Rename kmemleak_panic to kmemleak_stop
kmemleak: Only use GFP_KERNEL|GFP_ATOMIC for the internal allocations

+15 -12
+15 -12
mm/kmemleak.c
··· 109 109 110 110 #define BYTES_PER_POINTER sizeof(void *) 111 111 112 + /* GFP bitmask for kmemleak internal allocations */ 113 + #define GFP_KMEMLEAK_MASK (GFP_KERNEL | GFP_ATOMIC) 114 + 112 115 /* scanning area inside a memory block */ 113 116 struct kmemleak_scan_area { 114 117 struct hlist_node node; ··· 202 199 static int reported_leaks; 203 200 204 201 /* 205 - * Early object allocation/freeing logging. Kkmemleak is initialized after the 202 + * Early object allocation/freeing logging. Kmemleak is initialized after the 206 203 * kernel allocator. However, both the kernel allocator and kmemleak may 207 - * allocate memory blocks which need to be tracked. Kkmemleak defines an 204 + * allocate memory blocks which need to be tracked. Kmemleak defines an 208 205 * arbitrary buffer to hold the allocation/freeing information before it is 209 206 * fully initialized. 210 207 */ ··· 248 245 249 246 /* 250 247 * Macro invoked when a serious kmemleak condition occured and cannot be 251 - * recovered from. Kkmemleak will be disabled and further allocation/freeing 248 + * recovered from. Kmemleak will be disabled and further allocation/freeing 252 249 * tracing no longer available. 253 250 */ 254 - #define kmemleak_panic(x...) do { \ 251 + #define kmemleak_stop(x...) do { \ 255 252 kmemleak_warn(x); \ 256 253 kmemleak_disable(); \ 257 254 } while (0) ··· 465 462 struct prio_tree_node *node; 466 463 struct stack_trace trace; 467 464 468 - object = kmem_cache_alloc(object_cache, gfp & ~GFP_SLAB_BUG_MASK); 465 + object = kmem_cache_alloc(object_cache, gfp & GFP_KMEMLEAK_MASK); 469 466 if (!object) { 470 - kmemleak_panic("kmemleak: Cannot allocate a kmemleak_object " 471 - "structure\n"); 467 + kmemleak_stop("kmemleak: Cannot allocate a kmemleak_object " 468 + "structure\n"); 472 469 return; 473 470 } 474 471 ··· 527 524 if (node != &object->tree_node) { 528 525 unsigned long flags; 529 526 530 - kmemleak_panic("kmemleak: Cannot insert 0x%lx into the object " 531 - "search tree (already existing)\n", ptr); 527 + kmemleak_stop("kmemleak: Cannot insert 0x%lx into the object " 528 + "search tree (already existing)\n", ptr); 532 529 object = lookup_object(ptr, 1); 533 530 spin_lock_irqsave(&object->lock, flags); 534 531 dump_object_info(object); ··· 639 636 return; 640 637 } 641 638 642 - area = kmem_cache_alloc(scan_area_cache, gfp & ~GFP_SLAB_BUG_MASK); 639 + area = kmem_cache_alloc(scan_area_cache, gfp & GFP_KMEMLEAK_MASK); 643 640 if (!area) { 644 641 kmemleak_warn("kmemleak: Cannot allocate a scan area\n"); 645 642 goto out; ··· 699 696 struct early_log *log; 700 697 701 698 if (crt_early_log >= ARRAY_SIZE(early_log)) { 702 - kmemleak_panic("kmemleak: Early log buffer exceeded\n"); 699 + kmemleak_stop("kmemleak: Early log buffer exceeded\n"); 703 700 return; 704 701 } 705 702 ··· 1407 1404 early_param("kmemleak", kmemleak_boot_config); 1408 1405 1409 1406 /* 1410 - * Kkmemleak initialization. 1407 + * Kmemleak initialization. 1411 1408 */ 1412 1409 void __init kmemleak_init(void) 1413 1410 {