RTEMS | cpukit/dev/can: Check task start status in queue init (CID 1642607) (!1059)
MITHILESH MATTAPALLI (@mithileshm)
gitlab at rtems.org
Tue Feb 10 18:18:49 UTC 2026
MITHILESH MATTAPALLI created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1059
Project:Branches: mithileshm/rtems:fix-can-queue-check to rtems/rtos/rtems:main
Author: MITHILESH MATTAPALLI
## Summary
**CID 1642607: Unchecked Return Value.**
The function `rtems_can_queue_kern_initialize` in `cpukit/dev/can/can-quekern.c` calls `rtems_task_start` to launch the CAN queue garbage collector (`can_queue_dead_func`). Previously, the return value of this call was ignored.
**Issue:** If this task fails to start (e.g., due to resource exhaustion), the CAN driver would operate without its garbage collector. This leads to silent memory leaks and potential system instability when connections are closed, as resources are never freed.
**Fix:** Added a check for `RTEMS_SUCCESSFUL`. If the task fails to start, the initialization function now correctly returns `-1`, propagating the error and preventing the driver from entering an undefined state.
## Generative AI
none used
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1059
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/20260210/68de59bc/attachment.htm>
More information about the bugs
mailing list