Ignore:
Timestamp:
Jan 2, 2020, 10:45:30 PM (2 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.10
Parents:
e816b4e
git-author:
Gedare Bloom <gedare@…> (01/02/20 22:45:30)
git-committer:
Gedare Bloom <gedare@…> (01/03/20 16:10:09)
Message:

cpukit/score: avoid NULL and races in priority mutex

The PIP modifications from #3359 introduced new data structures
to track priority inheritance. Prioritized mutexes without PIP
share some of the code paths, and may result in NULL pointer
accesses. This patch checks for NULL, and also adds ISR critical
sections to an uncovered corner case during thread restarts.

Closes #3829.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/src/threadqextractpriority.c

    re816b4e re3f6d35  
    110110
    111111  mutex = _Thread_Dequeue_priority_node( &the_thread->Priority_node );
    112   _Thread_Evaluate_priority( mutex->holder );
     112  if ( mutex != NULL ) {
     113    _Thread_Evaluate_priority( mutex->holder );
     114  }
    113115
    114116  if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
Note: See TracChangeset for help on using the changeset viewer.