Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp3185660ybh; Mon, 5 Aug 2019 13:41:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmRx7ZUUyEYWP36YhXz/jmjUaPeYOlIVvIcJnBEcO7Htlta7AmnjSU0jQSaoIh7ayoK2wo X-Received: by 2002:a63:c50f:: with SMTP id f15mr38362446pgd.372.1565037699101; Mon, 05 Aug 2019 13:41:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565037699; cv=none; d=google.com; s=arc-20160816; b=CZ1CvLLANHPanxslwC4RKRNYNm5Ex/5GIWVjRGxQcz/M7oNzwdUnDBj6vMywIAnqkj cD/pXFZ9ZuNPkd7lqVpJJwud8PQRF1qMd6sWaqLN6JzwBjoxkHdaVrqZ6FyFGnVGYm4h NaI301UfJIHrLzGq7UXWoX4m67LHL3iOQ3LOJYHaCzGQWEJQVMd+SPfO+1TgpUC90qvD dVotX7eI+uAeJF22Ov0NKVrM+TkT9P2FgUIdZzS22zD/rQUHzdA3DhheYf+xMokjNbZE +BxwZoBf+2fQSJzT4jZeaK1TpyNAK+OGwfsWow8OhUJYbogc07p7tKSPgel3HVf2kwAr WWig== 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:cc:to:from:subject :message-id; bh=UX4sXb+cEf3W5fMjNnhH3EZUw+ak5JFZJLDlGNZDJ78=; b=imRDhYLwEhEWrgkyHGhkFejL6fWNLrPrNO70jZN8F+YYF8x3yvruMKYqplrv1DR2Dj QSmSBRfFHXLLTeVkfzHn+zSV0jaNufoOPfJkN0ghm5HTebrRYT6GWg8s2nWjJ8qfx9I6 UKvvekjwQJ0rsK4Lnt6NU03bOjZsqmxYujopcwg2nWPrUmGH1KT1rm6loZC4k7ahRsyx bG4e9bPKQnImp0MzeZNcdfihU334XfKMIvJo/jUkqcdbUDFnS/Ch4yZpzY2zEv03GHLq FWInJOsQbRQwWqXTonezPbn50ZnIAp1/d+lgbTWQgwp49PxKkhRH8tIMTQqnDJ4dSByV 3ekA== 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 h4si45133769plt.30.2019.08.05.13.41.07; Mon, 05 Aug 2019 13:41:39 -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 S1730034AbfHEUlG (ORCPT + 99 others); Mon, 5 Aug 2019 16:41:06 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:52468 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728885AbfHEUlG (ORCPT ); Mon, 5 Aug 2019 16:41:06 -0400 Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1hujmy-0005av-5s; Mon, 05 Aug 2019 22:41:04 +0200 Message-ID: <806e8714fc6b87fea44bbe6838590bde3cdfe7cd.camel@sipsolutions.net> Subject: Re: [EXT] [RFC/RFT] cfg80211: decouple us from the RTNL From: Johannes Berg To: Dedy Lansky , linux-wireless@vger.kernel.org Cc: 'Florian Westphal' Date: Mon, 05 Aug 2019 22:41:02 +0200 In-Reply-To: <000701d54ba1$48ea2520$dabe6f60$@codeaurora.org> References: <20190731220848.1045-1-johannes@sipsolutions.net> <000701d54ba1$48ea2520$dabe6f60$@codeaurora.org> 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 On Mon, 2019-08-05 at 18:20 +0300, Dedy Lansky wrote: > > Then, we can restrict the RTNL to a few cases where we add or > > remove interfaces and really need the added protection. Some > > of the global list management still also uses the RTNL, since > > we need to have it anyway for netdev management. > > TODO: > > - use wiphy_lock()/wiphy_unlock() in all drivers as the code > > changed in mac80211 does > > I guess this change breaks existing drivers because some drivers assume RTNL > is locked when their cfg callbacks are executed. Is that correct? It might, to some extent. Mostly though, it shouldn't really matter to them since the actual callbacks that manipulate interfaces (add, remove, set type) and thus require RTNL still hold the RTNL. > Would there be any simple rules for drivers when to use each one of the > locking API: rtnl vs wiphy vs wdev ? I'd say RTNL only if externally required. Wiphy vs. wdev I haven't really quite made up my mind - I'm contemplating just removing the wdev lock since for (driver/mac80211) simplicity we'll probably not want concurrency there anyway? Should be rare (Ben Greear will be the only one hitting it ...) that you really need concurrency there, and simplifies things a lot. johannes