linux-stable/block
Martin K. Petersen af1881903e block: bio-integrity: Copy flags when bio_integrity_payload is cloned
[ Upstream commit b6a4bdcda4 ]

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: aae7df5019 ("block: Integrity checksum flag")
Fixes: b1f0138857 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 16:26:35 +01:00
..
partitions
badblocks.c
bfq-cgroup.c block, bfq: fix overwrite of bfq_group pointer in bfq_find_set_group() 2020-04-02 16:34:15 +02:00
bfq-iosched.c block, bfq: protect 'bfqd->queued' by 'bfqd->lock' 2022-11-10 15:47:22 +01:00
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c block: bio-integrity: Copy flags when bio_integrity_payload is cloned 2023-03-11 16:26:35 +01:00
bio.c block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern 2022-06-06 08:20:57 +02:00
blk-cgroup.c blk-cgroup: Pre-allocate tree node on blkg_conf_prep 2020-11-10 10:29:05 +01:00
blk-core.c block: ensure bdi->io_pages is always initialized 2020-09-12 13:39:11 +02:00
blk-exec.c
blk-flush.c
blk-integrity.c
blk-ioc.c block: Fix use-after-free issue accessing struct io_cq 2020-04-24 08:00:28 +02:00
blk-lib.c
blk-map.c
blk-merge.c block: don't use bio->bi_vcnt to figure out segment number 2020-01-27 14:46:19 +01:00
blk-mq-cpumap.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c blk-mq: fix possible memleak when register 'hctx' failed 2023-01-18 09:26:32 +01:00
blk-mq-tag.c blk-mq: Allow blocking queue tag iter callbacks 2020-04-13 10:34:23 +02:00
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: Swap two calls in blk_mq_exit_queue() 2021-05-22 10:57:40 +02:00
blk-mq.h
blk-settings.c blk-settings: align max_sectors on "logical_block_size" boundary 2021-03-03 18:22:50 +01:00
blk-softirq.c
blk-stat.c
blk-stat.h
blk-sysfs.c
blk-tag.c
blk-throttle.c blk-throttle: fix UAF by deleteing timer in blk_throtl_exit() 2021-09-26 13:37:30 +02:00
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c blk-zoned: allow BLKREPORTZONE without CAP_SYS_ADMIN 2021-09-22 11:45:24 +02:00
blk.h
bounce.c
bsg-lib.c
bsg.c
cfq-iosched.c
cmdline-parser.c
compat_ioctl.c block/compat_ioctl: fix range check in BLKGETSIZE 2022-04-27 13:15:31 +02:00
deadline-iosched.c
elevator.c
genhd.c block: fix use-after-free in disk_part_iter_next 2021-01-17 13:59:01 +01:00
ioctl.c
ioprio.c block: fix ioprio_get(IOPRIO_WHO_PGRP) vs setuid(2) 2021-12-14 10:16:55 +01:00
Kconfig
Kconfig.iosched
kyber-iosched.c
Makefile
mq-deadline.c
noop-iosched.c
opal_proto.h
partition-generic.c block: unhash blkdev part inode when the part is deleted 2023-01-18 09:26:05 +01:00
scsi_ioctl.c
sed-opal.c block: sed-opal: kmalloc the cmd/resp buffers 2022-11-25 17:36:49 +01:00
t10-pi.c