<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/20844">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">process_ms_ctx_status: Fix crash deleting PDP Ctx if GTP side was already released<br><br>sgsn_delete_pdp_ctx() should never be called without checking if the GTP<br>side is available, since it may happen that it has already been released<br>by the time the mmctx tells us the pdp ctx is gone on the MS side.<br><br>Fixes: OS#4817<br>Change-Id: Ie618874545172ec98355174a2ee041fc4a8bec16<br>---<br>M src/sgsn/gprs_gmm.c<br>1 file changed, 4 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/44/20844/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c</span><br><span>index 0ad6003..3f7c8ab 100644</span><br><span>--- a/src/sgsn/gprs_gmm.c</span><br><span>+++ b/src/sgsn/gprs_gmm.c</span><br><span>@@ -1533,7 +1533,10 @@</span><br><span>               LOGMMCTXP(LOGL_NOTICE, mmctx, "Dropping PDP context for NSAPI=%u "</span><br><span>                         "due to PDP CTX STATUS IE=0x%02x%02x\n",</span><br><span>                   pdp->nsapi, pdp_status[1], pdp_status[0]);</span><br><span style="color: hsl(0, 100%, 40%);">-           sgsn_delete_pdp_ctx(pdp);</span><br><span style="color: hsl(120, 100%, 40%);">+             if (pdp->ggsn)</span><br><span style="color: hsl(120, 100%, 40%);">+                     sgsn_delete_pdp_ctx(pdp);</span><br><span style="color: hsl(120, 100%, 40%);">+             else /* GTP side already detached, freeing */</span><br><span style="color: hsl(120, 100%, 40%);">+                 sgsn_pdp_ctx_free(pdp);</span><br><span>      }</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/+/20844">change 20844</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/+/20844"/><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: Ie618874545172ec98355174a2ee041fc4a8bec16 </div>
<div style="display:none"> Gerrit-Change-Number: 20844 </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>