netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: shemminger@vyatta.com, netdev@vger.kernel.org
Subject: Re: OOP in ip_cmsg_recv (net-next)
Date: Mon, 03 May 2010 15:23:51 -0700 (PDT)	[thread overview]
Message-ID: <20100503.152351.181464355.davem@davemloft.net> (raw)
In-Reply-To: <1272907269.2226.111.camel@edumazet-laptop>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 03 May 2010 19:21:09 +0200

>  
> -	/* skb is now orphaned, might be freed outside of locked section */
> -	consume_skb(skb);
> +	/* skb is now orphaned, can be freed outside of locked section */
> +	__kfree_skb(skb);
>  }
>  EXPORT_SYMBOL(skb_free_datagram_locked);

Eric, if you do this you undo the utility of the SKB packet drop tracing
that Neil wrote.

consome_skb() says that the application actually took in the packet and
we didn't drop it due to some error or similar.

Whereas __kfree_skb() is going to be tagged as a packet drop and the
data didn't reach the application.

So if you need to use __kfree_skb() to fix this you'll need to somehow
add some appropriate annotations for the tracer.  Perhaps add a
__consume_skb() that is marked for the tracing stuff and does what
you need.

  reply	other threads:[~2010-05-03 22:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-03 16:47 OOP in ip_cmsg_recv (net-next) Stephen Hemminger
2010-05-03 17:04 ` Eric Dumazet
2010-05-03 17:21   ` Eric Dumazet
2010-05-03 22:23     ` David Miller [this message]
2010-05-04  4:43       ` Eric Dumazet
2010-05-04  6:17         ` David Miller
2010-05-03 21:00   ` Stephen Hemminger
2010-05-03 22:30     ` 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=20100503.152351.181464355.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@vyatta.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).