Search Linux Wireless

Re: mac80211: workqueue & RTNL lock

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

 



On 6/24/08, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> On Mon, 2008-06-23 at 13:17 +0200, Ivo Van Doorn wrote:
>
>> Well it was caused by the recent introduction of the interface iterator.
>> Question now is if we need to restrict the usage, remove the
>> flush_workqueue,
>> or change the locking in the interface iterator. :S
>
> Ouch. Any way you can use the atomic iterator there?

No because of rt2500usb and rt73usb who need scheduling,
and this bug is in exactly the same function as before where we had
the scheduling while atomic problem when you introduced the atomic iterator. ;)

> Or if not, can you use schedule_work and cancel_work_sync to take care
> of things?

I thought about that it cancel_work_sync will cause exactly the same problem,
stop() holds the rtnl lock, rt2x00 work waits for rtnl lock, mac80211
calls stop(), rt2x00 waits until tasks are completed but one of those
is still waiting on the rtnl lock.

However I could use the non-synchronized version for cancelling the work
and add a check to see if the work should be cancelled within the
rtnl-protected area.

> I would like to keep the mac80211 workqueue rtnl-free because
> otherwise locking is going to get ugly.

We need a big warning in mac80211.h then that tells that the non-atomic iterator
or any other rtnl locking cannot be used in the mac80211 workqueue.

Ivo
--
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