Attention is currently required from: arehbein. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31533 )
Change subject: common: Have PCU socket connection use osmo_wqueue ...................................................................... Patch Set 3: Code-Review-1 (3 comments) File src/common/pcu_sock.c: https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/71841978_da3ed4aa PS2, Line 1092: return -1; > It doesn't change the control flow afaik (I looked at > `osmo_wqueue_bfd_cb()`). […] osmo_wqueue_bfd_cb: if (rc == -EBADF) goto err_badfd; You have to return -EBADF while handling the socket fd if you close/free it, otherwise osmo_wqueue_bfd_cb() continues using it and potentially calling the write_cb for a fd/mem which is no longer existing which can cause problems. https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/1c4ccd75_92870a87 PS2, Line 1102: osmo_fd_write_disable(&state->upqueue.bfd); > From my understanding/by looking at this code, it looks like > `osmo_fd_write_disable()` is meant to p […] that's not to prevent concurrent write-access. It's to manage the main loop poll() to tell the kernel to trigger us when the socket is available for writing again. https://gerrit.osmocom.org/c/osmo-bts/+/31533/comment/be99ebb8_52a56719 PS2, Line 1181: osmo_wqueue_init(&state->upqueue, PCU_SOCK_QLENGTH_MAX_DEFAULT); > No it's not possible, with the current code the current length of the wqueue > is always incremented/t […] I'm fine with whatever but use WQUEUE instead of the QLENGTH stuff :) -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31533 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ia6e61dda4b3cd4bba76e6acb7771d70335062fe1 Gerrit-Change-Number: 31533 Gerrit-PatchSet: 3 Gerrit-Owner: arehbein <arehb...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-Attention: arehbein <arehb...@sysmocom.de> Gerrit-Comment-Date: Tue, 28 Feb 2023 13:21:29 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: arehbein <arehb...@sysmocom.de> Comment-In-Reply-To: pespin <pes...@sysmocom.de> Gerrit-MessageType: comment