diff options
author | Emil Tantilov <emil.s.tantilov@intel.com> | 2017-01-20 14:11:56 -0800 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2017-04-18 13:25:30 -0700 |
commit | 5c11f00ddac2c030827cdecf9c2d3678cbd3137b (patch) | |
tree | 880f9437ee2f2c8b8ee7b5f4fd301191d2a192d4 /drivers/net/ethernet/korina.c | |
parent | da614d042ac236e5db52c56c7d7d8accd325dd40 (diff) |
ixgbe: do not use adapter->num_vfs when setting VFs via module parameter
Avoid setting adapter->num_vfs early in the init code path when
using the max_vfs module parameter by passing it to ixgbe_enable_sriov()
as a function parameter.
This fixes an issue where if we failed to allocate vfinfo in
__ixgbe_enable_sriov() the driver will crash with NULL pointer in
ixgbe_disable_sriov() when attempting to free the vfinfo struct based
on adapter->num_vfs. Also it cleans up the assignment of adapter->num_vfs
since now it will only be set in __ixgbe_enable_sriov() and cleared in
ixgbe_disable_sriov().
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/korina.c')
0 files changed, 0 insertions, 0 deletions