Change in osmo-bts[master]: lchan: Call lapdm_channel_exit() when state changes to NONE

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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Oct 14 15:08:18 UTC 2021


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/25792 )


Change subject: lchan: Call lapdm_channel_exit() when state changes to NONE
......................................................................

lchan: Call lapdm_channel_exit() when state changes to NONE

Fixes crash when TTCN3 BTS_Tests_LAPDm TC_rr_response_frame_loss
runs run after TC_t200_n200.

The BTS was shutdown after TC_t200_n200 failed (drop oml link), and
lchan was moved ACTIVE->NONE without lapdm_channel_exit() being called
on it. Hence, on next test (TC_rr_response_frame_loss), when
lchan_init_lapdm() was called again, some memory corruption was caused.

Related: SYS#5262
Change-Id: If0ec5f0c7be4d15c8d684d33e15e24d68bd5192e
---
M src/common/lchan.c
1 file changed, 3 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/92/25792/1

diff --git a/src/common/lchan.c b/src/common/lchan.c
index 6dd11f7..74a7de0 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -281,6 +281,9 @@
 					    osmo_tdef_get(abis_T_defs, -15, OSMO_TDEF_US, -1));
 		}
 		break;
+	case LCHAN_S_NONE:
+		lapdm_channel_exit(&lchan->lapdm_ch);
+		/* fall through */
 	default:
 		if (lchan->early_rr_ia) {
 			/* Early Immediate Assignment: Transition to any other

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: If0ec5f0c7be4d15c8d684d33e15e24d68bd5192e
Gerrit-Change-Number: 25792
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211014/c1fd1871/attachment.htm>


More information about the gerrit-log mailing list