Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1262831 > unrolled thread

[PATCH 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz

Started byHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
First post2015-11-05 03:40 +0100
Last post2015-11-05 03:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/5] ramoops: use persistent_ram_free() instead of kfree()  for freeing prz Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com> - 2015-11-05 03:40 +0100

#1262831 — [PATCH 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz

FromHiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Date2015-11-05 03:40 +0100
Subject[PATCH 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz
Message-ID<qriCZ-v7-1@gated-at.bofh.it>
persistent_ram_zone(=prz) structures are allocated by
persistent_ram_new(), which includes vmap() or ioremap(). But they
are currently freed by kfree(). We should use persistent_ram_free()
to correct this asymmetry usage.

Signed-off-by: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
Cc: Anton Vorontsov <anton@enomsg.org>
Cc: Colin Cross <ccross@android.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mark Salyzyn <salyzyn@android.com>
Cc: Seiji Aguchi <seiji.aguchi.tr@hitachi.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-kernel@vger.kernel.org
---
 fs/pstore/ram.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index 6c26c4d..6363768 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -567,11 +567,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:

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web