[PATCH] Fix a crash during isimodem initialization
Denis Kenzior
denkenz at gmail.com
Tue Dec 8 02:29:41 PST 2009
Hi Guys,
> > changes in ofono_modem_set_powered() by this commit:
> > http://git.kernel.org/?p=network/ofono/ofono.git;a=commit;h=b0f0e248e9c94
> >5239e0d6dd2ea5a37cb8227e51c are now causing isimodem driver to crash:
> >
While the patch does indeed fix the issue, it does it mostly by accident. To
add insult to injury it also has two style issues, all within 4 lines of code.
Seriously, if you're not sure about something, please discuss on IRC or give
us a chance to reply to the thread.
> > #0 0x0807c197 in ofono_modem_set_powered ()
> > #1 0x08054ca8 in netlink_status_cb ()
> > #2 0x08052d84 in g_pn_nl_process ()
> > #3 0x00312d5b in ?? () from /lib/libglib-2.0.so.0
> > #4 0x002dbe78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
> > #5 0x002df720 in ?? () from /lib/libglib-2.0.so.0
> > #6 0x002dfb8f in g_main_loop_run () from /lib/libglib-2.0.so.0
> > #7 0x0807afeb in main ()
The issue here is inside netlink_status_cb:
ofono_modem_set_data(isi->modem, isi);
ofono_modem_set_powered(isi->modem, TRUE);
ofono_modem_register(isi->modem);
You should not ofono_modem_set_powered a modem before registering it. The
fact that this works is pure luck.
I've reverted the patch and made a series of small fixes that should solve the
issue. I also suggest you guys use proper 'Powered' semantics and don't bring
up the device automatically. ConnMan will most likely end up managing the
'powered' user preferences store...
Regards,
-Denis
More information about the ofono
mailing list