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

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Mon, 3 May 2010 14:00:48 -0700

> On Mon, 03 May 2010 19:04:26 +0200
> Eric Dumazet <eric.dumazet@gmail.com> wrote:
> 
>> diff --git a/net/core/datagram.c b/net/core/datagram.c
>> index 95b851f..88949b0 100644
>> --- a/net/core/datagram.c
>> +++ b/net/core/datagram.c
>> @@ -230,12 +230,8 @@ EXPORT_SYMBOL(skb_free_datagram);
>>  void skb_free_datagram_locked(struct sock *sk, struct sk_buff *skb)
>>  {
>>  	lock_sock_bh(sk);
>> -	skb_orphan(skb);
>> -	sk_mem_reclaim_partial(sk);
>> +	skb_free_datagram(sk, skb);
>>  	unlock_sock_bh(sk);
>> -
>> -	/* skb is now orphaned, might be freed outside of locked section */
>> -	consume_skb(skb);
>>  }
>>  EXPORT_SYMBOL(skb_free_datagram_locked);
> 
> This works great for me. No messages for several hours.

Eric if we can't refine properly your other approach to fixing this
I'd like to apply this version meanwhile...

      reply	other threads:[~2010-05-03 22:30 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
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 [this message]

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.153052.38313011.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).