]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbevf: handle race between close and suspend on shutdown
authorEmil Tantilov <emil.s.tantilov@intel.com>
Fri, 11 Nov 2016 18:12:51 +0000 (10:12 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 3 Jan 2017 21:03:36 +0000 (13:03 -0800)
commit4499f4fde95bbcf4ac9208d7bb28c57ab95ba7c0
tree2e2ea994214472e794f2d1e3d17c9d6b9a609ec0
parent5bb694eda0982c3145a027a730266e125518e961
ixgbevf: handle race between close and suspend on shutdown

When an interface is part of a namespace it is possible that
ixgbevf_close() may be called while ixgbevf_suspend() is running
which ends up in a double free WARN and/or a BUG in free_msi_irqs()

To handle this situation we extend the rtnl_lock() to protect the
call to netif_device_detach() and check for !netif_device_present()
to avoid entering close while in suspend.

Also added rtnl locks to ixgbevf_queue_reset_subtask().

CC: Alexander Duyck <alexander.h.duyck@intel.com>
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>
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c