Message ID | 20240530152513.279243-1-denkenz@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | d5daaeda9d199f03576c433d8bc1b8a2fcb1eef6 |
Headers | show |
Series | [1/2] udevng: Don't crash for non-QMI devices | expand |
Hello: This series was applied to ofono.git (master) by Denis Kenzior <denkenz@gmail.com>: On Thu, 30 May 2024 10:25:02 -0500 you wrote: > In cases where the modem detected isn't QMI, do not crash when trying to > print the qmi devnode. > > ofonod[278551]: Aborting (signal 11) [src/ofonod] > ofonod[278551]: ++++++++ backtrace ++++++++ > ofonod[278551]: #0 0x7a779c5cbe20 in /usr/lib/libc.so.6 > ofonod[278551]: #1 0x413470 in setup_sierra() at plugins/udevng.c:497 > ofonod[278551]: #2 0x410a67 in create_modem() at plugins/udevng.c:2557 > ofonod[278551]: #3 0x7a779c80b551 in /usr/lib/libglib-2.0.so.0 > ofonod[278551]: #4 0x41955f in check_modem_list() at plugins/udevng.c:2626 > ofonod[278551]: #5 0x7a779c81f43e in /usr/lib/libglib-2.0.so.0 > ofonod[278551]: #6 0x7a779c81e199 in /usr/lib/libglib-2.0.so.0 > ofonod[278551]: #7 0x7a779c87d3bf in /usr/lib/libglib-2.0.so.0 > ofonod[278551]: #8 0x7a779c81edc7 in /usr/lib/libglib-2.0.so.0 > ofonod[278551]: #9 0x5291e6 in main() at src/main.c:316 > ofonod[278551]: #10 0x7a779c5b4d4a in /usr/lib/libc.so.6 > ofonod[278551]: #11 0x7a779c5b4e0c in /usr/lib/libc.so.6 > ofonod[278551]: +++++++++++++++++++++++++++ > > [...] Here is the summary with links: - [1/2] udevng: Don't crash for non-QMI devices https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=d5daaeda9d19 - [2/2] udevng: Fix detection of USB attached tty devices https://git.kernel.org/pub/scm/network/ofono/ofono.git/?id=ddb637fb784a You are awesome, thank you!
diff --git a/plugins/udevng.c b/plugins/udevng.c index d3ce3d5b3f7c..07c87eb8aa08 100644 --- a/plugins/udevng.c +++ b/plugins/udevng.c @@ -495,7 +495,8 @@ static gboolean setup_sierra(struct modem_info *modem) get_ifname(net)); done: DBG("modem=%s app=%s net=%s diag=%s qmi=%s", - mdm, app, get_ifname(net), diag, qmi->devnode); + mdm, app, get_ifname(net), diag, + qmi ? qmi->devnode : NULL); ofono_modem_set_string(modem->modem, "Modem", mdm); ofono_modem_set_string(modem->modem, "App", app); @@ -574,7 +575,7 @@ static gboolean setup_huawei(struct modem_info *modem) get_ifname(net)); done: DBG("mdm=%s pcui=%s diag=%s qmi=%s net=%s", - mdm, pcui, diag, qmi->devnode, get_ifname(net)); + mdm, pcui, diag, qmi ? qmi->devnode : NULL, get_ifname(net)); ofono_modem_set_string(modem->modem, "Modem", mdm); ofono_modem_set_string(modem->modem, "Pcui", pcui);