All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: Marek Szyprowski <m.szyprowski@samsung.com>, johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 09/13] cfg80211: Save the regulatory domain when setting custom regulatory
Date: Thu, 17 Dec 2020 15:25:50 +0200	[thread overview]
Message-ID: <bd0157de19815f7e7d8f009539326fadfee61089.camel@coelho.fi> (raw)
In-Reply-To: <d70a4e97-48e0-a4a4-40c2-77a7557db2ce@samsung.com>

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 <ilan.peer@intel.com>
> > 
> > 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 <ilan.peer@intel.com>
> > Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
> 
> 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.


  reply	other threads:[~2020-12-17 13:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-29 15:30 [PATCH 00/13] cfg80211/mac80211 patches from our internal tree 2020-11-29 Luca Coelho
2020-11-29 15:30 ` [PATCH 01/13] mac80211: he: remove non-bss-conf fields from bss_conf Luca Coelho
2020-11-29 15:30 ` [PATCH 02/13] cfg80211: initialize rekey_data Luca Coelho
2020-11-29 15:30 ` [PATCH 03/13] mac80211: support MIC error/replay detected counters driver update Luca Coelho
2020-11-29 15:30 ` [PATCH 04/13] cfg80211: Parse SAE H2E only membership selector Luca Coelho
2020-11-29 15:30 ` [PATCH 05/13] mac80211: Skip entries with " Luca Coelho
2020-11-29 15:30 ` [PATCH 06/13] cfg80211: scan PSC channels in case of scan with wildcard SSID Luca Coelho
2020-11-29 15:30 ` [PATCH 07/13] cfg80211: Update TSF and TSF BSSID for multi BSS Luca Coelho
2020-11-29 15:30 ` [PATCH 08/13] nl80211: always accept scan request with the duration set Luca Coelho
2020-11-29 15:30 ` [PATCH 09/13] cfg80211: Save the regulatory domain when setting custom regulatory Luca Coelho
     [not found]   ` <CGME20201216102006eucas1p18cede9af63b9ad4aed211ecf47c9aa8f@eucas1p1.samsung.com>
2020-12-16 10:20     ` Marek Szyprowski
2020-12-17 13:25       ` Luca Coelho [this message]
2021-06-15 14:42   ` Nicolas Cavallari
2021-10-11 10:51     ` Kalle Valo
2021-10-11 14:09       ` Nicolas Cavallari
2021-10-12 10:24       ` Nicolas Cavallari
2022-02-03 22:30         ` Johannes Berg
2022-02-07 17:56           ` Nicolas Cavallari
2020-11-29 15:30 ` [PATCH 10/13] ieee80211: update reduced neighbor report TBTT info length Luca Coelho
2020-11-29 15:30 ` [PATCH 11/13] mac80211: set sdata state once vif is up after restart Luca Coelho
2020-11-29 15:30 ` [PATCH 12/13] mac80211: disallow band-switch during CSA Luca Coelho
2020-11-29 15:30 ` [PATCH 13/13] cfg80211: include block-tx flag in channel switch started event Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bd0157de19815f7e7d8f009539326fadfee61089.camel@coelho.fi \
    --to=luca@coelho.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.