summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2017-01-19 10:10:16 +1100
committerSasha Levin <alexander.levin@verizon.com>2017-03-06 17:31:11 -0500
commitbbc56ad06315b1fda9c87aa484cbc96e979cfcdd (patch)
tree616cb3c908ce513da7b0da4211bbd4437e89367b
parent078d15b1f19330048c89fd258e3870b73148776c (diff)
powerpc/eeh: Fix wrong flag passed to eeh_unfreeze_pe()
[ Upstream commit f05fea5b3574a5926c53865eea27139bb40b2f2b ] 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: 5cfb20b96f6 ("powerpc/eeh: Emulate EEH recovery for VFIO devices") Cc: stable@vger.kernel.org # v3.18+ Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
-rw-r--r--arch/powerpc/kernel/eeh_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 6d04c9efb496..0a4f23a070ab 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -483,7 +483,7 @@ static void *eeh_pe_detach_dev(void *data, void *userdata)
static void *__eeh_clear_pe_frozen_state(void *data, void *flag)
{
struct eeh_pe *pe = (struct eeh_pe *)data;
- bool *clear_sw_state = flag;
+ bool clear_sw_state = *(bool *)flag;
int i, rc = 1;
for (i = 0; rc && i < 3; i++)