[PATCH] nvmet-fc: don't drop the last assoc reference in nvmet_fc_delete_ctrl()
Keith Busch
kbusch at kernel.org
Tue Oct 13 08:42:47 PDT 2026
On Thu, Oct 08, 2026 at 08:18:48PM +0100, Palla Raghunath wrote:
> syzbot hit a recursive locking report on subsys->lock when a subsystem
> is unlinked from an FC port.
>
> nvmet_port_del_ctrls() holds subsys->lock while it calls ->delete_ctrl()
> for each controller. nvmet_fc_delete_ctrl() grabs a reference on the
> association, queues del_work and then drops the reference. If del_work
> gets to run to completion before that put, ours is the last reference.
> Freeing the assoc tears down the queues, the last nvmet_cq_put() drops
> the last ctrl reference, and nvmet_ctrl_free() goes for subsys->lock
> again:
Thanks, applied to nvme-7.4.
More information about the Linux-nvme
mailing list