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 <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-Comment-Date: Mon, 30 Sep 2019 08:48:30 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
