]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.8.5/powerpc-mm-hash64-fix-might_have_hea-check.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.8.5 / powerpc-mm-hash64-fix-might_have_hea-check.patch
1 From 08bf75ba852ef8304a84b6a030466b4b4850382e Mon Sep 17 00:00:00 2001
2 From: Michael Ellerman <mpe@ellerman.id.au>
3 Date: Tue, 11 Oct 2016 21:15:04 +1100
4 Subject: powerpc/mm/hash64: Fix might_have_hea() check
5
6 From: Michael Ellerman <mpe@ellerman.id.au>
7
8 commit 08bf75ba852ef8304a84b6a030466b4b4850382e upstream.
9
10 In commit 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type
11 to detect HEA special case") we changed the logic in might_have_hea()
12 to check FW_FEATURE_SPLPAR rather than machine_is(pseries).
13
14 However the check was incorrectly negated, leading to crashes on
15 machines with HEA adapters, such as:
16
17 mm: Hashing failure ! EA=0xd000080080004040 access=0x800000000000000e current=NetworkManager
18 trap=0x300 vsid=0x13d349c ssize=1 base psize=2 psize 2 pte=0xc0003cc033e701ae
19 Unable to handle kernel paging request for data at address 0xd000080080004040
20 Call Trace:
21 .ehea_create_cq+0x148/0x340 [ehea] (unreliable)
22 .ehea_up+0x258/0x1200 [ehea]
23 .ehea_open+0x44/0x1a0 [ehea]
24 ...
25
26 Fix it by removing the negation.
27
28 Fixes: 2b4e3ad8f579 ("powerpc/mm/hash64: Don't test for machine type to detect HEA special case")
29 Reported-by: Denis Kirjanov <kda@linux-powerpc.org>
30 Reported-by: Jan Stancek <jstancek@redhat.com>
31 Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
32 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
33
34 ---
35 arch/powerpc/mm/hash_utils_64.c | 2 +-
36 1 file changed, 1 insertion(+), 1 deletion(-)
37
38 --- a/arch/powerpc/mm/hash_utils_64.c
39 +++ b/arch/powerpc/mm/hash_utils_64.c
40 @@ -526,7 +526,7 @@ static bool might_have_hea(void)
41 */
42 #ifdef CONFIG_IBMEBUS
43 return !cpu_has_feature(CPU_FTR_ARCH_207S) &&
44 - !firmware_has_feature(FW_FEATURE_SPLPAR);
45 + firmware_has_feature(FW_FEATURE_SPLPAR);
46 #else
47 return false;
48 #endif