Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec8e4e9d authored by Gavin Shan's avatar Gavin Shan Committed by Michael Ellerman
Browse files

powerpc/powernv: Bail upon invalid master PE



When freezing compound PEs in pnv_ioda_freeze_pe(), we should bail
upon illegal master PE. We needn't freeze slave PE because it should
have been put into frozen state by hardware.

Reported-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 4773f76b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -373,7 +373,9 @@ static void pnv_ioda_freeze_pe(struct pnv_phb *phb, int pe_no)
	/* Fetch master PE */
	if (pe->flags & PNV_IODA_PE_SLAVE) {
		pe = pe->master;
		WARN_ON(!pe || !(pe->flags & PNV_IODA_PE_MASTER));
		if (WARN_ON(!pe || !(pe->flags & PNV_IODA_PE_MASTER)))
			return;

		pe_no = pe->pe_number;
	}