Skip to contentSkip to conversation

kmemleak: build kmemleak-test.c as a module-only

PATCH In review Daniel Baluta 5 participants 8 messages Mar 16, 2011 – Mar 31, 2011 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kmemleak: build kmemleak-test.c as a module-only

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.

---
 lib/Kconfig.debug |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
lib/Kconfig.debug +2 -4
index 689f311..6e9cacc 100644
@@ -407,11 +407,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.
 
Signature · 1 line
1.7.1
#1 lore raw
Quoted 5 lines · Daniel Baluta

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.

Any comments on this?

thanks,
Daniel.

Acked-by
#2 lore raw
Quoted 8 lines · Daniel Baluta
Quoted 5 lines · Daniel Baluta

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.

Any comments on this?

Looks good to me.

Acked-by on v1 1/1
#3 lore raw
In reply to Daniel Baluta
Quoted 10 lines · Daniel Baluta

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.

Sorry for the delay.

#4 lore raw
Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Daniel Baluta

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.

Quoted 8 lines
Quoted 4 lines

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

Sorry for the delay.

Who should pick this up?

$ scripts/get_maintainer.pl lib/this.patch says:
Andrew Morton <[email protected]> (commit_signer:8/56=14%)
"Paul E. McKenney" <[email protected]> (commit_signer:7/56=12%)
Ingo Molnar <[email protected]> (commit_signer:5/56=9%)
Frederic Weisbecker <[email protected]> (commit_signer:5/56=9%)
Randy Dunlap <[email protected]> (commit_signer:3/56=5%)

Am I missing something?

thanks,
Daniel.

#5 lore raw
Quoted 18 lines · Daniel Baluta
Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Daniel Baluta

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.

Quoted 8 lines
Quoted 4 lines

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

Sorry for the delay.

Quoted 8 lines

Who should pick this up?

$ scripts/get_maintainer.pl lib/this.patch says:
Andrew Morton <[email protected]> (commit_signer:8/56=14%)
"Paul E. McKenney" <[email protected]> (commit_signer:7/56=12%)
Ingo Molnar <[email protected]> (commit_signer:5/56=9%)
Frederic Weisbecker <[email protected]> (commit_signer:5/56=9%)
Randy Dunlap <[email protected]> (commit_signer:3/56=5%)

Catalin, Randy since lib/Kconfig.debug has no official maintainer I think this should go up through your trees.

thanks,
Daniel.

#6 lore raw
Quoted 28 lines · On Wed, 30 Mar 2011 18:02:02 +0300 Daniel Baluta wrote:
Quoted 18 lines · Daniel Baluta
Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Daniel Baluta

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.

Quoted 8 lines
Quoted 4 lines

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

Sorry for the delay.

Quoted 8 lines

Who should pick this up?

$ scripts/get_maintainer.pl lib/this.patch says:
Andrew Morton <[email protected]> (commit_signer:8/56=14%)
"Paul E. McKenney" <[email protected]> (commit_signer:7/56=12%)
Ingo Molnar <[email protected]> (commit_signer:5/56=9%)
Frederic Weisbecker <[email protected]> (commit_signer:5/56=9%)
Randy Dunlap <[email protected]> (commit_signer:3/56=5%)
Quoted 2 lines

Catalin, Randy since lib/Kconfig.debug has no official maintainer I think this should go up through your trees.

I hadn't seen it until now, but I can merge it.

thanks.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#7 lore raw
Quoted 30 lines · Randy Dunlap
Quoted 28 lines · On Wed, 30 Mar 2011 18:02:02 +0300 Daniel Baluta wrote:
Quoted 26 lines · Daniel Baluta
Quoted 7 lines · Catalin Marinas
Quoted 6 lines · Daniel Baluta

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.

Quoted 8 lines
Quoted 4 lines

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

Sorry for the delay.

Who should pick this up?

$ scripts/get_maintainer.pl lib/this.patch says:
Andrew Morton <[email protected]> (commit_signer:8/56=14%)
"Paul E. McKenney" <[email protected]> (commit_signer:7/56=12%)
Ingo Molnar <[email protected]> (commit_signer:5/56=9%)
Frederic Weisbecker <[email protected]> (commit_signer:5/56=9%)
Randy Dunlap <[email protected]> (commit_signer:3/56=5%)
Quoted 4 lines
Quoted 2 lines

Catalin, Randy since lib/Kconfig.debug has no official maintainer I think this should go up through your trees.

I hadn't seen it until now, but I can merge it.

OK. thanks.