diff options
-rw-r--r-- | mm/slab.c | 4 | ||||
-rw-r--r-- | mm/slob.c | 4 | ||||
-rw-r--r-- | mm/slub.c | 4 |
3 files changed, 6 insertions, 6 deletions
@@ -3773,6 +3773,8 @@ void kfree(const void *objp) | |||
3773 | struct kmem_cache *c; | 3773 | struct kmem_cache *c; |
3774 | unsigned long flags; | 3774 | unsigned long flags; |
3775 | 3775 | ||
3776 | trace_kfree(_RET_IP_, objp); | ||
3777 | |||
3776 | if (unlikely(ZERO_OR_NULL_PTR(objp))) | 3778 | if (unlikely(ZERO_OR_NULL_PTR(objp))) |
3777 | return; | 3779 | return; |
3778 | local_irq_save(flags); | 3780 | local_irq_save(flags); |
@@ -3782,8 +3784,6 @@ void kfree(const void *objp) | |||
3782 | debug_check_no_obj_freed(objp, obj_size(c)); | 3784 | debug_check_no_obj_freed(objp, obj_size(c)); |
3783 | __cache_free(c, (void *)objp); | 3785 | __cache_free(c, (void *)objp); |
3784 | local_irq_restore(flags); | 3786 | local_irq_restore(flags); |
3785 | |||
3786 | trace_kfree(_RET_IP_, objp); | ||
3787 | } | 3787 | } |
3788 | EXPORT_SYMBOL(kfree); | 3788 | EXPORT_SYMBOL(kfree); |
3789 | 3789 | ||
@@ -514,6 +514,8 @@ void kfree(const void *block) | |||
514 | { | 514 | { |
515 | struct slob_page *sp; | 515 | struct slob_page *sp; |
516 | 516 | ||
517 | trace_kfree(_RET_IP_, block); | ||
518 | |||
517 | if (unlikely(ZERO_OR_NULL_PTR(block))) | 519 | if (unlikely(ZERO_OR_NULL_PTR(block))) |
518 | return; | 520 | return; |
519 | 521 | ||
@@ -524,8 +526,6 @@ void kfree(const void *block) | |||
524 | slob_free(m, *m + align); | 526 | slob_free(m, *m + align); |
525 | } else | 527 | } else |
526 | put_page(&sp->page); | 528 | put_page(&sp->page); |
527 | |||
528 | trace_kfree(_RET_IP_, block); | ||
529 | } | 529 | } |
530 | EXPORT_SYMBOL(kfree); | 530 | EXPORT_SYMBOL(kfree); |
531 | 531 | ||
@@ -2792,6 +2792,8 @@ void kfree(const void *x) | |||
2792 | struct page *page; | 2792 | struct page *page; |
2793 | void *object = (void *)x; | 2793 | void *object = (void *)x; |
2794 | 2794 | ||
2795 | trace_kfree(_RET_IP_, x); | ||
2796 | |||
2795 | if (unlikely(ZERO_OR_NULL_PTR(x))) | 2797 | if (unlikely(ZERO_OR_NULL_PTR(x))) |
2796 | return; | 2798 | return; |
2797 | 2799 | ||
@@ -2802,8 +2804,6 @@ void kfree(const void *x) | |||
2802 | return; | 2804 | return; |
2803 | } | 2805 | } |
2804 | slab_free(page->slab, page, object, _RET_IP_); | 2806 | slab_free(page->slab, page, object, _RET_IP_); |
2805 | |||
2806 | trace_kfree(_RET_IP_, x); | ||
2807 | } | 2807 | } |
2808 | EXPORT_SYMBOL(kfree); | 2808 | EXPORT_SYMBOL(kfree); |
2809 | 2809 | ||