From owner-freebsd-hackers Tue Aug 10 21:34:35 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id ACE0514DFE for ; Tue, 10 Aug 1999 21:34:25 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id VAA72189; Tue, 10 Aug 1999 21:32:38 -0700 (PDT) (envelope-from dillon) Date: Tue, 10 Aug 1999 21:32:38 -0700 (PDT) From: Matthew Dillon Message-Id: <199908110432.VAA72189@apollo.backplane.com> To: "Daniel O'Connor" Cc: freebsd-hackers@FreeBSD.ORG, bvandepe@gsoft.com.au Subject: Re: Kernel malloc problem? References: Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :size - to be malloc'ed. The tail queue holding the newly- :allocated buffers is a local copy, and not subject to change :in the event of an interrupt meant for the driver. Given 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. 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. :--- :Daniel O'Connor software and network engineer -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message