From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, gospo@redhat.com,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next PATCH 3/4] e1000e: fix close interrupt race
Date: Thu, 26 Mar 2009 01:05:41 -0700 [thread overview]
Message-ID: <20090326080541.30401.83097.stgit@lost.foo-projects.org> (raw)
In-Reply-To: <20090326080503.30401.71355.stgit@lost.foo-projects.org>
From: Jesse Brandeburg <jesse.brandeburg@intel.com>
As noticed by Alan Cox, it is possible for e1000e to exit its interrupt
handler or NAPI with interrupts enabled even when the driver is unloading or
being configured administratively down.
fix related to fix for: http://bugzilla.kernel.org/show_bug.cgi?id=12876
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/e1000e/netdev.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 1797412..b4ae046 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -1261,7 +1261,8 @@ static irqreturn_t e1000_msix_other(int irq, void *data)
u32 icr = er32(ICR);
if (!(icr & E1000_ICR_INT_ASSERTED)) {
- ew32(IMS, E1000_IMS_OTHER);
+ if (!test_bit(__E1000_DOWN, &adapter->state))
+ ew32(IMS, E1000_IMS_OTHER);
return IRQ_NONE;
}
@@ -1278,7 +1279,8 @@ static irqreturn_t e1000_msix_other(int irq, void *data)
}
no_link_interrupt:
- ew32(IMS, E1000_IMS_LSC | E1000_IMS_OTHER);
+ if (!test_bit(__E1000_DOWN, &adapter->state))
+ ew32(IMS, E1000_IMS_LSC | E1000_IMS_OTHER);
return IRQ_HANDLED;
}
@@ -2015,10 +2017,12 @@ clean_rx:
if (adapter->itr_setting & 3)
e1000_set_itr(adapter);
napi_complete(napi);
- if (adapter->msix_entries)
- ew32(IMS, adapter->rx_ring->ims_val);
- else
- e1000_irq_enable(adapter);
+ if (!test_bit(__E1000_DOWN, &adapter->state)) {
+ if (adapter->msix_entries)
+ ew32(IMS, adapter->rx_ring->ims_val);
+ else
+ e1000_irq_enable(adapter);
+ }
}
return work_done;
next prev parent reply other threads:[~2009-03-26 8:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 8:05 [net-next PATCH 1/4] e1000e: commonize tx cleanup routine to match e1000 & igb Jeff Kirsher
2009-03-26 8:05 ` [net-next PATCH 2/4] e1000e: fix loss of multicast packets Jeff Kirsher
2009-03-26 8:12 ` David Miller
2009-03-26 8:05 ` Jeff Kirsher [this message]
2009-03-26 8:12 ` [net-next PATCH 3/4] e1000e: fix close interrupt race David Miller
2009-03-26 8:06 ` [net-next PATCH 4/4] e1000e: update version number Jeff Kirsher
2009-03-26 8:12 ` David Miller
2009-03-26 8:12 ` [net-next PATCH 1/4] e1000e: commonize tx cleanup routine to match e1000 & igb 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=20090326080541.30401.83097.stgit@lost.foo-projects.org \
--to=jeffrey.t.kirsher@intel.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jesse.brandeburg@intel.com \
--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).