From: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
To: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
Eric Biederman <ebiederm@xmission.com>
Cc: Michal Marek <mmarek@suse.cz>,
Herbert Xu <herbert@gondor.apana.org.au>,
Gilles Muller <Gilles.Muller@lip6.fr>,
Nicolas Palix <nicolas.palix@imag.fr>,
Julia Lawall <Julia.Lawall@lip6.fr>,
linux-crypto@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: [PATCH 2/2] kernel/kexec: free crypto_shash using crypto_free_shash
Date: Mon, 17 Nov 2014 18:14:26 +0400 [thread overview]
Message-ID: <20141117151426.10739.86414.stgit@buzz> (raw)
In-Reply-To: <20141117151420.10739.16342.stgit@buzz>
These objects have special freeing functions which cares about
proper destruction and reference counting.
Signed-off-by: Konstantin Khlebnikov <k.khlebnikov@samsung.com>
---
kernel/kexec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/kexec.c b/kernel/kexec.c
index 2abf9f6..5a62311 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -2286,7 +2286,7 @@ out_free_sha_regions:
out_free_desc:
kfree(desc);
out_free_tfm:
- kfree(tfm);
+ crypto_free_shash(tfm);
out:
return ret;
}
next prev parent reply other threads:[~2014-11-17 15:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-17 14:14 [PATCH 1/2] scripts/coccinelle: catch freeing cryptographic structures via kfree Konstantin Khlebnikov
2014-11-17 14:14 ` Konstantin Khlebnikov [this message]
2014-11-17 15:30 ` Julia Lawall
2014-11-17 15:40 ` Konstantin Khlebnikov
2014-11-18 10:50 ` [PATCH 1/2 v2] " Konstantin Khlebnikov
2014-11-19 9:41 ` Julia Lawall
2014-11-19 15:06 ` Konstantin Khlebnikov
2014-11-23 16:45 ` Julia Lawall
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=20141117151426.10739.86414.stgit@buzz \
--to=k.khlebnikov@samsung.com \
--cc=Gilles.Muller@lip6.fr \
--cc=Julia.Lawall@lip6.fr \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=herbert@gondor.apana.org.au \
--cc=kexec@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=nicolas.palix@imag.fr \
/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).