From: DDD <Dongdong.deng@windriver.com>
To: Matt Mackall <mpm@selenic.com>,
David Miller <davem@davemloft.net>, Nicolas Pitre <nico@cam.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
netdev@vger.kernel.org, Jason Wessel <jason.wessel@windriver.com>
Subject: [PATCH 1/2] netpoll: warning for ndo_start_xmit returns with interrupts enabled
Date: Fri, 21 Aug 2009 21:33:36 +0800 [thread overview]
Message-ID: <1250861616.24178.20.camel@dengdd-desktop> (raw)
WARN_ONCE for ndo_start_xmit() enable interrupts in netpoll_send_skb(),
because the NETPOLL API requires that interrupts remain disabled in
netpoll_send_skb().
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
---
net/core/netpoll.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index df30feb..1b76eb1 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -319,6 +319,11 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
udelay(USEC_PER_POLL);
}
+
+ WARN_ONCE(!irqs_disabled(),
+ "netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n",
+ dev->name, ops->ndo_start_xmit);
+
local_irq_restore(flags);
}
--
1.6.0.4
next reply other threads:[~2009-08-21 13:33 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 13:33 DDD [this message]
2009-08-21 13:34 ` [PATCH 2/2] drivers/net: fixed drivers that support netpoll use ndo_start_xmit() DDD
2009-08-21 15:26 ` Matt Mackall
2009-08-24 2:50 ` David Miller
2009-08-21 13:40 ` [RFC][PATCH] smc91x: let smc91x work well with netpoll DDD
2009-08-21 17:13 ` Nicolas Pitre
2009-08-24 3:42 ` [PATCH] [net] smc91x: let smc91x work well under netpoll DDD
2009-08-24 5:59 ` David Miller
2009-08-24 2:50 ` [PATCH 1/2] netpoll: warning for ndo_start_xmit returns with interrupts enabled 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=1250861616.24178.20.camel@dengdd-desktop \
--to=dongdong.deng@windriver.com \
--cc=davem@davemloft.net \
--cc=jason.wessel@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.com \
--cc=netdev@vger.kernel.org \
--cc=nico@cam.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).