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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to