Changeset 9f2c3ce in rtems-libbsd


Ignore:
Timestamp:
Nov 15, 2018, 7:23:17 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
b96abfd647154f10ea8f7fac68e25676636eded5, debc0aed8b9bef9996b8ec0ae7a70b0b41912e27, 0ad342ae5f65d22eb6c914d58664d3b5d1d3d43f, 98d197895b6162050176ea18d66783a1dc216d82
Children:
70555d5
Parents:
9f87c45
git-author:
Sebastian Huber <sebastian.huber@…> (11/15/18 07:23:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/18 07:26:49)
Message:

Fix locking issue in epoch_watchdog()

The _Watchdog_Per_CPU_insert_ticks() assumes that interrupts are
disabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/rtems/rtems-kernel-epoch.c

    r9f87c45 r9f2c3ce  
    9292{
    9393        struct epoch_pcpu *epcpu;
     94        ISR_Level level;
    9495
    9596        epcpu = __containerof(wdg, struct epoch_pcpu, wdg);
     97        _ISR_Local_disable(level);
    9698        _Watchdog_Per_CPU_insert_ticks(&epcpu->wdg,
    9799            _Watchdog_Get_CPU(&epcpu->wdg), 1);
     100        _ISR_Local_enable(level);
    98101
    99102        if (RTEMS_PREDICT_FALSE(epcpu->cb_count != 0)) {
Note: See TracChangeset for help on using the changeset viewer.