[S] Change in libosmocore[master]: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_c...
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email ) Change subject: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_connected() .. osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_connected() If it fails, do not set the IOFD_FLAG_NOTIFY_CONNECTED flag and log an error message. Closes: Coverity CID#349579 Change-Id: I34e8cc9a2b9df0c624841e5f9268a15c32418da1 --- M src/core/osmo_io_uring.c 1 file changed, 17 insertions(+), 2 deletions(-) Approvals: laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c index cb636da..b174b22 100644 --- a/src/core/osmo_io_uring.c +++ b/src/core/osmo_io_uring.c @@ -496,8 +496,10 @@ if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED)) { osmo_fd_setup(>u.uring.connect_ofd, iofd->fd, OSMO_FD_WRITE, iofd_uring_connected_cb, iofd, 0); - osmo_fd_register(>u.uring.connect_ofd); - IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED); + if (osmo_fd_register(>u.uring.connect_ofd) < 0) + LOGPIO(iofd, LOGL_ERROR, "Failed to register FD for connect event.\n"); + else + IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED); } } else iofd_uring_write_enable(iofd); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I34e8cc9a2b9df0c624841e5f9268a15c32418da1 Gerrit-Change-Number: 36132 Gerrit-PatchSet: 2 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-MessageType: merged
[S] Change in libosmocore[master]: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_c...
Attention is currently required from: jolly. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email ) Change subject: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_connected() .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I34e8cc9a2b9df0c624841e5f9268a15c32418da1 Gerrit-Change-Number: 36132 Gerrit-PatchSet: 2 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: jolly Gerrit-Comment-Date: Sat, 02 Mar 2024 10:16:32 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_c...
Attention is currently required from: jolly. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email ) Change subject: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_connected() .. Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I34e8cc9a2b9df0c624841e5f9268a15c32418da1 Gerrit-Change-Number: 36132 Gerrit-PatchSet: 2 Gerrit-Owner: jolly Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge Gerrit-Attention: jolly Gerrit-Comment-Date: Sat, 02 Mar 2024 09:29:33 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmocore[master]: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_c...
jolly has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email ) Change subject: osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_connected() .. osmo_io_uring: Check if osmo_fd_register fails at iofd_uring_notify_connected() If it fails, do not set the IOFD_FLAG_NOTIFY_CONNECTED flag and log an error message. Closes: Coverity CID#349579 Change-Id: I34e8cc9a2b9df0c624841e5f9268a15c32418da1 --- M src/core/osmo_io_uring.c 1 file changed, 17 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/32/36132/1 diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c index cb636da..b174b22 100644 --- a/src/core/osmo_io_uring.c +++ b/src/core/osmo_io_uring.c @@ -496,8 +496,10 @@ if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_NOTIFY_CONNECTED)) { osmo_fd_setup(>u.uring.connect_ofd, iofd->fd, OSMO_FD_WRITE, iofd_uring_connected_cb, iofd, 0); - osmo_fd_register(>u.uring.connect_ofd); - IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED); + if (osmo_fd_register(>u.uring.connect_ofd) < 0) + LOGPIO(iofd, LOGL_ERROR, "Failed to register FD for connect event.\n"); + else + IOFD_FLAG_SET(iofd, IOFD_FLAG_NOTIFY_CONNECTED); } } else iofd_uring_write_enable(iofd); -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36132?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I34e8cc9a2b9df0c624841e5f9268a15c32418da1 Gerrit-Change-Number: 36132 Gerrit-PatchSet: 1 Gerrit-Owner: jolly Gerrit-MessageType: newchange