[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5u1ibwr.fsf@mail.lhotse>
Date: Tue, 05 Sep 2023 12:36:36 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Christophe Leroy <christophe.leroy@...roup.eu>,
Nicholas Piggin <npiggin@...il.com>
Cc: Christophe Leroy <christophe.leroy@...roup.eu>,
linux-kernel@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH] powerpc/64e: Fix wrong test in
__ptep_test_and_clear_young()
Christophe Leroy <christophe.leroy@...roup.eu> writes:
> Commit 45201c879469 ("powerpc/nohash: Remove hash related code from
> nohash headers.") replaced:
>
> if ((pte_val(*ptep) & (_PAGE_ACCESSED | _PAGE_HASHPTE)) == 0)
> return 0;
>
> By:
>
> if (pte_young(*ptep))
> return 0;
>
> But it should be:
>
> if (!pte_young(*ptep))
> return 0;
That seems bad :)
But I don't know off the top of my head where
__ptep_test_and_clear_young() is used, and so what the symptoms could
be. Presumably nothing too bad or someone would have noticed?
cheers
Powered by blists - more mailing lists