[PATCH v2] nvmet: Fix fatal_err_work deadlock
Sagi Grimberg
sagi at grimberg.me
Mon Oct 23 04:05:08 PDT 2017
> The whole point of the flush_work suggestion was that we should not
> require offloading the deleting to another workqueue for it.
Regardless of flush_work or cancel_work_sync, its a deadlock
in fc.
in rdma/loop we always call ->free_ctrl from a different context.
In rdma we do that from the rdma_cm context, in loop we schedule
host side delete on nvme_wq, in fc apparently we can get to
free_ctrl directly from that context.
If fatal_err_work calls ->delete_ctrl() and that in turn gets to put the
last reference on the ctrl it will end up in ->free_ctrl() under
fatal_err_work context which will then try to flush fatal_err_work.
More information about the Linux-nvme
mailing list