aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ice/ice_nvm.h
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2020-05-15 17:42:25 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2020-05-28 15:51:28 -0700
commitc2b313b783e0441dab2441cc1ee216eb4b9447a6 (patch)
tree6445f2980b0b4b647fe3ec2e322fd69030e70e55 /drivers/net/ethernet/intel/ice/ice_nvm.h
parentice: fix potential double free in probe unrolling (diff)
downloadlinux-dev-c2b313b783e0441dab2441cc1ee216eb4b9447a6.tar.xz
linux-dev-c2b313b783e0441dab2441cc1ee216eb4b9447a6.zip
ice: fix kernel BUG if register_netdev fails
If register_netdev() fails, the driver will attempt to cleanup the q_vectors and inadvertently trigger a kernel BUG due to a NULL pointer dereference. This occurs because cleaning up q_vectors attempts to call netif_napi_del on napi_structs which were never initialized. Resolve this by releasing the netdev in ice_cfg_netdev and setting vsi->netdev to NULL. This ensures that after ice_cfg_netdev fails the state is rewound to match as if ice_cfg_netdev was never called. Signed-off-by: Jacob Keller <jacob.e.keller@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/intel/ice/ice_nvm.h')
0 files changed, 0 insertions, 0 deletions