From owner-freebsd-hackers@FreeBSD.ORG Thu May 13 06:06:47 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 312C516A4CE for ; Thu, 13 May 2004 06:06:47 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 041E343D1F for ; Thu, 13 May 2004 06:06:46 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 2B8D7ACBCB; Thu, 13 May 2004 15:06:42 +0200 (CEST) Date: Thu, 13 May 2004 15:06:42 +0200 From: Pawel Jakub Dawidek To: Alex Lyashkov Message-ID: <20040513130642.GR845@darkness.comp.waw.pl> References: <1084367285.88529.35.camel@singsing> <20040513122919.GQ845@darkness.comp.waw.pl> <1084453082.7881.17.camel@berloga.shadowland> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jZNlLGxhPb4urluq" Content-Disposition: inline In-Reply-To: <1084453082.7881.17.camel@berloga.shadowland> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@FreeBSD.org Subject: Re: md(8) panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2004 13:06:47 -0000 --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--