Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jan 2015 16:32:42 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r277763 - head/sys/dev/cxgbe/tom
Message-ID:  <201501261632.t0QGWg5V037401@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501261632.t0QGWg5V037401>