diff options
authorNeels Hofmeyr <neels@hofmeyr.de>2018-11-09 23:42:56 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-11-09 23:54:59 +0100
commit64b092e8551f942f06e831f989c8af4e03913428 (patch)
parentfc9449c68838f48506aeddbbaa447842eda33d45 (diff)
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
1 files changed, 3 insertions, 1 deletions
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 0046f5924..d95620fe0 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -1005,8 +1005,10 @@ static void lchan_fsm_wait_rf_release_ack_onenter(struct osmo_fsm_inst *fi, uint
/* 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)