linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Wunderlich <sw@simonwunderlich.de>
To: Kalle Valo <kvalo@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: Circular lock with mac80211_hwsim and DFS
Date: Tue, 17 Dec 2013 21:17:17 +0100	[thread overview]
Message-ID: <201312172117.17538.sw@simonwunderlich.de> (raw)
In-Reply-To: <201312171805.34821.sw@simonwunderlich.de>

> > Hi,
> > 
> > I tried to run a simple DFS test with mac80211_hwsim for the first time
> > but got the deadlock below. Is this a regression or has DFS ever worked
> > with hwsim?
> > 
> > Using 31e1798fbf from mac80211-next.
> 
> just checked again with mac80211-next for ath9k, and I don't see this
> lockdep problem. Appearently this is a problem in hwsim only ....
> 

...after talking to Johannes, I could actually recreate the problem. I have 
never tried to scan before starting hostap (actually this would only be 
possible with force-ap when in AP mode). This will then mark the path for 
lockdep, which eventually will hit the splat you reported. So I take that 
back, the problem is also in ath9k and not in hwsim.

As Johannes pointed out, this should not happen when using DFS because of RTNL 
locking, but still this is ugly.

For reference, the problem is:

1)
 * ieee80211_request_scan locks local->mtx 
 * ieee80211_offchannel_stop_vifs locks local->iflist_mtx
2)
 * start_radar_detection locks local->iflist_mtx
 * ieee80211_vif_use_channel locks local->chanctx_mtx
 * ieee80211_new_chanctx locks local->mtx

And there we have the circular dependency.

Cheers,
    Simon

  reply	other threads:[~2013-12-17 20:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-17 10:12 Circular lock with mac80211_hwsim and DFS Kalle Valo
2013-12-17 17:05 ` Simon Wunderlich
2013-12-17 20:17   ` Simon Wunderlich [this message]
2013-12-17 19:56 ` 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=201312172117.17538.sw@simonwunderlich.de \
    --to=sw@simonwunderlich.de \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    /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).