From: Ben Greear <greearb@candelatech.com>
To: Julian Calaby <julian.calaby@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] mac80211: Clean up work-queues on disassociation.
Date: Wed, 20 Feb 2013 06:04:12 -0800 [thread overview]
Message-ID: <5124D7DC.6010708@candelatech.com> (raw)
In-Reply-To: <CAGRGNgVY+v9ko0MicEp5ozjrv38TG87sTw78SZhLLEqaK=XQ8Q@mail.gmail.com>
On 02/19/2013 10:23 PM, Julian Calaby wrote:
> Hi Ben,
>
> On Wed, Feb 20, 2013 at 1:11 PM, <greearb@candelatech.com> wrote:
>> From: Ben Greear <greearb@candelatech.com>
>>
>> The monitor_work and beacon_connection_loss_work items were
>> not being canceled on disassociation (and not on deletion
>> either). This leads to work-items trying to run after memory
>> has been deleted.
>>
>> I could not find a cleaner way to do this because the
>> cancel_work_sync for these items must be done outside
>> of the ifmgd->mtx.
>>
>> In addition, re-order the quiesce code so that timers are
>> always stopped before work-items are flushed. This was
>> not the problem I saw, but I think it may still be more
>> correct.
>>
>> This fixes the crashes we see in 3.7.9+. The crash stack
>> trace itself isn't so helpful, but this warning gives
>> more useful info:
>
> [snip]
>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>> ---
>>
>> NOTE: Please do not apply this until it is reviewed by Johannes,
>> at least.
>>
>> net/mac80211/mlme.c | 68 +++++++++++++++++++++++++++++++++++++++++++++-----
>> 1 files changed, 61 insertions(+), 7 deletions(-)
>>
>> diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
>> index 164ecf0..5a65144 100644
>> --- a/net/mac80211/mlme.c
>> +++ b/net/mac80211/mlme.c
>> @@ -2954,19 +2978,15 @@ void ieee80211_sta_quiesce(struct ieee80211_sub_if_data *sdata)
>>
>> cancel_work_sync(&ifmgd->request_smps_work);
>>
>> + sdata_err(sdata, "Cancel-work-sync monitor_work, sta_quiesce.\n");
>
> Debug code?
Err, yes..will remove.
>> void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
>> @@ -3262,6 +3282,8 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
>> struct ieee80211_mgd_auth_data *auth_data;
>> u16 auth_alg;
>> int err;
>> + bool maybe_cancel_work = false;
>> + bool hit_err_clear = false;
>
> You could replace these with a single variable.
I don't see how. It seems that we should only cancel the work items
if we called set_disassoc AND if the subsequent attempts to (re)associate
failed.
Maybe I missed something?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2013-02-20 14:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 2:11 [PATCH] mac80211: Clean up work-queues on disassociation greearb
2013-02-20 6:23 ` Julian Calaby
2013-02-20 14:04 ` Ben Greear [this message]
2013-02-20 22:08 ` Julian Calaby
2013-02-20 9:59 ` Johannes Berg
2013-02-20 14:09 ` Ben Greear
2013-02-20 14:13 ` Johannes Berg
2013-02-20 14:24 ` Ben Greear
2013-02-20 14:27 ` Johannes Berg
2013-02-25 10:20 ` Stanislaw Gruszka
2013-02-25 16:55 ` Ben Greear
2013-02-26 15:55 ` Stanislaw Gruszka
2013-02-26 16:51 ` Ben Greear
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=5124D7DC.6010708@candelatech.com \
--to=greearb@candelatech.com \
--cc=julian.calaby@gmail.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 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.