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 <fbarrat@linux.ibm.com> Reviewed-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200819130741.16769-1-fbarrat@linux.ibm.com
1 parent 801980f commit e17a7c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)