diff options
author | 2025-01-20 16:29:47 +0800 | |
---|---|---|
committer | 2025-01-21 13:25:09 +0100 | |
commit | 7c88f7cfab553016a1b02a38ba261d9ac3750b6a (patch) | |
tree | 0b0c30ffb47db234e68050aef79ab773a862fd33 /scripts/lib/kdoc/kdoc_files.py | |
parent | dm-crypt: set atomic as false when calling crypt_convert() in kworker (diff) | |
download | linux-rng-7c88f7cfab553016a1b02a38ba261d9ac3750b6a.tar.xz linux-rng-7c88f7cfab553016a1b02a38ba261d9ac3750b6a.zip |
dm-crypt: fully initialize clone->bi_iter in crypt_alloc_buffer()
Both kcryptd_io_read() and kcryptd_crypt_write_convert() will invoke
crypt_alloc_buffer() to allocate a new bio. Both of these two callers
initialize bi_iter.bi_sector for the new bio separatedly after
crypt_alloc_buffer() returns. However, kcryptd_crypt_write_convert()
will copy the bi_iter of the new bio into ctx.iter_out or ctx.iter_in.
Although it doesn't incur any harm now, it is better to fully initialize
bi_iter before it is used.
Therefore, initialize bi_iter.bi_sector in crypt_alloc_buffer() instead.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions