Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2772C4332F for ; Tue, 14 Nov 2023 17:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231586AbjKNRCv (ORCPT ); Tue, 14 Nov 2023 12:02:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbjKNRCv (ORCPT ); Tue, 14 Nov 2023 12:02:51 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 211E0CB for ; Tue, 14 Nov 2023 09:02:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=xdWfV1jK41rLW+vwjUaGY2+CHRneTdw41ou4qGffX/Q=; t=1699981368; x=1701190968; b=t7LcZwcNwLgUSm3HEnGanzdz/SKdIlObHmZssq26yrjO/qS cToTAjyXI4GENZfb5q92dfv6c/gbhff+af867jUk/PPIwQyvkVUG3QjrqIYAXZhLqT9hI3k1Gesrl 3C5UZJDwLC7ClKzrkaS71SUS9IyqTKpGJSRWM0XOz9Ve6d7xnjd/8AodNhi1Y9+geCYYA7Vu4qZDe DGhdHUSkFvIEKRDGm31mnzmdoDRzZuvkQC+MWyA2hsVVQTeqMZ3jGw4h3D0TYHaasqP4c75JDIiAG fH1sk+5rUCwiB8aHD+iI6dzaHQFaSxngoyE74fMpNf5gVqM07DXfr2qNwCdLCSwg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1r2wo6-000000082gd-0mdz; Tue, 14 Nov 2023 18:02:34 +0100 Message-ID: <02159e92fd1d9a6fd993ae9f913c7ed756b6d3ac.camel@sipsolutions.net> Subject: Re: wifi: mac80211: lockdep splat with 6.7-rc1 From: Johannes Berg To: Johan Hovold Cc: Emmanuel Grumbach , linux-wireless@vger.kernel.org Date: Tue, 14 Nov 2023 18:02:33 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, 2023-11-14 at 16:50 +0100, Johan Hovold wrote: > Hi, >=20 > I get the lockdep splat below when booting 6.7-rc1 with ath11k (Lenovo > ThinkPad X13s). >=20 > It's the new assert added by commit 0e8185ce1dde ("wifi: mac80211: check > wiphy mutex in ops") which triggers in drv_get_txpower(). >=20 > Naively adding locking around the call in ieee80211_get_tx_power() > (e.g. similar to 6b348f6e34ce ("wifi: mac80211: ethtool: always hold > wiphy mutex")) does not work as there are other paths that call this > function with the lock held, specifically via ieee80211_register_hw(). The latter we can just take the lock I guess? > [ 7.127780] ieee80211_get_tx_power+0x19c/0x1c0 [mac80211] > [ 7.127859] nl80211_send_iface+0x208/0x6a4 [cfg80211] > [ 7.127946] nl80211_dump_interface+0x120/0x254 [cfg80211] >=20 And here maybe we should just take the mutex at the nl80211 level. That's the nice thing now, it's shared between the layers :) I can't do it right now, but I'll take a look tomorrow. johannes