Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 1999 14:44:18 +0930 (CST)
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        bvandepe@gsoft.com.au, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Kernel malloc problem?
Message-ID:  <XFMail.990811144418.doconnor@gsoft.com.au>
In-Reply-To: <199908110432.VAA72189@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990811144418.doconnor>