This is the mail archive of the libc-alpha@sourceware.org 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] Fix infinite loop in check_pf


On Mon, Oct 13, 2014 at 08:51:28PM +0000, Jim King wrote:
> getaddrinfo() calls down to check_pf.c:make_request() while holding a lock.
> make_request calls __recvmsg, and the documentation for recvmsg states that
> a return code of 0 indicates an orderly peer shutdown.  Given it is possible
> to get a return code of 0 (and presumably once you get 0, subsequent calls
> will also get 0), there is an infinite loop.  I have a core where this
> has happened once; as it enters this loop under lock it is possible to
> exhaust other resources (in my case, we exhausted the number of file handles
> available to a process as incoming requests were calling getaddrinfo).

Interesting; it's a netlink socket which is assumed to not fail in
this manner.  The situation deserves a bit more investigation to
figure out the root cause, but the patch itself is fine.

Could you please file a bug report in the sourceware bugzilla and let
me know the bug number so that I can mention it in the commit log?

Thanks,
Siddhesh

Attachment: pgpFVHp7_ewcZ.pgp
Description: PGP signature


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