[PATCH v2] nvmet: Fix fatal_err_work deadlock
Sagi Grimberg
sagi at grimberg.me
Tue Oct 24 00:31:14 PDT 2017
>> 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.
>
> Yes, and the way I understand flush_work that is perfectly fine for
> flush_work, just not for cancel_work_sync.
Really?
My understanding is that flush_work() is inserting a barrier work
into the worker running the work right after the running work and waits
for it to complete.
How will the barrier complete without the current work completing?
James, can you give it a shot?
More information about the Linux-nvme
mailing list