Received: with ECARTIS (v1.0.0; list netdev); Sat, 24 Dec 2005 12:45:43 -0800 (PST) Received: from smtp.osdl.org (smtp.osdl.org [65.172.181.4]) by oss.sgi.com (8.12.10/8.12.10/SuSE Linux 0.7) with ESMTP id jBOKjd8n023297 for ; Sat, 24 Dec 2005 12:45:40 -0800 Received: from shell0.pdx.osdl.net (fw.osdl.org [65.172.181.6]) by smtp.osdl.org (8.12.8/8.12.8) with ESMTP id jBOKfbDZ025626 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Sat, 24 Dec 2005 12:41:38 -0800 Received: from localhost (shell0.pdx.osdl.net [10.9.0.31]) by shell0.pdx.osdl.net (8.13.1/8.11.6) with ESMTP id jBOKfZRU010478; Sat, 24 Dec 2005 12:41:36 -0800 Date: Sat, 24 Dec 2005 12:41:35 -0800 (PST) From: Linus Torvalds To: Manfred Spraul cc: Jeff Garzik , Ayaz Abdulla , Linux Kernel Mailing List , Netdev Subject: Re: [PATCH] forcedeth: fix random memory scribbling bug In-Reply-To: <43ADA7D0.9010908@colorfullife.com> Message-ID: References: <43AD4ADC.8050004@colorfullife.com> <43ADA7D0.9010908@colorfullife.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-MIMEDefang-Filter: osdl$Revision: 1.129 $ X-Scanned-By: MIMEDefang 2.36 X-archive-position: 4745 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: torvalds@osdl.org Precedence: bulk X-list: netdev Content-Length: 531 Lines: 17 On Sat, 24 Dec 2005, Manfred Spraul wrote: > Linus Torvalds wrote: > > > Of course, on the alloc path, it seems to add an additional > > "NV_RX_ALLOC_PAD" thing, so maybe the "end-data" thing makes sense. > > The problem is the pci_unmap_single() call that happens during nv_close() or > the rx interrupt handler. I think it makes more sense to rely on fields in the > individual skb instead of reading from np->rx_buf_sz. If np->rx_buf_sz changes > inbetween, then we have a memory leak. Fair enough. Patch applied. Linus