diff options
Diffstat (limited to 'net/core/rtnetlink.c')
-rw-r--r-- | net/core/rtnetlink.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index d471f097c739..d69c4644f8f2 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -1173,14 +1173,16 @@ static noinline_for_stack int rtnl_fill_vfinfo(struct sk_buff *skb, | |||
1173 | 1173 | ||
1174 | static int rtnl_fill_link_ifmap(struct sk_buff *skb, struct net_device *dev) | 1174 | static int rtnl_fill_link_ifmap(struct sk_buff *skb, struct net_device *dev) |
1175 | { | 1175 | { |
1176 | struct rtnl_link_ifmap map = { | 1176 | struct rtnl_link_ifmap map; |
1177 | .mem_start = dev->mem_start, | 1177 | |
1178 | .mem_end = dev->mem_end, | 1178 | memset(&map, 0, sizeof(map)); |
1179 | .base_addr = dev->base_addr, | 1179 | map.mem_start = dev->mem_start; |
1180 | .irq = dev->irq, | 1180 | map.mem_end = dev->mem_end; |
1181 | .dma = dev->dma, | 1181 | map.base_addr = dev->base_addr; |
1182 | .port = dev->if_port, | 1182 | map.irq = dev->irq; |
1183 | }; | 1183 | map.dma = dev->dma; |
1184 | map.port = dev->if_port; | ||
1185 | |||
1184 | if (nla_put_64bit(skb, IFLA_MAP, sizeof(map), &map, IFLA_PAD)) | 1186 | if (nla_put_64bit(skb, IFLA_MAP, sizeof(map), &map, IFLA_PAD)) |
1185 | return -EMSGSIZE; | 1187 | return -EMSGSIZE; |
1186 | 1188 | ||