public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Manfred Spraul <manfred@colorfullife.com>,
	Ayaz Abdulla <AAbdulla@nvidia.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Netdev <netdev@oss.sgi.com>
Subject: Re: [PATCH] forcedeth: fix random memory scribbling bug
Date: Sat, 24 Dec 2005 16:06:02 -0500	[thread overview]
Message-ID: <43ADB83A.4090005@pobox.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0512241241230.14098@g5.osdl.org>

Linus Torvalds wrote:
> 
> 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.

Paranoia -- the situation above never occurs.  It is coded as are other 
drivers:  np->rx_buf_sz only changes in ->change_mtu(), which (a) is 
serialized against close and (b) always stops the engine and drains RX 
skbs before changing the size.

So can we please remove the subtraction code now added to the hot path? 
  If not now, for 2.6.16?

	Jeff




  reply	other threads:[~2005-12-24 21:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-24 13:19 [PATCH] forcedeth: fix random memory scribbling bug Manfred Spraul
2005-12-24 15:09 ` Jeff Garzik
2005-12-24 16:08   ` Manfred Spraul
2005-12-24 19:57     ` Linus Torvalds
2005-12-24 19:52 ` Linus Torvalds
2005-12-24 19:56   ` Manfred Spraul
2005-12-24 20:41     ` Linus Torvalds
2005-12-24 21:06       ` Jeff Garzik [this message]
2005-12-24 21:20         ` Francois Romieu
2005-12-24 19:58   ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43ADB83A.4090005@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=AAbdulla@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=netdev@oss.sgi.com \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox