Skip to content

Commit 2680efd

Browse files
committed
Merge tag 'nvme-6.16-2025-07-17' of git://git.infradead.org/nvme into block-6.16
Pull NVMe fixes from Christoph: "- revert the cross-controller atomic write size validation that caused regressions (Christoph Hellwig) - fix endianness of command word prints in nvme_log_err_passthru() (John Garry) - fix callback lock for TLS handshake (Maurizio Lombardi) - fix misaccounting of nvme-mpath inflight I/O (Yu Kuai) - fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list() (Zheng Qixing)" * tag 'nvme-6.16-2025-07-17' of git://git.infradead.org/nvme: nvmet-tcp: fix callback lock for TLS handshake nvme: fix misaccounting of nvme-mpath inflight I/O nvme: revert the cross-controller atomic write size validation nvme: fix endianness of command word prints in nvme_log_err_passthru() nvme: fix inconsistent RCU list manipulation in nvme_ns_add_to_ctrl_list()
2 parents c4706c5 + 0523c6c commit 2680efd

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

drivers/nvme/host/core.c

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -381,12 +381,12 @@ static void nvme_log_err_passthru(struct request *req)
381381
nr->status & NVME_SC_MASK, /* Status Code */
382382
nr->status & NVME_STATUS_MORE ? "MORE " : "",
383383
nr->status & NVME_STATUS_DNR ? "DNR " : "",
384-
nr->cmd->common.cdw10,
385-
nr->cmd->common.cdw11,
386-
nr->cmd->common.cdw12,
387-
nr->cmd->common.cdw13,
388-
nr->cmd->common.cdw14,
389-
nr->cmd->common.cdw15);
384+
le32_to_cpu(nr->cmd->common.cdw10),
385+
le32_to_cpu(nr->cmd->common.cdw11),
386+
le32_to_cpu(nr->cmd->common.cdw12),
387+
le32_to_cpu(nr->cmd->common.cdw13),
388+
le32_to_cpu(nr->cmd->common.cdw14),
389+
le32_to_cpu(nr->cmd->common.cdw15));
390390
}
391391

392392
enum nvme_disposition {
@@ -764,6 +764,10 @@ blk_status_t nvme_fail_nonready_command(struct nvme_ctrl *ctrl,
764764
!test_bit(NVME_CTRL_FAILFAST_EXPIRED, &ctrl->flags) &&
765765
!blk_noretry_request(rq) && !(rq->cmd_flags & REQ_NVME_MPATH))
766766
return BLK_STS_RESOURCE;
767+
768+
if (!(rq->rq_flags & RQF_DONTPREP))
769+
nvme_clear_nvme_request(rq);
770+
767771
return nvme_host_path_error(rq);
768772
}
769773
EXPORT_SYMBOL_GPL(nvme_fail_nonready_command);
@@ -3537,15 +3541,6 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
35373541
if (ret)
35383542
goto out_free;
35393543
}
3540-
3541-
if (le16_to_cpu(id->awupf) != ctrl->subsys->awupf) {
3542-
dev_err_ratelimited(ctrl->device,
3543-
"inconsistent AWUPF, controller not added (%u/%u).\n",
3544-
le16_to_cpu(id->awupf), ctrl->subsys->awupf);
3545-
ret = -EINVAL;
3546-
goto out_free;
3547-
}
3548-
35493544
memcpy(ctrl->subsys->firmware_rev, id->fr,
35503545
sizeof(ctrl->subsys->firmware_rev));
35513546

@@ -4077,7 +4072,7 @@ static void nvme_ns_add_to_ctrl_list(struct nvme_ns *ns)
40774072
return;
40784073
}
40794074
}
4080-
list_add(&ns->list, &ns->ctrl->namespaces);
4075+
list_add_rcu(&ns->list, &ns->ctrl->namespaces);
40814076
}
40824077

40834078
static void nvme_alloc_ns(struct nvme_ctrl *ctrl, struct nvme_ns_info *info)

drivers/nvme/target/tcp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1928,10 +1928,10 @@ static void nvmet_tcp_alloc_queue(struct nvmet_tcp_port *port,
19281928
struct sock *sk = queue->sock->sk;
19291929

19301930
/* Restore the default callbacks before starting upcall */
1931-
read_lock_bh(&sk->sk_callback_lock);
1931+
write_lock_bh(&sk->sk_callback_lock);
19321932
sk->sk_user_data = NULL;
19331933
sk->sk_data_ready = port->data_ready;
1934-
read_unlock_bh(&sk->sk_callback_lock);
1934+
write_unlock_bh(&sk->sk_callback_lock);
19351935
if (!nvmet_tcp_try_peek_pdu(queue)) {
19361936
if (!nvmet_tcp_tls_handshake(queue))
19371937
return;

0 commit comments

Comments
 (0)