Neels Hofmeyr has uploaded this change for review. ( 
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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/14/11714/1

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: newchange
Gerrit-Change-Id: If0c6e495e419b9dbb44443c3fc3f54dd4b714aa5
Gerrit-Change-Number: 11714
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofm...@sysmocom.de>

Reply via email to