Change in libosmocore[master]: fsm: support graceful osmo_fsm_inst_term() cascades

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Sun Apr 7 22:21:17 UTC 2019


Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13392 )

Change subject: fsm: support graceful osmo_fsm_inst_term() cascades
......................................................................


Patch Set 4:

(1 comment)

https://gerrit.osmocom.org/#/c/13392/4/src/fsm.c
File src/fsm.c:

https://gerrit.osmocom.org/#/c/13392/4/src/fsm.c@409
PS4, Line 409: 		talloc_steal(osmo_fsm_inst_terminating_root, fi);
I am reparenting "any" FSM instance as a child of "any other" in the order of release events, to save us having to create a separate talloc_ctx to steal into. However, talloc manpage says:

       It is possible to produce loops in the parent/child relationship if you are not careful with talloc_steal(). No
       guarantees are provided as to your sanity or the safety of your data if you do this.

So after all it seems like a bad idea to do this optimization. We don't want to risk our sanity, right.



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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8eda67540a1cd444491beb7856b9fcd0a3143b18
Gerrit-Change-Number: 13392
Gerrit-PatchSet: 4
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-CC: Harald Welte <laforge at gnumonks.org>
Gerrit-Comment-Date: Sun, 07 Apr 2019 22:21:17 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190407/baad1c73/attachment.html>


More information about the gerrit-log mailing list