Re: [PATCH] mm/gup_test: keep longterm pin state per file
From: Lance Yang
Date: Sun Aug 16 2026 - 08:54:20 EST
On Mon, Aug 10, 2026 at 01:31:14PM +0200, David Hildenbrand (Arm) wrote:
>The pin longterm test currently stores its data globally, shared among
>multiple concurrent users of the interface (multiple open file
>descriptors -> multiple "struct file"'s). That makes
>the gup_test interface problematic to use concurrently: two users, such
>as concurrent selftest runs, can interfere with the same longterm
>pin state.
>
>While this has not been observed as a problem so far in practice, let's
>just handle it cleanly. There could be a way to trigger selftest
>failures by e.g., running the cow.c and gup_longerm.c selftests
>concurrently, but we usually run them sequentially. Let's add a "Fixes"
>tag to be safe, but not need to CC stable.
>
>Fixes: c77369b437f9 ("mm/gup_test: start/stop/read functionality for PIN LONGTERM test")
>Reported-by: yunhui cui <cuiyunhui@xxxxxxxxxxxxx>
>Closes: https://lore.kernel.org/r/20260608025043.88087-1-cuiyunhui@xxxxxxxxxxxxx
>Tested-by: Yunhui Cui <cuiyunhui@xxxxxxxxxxxxx>
>Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
>---
Gave it a spin on x86_64 QEMU. All good, shared-state mess is gone :)
Tested-by: Lance Yang <lance.yang@xxxxxxxxx>