powerpc/32: Fix hardlockup on vmap stack overflow
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 18 Nov 2021 09:39:53 +0000 (10:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 1 Dec 2021 08:04:44 +0000 (09:04 +0100)
commitc4e3ff8b8b1d54f0c755670174c453b06e17114b
tree2c1cad55757fe81b5a0d2ad8e9b8bf7e5ac4aeb6
parent671fbc2e8dea63846935fd1267e4f4c61440ac5d
powerpc/32: Fix hardlockup on vmap stack overflow

commit 5bb60ea611db1e04814426ed4bd1c95d1487678e upstream.

Since the commit c118c7303ad5 ("powerpc/32: Fix vmap stack - Do not
activate MMU before reading task struct") a vmap stack overflow
results in a hard lockup. This is because emergency_ctx is still
addressed with its virtual address allthough data MMU is not active
anymore at that time.

Fix it by using a physical address instead.

Fixes: c118c7303ad5 ("powerpc/32: Fix vmap stack - Do not activate MMU before reading task struct")
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/ce30364fb7ccda489272af4a1612b6aa147e1d23.1637227521.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/kernel/head_32.h