Skip to content

Commit 2a32897

Browse files
Mikulas PatockaMike Snitzer
authored andcommitted
dm crypt: fix crypt_ctr_cipher_new return value on invalid AEAD cipher
If the user specifies invalid AEAD cipher, dm-crypt should return the error returned from crypt_ctr_auth_spec, not -ENOMEM. Signed-off-by: Mikulas Patocka <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent ef6953f commit 2a32897

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-crypt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2908,7 +2908,7 @@ static int crypt_ctr_cipher_new(struct dm_target *ti, char *cipher_in, char *key
29082908
ret = crypt_ctr_auth_cipher(cc, cipher_api);
29092909
if (ret < 0) {
29102910
ti->error = "Invalid AEAD cipher spec";
2911-
return -ENOMEM;
2911+
return ret;
29122912
}
29132913
}
29142914

0 commit comments

Comments
 (0)