kemleak-test: build as module only
authorDaniel Baluta <[email protected]>
Mon, 4 Apr 2011 22:06:44 +0000 (15:06 -0700)
committerLinus Torvalds <[email protected]>
Tue, 5 Apr 2011 00:51:47 +0000 (17:51 -0700)
mm/kmemleak-test.c is used to provide an example of how kmemleak
tool works.

Memory is leaked at module unload-time, so building the test
in kernel (Y) makes the leaks impossible and the test useless.

Qualify DEBUG_KMEMLEAK_TEST config symbol with "depends on m",
to restrict module-only building.

Signed-off-by: Daniel Baluta <[email protected]>
Acked-by: Pekka Enberg <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Signed-off-by: Randy Dunlap <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
lib/Kconfig.debug

index df9234c5f9d1c003a4b93e71df13248edba836a9..c768bcdda1b700331a991cad681c5c2d6862c419 100644 (file)
@@ -434,11 +434,9 @@ config DEBUG_KMEMLEAK_EARLY_LOG_SIZE
 
 config DEBUG_KMEMLEAK_TEST
        tristate "Simple test for the kernel memory leak detector"
-       depends on DEBUG_KMEMLEAK
+       depends on DEBUG_KMEMLEAK && m
        help
-         Say Y or M here to build a test for the kernel memory leak
-         detector. This option enables a module that explicitly leaks
-         memory.
+         This option enables a module that explicitly leaks memory.
 
          If unsure, say N.