Skip to content

Commit e17a7c0

Browse files
fbarratmpe
authored andcommitted
powerpc/powernv/pci: Fix possible crash when releasing DMA resources
Fix a typo introduced during recent code cleanup, which could lead to silently not freeing resources or an oops message (on PCI hotplug or CAPI reset). Only impacts ioda2, the code path for ioda1 is correct. Fixes: 01e1262 ("powerpc/powernv/pci: Add explicit tracking of the DMA setup state") Signed-off-by: Frederic Barrat <[email protected]> Reviewed-by: Oliver O'Halloran <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 801980f commit e17a7c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/powerpc/platforms/powernv/pci-ioda.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2705,7 +2705,7 @@ void pnv_pci_ioda2_release_pe_dma(struct pnv_ioda_pe *pe)
27052705
struct iommu_table *tbl = pe->table_group.tables[0];
27062706
int64_t rc;
27072707

2708-
if (pe->dma_setup_done)
2708+
if (!pe->dma_setup_done)
27092709
return;
27102710

27112711
rc = pnv_pci_ioda2_unset_window(&pe->table_group, 0);

0 commit comments

Comments
 (0)