From: David Miller <davem@davemloft.net>
To: ordex@autistici.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
fengguang.wu@intel.com, pshelar@nicira.com
Subject: Re: [PATCH] ip_gre: don't overwrite iflink during net_dev init
Date: Sat, 30 Mar 2013 17:29:23 -0400 (EDT) [thread overview]
Message-ID: <20130330.172923.359158542815044103.davem@davemloft.net> (raw)
In-Reply-To: <1364663257-14717-1-git-send-email-ordex@autistici.org>
From: Antonio Quartulli <ordex@autistici.org>
Date: Sat, 30 Mar 2013 18:07:37 +0100
> iflink is currently set to 0 in __gre_tunnel_init(). This
> function is invoked in gre_tap_init() and
> ipgre_tunnel_init() which are both used to initialise the
> ndo_init field of the respective net_device_ops structs
> (ipgre.. and gre_tap..) used by GRE interfaces.
>
> However, in netdevice_register() iflink is first set to -1,
> then ndo_init is invoked and then iflink is assigned to a
> proper value if and only if it still was -1.
>
> Assigning 0 to iflink in ndo_init is therefore first
> preventing netdev_register() to correctly assign it a proper
> value and then breaking iflink at all since 0 has not
> correct meaning.
>
> Fix this by removing the iflink assignment in
> __gre_tunnel_init().
>
> Introduced by c54419321455631079c7d6e60bc732dd0c5914c5
> ("GRE: Refactor GRE tunneling code.")
>
> Reported-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Please always indicate, in the subject line inside of the [] brackets,
what tree the patch is targetted at.
I can use "git describe" on the guilty commit, but why take a chance?
Applied to net-next, thanks.
prev parent reply other threads:[~2013-03-30 21:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-30 9:36 WARNING: at net/batman-adv/hard-interface.c:92 batadv_is_on_batman_iface() Fengguang Wu
2013-03-30 11:52 ` Antonio Quartulli
2013-03-30 17:07 ` [PATCH] ip_gre: don't overwrite iflink during net_dev init Antonio Quartulli
2013-03-30 21:29 ` 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=20130330.172923.359158542815044103.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ordex@autistici.org \
--cc=pshelar@nicira.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).