Hi Martin,

> I found a new racy issue.
> If you are ok with my analysis, I can send the patches to fix it. Attachment 
> is the log file.
> 
> Please refer bug:
> http://bugzilla.moblin.org/show_bug.cgi?id=9042 : Starting ConnMan with 
> rfkill blocked may cause ConnMan crash
> 
> 
> The root cause is that:
> If rfill is blocked before starting of ConnMan, rfkill event handler will 
> call device->disable() to disable wifi device. But the event may happen at 
> flowing wifi device probe and enable stage when device->disable() is called 
> to enable wifi device.
> 
> Calling device->disable() and device->enable() at same time will cause race 
> condition issue.
> 
> We should fix the issue from two sides:
> 
> 1. On the starting of ConnMan, dev/rfkill should be read to get the initial 
> states of wireless devices. if one device is blocked, the device should not 
> be enabled.
> current issue is that rfkill event is asynchronized, and may happened 
> at/after device_enable() stage, and leads to racy issue and useless 
> operation(even if the racy issue does not happen, the wifi device should not 
> be enabled and then disabled).
> 
> 2. device->enable() and device->disable() including asynchronized dbus 
> operation. So they may cause racy issue, when calling device->disable() when 
> device->enable() is not finished.
> I suggest to add pending flag to sequence the two operation, just like what 
> we have done to fix dhcp racy issue.

sounds like the right way to go forward. Please send patches for it.

Regards

Marcel


_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to