+ kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4.patch added to -mm tree
Subsystems (3)
[email protected]
maintainerSubject: + kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Fri, 28 Mar 2014 13:22:43 -0700
The patch titled
Subject: kmemleak: allow freeing internal objects after kmemleak was disabled
has been added to the -mm tree. Its filename is
kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4.patch
This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Li Zefan <[email protected]>
Subject: kmemleak: allow freeing internal objects after kmemleak was disabled
v4: rephrase the printk string.
v3: Catalin wasn't suggesting to use "off" handler, but he wants to be
able to read memory leaks even when kmemleak is explicitly disabled.
v2: use "off" handler instead of "clear" handler to do this, suggested
by Catalin.
---
Documentation/kmemleak.txt | 17 ++++++------ mm/kmemleak.c | 47 ++++++++++++++++++++--------------- 2 files changed, 36 insertions(+), 28 deletions(-)
Documentation/kmemleak.txt renamed from Documentation/kmemleak.txt~kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4 +9 -8
@@ -44,8 +44,7 @@ objects to be reported as orphan. Memory scanning parameters can be modified at run-time by writing to the /sys/kernel/debug/kmemleak file. The following parameters are supported: - off - disable kmemleak, or free all kmemleak objects if kmemleak - has been disabled due to fatal errors. (irreversible). + off - disable kmemleak (irreversible) stack=on - enable the task stacks scanning (default) stack=off - disable the tasks stacks scanning scan=on - start the automatic memory scanning thread (default)
@@ -54,7 +53,8 @@ Memory scanning parameters can be modifi (default 600, 0 to stop the automatic scanning) scan - trigger a memory scan clear - clear list of current memory leak suspects, done by - marking all current reported unreferenced objects grey + marking all current reported unreferenced objects grey, + or free all kmemleak objects if kmemleak has been disabled. dump=<addr> - dump information about the object found at <addr> Kmemleak can also be disabled at boot-time by passing "kmemleak=off" on
@@ -124,13 +124,14 @@ Then as usual to get your report with: Freeing kmemleak internal objects --------------------------------- -To allow access to previously found memory leaks even when an error fatal -to kmemleak happens, internal kmemleak objects won't be freed in this case. -Those objects may occupy a large part of physical memory. +To allow access to previosuly found memory leaks after kmemleak has been +disabled by the user or due to an fatal error, internal kmemleak objects +won't be freed when kmemleak is disabled, and those objects may occupy +a large part of physical memory. -You can reclaim memory from those objects with: +In this situation, you may reclaim memory with: - # echo off > /sys/kernel/debug/kmemleak + # echo clear > /sys/kernel/debug/kmemleak Kmemleak API ------------
mm/kmemleak.c renamed from mm/kmemleak.c~kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4 +27 -20
92 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are
kmemleak-free-internal-objects-only-if-therere-no-leaks-to-be-reported.patch kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled.patch kmemleak-allow-freeing-internal-objects-after-kmemleak-was-disabled-v4.patch kmemleak-remove-redundant-code.patch kmemleak-change-some-global-variables-to-int.patch kmemleak-change-some-global-variables-to-int-v4.patch kmemcheck-move-hook-into-__alloc_pages_nodemask-for-the-page-allocator.patch linux-next.patch