Skip to content

Commit

Permalink
dm crypt: Initialize crypto wait structures
Browse files Browse the repository at this point in the history
Use the DECLARE_CRYPTO_WAIT() macro to properly initialize the crypto
wait structures declared on stack before their use with
crypto_wait_req().

Fixes: 39d13a1 ("dm crypt: reuse eboiv skcipher for IV generation")
Fixes: bbb1658 ("dm crypt: Implement Elephant diffuser for Bitlocker compatibility")
Cc: [email protected]
Signed-off-by: Damien Le Moal <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
  • Loading branch information
damien-lemoal authored and snitm committed Sep 1, 2020
1 parent c322ee9 commit 7785a9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ static int crypt_iv_eboiv_gen(struct crypt_config *cc, u8 *iv,
u8 buf[MAX_CIPHER_BLOCKSIZE] __aligned(__alignof__(__le64));
struct skcipher_request *req;
struct scatterlist src, dst;
struct crypto_wait wait;
DECLARE_CRYPTO_WAIT(wait);
int err;

req = skcipher_request_alloc(any_tfm(cc), GFP_NOIO);
Expand Down Expand Up @@ -936,7 +936,7 @@ static int crypt_iv_elephant(struct crypt_config *cc, struct dm_crypt_request *d
u8 *es, *ks, *data, *data2, *data_offset;
struct skcipher_request *req;
struct scatterlist *sg, *sg2, src, dst;
struct crypto_wait wait;
DECLARE_CRYPTO_WAIT(wait);
int i, r;

req = skcipher_request_alloc(elephant->tfm, GFP_NOIO);
Expand Down

0 comments on commit 7785a9e

Please sign in to comment.