Search Linux Wireless

Re: ieee80211_scan_completed() calling config() and possible deadlock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael Buesch <mb@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux