From: Hiraku Toyooka Date: Mon, 25 Jul 2016 03:56:55 +0000 (+0900) Subject: ramoops: use persistent_ram_free() instead of kfree() for freeing prz X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e976e56423dc1cc01686861fc3e0c6c0ec8cd8b7;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Nobuhiro Iwamatsu Cc: Mark Salyzyn Cc: Seiji Aguchi Signed-off-by: Kees Cook --- 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: