Re: [patch 7/8] fdmap v2 - implement sys_socket2

From: dean gaudet
Date: Sun Jun 10 2007 - 00:45:35 EST

On Sat, 9 Jun 2007, Linus Torvalds wrote:

> IOW, the most common case for libraries is not that they get invoced to do
> one thing, but that they get loaded and then used over and over and over
> again, and the _reason_ for wanting to have a file descriptor open may
> well be that the library wants to cache the file descriptor, rather than
> having to open a file over and over again!

for an example of a library wanting to cache an open fd ... and failing
miserably at protecting itself from the application closing its fd read:

basically libnss-ldap is trying to use getsockname/getpeername to prove
that an fd belongs to it. the failure modes are quite delightful.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at