HomeFreeBSD

rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls

Description

rtld-elf: Avoid unnecessary lock_restart_for_upgrade() calls

In order to atomically upgrade the rtld bind lock, load_filtees() may
trigger a longjmp back to _rtld_bind() so that the binding can be done
with the write lock held. However, the write lock is only needed when
filtee objects haven't already been loaded, so move the
lock_restart_for_upgrade() call to avoid unnecessary lock upgrades when
a filtee is defined.

Reviewed by: kib
Tested by: brooks
MFC after: 1 week
Sponsored by: Innovate UK

Details

Provenance
markjAuthored on Feb 1 2024, 10:43 PM
Parents
rG9bbe06b004e2: Revert "pkgbase: Create a FreeBSD-dtb package"
Branches
Unknown
Tags
Unknown