diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2016-11-06 23:31:10 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2016-11-06 23:31:10 -0800 |
commit | d6c7f8ac7b17995a9ec714e55d70d9f337eeac61 (patch) | |
tree | 2e1fe96499843f9ee1a2c80c687dcc5eaddb434b /crypto/crypto_null.c | |
parent | 2fc3750b483ab74709f99072ac6ccc5ea9f0ae13 (diff) | |
parent | 736d25df198dddeec82f61fee130f7d0e4212a9c (diff) | |
download | linux-crypto-d6c7f8ac7b17995a9ec714e55d70d9f337eeac61.tar.gz linux-crypto-d6c7f8ac7b17995a9ec714e55d70d9f337eeac61.zip |
Merge tag 'v4.9-rc3' into xtensa-for-next
Linux 4.9-rc3
Diffstat (limited to 'crypto/crypto_null.c')
-rw-r--r-- | crypto/crypto_null.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c index 941c9a43..20ff2c74 100644 --- a/crypto/crypto_null.c +++ b/crypto/crypto_null.c @@ -26,7 +26,7 @@ #include <linux/string.h> static DEFINE_MUTEX(crypto_default_null_skcipher_lock); -static struct crypto_blkcipher *crypto_default_null_skcipher; +static struct crypto_skcipher *crypto_default_null_skcipher; static int crypto_default_null_skcipher_refcnt; static int null_compress(struct crypto_tfm *tfm, const u8 *src, @@ -153,15 +153,16 @@ MODULE_ALIAS_CRYPTO("compress_null"); MODULE_ALIAS_CRYPTO("digest_null"); MODULE_ALIAS_CRYPTO("cipher_null"); -struct crypto_blkcipher *crypto_get_default_null_skcipher(void) +struct crypto_skcipher *crypto_get_default_null_skcipher(void) { - struct crypto_blkcipher *tfm; + struct crypto_skcipher *tfm; mutex_lock(&crypto_default_null_skcipher_lock); tfm = crypto_default_null_skcipher; if (!tfm) { - tfm = crypto_alloc_blkcipher("ecb(cipher_null)", 0, 0); + tfm = crypto_alloc_skcipher("ecb(cipher_null)", + 0, CRYPTO_ALG_ASYNC); if (IS_ERR(tfm)) goto unlock; @@ -181,7 +182,7 @@ void crypto_put_default_null_skcipher(void) { mutex_lock(&crypto_default_null_skcipher_lock); if (!--crypto_default_null_skcipher_refcnt) { - crypto_free_blkcipher(crypto_default_null_skcipher); + crypto_free_skcipher(crypto_default_null_skcipher); crypto_default_null_skcipher = NULL; } mutex_unlock(&crypto_default_null_skcipher_lock); |