svn commit: r277763 - head/sys/dev/cxgbe/tom

John Baldwin jhb at FreeBSD.org
Mon Jan 26 16:32:42 UTC 2015


Author: jhb
Date: Mon Jan 26 16:32:41 2015
New Revision: 277763
URL: https://svnweb.freebsd.org/changeset/base/277763

Log:
  Lock the socket buffer before jumping to the 'out' label if sblock()
  fails in t4_soreceive_ddp().

Modified:
  head/sys/dev/cxgbe/tom/t4_ddp.c

Modified: head/sys/dev/cxgbe/tom/t4_ddp.c
==============================================================================
--- head/sys/dev/cxgbe/tom/t4_ddp.c	Mon Jan 26 16:30:17 2015	(r277762)
+++ head/sys/dev/cxgbe/tom/t4_ddp.c	Mon Jan 26 16:32:41 2015	(r277763)
@@ -1057,9 +1057,9 @@ t4_soreceive_ddp(struct socket *so, stru
 
 	/* Prevent other readers from entering the socket. */
 	error = sblock(sb, SBLOCKWAIT(flags));
+	SOCKBUF_LOCK(sb);
 	if (error)
 		goto out;
-	SOCKBUF_LOCK(sb);
 
 	/* Easy one, no space to copyout anything. */
 	if (uio->uio_resid == 0) {


More information about the svn-src-head mailing list