HomeFreeBSD

Revert part of r300109.

Description

Revert part of r300109.

The removal of TAILQ_FOREACH_SAFE introduced a small race: when the last
thread on a sleepqueue is awoken, it reclaims the sleepqueue and may begin
executing on a different CPU before sleepq_resume_thread() returns. This
leaves a window during which it may go back to sleep and incorrectly be
awoken again by the caller of sleepq_broadcast().

Reported and tested by: pho
MFC after: 3 days
Sponsored by: Dell EMC Isilon

Details

Provenance
markjAuthored on
Parents
rS310422: rtld: Fix a couple of bugs around the unloading of ELF filters.
Branches
Unknown
Tags
Unknown