]> git.baikalelectronics.ru Git - kernel.git/commit
forcedeth: fix race when unloading module
authordavid decotigny <david.decotigny@google.com>
Sat, 5 Nov 2011 14:38:20 +0000 (14:38 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Nov 2011 18:31:24 +0000 (13:31 -0500)
commit49bfc8b54eb02c88aee25127c21bf3bd17c6992d
tree2bd8c50a7a0ea2b12b0f384fb656eb51e32cfbd0
parent38b7ff98876b2bbdb9583c34fa10a8d9dc14b493
forcedeth: fix race when unloading module

When forcedeth module is unloaded, there exists a path that can lead
to mod_timer() after del_timer_sync(), causing an oops. This patch
short-circuits this unneeded path, which originates in
nv_get_ethtool_stats().

Tested:
  x86_64 16-way + 3 ethtool -S infinite loops + 100Mbps incoming traffic
  + rmmod/modprobe/ifconfig in a loop

Initial-Author: Salman Qazi <sqazi@google.com>
Discussion: http://patchwork.ozlabs.org/patch/123548/

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/nvidia/forcedeth.c