zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.

Home Page:https://docs.zephyrproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rtio: Possibly missed callback when linking

teburd opened this issue · comments

Describe the bug
@swift-tk had a question in discord that lead to me believing a bug exists in the current way we do callback ops.

We currently do callback ops only on submit https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/rtio/rtio_executor.c#L65

But not if they are chained from a completion https://github.com/zephyrproject-rtos/zephyr/blob/main/subsys/rtio/rtio_executor.c#L164

A test should easily show this to be reproducible when fixing.

Expected behavior
Linked callback ops occur after the ops they are linked to complete

Impact
Out of order operations are possible

@teburd as you are the maintainer of RTIO, you are probably the best to assign this bug a priority.
Would you be so kind as to do so?