From owner-freebsd-hackers Tue Aug 10 22:16:11 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from cain.gsoft.com.au (genesi.lnk.telstra.net [139.130.136.161]) by hub.freebsd.org (Postfix) with ESMTP id BCB39154B4 for ; Tue, 10 Aug 1999 22:15:09 -0700 (PDT) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (doconnor@cain [203.38.152.97]) by cain.gsoft.com.au (8.8.8/8.8.8) with ESMTP id OAA02458; Wed, 11 Aug 1999 14:44:18 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="_=XFMail.1.3.p0.FreeBSD:990811144418:611=_"; micalg=pgp-md5; protocol="application/pgp-signature" In-Reply-To: <199908110432.VAA72189@apollo.backplane.com> Date: Wed, 11 Aug 1999 14:44:18 +0930 (CST) From: "Daniel O'Connor" To: Matthew Dillon Subject: Re: Kernel malloc problem? Cc: bvandepe@gsoft.com.au, freebsd-hackers@FreeBSD.ORG Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG This message is in MIME format --_=XFMail.1.3.p0.FreeBSD:990811144418:611=_ Content-Type: text/plain; charset=us-ascii On 11-Aug-99 Matthew Dillon wrote: > If the interrupt scans or in any way accesses the buffer list, > you have to disable interrupts temporarily using the appropriate > spl*() calls whenever your non-interrupt code (i.e. the ioctl code) > makes modifications to the list. Otherwise the interrupt might > occur while the list and/or buffers are in an invalid state. Yes we have splhigh() around code which modifies any of the lists/pointers that the interrupt routine calls. > If that isn't the problem, look for situations where you might > be corrupting memory within the driver. The two most common > situations are where you accidently leave references to a buffer > you just freed, or where you overrun a buffer. Yes, well the we can reproduce the corruption. One place it happens is during the construction of the list (the code I showed you). The list in question is used by _nothing_ else (the list is built and then 'transfered' to the list the interrupt handler will used). The corruption seems to occur while the list is being built, but only with some specific buffer sizes :-/ --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum --_=XFMail.1.3.p0.FreeBSD:990811144418:611=_ Content-Type: application/pgp-signature -----BEGIN PGP MESSAGE----- Version: 2.6.3ia iQCVAwUBN7EGqlbYW/HEoF9pAQEFQgQAp7pE2/PfIGXTf1XUpAAuxA6EQTpryGU4 EH1xhFGrbD2l8Nc4e/6Ys1zGbGkW+2kpgIR/uGSPJimKq+t4G4Sefo0qQ6hYnA2K 1UpISmtUscHkSYqlZHUUDjNFvUUDAB0ml+/A5Gb0ZXPSUhnIyu8eaagXYtiHxO+M sqQDJQcMUNA= =Bkp1 -----END PGP MESSAGE----- --_=XFMail.1.3.p0.FreeBSD:990811144418:611=_-- End of MIME message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message