Denis Kirjanov
cb2d3883c6
powerpc/msi: Free the bitmap if it was slab allocated
During the MSI bitmap test on boot kmemleak spews the following trace:
unreferenced object 0xc00000016e86c900 (size 64):
comm "swapper/0", pid 1, jiffies 4294893173 (age 518.024s)
hex dump (first 32 bytes):
00 00 01 ff 7f ff 7f 37 00 00 00 00 00 00 00 00
.......7........
ff ff ff ff ff ff ff ff 01 ff ff ff ff
ff ff ff
................
backtrace:
[<c00000000003eebc>] .zalloc_maybe_bootmem+0x3c/0x380
[<c000000000042d6c>] .msi_bitmap_alloc+0x3c/0xb0
[<c000000000a9aff8>] .msi_bitmap_selftest+0x30/0x2b4
[<c0000000000090f4>] .do_one_initcall+0xd4/0x270
[<c000000000a8e250>] .kernel_init_freeable+0x1a0/0x280
[<c000000000009b5c>] .kernel_init+0x1c/0x120
[<c000000000007fbc>] .ret_from_kernel_thread+0x58/0x9c
Add a flag to msi_bitmap for tracking allocations from slab and memblock
so we can properly free/handle memory in msi_bitmap_free().
Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
[mpe: Reword changelog & use bitmap_from_slab in the if]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2015-10-05 21:32:50 +11:00
..
2015-09-16 15:47:51 +02:00
2015-09-16 15:47:51 +02:00
2015-09-15 17:06:28 +02:00
2012-07-11 14:18:22 +10:00
2015-09-08 14:35:59 -07:00
2013-06-20 16:55:08 +10:00
2015-09-16 15:43:10 +02:00
2010-03-04 10:43:58 -06:00
2010-04-19 23:13:03 -05:00
2015-08-07 22:59:20 -05:00
2015-07-13 10:10:55 +10:00
2015-03-31 14:19:47 +11:00
2015-07-30 00:14:36 +02:00
2012-07-26 13:24:32 -05:00
2012-03-16 14:50:25 -05:00
2014-10-20 16:20:13 +02:00
2013-11-07 10:34:46 -06:00
2015-06-16 14:12:34 -04:00
2012-09-12 14:57:10 -05:00
2013-07-01 18:38:42 -05:00
2015-09-10 17:27:08 +10:00
2015-03-23 19:51:18 -05:00
2015-08-07 13:58:05 +02:00
2014-03-19 22:37:44 -05:00
2014-10-20 16:20:13 +02:00
2014-12-14 16:10:09 -08:00
2014-11-12 23:56:16 -06:00
2014-05-22 18:08:13 -05:00
2014-11-10 09:59:34 +11:00
2013-10-30 22:56:10 +01:00
2011-07-12 09:28:04 -05:00
2015-07-30 00:14:36 +02:00
2015-01-29 19:56:15 -06:00
2015-09-16 15:43:11 +02:00
2012-02-14 14:06:50 -07:00
2014-05-01 08:26:30 +10:00
2015-05-11 19:55:25 +10:00
2014-06-25 18:49:40 -05:00
2011-06-10 14:55:36 +02:00
2014-11-10 09:59:34 +11:00
2015-09-16 15:43:11 +02:00
2014-10-20 16:20:13 +02:00
2013-10-24 11:42:51 +01:00
2014-01-09 17:52:14 -06:00
2015-09-10 17:27:08 +10:00
2015-09-16 15:47:51 +02:00
2015-05-11 19:55:25 +10:00
2015-10-05 21:32:50 +11:00
2014-09-25 23:14:46 +10:00
2013-01-03 15:57:04 -08:00
2015-05-11 16:58:20 +10:00
2014-01-16 16:31:31 +00:00
2013-10-09 20:04:11 -05:00
2014-10-20 16:20:13 +02:00
2014-11-10 09:59:34 +11:00
2010-07-05 16:14:30 -06:00
2015-09-03 16:41:38 -07:00
2015-09-10 17:27:08 +10:00
2013-12-10 11:25:04 +11:00
2014-11-10 09:59:26 +11:00
2011-12-09 07:51:02 -05:00
2013-10-09 20:04:11 -05:00
2013-07-15 11:25:01 +09:30
2013-11-06 14:13:50 +11:00
2011-10-31 19:30:44 -04:00
2012-03-28 18:30:02 +01:00
2015-09-16 15:47:51 +02:00
2014-01-15 13:46:44 +11:00
2015-09-16 15:47:51 +02:00
2015-09-16 15:47:51 +02:00
2014-09-25 23:14:46 +10:00