Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp5053609ybn; Sat, 28 Sep 2019 12:22:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2LXjgDU7+k7g/SGXA3Tedej1tNkxS2K0yWFm6+VQUokMySMEe72f3Wg43vUQqy2w5OQlt X-Received: by 2002:a50:9a05:: with SMTP id o5mr11534080edb.44.1569698539966; Sat, 28 Sep 2019 12:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569698539; cv=none; d=google.com; s=arc-20160816; b=UKSr8UGKvisEufHCv4FPMbMLnw7E//IWZoEPhezhQ61Nn1fwx1AwFt5/hZomIetlcK oLDiN6sjMD5d9gEEuPm+7mF2nlNB2X0kHiIVizIipyQFIEI45927LNSHTe7L4+xLKCpx RCDjPhsmiSFceU5FNE8HLKF6qkRu4fuvh5T8YMM4/sbKj07jhT0zzkPu3PjstYoZlPjU dH8KXVeoRPSpTWNU0EwiIGnRk+9ZWxCK6WkbFi2e31mY88rkshETukzAWZsC8gfFRyxK HvXzihmEiXGRR06Xm+dv+uMfjsawXisbPshTDqZlagPQtB3JkmnVQqk/rpR90fBsLnas zpsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=ptW9OflIqZNuA2SdpqP3x9EOCpOD1dNxR3E6/1iRycY=; b=mTfy41iqJSgFaPbRQ78YIJPbGGrqi6nPWalxOGhcYAIGYW6qYR0IRZIhDXefItsFZ4 DO1YsSBhYzfSNtwMD5vvAPsCe7mRosmOaFkvyrBy38KDrAEiYjiES5oiYaSqu1srHhSM ImQUrpuJNbxrtqvE9SsFyp4XhBsRUqGiLRo2aOxhWhKwIu5m6nwodQ78DlJpxiJpatL9 hv44SkTToPH6+c9OejbUZKGjYpFLUUZXNnu4XPrHFag2qtmyZV4RtqP1DcHN0kZCrMm1 GMPE0gG+0s+EZmiXGUMNAQI0khvvxGeihb2pNHBFQhpcUdcfh1azy1jf1yJV1O7vIr2c knrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e23si3798076edq.344.2019.09.28.12.21.53; Sat, 28 Sep 2019 12:22:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728617AbfI1TUh (ORCPT + 99 others); Sat, 28 Sep 2019 15:20:37 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:33582 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726581AbfI1TUh (ORCPT ); Sat, 28 Sep 2019 15:20:37 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.2) (envelope-from ) id 1iEIGW-0002v0-CP; Sat, 28 Sep 2019 21:20:24 +0200 Message-ID: <2e836018c7ea299037d732e5138ca395bd1ae50f.camel@sipsolutions.net> Subject: Re: [PATCH net v4 00/12] net: fix nested device bugs From: Johannes Berg To: Taehee Yoo , davem@davemloft.net, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, jakub.kicinski@netronome.com, j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net, jiri@resnulli.us, sd@queasysnail.net, roopa@cumulusnetworks.com, saeedm@mellanox.com, manishc@marvell.com, rahulv@marvell.com, kys@microsoft.com, haiyangz@microsoft.com, stephen@networkplumber.org, sashal@kernel.org, hare@suse.de, varun@chelsio.com, ubraun@linux.ibm.com, kgraul@linux.ibm.com, jay.vosburgh@canonical.com, schuffelen@google.com, bjorn@mork.no Date: Sat, 28 Sep 2019 21:20:21 +0200 In-Reply-To: <20190928164843.31800-1-ap420073@gmail.com> (sfid-20190928_184857_724786_E6D9EE1A) References: <20190928164843.31800-1-ap420073@gmail.com> (sfid-20190928_184857_724786_E6D9EE1A) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > 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