From: Denis Kenzior <denkenz@gmail.com>
To: ofono@lists.linux.dev
Cc: Denis Kenzior <denkenz@gmail.com>
Subject: [PATCH 02/13] gobi: Clear out service request queue on shutdown
Date: Thu, 31 Oct 2024 17:06:09 -0500 [thread overview]
Message-ID: <20241031220638.1582166-2-denkenz@gmail.com> (raw)
In-Reply-To: <20241031220638.1582166-1-denkenz@gmail.com>
Not doing so can result in a crash on subsequent .enable() calls
ofonod[365853]: #0 0x743188e15ae0 in /usr/lib/libc.so.6
ofonod[365853]: #1 0x472b94 in request_service_cb() at plugins/gobi.c:475
ofonod[365853]: #2 0x45ce9f in qmux_create_client_callback() at drivers/qmimodem/qmi.c:1448
ofonod[365853]: #3 0x45bd87 in __rx_ctl_message() at drivers/qmimodem/qmi.c:993
ofonod[365853]: #4 0x45bf97 in received_qmux_data() at drivers/qmimodem/qmi.c:1041
ofonod[365853]: #5 0x597df3 in io_callback() at ell/io.c:105 (discriminator 1)
ofonod[365853]: #6 0x59674a in l_main_iterate() at ell/main.c:461
ofonod[365853]: #7 0x508898 in event_check() at src/main.c:183
ofonod[365853]: #8 0x743189073ae1 in /usr/lib/libglib-2.0.so.0
ofonod[365853]: #9 0x7431890d4816 in /usr/lib/libglib-2.0.so.0
ofonod[365853]: #10 0x743189073787 in /usr/lib/libglib-2.0.so.0
ofonod[365853]: #11 0x508d35 in main() at src/main.c:302
ofonod[365853]: #12 0x743188dfec88 in /usr/lib/libc.so.6
ofonod[365853]: #13 0x743188dfed4c in /usr/lib/libc.so.6
---
plugins/gobi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/plugins/gobi.c b/plugins/gobi.c
index cb20824cc424..b2c9c3d50ea4 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -251,6 +251,10 @@ static void shutdown_cb(void *user_data)
DBG("");
data->discover_attempts = 0;
+ memset(&data->service_requests, 0, sizeof(data->service_requests));
+ data->cur_service_request = 0;
+ data->num_service_requests = 0;
+ data->features = 0;
qmi_qmux_device_free(data->device);
data->device = NULL;
--
2.45.2
next prev parent reply other threads:[~2024-10-31 22:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-31 22:06 [PATCH 01/13] qmi: validate TLV length Denis Kenzior
2024-10-31 22:06 ` Denis Kenzior [this message]
2024-10-31 22:06 ` [PATCH 03/13] simutil: Return early if file is not found Denis Kenzior
2024-10-31 22:06 ` [PATCH 04/13] simfs: Quiet sanitizer runtime error Denis Kenzior
2024-10-31 22:06 ` [PATCH 05/13] radio-settings: quiet " Denis Kenzior
2024-10-31 22:06 ` [PATCH 06/13] gprs: Default CID range to 1..NUM_CONTEXTS -1 Denis Kenzior
2024-10-31 22:06 ` [PATCH 07/13] qmimodem: Drop call to ofono_gprs_set_cid_range Denis Kenzior
2024-10-31 22:06 ` [PATCH 08/13] gobi: Remove support for qmi_wwan_q Denis Kenzior
2024-10-31 22:06 ` [PATCH 09/13] udevng: Remove non-upstream qmi_wwan_q support Denis Kenzior
2024-10-31 22:06 ` [PATCH 10/13] gobi: Bring down the main interface at startup Denis Kenzior
2024-10-31 22:06 ` [PATCH 11/13] gobi: Support only "usb" Bus values Denis Kenzior
2024-10-31 22:06 ` [PATCH 12/13] gobi: document and validate "interfaceNumber" Denis Kenzior
2024-10-31 22:06 ` [PATCH 13/13] qmi: wda: Convert #defines to an enum Denis Kenzior
2024-11-04 22:20 ` [PATCH 01/13] qmi: validate TLV length 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=20241031220638.1582166-2-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.