public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [RFC] possible bug in inet->opt handling
Date: Sat, 16 Apr 2011 01:24:26 +0800	[thread overview]
Message-ID: <20110415172426.GA5782@gondor.apana.org.au> (raw)
In-Reply-To: <20110415171715.GA5648@gondor.apana.org.au>

On Sat, Apr 16, 2011 at 01:17:15AM +0800, Herbert Xu wrote:
> On Fri, Apr 15, 2011 at 05:39:54PM +0200, Eric Dumazet wrote:
> >
> > My plan is to add RCU protection on inet->opt, unless someone has better
> > idea ?
> 
> inet->opt is rarely non-NULL.  So perhaps just throw some locks
> around the memcpy.

Ah I missed your other point about inet->opt going away.  The
other option would be to always kmalloc/memcpy in udp_sendmsg
and have ip_setup_cork simply steal the reference from ipc.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2011-04-15 17:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-15 15:39 [RFC] possible bug in inet->opt handling Eric Dumazet
2011-04-15 17:17 ` Herbert Xu
2011-04-15 17:24   ` Herbert Xu [this message]
2011-04-21 19:45 ` [PATCH] inet: add RCU protection to inet->opt Eric Dumazet
2011-04-28 20:20   ` David Miller
2011-04-28 20:49     ` Eric Dumazet
2011-04-28 20:52       ` David Miller
2011-04-28 20:55         ` Eric Dumazet

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=20110415172426.GA5782@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.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