diff options
| author | Mikulas Patocka <[email protected]> | 2023-12-05 15:39:16 +0000 |
|---|---|---|
| committer | Mike Snitzer <[email protected]> | 2023-12-18 18:11:05 +0000 |
| commit | b86f4b790c998afdbc88fe1aa55cfe89c4068726 (patch) | |
| tree | 1a09a97a61269b74a4d0bb4ec2c86bd072118ffd /tools/net/ynl/generated/devlink-user.c | |
| parent | dm-raid: delay flushing event_work() after reconfig_mutex is released (diff) | |
| download | kernel-b86f4b790c998afdbc88fe1aa55cfe89c4068726.tar.gz kernel-b86f4b790c998afdbc88fe1aa55cfe89c4068726.zip | |
dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
__bio_for_each_segment assumes that the first struct bio_vec argument
doesn't change - it calls "bio_advance_iter_single((bio), &(iter),
(bvl).bv_len)" to advance the iterator. Unfortunately, the dm-integrity
code changes the bio_vec with "bv.bv_len -= pos". When this code path
is taken, the iterator would be out of sync and dm-integrity would
report errors. This happens if the machine is out of memory and
"kmalloc" fails.
Fix this bug by making a copy of "bv" and changing the copy instead.
Fixes: 7eada909bfd7 ("dm: add integrity target")
Cc: [email protected] # v4.12+
Signed-off-by: Mikulas Patocka <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Diffstat (limited to 'tools/net/ynl/generated/devlink-user.c')
0 files changed, 0 insertions, 0 deletions
