mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping
authorCatalin Marinas <catalin.marinas@arm.com>
Sat, 10 Sep 2016 10:36:34 +0000 (20:36 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Sep 2016 03:57:02 +0000 (13:57 +1000)
commit3d70ad5bdfd5e520816b92a48282dacdb394dd41
tree3a4fc541096b436bcd847a1d7c540a7895b8b171
parent90189ed3f0dd5afd701708c789c7048a656fc45c
mm: kmemleak: avoid using __va() on addresses that don't have a lowmem mapping

Some of the kmemleak_*() callbacks in memblock, bootmem, CMA convert a
physical address to a virtual one using __va().  However, such physical
addresses may sometimes be located in highmem and using __va() is
incorrect, leading to inconsistent object tracking in kmemleak.

The following functions have been added to the kmemleak API and they take
a physical address as the object pointer.  They only perform the
corresponding action if the address has a lowmem mapping:

kmemleak_alloc_phys
kmemleak_free_part_phys
kmemleak_not_leak_phys
kmemleak_ignore_phys

The affected calling places have been updated to use the new kmemleak
API.

Link: http://lkml.kernel.org/r/1471531432-16503-1-git-send-email-catalin.marinas@arm.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Vignesh R <vigneshr@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/dev-tools/kmemleak.rst
include/linux/kmemleak.h
mm/bootmem.c
mm/cma.c
mm/kmemleak.c
mm/memblock.c
mm/nobootmem.c
This page took 0.02548 seconds and 5 git commands to generate.