Received: by 2002:a05:7412:b101:b0:e2:908c:2ebd with SMTP id az1csp2691142rdb; Wed, 15 Nov 2023 08:00:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IFbnXY2wrqkcSfpl/1UBM9BJqFBmWRl5FLa3CpyHpFfC2Y2l2o1c4lhMSceT99bEe8+hvAF X-Received: by 2002:a05:6a21:a584:b0:187:8d7a:76e8 with SMTP id gd4-20020a056a21a58400b001878d7a76e8mr1226446pzc.16.1700064037389; Wed, 15 Nov 2023 08:00:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700064037; cv=none; d=google.com; s=arc-20160816; b=teXqCwkDEF91XA74C+iL/VzdXgO5w68I6nhlsz3MjOu1KTOiRS4b+9oc0Iq3enM43w Nr/IgBJcc8pB3jsHQkDu6bWwSDhgdQkwnxNSQonUkIPs66maMjLrpBk6An/HC5pqLv0n auSXqbBo8UFjyQVkHBvgsc4rouFXA/KQs6C238O7ipXpSfyjJQ30ILwgV8R+IOI4+zX7 umCTw64P/96AACsnPyaSZhpwtrFedwyKehwLyf8DDDTitb+p0VlM90qKIdQDWUnvzCvl Q+KxqfkKBmKxUQDRRqQ9oInmGmzTaZrF1FA2fEHlZtx2eULkzqE9dllE1sVxWV66BPun XQNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6FG6mDbZwRzWxBlmz1xwTXEeIzsRjkaD4KSlm1Az/2g=; fh=UanOD8uSqtj7lv3Ii1MValkGHtqdXz9Igx6xxxNIKOY=; b=ji4HLpGSGuCI9HM2wlRfaue59nH34nfhvrwO/sulOD6PWL4Mlp4UC8McWCAPf1PAjH OjHYoab4ITTVp/LuAPiN7BmpGG2SRHXjUSBRXkahh9nPS5p5iMENQyWNFn9QuaFtgqT4 1SUo90QotgMJ2L9oLouXnXN0gWlXrigszxIO3W5UEyMAd88kZj6zcWRLZWhyqJTUwMAa x3g2dpPzIYQgOPgV05mKkn9ijhnKfBP6/70kLB5uAxACEJh6saBhEfabIpl2S3XcdHYQ 5wItnzjWLIpWbyDhcoDOCq0YgwppWW0S3VrgZy6qYGJQ0OCxB7Zx6FMGUdfvdaLDji1R Dq0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GRrdm9bz; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id v202-20020a6361d3000000b005b8f298110csi1092608pgb.6.2023.11.15.08.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 08:00:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GRrdm9bz; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id E56448106782; Wed, 15 Nov 2023 08:00:28 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231511AbjKOQA3 (ORCPT + 53 others); Wed, 15 Nov 2023 11:00:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbjKOQA3 (ORCPT ); Wed, 15 Nov 2023 11:00:29 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CFE8194 for ; Wed, 15 Nov 2023 08:00:26 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD6AEC433C8; Wed, 15 Nov 2023 16:00:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700064025; bh=oScyJ9KTvIxBPm63+sx7MFVp+HeKppRXpPKIyCGg/68=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GRrdm9bz4B+hH4AvDLZ7ERP2i0pijDhkqdH2x8oEbVMwN1n56R9v0m1X/7qLicAeI Hk3fFzLQ6cNrCD03Ue2OXniAVuh6N3pW6fEBH2Hc02RkF3chnKsM40MYnIjwx5UWJa oZDCofS5HuHb4vN0cJtB1mxWCaGJykobrNUBKWrMkWY4QaEkVgKntSZC7/vAHAfOJb Q2oA7Zvy8VFTINqV5oLgzyvjD5BYM9U5Ii2NBfWM2wgWGM7L84mFVxdI5xY0+bjuOZ CqcNVdyQH5hVsLYGqdWU4XQQ66qQbPSNQ62/p1sgContGOXo6P1WMsV3+TpGqAb8pF xyDOwSG4dvJug== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1r3IJT-0006dG-31; Wed, 15 Nov 2023 17:00:24 +0100 Date: Wed, 15 Nov 2023 17:00:23 +0100 From: Johan Hovold To: Johannes Berg Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: Re: [PATCH] wifi: cfg80211: hold wiphy mutex for send_interface Message-ID: References: <20231115130615.b1ccadaf9e13.Ic207e2f99f806e9120278f92fdebc2822842c301@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231115130615.b1ccadaf9e13.Ic207e2f99f806e9120278f92fdebc2822842c301@changeid> X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 15 Nov 2023 08:00:29 -0800 (PST) On Wed, Nov 15, 2023 at 01:06:16PM +0100, Johannes Berg wrote: > From: Johannes Berg > > Given all the locking rework in mac80211, we pretty much > need to get into the driver with the wiphy mutex held in > all callbacks. This is already mostly the case, but as > Johan reported, in the get_txpower it may not be true. > > Lock the wiphy mutex around nl80211_send_iface(), then > is also around callers of nl80211_notify_iface(). This > is easy to do, fixes the problem, and aligns the locking > between various calls to it in different parts of the > code of cfg80211. > > Fixes: 0e8185ce1dde ("wifi: mac80211: check wiphy mutex in ops") > Reported-by: Johan Hovold > Closes: https://lore.kernel.org/r/ZVOXX6qg4vXEx8dX@hovoldconsulting.com > Signed-off-by: Johannes Berg Thanks for the quick fix. With this I no longer see any lockdep splat on boot with the X13s: Tested-by: Johan Hovold Johan