<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/15167">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">gprs_gmm: Introduce assert to guard against unexpected condition<br><br>This may well be the culprit of OS#3957, were already freed llme is accessed from<br>mmctx context.<br><br>Related: OS#3957<br><br>Change-Id: I8e1eaeb9b3ebee8e45704b4fe007190c7db609e4<br>---<br>M src/gprs/gprs_gmm.c<br>1 file changed, 4 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/67/15167/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gprs/gprs_gmm.c b/src/gprs/gprs_gmm.c</span><br><span>index c8bc0f7..672864f 100644</span><br><span>--- a/src/gprs/gprs_gmm.c</span><br><span>+++ b/src/gprs/gprs_gmm.c</span><br><span>@@ -1741,6 +1741,10 @@</span><br><span>                         "The MM context cannot be used, RA: %03d-%0*d-%d-%d\n",</span><br><span>                    mmctx->ra.mcc, mmctx->ra.mnc_3_digits, mmctx->ra.mnc,</span><br><span>                       mmctx->ra.lac, mmctx->ra.rac);</span><br><span style="color: hsl(120, 100%, 40%);">+          /* mmctx is set to NULL and gprs_llgmm_unassign(llme) will be</span><br><span style="color: hsl(120, 100%, 40%);">+            called below, let's make sure we don't keep dangling llme</span><br><span style="color: hsl(120, 100%, 40%);">+             pointers in mmctx (OS#3957). */</span><br><span style="color: hsl(120, 100%, 40%);">+            OSMO_ASSERT(!(mmctx->ran_type == MM_CTX_T_GERAN_Gb && mmctx->gb.llme == NULL));</span><br><span>                mmctx = NULL;</span><br><span>        }</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/15167">change 15167</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-sgsn/+/15167"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8e1eaeb9b3ebee8e45704b4fe007190c7db609e4 </div>
<div style="display:none"> Gerrit-Change-Number: 15167 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>