This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] getXXent_r and getXXbyYY_r not really thread safe


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thorsten Kukuk wrote:

> But this behavior is contrary to the behavior of commercial Unix
> systems. 

And the problem is?


> 1. We use the getXXent functions internal from getXXbyYY_r functions
>    in all NSS modules, even the nss_files module does so.

These uses are locking and restoring the state.  There should be no
problem.  If there is one (prove it) it can be fixed without this
incompatible extension.



> 2. Calling getXXbyYY_r() from concurrent threads could mean, that
>    the service pointer in libc could be changed at a time in such a
>    way, that the second thread will never get the data from one
>    service.

And?  Then the threads do not collaborate correctly.

- --
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFBReQ32ijCOnn/RHQRAgWEAJ9RbSQkPqzaeJPSwqV0FyOrWT1lIACgqDSO
g43L+uXzDJGIpT1Z8xxTyx0=
=BW59
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]