Patch "nvme: do not reset controllers in NVME_CTRL_NEW state" has been added to the 6.6-stable tree
A message that is not in the archive (sent off-list or not yet received): [email protected]
Sasha,
Please remove this patch from the stable trees.
A regression has been reported and this patch must be reverted.
https://lore.kernel.org/linux-nvme/[email protected]/T/#mff8a81bd072a044c77e85070e754532d969155b2
Thanks.
po 5. 10. 2026 v 8:37 odesílatel Sasha Levin <[email protected]> napsal:
Quoted 65 lines
This is a note to let you know that I've just added the patch titled
nvme: do not reset controllers in
NVME_CTRL_NEWstateto the 6.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summaryThe filename of the patch is:
nvme-do-not-reset-controllers-in-nvme_ctrl_new-state.patch
and it can be found in the queue-6.6 subdirectory.If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
commit
03198f12b3bd565406a3549fe54e2eac163ff506Author: Maurizio Lombardi <[email protected]> Date: Tue Sep 15 11:58:27 2026 +0200nvme: do not reset controllers in
NVME_CTRL_NEWstate[ Upstream commit
c20bba234f3e1dcd81f7a2ec21ea7bf01a4cf35f]During NVMe controller creation, the controller is exposed to sysfs via
nvme_add_ctrl()while it is still in theNVME_CTRL_NEWstate. This creates a narrow race window where a userspace process can write to thereset_controllersysfs node before the initialization thread transitions the state toNVME_CTRL_CONNECTING.If a reset is triggered during this window, the state machine allows the transition from
NVME_CTRL_NEWtoNVME_CTRL_RESETTING, and the reset work is queued. However, the original creation thread continues its execution, subsequently moving the state toNVME_CTRL_CONNECTINGand finally toNVME_CTRL_LIVE.When the delayed reset work finally executes, it attempts to tear down the controller and transition the state to
NVME_CTRL_CONNECTING. Because the state is nowNVME_CTRL_LIVE, this transition fails, triggering aWARN_ONin the reset work.Fix this by removing
NVME_CTRL_NEWfrom the allowed prior states for theNVME_CTRL_RESETTINGtransition.Fixes 8bfc3b4c6f9d ("nvmet: switch loopback target state to connecting when resetting")Reported-by [email protected]Reviewed-by Daniel Wagner <[email protected]>Signed-off-by Maurizio Lombardi <[email protected]>Signed-off-by Keith Busch <[email protected]>Signed-off-by Sasha Levin <[email protected]>drivers/nvme/host/core.c +0
-1@@ -512,7 +512,6 @@ bool nvme_change_ctrl_state(struct nvme_ctrl *ctrl,break ;case NVME_CTRL_RESETTING :switch (old_state) { -case NVME_CTRL_NEW :case NVME_CTRL_LIVE : changed = true; fallthrough;
Sasha Levin
maintainerQuoted 3 lines
Please remove this patch from the stable trees.
A regression has been reported and this patch must be reverted.
Dropped from all trees (7.2, 6.18, 6.12, 6.6, 6.1, 5.15 and 5.10). It stays out until upstream has a fix or a revert.
Signature · 2 lines
Thanks, Sasha