ramoops: use persistent_ram_free() instead of kfree() for freeing prz
authorHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Mon, 25 Jul 2016 03:56:55 +0000 (12:56 +0900)
committerKees Cook <keescook@chromium.org>
Fri, 5 Aug 2016 18:21:46 +0000 (11:21 -0700)
commite976e56423dc1cc01686861fc3e0c6c0ec8cd8b7
tree2b107f2129d208c11138db2dda271a6d62979439
parent529182e204db083cb7bda832d1c5c6d9278ba1cb
ramoops: use persistent_ram_free() instead of kfree() for freeing prz

persistent_ram_zone(=prz) structures are allocated by persistent_ram_new(),
which includes vmap() or ioremap(). But they are currently freed by
kfree(). This uses persistent_ram_free() for correct this asymmetry usage.

Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com>
Cc: Mark Salyzyn <salyzyn@android.com>
Cc: Seiji Aguchi <seiji.aguchi.tr@hitachi.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/ram.c