Change in libosmocore[master]: lapd_core: After calling into L3, check if the state has changed

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Jul 4 08:55:37 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/19130 )


Change subject: lapd_core: After calling into L3, check if the state has changed
......................................................................

lapd_core: After calling into L3, check if the state has changed

While processing an I-frame we may deliver its payload to L3. After
returning from L3 procesing, we run some additional code, assuming
the LAPD/DL state has not changed meanwhile.

However, if the application destroys the LAPD/DL meanwhile, our state
might be NULL again, and in this state we should not perform any further
action.

This is one of the cases where synchronous in-line dispatch across
various layers is hitting us.  L3 should have an input queue, and only
start processing after all L2 work has completed and we're about to go
back to sleep in select().

Change-Id: I026b64503511002c13c0f4117648c366c48ecc62
Related: OS#1761
Closes: OS#4646
---
M src/gsm/lapd_core.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/19130/1

diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index cf25f3d..6a56572 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -1578,6 +1578,10 @@
 			msgb_free(msg);
 
 		}
+		/* the L3 or higher (called in-line above via send_dl_l3) might have destroyed the
+		 * data link meanwhile. See OS#1761 */
+		if (dl->state == LAPD_STATE_NULL)
+			return 0;
 	} else
 		LOGDL(dl, LOGL_INFO, "I frame ignored during own receiver busy condition\n");
 

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/19130
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I026b64503511002c13c0f4117648c366c48ecc62
Gerrit-Change-Number: 19130
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200704/04ab4aaf/attachment.htm>


More information about the gerrit-log mailing list