Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] ecryptfs: fix crypto_alloc_blkcipher() error check

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

Cc: Mike Halcrow <mhalcrow@us.ibm.com>
Cc: Phillip Hellewell <phillip@hellewell.homeip.net>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Akinobu Mita and committed by
Linus Torvalds
de88777e 3cce4856

+2 -1
+2 -1
fs/ecryptfs/crypto.c
··· 820 820 crypt_stat->tfm = crypto_alloc_blkcipher(full_alg_name, 0, 821 821 CRYPTO_ALG_ASYNC); 822 822 kfree(full_alg_name); 823 - if (!crypt_stat->tfm) { 823 + if (IS_ERR(crypt_stat->tfm)) { 824 + rc = PTR_ERR(crypt_stat->tfm); 824 825 ecryptfs_printk(KERN_ERR, "cryptfs: init_crypt_ctx(): " 825 826 "Error initializing cipher [%s]\n", 826 827 crypt_stat->cipher);