On 28.03.19 17:13, Stephen D. Cohen via Xenomai wrote:
Folks,

      I noted a couple of issues with rt_task_inquire and wanted to
share them. I will put together a patch later <makes hand rolling
motion>, but wanted to let folks know sooner rather than later.

      The documentation suggests that the info structure can be NULL.
This is simply not true, as the actual code dereferences the pointer
without checking. Thus a null info pointer will cause an exception and
the thread will die an untimely (though outwardly quiet) death.

      I also note that the rt_task_inquire routine has an exit path
that keeps the thread object in  task control block locked. This is
also a problem. There should really be a put_alchemy_task before the
"goto out;" after the threadobj_stat call.

      I noted that this "keeps the tcb->thobj locked" issue occurs in a
few of the other rt_task routines as well. A careful review is in
order and I will do it when I submit the patches for rt_task_inquire.


Thanks for the report! Sounds reasonable - looking forward to patches.

Jan

--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

Reply via email to