Commit b64d23d1 authored by Alexandre Ghiti's avatar Alexandre Ghiti Committed by Greg Kroah-Hartman
Browse files

riscv: Use an atomic xchg in pudp_huge_get_and_clear()



commit 546e42c8 upstream.

Make sure we return the right pud value and not a value that could
have been overwritten in between by a different core.

Fixes: c3cc2a4a ("riscv: Add support for PUD THP")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250814-dev-alex-thp_pud_xchg-v1-1-b4704dfae206@rivosinc.com


[pjw@kernel.org: use xchg rather than atomic_long_xchg; avoid atomic op for !CONFIG_SMP like x86]
Signed-off-by: default avatarPaul Walmsley <pjw@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8df142e9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment