@@ -424,7 +424,8 @@ static int crypt_iv_lmk_ctr(struct crypt_config *cc, struct dm_target *ti,
424
424
return - EINVAL ;
425
425
}
426
426
427
- lmk -> hash_tfm = crypto_alloc_shash ("md5" , 0 , 0 );
427
+ lmk -> hash_tfm = crypto_alloc_shash ("md5" , 0 ,
428
+ CRYPTO_ALG_ALLOCATES_MEMORY );
428
429
if (IS_ERR (lmk -> hash_tfm )) {
429
430
ti -> error = "Error initializing LMK hash" ;
430
431
return PTR_ERR (lmk -> hash_tfm );
@@ -586,7 +587,8 @@ static int crypt_iv_tcw_ctr(struct crypt_config *cc, struct dm_target *ti,
586
587
return - EINVAL ;
587
588
}
588
589
589
- tcw -> crc32_tfm = crypto_alloc_shash ("crc32" , 0 , 0 );
590
+ tcw -> crc32_tfm = crypto_alloc_shash ("crc32" , 0 ,
591
+ CRYPTO_ALG_ALLOCATES_MEMORY );
590
592
if (IS_ERR (tcw -> crc32_tfm )) {
591
593
ti -> error = "Error initializing CRC32 in TCW" ;
592
594
return PTR_ERR (tcw -> crc32_tfm );
@@ -773,7 +775,8 @@ static int crypt_iv_elephant_ctr(struct crypt_config *cc, struct dm_target *ti,
773
775
struct iv_elephant_private * elephant = & cc -> iv_gen_private .elephant ;
774
776
int r ;
775
777
776
- elephant -> tfm = crypto_alloc_skcipher ("ecb(aes)" , 0 , 0 );
778
+ elephant -> tfm = crypto_alloc_skcipher ("ecb(aes)" , 0 ,
779
+ CRYPTO_ALG_ALLOCATES_MEMORY );
777
780
if (IS_ERR (elephant -> tfm )) {
778
781
r = PTR_ERR (elephant -> tfm );
779
782
elephant -> tfm = NULL ;
@@ -2154,7 +2157,8 @@ static int crypt_alloc_tfms_skcipher(struct crypt_config *cc, char *ciphermode)
2154
2157
return - ENOMEM ;
2155
2158
2156
2159
for (i = 0 ; i < cc -> tfms_count ; i ++ ) {
2157
- cc -> cipher_tfm .tfms [i ] = crypto_alloc_skcipher (ciphermode , 0 , 0 );
2160
+ cc -> cipher_tfm .tfms [i ] = crypto_alloc_skcipher (ciphermode , 0 ,
2161
+ CRYPTO_ALG_ALLOCATES_MEMORY );
2158
2162
if (IS_ERR (cc -> cipher_tfm .tfms [i ])) {
2159
2163
err = PTR_ERR (cc -> cipher_tfm .tfms [i ]);
2160
2164
crypt_free_tfms (cc );
@@ -2180,7 +2184,8 @@ static int crypt_alloc_tfms_aead(struct crypt_config *cc, char *ciphermode)
2180
2184
if (!cc -> cipher_tfm .tfms )
2181
2185
return - ENOMEM ;
2182
2186
2183
- cc -> cipher_tfm .tfms_aead [0 ] = crypto_alloc_aead (ciphermode , 0 , 0 );
2187
+ cc -> cipher_tfm .tfms_aead [0 ] = crypto_alloc_aead (ciphermode , 0 ,
2188
+ CRYPTO_ALG_ALLOCATES_MEMORY );
2184
2189
if (IS_ERR (cc -> cipher_tfm .tfms_aead [0 ])) {
2185
2190
err = PTR_ERR (cc -> cipher_tfm .tfms_aead [0 ]);
2186
2191
crypt_free_tfms (cc );
@@ -2667,7 +2672,7 @@ static int crypt_ctr_auth_cipher(struct crypt_config *cc, char *cipher_api)
2667
2672
return - ENOMEM ;
2668
2673
strncpy (mac_alg , start , end - start );
2669
2674
2670
- mac = crypto_alloc_ahash (mac_alg , 0 , 0 );
2675
+ mac = crypto_alloc_ahash (mac_alg , 0 , CRYPTO_ALG_ALLOCATES_MEMORY );
2671
2676
kfree (mac_alg );
2672
2677
2673
2678
if (IS_ERR (mac ))
0 commit comments