rtld: explain the use of rtld_bind_lock in rtld_get_addr_slow()

Discussed with:	jrtc27
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D59269
This commit is contained in:
Konstantin Belousov committed 2026-09-06 01:00:09 +03:00
1 parent 6a69d28ee0
commit 5d9e5f4964
1 file changed
+5
+5
View File
@@ -5462,6 +5462,11 @@ unref_dag(Obj_Entry *root)
/*
* Common code for MD __tls_get_addr().
*
* The tcb->tcb_dtv data structure is thread-local. The reason that
* the function needs to take the rtld_bind_lock exclusive (as opposed
* to only shared, to safely access obj_list in allocate_module_tls())
* is to protect the rtld_malloc data.
*/
static void *
tls_get_addr_slow(struct tcb *tcb, int index, size_t offset, bool locked)