netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: Dale Farnsworth <dale@farnsworth.org>, netdev@vger.kernel.org
Subject: Re: [RFT] mv643xxx_eth_start_xmit oops
Date: Fri, 10 Nov 2006 13:35:55 -0800	[thread overview]
Message-ID: <20061110133555.7400e555@freekitty> (raw)
In-Reply-To: <20061110213043.GB9453@electric-eye.fr.zoreil.com>

On Fri, 10 Nov 2006 22:30:43 +0100
Francois Romieu <romieu@fr.zoreil.com> wrote:

> Stephen Hemminger <shemminger@osdl.org> :
> [...]
> > skb_linearize is documented to free skb on failure.
> 
> __skb_linearize
> -> __pskb_pull_tail
>    -> pskb_expand_head
>       [...]
>         data = kmalloc(size + sizeof(struct skb_shared_info), gfp_mask);
>         if (!data)
>                 goto nodata;
>       [...]
> nodata:
>         return -ENOMEM;
> 
> I don't see where the skb is freed on this path.
> 
> Btw, the same __skb_linearize() is followed by a kfree_skb() in
> drivers/net/via-velocity.c since 364c6badde0dd62a0a38e5ed67f85d87d6665780
> 
> I may be wrong but the source code does not seem completely right either.


Your correct, it does leave the skb alone. so it would be a leak.
Better documentation in skb_linearize would help.

-- 
Stephen Hemminger <shemminger@osdl.org>

  reply	other threads:[~2006-11-10 21:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061110191745.GA13783@codepoet.org>
2006-11-10 19:54 ` [RFT] mv643xxx_eth_start_xmit oops Stephen Hemminger
2006-11-10 20:30   ` Francois Romieu
2006-11-10 20:53     ` Dale Farnsworth
2006-11-10 21:03       ` Francois Romieu
2006-11-10 21:07         ` Stephen Hemminger
2006-11-10 21:30           ` Francois Romieu
2006-11-10 21:35             ` Stephen Hemminger [this message]
2006-11-10 22:03               ` [NET] Update documentation of skb_linearize Francois Romieu
2006-11-10 22:53                 ` David Miller
2006-11-10 23:34                   ` Francois Romieu

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=20061110133555.7400e555@freekitty \
    --to=shemminger@osdl.org \
    --cc=dale@farnsworth.org \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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).