Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e976e564 authored by Hiraku Toyooka's avatar Hiraku Toyooka Committed by Kees Cook
Browse files

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: default avatarHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Signed-off-by: default avatarNobuhiro Iwamatsu <nobuhiro.iwamatsu.kw@hitachi.com>
Cc: Mark Salyzyn <salyzyn@android.com>
Cc: Seiji Aguchi <seiji.aguchi.tr@hitachi.com>
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 529182e2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -643,11 +643,11 @@ static int ramoops_probe(struct platform_device *pdev)
	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: