Subject: Re: Crashes in -current kernel
To: None <jmarin@teeri.jmp.fi>
From: Charles M. Hannum <mycroft@ai.mit.edu>
List: current-users
Date: 01/30/1996 15:22:50
It seems that when the user hangs up a modem connection, MLink
receives a SIGHUP and tries to fchmod() to restore the tty
settings. However, at this point the tty line has already been
closed and the vp->v_mount pointer in kern/vfs_syscalls.c is NULL.
Indeed, there are several system calls that could fail in this way.
The following patch should fix them (to return EBADF in this case).
Let me know if this patch causes you any new problems. I'll try to
schedule another 1.1 patch release RSN.
Index: compat/common/vfs_syscalls_43.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/common/vfs_syscalls_43.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -c -2 -r1.3 -r1.4
*** vfs_syscalls_43.c 1995/10/07 06:26:31 1.3
--- vfs_syscalls_43.c 1996/01/30 20:05:20 1.4
***************
*** 1,3 ****
! /* $NetBSD: vfs_syscalls_43.c,v 1.3 1995/10/07 06:26:31 mycroft Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: vfs_syscalls_43.c,v 1.4 1996/01/30 20:05:20 mycroft Exp $ */
/*
***************
*** 367,371 ****
syscallarg(long *) basep;
} */ *uap = v;
! register struct vnode *vp;
struct file *fp;
struct uio auio, kuio;
--- 367,371 ----
syscallarg(long *) basep;
} */ *uap = v;
! struct vnode *vp;
struct file *fp;
struct uio auio, kuio;
***************
*** 376,384 ****
long loff;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
- vp = (struct vnode *)fp->f_data;
unionread:
if (vp->v_type != VDIR)
--- 376,383 ----
long loff;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
unionread:
if (vp->v_type != VDIR)
Index: compat/ibcs2/ibcs2_misc.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/ibcs2/ibcs2_misc.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -c -2 -r1.14 -r1.15
*** ibcs2_misc.c 1996/01/07 06:11:13 1.14
--- ibcs2_misc.c 1996/01/30 20:05:22 1.15
***************
*** 1,3 ****
! /* $NetBSD: ibcs2_misc.c,v 1.14 1996/01/07 06:11:13 mycroft Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: ibcs2_misc.c,v 1.15 1996/01/30 20:05:22 mycroft Exp $ */
/*
***************
*** 349,353 ****
int ncookies;
! if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
--- 349,353 ----
int ncookies;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
***************
*** 355,360 ****
return (EBADF);
- vp = (struct vnode *)fp->f_data;
-
if (vp->v_type != VDIR) /* XXX vnode readdir op should do this */
return (EINVAL);
--- 355,358 ----
***************
*** 451,455 ****
} */ *uap = v;
register struct dirent *bdp;
! register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
register int len, reclen; /* BSD-format */
--- 449,453 ----
} */ *uap = v;
register struct dirent *bdp;
! struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
register int len, reclen; /* BSD-format */
***************
*** 468,472 ****
int ncookies;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) {
if (error == EINVAL)
return sys_read(p, uap, retval);
--- 466,470 ----
int ncookies;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp)) {
if (error == EINVAL)
return sys_read(p, uap, retval);
***************
*** 474,482 ****
return error;
}
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
! vp = (struct vnode *)fp->f_data;
if (vp->v_type != VDIR)
return sys_read(p, uap, retval);
DPRINTF(("ibcs2_read: read directory\n"));
buflen = max(MAXBSIZE, SCARG(uap, nbytes));
--- 472,482 ----
return error;
}
+
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
!
if (vp->v_type != VDIR)
return sys_read(p, uap, retval);
+
DPRINTF(("ibcs2_read: read directory\n"));
buflen = max(MAXBSIZE, SCARG(uap, nbytes));
Index: compat/ibcs2/ibcs2_stat.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/ibcs2/ibcs2_stat.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -c -2 -r1.4 -r1.5
*** ibcs2_stat.c 1995/10/07 06:26:55 1.4
--- ibcs2_stat.c 1996/01/30 20:05:25 1.5
***************
*** 136,139 ****
--- 136,140 ----
syscallarg(int) fstype;
} */ *uap = v;
+ struct vnode *vp;
struct file *fp;
struct mount *mp;
***************
*** 141,147 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
! mp = ((struct vnode *)fp->f_data)->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
--- 142,148 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
! mp = vp->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
Index: compat/linux/linux_misc.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/linux/linux_misc.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -c -2 -r1.24 -r1.25
*** linux_misc.c 1995/12/18 14:35:08 1.24
--- linux_misc.c 1996/01/30 20:05:27 1.25
***************
*** 1,3 ****
! /* $NetBSD: linux_misc.c,v 1.24 1995/12/18 14:35:08 fvdl Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: linux_misc.c,v 1.25 1996/01/30 20:05:27 mycroft Exp $ */
/*
***************
*** 503,506 ****
--- 503,512 ----
SCARG(&cma,pos) = lmap.lm_pos;
+ #if 0
+ printf("linux_sys_mmap: addr=%x, len=%x, prot=%x, flags=%x, fd=%x, pos=%x\n",
+ SCARG(&cma,addr), SCARG(&cma,len), SCARG(&cma,prot),
+ SCARG(&cma,flags), SCARG(&cma,fd), SCARG(&cma,pos));
+ #endif
+
return sys_mmap(p, &cma, retval);
}
***************
*** 765,775 ****
int ncookies;
! if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
-
- vp = (struct vnode *)fp->f_data;
if (vp->v_type != VDIR) /* XXX vnode readdir op should do this */
--- 771,779 ----
int ncookies;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
if (vp->v_type != VDIR) /* XXX vnode readdir op should do this */
Index: compat/osf1/osf1_mount.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/osf1/osf1_mount.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -c -2 -r1.5 -r1.6
*** osf1_mount.c 1995/10/07 06:27:24 1.5
--- osf1_mount.c 1996/01/30 20:05:29 1.6
***************
*** 1,3 ****
! /* $NetBSD: osf1_mount.c,v 1.5 1995/10/07 06:27:24 mycroft Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: osf1_mount.c,v 1.6 1996/01/30 20:05:29 mycroft Exp $ */
/*
***************
*** 228,231 ****
--- 228,232 ----
syscallarg(int) len;
} */ *uap = v;
+ struct vnode *vp;
struct file *fp;
struct mount *mp;
***************
*** 234,240 ****
int error;
! if (error = getvnode(p->p_fd, uap->fd, &fp))
return (error);
! mp = ((struct vnode *)fp->f_data)->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
--- 235,241 ----
int error;
! if (error = getvnode(p->p_fd, uap->fd, &vp, &fp))
return (error);
! mp = vp->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
Index: compat/sunos/sunos_misc.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/sunos/sunos_misc.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -c -2 -r1.60 -r1.61
*** sunos_misc.c 1996/01/05 16:53:14 1.60
--- sunos_misc.c 1996/01/30 20:05:31 1.61
***************
*** 1,3 ****
! /* $NetBSD: sunos_misc.c,v 1.60 1996/01/05 16:53:14 pk Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: sunos_misc.c,v 1.61 1996/01/30 20:05:31 mycroft Exp $ */
/*
***************
*** 341,345 ****
int ncookies;
! if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
--- 341,345 ----
int ncookies;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
***************
*** 347,352 ****
return (EBADF);
- vp = (struct vnode *)fp->f_data;
-
if (vp->v_type != VDIR) /* XXX vnode readdir op should do this */
return (EINVAL);
--- 347,350 ----
***************
*** 576,588 ****
register struct sunos_sys_fchroot_args *uap = v;
register struct filedesc *fdp = p->p_fd;
! register struct vnode *vp;
struct file *fp;
int error;
! if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
return (error);
! if ((error = getvnode(fdp, SCARG(uap, fd), &fp)) != 0)
return (error);
- vp = (struct vnode *)fp->f_data;
VOP_LOCK(vp);
if (vp->v_type != VDIR)
--- 574,585 ----
register struct sunos_sys_fchroot_args *uap = v;
register struct filedesc *fdp = p->p_fd;
! struct vnode *vp;
struct file *fp;
int error;
! if (error = suser(p->p_ucred, &p->p_acflag))
return (error);
! if (error = getvnode(fdp, SCARG(uap, fd), &vp, &fp))
return (error);
VOP_LOCK(vp);
if (vp->v_type != VDIR)
***************
*** 838,841 ****
--- 835,839 ----
{
struct sunos_sys_fstatfs_args *uap = v;
+ struct vnode *vp;
struct file *fp;
struct mount *mp;
***************
*** 843,849 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
! mp = ((struct vnode *)fp->f_data)->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
--- 841,847 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
! mp = vp->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
Index: compat/svr4/svr4_misc.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/svr4/svr4_misc.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -c -2 -r1.29 -r1.30
*** svr4_misc.c 1995/10/14 20:24:35 1.29
--- svr4_misc.c 1996/01/30 20:05:33 1.30
***************
*** 1,3 ****
! /* $NetBSD: svr4_misc.c,v 1.29 1995/10/14 20:24:35 christos Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: svr4_misc.c,v 1.30 1996/01/30 20:05:33 mycroft Exp $ */
/*
***************
*** 211,215 ****
int ncookies;
! if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
--- 211,215 ----
int ncookies;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
***************
*** 217,222 ****
return (EBADF);
- vp = (struct vnode *)fp->f_data;
-
if (vp->v_type != VDIR) /* XXX vnode readdir op should do this */
return (EINVAL);
--- 217,220 ----
***************
*** 344,352 ****
int error;
! if ((error = suser(p->p_ucred, &p->p_acflag)) != 0)
return error;
! if ((error = getvnode(fdp, SCARG(uap, fd), &fp)) != 0)
return error;
- vp = (struct vnode *) fp->f_data;
VOP_LOCK(vp);
if (vp->v_type != VDIR)
--- 342,349 ----
int error;
! if (error = suser(p->p_ucred, &p->p_acflag))
return error;
! if (error = getvnode(fdp, SCARG(uap, fd), &vp, &fp))
return error;
VOP_LOCK(vp);
if (vp->v_type != VDIR)
Index: compat/ultrix/ultrix_pathname.c
===================================================================
RCS file: /a/cvsroot/src/sys/compat/ultrix/ultrix_pathname.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -c -2 -r1.1 -r1.2
*** ultrix_pathname.c 1996/01/07 13:38:52 1.1
--- ultrix_pathname.c 1996/01/30 20:05:35 1.2
***************
*** 1,3 ****
! /* $NetBSD: ultrix_pathname.c,v 1.1 1996/01/07 13:38:52 jonathan Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: ultrix_pathname.c,v 1.2 1996/01/30 20:05:35 mycroft Exp $ */
/*
***************
*** 272,275 ****
--- 272,276 ----
{
struct ultrix_sys_fstatfs_args *uap = v;
+ struct vnode *vp;
struct file *fp;
struct mount *mp;
***************
*** 277,283 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
! mp = ((struct vnode *)fp->f_data)->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
--- 278,284 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
! mp = vp->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
Index: kern/vfs_syscalls.c
===================================================================
RCS file: /a/cvsroot/src/sys/kern/vfs_syscalls.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -c -2 -r1.59 -r1.60
*** vfs_syscalls.c 1995/11/11 22:00:18 1.59
--- vfs_syscalls.c 1996/01/30 20:05:38 1.60
***************
*** 1,3 ****
! /* $NetBSD: vfs_syscalls.c,v 1.59 1995/11/11 22:00:18 mycroft Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: vfs_syscalls.c,v 1.60 1996/01/30 20:05:38 mycroft Exp $ */
/*
***************
*** 524,527 ****
--- 524,528 ----
syscallarg(struct statfs *) buf;
} */ *uap = v;
+ struct vnode *vp;
struct file *fp;
struct mount *mp;
***************
*** 529,535 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
! mp = ((struct vnode *)fp->f_data)->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
--- 530,536 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
! mp = vp->v_mount;
sp = &mp->mnt_stat;
if (error = VFS_STATFS(mp, sp, p))
***************
*** 605,611 ****
int error;
! if (error = getvnode(fdp, SCARG(uap, fd), &fp))
return (error);
- vp = (struct vnode *)fp->f_data;
VREF(vp);
VOP_LOCK(vp);
--- 606,611 ----
int error;
! if (error = getvnode(fdp, SCARG(uap, fd), &vp, &fp))
return (error);
VREF(vp);
VOP_LOCK(vp);
***************
*** 1384,1390 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
- vp = (struct vnode *)fp->f_data;
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
--- 1384,1389 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
***************
*** 1453,1459 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
- vp = (struct vnode *)fp->f_data;
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
--- 1452,1457 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
***************
*** 1525,1531 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
- vp = (struct vnode *)fp->f_data;
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
--- 1523,1528 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
***************
*** 1644,1652 ****
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
if ((fp->f_flag & FWRITE) == 0)
return (EINVAL);
- vp = (struct vnode *)fp->f_data;
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
--- 1641,1648 ----
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
if ((fp->f_flag & FWRITE) == 0)
return (EINVAL);
VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
VOP_LOCK(vp);
***************
*** 1674,1684 ****
syscallarg(int) fd;
} */ *uap = v;
! register struct vnode *vp;
struct file *fp;
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
- vp = (struct vnode *)fp->f_data;
VOP_LOCK(vp);
error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
--- 1670,1679 ----
syscallarg(int) fd;
} */ *uap = v;
! struct vnode *vp;
struct file *fp;
int error;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
VOP_LOCK(vp);
error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, p);
***************
*** 1881,1885 ****
syscallarg(long *) basep;
} */ *uap = v;
! register struct vnode *vp;
struct file *fp;
struct uio auio;
--- 1876,1880 ----
syscallarg(long *) basep;
} */ *uap = v;
! struct vnode *vp;
struct file *fp;
struct uio auio;
***************
*** 1888,1896 ****
int error, eofflag;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp))
return (error);
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
- vp = (struct vnode *)fp->f_data;
unionread:
if (vp->v_type != VDIR)
--- 1883,1890 ----
int error, eofflag;
! if (error = getvnode(p->p_fd, SCARG(uap, fd), &vp, &fp))
return (error);
if ((fp->f_flag & FREAD) == 0)
return (EBADF);
unionread:
if (vp->v_type != VDIR)
***************
*** 2034,2042 ****
* Convert a user file descriptor to a kernel file entry.
*/
! getvnode(fdp, fd, fpp)
struct filedesc *fdp;
- struct file **fpp;
int fd;
{
struct file *fp;
--- 2028,2039 ----
* Convert a user file descriptor to a kernel file entry.
*/
! int
! getvnode(fdp, fd, vpp, fpp)
struct filedesc *fdp;
int fd;
+ struct vnode **vpp;
+ struct file **fpp;
{
+ struct vnode *vp;
struct file *fp;
***************
*** 2046,2049 ****
--- 2043,2050 ----
if (fp->f_type != DTYPE_VNODE)
return (EINVAL);
+ vp = (struct vnode *)fp->f_data;
+ if (vp->v_type == VBAD)
+ return (EBADF);
+ *vpp = vp;
*fpp = fp;
return (0);
Index: miscfs/deadfs/dead_vnops.c
===================================================================
RCS file: /a/cvsroot/src/sys/miscfs/deadfs/dead_vnops.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -c -2 -r1.13 -r1.14
*** dead_vnops.c 1995/04/10 00:48:46 1.13
--- dead_vnops.c 1996/01/30 20:05:40 1.14
***************
*** 1,3 ****
! /* $NetBSD: dead_vnops.c,v 1.13 1995/04/10 00:48:46 mycroft Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: dead_vnops.c,v 1.14 1996/01/30 20:05:40 mycroft Exp $ */
/*
***************
*** 55,60 ****
#define dead_close ((int (*) __P((struct vop_close_args *)))nullop)
#define dead_access ((int (*) __P((struct vop_access_args *)))dead_ebadf)
! #define dead_getattr ((int (*) __P((struct vop_getattr_args *)))dead_ebadf)
! #define dead_setattr ((int (*) __P((struct vop_setattr_args *)))dead_ebadf)
int dead_read __P((struct vop_read_args *));
int dead_write __P((struct vop_write_args *));
--- 55,60 ----
#define dead_close ((int (*) __P((struct vop_close_args *)))nullop)
#define dead_access ((int (*) __P((struct vop_access_args *)))dead_ebadf)
! #define dead_getattr ((int (*) __P((struct vop_getattr_args *)))dead_badop)
! #define dead_setattr ((int (*) __P((struct vop_setattr_args *)))dead_badop)
int dead_read __P((struct vop_read_args *));
int dead_write __P((struct vop_write_args *));
***************
*** 62,66 ****
int dead_select __P((struct vop_select_args *));
#define dead_mmap ((int (*) __P((struct vop_mmap_args *)))dead_badop)
! #define dead_fsync ((int (*) __P((struct vop_fsync_args *)))nullop)
#define dead_seek ((int (*) __P((struct vop_seek_args *)))nullop)
#define dead_remove ((int (*) __P((struct vop_remove_args *)))dead_badop)
--- 62,66 ----
int dead_select __P((struct vop_select_args *));
#define dead_mmap ((int (*) __P((struct vop_mmap_args *)))dead_badop)
! #define dead_fsync ((int (*) __P((struct vop_fsync_args *)))dead_badop)
#define dead_seek ((int (*) __P((struct vop_seek_args *)))nullop)
#define dead_remove ((int (*) __P((struct vop_remove_args *)))dead_badop)
***************
*** 86,90 ****
#define dead_valloc ((int (*) __P((struct vop_valloc_args *)))dead_badop)
#define dead_vfree ((int (*) __P((struct vop_vfree_args *)))dead_badop)
! #define dead_truncate ((int (*) __P((struct vop_truncate_args *)))nullop)
#define dead_update ((int (*) __P((struct vop_update_args *)))nullop)
#define dead_bwrite ((int (*) __P((struct vop_bwrite_args *)))nullop)
--- 86,90 ----
#define dead_valloc ((int (*) __P((struct vop_valloc_args *)))dead_badop)
#define dead_vfree ((int (*) __P((struct vop_vfree_args *)))dead_badop)
! #define dead_truncate ((int (*) __P((struct vop_truncate_args *)))dead_badop)
#define dead_update ((int (*) __P((struct vop_update_args *)))nullop)
#define dead_bwrite ((int (*) __P((struct vop_bwrite_args *)))nullop)
Index: sys/vnode.h
===================================================================
RCS file: /a/cvsroot/src/sys/sys/vnode.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -c -2 -r1.32 -r1.33
*** vnode.h 1995/03/26 20:25:05 1.32
--- vnode.h 1996/01/30 20:05:43 1.33
***************
*** 1,3 ****
! /* $NetBSD: vnode.h,v 1.32 1995/03/26 20:25:05 jtc Exp $ */
/*
--- 1,3 ----
! /* $NetBSD: vnode.h,v 1.33 1996/01/30 20:05:43 mycroft Exp $ */
/*
***************
*** 350,353 ****
--- 350,354 ----
*/
struct file;
+ struct filedesc;
struct mount;
struct nameidata;
***************
*** 364,367 ****
--- 365,370 ----
int getnewvnode __P((enum vtagtype tag,
struct mount *mp, int (**vops)(), struct vnode **vpp));
+ int getvnode __P((struct filedesc *fdp,
+ int fd, struct vnode **vpp, struct file **fpp));
void vattr_null __P((struct vattr *vap));
int vcount __P((struct vnode *vp));