Date: Thu, 1 Jul 1999 12:57:43 +1000 From: Bruce Evans <bde@zeta.org.au> To: jgreco@ns.sol.net, wilko@yedi.iaf.nl Cc: ken@plutotech.com, scsi@FreeBSD.ORG Subject: Re: FreeBSD panics with Mylex DAC960SX Message-ID: <199907010257.MAA30296@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>Now, based on some trace printf's I sprinkled in dscheck, it looks to >me like I get as far as > >if (bp->b_bcount % ssp->dss_secsize) > goto bad_bcount; > >around line #191 of kern/subr_diskslice.c. (you can see the "ckpt1c" >interspersed with other output if you look carefully). It does not >hit the printf() right after that, so I am guessing that ssp->dss_secsize >is probably zero. Try this "fix" for dsopen(). This should cause open() to fail before the sector size is used; in particular it should prevent divisions by sector sizes of 0. I don't know how open() gets so far before the sector size is known. Bruce diff -c2 subr_diskslice.c~ subr_diskslice.c *** subr_diskslice.c~ Sat Jun 26 23:42:00 1999 --- subr_diskslice.c Thu Jul 1 12:42:09 1999 *************** *** 731,735 **** unit = dkunit(dev); ! if (lp->d_secsize % DEV_BSIZE) { printf("%s%d: invalid sector size %lu\n", dname, unit, (u_long)lp->d_secsize); --- 731,735 ---- unit = dkunit(dev); ! if (lp->d_secsize == 0 || lp->d_secsize % DEV_BSIZE != 0) { printf("%s%d: invalid sector size %lu\n", dname, unit, (u_long)lp->d_secsize); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907010257.MAA30296>