Change in ...libosmocore[master]: make use of OTC_GLOBAL when allocating library-internal contexts

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/.

pespin gerrit-no-reply at lists.osmocom.org
Mon Sep 30 08:48:30 UTC 2019


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/13338 )

Change subject: make use of OTC_GLOBAL when allocating library-internal contexts
......................................................................


Patch Set 14: Code-Review-1

(3 comments)

https://gerrit.osmocom.org/#/c/13338/14/src/ctrl/control_vty.c 
File src/ctrl/control_vty.c:

https://gerrit.osmocom.org/#/c/13338/14/src/ctrl/control_vty.c@31 
PS14, Line 31: static void *ctrl_vty_ctx = NULL;
Should be per-thread?


https://gerrit.osmocom.org/#/c/13338/14/src/gb/gprs_bssgp.c 
File src/gb/gprs_bssgp.c:

https://gerrit.osmocom.org/#/c/13338/14/src/gb/gprs_bssgp.c@45 
PS14, Line 45: void *bssgp_tall_ctx = NULL;
Since bssgp_tall_ctx becomes now a child of OTC_GLOBAL (osmo_ctx->global), being osmo_ctx a per-thread variable. now the application has no real control over the talloc context being used, which means bssgp_tall_ctx should be per thread too. Otherwise if _alloc() is called through different threads, thread B may end up using bssgp_tall_ctx allocated under thread A's osmo_ctx.


https://gerrit.osmocom.org/#/c/13338/14/src/logging.c 
File src/logging.c:

https://gerrit.osmocom.org/#/c/13338/14/src/logging.c@63 
PS14, Line 63: void *tall_log_ctx = NULL;
Should be per thread?



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I48f475efd3ee0d5120b8fc30861e852d1a6920b1
Gerrit-Change-Number: 13338
Gerrit-PatchSet: 14
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Mon, 30 Sep 2019 08:48:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190930/42ef6542/attachment.htm>


More information about the gerrit-log mailing list