#1817 closed defect
Variable _Thread_Heir is not protected against interrupts
Reported by: | Helder Silva | Owned by: | Sebastian Huber |
---|---|---|---|
Priority: | normal | Milestone: | 4.11 |
Component: | score | Version: | 4.10 |
Severity: | normal | Keywords: | |
Cc: | sebastian.huber@…, gedare@… | Blocked By: | |
Blocking: |
Description (last modified by Joel Sherrill)
Variable _Thread_Heir is protected against interrupts except when the
_Thread_Is_heir function is called from _Thread_Evaluate_mode from
rtems_task_mode. Interrupts need to be disabled before thread evaluation for
context switch.
Attachments (2)
Change History (13)
comment:1 Changed on 06/15/11 at 15:37:54 by Gedare Bloom
Cc: | giddyup44@… added |
---|---|
Version: | HEAD → 4.10 |
Changed on 09/22/11 at 09:40:26 by Helder Silva
comment:2 Changed on 09/22/11 at 10:05:54 by Sebastian Huber
attachments.ispatch: | 0 → 1 |
---|---|
attachments.mimetype: | application/octet-stream → text/plain |
comment:3 Changed on 09/22/11 at 10:09:21 by Sebastian Huber
Cc: | Sebastian Huber added |
---|
comment:4 Changed on 09/22/11 at 13:20:03 by Sebastian Huber
Replying to comment:8:
Yes, you are right, if you consider *a=b as atomic instruction, the
_ISR_Disable
*a = b;
_ISR_Enable
is unnecessary. Please just keep in mind the final assembly code, which is
not atomic.
Yes, you are right. We have a read and a write.
comment:5 Changed on 11/23/14 at 16:36:17 by Joel Sherrill
Description: | modified (diff) |
---|---|
Owner: | changed from Joel Sherrill to Sebastian Huber |
Status: | new → assigned |
Sebastian .. OK to close?
comment:6 Changed on 11/24/14 at 11:06:51 by Sebastian Huber
I still don't know what the problem is.
comment:7 Changed on 11/27/14 at 12:53:02 by Sebastian Huber
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I reviewed rtems_task_mode(). There is no problem since a call to a global function (_ISR_Set_level()) is between the executing->is_preemptible update and the call to _Thread_Is_heir().
comment:8 Changed on 11/27/14 at 12:54:11 by Sebastian Huber
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:9 Changed on 11/27/14 at 12:54:27 by Sebastian Huber
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
comment:11 Changed on 11/28/14 at 10:22:04 by Sebastian Huber
Thanks for the remainder. I looked now also at 4.10. I don't see a problem here.
Patch of the bug implementation on the head of the repository 20110921