summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2025-01-20 16:29:51 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-17 10:05:19 +0100
commit68a25ceb11cd1c4b2bfa2bfb9f02ffe2f8b39391 (patch)
tree3d111c37d48272c6cedc01bef3d0868f4403e81c /arch
parentd0b81ea5a513fd66e5ac881c0f85af86e0304f88 (diff)
downloadlinux-68a25ceb11cd1c4b2bfa2bfb9f02ffe2f8b39391.tar.gz
linux-68a25ceb11cd1c4b2bfa2bfb9f02ffe2f8b39391.tar.bz2
linux-68a25ceb11cd1c4b2bfa2bfb9f02ffe2f8b39391.zip
dm-crypt: track tag_offset in convert_context
commit 8b8f8037765757861f899ed3a2bfb34525b5c065 upstream. dm-crypt uses tag_offset to index the integrity metadata for each crypt sector. When the initial crypt_convert() returns BLK_STS_DEV_RESOURCE, dm-crypt will try to continue the crypt/decrypt procedure in a kworker. However, it resets tag_offset as zero instead of using the tag_offset related with current sector. It may return unexpected data when using random IV or return unexpected integrity related error. Fix the problem by tracking tag_offset in per-IO convert_context. Therefore, when the crypt/decrypt procedure continues in a kworker, it could use the next tag_offset saved in convert_context. Fixes: 8abec36d1274 ("dm crypt: do not wait for backlogged crypto request completion in softirq") Cc: stable@vger.kernel.org Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions