]> git.baikalelectronics.ru Git - kernel.git/commit
e1000e: add rtnl_lock() to e1000_reset_task
authorVitaly Lifshits <vitaly.lifshits@intel.com>
Wed, 21 Oct 2020 11:59:37 +0000 (14:59 +0300)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 11 Mar 2021 17:37:48 +0000 (09:37 -0800)
commit3aee83a5027a826b04441e82b77e22bc186d1438
tree437de1337bde9ae70b2f6e6e6d661f794843f684
parentcea46e1480eb94faac52c6ce2f688ba0493aac69
e1000e: add rtnl_lock() to e1000_reset_task

A possible race condition was found in e1000_reset_task,
after discovering a similar issue in igb driver via
commit dfc571cf22be ("igb: reinit_locked() should be called
with rtnl_lock").

Added rtnl_lock() and rtnl_unlock() to avoid this.

Fixes: 3f32e81cc0ea ("[E1000E]: New pci-express e1000 driver (currently for ICH9 devices only)")
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Vitaly Lifshits <vitaly.lifshits@intel.com>
Tested-by: Dvora Fuxbrumer <dvorax.fuxbrumer@linux.intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/e1000e/netdev.c