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

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

powerpc/eeh: Fix wrong flag passed to eeh_unfreeze_pe()



In __eeh_clear_pe_frozen_state(), we should pass the flag's value
instead of its address to eeh_unfreeze_pe(). The isolated flag is
cleared if no error returned from __eeh_clear_pe_frozen_state(). We
never observed the error from the function. So the isolated flag should
have been always cleared, no real issue is caused because of the misused
@flag.

This fixes the code by passing the value of @flag to eeh_unfreeze_pe().

Fixes: 5cfb20b9 ("powerpc/eeh: Emulate EEH recovery for VFIO devices")
Cc: stable@vger.kernel.org # v3.18+
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent af2b7fa1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -545,7 +545,7 @@ static void *eeh_pe_detach_dev(void *data, void *userdata)
static void *__eeh_clear_pe_frozen_state(void *data, void *flag)
static void *__eeh_clear_pe_frozen_state(void *data, void *flag)
{
{
	struct eeh_pe *pe = (struct eeh_pe *)data;
	struct eeh_pe *pe = (struct eeh_pe *)data;
	bool *clear_sw_state = flag;
	bool clear_sw_state = *(bool *)flag;
	int i, rc = 1;
	int i, rc = 1;


	for (i = 0; rc && i < 3; i++)
	for (i = 0; rc && i < 3; i++)