Attention is currently required from: neels.
pespin has posted comments on this change. (
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29336 )
Change subject: hnb_context_release(): Make sure assigned conn is freed
......................................................................
Patch Set 1:
(4 comments)
Commit Message:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29336/comment/730bcf09_d8dce4dd
PS1, Line 14: synchronous
isn't release always async, because it involves
messages to/from remote?
I'm precisely saying synchronous here to explain this
happen in the the release code path freeing the struct, not whatever protocol transaction,
hence no other unexpected code paths like select loop are possible with the conn or the
hnb_context not referencing one another.
File src/osmo-hnbgw/hnbgw.c:
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29336/comment/af144b64_2812da9b
PS1, Line 304: return 0; /* hnb_context is being freed, nothing do be done */
(i thought now it is just hnb->hnb_registered ==
false?) […]
the hnb pointer being null means the hnb_context related to this conn is
being freed (hnb_closed_cb is called as a result of osmo_stream_srv_destroy() being called
by hnb_context_release()).
So "hnb_context is being freed" is totally accurate here, it will be freed right
straigh away when returning from this callback.
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29336/comment/f981fe67_99a39152
PS1, Line 306: /* hnb: conn became broken, let's release the associated hnb.
maybe "conn closed on an active hnb_context"
... […]
hnb_registered=false is at the HNB layer through non having yet received an
HNB-Register or after having received a HNB-De-Register message.
In here, the underlaying SCTP conn is being dropped, at which point we totally free the
related hnb_context.
So there's basically no hnb_context without conn, or conn without hnb_context.
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29336/comment/db3ce9a1_c57cf6eb
PS1, Line 374: to call
calling
Ack
--
To view, visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/29336
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I44fea7ec74f14e0458861c92da4acf685ff695c1
Gerrit-Change-Number: 29336
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 14 Sep 2022 10:13:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: comment