From: Johannes Weiner <hannes@cmpxchg.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>,
Chas Williams <chas@cmf.nrl.navy.mil>,
Evgeniy Polyakov <johnpol@2ka.mipt.ru>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: [patch 3/7] s390: use kzfree()
Date: Tue, 17 Feb 2009 19:26:18 +0100 [thread overview]
Message-ID: <20090217184135.913080050@cmpxchg.org> (raw)
In-Reply-To: <20090217182615.897042724@cmpxchg.org>
[-- Attachment #1: s390-use-kzfree.patch --]
[-- Type: text/plain, Size: 1224 bytes --]
Use kzfree() instead of memset() + kfree().
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
---
arch/s390/crypto/prng.c | 3 +--
drivers/s390/crypto/zcrypt_pcixcc.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
--- a/arch/s390/crypto/prng.c
+++ b/arch/s390/crypto/prng.c
@@ -201,8 +201,7 @@ out_free:
static void __exit prng_exit(void)
{
/* wipe me */
- memset(p->buf, 0, prng_chunk_size);
- kfree(p->buf);
+ kzfree(p->buf);
kfree(p);
misc_deregister(&prng_dev);
--- a/drivers/s390/crypto/zcrypt_pcixcc.c
+++ b/drivers/s390/crypto/zcrypt_pcixcc.c
@@ -781,8 +781,7 @@ static long zcrypt_pcixcc_send_cprb(stru
/* Signal pending. */
ap_cancel_message(zdev->ap_dev, &ap_msg);
out_free:
- memset(ap_msg.message, 0x0, ap_msg.length);
- kfree(ap_msg.message);
+ kzfree(ap_msg.message);
return rc;
}
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2009-02-17 19:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-17 18:26 [patch 0/7] kzfree() v2 Johannes Weiner
2009-02-17 18:26 ` [patch 1/7] slab: introduce kzfree() Johannes Weiner
2009-02-17 20:06 ` Christoph Lameter
2009-02-18 10:50 ` David Vrabel
2009-02-18 10:54 ` Pekka Enberg
2009-02-19 1:22 ` KOSAKI Motohiro
2009-02-19 9:13 ` Pekka Enberg
2009-02-19 12:12 ` KOSAKI Motohiro
2009-02-19 16:34 ` Hugh Dickins
2009-02-19 18:02 ` Matt Mackall
2009-02-19 18:28 ` Hugh Dickins
2009-02-19 19:45 ` Pekka Enberg
2009-02-19 20:36 ` Hugh Dickins
2009-02-23 14:01 ` Nick Piggin
2009-02-23 14:51 ` Hugh Dickins
2009-02-23 15:07 ` Nick Piggin
2009-02-23 19:42 ` Andrew Morton
2009-02-19 19:48 ` Johannes Weiner
2009-02-17 18:26 ` [patch 2/7] crypto: use kzfree() Johannes Weiner
2009-02-20 4:53 ` Herbert Xu
2009-02-17 18:26 ` Johannes Weiner [this message]
2009-02-17 18:26 ` [patch 4/7] md: " Johannes Weiner
2009-02-17 18:26 ` [patch 5/7] usb: " Johannes Weiner
2009-02-18 10:51 ` David Vrabel
2009-02-17 18:26 ` [patch 6/7] cifs: " Johannes Weiner
2009-02-17 18:26 ` [patch 7/7] ecryptfs: " Johannes Weiner
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=20090217184135.913080050@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=akpm@linux-foundation.org \
--cc=chas@cmf.nrl.navy.mil \
--cc=heiko.carstens@de.ibm.com \
--cc=johnpol@2ka.mipt.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@cs.helsinki.fi \
--cc=schwidefsky@de.ibm.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