<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/Documentation/kmemleak.txt, branch v3.17-rc3</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v3.17-rc3</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v3.17-rc3'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2014-06-06T23:08:17Z</updated>
<entry>
<title>mm: introduce kmemleak_update_trace()</title>
<updated>2014-06-06T23:08:17Z</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2014-06-06T21:38:17Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=ffe2c748e283c5dc1b9b9ac116299dbfc11a609b'/>
<id>urn:sha1:ffe2c748e283c5dc1b9b9ac116299dbfc11a609b</id>
<content type='text'>
The memory allocation stack trace is not always useful for debugging a
memory leak (e.g.  radix_tree_preload).  This function, when called,
updates the stack trace for an already allocated object.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Johannes Weiner &lt;hannes@cmpxchg.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation/kmemleak.txt: updates</title>
<updated>2014-04-03T23:21:27Z</updated>
<author>
<name>Wang YanQing</name>
<email>udknight@gmail.com</email>
</author>
<published>2014-04-03T21:50:38Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=4762c98413836dfc3bff2857647f8d673a86d210'/>
<id>urn:sha1:4762c98413836dfc3bff2857647f8d673a86d210</id>
<content type='text'>
Update Documentatin/kmemleak.txt to reflect the following changes:

Commit b69ec42b1b19 ("Kconfig: clean up the long arch list for the
DEBUG_KMEMLEAK config option") made it so that we can't check supported
architectures by read Kconfig.debug.

Commit 85d3a316c71 ("kmemleak: use rbtree instead of prio tree")
converted kmemleak to use rbtree instead of prio tree.

Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kmemleak: allow freeing internal objects after kmemleak was disabled</title>
<updated>2014-04-03T23:20:50Z</updated>
<author>
<name>Li Zefan</name>
<email>lizefan@huawei.com</email>
</author>
<published>2014-04-03T21:46:27Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=c89da70c7360294e715df5abd4b7239db3274c86'/>
<id>urn:sha1:c89da70c7360294e715df5abd4b7239db3274c86</id>
<content type='text'>
Currently if kmemleak is disabled, the kmemleak objects can never be
freed, no matter if it's disabled by a user or due to fatal errors.

Those objects can be a big waste of memory.

    OBJS ACTIVE  USE OBJ SIZE  SLABS OBJ/SLAB CACHE SIZE NAME
  1200264 1197433  99%    0.30K  46164       26    369312K kmemleak_object

With this patch, after kmemleak was disabled you can reclaim memory
with:

	# echo clear &gt; /sys/kernel/debug/kmemleak

Also inform users about this with a printk.

Signed-off-by: Li Zefan &lt;lizefan@huawei.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kmemleak: Handle percpu memory allocation</title>
<updated>2011-12-02T16:12:42Z</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2011-09-26T16:12:53Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=f528f0b8e53d73b18be71e96693cfab9322f33c7'/>
<id>urn:sha1:f528f0b8e53d73b18be71e96693cfab9322f33c7</id>
<content type='text'>
This patch adds kmemleak callbacks from the percpu allocator, reducing a
number of false positives caused by kmemleak not scanning such memory
blocks. The percpu chunks are never reported as leaks because of current
kmemleak limitations with the __percpu pointer not pointing directly to
the actual chunks.

Reported-by: Huajun Li &lt;huajun.li.lee@gmail.com&gt;
Acked-by: Christoph Lameter &lt;cl@gentwo.org&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>Documentation: update kmemleak supported archs</title>
<updated>2011-06-16T04:52:50Z</updated>
<author>
<name>Maxin B. John</name>
<email>maxin.john@gmail.com</email>
</author>
<published>2011-06-15T19:58:29Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=06a2c45d6b4a7586eba7cd20dd656b08d8b63c2f'/>
<id>urn:sha1:06a2c45d6b4a7586eba7cd20dd656b08d8b63c2f</id>
<content type='text'>
Instead of listing the architectures that are supported by
kmemleak in Documentation/kmemleak.txt, just refer people to
the list of supported architecutures in lib/Kconfig.debug so
that Documentation/kmemleak.txt does not need more updates
for this.

Signed-off-by: Maxin B. John &lt;maxin.john@gmail.com&gt;
Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Documentation: update kmemleak arch. info</title>
<updated>2011-04-05T00:51:46Z</updated>
<author>
<name>Daniel Baluta</name>
<email>dbaluta@ixiacom.com</email>
</author>
<published>2011-04-04T21:58:03Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=21b86bd5a838ee882d36d354185e29650b0757dd'/>
<id>urn:sha1:21b86bd5a838ee882d36d354185e29650b0757dd</id>
<content type='text'>
Besides x86 and arm, kmemleak now supports powerpc, sparc, sh,
microblaze and tile.

Signed-off-by: Daniel Baluta &lt;dbaluta@ixiacom.com&gt;
Acked-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Signed-off-by: Randy Dunlap &lt;randy.dunlap@oracle.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kmemleak: add clear command support</title>
<updated>2009-09-08T15:36:08Z</updated>
<author>
<name>Luis R. Rodriguez</name>
<email>lrodriguez@Atheros.com</email>
</author>
<published>2009-09-05T00:44:51Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=30b3710105be0ba6bbdb7d7d126af76246b02eba'/>
<id>urn:sha1:30b3710105be0ba6bbdb7d7d126af76246b02eba</id>
<content type='text'>
In an ideal world your kmemleak output will be small, when its
not (usually during initial bootup) you can use the clear command
to ingore previously reported and unreferenced kmemleak objects. We
do this by painting all currently reported unreferenced objects grey.
We paint them grey instead of black to allow future scans on the same
objects as such objects could still potentially reference newly
allocated objects in the future.

To test a critical section on demand with a clean
/sys/kernel/debug/kmemleak you can do:

echo clear &gt; /sys/kernel/debug/kmemleak
        test your kernel or modules
echo scan &gt; /sys/kernel/debug/kmemleak

Then as usual to get your report with:

cat /sys/kernel/debug/kmemleak

Signed-off-by: Luis R. Rodriguez &lt;lrodriguez@atheros.com&gt;
Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>kmemleak: Dump object information on request</title>
<updated>2009-08-27T13:29:15Z</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2009-08-27T13:29:15Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=189d84ed54bbb05aac5b24d9d784d86c4d37f807'/>
<id>urn:sha1:189d84ed54bbb05aac5b24d9d784d86c4d37f807</id>
<content type='text'>
By writing dump=&lt;addr&gt; to the kmemleak file, kmemleak will look up an
object with that address and dump the information it has about it to
syslog. This is useful in debugging memory leaks.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>kmemleak: Do not trigger a scan when reading the debug/kmemleak file</title>
<updated>2009-06-26T16:38:27Z</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2009-06-26T16:38:27Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=4698c1f2bbe44ce852ef1a6716973c1f5401a4c4'/>
<id>urn:sha1:4698c1f2bbe44ce852ef1a6716973c1f5401a4c4</id>
<content type='text'>
Since there is a kernel thread for automatically scanning the memory, it
makes sense for the debug/kmemleak file to only show its findings. This
patch also adds support for "echo scan &gt; debug/kmemleak" to trigger an
intermediate memory scan and eliminates the kmemleak_mutex (scan_mutex
covers all the cases now).

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
<entry>
<title>kmemleak: Simplify the reports logged by the scanning thread</title>
<updated>2009-06-26T16:38:26Z</updated>
<author>
<name>Catalin Marinas</name>
<email>catalin.marinas@arm.com</email>
</author>
<published>2009-06-26T16:38:26Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=bab4a34afc301fdb81b6ea0e3098d96fc356e03a'/>
<id>urn:sha1:bab4a34afc301fdb81b6ea0e3098d96fc356e03a</id>
<content type='text'>
Because of false positives, the memory scanning thread may print too
much information. This patch changes the scanning thread to only print
the number of newly suspected leaks. Further information can be read
from the /sys/kernel/debug/kmemleak file.

Signed-off-by: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
</content>
</entry>
</feed>
