Skip to content

Commit

Permalink
kemleak-test: build as module only
Browse files Browse the repository at this point in the history
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 <dbaluta@ixiacom.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Daniel Baluta authored and Linus Torvalds committed Apr 5, 2011
1 parent f65e51d commit 9718269
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 9718269

Please sign in to comment.