Skip to content

Commit 97720d9

Browse files
committed
Merge: nvme: fix reconnection fail due to reserved tag allocation
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/4443 # Merge Request Required Information JIRA: https://issues.redhat.com/browse/RHEL-36896 CVE: CVE-2024-27435 ## Summary of Changes ## Approved Development Ticket All submissions to CentOS Stream must reference an approved ticket in [Red Hat Jira](https://issues.redhat.com/). Please follow the CentOS Stream [contribution documentation](https://docs.centos.org/en-US/stream-contrib/quickstart/) for how to file this ticket and have it approved. Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Approved-by: John Meneghini <jmeneghi@redhat.com> Approved-by: Chris Leech <cleech@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Approved-by: Tomas Henzl <thenzl@redhat.com> Merged-by: Lucas Zampieri <lzampier@redhat.com>
2 parents 1d43b00 + 0b2ac5a commit 97720d9

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

drivers/nvme/host/core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4384,7 +4384,8 @@ int nvme_alloc_admin_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set,
43844384
set->ops = ops;
43854385
set->queue_depth = NVME_AQ_MQ_TAG_DEPTH;
43864386
if (ctrl->ops->flags & NVME_F_FABRICS)
4387-
set->reserved_tags = NVMF_RESERVED_TAGS;
4387+
/* Reserved for fabric connect and keep alive */
4388+
set->reserved_tags = 2;
43884389
set->numa_node = ctrl->numa_node;
43894390
set->flags = BLK_MQ_F_NO_SCHED;
43904391
if (ctrl->ops->flags & NVME_F_BLOCKING)
@@ -4453,7 +4454,8 @@ int nvme_alloc_io_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set,
44534454
if (ctrl->quirks & NVME_QUIRK_SHARED_TAGS)
44544455
set->reserved_tags = NVME_AQ_DEPTH;
44554456
else if (ctrl->ops->flags & NVME_F_FABRICS)
4456-
set->reserved_tags = NVMF_RESERVED_TAGS;
4457+
/* Reserved for fabric connect */
4458+
set->reserved_tags = 1;
44574459
set->numa_node = ctrl->numa_node;
44584460
set->flags = BLK_MQ_F_SHOULD_MERGE;
44594461
if (ctrl->ops->flags & NVME_F_BLOCKING)

drivers/nvme/host/fabrics.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
/* default is -1: the fail fast mechanism is disabled */
1919
#define NVMF_DEF_FAIL_FAST_TMO -1
2020

21-
/*
22-
* Reserved one command for internal usage. This command is used for sending
23-
* the connect command, as well as for the keep alive command on the admin
24-
* queue once live.
25-
*/
26-
#define NVMF_RESERVED_TAGS 1
27-
2821
/*
2922
* Define a host as seen by the target. We allocate one at boot, but also
3023
* allow the override it when creating controllers. This is both to provide

0 commit comments

Comments
 (0)