diff options
author | Yanjiang Jin <yanjiang.jin@windriver.com> | 2015-02-27 13:30:34 +0800 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-03-26 15:23:17 +1100 |
commit | e77553cb21adabb7680930e7b20c578cec7ae5a8 (patch) | |
tree | d0be2da988ce69a2e5ba5b972c1bf07f60197833 /drivers/reset/Makefile | |
parent | 288a298c05774dde0a8d5abac9b692503d4e41f2 (diff) |
powerpc/mm: Free string after creating kmem cache
kmem_cache_create()->kmem_cache_create_memcg()->kstrdup() allocates new
space and copys name's content, so it is safe to free name memory after
calling kmem_cache_create(). Else kmemleak will report the below
warning:
unreferenced object 0xc0000000f9002160 (size 16):
comm "swapper/0", pid 0, jiffies 4294892296 (age 1386.640s)
hex dump (first 16 bytes):
70 67 74 61 62 6c 65 2d 32 5e 39 00 de ad be ef pgtable-2^9.....
backtrace:
[<c0000000004e03ec>] .kvasprintf+0x5c/0xa0
[<c0000000004e045c>] .kasprintf+0x2c/0x50
[<c00000000002e36c>] .pgtable_cache_add+0xac/0x100
[<c00000000002e3e4>] .pgtable_cache_init+0x24/0x80
[<c000000000c6c67c>] .start_kernel+0x228/0x4c8
[<c000000000000594>] .start_here_common+0x24/0x90
Signed-off-by: Yanjiang Jin <yanjiang.jin@windriver.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/reset/Makefile')
0 files changed, 0 insertions, 0 deletions