[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1250861616.24178.20.camel@dengdd-desktop>
Date: Fri, 21 Aug 2009 21:33:36 +0800
From: DDD <Dongdong.deng@...driver.com>
To: Matt Mackall <mpm@...enic.com>, David Miller <davem@...emloft.net>,
Nicolas Pitre <nico@....org>
Cc: lkml <linux-kernel@...r.kernel.org>, netdev@...r.kernel.org,
Jason Wessel <jason.wessel@...driver.com>
Subject: [PATCH 1/2] 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@...driver.com>
---
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 df30feb..1b76eb1 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);
}
--
1.6.0.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists