gup_test currently stores long-term pin state globally, allowing one open file descriptor to block or release pins owned by another client. Move this state to each open file description so independent clients have isolated pin lifecycles.
Patch 1 moves long-term pin state from global variables to per-open file state, preventing independent clients from affecting each other. Patch 2 adds selftest coverage for concurrent pins and verifies that stopping or closing one descriptor does not release another descriptor's pin. Richard Cheng (2): mm/gup_test: Track long-term pins per open file selftests/mm: Test per-open gup_test pin ownership mm/gup_test.c | 88 +++++--- tools/testing/selftests/mm/gup_longterm.c | 258 +++++++++++++++++++++- 2 files changed, 313 insertions(+), 33 deletions(-) base-commit: 66498c75b4f8017f62d720d9b59675bdf3abce91 -- 2.43.0

