[PATCH] Fix infinite loop in check_pf
Siddhesh Poyarekar
siddhesh@redhat.com
Tue Oct 14 08:29:00 GMT 2014
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20141014/9863579f/attachment.sig>
More information about the Libc-alpha
mailing list