diff options
author | Hou Tao <houtao1@huawei.com> | 2025-01-20 16:29:47 +0800 |
---|---|---|
committer | Mikulas Patocka <mpatocka@redhat.com> | 2025-01-21 13:25:09 +0100 |
commit | 7c88f7cfab553016a1b02a38ba261d9ac3750b6a (patch) | |
tree | 0b0c30ffb47db234e68050aef79ab773a862fd33 /net/lapb/lapb_out.c | |
parent | 6fd2cb38c006cbdc4653e7e15e37ab23af59c2de (diff) |
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 'net/lapb/lapb_out.c')
0 files changed, 0 insertions, 0 deletions