mirror of git://git.sysmocom.de/ofono
3b7d8e003e
There was an issue while running LTE and the connection manager tried to activate the context with CID 1 while it got automatically activated at the same time with CID 4. When the automatic activation happened ofono_gprs_cid_activated got called which tried to assign the context, but that failed since the driver context was considered in use (by the activation call). Eventhough it failed, the context was modified, cid was set to 0 (making cid 1 leak). Then release_context got called which clear pointers assigned to the context. A bit later the activation callback got called, in my case activation failed. Due to the failure it tries to clean up by calling context_settings_free, but unfortunately the pointers where reset above causing ofono to segfault du to null pointer derefs. Instead we make sure assign_context does not touch the context unless it succeeds. Then there is no need to call release_context if assign fails. That ensures the context being intact when the activation callback gets called. 03:23:21 ofonod[545]: Aux: < \r\n+CGEV: ME PDN ACT 4\r\n\r\n+CTZE: +04,0,"19/12/10,04:25:03"\r\n 03:23:21 ofonod[545]: drivers/ubloxmodem/network-registration.c:ctze_notify() tz +04 dst 0 time 19/12/10,04:25:03 03:23:21 ofonod[545]: src/network.c:ofono_netreg_time_notify() net time 2019-12-10 04:25:03 utcoff 3600 dst 0 03:23:22 ofonod[545]: Aux: > AT+CGDCONT?\r 03:23:22 ofonod[545]: drivers/ubloxmodem/gprs-context.c:ublox_gprs_activate_primary() cid 1 Connection manager requests activation, will mark the context in use and assign it cid 1. 03:23:22 ofonod[545]: Aux: < \r\n+CGDCONT: 1,"IP","m2m.tele2.com","",0,0,0,0,0,0\r\n 03:23:22 ofonod[545]: Aux: < +CGDCONT: 4,"IP","m2m.tele2.com.mnc003.mcc248.gprs","100.69.174.133",0,0,0,0,0,0\r\n 03:23:22 ofonod[545]: Aux: < \r\nOK\r\n 03:23:22 ofonod[545]: drivers/atmodem/gprs.c:at_cgdcont_read_cb() ok 1 03:23:22 ofonod[545]: src/gprs.c:ofono_gprs_cid_activated() cid 4 03:23:22 ofonod[545]: Can't assign context to driver for APN. Since its marked in use above, we fail to assign it cid 4. When that fails the cid is cleared an all context pointers are set to NULL. 03:23:22 ofonod[545]: Aux: > AT+CGDCONT=1,"IP","m2m.tele2.com"\r 03:23:22 ofonod[545]: Aux: < \r\nOK\r\n 03:23:22 ofonod[545]: drivers/ubloxmodem/gprs-context.c:cgdcont_cb() ok 1 03:23:22 ofonod[545]: Aux: > AT+CGACT=1,1\r 03:23:22 ofonod[545]: Aux: < \r\n+CME ERROR: 100\r\n 03:23:22 ofonod[545]: drivers/ubloxmodem/gprs-context.c:cgact_enable_cb() ok 0 03:23:22 ofonod[545]: src/gprs.c:pri_activate_callback() 0x853480 03:23:22 ofonod[545]: src/gprs.c:pri_activate_callback() Activating context failed with error: Unknown error Activation callback, and it failed. Will try to clean up, but the pointers are NULL'ed... Dec 10 03:23:22 ofonod[545]: Aborting (signal 11) [/usr/sbin/ofonod] |
||
---|---|---|
btio | ||
doc | ||
drivers | ||
dundee | ||
examples | ||
gatchat | ||
gdbus | ||
gisi | ||
gril | ||
include | ||
linux | ||
plugins | ||
src | ||
test | ||
tools | ||
unit | ||
.gitignore | ||
.mailmap | ||
AUTHORS | ||
COPYING | ||
ChangeLog | ||
HACKING | ||
INSTALL | ||
Makefile.am | ||
NEWS | ||
README | ||
TODO | ||
acinclude.m4 | ||
bootstrap | ||
bootstrap-configure | ||
configure.ac | ||
ofono.pc.in |
README
oFono - Open Source Telephony ***************************** Copyright (C) 2008-2011 Intel Corporation. All rights reserved. Compilation and installation ============================ In order to compile telephony stack you need following software packages: - GCC compiler - GLib library - D-Bus library To configure run: ./configure --prefix=/usr --mandir=/usr/share/man \ --sysconfdir=/etc --localstatedir=/var Configure automatically searches for all required components and packages. To compile and install run: make && make install Embedded Linux library ====================== In order to compile the daemon and utilities the development version of Embedded Linux library is required to be present. The development repositories can be found here: git://git.kernel.org/pub/scm/libs/ell/ell.git https://kernel.googlesource.com/pub/scm/libs/ell/ell.git The build systems requires that the Embedded Linux library source code is available on the same top level directory as the source code: . |--- ell | |--- ell | `--- unit `--- ofono |--- src `--- tools It is not required to build or install Embedded Linux library. The build will happen when building the Wireless daemon and it will then be linked internally. When using --enable-external-ell build option, it is not required that the Embedded Linux library source code is available in the top level directory. Kernel Dependencies =================== In order to have the PPP stack working in oFono you need to enable CONFIG_TUN (Universal TUN/TAP device driver support) in your kernel .config. Information =========== Mailing list: ofono@ofono.org For additional information about the project visit oFono web site: http://www.ofono.org