netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Patrick McHardy <kaber@trash.net>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>,
	"" <davem@davemloft.net>, "Michael S. Tsirkin" <mst@redhat.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Or Gerlitz <ogerlitz@voltaire.com>,
	"Fischer, Anna" <anna.fischer@hp.com>,
	Anthony Liguori <anthony@codemonkey.ws>,
	virtualization@lists.linux-foundation.org,
	netdev@vger.kernel.org, bridge@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org,
	Edge Virtual Bridging <evb@yahoogroups.com>
Subject: Re: [RFC] macvlan: add tap device backend
Date: Mon, 14 Dec 2009 16:40:13 +0100	[thread overview]
Message-ID: <200912141640.13562.arnd@arndb.de> (raw)
In-Reply-To: <4B26353A.9020005@trash.net>

On Monday 14 December 2009, Patrick McHardy wrote:
> > +     classdev = device_create(macvtap_class, &dev->dev, devt,
> > +                              dev, "tap%d", dev->ifindex);
> > +     if (IS_ERR(classdev)) {
> > +             err = PTR_ERR(classdev);
> > +             macvtap_del_queues(dev);
> > +             macvlan_dellink(dev, NULL);
> 
> I think this may cause a double free since macvlan_dellink() will
> free the device and rtnl_newlink() will free it again on error.

Ah, right. I've changed this part a few times now, but I think introduced
the same bug again in the current version. I'll send out what I have now
if you want to take another look.

	Arnd

      reply	other threads:[~2009-12-14 15:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03 17:51 [RFC 0/2] macvtap, second try Arnd Bergmann
2009-12-03 17:51 ` [RFC 1/2] macvlan: Allow plugging in additional backends Arnd Bergmann
2009-12-14 12:49   ` Patrick McHardy
2009-12-03 17:52 ` [RFC] macvlan: add tap device backend Arnd Bergmann
2009-12-12  8:41   ` Herbert Xu
2009-12-14 12:00     ` Arnd Bergmann
2009-12-14 12:38       ` David Miller
2009-12-14 12:53   ` Patrick McHardy
2009-12-14 15:40     ` Arnd Bergmann [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=200912141640.13562.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=anna.fischer@hp.com \
    --cc=anthony@codemonkey.ws \
    --cc=bridge@lists.linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=evb@yahoogroups.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@voltaire.com \
    --cc=shemminger@linux-foundation.org \
    --cc=virtualization@lists.linux-foundation.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;
as well as URLs for NNTP newsgroup(s).