[OpenWrt-Devel] [RFC] netifd: Crash when netifd reload is handled during netifd startup
dedeckeh at gmail.com
Tue Jun 24 06:46:03 EDT 2014
Netifd is crashing when when a network reload (ubus call network reload) is handled during the parsing of the network config in the function config_init_all (called from main) at startup.
As an ubus_invoke function call is issued when the interfaces are created; ubus will also process the pending ubus calls in this case the network reload during the invoke.
As netifd_reload calls again config_init_all network config will be parsed again; on return from netifd_reload the original config_init_all function call will continue but will crash as references hold to interface/device/etc ... lists are not correct anymore.
This potential problem has always been present but due to netifd_reload timing behavior change in netifd commit 5db02763d61785529bef538f196c180e968b7c26 this problem can easily be triggered.
To solve the issue I was thinking about deferring the network reload when the function config_init_all is parsing the config.
Any opinion if this is the correct way to go or any other alternatives ?
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel