Return-Path: From: alexander.levin@verizon.com Cc: David Forster , "David S . Miller" , alexander.levin@verizon.com To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 12/54] vti6: fix device register to report IFLA_INFO_KIND Date: Wed, 22 Nov 2017 22:23:53 +0000 Message-ID: <20171122222344.19782-12-alexander.levin@verizon.com> References: <20171122222344.19782-1-alexander.levin@verizon.com> In-Reply-To: <20171122222344.19782-1-alexander.levin@verizon.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: From: David Forster [ Upstream commit 93e246f783e6bd1bc64fdfbfe68b18161f69b28e ] vti6 interface is registered before the rtnl_link_ops block is attached. As a result the resulting RTM_NEWLINK is missing IFLA_INFO_KIND. Re-order attachment of rtnl_link_ops block to fix. Signed-off-by: Dave Forster Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- net/ipv6/ip6_vti.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ip6_vti.c b/net/ipv6/ip6_vti.c index 816f79d1a8a3..67e882d49195 100644 --- a/net/ipv6/ip6_vti.c +++ b/net/ipv6/ip6_vti.c @@ -189,12 +189,12 @@ static int vti6_tnl_create2(struct net_device *dev) struct vti6_net *ip6n =3D net_generic(net, vti6_net_id); int err; =20 + dev->rtnl_link_ops =3D &vti6_link_ops; err =3D register_netdevice(dev); if (err < 0) goto out; =20 strcpy(t->parms.name, dev->name); - dev->rtnl_link_ops =3D &vti6_link_ops; =20 dev_hold(dev); vti6_tnl_link(ip6n, t); --=20 2.11.0