[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2e836018c7ea299037d732e5138ca395bd1ae50f.camel@sipsolutions.net>
Date: Sat, 28 Sep 2019 21:20:21 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Taehee Yoo <ap420073@...il.com>, davem@...emloft.net,
netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
jakub.kicinski@...ronome.com, j.vosburgh@...il.com,
vfalico@...il.com, andy@...yhouse.net, jiri@...nulli.us,
sd@...asysnail.net, roopa@...ulusnetworks.com, saeedm@...lanox.com,
manishc@...vell.com, rahulv@...vell.com, kys@...rosoft.com,
haiyangz@...rosoft.com, stephen@...workplumber.org,
sashal@...nel.org, hare@...e.de, varun@...lsio.com,
ubraun@...ux.ibm.com, kgraul@...ux.ibm.com,
jay.vosburgh@...onical.com, schuffelen@...gle.com, bjorn@...k.no
Subject: Re: [PATCH net v4 00/12] net: fix nested device bugs
> VLAN, BONDING, TEAM, MACSEC, MACVLAN, IPVLAN, VIRT_WIFI and VXLAN.
> But I couldn't test all interface types so there could be more device
> types which have similar problems.
Did you test virt_wifi? I don't see how it *doesn't* have the nesting
problem, and you didn't change it?
No, I see. You're limiting the nesting generally now in patch 1, and the
others are just lockdep fixups (I guess it's surprising virt_wifi
doesn't do this at all?).
FWIW I don't think virt_wifi really benefits at all from stacking, so we
could just do something like
--- a/drivers/net/wireless/virt_wifi.c
+++ b/drivers/net/wireless/virt_wifi.c
@@ -508,6 +508,9 @@ static int virt_wifi_newlink(struct net *src_net, struct net_device *dev,
else if (dev->mtu > priv->lowerdev->mtu)
return -EINVAL;
+ if (priv->lowerdev->ieee80211_ptr)
+ return -EINVAL;
+
err = netdev_rx_handler_register(priv->lowerdev, virt_wifi_rx_handler,
priv);
if (err) {
IMHO, but of course generally limiting the stack depth is needed anyway
and solves the problem well enough for virt_wifi.
johannes
Powered by blists - more mailing lists