Search Linux Wireless

Re: [PATCH wireless-2.6] rt2x00: fix rmmod crash

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

 



Hi,

>> Well isn't the bug then that autowakeup_work isn't cancelled using
>> cancel_work_sync
>> like the other workqueue tasks?
>>
>> I rather add the call to cancel_work_sync then moving the killing of
>> the workqueue.
>> The position where the workqueue is destroyed should be the place
>> where we cancel
>> all scheduled work, that way we can assume no rt2x00-related threads ater this
>> position.
>
> rt2x00lib_config() could be running simultaneously to rt2x00lib_remove_dev()
> and queue just canceled autowake_work again into (just destroyed) workqueue.
> Other solution to fix, would be use ieee80211_queue_work() instead of custom
> workqueue, is that better?

Well 3 things are needed then,
1) Don't schedule autowake_work when DEVICE_PRESENT flag is not set
2) The handler for autowake_work should exit immediately when
DEVICE_PRESENT flag is not set
3) add a cancel_work_sync for the autowake_work inside remove_dev

That should effictively prevent the entire work structure from running
while the driver
is being rmmodded, or the device is being unplugged.

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