RTEMS | cpukit/posix: Fix deadlock and data races in aio_suspend (!914)
MITHILESH MATTAPALLI (@mithileshm)
gitlab at rtems.org
Thu Jan 15 18:02:11 UTC 2026
MITHILESH MATTAPALLI created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/914
Project:Branches: mithileshm/rtems:fix-aio-deadlock to rtems/rtos/rtems:main
Author: MITHILESH MATTAPALLI
cpukit/posix: Fix deadlock and data races in aio_suspend
Coverity analysis identified three concurrency issues in the aio_suspend() function:
1. CID 1667285 (Deadlock): The function held the global aio_request_queue.mutex while attempting to acquire a specific request's suspendcbp-\>mutex. This violated lock ordering if a worker thread held the request lock and waited for the global queue lock. The fix drops the global lock before acquiring the request lock.
2. CID 1667293 & 1642621 (Data Races): The function accessed list\[i\]-\>error_code without holding the aio_request_queue.mutex. This could lead to reading undefined values if the worker thread updated the status concurrently. The fix extends the critical section to protect this check.
CID 1667285 CID 1667293 CID 1642621
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/914
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260115/cdcf2e70/attachment-0001.htm>
More information about the bugs
mailing list