On 24.10.2022 18:01, Roger Pau Monné wrote: > On Mon, Oct 24, 2022 at 01:04:01PM +0200, Jan Beulich wrote: >> Furthermore msix_find() iterates over d->arch.hvm.msix_tables, which >> looks to only ever be added to. Doesn't this list need pruning by >> vpci_remove_device()? I've noticed this only because of looking at >> derefs of ->vpci in msix.c - I don't think I can easily see that all >> of those derefs are once again immune to a pdev losing its ->vpci. > > I think you are correct, we are missing a > list_del(&pdev->vpci->msix->next) in vpci_remove_device(). We will > however have locking issues with this, as msix_find() doesn't take any > locks, neither do it's callers. I guess this will be fixed as part of > the lager add vPCI locking series. Will add another patch to the > series with the MSIX table removal.
But the locking issue the isn't new then: List insertion can also disturb msix_find(), can't it? Jan
