Skip to content

Commit 88ad6ef

Browse files
committed
block: bio-integrity: Copy flags when bio_integrity_payload is cloned
jira LE-1907 Rebuild_History Non-Buildable kernel-5.14.0-284.30.1.el9_2 commit-author Martin K. Petersen <martin.petersen@oracle.com> 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 <skashyap@marvell.com> Tested-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20230215171801.21062-1-martin.petersen@oracle.com Signed-off-by: Jens Axboe <axboe@kernel.dk> (cherry picked from commit b6a4bdc) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent f43fd24 commit 88ad6ef

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)