[PATCH v3 06/16] nvme-fc: Do not wait in vain when unloading module
Christoph Hellwig
hch at lst.de
Mon Dec 18 20:35:14 PST 2023
On Mon, Dec 18, 2023 at 04:30:54PM +0100, Daniel Wagner wrote:
> The module unload code will wait for a controller to be delete even when
> there is no controller and we wait for completion forever to happen.
> Thus only wait for the completion when there is a controller which
> needs to be removed.
This whole code looks fishy to me, and I suspect this patch only papers
over it. Why do we this wait to start with? If we've found that out and
documented it, the code really should be using a wait_event variant that
checks for the actual condition (no more controllers), because without
that you might still have a race otherwise.
More information about the Linux-nvme
mailing list