]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
parisc: BTLB: Fix crash when setting up BTLB at CPU bringup
authorHelge Deller <deller@gmx.de>
Wed, 31 Jan 2024 12:37:25 +0000 (13:37 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:38 +0000 (09:51 +0100)
commitaa52be55276614d33f22fbe7da36c40d6432d10b
tree8867429664d0d439b72d24867e2b24401d25a5d8
parentce31d79aa1f13a2345791f84935281a2c194e003
parisc: BTLB: Fix crash when setting up BTLB at CPU bringup

commit 913b9d443a0180cf0de3548f1ab3149378998486 upstream.

When using hotplug and bringing up a 32-bit CPU, ask the firmware about the
BTLB information to set up the static (block) TLB entries.

For that write access to the static btlb_info struct is needed, but
since it is marked __ro_after_init the kernel segfaults with missing
write permissions.

Fix the crash by dropping the __ro_after_init annotation.

Fixes: e5ef93d02d6c ("parisc: BTLB: Initialize BTLB tables at CPU startup")
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v6.6+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/kernel/cache.c