<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25147">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25147/1/src/gb/gprs_ns2.c">File src/gb/gprs_ns2.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/25147/1/src/gb/gprs_ns2.c@680">Patch Set #1, Line 680:</a> <code style="font-family:monospace,monospace">               while (!llist_empty(&nse->nsvc)) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">would be good to explain in a comment why we don't use the normal llist_for_each_entry_safe here. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/25147/1/src/gb/gprs_ns2.c@1490">Patch Set #1, Line 1490:</a> <code style="font-family:monospace,monospace"></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">looks like moving this free loop is fixing a separate issue?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">That is true. It fixes an issue that a new nsvc might be created over a bind to be removed. So better remove the bind from the entry list first before removing the nsvc. The problem is the same. Reacting on events which could be produced by removing a NSVC. I'll move this into a separate patch.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25147/1/src/gb/gprs_ns2_sns.c">File src/gb/gprs_ns2_sns.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/25147/1/src/gb/gprs_ns2_sns.c@1584">Patch Set #1, Line 1584:</a> <code style="font-family:monospace,monospace">              while (!llist_empty(&nse->nsvc)) {</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">is this because gprs_ns2_free_nsvc() may free multiple nsvc from the list so that it is impossible t […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Recursive events could happen. E.g. the user (the upper stack or gbproxy, sgsn, ..) might free the NSVC when receiving an UNAVAILABLE/DOWN event which could produce a loop. To be on the safe side I've changed free'ing it.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/25147">change 25147</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/+/25147"/><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: I902557fb6e56e6588728a46e43a9cbe3215d5c68 </div>
<div style="display:none"> Gerrit-Change-Number: 25147 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: lynxis lazus <lynxis@fe80.eu> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-CC: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 02 Sep 2021 15:35:36 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Comment-In-Reply-To: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Comment-In-Reply-To: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>