<p>fixeria <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/osmocom-bb/+/17449">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trxcon/scheduler: be safe against a theoretical integer overflow<br><br>As was noted by Pau Espin Pedrol, there is a theoretical chance<br>that lchan->tdma.num_proc would overflow, so as a consequence,<br>subst_frame_loss() will be unable to compensate one<br>(potentionally lost) Downlink burst.<br><br>On practice, given the size of unsigned long and duration of a<br>single TDMA frame, it would only happen once in roughly ~6 years.<br><br>  FRAME_DURATION = 4615 * 10e-6<br>  ULONG_MAX = 2 ** 32 - 1<br><br>  FRAME_DURATION * ULONG_MAX -> ~198212740 seconds<br>                             -> ~55059 hours<br>                             -> ~2294 days<br>                             -> ~6 years.<br><br>Chances are that trxcon would crash much earlier, or even GSM<br>would be completely forgotten after such a long time run, but<br>let's work this around and simply start counting from 1<br>if that overflow eventually happens.<br><br>Change-Id: I3d40ef09b06039a85df52af06ab38de314e1a434<br>---<br>M src/host/trxcon/sched_trx.c<br>1 file changed, 10 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/49/17449/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmocom-bb/+/17449">change 17449</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/osmocom-bb/+/17449"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I3d40ef09b06039a85df52af06ab38de314e1a434 </div>
<div style="display:none"> Gerrit-Change-Number: 17449 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>