Message ID | 87wqfsf2fk.fsf_-_@xmission.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Mon, Mar 17, 2014 at 11:25 PM, Eric W. Biederman <ebiederm@xmission.com> wrote: > > 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" <ebiederm@xmission.com> > --- > 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); Hmm? This basically disables netpoll on a lots of devices, such as vlan. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Cong Wang <cwang@twopensource.com> Date: Tue, 18 Mar 2014 11:26:54 -0700 > On Mon, Mar 17, 2014 at 11:25 PM, Eric W. Biederman > <ebiederm@xmission.com> wrote: >> >> 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" <ebiederm@xmission.com> >> --- >> 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); > > Hmm? This basically disables netpoll on a lots of devices, such as vlan. Right, this is bogus. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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);
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" <ebiederm@xmission.com> --- net/core/netpoll.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)