From: David Decotigny <david.decotigny@google.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Ian Campbell <ian.campbell@citrix.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
Jiri Pirko <jpirko@redhat.com>, Joe Perches <joe@perches.com>,
Szymon Janc <szymon@janc.net.pl>,
David Decotigny <david.decotigny@google.com>
Subject: [PATCH net v5 1/5] forcedeth: fix race when unloading module
Date: Sat, 5 Nov 2011 17:38:20 -0700 [thread overview]
Message-ID: <56e2eee6114a007182241428deee8821f1586b50.1320539724.git.david.decotigny@google.com> (raw)
In-Reply-To: <cover.1320539724.git.david.decotigny@google.com>
In-Reply-To: <cover.1320539724.git.david.decotigny@google.com>
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>
---
drivers/net/ethernet/nvidia/forcedeth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 1e37eb9..344cb5f 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -4566,7 +4566,7 @@ static void nv_get_ethtool_stats(struct net_device *dev, struct ethtool_stats *e
struct fe_priv *np = netdev_priv(dev);
/* update stats */
- nv_do_stats_poll((unsigned long)dev);
+ nv_get_hw_stats(dev);
memcpy(buffer, &np->estats, nv_get_sset_count(dev, ETH_SS_STATS)*sizeof(u64));
}
--
1.7.3.1
next prev parent reply other threads:[~2011-11-06 0:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 0:38 [PATCH net v5 0/5] forcedeth: minor fixes for stats, rmmod, sparse David Decotigny
2011-11-06 0:38 ` David Decotigny [this message]
2011-11-06 0:38 ` [PATCH net v5 2/5] forcedeth: Acknowledge only interrupts that are being processed David Decotigny
2011-11-06 0:38 ` [PATCH net v5 3/5] forcedeth: remove unneeded stats updates David Decotigny
2011-11-06 0:38 ` [PATCH net v5 4/5] forcedeth: Improve stats counters David Decotigny
2011-11-06 0:38 ` [PATCH net v5 5/5] forcedeth: fix a few sparse warnings (variable shadowing) David Decotigny
2011-11-07 18:44 ` [PATCH net v5 0/5] forcedeth: minor fixes for stats, rmmod, sparse David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56e2eee6114a007182241428deee8821f1586b50.1320539724.git.david.decotigny@google.com \
--to=david.decotigny@google.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=ian.campbell@citrix.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=joe@perches.com \
--cc=jpirko@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=szymon@janc.net.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®