* [PATCH v2] powerpc/eeh: Fix wrong flag passed to eeh_unfreeze_pe()
@ 2017-01-18 23:10 Gavin Shan
2017-01-27 0:33 ` [v2] " Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Gavin Shan @ 2017-01-18 23:10 UTC (permalink / raw)
To: linuxppc-dev; +Cc: mpe, Gavin Shan, stable, #3.18+
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().
Cc: stable@vger.kernel.org #3.18+
Fixes: 5cfb20b96f6 ("powerpc/eeh: Emulate EEH recovery for VFIO devices")
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
---
v2: Improved changelog and dereference @flag for once
---
arch/powerpc/kernel/eeh_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index d88573b..b948871 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -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)
{
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++)
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v2] powerpc/eeh: Fix wrong flag passed to eeh_unfreeze_pe()
2017-01-18 23:10 [PATCH v2] powerpc/eeh: Fix wrong flag passed to eeh_unfreeze_pe() Gavin Shan
@ 2017-01-27 0:33 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2017-01-27 0:33 UTC (permalink / raw)
To: Gavin Shan, linuxppc-dev; +Cc: #3.18+, Gavin Shan, stable
On Wed, 2017-01-18 at 23:10:16 UTC, Gavin Shan wrote:
> 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().
>
> Cc: stable@vger.kernel.org #3.18+
> Fixes: 5cfb20b96f6 ("powerpc/eeh: Emulate EEH recovery for VFIO devices")
> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/f05fea5b3574a5926c53865eea2713
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-27 0:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 23:10 [PATCH v2] powerpc/eeh: Fix wrong flag passed to eeh_unfreeze_pe() Gavin Shan
2017-01-27 0:33 ` [v2] " Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.