From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael =?UTF-8?B?QsO8c2No?= Subject: Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten Date: Tue, 5 Jul 2011 18:27:03 +0200 Message-ID: <20110705182703.0bb9eb33@maggie> References: <1309839258.2720.17.camel@edumazet-laptop> <1309839928.2720.23.camel@edumazet-laptop> <1309840708.2720.31.camel@edumazet-laptop> <1309842642.2720.36.camel@edumazet-laptop> <1309844009.2720.39.camel@edumazet-laptop> <1309845573.2720.41.camel@edumazet-laptop> <20110705160531.GC2959@hmsreliant.think-freely.org> <1309882352.2271.19.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Neil Horman , Alexey Zaytsev , Andrew Morton , netdev@vger.kernel.org, Gary Zambrano , bugme-daemon@bugzilla.kernel.org, "David S. Miller" , Pekka Pietikainen , Florian Schirmer , Felix Fietkau , Michael Buesch To: Eric Dumazet Return-path: Received: from bues.ch ([80.190.117.144]:49508 "EHLO bues.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754542Ab1GEQ12 (ORCPT ); Tue, 5 Jul 2011 12:27:28 -0400 In-Reply-To: <1309882352.2271.19.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 05 Jul 2011 18:12:32 +0200 Eric Dumazet wrote: > Hmm... We are in a NAPI handler... There wont be a new interrupt. > > Plus, we do at start of b44_rx() : > > prod = br32(bp, B44_DMARX_STAT) & DMARX_STAT_CDMASK; > > So all descriptors before prod are guaranteed to be ready for host > consume... Fact that a dma access is running on 'next descriptor' should > be irrelevant. > > IMHO Peeking B44_DMARX_STAT for each packet would be a waste of time. Yeah I think so, too. We don't need to wait for the _whole_ DMA engine to go idle, before we can access a buffer in the ring. We just need to make sure that the device is finished with that buffer. And we do this by reading the current descriptor pointer.