]> git.itanic.dy.fi Git - linux-stable/commit
rtnetlink: fix VF info size
authorJiri Benc <jbenc@redhat.com>
Fri, 8 Aug 2014 14:44:32 +0000 (16:44 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2014 06:36:40 +0000 (08:36 +0200)
commit7f97ac5241397af66c8f5bf6790f634ea7ad86bf
treeaf6bc0c2857133de143bd85297073bfb4297c7d0
parentc5c2f8986e4b03cad626e40caf9f93aedbef7254
rtnetlink: fix VF info size

[ Upstream commit 945a36761fd7877660f630bbdeb4ff9ff80d1935 ]

Commit 1d8faf48c74b8 ("net/core: Add VF link state control") added new
attribute to IFLA_VF_INFO group in rtnl_fill_ifinfo but did not adjust size
of the allocated memory in if_nlmsg_size/rtnl_vfinfo_size. As the result, we
may trigger warnings in rtnl_getlink and similar functions when many VF
links are enabled, as the information does not fit into the allocated skb.

Fixes: 1d8faf48c74b8 ("net/core: Add VF link state control")
Reported-by: Yulong Pei <ypei@redhat.com>
Signed-off-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/core/rtnetlink.c