Skip to content

Commit d3eeb99

Browse files
committed
Merge tag 'block-6.19-20260116' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull block fixes from Jens Axboe: - NVMe pull request via Keith: - Device quirk to disable faulty temperature (Ilikara) - TCP target null pointer fix from bad host protocol usage (Shivam) - Add apple,t8103-nvme-ans2 as a compatible apple controller (Janne) - FC tagset leak fix (Chaitanya) - TCP socket deadlock fix (Hannes) - Target name buffer overrun fix (Shin'ichiro) - Fix for an underflow for rnbd during device unmap - Zero the non-PI part of the auto integrity buffer - Fix for a configfs memory leak in the null block driver * tag 'block-6.19-20260116' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: rnbd-clt: fix refcount underflow in device unmap path nvme: fix PCIe subsystem reset controller state transition nvmet: do not copy beyond sybsysnqn string length nvmet-tcp: fixup hang in nvmet_tcp_listen_data_ready() null_blk: fix kmemleak by releasing references to fault configfs items block: zero non-PI portion of auto integrity buffer nvme-fc: release admin tagset if init fails nvme-apple: add "apple,t8103-nvme-ans2" as compatible nvme-tcp: fix NULL pointer dereferences in nvmet_tcp_build_pdu_iovec nvme-pci: disable secondary temp for Wodposit WPBSNM8
2 parents 216c7a0 + ec19ed2 commit d3eeb99

File tree

8 files changed

+38
-10
lines changed

8 files changed

+38
-10
lines changed

block/bio-integrity-auto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ bool bio_integrity_prep(struct bio *bio)
140140
return true;
141141
set_flags = false;
142142
gfp |= __GFP_ZERO;
143-
} else if (bi->csum_type == BLK_INTEGRITY_CSUM_NONE)
143+
} else if (bi->metadata_size > bi->pi_tuple_size)
144144
gfp |= __GFP_ZERO;
145145
break;
146146
default:

drivers/block/null_blk/main.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,12 +665,22 @@ static void nullb_add_fault_config(struct nullb_device *dev)
665665
configfs_add_default_group(&dev->init_hctx_fault_config.group, &dev->group);
666666
}
667667

668+
static void nullb_del_fault_config(struct nullb_device *dev)
669+
{
670+
config_item_put(&dev->init_hctx_fault_config.group.cg_item);
671+
config_item_put(&dev->requeue_config.group.cg_item);
672+
config_item_put(&dev->timeout_config.group.cg_item);
673+
}
674+
668675
#else
669676

670677
static void nullb_add_fault_config(struct nullb_device *dev)
671678
{
672679
}
673680

681+
static void nullb_del_fault_config(struct nullb_device *dev)
682+
{
683+
}
674684
#endif
675685

676686
static struct
@@ -702,7 +712,7 @@ nullb_group_drop_item(struct config_group *group, struct config_item *item)
702712
null_del_dev(dev->nullb);
703713
mutex_unlock(&lock);
704714
}
705-
715+
nullb_del_fault_config(dev);
706716
config_item_put(item);
707717
}
708718

drivers/block/rnbd/rnbd-clt.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,6 @@ 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);
16661665
}
16671666
}
16681667

drivers/nvme/host/apple.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,7 @@ static const struct apple_nvme_hw apple_nvme_t8103_hw = {
17041704

17051705
static const struct of_device_id apple_nvme_of_match[] = {
17061706
{ .compatible = "apple,t8015-nvme-ans2", .data = &apple_nvme_t8015_hw },
1707+
{ .compatible = "apple,t8103-nvme-ans2", .data = &apple_nvme_t8103_hw },
17071708
{ .compatible = "apple,nvme-ans2", .data = &apple_nvme_t8103_hw },
17081709
{},
17091710
};

drivers/nvme/host/fc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3587,6 +3587,8 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
35873587

35883588
ctrl->ctrl.opts = NULL;
35893589

3590+
if (ctrl->ctrl.admin_tagset)
3591+
nvme_remove_admin_tag_set(&ctrl->ctrl);
35903592
/* initiate nvme ctrl ref counting teardown */
35913593
nvme_uninit_ctrl(&ctrl->ctrl);
35923594

drivers/nvme/host/pci.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1532,7 +1532,10 @@ static int nvme_pci_subsystem_reset(struct nvme_ctrl *ctrl)
15321532
}
15331533

15341534
writel(NVME_SUBSYS_RESET, dev->bar + NVME_REG_NSSR);
1535-
nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE);
1535+
1536+
if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_CONNECTING) ||
1537+
!nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE))
1538+
goto unlock;
15361539

15371540
/*
15381541
* Read controller status to flush the previous write and trigger a
@@ -3999,6 +4002,8 @@ static const struct pci_device_id nvme_id_table[] = {
39994002
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
40004003
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
40014004
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
4005+
{ PCI_DEVICE(0x1fa0, 0x2283), /* Wodposit WPBSNM8-256GTP */
4006+
.driver_data = NVME_QUIRK_NO_SECONDARY_TEMP_THRESH, },
40024007
{ PCI_DEVICE(0x025e, 0xf1ac), /* SOLIDIGM P44 pro SSDPFKKW020X7 */
40034008
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
40044009
{ PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */

drivers/nvme/target/passthru.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static u16 nvmet_passthru_override_id_ctrl(struct nvmet_req *req)
150150
* code path with duplicate ctrl subsysnqn. In order to prevent that we
151151
* mask the passthru-ctrl subsysnqn with the target ctrl subsysnqn.
152152
*/
153-
memcpy(id->subnqn, ctrl->subsys->subsysnqn, sizeof(id->subnqn));
153+
strscpy(id->subnqn, ctrl->subsys->subsysnqn, sizeof(id->subnqn));
154154

155155
/* use fabric id-ctrl values */
156156
id->ioccsz = cpu_to_le32((sizeof(struct nvme_command) +

drivers/nvme/target/tcp.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,18 @@ static int nvmet_tcp_handle_h2c_data_pdu(struct nvmet_tcp_queue *queue)
982982
pr_err("H2CData PDU len %u is invalid\n", cmd->pdu_len);
983983
goto err_proto;
984984
}
985+
/*
986+
* Ensure command data structures are initialized. We must check both
987+
* cmd->req.sg and cmd->iov because they can have different NULL states:
988+
* - Uninitialized commands: both NULL
989+
* - READ commands: cmd->req.sg allocated, cmd->iov NULL
990+
* - WRITE commands: both allocated
991+
*/
992+
if (unlikely(!cmd->req.sg || !cmd->iov)) {
993+
pr_err("queue %d: H2CData PDU received for invalid command state (ttag %u)\n",
994+
queue->idx, data->ttag);
995+
goto err_proto;
996+
}
985997
cmd->pdu_recv = 0;
986998
nvmet_tcp_build_pdu_iovec(cmd);
987999
queue->cmd = cmd;
@@ -1992,14 +2004,13 @@ static void nvmet_tcp_listen_data_ready(struct sock *sk)
19922004

19932005
trace_sk_data_ready(sk);
19942006

2007+
if (sk->sk_state != TCP_LISTEN)
2008+
return;
2009+
19952010
read_lock_bh(&sk->sk_callback_lock);
19962011
port = sk->sk_user_data;
1997-
if (!port)
1998-
goto out;
1999-
2000-
if (sk->sk_state == TCP_LISTEN)
2012+
if (port)
20012013
queue_work(nvmet_wq, &port->accept_work);
2002-
out:
20032014
read_unlock_bh(&sk->sk_callback_lock);
20042015
}
20052016

0 commit comments

Comments
 (0)