Skip to content

Commit 03610bd

Browse files
committed
Merge tag 'block-6.19-20260130' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull block fixes from Jens Axboe: - Fix for an accounting leak in bcache that's been there forever, and a related dead code removal - Revert of a fix for rnbd that went into this series, but depends on other changes that are staged for 7.0 - NVMe pull request via Keith: - TCP target completion race condition fix (Ming) - DMA descriptor cleanup fix (Roger) * tag 'block-6.19-20260130' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: bcache: fix I/O accounting leak in detached_dev_do_request bcache: remove dead code in detached_dev_do_request nvme-pci: DMA unmap the correct regions in nvme_free_sgls Revert "rnbd-clt: fix refcount underflow in device unmap path" nvmet: fix race in nvmet_bio_done() leading to NULL pointer dereference
2 parents 2b54ac9 + 4da7c5c commit 03610bd

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

drivers/block/rnbd/rnbd-clt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,6 +1662,7 @@ static void destroy_sysfs(struct rnbd_clt_dev *dev,
16621662
/* To avoid deadlock firstly remove itself */
16631663
sysfs_remove_file_self(&dev->kobj, sysfs_self);
16641664
kobject_del(&dev->kobj);
1665+
kobject_put(&dev->kobj);
16651666
}
16661667
}
16671668

drivers/md/bcache/request.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,17 +1107,13 @@ static void detached_dev_do_request(struct bcache_device *d,
11071107

11081108
if (bio_op(orig_bio) == REQ_OP_DISCARD &&
11091109
!bdev_max_discard_sectors(dc->bdev)) {
1110+
bio_end_io_acct(orig_bio, start_time);
11101111
bio_endio(orig_bio);
11111112
return;
11121113
}
11131114

11141115
clone_bio = bio_alloc_clone(dc->bdev, orig_bio, GFP_NOIO,
11151116
&d->bio_detached);
1116-
if (!clone_bio) {
1117-
orig_bio->bi_status = BLK_STS_RESOURCE;
1118-
bio_endio(orig_bio);
1119-
return;
1120-
}
11211117

11221118
ddip = container_of(clone_bio, struct detached_dev_io_private, bio);
11231119
/* Count on the bcache device */

drivers/nvme/host/pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,8 @@ static void nvme_unmap_data(struct request *req)
806806
if (!blk_rq_dma_unmap(req, dma_dev, &iod->dma_state, iod->total_len,
807807
map)) {
808808
if (nvme_pci_cmd_use_sgl(&iod->cmd))
809-
nvme_free_sgls(req, iod->descriptors[0],
810-
&iod->cmd.common.dptr.sgl, attrs);
809+
nvme_free_sgls(req, &iod->cmd.common.dptr.sgl,
810+
iod->descriptors[0], attrs);
811811
else
812812
nvme_free_prps(req, attrs);
813813
}

drivers/nvme/target/io-cmd-bdev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,10 @@ u16 blk_to_nvme_status(struct nvmet_req *req, blk_status_t blk_sts)
180180
static void nvmet_bio_done(struct bio *bio)
181181
{
182182
struct nvmet_req *req = bio->bi_private;
183+
blk_status_t blk_status = bio->bi_status;
183184

184-
nvmet_req_complete(req, blk_to_nvme_status(req, bio->bi_status));
185185
nvmet_req_bio_put(req, bio);
186+
nvmet_req_complete(req, blk_to_nvme_status(req, blk_status));
186187
}
187188

188189
#ifdef CONFIG_BLK_DEV_INTEGRITY

0 commit comments

Comments
 (0)