From owner-freebsd-hackers Sat Jan 5 22:29:46 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from antigonus.hosting.swbell.net (antigonus.hosting.swbell.net [216.100.98.4]) by hub.freebsd.org (Postfix) with ESMTP id 1A59937B402; Sat, 5 Jan 2002 22:29:41 -0800 (PST) Received: from imimic.com (adsl-216-63-78-18.dsl.hstntx.swbell.net [216.63.78.18]) by antigonus.hosting.swbell.net id BAA28108; Sun, 6 Jan 2002 01:29:16 -0500 (EST) [ConcentricHost SMTP Relay 1.7] Message-ID: <3C37EEBB.5F88F2A@imimic.com> Date: Sun, 06 Jan 2002 00:29:15 -0600 From: "Alan L. Cox" Organization: iMimic Networking, Inc. X-Mailer: Mozilla 4.75 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en MIME-Version: 1.0 To: Alfred Perlstein Cc: tegge@freebsd.org, hackers@freebsd.org Subject: Re: oddness in aio_procrundown? References: <20020105151705.Z82406@elvis.mu.org> Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Alfred Perlstein wrote: > > ok: > > at about line 498 in vfs_aio.c: > > aiocbn = TAILQ_NEXT(aiocbe, plist); > fp = fdp->fd_ofiles[aiocbe->uaiocb.aio_fildes]; > > /* > * Under some circumstances, the aio_fildes and the file > * structure don't match. This would leave aiocbe's in the > * TAILQ associated with the socket and cause a panic later. > * > * Detect and fix. > */ > if ((fp == NULL) || (fp != aiocbe->fd_file)) > fp = aiocbe->fd_file; > > So, basically if fp is NULL or not fp != aiocbe->fd_file then it's > set to aiocbe->fd_file, doesn't that mean it should just be: > > fp = aiocbe->fd_file; > I can't explain this bit of weirdness. It existed in the original commit that added support for AIO on sockets. Alan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message