From owner-freebsd-bugs Sun Jul 22 7: 7: 4 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from mppsystems.com (mppsystems.com [208.210.148.205]) by hub.freebsd.org (Postfix) with ESMTP id BAF1837B401; Sun, 22 Jul 2001 07:07:01 -0700 (PDT) (envelope-from mpp@mppsystems.com) Received: (from mpp@localhost) by mppsystems.com (8.11.3/8.11.3) id f6ME70624361; Sun, 22 Jul 2001 09:07:00 -0500 (CDT) (envelope-from mpp) Date: Sun, 22 Jul 2001 09:07:00 -0500 From: Mike Pritchard To: mike@FreeBSD.org Cc: tri@iki.fi, freebsd-bugs@FreeBSD.org Subject: Re: kern/3384: telldir-seekdir can cause livelock Message-ID: <20010722090700.A24321@mppsystems.com> References: <200107220604.f6M64M279916@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200107220604.f6M64M279916@freefall.freebsd.org>; from mike@FreeBSD.org on Sat, Jul 21, 2001 at 11:04:22PM -0700 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, Jul 21, 2001 at 11:04:22PM -0700, mike@FreeBSD.org wrote: > Synopsis: telldir-seekdir can cause livelock > > State-Changed-From-To: open->feedback > State-Changed-By: mike > State-Changed-When: Sat Jul 21 23:04:06 PDT 2001 > State-Changed-Why: > > Does this problem still occur in newer versions of FreeBSD, > such as 4.3-RELEASE? This should probably just be closed. The test program has bugs in it that cause it to core dump (namely, when accessing file names from the dirent structure, you need to only access dp->d_namlen characters. You can't assume that the string is zero terminated. Secondly, as the man page points out, trying to use a value returned by telldir after the directory has been closed with closedir will not work because the information has been freed. All it takes to make this test program fail (after fixing the d_namlen problem) is to have a directory structure like: ./a/b/1 ./a/b/2 ./a/b/c ./a/b/c/1 ./a/b/c/2 For whatever they are trying to do, they should probably use the fts(3) routines instead. -Mike -- Mike Pritchard mpp@FreeBSD.org or mpp@mppsystems.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message