Changeset fe7bcf1 in mainline


Ignore:
Timestamp:
2019-12-11T15:26:16Z (4 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
086cab0
Parents:
a6302ae
Message:

fix race condition in traversing tasks

The task reference count can be lowered only after we have moved to the
next task.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/sysinfo/stats.c

    ra6302ae rfe7bcf1  
    485485
    486486                irq_spinlock_lock(&tasks_lock, true);
    487                 task_release(task);
    488 
    489                 task = task_next(task);
     487
     488                task_t *prev_task = task;
     489                task = task_next(prev_task);
     490                task_release(prev_task);
    490491        }
    491492
Note: See TracChangeset for help on using the changeset viewer.