Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795042299; b=5qgq28D3hnpPrhqRn7rxAB7Um88ennxyvfoGU6X9RTKQDRXwyejlOciE/CxbGl+HzDpN zR9tULJeEDIH8ZC4ntjzVzJsLYEeQsF5CJ6DeU3az0PCK4fMhR91hmXT76Lr1XVBSaw24 vRAHn9UdWE7JAFVKISVnluwwphkRS67HbUd6A6edN9CjJH58SoCvUjZ1BhtYbMfNV+UD1 E94/JuKrm4hW7FxWyVl1711TZBnAg6lCBYS1IQHyErzdg10ykKIc5ejpF7iOp25Sgpv97 SMDyyYl46Z/wItKecEdXcJNkKwghBkGoWJO2JZO9YnUaUD8lVkdjn6lYc639RTzMumg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795042299; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=dH0p0PYBGjLVMtKPB55jn38AXVDktMuMZmhEOxHfAA0=; b=FRhXQczDKuUZ8p6CRD9NZELcgkx6qqTcDYQFxAgaYbcAefF2IWYQui/Ofqmb0n9PdNLM FtdxfVEZWGiyzRlecKtXp22pquf+b2ZC7AAHm+jis+Wrd9YKv6BA/+I2sMp+Zvvxif5Ix KMbv1cDhgtz3KWx7gBxv5nr3xCIzL0vUqo4aye68yafxdwqDh75iq4HpSzFINhnvNQ0QK 3q7aqfmx3P9WGHdWkqE0VAto4wT6udsXbuuXze3MaTqyobuAO5Fi2CqhjbWKk511DQBGe nvQAWl6IVLKtk6hKcjh7daCiY1EFR1cR7rKhduSW9OIVdwco49R6BjdO1d0uDVi+WtQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=gSMozAtq; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93AC7606A325; Wed, 18 Nov 2026 22:51:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=gSMozAtq Received: by smtp.kernel.org (Postfix) with ESMTPSA id E04F41F000C4; Wed, 18 Nov 2026 22:51:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795042299; bh=dH0p0PYBGjLVMtKPB55jn38AXVDktMuMZmhEOxHfAA0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gSMozAtq0Od5+HQazX0TGsOpFEiTg+PXfFICKh9QOJLgSeChKwPpKX+AucVFOYu2P px9Kmz242ZAsUuIIwm9b5U1/xfkBMPoPMsPZeS5a0Bjfraup43X4yfGiGCu6DPoHRC MEV4B11AbCDfK59UBclB9sq0rLe+ISPRkWvX8Lew= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Hannes Reinecke , Maurizio Lombardi , Daniel Wagner , Keith Busch , Sasha Levin Subject: [PATCH 6.6 3122/3318] nvme-fabrics: clear the poll map if no poll queues are mapped Date: Wed, 18 Nov 2026 16:02:24 +0100 Message-ID: <20261118150453.593893975@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150313.527275416@linuxfoundation.org> References: <20261118150313.527275416@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Wagner [ Upstream commit 36ede1aa85d5d74c39ed375a906f6eadb15cee5b ] blk_mq_alloc_tag_set sets the nr_queues of every map to nr_hw_queues. When nr_poll_queues is set but no queues are left for polling, nvmf_map_queues skips the poll map and leaves it this way, with all CPUs mapped to hctx 0. The queue then claims poll support, polled I/O ends up on hctx 0, which isn't a poll queue, and hctx 0 is marked as a poll hctx, so even the Connect command of the first I/O queue is marked as polled. Clear the poll map when no poll queues are mapped, so polled I/O is rejected with -EOPNOTSUPP. Fixes: 1a9460cef571 ("nvme-tcp: support simple polling") Fixes: 5651cd3c4336 ("nvme-rdma: fix queue mapping when queue count is limited") Reviewed-by: Hannes Reinecke Tested-by: Maurizio Lombardi Signed-off-by: Daniel Wagner Signed-off-by: Keith Busch Signed-off-by: Sasha Levin --- drivers/nvme/host/fabrics.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/nvme/host/fabrics.c b/drivers/nvme/host/fabrics.c index 7c1c712308014..9dbc2789e84af 100644 --- a/drivers/nvme/host/fabrics.c +++ b/drivers/nvme/host/fabrics.c @@ -1090,6 +1090,13 @@ void nvmf_map_queues(struct blk_mq_tag_set *set, struct nvme_ctrl *ctrl, io_queues[HCTX_TYPE_DEFAULT] + io_queues[HCTX_TYPE_READ]; blk_mq_map_queues(&set->map[HCTX_TYPE_POLL]); + } else { + /* + * blk_mq_alloc_tag_set sets nr_queues of all maps to + * nr_hw_queues. Clear the poll map, otherwise the queue claims + * poll support and polled I/O ends up on hctx 0. + */ + set->map[HCTX_TYPE_POLL].nr_queues = 0; } dev_info(ctrl->device, -- 2.53.0