diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 3ac8946bf2449c5634be0cf7b8352ddf67592ee5..b06d2f46b83e98c4fb6a92cefd625c2918eafdeb 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -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)