summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>2016-07-25 12:56:55 +0900
committerKees Cook <keescook@chromium.org>2016-08-05 11:21:46 -0700
commite976e56423dc1cc01686861fc3e0c6c0ec8cd8b7 (patch)
tree2b107f2129d208c11138db2dda271a6d62979439 /fs
parent529182e204db083cb7bda832d1c5c6d9278ba1cb (diff)
downloadlinux-e976e56423dc1cc01686861fc3e0c6c0ec8cd8b7.tar.bz2
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/pstore/ram.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 427eee7570bb..7a034d62cf8c 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -643,11 +643,11 @@ fail_buf:
kfree(cxt->pstore.buf);
fail_clear:
cxt->pstore.bufsize = 0;
- kfree(cxt->mprz);
+ persistent_ram_free(cxt->mprz);
fail_init_mprz:
- kfree(cxt->fprz);
+ persistent_ram_free(cxt->fprz);
fail_init_fprz:
- kfree(cxt->cprz);
+ persistent_ram_free(cxt->cprz);
fail_init_cprz:
ramoops_free_przs(cxt);
fail_out: