<p>osmith <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25753">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">assignment_fsm: Check for conn->lchan<br><br>When the SDCCH gets released while the TCH still beeing activated, then<br>the ChanActivACK that is received after the TCH is activated will trigger<br>a segmentation fault in the assignment_fsm. The reason for this is that<br>conn->lchan, which holds the SDCCH at that point in time, is now NULL.<br><br>To prevent osmo-bsc from crashing, the FSM should check for the presence<br>of conn->lchan first. If it does not exist, the FSM should terminate.<br>(Assignment failed)<br><br>Change-Id: I3b1cd88bea62ef0032f6c035bac95d3df9fdca7a<br>Related: SYS#5627<br>---<br>M src/osmo-bsc/assignment_fsm.c<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c</span><br><span>index 2f241e3..c5a1250 100644</span><br><span>--- a/src/osmo-bsc/assignment_fsm.c</span><br><span>+++ b/src/osmo-bsc/assignment_fsm.c</span><br><span>@@ -610,6 +610,15 @@</span><br><span>     int rc;</span><br><span>      struct gsm_subscriber_connection *conn = assignment_fi_conn(fi);</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+  /* There may be situations where the SDCCH gets released while the TCH is still being activated. We will then</span><br><span style="color: hsl(120, 100%, 40%);">+  * receive ChanActivAck message from the BTS when the TCH is ready. Since the SDCCH is already released by</span><br><span style="color: hsl(120, 100%, 40%);">+     * then conn->lchan will be NULL in this case. */</span><br><span style="color: hsl(120, 100%, 40%);">+  if (!conn->lchan) {</span><br><span style="color: hsl(120, 100%, 40%);">+                assignment_fail(GSM0808_CAUSE_EQUIPMENT_FAILURE,</span><br><span style="color: hsl(120, 100%, 40%);">+                              "Unable to send RR Assignment Command: conn without lchan");</span><br><span style="color: hsl(120, 100%, 40%);">+                return;</span><br><span style="color: hsl(120, 100%, 40%);">+       }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  rc = gsm48_send_rr_ass_cmd(conn->lchan, conn->assignment.new_lchan,</span><br><span>                               conn->lchan->ms_power);</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25753">change 25753</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-bsc/+/25753"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: rel-1.7.1 </div>
<div style="display:none"> Gerrit-Change-Id: I3b1cd88bea62ef0032f6c035bac95d3df9fdca7a </div>
<div style="display:none"> Gerrit-Change-Number: 25753 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>