svn commit: r267274 - projects/sendfile/sys/kern

Gleb Smirnoff glebius at FreeBSD.org
Mon Jun 9 14:31:36 UTC 2014


Author: glebius
Date: Mon Jun  9 14:31:35 2014
New Revision: 267274
URL: http://svnweb.freebsd.org/changeset/base/267274

Log:
  Do not go for unavailable data in soreceive_generic().
  
  Sponsored by:	Netflix
  Sponsored by:	Nginx, Inc.

Modified:
  projects/sendfile/sys/kern/uipc_socket.c

Modified: projects/sendfile/sys/kern/uipc_socket.c
==============================================================================
--- projects/sendfile/sys/kern/uipc_socket.c	Mon Jun  9 14:29:55 2014	(r267273)
+++ projects/sendfile/sys/kern/uipc_socket.c	Mon Jun  9 14:31:35 2014	(r267274)
@@ -1643,7 +1643,8 @@ dontblock:
 	 */
 	moff = 0;
 	offset = 0;
-	while (m != NULL && uio->uio_resid > 0 && error == 0) {
+	while (m != NULL && !(m->m_flags & M_NOTAVAIL) && uio->uio_resid > 0
+	    && error == 0) {
 		/*
 		 * If the type of mbuf has changed since the last mbuf
 		 * examined ('type'), end the receive operation.


More information about the svn-src-projects mailing list