Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1603253ybz; Thu, 23 Apr 2020 02:01:50 -0700 (PDT) X-Google-Smtp-Source: APiQypLqdVbwAy5Sj8QArx9v+0j6yjTdF7ExUYBfzn0qtvCocNAKU1nK7vreSaifPuFCoD692Xp5 X-Received: by 2002:a05:6402:30ad:: with SMTP id df13mr1820909edb.339.1587632509928; Thu, 23 Apr 2020 02:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587632509; cv=none; d=google.com; s=arc-20160816; b=diGHoG/CKfvk/UDubO/sviTUX5KOi6UmvAAAHiPEvdOe7UhChNBvXRa2h2Bq8osEhv 1HxAIheQbLwswnzALhox5o+IKLNd+Ys/R2DZFkFbEPPtcGa+Ua74pZQUoLXVCu6I7kc+ RkO1Jy89o8c376Zif4chKqGiWHYEtYCFluqeLN2o98EbS8CyV8bT4VODIkBEjeWcVHKy QuWHWYKpT6bOEcfYahVnj1idklhGFgC5BZrwEeFZDtH5Xli8YJgR3cPVtsQbnUqz5Ip2 20iYXlNKaJQhwxBXdOyeos2AoI/yxuGT4xmTz5Rb3NkFMxgzCJ6MsGssXerJiN5s0GGK qoMA== 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=GvPvtMfB6Sd1+Wy7f8U9Cjbt2ybqK3Ml6uh+8uFBNO8=; b=W2l0ZWS6tZ5xEuy9aENXh7WpnHL/kTQz5zepkQkHuRoocQ9UYEdohH7VG29KK5QlFm ovKI80BoAjVpuv0+VpGeT3LNcr1pQbKCDNcsuvmupKmp3lM0y2z+FNng1RjJ0s1QdBwF EJOnV3tEfxnEOvXxo2w8/R2avh0debGLGG9uCxtRzhZcWl7yh6RmbMR3+zgB0l0l2onk jDi9cXRx6TupMKKZyDWnjjsN5TpYLLPnkCp/ssexG24aMBCoX2I0HLn8ux2TwCb3y6FR hInN/BQdsSsZDhrLAn6eCSbA9IfDrUqZCBxQ3L1uKVjlPqCYUgsjfyj7fzPyd7TZd6fZ j1FQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q25si985540eja.500.2020.04.23.02.01.26; Thu, 23 Apr 2020 02:01:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726661AbgDWI7O (ORCPT + 99 others); Thu, 23 Apr 2020 04:59:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbgDWI7O (ORCPT ); Thu, 23 Apr 2020 04:59:14 -0400 X-Greylist: delayed 3598 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 23 Apr 2020 01:59:14 PDT Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72554C03C1AF; Thu, 23 Apr 2020 01:59:14 -0700 (PDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.93) (envelope-from ) id 1jRXhP-00EmKj-Ey; Thu, 23 Apr 2020 10:59:11 +0200 Message-ID: <42e9ac2651c677e9143b019393d60c3254893ae0.camel@sipsolutions.net> Subject: Re: Commit "mac80211: fix race in ieee80211_register_hw()" breaks mac80211 debugfs From: Johannes Berg To: Sumit Garg Cc: Hauke Mehrtens , linux-wireless , Felix Fietkau , stable Date: Thu, 23 Apr 2020 10:59:09 +0200 In-Reply-To: (sfid-20200423_105749_472578_D47E3801) References: <885ae3bffad315445be3fc70cccade9067ee6937.camel@sipsolutions.net> (sfid-20200423_105749_472578_D47E3801) Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) 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 Thu, 2020-04-23 at 14:27 +0530, Sumit Garg wrote: > > > +++ b/net/wireless/core.c > > > @@ -473,6 +473,10 @@ struct wiphy *wiphy_new_nm(const struct > > > cfg80211_ops *ops, int sizeof_priv, > > > } > > > } > > > > > > + /* add to debugfs */ > > > + rdev->wiphy.debugfsdir = debugfs_create_dir(wiphy_name(&rdev->wiphy), > > > + ieee80211_debugfs_dir); > > > > This cannot work, we haven't committed to the name of the wiphy yet at > > this point. > > Maybe I am missing something, can you please elaborate here? > > Looking at the code, the default or requested wiphy name is configured > just above this and the rename API "cfg80211_dev_rename()" takes care > of renaming wiphy debugfs directory too. Yes, but I think wiphy_register() can still fail at this point, due to name clashes or so? In any case, it'd be very strange to have a debugfs entry around when the wiphy doesn't exist yet, and could possibly cause the same issue that you fixed again, just through debugfs accesses? Can you take a look at the patch I sent? johannes