linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
	Jiri Pirko <jiri@mellanox.com>,
	Brenden Blanco <bblanco@plumgrid.com>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	Nogah Frankel <nogahf@mellanox.com>,
	netdev <netdev@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Moshe Shemesh <moshe@mellanox.com>,
	Tariq Toukan <tariqt@mellanox.com>
Subject: Re: [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling
Date: Fri, 30 Sep 2016 18:38:05 +0200	[thread overview]
Message-ID: <201609301838.05349.arnd@arndb.de> (raw)
In-Reply-To: <CANn89iK2FQufz4NCan1y0dQME2RUOzc3NXXhqYd418ctHNc6fA@mail.gmail.com>

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

  reply	other threads:[~2016-09-30 16:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-30 16:13 [PATCH] net: rtnl: avoid uninitialized data in IFLA_VF_VLAN_LIST handling Arnd Bergmann
2016-09-30 16:23 ` Eric Dumazet
2016-09-30 16:38   ` Arnd Bergmann [this message]
2016-10-02  9:03     ` Tariq Toukan
2016-09-30 20:12 ` Or Gerlitz
2016-10-03  5:32 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201609301838.05349.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=bblanco@plumgrid.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=jiri@mellanox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moshe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=nikolay@cumulusnetworks.com \
    --cc=nogahf@mellanox.com \
    --cc=roopa@cumulusnetworks.com \
    --cc=tariqt@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).