Re: [PATCH v8 10/15] s390/mm: Cleanup pXXp_flush_lazy() routines
From: Heiko Carstens
Date: Tue Oct 13 2026 - 11:27:00 EST
On Wed, Oct 07, 2026 at 01:41:53PM +0200, Alexander Gordeev wrote:
> Avoid unnecessary pgtable entry read in ptep_flush_lazy() and
> pmdp_flush_lazy() routines. Use the already obtained value of
> a pgtable entry instead of dereferencing it again.
>
> It might appear that the optimized out second dereferencing happens
> under mm_context_t::flush_count lock and therefore a race condition
> is possible. However, both routines write invalid entry bits to the
> pgtable entries and therefore no reader is allowed to interpret the
> rest of the value afterwards.
>
> Signed-off-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
> ---
> arch/s390/mm/pgtable.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks!