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
--jZNlLGxhPb4urluq Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: +> >=20 +> > http://people.freebsd.org/~pjd/patches/md.c.3.patch +> in patch +> + sc->nsect =3D (mdio->md_size * DEV_BSIZE) / sc->secsize; +> why not=20 +> + sc->nsect =3D (mdio->md_size / sc->secsize ) * DEV_BSIZE ; +>=20 +> for avoid posible overflow in mdio->md_size * DEV_BSIZE But your fix is incorrect: mdio->md_size =3D 20 sc->secsize =3D 512 In my version: sc->nsect =3D (20 * 512) / 512 =3D 20 In your version: sc->nsect =3D (20 / 512) * 512 =3D 0 --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --jZNlLGxhPb4urluq Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAo3LiForvXbEpPzQRAinhAJ9iVYKILdcLfRPRxqmzYKkvHTaoKgCbB9qj RbaZhZkvg9LFtuVIDjNpEZE= =UzhZ -----END PGP SIGNATURE----- --jZNlLGxhPb4urluq--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040513130642.GR845>