This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 7142c0a19eeaf6a80a29222cda891a25de6b54e6 Author: Xiang Xiao <[email protected]> AuthorDate: Fri Sep 11 02:22:52 2026 +0800 fs/aio: initialize lio_link in aio_fsync() aio_fsync() never initialized aiocbp->lio_link, but the reworked aio_signal() tests list_in_list(&lio_link) on every completion. With an uninitialized (or zero-filled) lio_link the behavior was unpredictable; initialize the node so standalone fsync operations are self-consistent. Signed-off-by: tengshuangshuang <[email protected]> --- fs/aio/aio_fsync.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/aio/aio_fsync.c b/fs/aio/aio_fsync.c index 9a4978dcbb8..e2cfb692781 100644 --- a/fs/aio/aio_fsync.c +++ b/fs/aio/aio_fsync.c @@ -207,6 +207,10 @@ int aio_fsync(int op, FAR struct aiocb *aiocbp) sigwork_init(&aiocbp->aio_sigwork); aiocbp->aio_result = -EINPROGRESS; + /* Initialize list_node using aiocbp for the first time */ + + list_initialize(&aiocbp->lio_link); + /* Create a container for the AIO control block. This may cause us to * block if there are insufficient resources to satisfy the request. */
