[4466] in Athena Bugs
Partial fix for NFS client panic: kernel trap
daemon@ATHENA.MIT.EDU (John Carr)
Thu Mar 8 08:26:30 1990
To: bugs@ATHENA.MIT.EDU
Date: Thu, 08 Mar 90 08:26:07 EST
From: John Carr <jfc@ATHENA.MIT.EDU>
I've sent a few messages to bugs about a race condition while unmounting
NFS filesystems that can cause the kernel to panic. This is a partial
workaround for the bug (it doesn't fix it, as the invalid buffer should be
removed from queues and I/O on it marked done). This may leave hung
processes around, but at least the machine can be shut down gracefully.
Apply this patch to /source/bsd-4.3/common/sys/nfs/nfs_vnodeops.c.
*** /tmp/,RCSt1002377 Thu Mar 8 06:42:37 1990
--- nfs_vnodeops.c Wed Mar 7 19:17:11 1990
***************
*** 1420,1425 ****
--- 1420,1429 ----
bp->b_un.b_addr, bp->b_blkno, bp->b_blkno * DEV_BSIZE,
bp->b_bcount, bp->b_flags & B_READ);
#endif
+ if(bp->b_flags & B_INVAL) {
+ printf("nfs do_bio: Invalid buffer %x\n", bp);
+ return;
+ }
if ((bp->b_flags & B_READ) == B_READ) {
bp->b_error = nfsread(bp->b_vp, bp->b_un.b_addr,
bp->b_blkno * DEV_BSIZE, (int)bp->b_bcount,