On Thu, 8 Aug 2024 14:12:34 +0300 Ilias Apalodimas wrote:
In any case why do you want to hold on the IOMMU? The network
interface -- at least in theory -- should be down and we wont be
processing any more packets.
I should have you a link to Yonglong's report:
https://lore.kernel.org/all/8743264a-9700-4227-a556-5f931c720211@huawei.com/ (local)
we get_device() hoping that it will keep the IOMMU machinery active
(even if the device won't use the page we need to unmap it when it's
freed), but it sounds like IOMMU dies when driver is unbound. Even if
there are outstanding references to the device.
I occasionally hit this problem reloading drivers during development,
TBH, too. And we have been told we "use the API wrong" so let's fix
it on our end?..