All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, Oliver Neukum <oneukum@suse.com>
Subject: Re: [PATCH v2] cfg80211: avoid holding the RTNL when calling the driver
Date: Mon, 25 Jan 2021 12:56:21 +0100	[thread overview]
Message-ID: <b425cbc3-63a8-3252-e828-bcb7b336b783@samsung.com> (raw)
In-Reply-To: <4ae7a27c32cbf85b4ddb05cc2a16e52918663633.camel@sipsolutions.net>

Hi Johannes,

On 22.01.2021 13:27, Johannes Berg wrote:
>> This patch landed in today's (20210122) linux-next as commit
>> 791daf8fc49a ("cfg80211: avoid holding the RTNL when calling the
>> driver"). Sadly, it causes deadlock with mwifiex driver. I think that
>> lockdep report describes it enough:
> Yeah, umm, sorry about that. Evidently, I somehow managed to put
> "wiphy_lock()" into that part of the code, rather than "wiphy_unlock()"!
>
> I'll fix, thanks!

I've checked today's linux-next with the updated commit 27bc93583e35 
("cfg80211: avoid holding the RTNL when calling the driver") and there 
is still an issue there, but at least it doesn't cause a deadlock:

cfg80211: Loading compiled-in X.509 certificates for regulatory database
Bluetooth: vendor=0x2df, device=0x912a, class=255, fn=2
cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
Bluetooth: FW download over, size 533976 bytes
btmrvl_sdio mmc3:0001:2: sdio device tree data not available
mwifiex_sdio mmc3:0001:1: WLAN FW already running! Skip FW dnld
mwifiex_sdio mmc3:0001:1: WLAN FW is active
mwifiex_sdio mmc3:0001:1: CMD_RESP: cmd 0x242 error, result=0x2
mwifiex_sdio mmc3:0001:1: mwifiex_process_cmdresp: cmd 0x242 failed 
during       initialization
------------[ cut here ]------------
WARNING: CPU: 0 PID: 5 at net/wireless/core.c:1336 
cfg80211_register_netdevice+0xa4/0x198 [cfg80211]
Modules linked in: mwifiex_sdio mwifiex sha256_generic libsha256 
sha256_arm btmrvl_sdio btmrvl cfg80211 bluetooth s5p_mfc exynos_gsc 
v4l2_mem2mem videobuf2_dma_co
ntig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev 
ecdh_generic ecc mc s5p_cec
CPU: 1 PID: 18 Comm: kworker/1:0 Not tainted 
5.11.0-rc4-00536-g27bc93583e35-dirty #2345
Hardware name: Samsung Exynos (Flattened Device Tree)
Workqueue: events request_firmware_work_func
[<c01116e8>] (unwind_backtrace) from [<c010cf58>] (show_stack+0x10/0x14)
[<c010cf58>] (show_stack) from [<c0b46744>] (dump_stack+0xa4/0xc4)
[<c0b46744>] (dump_stack) from [<c01270ac>] (__warn+0x118/0x11c)
[<c01270ac>] (__warn) from [<c0127164>] (warn_slowpath_fmt+0xb4/0xbc)
[<c0127164>] (warn_slowpath_fmt) from [<bf1a9de0>] 
(cfg80211_register_netdevice+0xa4/0x198 [cfg80211])
[<bf1a9de0>] (cfg80211_register_netdevice [cfg80211]) from [<bf28f2e4>] 
(mwifiex_add_virtual_intf+0x6a0/0x9f4 [mwifiex])
[<bf28f2e4>] (mwifiex_add_virtual_intf [mwifiex]) from [<bf26c79c>] 
(_mwifiex_fw_dpc+0x264/0x494 [mwifiex])
[<bf26c79c>] (_mwifiex_fw_dpc [mwifiex]) from [<c06c881c>] 
(request_firmware_work_func+0x58/0x94)
[<c06c881c>] (request_firmware_work_func) from [<c0149af8>] 
(process_one_work+0x30c/0x888)
[<c0149af8>] (process_one_work) from [<c014a0cc>] (worker_thread+0x58/0x594)
[<c014a0cc>] (worker_thread) from [<c015105c>] (kthread+0x154/0x19c)
[<c015105c>] (kthread) from [<c010011c>] (ret_from_fork+0x14/0x38)
Exception stack(0xc1cedfb0 to 0xc1cedff8)
...
---[ end trace c04a86d3eb55e7cb ]---
mwifiex_sdio mmc3:0001:1: info: MWIFIEX VERSION: mwifiex 1.0 (14.68.29.p59)
mwifiex_sdio mmc3:0001:1: driver_version = mwifiex 1.0 (14.68.29.p59)

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2021-01-26  5:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-19  9:21 [PATCH v2] cfg80211: avoid holding the RTNL when calling the driver Johannes Berg
2021-01-20 18:03 ` Johannes Berg
2021-01-22 14:42   ` Johannes Berg
     [not found] ` <CGME20210122121108eucas1p2d153ab9c3a95015221b470a66a0c8458@eucas1p2.samsung.com>
2021-01-22 12:11   ` Marek Szyprowski
2021-01-22 12:27     ` Johannes Berg
2021-01-25 11:56       ` Marek Szyprowski [this message]
2021-01-25 12:34         ` Johannes Berg
2021-01-25 21:36           ` Marek Szyprowski
2021-03-17 22:52 Peter Collingbourne
2021-03-18  7:55 ` Johannes Berg
2021-03-18 19:10   ` Peter Collingbourne
2021-03-18 19:13     ` Johannes Berg

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=b425cbc3-63a8-3252-e828-bcb7b336b783@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.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.