]> git.baikalelectronics.ru Git - kernel.git/commit
e1000: fix occasional panic on unload
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Wed, 22 Sep 2010 18:22:42 +0000 (18:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Sep 2010 21:33:38 +0000 (14:33 -0700)
commit4db9a3e1f70b56a4251c789cc51cd7bd1877870b
tree90153c4c54f0b43ed48700a396db695d232f1878
parentbacad9172121997cdc0527c66e091284a14a6d8c
e1000: fix occasional panic on unload

Net drivers in general have an issue where timers fired
by mod_timer or work threads with schedule_work are running
outside of the rtnl_lock.

With no other lock protection these routines are vulnerable
to races with driver unload or reset paths.

The longer term solution to this might be a redesign with
safer locks being taken in the driver to guarantee no
reentrance, but for now a safe and effective fix is
to take the rtnl_lock in these routines.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/e1000/e1000_main.c