ixgbe: check for vfs outside of sriov_num_vfs before dereference
ixgbe: check for vfs outside of sriov_num_vfs before dereference

The check for vfinfo is not sufficient because it does not protect
against specifying vf that is outside of sriov_num_vfs range.
All of the ndo functions have a check for it except for
ixgbevf_ndo_set_spoofcheck().

The following patch is all we need to protect against this panic:

ip link set p96p1 vf 0 spoofchk off
BUG: unable to handle kernel NULL pointer dereference at 0000000000000052
IP: [<ffffffffa044a1c1>]
ixgbe_ndo_set_vf_spoofchk+0x51/0x150 [ixgbe]

Reported-by: Thierry Herbelot <6a957105cd34caef8a0a517243bc5f366ed82fb3@6wind.com>
Signed-off-by: Emil Tantilov <7bb77ce8696ed668ba78a49cc3445dd5ee9fe4b8@intel.com>
Acked-by: Thierry Herbelot <6a957105cd34caef8a0a517243bc5f366ed82fb3@6wind.com>
Signed-off-by: Jeff Kirsher <87e35f5be20bb3e67f4ba6b86f5f6be3085b1b3a@intel.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs