From: "Michael Chan" <mchan@broadcom.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock().
Date: Thu, 3 Dec 2009 11:46:31 -0800 [thread overview]
Message-ID: <1259869595-6450-1-git-send-email-mchan@broadcom.com> (raw)
To prevent race conditions with other reset events.
Signed-off-by: Michael Chan <mchan@broadcom.com>
---
drivers/net/bnx2.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 4cae2a8..03eb51f 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -6263,8 +6263,11 @@ bnx2_reset_task(struct work_struct *work)
{
struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
- if (!netif_running(bp->dev))
+ rtnl_lock();
+ if (!netif_running(bp->dev)) {
+ rtnl_unlock();
return;
+ }
bnx2_netif_stop(bp);
@@ -6272,6 +6275,7 @@ bnx2_reset_task(struct work_struct *work)
atomic_set(&bp->intr_sem, 1);
bnx2_netif_start(bp);
+ rtnl_unlock();
}
static void
--
1.6.4.GIT
next reply other threads:[~2009-12-03 19:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-03 19:46 Michael Chan [this message]
2009-12-03 19:46 ` [PATCH 2/5] bnx2: Dump some state during tx timeout Michael Chan
2009-12-03 21:07 ` David Miller
2009-12-03 19:46 ` [PATCH 3/5] bnx2: Print warning when unable to allocate the full SKB/page ring Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 21:49 ` Michael Chan
2009-12-03 22:05 ` David Miller
2009-12-03 19:46 ` [PATCH 4/5] bnx2: Read firmware version from VPD Michael Chan
2009-12-03 20:17 ` Ben Hutchings
2009-12-03 21:43 ` Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 19:46 ` [PATCH 5/5] bnx2: Update version to 2.0.3 Michael Chan
2009-12-03 21:08 ` David Miller
2009-12-03 21:07 ` [PATCH 1/5] bnx2: Protect tx timeout reset with rtnl_lock() 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=1259869595-6450-1-git-send-email-mchan@broadcom.com \
--to=mchan@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).