summaryrefslogtreecommitdiffstats
path: root/net/core/netpoll.c
diff options
context:
space:
mode:
authorDongdong Deng <dongdong.deng@windriver.com>2009-08-21 03:33:36 +0000
committerDavid S. Miller <davem@davemloft.net>2009-08-23 19:50:59 -0700
commit79b1bee888d43b14cf0c08fb8e5aa6cb161e48f8 (patch)
tree0b6f33bf7dcf7f87a6a741d3bf9e98e6a1528bb0 /net/core/netpoll.c
parentc189308bd8b6a29b11c3ec29a42a3f0aabad6bc8 (diff)
downloadblackbird-op-linux-79b1bee888d43b14cf0c08fb8e5aa6cb161e48f8.tar.gz
blackbird-op-linux-79b1bee888d43b14cf0c08fb8e5aa6cb161e48f8.zip
netpoll: warning for ndo_start_xmit returns with interrupts enabled
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> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/netpoll.c')
-rw-r--r--net/core/netpoll.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index df30feb2fc72..1b76eb11deb4 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);
}
OpenPOWER on IntegriCloud