RE: [PATCH v1] KVM: destruct kvm_io_device while unregistering it from kvm_io_bus

From: Wang, Wei W
Date: Tue Jan 24 2023 - 21:42:41 EST


On Wednesday, January 25, 2023 4:55 AM, Sean Christopherson wrote:
> >
> > I was wondering: would it make sense to simplify from
> > list_for_each_entry_safe() to list_for_each_entry() in this loop?
>
> Ooh, yeah, that's super confusing, at least to me, because the "safe" part
> implies that the loop processes entries after kvm_io_bus_unregister_dev(),
> i.e. needs to guard against failure same as the coalesced MMIO case.
>
> Wei, want to tack on a patch in v2?

Yes. I will include it in v2.