Branch: refs/heads/misc-bugfixes
Home: https://github.com/kronosnet/kronosnet
Commit: 96fd25adf72f9f7969ad13b6661845faca566fff
https://github.com/kronosnet/kronosnet/commit/96fd25adf72f9f7969ad13b666184…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-31 (Sun, 31 May 2026)
Changed paths:
M libknet/threads_tx.c
Log Message:
-----------
libknet: add Coverity suppression for sockfd flags access in _dispatch_to_local
Coverity flagged MISSING_LOCK at threads_tx.c:155 for accessing
sockfd[channel].flags. However, the lock is properly held by the calling
thread _handle_send_to_links_thread which acquires global_rwlock at line 810
and releases it at line 841, covering the entire call chain through
_handle_send_to_links → _parse_recv_from_sock → _dispatch_to_local.
Add suppression comment to document that this access is protected.
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications
Branch: refs/heads/misc-bugfixes
Home: https://github.com/kronosnet/kronosnet
Commit: fdb09e2739d22bce372feb3a8cd47d96c266b715
https://github.com/kronosnet/kronosnet/commit/fdb09e2739d22bce372feb3a8cd47…
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
Date: 2026-05-31 (Sun, 31 May 2026)
Changed paths:
M libknet/tests/api_knet_recv.c
M libknet/threads_rx.c
Log Message:
-----------
libknet: fix knet_recv buffer size validation for KNET_DATAFD_FLAG_RX_RETURN_INFO
When KNET_DATAFD_FLAG_RX_RETURN_INFO is set, knet_recv sends 2 iovecs:
struct knet_datafd_header + packet data. This exceeds KNET_MAX_PACKET_SIZE.
Fix knet_recv to validate buffer size based on channel flags:
- With RX_RETURN_INFO: max buffer is KNET_MAX_PACKET_SIZE + sizeof(struct knet_datafd_header)
- Without RX_RETURN_INFO: max buffer is KNET_MAX_PACKET_SIZE
Update api_knet_recv test:
- Test buffer validation with correct maximum based on flag
- Call knet_recv with correct buffer size (header + packet when flag is set)
- Fix send_buff size (was incorrectly reduced to make room for header)
- Replace manual retry loop with wait_for_packet() (cleaner, no EAGAIN messages)
Signed-off-by: Fabio M. Di Nitto <fabbione(a)kronosnet.org>
Co-Authored-By: Claude Sonnet 4.5 <noreply(a)anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/kronosnet/kronosnet/settings/notifications