diff options
author | Sam Bobroff <sbobroff@linux.ibm.com> | 2018-09-12 03:23:22 +0200 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2018-10-13 13:21:25 +0200 |
commit | 473af09b56dc4be68e4af33220ceca6be67aa60d (patch) | |
tree | 7ccd8eb68d5ff075c6ff4952e6ebed4638fd6ea2 /arch/powerpc/kernel/eeh_pe.c | |
parent | powerpc/eeh: Fix null deref for devices removed during EEH (diff) | |
download | linux-473af09b56dc4be68e4af33220ceca6be67aa60d.tar.xz linux-473af09b56dc4be68e4af33220ceca6be67aa60d.zip |
powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field
eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it
incorrectly removes it from pe->type, instead of pe->state.
However, rather than clearing it from the correct field, remove it.
Inspection of the code shows that it can't ever have had any effect
(even if it had been cleared from the correct field), because the
field is never tested after it is cleared by the statement in
question.
The clear statement was added by commit 807a827d4e74 ("powerpc/eeh:
Keep PE during hotplug"), but it didn't explain why it was necessary.
Signed-off-by: Sam Bobroff <sbobroff@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/kernel/eeh_pe.c')
-rw-r--r-- | arch/powerpc/kernel/eeh_pe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/eeh_pe.c b/arch/powerpc/kernel/eeh_pe.c index 1b238ecc553e..210d239a9395 100644 --- a/arch/powerpc/kernel/eeh_pe.c +++ b/arch/powerpc/kernel/eeh_pe.c @@ -379,7 +379,7 @@ int eeh_add_to_parent_pe(struct eeh_dev *edev) while (parent) { if (!(parent->type & EEH_PE_INVALID)) break; - parent->type &= ~(EEH_PE_INVALID | EEH_PE_KEEP); + parent->type &= ~EEH_PE_INVALID; parent = parent->parent; } |