From: sfreed@gauss.unm.edu (Steve Freed)
Subject: Re: NFS bug in Ultrix 3.1 (on DEC3100)
Date: 7 Nov 90 18:42:06 GMT [thread overview]
Message-ID: <1990Nov7.184206.23103@ariel.unm.edu> (raw)
In-Reply-To: 1990Nov6.022044.19498@watcgl.waterloo.edu
In article <1990Nov6.022044.19498@watcgl.waterloo.edu>, megauter@watcgl.waterloo.edu (Marc E. Gauthier) writes:
> In developing an NFS client implementation, I discovered a bug in NFS server
> implementations under Ultrix (Ultrix-32 V3.1 (Rev. 11)). The VAXen servers
> kept crashing while testing my client, and I wondered why - it seems that any
> time I refer to a file outside the filesystem I have mounted (either through an
> unmounted mount point, or by giving absolute path names), the VAX panics and
> reboots.
In /usr/include/fs/nfs/nfs.h, the structure declaration for NFS file
handles (fhandle_t) is incorrect. This causes sizeof(struct fhandle_t) to
yield 36 instead of the proper size (32). The Ultrix kernel code that handles
the caching of NFS file handles depends upon this size and because of the
mis-declaration, it breaks when you use it.. this is also true when trying
to use amd.
Workarounds:
For Ultrix 3.1, change the rfind() routine in sys/fs/nfs/nfs_subr.c to
use the proper file handle size.
*** /tmp/,RCSt1a09412 Wed Oct 24 15:14:09 1990
--- /tmp/,RCSt2a09412 Wed Oct 24 15:14:14 1990
***************
*** 748,754 ****
--- 748,760 ----
for (gp = ih->gh_chain[0]; gp != (struct gnode *)ih; gp = gp->g_forw) {
if (gno == gp->g_number && fsid == gp->g_dev) {
+ #ifdef UW
+ /* For the MIPS architecture, sizeof(*fh) = 36,
+ instead of the expected 32. */
+ if (bcmp(vtofh((struct vnode *)gp), fh, NFS_FHSIZE)) {
+ #else
if (bcmp(vtofh((struct vnode *)gp), fh, sizeof(*fh))) {
+ #endif UW
if (cachedebug) printf("rfind: rejected stale gnode, #%d, 0x%x\n",
gp->g_number, gp);
continue;
For Ultrix 4.0, make the equivalent change to the nfs_match() routine in
sys/fs/nfs/nfs_subr.c:
*** /tmp/,RCSt1a09579 Wed Oct 24 15:27:21 1990
--- nfs_subr.c Wed Oct 24 15:25:25 1990
***************
*** 607,613 ****
--- 607,619 ----
struct rnode_data *rdp;
{
return(!bcmp(vtofh((struct vnode *)gp), rdp->rn_fh,
+ #ifdef UW
+ /* For the MIPS architecture, sizeof(*fh) = 36,
+ instead of the expected 32. */
+ NFS_FHSIZE));
+ #else
sizeof(fhandle_t)));
+ #endif UW
}
/*
--
Thanks,
Steve. sfreed@ariel.unm.edu
next prev parent reply other threads:[~1990-11-07 18:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-11-06 2:20 NFS bug in Ultrix 3.1 (on DEC3100) Marc E. Gauthier
1990-11-06 5:57 ` Alan's Home for Wayward Notes File.
1990-11-07 18:42 ` Steve Freed [this message]
1990-11-08 22:22 ` Stefan Brandle
1990-11-12 14:07 ` Frank Wortner
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox