Change in libosmocore[master]: i460_mux: correctly re-initalize when deleting subchannels

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Fri Jul 24 19:59:42 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/19381 )


Change subject: i460_mux: correctly re-initalize when deleting subchannels
......................................................................

i460_mux: correctly re-initalize when deleting subchannels

When a subchannel is deleted using osmo_i460_subchan_del() the entire
schan struct is cleared. However, this means that also the mux.tx_queue
llist head is overwritten with zeros. The llist head is the uninitalized
and on the next use of the subchannel the programm will segfault.

Lets re-initalize the subchannel correctly like it is also done in
osmo_i460_ts_init() for all subchannels.

Change-Id: I937a9d4db95f44a860cd2c5dbb660dc1970b9a49
---
M src/gsm/i460_mux.c
1 file changed, 2 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/81/19381/1

diff --git a/src/gsm/i460_mux.c b/src/gsm/i460_mux.c
index 3fb63ec..d930fcb 100644
--- a/src/gsm/i460_mux.c
+++ b/src/gsm/i460_mux.c
@@ -358,6 +358,8 @@
 {
 	talloc_free(schan->demux.out_bitbuf);
 	memset(schan, 0, sizeof(*schan));
+	schan->rate = OSMO_I460_RATE_NONE;
+	INIT_LLIST_HEAD(&schan->mux.tx_queue);
 }
 
 /*! @} */

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/19381
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I937a9d4db95f44a860cd2c5dbb660dc1970b9a49
Gerrit-Change-Number: 19381
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200724/4bd91cb9/attachment.htm>


More information about the gerrit-log mailing list