Date: Thu, 3 Mar 2011 17:12:24 +0000 (UTC) From: Jaakko Heinonen <jh@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/libexec/rtld-elf rtld.c Message-ID: <201103031712.p23HCiZ9076269@repoman.freebsd.org>
index | next in thread | raw e-mail
jh 2011-03-03 17:12:24 UTC
FreeBSD src repository
Modified files: (Branch: RELENG_8)
libexec/rtld-elf rtld.c
Log:
SVN rev 219237 on 2011-03-03 17:12:24Z by jh
MFC r216489:
If dlclose() is called recursively from a _fini() function, the inner
dlclose() call may unload the object of the outer call prematurely
because objects are unreferenced before _fini() calls.
Fix this by unreferencing objects after calling objlist_call_fini() in
dlclose(). Therefore objlist_call_fini() now calls the fini function if
the reference count of an object is 1. In addition we must restart the
list_fini traversal after every _fini() call because another dlclose()
call might have modified the reference counts.
Add an XXX comment to objlist_call_fini() about possible race with
dlopen().
PR: 133246, 149464
Revision Changes Path
1.139.2.12 +38 -16 src/libexec/rtld-elf/rtld.c
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103031712.p23HCiZ9076269>
