Page MenuHomeFreeBSD

libthr rtld locks: do not leak URWLOCK_READ_WAITERS into child
ClosedPublic

Authored by kib on Sat, May 20, 8:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, May 28, 1:22 PM
Unknown Object (File)
Sat, May 27, 9:28 AM
Unknown Object (File)
Fri, May 26, 9:38 PM
Unknown Object (File)
Thu, May 25, 5:26 PM
Unknown Object (File)
Thu, May 25, 10:04 AM
Unknown Object (File)
Thu, May 25, 7:25 AM
Unknown Object (File)
Wed, May 24, 9:24 PM
Unknown Object (File)
Mon, May 22, 1:50 PM
Subscribers

Details

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

PR:     271490

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Sat, May 20, 8:28 AM
kib added a reviewer: markj.

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

It would be nice to turn the test case from PR 271490 into a regression test case, either in the base system or in stress2.

lib/libthr/thread/thr_rtld.c
161

Perhaps use __predict_false here.

This revision is now accepted and ready to land.Mon, May 22, 1:32 PM