zephyr/kernel
Andy Ross 71f5e56545 kernel/timeout: Fix "not in list" predication in timeout handling
The use of dticks == INACTIVE to tell whether or not a timeout was
already in the list was insufficient.  There is a time period between
the moment a timeout is removed from the list and the end of its
handler where it is not in the list, yet its list node pointers still
point into it.  Doing things like aborting a thread while that is true
(which can be asynchronous too!)  would corrupt the list even though
all the operations on it were "atomic".

Set the timeout node pointers to nulls atomically when removed, and
check for double-remove conditions (which, again, might be perfectly
OK).

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-01-03 12:29:02 -05:00
..
include userspace: easy checking for specific driver 2018-12-27 20:31:58 -05:00
alert.c kernel: alert: Declare tracing variables only when needed. 2018-10-31 08:44:47 -04:00
atomic_c.c
CMakeLists.txt kernel: New timeout implementation 2018-10-16 15:03:10 -04:00
compiler_stack_protect.c
device.c kernel: check retval of driver init 2018-12-07 19:33:23 -05:00
errno.c
idle.c power: rename api sys_soc -> sys_ 2018-12-28 16:16:28 -05:00
init.c kernel: init: Add nop instruction in main 2018-12-14 13:17:36 +01:00
int_latency_bench.c kernel: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
Kconfig kconfig: Minor comments and 'help' text fixes 2018-12-30 16:24:50 -05:00
Kconfig.power_mgmt kernel: ensure System Power Managment enables Tickless Idle. 2018-11-21 23:16:35 -05:00
mailbox.c kernel: Delimiting the scope of some variables 2018-11-04 11:37:24 -05:00
mem_domain.c kernel: mem_domain: remove redundant clearing of mem_partition fields 2018-12-05 15:15:07 -05:00
mem_slab.c kernel: Add 'U' to unsigned variable assignments 2018-12-04 22:51:56 -05:00
mempool.c sys_clock: Fix unsafe tick count usage 2018-10-16 15:03:10 -04:00
msg_q.c kernel: msg_q: k_msgq_peek() implementation 2018-11-19 17:53:22 -05:00
mutex.c kernel: mutex: delay setting lock_count = 0. 2018-12-05 11:00:10 +01:00
pipes.c kernel: Delimiting the scope of some variables 2018-11-04 11:37:24 -05:00
poll.c kernel: poll: Fix switch usage 2018-12-07 09:06:34 -05:00
queue.c kernel: queue: Fix MISRA-C violation 2018-12-07 09:06:34 -05:00
sched.c misra: Fixes for MISRA-C rule 8.3 2018-12-07 09:06:34 -05:00
sem.c kernel: sem: Fix few MISRA C violations. 2018-10-17 12:17:58 -04:00
smp.c kernel; Checking functions return 2018-09-14 16:55:37 -04:00
stack.c kernel: stack: Making if's body a compound statement 2018-11-04 11:37:24 -05:00
system_work_q.c kernel: system_work_q: Set dedicated "sysworkq" name. 2018-10-19 07:58:45 -04:00
thread_abort.c kernel: Using boolean expression on ASSERT macros 2018-09-28 06:28:41 +05:30
thread.c kernel: expose k_busy_wait() to user mode 2018-11-15 16:20:36 -05:00
timeout.c kernel/timeout: Fix "not in list" predication in timeout handling 2019-01-03 12:29:02 -05:00
timer.c misra: Fixes for MISRA-C rule 8.3 2018-12-07 09:06:34 -05:00
userspace_handler.c kernel: Calling Z_SYSCALL_VERIFY_MSG with boolean expressions 2018-09-28 06:28:41 +05:30
userspace.c misra: Fixes for MISRA-C rule 8.3 2018-12-07 09:06:34 -05:00
version.c doc: add kernel version API to doxygen 2018-12-08 17:24:53 -05:00
work_q.c kernel: Use NULL instead of 0 2018-12-11 14:37:10 -08:00