Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0543148 authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

dm crypt: fix error return code in crypt_ctr()



commit 3cc2e57c upstream.

Fix to return error code -ENOMEM from the mempool_create_kmalloc_pool()
error handling case instead of 0, as done elsewhere in this function.

Fixes: ef43aa38 ("dm crypt: add cryptographic data integrity protection (authenticated encryption)")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 82e12f1b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2746,6 +2746,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
			cc->tag_pool_max_sectors * cc->on_disk_tag_size);
		if (!cc->tag_pool) {
			ti->error = "Cannot allocate integrity tags mempool";
			ret = -ENOMEM;
			goto bad;
		}