Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Aug 2010 00:35:58 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211789 - head/sys/rpc
Message-ID:  <201008250035.o7P0Zwkb094353@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Wed Aug 25 00:35:58 2010
New Revision: 211789
URL: http://svn.freebsd.org/changeset/base/211789

Log:
  If the first iteration of the do loop in replay_prune()
  succeeded and a subsequent interation failed to find an
  entry to prune, it could loop infinitely, since the
  "freed" variable wasn't reset to FALSE. This patch moves
  setting freed FALSE to inside the loop to fix the problem.
  
  Tested by:	alan.bryan at yahoo.com
  MFC after:	2 weeks

Modified:
  head/sys/rpc/replay.c

Modified: head/sys/rpc/replay.c
==============================================================================
--- head/sys/rpc/replay.c	Wed Aug 25 00:05:14 2010	(r211788)
+++ head/sys/rpc/replay.c	Wed Aug 25 00:35:58 2010	(r211789)
@@ -144,8 +144,8 @@ replay_prune(struct replay_cache *rc)
 	bool_t freed_one;
 
 	if (rc->rc_count >= REPLAY_MAX || rc->rc_size > rc->rc_maxsize) {
-		freed_one = FALSE;
 		do {
+			freed_one = FALSE;
 			/*
 			 * Try to free an entry. Don't free in-progress entries
 			 */



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