Re: [PATCH] mm: riscv: fix an unsafe pte read in huge_pte_alloc()

From: patchwork-bot+linux-riscv
Date: Wed Jul 05 2023 - 19:50:35 EST


Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@xxxxxxxxxxxx>:

On Mon, 3 Jul 2023 12:00:44 -0700 you wrote:
> The WARN_ON_ONCE() statement in riscv's huge_pte_alloc() is susceptible
> to false positives, because the pte is read twice at the C language
> level, locklessly, within the same conditional statement. Depending on
> compiler behavior, this can lead to generated machine code that actually
> reads the pte just once, or twice. Reading twice will expose the code to
> changing pte values and cause incorrect behavior.
>
> [...]

Here is the summary with links:
- mm: riscv: fix an unsafe pte read in huge_pte_alloc()
https://git.kernel.org/riscv/c/62ba41d27612

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html