commit de88777e6942de76410ad2eb2858f5fbb6eb9c35
tree 825106cd3660dd473920008669c07fa209b85d98
parent 3cce4856ff3dfa663b1a168dab48120d70820da6
author Akinobu Mita <[EMAIL PROTECTED]> 1164745789 -0800
committer Linus Torvalds <[EMAIL PROTECTED]> 1164763610 -0800

[PATCH] ecryptfs: fix crypto_alloc_blkcipher() error check

The return value of crypto_alloc_blkcipher() should be checked by IS_ERR().

Cc: Mike Halcrow <[EMAIL PROTECTED]>
Cc: Phillip Hellewell <[EMAIL PROTECTED]>
Signed-off-by: Akinobu Mita <[EMAIL PROTECTED]>
Cc: Herbert Xu <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 fs/ecryptfs/crypto.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index 136175a..f63a775 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -820,7 +820,8 @@ int ecryptfs_init_crypt_ctx(struct ecryp
        crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0,
                                                 CRYPTO_ALG_ASYNC);
        kfree(full_alg_name);
-       if (!crypt_stat->tfm) {
+       if (IS_ERR(crypt_stat->tfm)) {
+               rc = PTR_ERR(crypt_stat->tfm);
                ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): "
                                "Error initializing cipher [%s]\n",
                                crypt_stat->cipher);
-
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  http://vger.kernel.org/majordomo-info.html

Reply via email to