<p>laforge has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/19130">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">lapd_core: After calling into L3, check if the state has changed<br><br>While processing an I-frame we may deliver its payload to L3. After<br>returning from L3 procesing, we run some additional code, assuming<br>the LAPD/DL state has not changed meanwhile.<br><br>However, if the application destroys the LAPD/DL meanwhile, our state<br>might be NULL again, and in this state we should not perform any further<br>action.<br><br>This is one of the cases where synchronous in-line dispatch across<br>various layers is hitting us.  L3 should have an input queue, and only<br>start processing after all L2 work has completed and we're about to go<br>back to sleep in select().<br><br>Change-Id: I026b64503511002c13c0f4117648c366c48ecc62<br>Related: OS#1761<br>Closes: OS#4646<br>---<br>M src/gsm/lapd_core.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/libosmocore refs/changes/30/19130/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c</span><br><span>index cf25f3d..6a56572 100644</span><br><span>--- a/src/gsm/lapd_core.c</span><br><span>+++ b/src/gsm/lapd_core.c</span><br><span>@@ -1578,6 +1578,10 @@</span><br><span>                       msgb_free(msg);</span><br><span> </span><br><span>          }</span><br><span style="color: hsl(120, 100%, 40%);">+             /* the L3 or higher (called in-line above via send_dl_l3) might have destroyed the</span><br><span style="color: hsl(120, 100%, 40%);">+             * data link meanwhile. See OS#1761 */</span><br><span style="color: hsl(120, 100%, 40%);">+                if (dl->state == LAPD_STATE_NULL)</span><br><span style="color: hsl(120, 100%, 40%);">+                  return 0;</span><br><span>    } else</span><br><span>               LOGDL(dl, LOGL_INFO, "I frame ignored during own receiver busy condition\n");</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/19130">change 19130</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/libosmocore/+/19130"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I026b64503511002c13c0f4117648c366c48ecc62 </div>
<div style="display:none"> Gerrit-Change-Number: 19130 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>