DragonFly submit List (threaded) for 2004-01
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
[PATCH] Error in fdfree()
I just ported the new FreeBSD fd code to DragonFly. Their code
included this fix which looks like it should be applied to dfly
no matter what's decided about the rest of it. As soon as I make
sure it compiles and boots (tomorrow probably) I'll post it to
kernel@ if others are interested. But in the meantime this should
be applied I think.
Fix off-by-one error in fdfree().
Index: sys/kern/kern_descrip.c
===================================================================
RCS file: /home/dcvs/src/sys/kern/kern_descrip.c,v
retrieving revision 1.17
diff -u -r1.17 kern_descrip.c
--- sys/kern/kern_descrip.c 21 Oct 2003 01:05:09 -0000 1.17
+++ sys/kern/kern_descrip.c 17 Jan 2004 17:25:35 -0000
@@ -1117,7 +1117,7 @@
i = 0;
fpp = fdp->fd_ofiles;
for (i = 0, fpp = fdp->fd_ofiles;
- i < fdp->fd_lastfile;
+ i <= fdp->fd_lastfile;
i++, fpp++) {
if (*fpp == NULL ||
(*fpp)->f_type != DTYPE_VNODE)
--
Skip
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]