netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] netpoll: warn on netpoll_send_udp users who haven't disabled irqs
@ 2015-08-28 22:44 Nikolay Aleksandrov
  2015-08-28 23:25 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Nikolay Aleksandrov @ 2015-08-28 22:44 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nikolay Aleksandrov

From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

Make sure we catch future netpoll_send_udp users who use it without
disabling irqs and also as a hint for poll_controller users.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
---
 net/core/netpoll.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index c126a878c47c..6aa3db8dfc3b 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -380,6 +380,8 @@ void netpoll_send_udp(struct netpoll *np, const char *msg, int len)
 	static atomic_t ip_ident;
 	struct ipv6hdr *ip6h;
 
+	WARN_ON_ONCE(!irqs_disabled());
+
 	udp_len = len + sizeof(*udph);
 	if (np->ipv6)
 		ip_len = udp_len + sizeof(*ip6h);
-- 
2.4.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] netpoll: warn on netpoll_send_udp users who haven't disabled irqs
  2015-08-28 22:44 [PATCH net-next] netpoll: warn on netpoll_send_udp users who haven't disabled irqs Nikolay Aleksandrov
@ 2015-08-28 23:25 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2015-08-28 23:25 UTC (permalink / raw)
  To: razor; +Cc: netdev, nikolay

From: Nikolay Aleksandrov <razor@blackwall.org>
Date: Fri, 28 Aug 2015 15:44:25 -0700

> From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
> 
> Make sure we catch future netpoll_send_udp users who use it without
> disabling irqs and also as a hint for poll_controller users.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

Excellent, applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-28 23:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28 22:44 [PATCH net-next] netpoll: warn on netpoll_send_udp users who haven't disabled irqs Nikolay Aleksandrov
2015-08-28 23:25 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).