summaryrefslogtreecommitdiffstats
path: root/sys/rpc
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2013-09-06 02:34:34 +0000
committerrmacklem <rmacklem@FreeBSD.org>2013-09-06 02:34:34 +0000
commit13a117b3c6284b73ccc930ca12683941fda83810 (patch)
treea6c300f9a75cb7c89265cfb6ce26869b88d6e5dd /sys/rpc
parent94d79b37f4502ede6825656f0a6cffb7bea9496d (diff)
downloadFreeBSD-src-13a117b3c6284b73ccc930ca12683941fda83810.zip
FreeBSD-src-13a117b3c6284b73ccc930ca12683941fda83810.tar.gz
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@ixsystems.com Discussed with: dwhite@ixsystems.com MFC after: 2 weeks
Diffstat (limited to 'sys/rpc')
-rw-r--r--sys/rpc/clnt_dg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/rpc/clnt_dg.c b/sys/rpc/clnt_dg.c
index a658de9..4c1fe8c 100644
--- a/sys/rpc/clnt_dg.c
+++ b/sys/rpc/clnt_dg.c
@@ -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;
OpenPOWER on IntegriCloud