summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-06-25 13:16:11 +0400
committerCatalin Marinas <catalin.marinas@arm.com>2009-06-25 13:16:13 +0400
commita9d9058abab4ac17b79d500506e6c74bd16cecdc (patch)
tree3b12a8f093431979b3e26e04f115b4ce942ce363 /lib
parent28d0325ce6e0a52f53d8af687e6427fee59004d3 (diff)
downloadlinux-a9d9058abab4ac17b79d500506e6c74bd16cecdc.tar.xz
kmemleak: Allow the early log buffer to be configurable.
(feature suggested by Sergey Senozhatsky) Kmemleak needs to track all the memory allocations but some of these happen before kmemleak is initialised. These are stored in an internal buffer which may be exceeded in some kernel configurations. This patch adds a configuration option with a default value of 400 and also removes the stack dump when the early log buffer is exceeded. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Sergey Senozhatsky <sergey.senozhatsky@mail.by>
Diffstat (limited to 'lib')
-rw-r--r--lib/Kconfig.debug12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 4c32b1a1a06e..12327b2bb785 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -359,6 +359,18 @@ config DEBUG_KMEMLEAK
In order to access the kmemleak file, debugfs needs to be
mounted (usually at /sys/kernel/debug).
+config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
+ int "Maximum kmemleak early log entries"
+ depends on DEBUG_KMEMLEAK
+ range 200 2000
+ default 400
+ help
+ Kmemleak must track all the memory allocations to avoid
+ reporting false positives. Since memory may be allocated or
+ freed before kmemleak is initialised, an early log buffer is
+ used to store these actions. If kmemleak reports "early log
+ buffer exceeded", please increase this value.
+
config DEBUG_KMEMLEAK_TEST
tristate "Simple test for the kernel memory leak detector"
depends on DEBUG_KMEMLEAK