linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Ben Greear <greearb@candelatech.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: deadlock on sdata->u.mgd.mtx between worker thread an 'ip'?
Date: Tue, 05 Oct 2010 10:43:06 +0200	[thread overview]
Message-ID: <1286268186.3641.10.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <4CAAB75A.3050309@candelatech.com>

On Mon, 2010-10-04 at 22:27 -0700, Ben Greear wrote:

> I think the deadlock might be between kworker and ip, on the
> sdata->u.mgd.mtx v/s iflist_mtx lock.  It seems both processes
> have ifmgd->mtx held, and worker is trying to grab it again but
> blocks.
> 
> I think maybe the ip process has locked a different sdata than
> 'forsdata', so that is why this nested lock attempt by the worker thread
> to all of the !forsdata objects blocks?
> 
> void ieee80211_recalc_smps(struct ieee80211_local *local,
> 			   struct ieee80211_sub_if_data *forsdata)
> ...
> 		if (sdata != forsdata) {
> 			/*
> 			 * This nested is ok -- we are holding the iflist_mtx
> 			 * so can't get here twice or so. But it's required
> 			 * since normally we acquire it first and then the
> 			 * iflist_mtx.
> 			 */
> 			mutex_lock_nested(&sdata->u.mgd.mtx, SINGLE_DEPTH_NESTING);
> 			count += check_mgd_smps(&sdata->u.mgd, &smps_mode);
> 			mutex_unlock(&sdata->u.mgd.mtx);
> 		} else

I just debugged the same based on your other mail ...

johannes


      reply	other threads:[~2010-10-05  8:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  5:27 deadlock on sdata->u.mgd.mtx between worker thread an 'ip'? Ben Greear
2010-10-05  8:43 ` Johannes Berg [this message]

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=1286268186.3641.10.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=greearb@candelatech.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).