From owner-freebsd-current@FreeBSD.ORG Mon Jul 28 03:58:51 2003 Return-Path: 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 57C1C37B401 for ; Mon, 28 Jul 2003 03:58:51 -0700 (PDT) Received: from peedub.jennejohn.org (p213.54.230.23.tisdip.tiscali.de [213.54.230.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1758643F85 for ; Mon, 28 Jul 2003 03:58:50 -0700 (PDT) (envelope-from garyj@jennejohn.org) Received: from peedub.jennejohn.org (localhost [127.0.0.1]) by peedub.jennejohn.org (8.12.9/8.11.6) with ESMTP id h6SAwPWM009155; Mon, 28 Jul 2003 12:58:26 +0200 (CEST) (envelope-from garyj@peedub.jennejohn.org) Message-Id: <200307281058.h6SAwPWM009155@peedub.jennejohn.org> X-Mailer: exmh version 2.6.3 04/04/2003 with nmh-1.0.4 To: Lukas Ertl , John-Mark Gurney , freebsd-current@freebsd.org, Mark Blackman In-Reply-To: Message from John-Mark Gurney of "Sun, 27 Jul 2003 18:06:41 PDT." <20030728010641.GQ10708@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 28 Jul 2003 12:58:25 +0200 From: Gary Jennejohn Subject: Re: device driver memory leak in 5.1-20030726? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jul 2003 10:58:51 -0000 John-Mark Gurney writes: > > --E/DnYTRukya0zdZ1 > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Lukas Ertl wrote this message on Mon, Jul 28, 2003 at 01:11 +0200: > > Then I have no explanation. I'm running the box with a WiFi card, > > generating lots of network traffic, and the box is running fine, no > > panics, and low devbuf allocation. I'm running the box with the USB > > Bluetooth dongle, generating much less traffic (it's just a 9.6kbit GSM > > link), and the box panics within half an hour in kmem_malloc, with devbuf > > allocation up to 74MB. It must be either in the Bluetooth code or in the > > USB code. > > Upon futher looking at the code, I have a better fix for this. Let me > know how things go for you. > It appears to me that the test in usb_block_allocmem() should be (p->tag->parent == tag || p->tag->parent == tag->parent) and NOT p->tag == tag! That's because bus_dma_tag_create() uses the tag passed into usb_block_allocmem() as newtag->parent! Unfortunately, bus_dma_tag is an opaque type and there's no way to access the parent member anywhere but in the MD busdma_machdep.c :-( Anyway, as written there's no way that I can see that the code can work correctly. --- Gary Jennejohn / garyj[at]jennejohn.org gj[at]freebsd.org gj[at]denx.de