From: David Miller <davem@davemloft.net>
To: davej@redhat.com
Cc: netdev@vger.kernel.org
Subject: Re: VIA velocity skb leak.
Date: Wed, 11 Mar 2009 21:20:09 -0700 (PDT) [thread overview]
Message-ID: <20090311.212009.51140677.davem@davemloft.net> (raw)
In-Reply-To: <20090311.211706.68465072.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Wed, 11 Mar 2009 21:17:06 -0700 (PDT)
>
> velocity_xmit() needs to set 'pktlen = skb->len;' after,
> not before, the skb_padto() call.
Actually that won't work since, as you suggest, skb->len
isn't updated by skb_padto().
So the transmit needs something like:
pktlen = (skb->len > ETH_ZLEN ? : ETH_ZLEN);
velocity_free_tx_buf() needs to make the same calculation
instead of just plain skb->len
This bug probably exists in every other driver using
skb_padto() :-)
next prev parent reply other threads:[~2009-03-12 4:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-12 4:13 VIA velocity skb leak Dave Jones
2009-03-12 4:17 ` David Miller
2009-03-12 4:20 ` David Miller [this message]
2009-03-12 4:39 ` Dave Jones
2009-03-12 4:45 ` Eric Dumazet
2009-03-12 4:56 ` Dave Jones
2009-03-12 5:14 ` Eric Dumazet
2009-03-13 20:36 ` David Miller
2009-03-13 20:52 ` a2065 skb_padto cleanups Dave Jones
2009-03-19 1:18 ` David Miller
2009-03-13 21:10 ` r8169 skb leak Dave Jones
2009-03-13 22:26 ` Francois Romieu
2009-03-13 22:33 ` David Miller
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=20090311.212009.51140677.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=davej@redhat.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).