diff options
| author | Hou Tao <houtao1@huawei.com> | 2025-01-20 16:29:51 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-17 11:36:31 +0100 |
| commit | 1d03c85cf9ebfd452596a1b6972d051cea6f34a2 (patch) | |
| tree | 308009c1c5c4eb85c67c95d1d692b798c2d54400 /arch/mips/math-emu/cp1emu.c | |
| parent | 895698621b6fa1dc49e983457a1c99f29ba7f763 (diff) | |
| download | linux-1d03c85cf9ebfd452596a1b6972d051cea6f34a2.tar.gz linux-1d03c85cf9ebfd452596a1b6972d051cea6f34a2.tar.bz2 linux-1d03c85cf9ebfd452596a1b6972d051cea6f34a2.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/mips/math-emu/cp1emu.c')
0 files changed, 0 insertions, 0 deletions
