Skip to content

Commit 61c33bb

Browse files
committed
block: bio-integrity: Copy flags when bio_integrity_payload is cloned
jira LE-1907 Rebuild_History Non-Buildable kernel-rt-5.14.0-284.30.1.rt14.315.el9_2 commit-author Martin K. Petersen <[email protected]> commit b6a4bdc Make sure to copy the flags when a bio_integrity_payload is cloned. Otherwise per-I/O properties such as IP checksum flag will not be passed down to the HBA driver. Since the integrity buffer is owned by the original bio, the BIP_BLOCK_INTEGRITY flag needs to be masked off to avoid a double free in the completion path. Fixes: aae7df5 ("block: Integrity checksum flag") Fixes: b1f0138 ("block: Relocate bio integrity flags") Reported-by: Saurav Kashyap <[email protected]> Tested-by: Saurav Kashyap <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]> (cherry picked from commit b6a4bdc) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 9e5bd42 commit 61c33bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

block/bio-integrity.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
418418

419419
bip->bip_vcnt = bip_src->bip_vcnt;
420420
bip->bip_iter = bip_src->bip_iter;
421+
bip->bip_flags = bip_src->bip_flags & ~BIP_BLOCK_INTEGRITY;
421422

422423
return 0;
423424
}

0 commit comments

Comments
 (0)