Thread (288 messages) 288 messages, 13 authors, 2014-04-01
STALE4441d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 3/6] netpoll: Don't allow on devices that perform their own xmit locking

From: Eric W. Biederman <hidden>
Date: 2014-03-18 06:25:57
Subsystem: networking [general], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

There are strong and reasonable assumptions in the netpoll code that the
transmit code for network devices will not perform their own locking,
that can easily lead to deadlock if the assumptions are violated.

Document those assumptions by verifying the network device on which
netpoll is enabled does not have NETIF_F_LLTX set in netdev->features.

Signed-off-by: "Eric W. Biederman" <redacted>
---
 net/core/netpoll.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index 825200fcb0ff..a9abb195a2c3 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -606,6 +606,7 @@ int __netpoll_setup(struct netpoll *np, struct net_device *ndev)
 	INIT_WORK(&np->cleanup_work, netpoll_async_cleanup);
 
 	if ((ndev->priv_flags & IFF_DISABLE_NETPOLL) ||
+	    (ndev->features & NETIF_F_LLTX) ||
 	    !ndev->netdev_ops->ndo_poll_controller) {
 		np_err(np, "%s doesn't support polling, aborting\n",
 		       np->dev_name);
-- 
1.7.5.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help