diff options
| -rw-r--r-- | drivers/md/dm-crypt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 3b1a786d65c2..3fd8253ea2df 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c | |||
| @@ -1147,9 +1147,11 @@ static int crypt_convert_block_aead(struct crypt_config *cc, | |||
| 1147 | r = crypto_aead_decrypt(req); | 1147 | r = crypto_aead_decrypt(req); |
| 1148 | } | 1148 | } |
| 1149 | 1149 | ||
| 1150 | if (r == -EBADMSG) | 1150 | if (r == -EBADMSG) { |
| 1151 | DMERR_LIMIT("INTEGRITY AEAD ERROR, sector %llu", | 1151 | char b[BDEVNAME_SIZE]; |
| 1152 | DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu", bio_devname(ctx->bio_in, b), | ||
| 1152 | (unsigned long long)le64_to_cpu(*sector)); | 1153 | (unsigned long long)le64_to_cpu(*sector)); |
| 1154 | } | ||
| 1153 | 1155 | ||
| 1154 | if (!r && cc->iv_gen_ops && cc->iv_gen_ops->post) | 1156 | if (!r && cc->iv_gen_ops && cc->iv_gen_ops->post) |
| 1155 | r = cc->iv_gen_ops->post(cc, org_iv, dmreq); | 1157 | r = cc->iv_gen_ops->post(cc, org_iv, dmreq); |
| @@ -1793,7 +1795,8 @@ static void kcryptd_async_done(struct crypto_async_request *async_req, | |||
| 1793 | error = cc->iv_gen_ops->post(cc, org_iv_of_dmreq(cc, dmreq), dmreq); | 1795 | error = cc->iv_gen_ops->post(cc, org_iv_of_dmreq(cc, dmreq), dmreq); |
| 1794 | 1796 | ||
| 1795 | if (error == -EBADMSG) { | 1797 | if (error == -EBADMSG) { |
| 1796 | DMERR_LIMIT("INTEGRITY AEAD ERROR, sector %llu", | 1798 | char b[BDEVNAME_SIZE]; |
| 1799 | DMERR_LIMIT("%s: INTEGRITY AEAD ERROR, sector %llu", bio_devname(ctx->bio_in, b), | ||
| 1797 | (unsigned long long)le64_to_cpu(*org_sector_of_dmreq(cc, dmreq))); | 1800 | (unsigned long long)le64_to_cpu(*org_sector_of_dmreq(cc, dmreq))); |
| 1798 | io->error = BLK_STS_PROTECTION; | 1801 | io->error = BLK_STS_PROTECTION; |
| 1799 | } else if (error < 0) | 1802 | } else if (error < 0) |
