Opened on 11/21/13 at 08:41:34
Closed on 03/31/14 at 07:40:05
#2152 closed defect (fixed)
Race condition with unified work areas
Reported by: | Sebastian Huber | Owned by: | Joel Sherrill |
---|---|---|---|
Priority: | normal | Milestone: | 4.11 |
Component: | score | Version: | 4.11 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
With unified work areas enabled the RTEMS workspace and the C program heap are the same. The workspace is protected by disable thread dispatching. The C program heap is protected by the allocator mutex.
Now suppose we are inside a C program heap allocation. Now an interrupt happens which activates a higher priority thread. This thread can run immediately since thread dispatching is allowed. Now this thread performs a workspace allocation which is possible since the workspace is not protected by the allocator mutex. Now two threads access the heap at the same time and corruption may occur.
To be safe in case of unified work areas enabled the C program heap must disable thread dispatching. This has a very negative influence on the worst-case thread dispatch latency which now depends on the heap fragmentation.
Change History (2)
comment:1 Changed on 03/31/14 at 07:40:05 by Sebastian Huber
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed on 11/24/14 at 18:58:28 by Gedare Bloom
Version: | HEAD → 4.11 |
---|
Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11
http://git.rtems.org/rtems/commit/?id=23fec9f0e18dc4913fab818118f836af150b98f3