From owner-freebsd-current Wed Oct 9 21:50:29 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C1CC37B406 for ; Wed, 9 Oct 2002 21:50:28 -0700 (PDT) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id E102343E65 for ; Wed, 9 Oct 2002 21:50:26 -0700 (PDT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g9A4oPpk088930; Wed, 9 Oct 2002 22:50:25 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 09 Oct 2002 22:50:04 -0600 (MDT) Message-Id: <20021009.225004.115563444.imp@bsdimp.com> To: twchan@singnet.com.sg Cc: current@FreeBSD.ORG Subject: Re: dc and PCMCIA still panic From: "M. Warner Losh" In-Reply-To: <20021008125918.E67735-100000@zaapth.twnet.org> References: <20021007.220252.50068329.imp@bsdimp.com> <20021008125918.E67735-100000@zaapth.twnet.org> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20021008125918.E67735-100000@zaapth.twnet.org> Chan Tur Wei writes: : Testing for the condition avoids the fault but leaves the card unusable : under -newcard. : : ====================================================================== : --- pccard_cis.c Tue Oct 8 13:04:34 2002 : +++ pccard_cis.c.new Tue Oct 8 13:04:01 2002 : @@ -152,6 +152,11 @@ : while (1) { : /* get the tuple code */ : : + if (tuple.ptr >= PCCARD_CIS_SIZE) { : + ret = 1; : + goto done; : + } : + : tuple.code = pccard_cis_read_1(&tuple, tuple.ptr); : : /* two special-case tuples */ : ====================================================================== Unfortunately, I don't think that this is valid. A longlink to common memory can legitimately be outside of this range. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message