From: ebiederm@xmission.com (Eric W. Biederman)
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Linux Netdev List <netdev@vger.kernel.org>,
Pavel Emelyanov <xemul@openvz.org>
Subject: Re: [PATCH net-next-2.6] veth: Fix veth_dellink method
Date: Fri, 30 Oct 2009 16:07:51 -0700 [thread overview]
Message-ID: <m1hbtgmqew.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <4AEA8F0F.4030100@gmail.com> (Eric Dumazet's message of "Fri\, 30 Oct 2009 08\:00\:31 +0100")
Eric Dumazet <eric.dumazet@gmail.com> writes:
> In commit 23289a37e2b127dfc4de1313fba15bb4c9f0cd5b
> (net: add a list_head parameter to dellink() method),
> I forgot to actually use this parameter in veth_dellink.
>
> I remember feeling a bit uncomfortable about veth_close(),
> because it does :
>
> netif_carrier_off(dev);
> netif_carrier_off(priv->peer);
>
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---
>
> diff --git a/drivers/net/veth.c b/drivers/net/veth.c
> index ffb502d..9bed694 100644
> --- a/drivers/net/veth.c
> +++ b/drivers/net/veth.c
> @@ -450,8 +450,8 @@ static void veth_dellink(struct net_device *dev, struct list_head *head)
> priv = netdev_priv(dev);
> peer = priv->peer;
>
> - unregister_netdevice(dev);
> - unregister_netdevice(peer);
> + unregister_netdevice_queue(dev, head);
> + unregister_netdevice_queue(peer, head);
Unless I am mistaken you need to change the list_add_tail to
list_move_tail in unregister_netdevice_queue because we will be
adding each veth device twice.
Eric
next prev parent reply other threads:[~2009-10-30 23:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 7:00 [PATCH net-next-2.6] veth: Fix veth_dellink method Eric Dumazet
2009-10-30 8:00 ` David Miller
2009-10-30 23:07 ` Eric W. Biederman [this message]
2009-10-31 0:51 ` [PATCH net-next-2.6] veth: Fix unregister_netdevice_queue for veth Eric W. Biederman
2009-10-31 9:41 ` Eric Dumazet
2009-11-02 7:56 ` David Miller
2009-10-31 9:43 ` [PATCH net-next-2.6] veth: Fix veth_dellink method 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=m1hbtgmqew.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xemul@openvz.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).