Date: Sat, 5 Jan 2002 15:17:05 -0600 From: Alfred Perlstein <bright@mu.org> To: alc@freebsd.org Cc: tegge@freebsd.org, hackers@freebsd.org Subject: oddness in aio_procrundown? Message-ID: <20020105151705.Z82406@elvis.mu.org>
next in thread | raw e-mail | index | archive | help
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;
Index: vfs_aio.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/vfs_aio.c,v
retrieving revision 1.107
diff -u -r1.107 vfs_aio.c
--- vfs_aio.c 2 Jan 2002 07:04:38 -0000 1.107
+++ vfs_aio.c 5 Jan 2002 21:21:00 -0000
@@ -496,17 +496,7 @@
for (aiocbe = TAILQ_FIRST(&ki->kaio_sockqueue); aiocbe; aiocbe =
aiocbn) {
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;
+ fp = aiocbe->fd_file;
if (fp) {
so = (struct socket *)fp->f_data;
TAILQ_REMOVE(&so->so_aiojobq, aiocbe, list);
--
-Alfred Perlstein [alfred@freebsd.org]
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductable donations for FreeBSD: http://www.freebsdfoundation.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020105151705.Z82406>
