diff options
| author | Valery Borovsky <vebohr@gmail.com> | 2026-06-07 21:32:48 +0300 |
|---|---|---|
| committer | Thomas Gleixner <tglx@kernel.org> | 2026-07-05 21:49:18 +0200 |
| commit | 90a0286c7d3591295a55c97319de322159993c21 (patch) | |
| tree | 1027a8b01ac7a50c233aa3f5b9085bf48aed82aa /tools/perf/scripts/python/bin | |
| parent | 553bd67a903273d94030f32d671f3d6f19860a85 (diff) | |
selftests/futex: Add FUTEX_LOCK_PI owner-exiting coverage
The futex functional tests cover FUTEX_LOCK_PI timeout semantics
(futex_wait_timeout.c) and robust-list owner death (robust_list.c), but
nothing exercises a non-robust PI owner exiting while holding the lock,
nor the basic ownership / EDEADLK / unlock word semantics of
FUTEX_LOCK_PI.
Add futex_lock_pi_exiting.c with three tests:
- lock_unlock_basic: an uncontended FUTEX_LOCK_PI puts the owner TID in
the futex word, a recursive lock by the owner returns EDEADLK, and
FUTEX_UNLOCK_PI clears the word.
- owner_dies_with_blocked_waiter: a thread acquires a PI futex and exits
while holding it; a blocked FUTEX_LOCK_PI waiter must come out cleanly
(0, EOWNERDEAD or ESRCH) and own the lock when it acquires.
- stress_owner_exits: repeatedly drive the same exiting-owner path.
The exiting-owner retry path is where commit 210d36d892de ("futex: Clear
stale exiting pointer in futex_lock_pi() retry path") fixed a stale task
pointer that tripped WARN_ON_ONCE() in wait_for_owner_exiting(). That
warning does not change the syscall return value, so this test does not
assert on it directly; the stress loop exists to give a kernel booted
with panic_on_warn=1 (as fuzzers and CI commonly run) a chance to trip
on it.
Signed-off-by: Valery Borovsky <vebohr@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260607183249.246037-1-vebohr@gmail.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
