Hi Roger, Roger Pau Monné <[email protected]> writes:
> On Tue, Aug 29, 2023 at 11:19:42PM +0000, Volodymyr Babchuk wrote: >> From: Oleksandr Andrushchenko <[email protected]> >> >> Use a previously introduced per-domain read/write lock to check >> whether vpci is present, so we are sure there are no accesses to the >> contents of the vpci struct if not. This lock can be used (and in a >> few cases is used right away) so that vpci removal can be performed >> while holding the lock in write mode. Previously such removal could >> race with vpci_read for example. >> >> When taking both d->pci_lock and pdev->vpci->lock they are should be > > When taking both d->pci_lock and pdev->vpci->lock the order should be > ... > >> taken in this exact order: d->pci_lock then pdev->vpci->lock to avoid >> possible deadlock situations. >> Will it be better to write like this: "When taking both d->pci_lock and pdev->vpci->lock, they should be taken in this exact order: d->pci_lock then pdev->vpci->lock to avoid possible deadlock situations." ? I am asking because your suggestion leads to "When taking both d->pci_lock and pdev->vpci->lock the order should be taken in this exact order: ... " [...] As for other comments, I am taking into account your, Jan's and Stewart's comments and reworking this patch. -- WBR, Volodymyr
