File make-request-loop.patch of Package glibc.8004

2014-10-14  Paul Pluzhnikov  <ppluzhnikov@google.com>

	[BZ #12926]
	* sysdeps/unix/sysv/linux/check_pf.c (make_request): Avoid
	infinite loop when __recvmsg returns 0.

Index: glibc-2.19/sysdeps/unix/sysv/linux/check_pf.c
===================================================================
--- glibc-2.19.orig/sysdeps/unix/sysv/linux/check_pf.c
+++ glibc-2.19/sysdeps/unix/sysv/linux/check_pf.c
@@ -169,7 +169,7 @@ make_request (int fd, pid_t pid)
 	};
 
       ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0));
-      if (read_len < 0)
+      if (read_len <= 0)
 	goto out_fail;
 
       if (msg.msg_flags & MSG_TRUNC)
openSUSE Build Service is sponsored by