On 15.01.2024 20:43, Stewart Hildebrand wrote:
> @@ -1043,11 +1043,11 @@ static int __pci_enable_msix(struct pci_dev *pdev,
> struct msi_info *msi,
> {
> struct msi_desc *old_desc;
>
> - ASSERT(pcidevs_locked());
> -
> if ( !pdev || !pdev->msix )
> return -ENODEV;
>
> + ASSERT(pcidevs_locked() || rw_is_locked(&pdev->domain->pci_lock));
> +
> if ( msi->entry_nr >= pdev->msix->nr_entries )
> return -EINVAL;
Further looking at this - is dereferencing pdev actually safe without holding
the global lock?
Jan