> From: Jan Beulich <jbeul...@suse.com> > Sent: Monday, April 11, 2022 5:36 PM > > Prior extension of these functions to enable per-device quarantine page > tables already didn't add more locking there, but merely left in place > what had been there before. But really locking is unnecessary here: > We're running with pcidevs_lock held (i.e. multiple invocations of the > same function [or their teardown equivalents] are impossible, and hence > there are no "local" races), while all consuming of the data being > populated here can't race anyway due to happening sequentially > afterwards. See also the comment in struct arch_pci_dev.
Better add some explanation (as you explained in other replies) why above rationale around pcidevs_lock leads to the drop of a different lock (mapping_lock). > > Signed-off-by: Jan Beulich <jbeul...@suse.com> > Reviewed-by: Kevin Tian <kevin.t...@intel.com>