]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
riscv: use an atomic xchg in pudp_huge_get_and_clear()
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Thu, 14 Aug 2025 12:06:14 +0000 (12:06 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 13 Sep 2025 23:55:01 +0000 (16:55 -0700)
commit668208b161a0b679427e7d0f34c0a65fd7d23979
tree27ef7703795b4607572394071f40e2658f7536bf
parent0ee82798282aeede8b11553593f7920b15b2240f
riscv: use an atomic xchg in pudp_huge_get_and_clear()

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

Link: https://lkml.kernel.org/r/20250814-dev-alex-thp_pud_xchg-v1-1-b4704dfae206@rivosinc.com
Fixes: c3cc2a4a3a23 ("riscv: Add support for PUD THP")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Cc: Andrew Donnellan <ajd@linux.ibm.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/riscv/include/asm/pgtable.h