<p>dexter has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25676">View Change</a></p><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, 6 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/76/25676/1</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 97eb335..1df62cc 100644</span><br><span>--- a/src/osmo-bsc/assignment_fsm.c</span><br><span>+++ b/src/osmo-bsc/assignment_fsm.c</span><br><span>@@ -678,6 +678,12 @@</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%);">+  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/+/25676">change 25676</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/+/25676"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3b1cd88bea62ef0032f6c035bac95d3df9fdca7a </div>
<div style="display:none"> Gerrit-Change-Number: 25676 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>