Commit ccfb5ceb authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fixes-2021-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock

Pull memblock fix from Mike Rapoport:
 "Fix handling of NOMAP regions with kmemleak.

  NOMAP regions don't have linear map entries so an attempt to scan
  these areas in kmemleak would fault.

  Prevent such faults by excluding NOMAP regions from kmemleak"

* tag 'fixes-2021-10-16' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock:
  memblock: exclude NOMAP regions from kmemleak
parents 368a978c 6e44bd6d
...@@ -936,7 +936,12 @@ int __init_memblock memblock_mark_mirror(phys_addr_t base, phys_addr_t size) ...@@ -936,7 +936,12 @@ int __init_memblock memblock_mark_mirror(phys_addr_t base, phys_addr_t size)
*/ */
int __init_memblock memblock_mark_nomap(phys_addr_t base, phys_addr_t size) int __init_memblock memblock_mark_nomap(phys_addr_t base, phys_addr_t size)
{ {
return memblock_setclr_flag(base, size, 1, MEMBLOCK_NOMAP); int ret = memblock_setclr_flag(base, size, 1, MEMBLOCK_NOMAP);
if (!ret)
kmemleak_free_part_phys(base, size);
return ret;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment