From owner-cvs-all Wed Jan 16 16:12:13 2002 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D721037B417; Wed, 16 Jan 2002 16:12:05 -0800 (PST) Received: (from alfred@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0H0C5v67884; Wed, 16 Jan 2002 16:12:05 -0800 (PST) (envelope-from alfred) Message-Id: <200201170012.g0H0C5v67884@freefall.freebsd.org> From: Alfred Perlstein Date: Wed, 16 Jan 2002 16:12:05 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.sbin/rpc.lockd lockd_lock.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG alfred 2002/01/16 16:12:05 PST Modified files: usr.sbin/rpc.lockd lockd_lock.c Log: Fix boundry condition in lock management: Alfred, I took a look at retry_blockingfilelocklist() and the solution seemed simple enough. Please correct me if I am wrong. It seems said routine doesn't take into account boundary conditions when putting back file_lock entries into the blocked lock-list. Specifically, it fails when the file_lock being put back is the last element in the list, and when it is the only element in the list. I've included a patch below. Basically, it introduces another variable: pfl, which keeps track of the list item before ifl. That way if nfl is NULL, ifl gets inserted after pfl. If pfl is also NULL, then it gets inserted at the head of the list (since it was the only element in the list). Submitted by: Mike Makonnen Tested by: Thomas Quinot Revision Changes Path 1.7 +13 -2 src/usr.sbin/rpc.lockd/lockd_lock.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message