Date: Thu, 13 May 2004 15:06:42 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Alex Lyashkov <shadow@psoft.net> Cc: freebsd-hackers@FreeBSD.org Subject: Re: md(8) panic Message-ID: <20040513130642.GR845@darkness.comp.waw.pl> In-Reply-To: <1084453082.7881.17.camel@berloga.shadowland> References: <1084367285.88529.35.camel@singsing> <20040513122919.GQ845@darkness.comp.waw.pl> <1084453082.7881.17.camel@berloga.shadowland>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Thu, May 13, 2004 at 03:58:02PM +0300, Alex Lyashkov wrote: +> > This sector size is valid and shouldn't be rejected. +> > This patch works for me: +> > +> > http://people.freebsd.org/~pjd/patches/md.c.3.patch +> in patch +> + sc->nsect = (mdio->md_size * DEV_BSIZE) / sc->secsize; +> why not +> + sc->nsect = (mdio->md_size / sc->secsize ) * DEV_BSIZE ; +> +> for avoid posible overflow in mdio->md_size * DEV_BSIZE But your fix is incorrect: mdio->md_size = 20 sc->secsize = 512 In my version: sc->nsect = (20 * 512) / 512 = 20 In your version: sc->nsect = (20 / 512) * 512 = 0 -- Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAo3LiForvXbEpPzQRAinhAJ9iVYKILdcLfRPRxqmzYKkvHTaoKgCbB9qj RbaZhZkvg9LFtuVIDjNpEZE= =UzhZ -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040513130642.GR845>
