summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorMaurizio Lombardi <mlombard@redhat.com>2026-09-15 11:58:27 +0200
committerKeith Busch <kbusch@kernel.org>2026-09-25 08:06:20 -0700
commitc20bba234f3e1dcd81f7a2ec21ea7bf01a4cf35f (patch)
tree52dd770232cf42ec24c1822bb055ac63f1ccd53d /tools/perf/scripts/python/stackcollapse.py
parent447a7a3026eda85ac2738cbe6ee5ab066a39dad0 (diff)
downloadlinux-next-c20bba234f3e1dcd81f7a2ec21ea7bf01a4cf35f.tar.gz
linux-next-c20bba234f3e1dcd81f7a2ec21ea7bf01a4cf35f.zip
nvme: do not reset controllers in NVME_CTRL_NEW state
During NVMe controller creation, the controller is exposed to sysfs via nvme_add_ctrl() while it is still in the NVME_CTRL_NEW state. This creates a narrow race window where a userspace process can write to the reset_controller sysfs node before the initialization thread transitions the state to NVME_CTRL_CONNECTING. If a reset is triggered during this window, the state machine allows the transition from NVME_CTRL_NEW to NVME_CTRL_RESETTING, and the reset work is queued. However, the original creation thread continues its execution, subsequently moving the state to NVME_CTRL_CONNECTING and finally to NVME_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 now NVME_CTRL_LIVE, this transition fails, triggering a WARN_ON in the reset work. Fix this by removing NVME_CTRL_NEW from the allowed prior states for the NVME_CTRL_RESETTING transition. Fixes: 8bfc3b4c6f9d ("nvmet: switch loopback target state to connecting when resetting") Reported-by: syzbot+4a1d521d19d6321f5aad@syzkaller.appspotmail.com Reviewed-by: Daniel Wagner <dwagner@suse.de> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions