Skip to content
  • Emil Tantilov's avatar
    ixgbevf: fix possible crashes in probe and remove · 0333464f
    Emil Tantilov authored
    This patch resolves couple of issues in ixgbevf_probe/remove():
    
    1. Fix a case where adapter->state is tested after free_netdev() this is
    same as the patch for ixgbe from Daniel Borkmann <dborkman@redhat.com>:
    commit b5b2ffc0
    
     ("ixgbe: fix use after free adapter->state test in ixgbe_remove/ixgbe_probe")
    
    2. Move pci_set_drvdata() after all the error checks in ixgbevf_probe() and
    then add a check in ixgbevf_probe() to avoid running the cleanup functions
    twice in cases where probe failed.
    
    CC: Daniel Borkmann <dborkman@redhat.com>
    Signed-off-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    0333464f