diff options
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -3488,22 +3488,25 @@ static __always_inline void *__do_kmalloc(size_t size, gfp_t flags, | |||
3488 | } | 3488 | } |
3489 | 3489 | ||
3490 | 3490 | ||
3491 | #ifdef CONFIG_DEBUG_SLAB | ||
3491 | void *__kmalloc(size_t size, gfp_t flags) | 3492 | void *__kmalloc(size_t size, gfp_t flags) |
3492 | { | 3493 | { |
3493 | #ifndef CONFIG_DEBUG_SLAB | ||
3494 | return __do_kmalloc(size, flags, NULL); | ||
3495 | #else | ||
3496 | return __do_kmalloc(size, flags, __builtin_return_address(0)); | 3494 | return __do_kmalloc(size, flags, __builtin_return_address(0)); |
3497 | #endif | ||
3498 | } | 3495 | } |
3499 | EXPORT_SYMBOL(__kmalloc); | 3496 | EXPORT_SYMBOL(__kmalloc); |
3500 | 3497 | ||
3501 | #ifdef CONFIG_DEBUG_SLAB | ||
3502 | void *__kmalloc_track_caller(size_t size, gfp_t flags, void *caller) | 3498 | void *__kmalloc_track_caller(size_t size, gfp_t flags, void *caller) |
3503 | { | 3499 | { |
3504 | return __do_kmalloc(size, flags, caller); | 3500 | return __do_kmalloc(size, flags, caller); |
3505 | } | 3501 | } |
3506 | EXPORT_SYMBOL(__kmalloc_track_caller); | 3502 | EXPORT_SYMBOL(__kmalloc_track_caller); |
3503 | |||
3504 | #else | ||
3505 | void *__kmalloc(size_t size, gfp_t flags) | ||
3506 | { | ||
3507 | return __do_kmalloc(size, flags, NULL); | ||
3508 | } | ||
3509 | EXPORT_SYMBOL(__kmalloc); | ||
3507 | #endif | 3510 | #endif |
3508 | 3511 | ||
3509 | /** | 3512 | /** |