linux/Documentation/dev-tools
Catalin Marinas 94f4a1618b mm: kmemleak: treat vm_struct as alternative reference to vmalloc'ed objects
Kmemleak requires that vmalloc'ed objects have a minimum reference count
of 2: one in the corresponding vm_struct object and the other owned by
the vmalloc() caller.  There are cases, however, where the original
vmalloc() returned pointer is lost and, instead, a pointer to vm_struct
is stored (see free_thread_stack()).  Kmemleak currently reports such
objects as leaks.

This patch adds support for treating any surplus references to an object
as additional references to a specified object.  It introduces the
kmemleak_vmalloc() API function which takes a vm_struct pointer and sets
its surplus reference passing to the actual vmalloc() returned pointer.
The __vmalloc_node_range() calling site has been modified accordingly.

Link: http://lkml.kernel.org/r/1495726937-23557-4-git-send-email-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: "Luis R. Rodriguez" <mcgrof@kernel.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-06 16:24:34 -07:00
..
coccinelle.rst
conf.py doc-rst: make dev-tools folder buildable stand-alone 2016-10-26 17:24:54 -06:00
gcov.rst Documentation/dev-tools: use code-block with proper language 2016-11-03 12:39:06 +02:00
gdb-kernel-debugging.rst docs: Sphinxify gdb-kernel-debugging.txt and move to dev-tools 2016-08-18 17:43:24 -06:00
index.rst docs-rst: convert kgdb DocBook to ReST 2017-05-16 08:44:04 -03:00
kasan.rst Merge branch 'dev-tools' into doc/4.9 2016-08-19 11:38:36 -06:00
kcov.rst scripts/spelling.txt: add "disble(d)" pattern and fix typo instances 2017-03-09 17:01:09 -08:00
kgdb.rst kgdb.rst: Adjust ReST markups 2017-05-16 08:44:04 -03:00
kmemcheck.rst docs: sphinxify kmemcheck.txt and move to dev-tools 2016-08-18 17:43:14 -06:00
kmemleak.rst mm: kmemleak: treat vm_struct as alternative reference to vmalloc'ed objects 2017-07-06 16:24:34 -07:00
sparse.rst rcu: Remove SPARSE_RCU_POINTER Kconfig option 2017-06-08 18:52:41 -07:00
ubsan.rst docs: sphinxify ubsan.txt and move it to dev-tools 2016-08-18 17:41:51 -06:00