From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling Date: Fri, 30 Sep 2016 18:38:05 +0200 Message-ID: <201609301838.05349.arnd@arndb.de> References: <20160930161416.18660-1-arnd@arndb.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Cc: "David S. Miller" , Roopa Prabhu , Nicolas Dichtel , Nikolay Aleksandrov , Jiri Pirko , Brenden Blanco , Hannes Frederic Sowa , Nogah Frankel , netdev , LKML , Moshe Shemesh , Tariq Toukan To: Eric Dumazet Return-path: Received: from mout.kundenserver.de ([212.227.126.131]:53815 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932988AbcI3Qic (ORCPT ); Fri, 30 Sep 2016 12:38:32 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: 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; > > + > > err = ops->ndo_set_vf_vlan(dev, ivvl[0]->vf, ivvl[0]->vlan, > > ivvl[0]->qos, ivvl[0]->vlan_proto); > > if (err < 0) > > -- > > 2.9.0 > > > > So, if I read this code, we build an array, but call ndo_set_vf_vlan() > only using first element ? > > Looks like the bug should be fixed in a different way. I was wondering about this too, but didn't understand enough about it to say if it was intentional or not. I just realized that I forgot to add Moshe and Tariq on Cc (I relied on scripts/get_maintainer.pl, but didn't double-check). I've added them to Cc now, hope they can clarify this. Arnd