Change in osmo-bsc[master]: lchan: rf release: make sure conn is NULL

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Nov 10 06:48:45 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/11714 )

Change subject: lchan: rf release: make sure conn is NULL
......................................................................

lchan: rf release: make sure conn is NULL

lchan_fsm_wait_rf_release_ack_onenter() calls gscon_forget_lchan(). At the
point where the conn has no lchan, the lchan must not have a conn. Make sure
that conn is NULL after gscon_forget_lchan().

I hope this fixes OS#3686, it is the only situation I could find where the
disassociation is potentially one-sided.

I get the feeling that this should be hardcoded in gscon_forget_lchan(), but I
dimly remember other situations that are less trivial, where it doesn't
necessarily make sense to forget reciprocically. So only fixing this one now.

Related: OS#3686
Change-Id: If0c6e495e419b9dbb44443c3fc3f54dd4b714aa5
---
M src/osmo-bsc/lchan_fsm.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 0046f59..d95620f 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -1005,8 +1005,10 @@
 	/* For planned releases, a conn has already forgotten about the lchan. And later on, in
 	 * lchan_reset(), we make sure it does. But in case of releases from error handling, the
 	 * conn might as well notice now already that its lchan is becoming unusable. */
-	if (lchan->conn)
+	if (lchan->conn) {
 		gscon_forget_lchan(lchan->conn, lchan);
+		lchan_forget_conn(lchan);
+	}
 
 	rc = rsl_tx_rf_chan_release(lchan);
 	if (rc)

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If0c6e495e419b9dbb44443c3fc3f54dd4b714aa5
Gerrit-Change-Number: 11714
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181110/e6197a5c/attachment.htm>


More information about the gerrit-log mailing list