Page MenuHomeFreeBSD

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

Authored by bnovkov on Thu, Jan 30, 4:14 PM.

Details

Reviewers
kib
kevans
Group Reviewers
Klara
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 Skipped
Unit
Tests Skipped