From: Kalle Valo <kalle.valo@iki.fi>
To: Michael Buesch <mb@bu3sch.de>
Cc: linux-wireless@vger.kernel.org,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: ieee80211_scan_completed() calling config() and possible deadlock
Date: Mon, 23 Feb 2009 15:23:09 +0200 [thread overview]
Message-ID: <87r61p70ea.fsf@litku.valot.fi> (raw)
In-Reply-To: <200902231413.49289.mb@bu3sch.de> (Michael Buesch's message of "Mon\, 23 Feb 2009 14\:13\:49 +0100")
Michael Buesch <mb@bu3sch.de> writes:
>> I'm just wondering what's the right way(tm) to handle this. I see
>> two options:
>>
>> 1. Consider the (possible) deadlock as a feature, document it and
>> let the drivers handle it. This is relatively easy.
>>
>> 2. Handle this in mac80211 (eg. schedule a workqueue) and drivers
>> don't need to care. This might complicate mac80211 implementation a
>> bit, but easier for the drivers.
>>
>> I myself cannot decide which one is better. What do people think?
>>
>
> I think drivers should not be able to call ieee80211_scan_completed()
> directly. Instead they should call a function which schedules
> ieee80211_scan_completed() on a workqueue.
Yes, that was my option two.
> In general I consider it broken behavior, if a function called by
> the driver can recurse into the driver. We had that behavior in
> ieee80211-softmac and it was one of the main reasons it sucked so
> much.
Ok, this is a very strong argument in favor of option 2.
> The wq schedule code is trivial to implement in mac80211 and it's also
> OK to do so. The function is not required to execute synchronously.
I'm leaning on option two then. Thanks for the feedback!
--
Kalle Valo
prev parent reply other threads:[~2009-02-23 13:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 13:05 ieee80211_scan_completed() calling config() and possible deadlock Kalle Valo
2009-02-23 13:13 ` Michael Buesch
2009-02-23 13:23 ` Kalle Valo [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=87r61p70ea.fsf@litku.valot.fi \
--to=kalle.valo@iki.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=mb@bu3sch.de \
/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.