<p>neels has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/26611">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lcs: fix bsc_subscr use_count leak<br><br>In lcs_ta_req_wait_ta_onenter(), fix use count leak of 'start-paging':<br>get() the use count only after the early exits.<br><br>osmo-ttcn3-hacks patch I69d4c5c6f8d499bb7f0b96a48af045361433c57b<br>introduces testing against this leak in various LCS tests (e.g.<br>BSC_Tests.TC_lcs_loc_req_for_active_ms_ta_req).<br><br>Related: OS#5355<br>Change-Id: Ibbfbfe766eafe42c78048ec5b3b503a11ef5535d<br>---<br>M src/osmo-bsc/lcs_ta_req.c<br>1 file changed, 11 insertions(+), 11 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/11/26611/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo-bsc/lcs_ta_req.c b/src/osmo-bsc/lcs_ta_req.c</span><br><span>index 6252d46..f0bb02e 100644</span><br><span>--- a/src/osmo-bsc/lcs_ta_req.c</span><br><span>+++ b/src/osmo-bsc/lcs_ta_req.c</span><br><span>@@ -122,17 +122,6 @@</span><br><span>          return;</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   paging = (struct bsc_paging_params){</span><br><span style="color: hsl(0, 100%, 40%);">-            .reason = BSC_PAGING_FOR_LCS,</span><br><span style="color: hsl(0, 100%, 40%);">-           .msc = loc_req->conn->sccp.msc,</span><br><span style="color: hsl(0, 100%, 40%);">-           .bsub = loc_req->conn->bsub,</span><br><span style="color: hsl(0, 100%, 40%);">-              .tmsi = GSM_RESERVED_TMSI,</span><br><span style="color: hsl(0, 100%, 40%);">-              .imsi = loc_req->req.imsi,</span><br><span style="color: hsl(0, 100%, 40%);">-           .chan_needed = RSL_CHANNEED_ANY,</span><br><span style="color: hsl(0, 100%, 40%);">-        };</span><br><span style="color: hsl(0, 100%, 40%);">-      if (paging.bsub)</span><br><span style="color: hsl(0, 100%, 40%);">-                bsc_subscr_get(paging.bsub, BSUB_USE_PAGING_START);</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span>  /* Do we already have an active lchan with knowledge of TA? */</span><br><span>       lchan = loc_req->conn->lchan;</span><br><span>  if (lchan) {</span><br><span>@@ -147,6 +136,17 @@</span><br><span>          return;</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ paging = (struct bsc_paging_params){</span><br><span style="color: hsl(120, 100%, 40%);">+          .reason = BSC_PAGING_FOR_LCS,</span><br><span style="color: hsl(120, 100%, 40%);">+         .msc = loc_req->conn->sccp.msc,</span><br><span style="color: hsl(120, 100%, 40%);">+         .bsub = loc_req->conn->bsub,</span><br><span style="color: hsl(120, 100%, 40%);">+            .tmsi = GSM_RESERVED_TMSI,</span><br><span style="color: hsl(120, 100%, 40%);">+            .imsi = loc_req->req.imsi,</span><br><span style="color: hsl(120, 100%, 40%);">+         .chan_needed = RSL_CHANNEED_ANY,</span><br><span style="color: hsl(120, 100%, 40%);">+      };</span><br><span style="color: hsl(120, 100%, 40%);">+    if (paging.bsub)</span><br><span style="color: hsl(120, 100%, 40%);">+              bsc_subscr_get(paging.bsub, BSUB_USE_PAGING_START);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>        if (!loc_req->req.cell_id_present) {</span><br><span>              LOG_LCS_TA_REQ(lcs_ta_req, LOGL_DEBUG,</span><br><span>                              "No Cell Identity in BSSMAP Location Request, paging entire BSS\n");</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/26611">change 26611</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/+/26611"/><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: Ibbfbfe766eafe42c78048ec5b3b503a11ef5535d </div>
<div style="display:none"> Gerrit-Change-Number: 26611 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>