From: DDD <Dongdong.deng@windriver.com>
To: Matt Mackall <mpm@selenic.com>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>
Subject: [PATCH] netpoll: WARN_ONCE for start_xmit returns with interrupts enabled
Date: Wed, 19 Aug 2009 18:43:27 +0800 [thread overview]
Message-ID: <1250678607.17891.26.camel@dengdd-desktop> (raw)
The NETPOLL API requires that interrupts remain disabled in
netpoll_send_skb().
Add a WARN_ONCE when ndo_start_xmit returns with interrupts enabled
in netpoll_send_skb().
Signed-off-by: Dongdong Deng <dongdong.deng@windriver.com>
---
net/core/netpoll.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index df30feb..d38103f 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -319,6 +319,12 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
udelay(USEC_PER_POLL);
}
+
+ WARN_ONCE(!irqs_disabled(),
+ KERN_WARNING "netpoll_send_skb(): [net driver %s]"
+ "ndo_start_xmit() shouldn't return with interrupts"
+ "enabled!", dev->name);
+
local_irq_restore(flags);
}
--
1.6.0.4
next reply other threads:[~2009-08-19 10:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-19 10:43 DDD [this message]
2009-08-19 10:43 ` [PATCH] netpoll: WARN_ONCE for start_xmit returns with interrupts enabled Matt Mackall
2009-08-20 10:44 ` DDD
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=1250678607.17891.26.camel@dengdd-desktop \
--to=dongdong.deng@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mpm@selenic.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.