zephyr/subsys
Robert Lubos e5d67adf80 net: sockets: services: Don't modify pollfd array from other threads
pollfd array used with zsock_poll() should not be modified while inside
zsock_poll() function as this could lead to unexpected results. For
instance, k_poll already monitoring some kernel primitive could report
an event, but it will not be processed if the monitored socket file
descriptor in the pollfd array was set to -1. In result,
zsock_poll() may unexpectedly quit prematurely, returning 0 events, even
if it was requested to wait infinitely.

The pollfd arrays used by zsock_poll() (ctx.events) is reinitialized
when the service thread is restarted so modifying it directly when
registering/unregistering service is not really needed. It's enough if
those functions notify the eventfd socket used to restart the services
thread.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-09 17:19:12 +02:00
..
bindesc everywhere: replace #if IS_ENABLED() as per docs 2024-06-28 07:20:32 -04:00
bluetooth Bluetooth: fix compiling issue when either A2DP SRC or SNK are not enabled 2024-07-09 14:03:07 +02:00
canbus canbus: isotp: use proper CAN ID masks 2024-04-24 09:53:06 +02:00
console
dap dap: fix timeout handling 2024-06-14 11:14:17 +02:00
debug debug: no UNALIGNED_ACCESS_SUPPORTED for cortex M0 or M0plus 2024-06-28 12:21:18 -04:00
demand_paging demand_paging: LRU eviction: remove restriction on PF index 0 2024-07-03 15:07:03 -04:00
dfu dfu/mcuboot: Use flash_area_flatten instead of flash_area_erase 2024-06-04 08:00:46 +02:00
disk drivers: disk: add DISK_IOCTL_CTRL_DEINIT command to supported IOCTLs 2024-06-07 18:16:01 +01:00
dsp
emul emul: mspi: Add the mspi controller emulator 2024-06-14 21:07:00 -04:00
fb fb: cfb: Fix CID 394240 2024-07-05 18:39:22 +02:00
fs fs: nvs: Add more strict checks to determine if an ATE is valid 2024-07-08 12:15:42 -04:00
input
ipc everywhere: replace #if IS_ENABLED() as per docs 2024-06-28 07:20:32 -04:00
jwt jwt: add missing PSA_WANT dependencies to RSA signature 2024-06-13 09:22:20 +02:00
llext llext: add explicit cast to fix Coverity CID: 392507 2024-07-09 11:51:29 +02:00
logging logging: Fix runtime filtering when frontend and userspace is used 2024-07-09 14:01:56 +02:00
lorawan everywhere: replace double words 2024-06-25 06:05:35 -04:00
mem_mgmt
mgmt everywhere: replace #if IS_ENABLED() as per docs 2024-06-28 07:20:32 -04:00
modbus modbus_serial: Disable rx interrupt if buffer fills up 2024-06-13 16:48:05 -04:00
modem modem: cmux: disable all work when released 2024-06-26 09:27:20 -04:00
net net: sockets: services: Don't modify pollfd array from other threads 2024-07-09 17:19:12 +02:00
pm pm: policy: Move device power state constraints to policy 2024-06-28 12:22:28 -04:00
portability subsys/portability/CMSIS: Do not redefine TRUE & FALSE 2024-06-11 16:29:22 +03:00
random everywhere: replace double words 2024-06-25 06:05:35 -04:00
retention
rtio sys: Add a lockfree mpsc and spsc queues 2024-06-06 00:42:29 -07:00
sd sd: sd_ops: fix DISK_IOCTL_CTRL_SYNC return code 2024-05-29 07:31:39 +02:00
sensing sensors: Submit call returns void 2024-06-14 19:13:02 +02:00
settings settings: remove CONFIG_CONFIG_SETTINGS_FS 2024-06-18 14:33:58 -04:00
shell everywhere: replace #if IS_ENABLED() as per docs 2024-06-28 07:20:32 -04:00
sip_svc everywhere: replace double words 2024-06-22 05:40:22 -04:00
stats
storage everywhere: replace #if IS_ENABLED() as per docs 2024-06-28 07:20:32 -04:00
task_wdt task_wdt: Feed hardware watchdog only when its started 2024-06-06 00:40:53 -07:00
testsuite testsuite: change controlling expressions in while to Boolean 2024-06-21 15:41:26 -04:00
timing
tracing Revert "net: sockets: move poll implementation to zvfs" 2024-07-03 15:03:05 -04:00
usb everywhere: replace double words 2024-06-25 06:05:35 -04:00
zbus zbus: Use section iterator for observations 2024-07-09 14:03:33 +02:00
CMakeLists.txt dap: add CMSIS-DAP compatible controller 2024-06-14 11:14:17 +02:00
Kconfig dap: add CMSIS-DAP compatible controller 2024-06-14 11:14:17 +02:00