]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
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 df30feb2fc725b047ef744273e7c506714bbac61..1b76eb11deb4a2632a9daca75a414a2906123db4 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);
        }