linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [patch 7/8] ecryptfs: use kzfree()
Date: Tue, 17 Feb 2009 01:51:24 -0600	[thread overview]
Message-ID: <499A6C7C.9060106@linux.vnet.ibm.com> (raw)
In-Reply-To: <20090216144726.088020837@cmpxchg.org>

[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]

Johannes Weiner wrote:
> Use kzfree() instead of memset() + kfree().
> 
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Tyler Hicks <tyhicks@linux.vnet.ibm.com>

Acked-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>

Thanks for kzfree() and the updates to eCryptfs - I will put it to use
in the future.

> ---
>  fs/ecryptfs/keystore.c  |    3 +--
>  fs/ecryptfs/messaging.c |    3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> --- a/fs/ecryptfs/keystore.c
> +++ b/fs/ecryptfs/keystore.c
> @@ -740,8 +740,7 @@ ecryptfs_write_tag_70_packet(char *dest,
>  out_release_free_unlock:
>  	crypto_free_hash(s->hash_desc.tfm);
>  out_free_unlock:
> -	memset(s->block_aligned_filename, 0, s->block_aligned_filename_size);
> -	kfree(s->block_aligned_filename);
> +	kzfree(s->block_aligned_filename);
>  out_unlock:
>  	mutex_unlock(s->tfm_mutex);
>  out:
> --- a/fs/ecryptfs/messaging.c
> +++ b/fs/ecryptfs/messaging.c
> @@ -291,8 +291,7 @@ int ecryptfs_exorcise_daemon(struct ecry
>  	if (daemon->user_ns)
>  		put_user_ns(daemon->user_ns);
>  	mutex_unlock(&daemon->mux);
> -	memset(daemon, 0, sizeof(*daemon));
> -	kfree(daemon);
> +	kzfree(daemon);
>  out:
>  	return rc;
>  }
> 
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  parent reply	other threads:[~2009-02-17  7:51 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-16 14:29 [patch 0/8] kzfree() Johannes Weiner
2009-02-16 14:29 ` [patch 1/8] slab: introduce kzfree() Johannes Weiner
2009-02-16 15:27   ` Johannes Weiner
2009-02-17 15:08     ` Christoph Lameter
2009-02-17 15:51       ` Pekka Enberg
2009-02-17 16:01         ` Christoph Lameter
2009-02-16 14:29 ` [patch 2/8] crypto: use kzfree() Johannes Weiner
2009-02-16 14:29 ` [patch 3/8] s390: " Johannes Weiner
2009-02-16 14:29 ` [patch 4/8] md: " Johannes Weiner
2009-02-16 14:29 ` [patch 5/8] usb: " Johannes Weiner
2009-02-16 14:29 ` [patch 6/8] cifs: " Johannes Weiner
2009-02-16 15:13   ` Pekka Enberg
2009-02-16 15:33     ` Johannes Weiner
2009-02-16 18:17       ` Pekka Enberg
2009-02-16 19:01       ` Steve French
2009-02-16 19:02       ` Steve French
2009-02-16 14:29 ` [patch 7/8] ecryptfs: " Johannes Weiner
2009-02-16 20:02   ` Andrew Morton
2009-02-16 20:28     ` Johannes Weiner
2009-02-17  7:51   ` Tyler Hicks [this message]
2009-02-16 14:29 ` [patch 8/8] atm: " Johannes Weiner
2009-02-16 19:59 ` [patch 0/8] kzfree() Andrew Morton
2009-02-16 19:58   ` Pekka Enberg
2009-02-16 20:19     ` Andrew Morton

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=499A6C7C.9060106@linux.vnet.ibm.com \
    --to=tyhicks@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@cs.helsinki.fi \
    /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).