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)
Fri, Oct 10, 3:00 AM
Unknown Object (File)
Fri, Sep 19, 9:33 PM
Unknown Object (File)
Sep 15 2025, 12:20 PM
Unknown Object (File)
Sep 14 2025, 8:28 PM
Unknown Object (File)
Sep 14 2025, 5:16 AM
Unknown Object (File)
Sep 9 2025, 1:19 PM
Unknown Object (File)
Aug 27 2025, 11:46 PM
Unknown Object (File)
Aug 12 2025, 10:55 AM
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