Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-10-02 Thread David Miller
From: Arnd Bergmann Date: Fri, 30 Sep 2016 18:13:49 +0200 > With the newly added support for IFLA_VF_VLAN_LIST netlink messages, > we get a warning about potential uninitialized variable use in > the parsing of the user input when enabling the -Wmaybe-uninitialized > warning: > > net/core/rtnetl

Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-10-02 Thread Tariq Toukan
Hi Arnd, On 30/09/2016 7:38 PM, Arnd Bergmann wrote: On Friday 30 September 2016, Eric Dumazet wrote: @@ -1753,6 +1753,9 @@ static int do_setvfinfo(struct net_device *dev, struct nlattr **tb) len++; } + if (len == 0) +

Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Or Gerlitz
On Fri, Sep 30, 2016 at 7:13 PM, Arnd Bergmann wrote: > With the newly added support for IFLA_VF_VLAN_LIST netlink messages, > we get a warning about potential uninitialized variable use in > the parsing of the user input when enabling the -Wmaybe-uninitialized > warning: > > net/core/rtnetlink.c:

Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Arnd Bergmann
On Friday 30 September 2016, Eric Dumazet wrote: > > @@ -1753,6 +1753,9 @@ static int do_setvfinfo(struct net_device *dev, > > struct nlattr **tb) > > > > len++; > > } > > + if (len == 0) > > + return -EINVAL; > > + > >

Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Eric Dumazet
On Fri, Sep 30, 2016 at 9:13 AM, Arnd Bergmann wrote: > With the newly added support for IFLA_VF_VLAN_LIST netlink messages, > we get a warning about potential uninitialized variable use in > the parsing of the user input when enabling the -Wmaybe-uninitialized > warning: > > net/core/rtnetlink.c:

[PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling

2016-09-30 Thread Arnd Bergmann
With the newly added support for IFLA_VF_VLAN_LIST netlink messages, we get a warning about potential uninitialized variable use in the parsing of the user input when enabling the -Wmaybe-uninitialized warning: net/core/rtnetlink.c: In function 'do_setvfinfo': net/core/rtnetlink.c:1756:9: error: '