HomeFreeBSD

libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child

Description

libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child

Since there is only the current thread in the child, no pending readers
exist. Clear the bit, since it confuses future attempts to acquire
write ownership of the rtld locks, due to URWLOCK_PREFER_READERS flag.

To be future-proof, clear all state about pending writers and readers.

PR: 271490
Reported and tested by: KJ Tsanaktsidis <kj@kjtsanaktsidis.id.au>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D40178

Details

Provenance
kibAuthored on May 20 2023, 8:11 AM
Reviewer
markj
Differential Revision
D40178: libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child
Parents
rG54418f79fd29: ifconfig: switch IPv4/IPv6 address manipulations to Netlink
Branches
Unknown
Tags
Unknown