svn commit: r255284 - head/sys/rpc

Rick Macklem rmacklem at FreeBSD.org
Fri Sep 6 02:34:35 UTC 2013


Author: rmacklem
Date: Fri Sep  6 02:34:34 2013
New Revision: 255284
URL: http://svnweb.freebsd.org/changeset/base/255284

Log:
  It was reported via email that the cu_sent field used by the
  krpc client side UDP was observed as way out of range and
  caused the rpc.lockd daemon to hang trying to do an RPC.
  Inspection of the code found two places where the RPC request
  is re-queued, but the value of cu_sent was not incremented.
  Since cu_sent is always decremented when the RPC request is
  dequeued, I think this could have caused cu_sent to go out of
  range. This patch adds lines to increment cu_sent for these
  two cases.
  
  Reported by:	dwhite at ixsystems.com
  Discussed with:	dwhite at ixsystems.com
  MFC after:	2 weeks

Modified:
  head/sys/rpc/clnt_dg.c

Modified: head/sys/rpc/clnt_dg.c
==============================================================================
--- head/sys/rpc/clnt_dg.c	Fri Sep  6 00:40:14 2013	(r255283)
+++ head/sys/rpc/clnt_dg.c	Fri Sep  6 02:34:34 2013	(r255284)
@@ -682,6 +682,7 @@ get_reply:
 			next_sendtime += retransmit_time;
 			goto send_again;
 		}
+		cu->cu_sent += CWNDSCALE;
 		TAILQ_INSERT_TAIL(&cs->cs_pending, cr, cr_link);
 	}
 
@@ -733,6 +734,7 @@ got_reply:
 					 */
 					XDR_DESTROY(&xdrs);
 					mtx_lock(&cs->cs_lock);
+					cu->cu_sent += CWNDSCALE;
 					TAILQ_INSERT_TAIL(&cs->cs_pending,
 					    cr, cr_link);
 					cr->cr_mrep = NULL;


More information about the svn-src-all mailing list