aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/proc.py
diff options
context:
space:
mode:
authorCatalin Marinas <[email protected]>2017-07-06 15:40:22 -0700
committerLinus Torvalds <[email protected]>2017-07-06 16:24:34 -0700
commit94f4a1618b4c2b268f9e70bd1516932927782293 (patch)
treec8f76fa18273c8038f951dca271fd7871952a2c2 /scripts/gdb/linux/proc.py
parent04f70d13ca274d62a347815ca01fea871f9b9a40 (diff)
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/[email protected] Signed-off-by: Catalin Marinas <[email protected]> Reported-by: "Luis R. Rodriguez" <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: "Luis R. Rodriguez" <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/proc.py')
0 files changed, 0 insertions, 0 deletions