* [PATCH] powerpc/mm/hash64: Fix might_have_hea() check
@ 2016-10-11 10:15 Michael Ellerman
2016-10-19 2:17 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2016-10-11 10:15 UTC (permalink / raw)
To: linuxppc-dev; +Cc: jstancek, kda, benh
In commit 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type
to detect HEA special case") we changed the logic in might_have_hea()
to check FW_FEATURE_SPLPAR rather than machine_is(pseries).
However the check was incorrectly negated, leading to crashes on
machines with HEA adapters, such as:
mm: Hashing failure ! EA=0xd000080080004040 access=0x800000000000000e current=NetworkManager
trap=0x300 vsid=0x13d349c ssize=1 base psize=2 psize 2 pte=0xc0003cc033e701ae
Unable to handle kernel paging request for data at address 0xd000080080004040
Call Trace:
.ehea_create_cq+0x148/0x340 [ehea] (unreliable)
.ehea_up+0x258/0x1200 [ehea]
.ehea_open+0x44/0x1a0 [ehea]
...
Fix it by removing the negation.
Fixes: 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type to detect HEA special case")
Cc: stable@vger.kernel.org # v4.8+
Reported-by: Denis Kirjanov <kda@linux-powerpc.org>
Reported-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/mm/hash_utils_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 90480e23fd2c..44d3c3a38e3e 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -529,7 +529,7 @@ static bool might_have_hea(void)
*/
#ifdef CONFIG_IBMEBUS
return !cpu_has_feature(CPU_FTR_ARCH_207S) &&
- !firmware_has_feature(FW_FEATURE_SPLPAR);
+ firmware_has_feature(FW_FEATURE_SPLPAR);
#else
return false;
#endif
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: powerpc/mm/hash64: Fix might_have_hea() check
2016-10-11 10:15 [PATCH] powerpc/mm/hash64: Fix might_have_hea() check Michael Ellerman
@ 2016-10-19 2:17 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2016-10-19 2:17 UTC (permalink / raw)
To: Michael Ellerman, linuxppc-dev; +Cc: kda, jstancek
On Tue, 2016-11-10 at 10:15:04 UTC, Michael Ellerman wrote:
> In commit 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type
> to detect HEA special case") we changed the logic in might_have_hea()
> to check FW_FEATURE_SPLPAR rather than machine_is(pseries).
>
> However the check was incorrectly negated, leading to crashes on
> machines with HEA adapters, such as:
>
> mm: Hashing failure ! EA=0xd000080080004040 access=0x800000000000000e current=NetworkManager
> trap=0x300 vsid=0x13d349c ssize=1 base psize=2 psize 2 pte=0xc0003cc033e701ae
> Unable to handle kernel paging request for data at address 0xd000080080004040
> Call Trace:
> .ehea_create_cq+0x148/0x340 [ehea] (unreliable)
> .ehea_up+0x258/0x1200 [ehea]
> .ehea_open+0x44/0x1a0 [ehea]
> ...
>
> Fix it by removing the negation.
>
> Fixes: 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type to detect HEA special case")
> Cc: stable@vger.kernel.org # v4.8+
> Reported-by: Denis Kirjanov <kda@linux-powerpc.org>
> Reported-by: Jan Stancek <jstancek@redhat.com>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/08bf75ba852ef8304a84b6a030466b
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-19 2:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-11 10:15 [PATCH] powerpc/mm/hash64: Fix might_have_hea() check Michael Ellerman
2016-10-19 2:17 ` 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.