[4732] in Athena Bugs
RVD errors can panic RVD client
daemon@ATHENA.MIT.EDU (John Carr)
Wed Apr 11 04:13:55 1990
To: bugs@ATHENA.MIT.EDU
Cc: dkk@ATHENA.MIT.EDU
Date: Wed, 11 Apr 90 03:53:29 EDT
From: John Carr <jfc@ATHENA.MIT.EDU>
An RVD read error can panic an RVD client, even if the RVD is not mounted.
Apply this patch to machineio/vd.c in the kernel sources to fix this. This
is an important fix, as bad blocks on the RVD server will usually crash RVD
clients without it.
The cause is failure to check the return value of a function against NULL.
I have tested this patch to verify that it fixes the problem. (There are
really two patches here; the second is to improve an RVD error message.)
*** /tmp/,RCSt1000370 Wed Apr 11 03:46:25 1990
--- /tmp/,RCSt2000370 Wed Apr 11 03:46:26 1990
***************
*** 1002,1008 ****
printf("vd%d: bad addr\n",drive);
if (status & RVDSTDIS)
printf("vd%d: physical drive has been disabled.\n",drive);
! vdbad(vdi,dp,bp,ENXIO);
(void) splx(s);
return;
}
--- 1002,1010 ----
printf("vd%d: bad addr\n",drive);
if (status & RVDSTDIS)
printf("vd%d: physical drive has been disabled.\n",drive);
! /* ??? Is other error recovery needed ??? */
! if(bp)
! vdbad(vdi,dp,bp,ENXIO);
(void) splx(s);
return;
}
***************
*** 1142,1152 ****
/* Write response */
if (status & RVDSTVAL){
vd_longstat.vdstat.bad_data++;
! if (status & RVDSTWRL)
! printf("vd%d: write locked. ", drive);
! if (status & RVDSTDIS)
! printf("vd%d: physical drive disabled. ", drive);
! printf("st %X\n",status);
}
s = splnet();
--- 1144,1153 ----
/* Write response */
if (status & RVDSTVAL){
vd_longstat.vdstat.bad_data++;
! printf("vd%d: %s%sstatus %X\n", drive,
! (status & RVDSTWRL) ? "write locked, " : "",
! (status & RVDSTDIS) ? "physical drive disabled, " : "",
! status);
}
s = splnet();