Re: [PATCH] mm/gup_test: keep longterm pin state per file
Lance Yang <[email protected]>
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]>
>Closes: https://lore.kernel.org/r/[email protected]
>Tested-by: Yunhui Cui <[email protected]>
>Signed-off-by: David Hildenbrand (Arm) <[email protected]>
>---
Gave it a spin on x86_64 QEMU. All good, shared-state mess is gone :)
Tested-by: Lance Yang <[email protected]>