Patch "block: bio-integrity: Copy flags when bio_integrity_payload is cloned" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    block: bio-integrity: Copy flags when bio_integrity_payload is cloned

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     block-bio-integrity-copy-flags-when-bio_integrity_pa.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1124ee417f33588958f27849f0364f73e5464afc
Author: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Date:   Wed Feb 15 12:18:01 2023 -0500

    block: bio-integrity: Copy flags when bio_integrity_payload is cloned
    
    [ Upstream commit b6a4bdcda430e3ca43bbb9cb1d4d4d34ebe15c40 ]
    
    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: aae7df50190a ("block: Integrity checksum flag")
    Fixes: b1f01388574c ("block: Relocate bio integrity flags")
    Reported-by: Saurav Kashyap <skashyap@xxxxxxxxxxx>
    Tested-by: Saurav Kashyap <skashyap@xxxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230215171801.21062-1-martin.petersen@xxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 3f5685c00e360..91ffee6fc8cb4 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -418,6 +418,7 @@ int bio_integrity_clone(struct bio *bio, struct bio *bio_src,
 
 	bip->bip_vcnt = bip_src->bip_vcnt;
 	bip->bip_iter = bip_src->bip_iter;
+	bip->bip_flags = bip_src->bip_flags & ~BIP_BLOCK_INTEGRITY;
 
 	return 0;
 }



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux