From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 1/2] udevng: Don't crash for non-QMI devices
Date: Thu, 30 May 2024 10:25:02 -0500 [thread overview]
Message-ID: <20240530152513.279243-1-denkenz@gmail.com> (raw)
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]: +++++++++++++++++++++++++++
---
plugins/udevng.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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);
--
2.45.0
next reply other threads:[~2024-05-30 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 15:25 Denis Kenzior [this message]
2024-05-30 15:25 ` [PATCH 2/2] udevng: Fix detection of USB attached tty devices Denis Kenzior
2024-05-31 6:09 ` Ivaylo Dimitrov
2024-05-31 15:52 ` Denis Kenzior
2024-05-31 17:27 ` Ivaylo Dimitrov
2024-05-31 19:30 ` [PATCH 1/2] udevng: Don't crash for non-QMI devices patchwork-bot+ofono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240530152513.279243-1-denkenz@gmail.com \
--to=denkenz@gmail.com \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.