linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	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 13:34:14 +0100	[thread overview]
Message-ID: <9cf620a5ae47bce0cf6344db502589a8763fc861.camel@sipsolutions.net> (raw)
In-Reply-To: <b425cbc3-63a8-3252-e828-bcb7b336b783@samsung.com>

Hi Marek,

> 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]

Yeah, umm, brown paper bag style bug.

I meant to _move_ that line down, but somehow managed to _copy_ it down.
Need to just remove it since rdev is not even initialized at that point.

I've updated my tree to include this:

diff --git a/net/wireless/core.c b/net/wireless/core.c
index 5e8b523dc645..200cd9f5fd5f 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1333,7 +1333,6 @@ int cfg80211_register_netdevice(struct net_device *dev)
        int ret;
 
        ASSERT_RTNL();
-       lockdep_assert_held(&rdev->wiphy.mtx);
 
        if (WARN_ON(!wdev))
                return -EINVAL;

johannes


  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
2021-01-25 12:34         ` Johannes Berg [this message]
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=9cf620a5ae47bce0cf6344db502589a8763fc861.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).