HomeFreeBSD

umtx: Don't sleep after casueword32 failure in do_sem2_wake

Description

umtx: Don't sleep after casueword32 failure in do_sem2_wake

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'.

Reviewed by: kib
PR: 282713
Differential Revision: https://reviews.freebsd.org/D48728
Sponsored by: Klara Inc.

Details

Provenance
bnovkovAuthored on Thu, Jan 30, 3:10 PM
Reviewer
kib
Differential Revision
D48728: umtx: Don't sleep after casueword32 failure in do_sem2_wake
Parents
rG43b3e755d075: arm64: use FEAT_WFxT for DELAY() when available
Branches
Unknown
Tags
Unknown