From owner-svn-src-all@FreeBSD.ORG Wed Aug 25 00:35:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8D6A1065698; Wed, 25 Aug 2010 00:35:58 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A85018FC15; Wed, 25 Aug 2010 00:35:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7P0ZwN8094355; Wed, 25 Aug 2010 00:35:58 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7P0Zwkb094353; Wed, 25 Aug 2010 00:35:58 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201008250035.o7P0Zwkb094353@svn.freebsd.org> From: Rick Macklem Date: Wed, 25 Aug 2010 00:35:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211789 - head/sys/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2010 00:35:58 -0000 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 */