Commit:     459e216429a04779216b61f0fb61938a459fd1ca
Parent:     60af880339aae440293a0c8e93178fdcb41f8a29
Author:     Eric Sandeen <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 17 16:19:52 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Dec 17 19:28:15 2007 -0800

    ecryptfs: initialize new auth_tokens before teardown
    ecryptfs_destroy_mount_crypt_stat() checks whether each
    auth_tok->global_auth_tok_key is nonzero and if so puts that key.  However,
    in some early mount error paths nothing has initialized the pointer, and we
    try to key_put() garbage.  Running the bad cipher tests in the testsuite
    exposes this, and it's happy with the following change.
    Signed-off-by: Eric Sandeen <[EMAIL PROTECTED]>
    Cc: Michael Halcrow <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/ecryptfs/keystore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index 263fed8..f458c1f 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -1860,7 +1860,7 @@ ecryptfs_add_global_auth_tok(struct 
ecryptfs_mount_crypt_stat *mount_crypt_stat,
        struct ecryptfs_global_auth_tok *new_auth_tok;
        int rc = 0;
-       new_auth_tok = kmem_cache_alloc(ecryptfs_global_auth_tok_cache,
+       new_auth_tok = kmem_cache_zalloc(ecryptfs_global_auth_tok_cache,
        if (!new_auth_tok) {
                rc = -ENOMEM;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to