All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Cong Wang <xiyou.wangcong@gmail.com>
Subject: Re: [PATCH net-next] net: vxlan: do not use vxlan_net before checking event type
Date: Mon, 20 Jan 2014 23:01:47 +0100	[thread overview]
Message-ID: <52DD9CCB.3050101@redhat.com> (raw)
In-Reply-To: <87eh428gpx.fsf@xmission.com>

On 01/20/2014 10:51 PM, Eric W. Biederman wrote:
...
> I am not going to argue against this patch as an immediate bug fix but
> something smells here, that bears deeper investigation.  It looks like
> the symptom is being patched rather than the actual problem.
>
> In particular net_generic(dev_net(dev), vxlan_net_id) is valid at the
> point that it is being called.  As the pointers are allocated in
> copy_net_ns in net_alloc prior to setup_net being called.
>
> On the flip side it is the responsibility of code that uses both
> register_netdev_notifier and register_pernet_xxx to be ready to handle
> events from any namespace as soon as they happen.  vxlan should be using
> register_pernet_subsys instead of register_pernet_device to ensure the
> vxlan_net structure is initialized before and cleaned up after all
> network devices in a given network namespace.  The vlan devices with a
> similar problem already do this.
>
> So in summary.  Something smells and I don't believe this patch fixes
> the underlying issue.  Please take a deeper look into what vxlan is doing.

Thanks for the input Eric!

If no-one is faster than me, I'll try to look into it soon.

      reply	other threads:[~2014-01-20 22:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-17 11:55 [PATCH net-next] net: vxlan: do not use vxlan_net before checking event type Daniel Borkmann
2014-01-17 17:30 ` Cong Wang
2014-01-17 18:32   ` Daniel Borkmann
2014-01-18  3:50     ` Cong Wang
2014-01-18 17:18       ` Eric Dumazet
2014-01-18 17:57         ` Cong Wang
2014-01-18 19:47           ` Daniel Borkmann
2014-01-18 23:32             ` Cong Wang
2014-01-18 23:48               ` Cong Wang
2014-01-19  0:36                 ` Daniel Borkmann
2014-01-19  0:50                   ` Cong Wang
     [not found]           ` <1390072047.31367.543.camel@edumazet-glaptop2.roam.corp.google.com>
2014-01-18 23:38             ` Cong Wang
2014-01-19  2:01               ` Eric Dumazet
2014-01-17 18:20 ` Jesse Brandeburg
2014-01-18  2:50 ` David Miller
2014-01-20 21:51 ` Eric W. Biederman
2014-01-20 22:01   ` Daniel Borkmann [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=52DD9CCB.3050101@redhat.com \
    --to=dborkman@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=xiyou.wangcong@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.