Re: [PATCH v3] powerpc: msi: mark bitmap with kmemleak_not_leak()
From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2015-09-17 09:25:45
From: Catalin Marinas <catalin.marinas@arm.com>
Date: 2015-09-17 09:25:45
On Wed, Sep 16, 2015 at 10:26:14PM +0300, Denis Kirjanov wrote:
During the MSI bitmap test on boot kmemleak spews the following trace:
=20
unreferenced object 0xc00000016e86c900 (size 64):
comm "swapper/0", pid 1, jiffies 4294893173 (age 518.024s)
hex dump (first 32 bytes):
=0900 00 01 ff 7f ff 7f 37 00 00 00 00 00 00 00 00
=09.......7........
=09ff ff ff ff ff ff ff ff 01 ff ff ff ff
=09ff ff ff
=09................
=09backtrace:
=09[<c00000000003eebc>] .zalloc_maybe_bootmem+0x3c/0x380
=09[<c000000000042d6c>] .msi_bitmap_alloc+0x3c/0xb0
=09[<c000000000a9aff8>] .msi_bitmap_selftest+0x30/0x2b4
=09[<c0000000000090f4>] .do_one_initcall+0xd4/0x270
=09[<c000000000a8e250>] .kernel_init_freeable+0x1a0/0x280
=09[<c000000000009b5c>] .kernel_init+0x1c/0x120
=09[<c000000000007fbc>] .ret_from_kernel_thread+0x58/0x9c
=20
Added a flag to msi_bitmap for tracking allocations
from slab and memblock so we can properly free/handle
memory in msi_bitmap_free().
=20
Signed-off-by: Denis Kirjanov <redacted>Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>