linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@iki.fi>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 06/16] wl1251: fix deadlock with ieee80211 beacon filter calls
Date: Tue, 17 Nov 2009 19:10:51 +0200	[thread overview]
Message-ID: <87r5rxcc10.fsf@purkki.valot.fi> (raw)
In-Reply-To: <1258477288.21197.1.camel@johannes.local> (Johannes Berg's message of "Tue\, 17 Nov 2009 18\:01\:28 +0100")

Johannes Berg <johannes@sipsolutions.net> writes:

> On Tue, 2009-11-17 at 18:48 +0200, Kalle Valo wrote:
>> From: Vidhya Govindan <vidhya.govindan@nokia.com>
>> 
>> Lockdep shows that there is a deadlock when calling ieee80211_rssi_changed()
>> under wl->mutex. Fix it by releasing mutex before calling mac80211 functions.
>> This patch is based on Work-In-Progress patch sent by Kalle Valo.
>
>>  	if (vector & SYNCHRONIZATION_TIMEOUT_EVENT_ID && wl->psm) {
>>  		wl1251_debug(DEBUG_EVENT, "SYNCHRONIZATION_TIMEOUT_EVENT");
>> +		/* need to unlock mutex to avoid deadlocking with rtnl */
>> +		mutex_unlock(&wl->mutex);
>>  
>>  		/* indicate to the stack, that beacons have been lost */
>>  		ieee80211_beacon_loss(wl->vif);
>> +		mutex_lock(&wl->mutex);
>
> That can't be true, ieee80211_beacon_loss() only calls
> ieee80211_queue_work().

You are correct, of course. The problem was in our internal and
heavily patched 2.6.28 tree, but not in wireless-testing. I should
have checked this when I was rebasing the patches. Johannes, thank you
for noticing this!

John, can you drop this patch or do you want me to resend the patch
set? Based on stgit there might some problems with patch 10 after
dropping this patch, but at least stgit was able to handle it
automatically.

-- 
Kalle Valo

  reply	other threads:[~2009-11-17 17:10 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17 16:48 [PATCH 00/16] wl1251: beacon filter support and more Kalle Valo
2009-11-17 16:48 ` [PATCH 01/16] wl1251: Add connection monitoring configuration Kalle Valo
2009-11-17 16:48 ` [PATCH 02/16] wl1251: Enable beacon filtering with the stack Kalle Valo
2009-11-17 16:48 ` [PATCH 03/16] wl1251: Configure beacon filtering on if PSM used Kalle Valo
2009-11-17 16:48 ` [PATCH 04/16] wl1251: Implement delayed entry into ELP mode Kalle Valo
2009-11-17 16:48 ` [PATCH 05/16] wl1251: allocate space for firmware with vmalloc() Kalle Valo
2009-11-17 16:48 ` [PATCH 06/16] wl1251: fix deadlock with ieee80211 beacon filter calls Kalle Valo
2009-11-17 17:01   ` Johannes Berg
2009-11-17 17:10     ` Kalle Valo [this message]
2009-11-17 16:49 ` [PATCH 07/16] wl1251: mask aid bits 14 and 15 in ps-poll template Kalle Valo
2009-11-17 16:49 ` [PATCH 08/16] wl1251: Add acx command to set tbtt and dtim period Kalle Valo
2009-11-17 16:49 ` [PATCH 09/16] wl1251: Set the correct dtim period to the firmware Kalle Valo
2009-11-17 16:49 ` [PATCH 10/16] wl1251: Increase the beacon loss timeout value and handle regain event Kalle Valo
2009-11-17 16:49 ` [PATCH 11/16] wl1251: Add IRQ looping support Kalle Valo
2009-11-17 16:49 ` [PATCH 12/16] wl1251: Filter out unwanted events Kalle Valo
2009-11-17 16:49 ` [PATCH 13/16] wl1251: Fix regression in IRQ loop handling Kalle Valo
2009-11-17 16:49 ` [PATCH 14/16] wl1251: Send null data packet with "TODS" bit set Kalle Valo
2009-11-17 16:50 ` [PATCH 15/16] wl1251: remove depcreated qual usage Kalle Valo
2009-11-17 16:50 ` [PATCH 16/16] wl1251: add NVS in EEPROM support Kalle Valo

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=87r5rxcc10.fsf@purkki.valot.fi \
    --to=kalle.valo@iki.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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).