diff options
author | Catalin Marinas <catalin.marinas@arm.com> | 2014-06-06 17:38:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:17 -0400 |
commit | ffe2c748e283c5dc1b9b9ac116299dbfc11a609b (patch) | |
tree | ef16269fb598e941c9e0c90004a8cc20f2133760 /include/linux/kmemleak.h | |
parent | aae0ad7ae5a997bff1862e6e5eebed39cdf08ff3 (diff) |
mm: introduce kmemleak_update_trace()
The memory allocation stack trace is not always useful for debugging a
memory leak (e.g. radix_tree_preload). This function, when called,
updates the stack trace for an already allocated object.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kmemleak.h')
-rw-r--r-- | include/linux/kmemleak.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/kmemleak.h b/include/linux/kmemleak.h index 5bb424659c04..057e95971014 100644 --- a/include/linux/kmemleak.h +++ b/include/linux/kmemleak.h | |||
@@ -30,6 +30,7 @@ extern void kmemleak_alloc_percpu(const void __percpu *ptr, size_t size) __ref; | |||
30 | extern void kmemleak_free(const void *ptr) __ref; | 30 | extern void kmemleak_free(const void *ptr) __ref; |
31 | extern void kmemleak_free_part(const void *ptr, size_t size) __ref; | 31 | extern void kmemleak_free_part(const void *ptr, size_t size) __ref; |
32 | extern void kmemleak_free_percpu(const void __percpu *ptr) __ref; | 32 | extern void kmemleak_free_percpu(const void __percpu *ptr) __ref; |
33 | extern void kmemleak_update_trace(const void *ptr) __ref; | ||
33 | extern void kmemleak_not_leak(const void *ptr) __ref; | 34 | extern void kmemleak_not_leak(const void *ptr) __ref; |
34 | extern void kmemleak_ignore(const void *ptr) __ref; | 35 | extern void kmemleak_ignore(const void *ptr) __ref; |
35 | extern void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) __ref; | 36 | extern void kmemleak_scan_area(const void *ptr, size_t size, gfp_t gfp) __ref; |
@@ -83,6 +84,9 @@ static inline void kmemleak_free_recursive(const void *ptr, unsigned long flags) | |||
83 | static inline void kmemleak_free_percpu(const void __percpu *ptr) | 84 | static inline void kmemleak_free_percpu(const void __percpu *ptr) |
84 | { | 85 | { |
85 | } | 86 | } |
87 | static inline void kmemleak_update_trace(const void *ptr) | ||
88 | { | ||
89 | } | ||
86 | static inline void kmemleak_not_leak(const void *ptr) | 90 | static inline void kmemleak_not_leak(const void *ptr) |
87 | { | 91 | { |
88 | } | 92 | } |