diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2010-08-25 00:35:58 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2010-08-25 00:35:58 +0000 |
commit | 4d7ceccb999936caa15c9a60f3e8ae82545c5a2d (patch) | |
tree | a74e66ea47ae7580adea4b34b64e2c035443fd65 /sys/rpc | |
parent | d1b92febc4113a9dd1c4663bed88b70aef7819f9 (diff) | |
download | FreeBSD-src-4d7ceccb999936caa15c9a60f3e8ae82545c5a2d.zip FreeBSD-src-4d7ceccb999936caa15c9a60f3e8ae82545c5a2d.tar.gz |
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
Diffstat (limited to 'sys/rpc')
-rw-r--r-- | sys/rpc/replay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/rpc/replay.c b/sys/rpc/replay.c index d82fc20..c89def5 100644 --- a/sys/rpc/replay.c +++ b/sys/rpc/replay.c @@ -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 */ |