On Tue, Oct 13, 2026 at 02:49:05PM +0000, [email protected] wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) 
> to consider:
> - [High] pci/p2pdma: deadlock in calc_map_type_and_dist() due to non-IRQ-safe 
> xa_store()
> --
> 
> commit f019da119f00a99a75cbfe2deec0db131a89232d
> Author: Leon Romanovsky <[email protected]>
> 
> PCI/P2PDMA: Reject Translated Requests blocked by Translation Blocking
>     
> ACS Translation Blocking rejects upstream Memory Requests with a Translated
> address before any peer-routing controls apply, per PCIe r7.0 sec 6.12.1.1.
> P2PDMA ignores that bit and can report a route whose ports reject the
> Requester's address type.
>     
> Add PCI_ACS_P2PDMA_BLOCKED and scan the ports traversed by each route. A
> direct route passes only ports below the divergence; a host-bridge route
> also passes the common port and its ancestors. Reject the affected class
> without falling back to another route, and preserve blocking precedence
> over internal-route restrictions.
> 
> > diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
> > index 785e4668a2af5..fc4dea28c8606 100644
> > --- a/drivers/pci/p2pdma.c
> > +++ b/drivers/pci/p2pdma.c
> [ ... ]
> > @@ -1162,6 +1252,11 @@ calc_map_type_and_dist(struct pci_dev *provider, 
> > struct pci_dev *client,
> >             }
> >     }
> >  
> > +   path.tb_on_path = pci_p2pdma_path_blocks_translation(client, a);
> > +   if (b_child)
> > +           path.tb_above_divergence =
> > +                   pci_p2pdma_path_blocks_translation(b_child, NULL);
> > +
> >     /*
> >      * The walk and the config reads above serve every class; only the
> >      * decision below depends on the kind of TLP being routed.
> 
> [Severity: High]
> Does xa_store() use an IRQ-safe lock here?

Same, this not-safe path is not taken in current codebase.

Thanks

Reply via email to