]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbevf: fix possible crashes in probe and remove
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 5 Dec 2014 04:32:44 +0000 (04:32 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 5 Dec 2014 17:13:09 +0000 (09:13 -0800)
commit69fbcb42e1c742a431026d6c5d5b6c7e91e12bb6
tree3a9b20aae9e01f6486a438a192b63fc240a20b5b
parent195f948231a30e5505ce2baa358be3f9e8c35544
ixgbevf: fix possible crashes in probe and remove

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 a9463296abf68e52 ("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: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c