From: Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>
To: linux-kernel@vger.kernel.org
Cc: Tony Luck <tony.luck@intel.com>,
Kees Cook <keescook@chromium.org>,
Seiji Aguchi <seiji.aguchi.tr@hitachi.com>,
Mark Salyzyn <salyzyn@android.com>,
Anton Vorontsov <anton@enomsg.org>,
Colin Cross <ccross@android.com>
Subject: [PATCH 1/5] ramoops: use persistent_ram_free() instead of kfree() for freeing prz
Date: Thu, 05 Nov 2015 11:36:47 +0900 [thread overview]
Message-ID: <20151105023647.3367.56607.stgit@arietta> (raw)
In-Reply-To: <20151105023644.3367.94795.stgit@arietta>
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:
next prev parent reply other threads:[~2015-11-05 2:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 2:36 [PATCH 0/5] pstore: ramoops: support multiple pmsg instances Hiraku Toyooka
2015-11-05 2:36 ` Hiraku Toyooka [this message]
2015-11-05 2:36 ` [PATCH 2/5] ramoops: introduce generic init/free functions for prz Hiraku Toyooka
2015-11-05 2:36 ` [PATCH 3/5] pstore: support multiple pmsg instances Hiraku Toyooka
2015-11-05 2:36 ` [PATCH 4/5] ramoops: " Hiraku Toyooka
2015-11-05 2:36 ` [PATCH 5/5] selftests/pstore: add testcases for " Hiraku Toyooka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151105023647.3367.56607.stgit@arietta \
--to=hiraku.toyooka.gu@hitachi.com \
--cc=anton@enomsg.org \
--cc=ccross@android.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=salyzyn@android.com \
--cc=seiji.aguchi.tr@hitachi.com \
--cc=tony.luck@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).