Skip to content
Commit bdb0c266 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Jiri Slaby
Browse files

powerpc/mm: Recompute hash value after a failed update

commit 36b35d5d upstream.

If we had secondary hash flag set, we ended up modifying hash value in
the updatepp code path. Hence with a failed updatepp we will be using
a wrong hash value for the following hash insert. Fix this by
recomputing hash before insert.

Without this patch we can end up with using wrong slot number in linux
pte. That can result in us missing an hash pte update or invalidate
which can cause memory corruption or even machine check.

Fixes: 6d492ecc

 ("powerpc/THP: Add code to handle HPTE faults for hugepages")
Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Reviewed-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
parent 108ff598
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment