Skip to content

Commit f9c4082

Browse files
david decotignydavem330
authored andcommitted
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 <[email protected]> Discussion: http://patchwork.ozlabs.org/patch/123548/ Signed-off-by: David Decotigny <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dd1294c commit f9c4082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/nvidia/forcedeth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4566,7 +4566,7 @@ static void nv_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *e
45664566
struct fe_priv *np = netdev_priv(dev);
45674567

45684568
/* update stats */
4569-
nv_do_stats_poll((unsigned long)dev);
4569+
nv_get_hw_stats(dev);
45704570

45714571
memcpy(buffer, &np->estats, nv_get_sset_count(dev, ETH_SS_STATS)*sizeof(u64));
45724572
}

0 commit comments

Comments
 (0)