netpoll: warning for ndo_start_xmit returns with interrupts enabled
authorDongdong Deng <dongdong.deng@windriver.com>
Fri, 21 Aug 2009 03:33:36 +0000 (03:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Aug 2009 02:50:59 +0000 (19:50 -0700)
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>
net/core/netpoll.c

index df30feb..1b76eb1 100644 (file)
@@ -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);
        }