Page MenuHomeFreeBSD

umtx: Don't sleep after casueword32 failure in do_sem2_wake
ClosedPublic

Authored by bnovkov on Jan 30 2025, 4:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
May 3 2026, 7:12 AM
Unknown Object (File)
Apr 28 2026, 11:32 PM
Unknown Object (File)
Apr 27 2026, 12:57 PM
Unknown Object (File)
Apr 27 2026, 9:37 AM
Unknown Object (File)
Apr 21 2026, 6:13 AM
Unknown Object (File)
Apr 21 2026, 2:38 AM
Unknown Object (File)
Apr 19 2026, 10:14 PM
Unknown Object (File)
Apr 18 2026, 9:43 PM
Subscribers

Details

Summary

When a casueword32 operation fails, 'do_sem2_wake' will call
'thread_check_susp' to avoid a potential livelock. However, it
instructs 'thread_check_susp' to sleep while holding a previously busied
umtxq key. This is explicitly discouraged by the comments in
'thread_check_susp' which state that a thread shouldn't sleep if it
owns a kernel resource. Fix this by passing 'false'
to 'thread_check_susp'.

Sponsored by: Klara Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable