Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1229530pxu; Thu, 17 Dec 2020 05:28:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAf8rT8Zc8DUyGu1+9ygpJDRzq2XGuKbXjLen4RmkUhSA0nKVIhxP0mXXs6q0eudCx2ol8 X-Received: by 2002:a17:906:608:: with SMTP id s8mr15398001ejb.371.1608211733919; Thu, 17 Dec 2020 05:28:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608211733; cv=none; d=google.com; s=arc-20160816; b=XQ3duGqRk+Qmx1bJXgaCW+e1MiSBoufimiQkLgyeSIvkzsKCAGUJzy+3BtqF2XN86r xHG86bJ+emnJM3l2hBxekzk7+LfVIpDLErph7kSl31ivte0LuSF3NjbHOiZYzs10JZ20 5ipPxD7z2JIV55efhMDbq77+l/l9x4HnwMITbzbtxHXgOd6qurK1m+qNEVc+T4uLnFvx HMQ2ResO8NTDOg8baQdvBffO337UbjeJjbzCCWjpiUlzkD0h08d+OAbaF/e/xE4P0qeZ CqPzO2xsafUEe5gtfeixjdhf0f5TGXDkvtVzSflSVPVIBdvaErFESiRxHwCNeZkToKMO mjjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:message-id; bh=h26WP/xX9M2aUJU6xMfSpgNqW5YZnFlIZ9d5ZWoRNtQ=; b=KWKnfLdtoVFUzP3qQ79fU1mQjr0RD+2zQRRmgGiQBPaUK4yNtbfiqo7X8JR2S+R+LP kueYFepicrpFaxaLYw7nMaBofG0qdi01fRVImKu0VpPHetOYFhTn+tXxxZLOhu6Y8069 +Ru9A2um/UdAmA9cOBO3Ss8DgNqqQda/WutXTu8/2YmFeEwU4lWyxOIF1zot92zXZU4i OWFPt4hUgcIxaSBGDx7hOfNPLZ1nn+SW1I2hYxPQ8nM2NjGt5VtRntuDLDaK5nlfCWNj 6TClYWk3BdE21UD/M2ZXIqzdZZZuDQF1LcKG9ciGeyLm6RdAsw2g/mM1+w8vZZMAV6T6 LIwQ== 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 w5si4464158edf.510.2020.12.17.05.28.28; Thu, 17 Dec 2020 05:28:53 -0800 (PST) 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 S1728063AbgLQN0t (ORCPT + 99 others); Thu, 17 Dec 2020 08:26:49 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:37016 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727160AbgLQN0t (ORCPT ); Thu, 17 Dec 2020 08:26:49 -0500 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=[192.168.100.69]) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1kptHz-003JCS-M9; Thu, 17 Dec 2020 15:25:52 +0200 Message-ID: From: Luca Coelho To: Marek Szyprowski , johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Date: Thu, 17 Dec 2020 15:25:50 +0200 In-Reply-To: References: <20201129153055.1971298-1-luca@coelho.fi> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: Re: [PATCH 09/13] cfg80211: Save the regulatory domain when setting custom regulatory Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 2020-12-16 at 11:20 +0100, Marek Szyprowski wrote: > Hi Luca, Hi Marek, > On 29.11.2020 16:30, Luca Coelho wrote: > > From: Ilan Peer > > > > When custom regulatory was set, only the channels setting was updated, but > > the regulatory domain was not saved. Fix it by saving it. > > > > Signed-off-by: Ilan Peer > > Signed-off-by: Luca Coelho > > This patch landed recently in linux-next as commit beee24695157 > ("cfg80211: Save the regulatory domain when setting custom regulatory"). > It triggers the following warning on all boards I have, which use > Broadcom chips. Here is an example from Raspberry Pi4: > > cfg80211: Loading compiled-in X.509 certificates for regulatory database > cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7' > cfg80211: loaded regulatory.db is malformed or signature is missing/invalid > brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip > BCM4345/6 > brcmfmac mmc1:0001:1: Direct firmware load for > brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt failed with error -2 > brcmfmac mmc1:0001:1: Falling back to sysfs fallback for: > brcm/brcmfmac43455-sdio.raspberrypi,4-model-b.txt > brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43455-sdio for chip > BCM4345/6 > brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), > device may have limited channels available > brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4345/6 wl0: Mar  1 2015 > 07:29:38 version 7.45.18 (r538002) FWID 01-6a2c8ad4 > Bluetooth: hci0: BCM: chip id 107 > Bluetooth: hci0: BCM: features 0x2f > Bluetooth: hci0: BCM4345C0 > Bluetooth: hci0: BCM4345C0 (003.001.025) build 0000 > Bluetooth: hci0: BCM4345C0 'brcm/BCM4345C0.hcd' Patch > > ============================= > WARNING: suspicious RCU usage > 5.10.0-next-20201215+ #9962 Not tainted > ----------------------------- > net/wireless/reg.c:144 suspicious rcu_dereference_check() usage! > > other info that might help us debug this: > > > rcu_scheduler_active = 2, debug_locks = 1 > 2 locks held by kworker/1:1/32: >   #0: ffff000003405738 ((wq_completion)events){+.+.}-{0:0}, at: > process_one_work+0x200/0x728 >   #1: ffff80001321bdc0 ((work_completion)(&fw_work->work)){+.+.}-{0:0}, > at: process_one_work+0x200/0x728 > > stack backtrace: > CPU: 1 PID: 32 Comm: kworker/1:1 Not tainted 5.10.0-next-20201215+ #9962 > Hardware name: Raspberry Pi 4 Model B (DT) > Workqueue: events request_firmware_work_func > Call trace: >   dump_backtrace+0x0/0x1d0 >   show_stack+0x14/0x60 >   dump_stack+0xf4/0x15c >   lockdep_rcu_suspicious+0xd4/0xf8 >   get_wiphy_regdom+0x6c/0x70 [cfg80211] >   wiphy_apply_custom_regulatory+0x80/0xc8 [cfg80211] >   brcmf_cfg80211_attach+0xb44/0x1330 [brcmfmac] >   brcmf_attach+0x174/0x4b8 [brcmfmac] >   brcmf_sdio_firmware_callback+0x670/0x7c8 [brcmfmac] >   brcmf_fw_request_done+0x7c/0x100 [brcmfmac] >   request_firmware_work_func+0x4c/0xd8 >   process_one_work+0x2a8/0x728 >   worker_thread+0x48/0x460 >   kthread+0x134/0x160 >   ret_from_fork+0x10/0x18 > > Reverting this patch on top of linux next-20201215 hides this issue. This is indeed an issue. Now syzbot also reported it. We currently have an issue with our test machinery that is not enabling lockdep and other lock checks... We'll fix this asap. -- Cheers, Luca.