diff options
author | Thierry Reding <[email protected]> | 2014-12-12 16:58:31 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-12-13 12:42:53 -0800 |
commit | 620951e2745750de1482128615adc15b74ee37ed (patch) | |
tree | 891a9b999ea2b834bad002af7b12b381547c5ef5 /lib/memory-notifier-error-inject.c | |
parent | dee2f8aaabccb64a67166bd8ab27d95cfbdc7704 (diff) |
mm/cma: make kmemleak ignore CMA regions
kmemleak will add allocations as objects to a pool. The memory allocated
for each object in this pool is periodically searched for pointers to
other allocated objects. This only works for memory that is mapped into
the kernel's virtual address space, which happens not to be the case for
most CMA regions.
Furthermore, CMA regions are typically used to store data transferred to
or from a device and therefore don't contain pointers to other objects.
Without this, the kernel crashes on the first execution of the
scan_gray_list() because it tries to access highmem. Perhaps a more
appropriate fix would be to reject any object that can't map to a kernel
virtual address?
[[email protected]: add comment]
[[email protected]: fix comment, per Catalin]
[[email protected]: include linux/io.h for phys_to_virt()]
Signed-off-by: Thierry Reding <[email protected]>
Cc: Michal Nazarewicz <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: "Aneesh Kumar K.V" <[email protected]>
Cc: Catalin Marinas <[email protected]>
Signed-off-by: Stephen Rothwell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions