diff options
author | Dongdong Deng <dongdong.deng@windriver.com> | 2009-08-20 23:33:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-23 22:50:59 -0400 |
commit | 79b1bee888d43b14cf0c08fb8e5aa6cb161e48f8 (patch) | |
tree | 0b6f33bf7dcf7f87a6a741d3bf9e98e6a1528bb0 /net | |
parent | c189308bd8b6a29b11c3ec29a42a3f0aabad6bc8 (diff) |
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')
-rw-r--r-- | 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 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) | |||
319 | 319 | ||
320 | udelay(USEC_PER_POLL); | 320 | udelay(USEC_PER_POLL); |
321 | } | 321 | } |
322 | |||
323 | WARN_ONCE(!irqs_disabled(), | ||
324 | "netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n", | ||
325 | dev->name, ops->ndo_start_xmit); | ||
326 | |||
322 | local_irq_restore(flags); | 327 | local_irq_restore(flags); |
323 | } | 328 | } |
324 | 329 | ||