zephyr/kernel
Andy Ross d00f9b594b kernel/work: Fix race under with delayed work item cancellation
The call to unschedule_locked() would return true ("successfully
unscheduled") even in the case where the underlying z_abort_timeout()
failed (because the callback was already unpended and
in-progress/complete/about-to-be-run, remember that timeout callbacks
are unsynchronized), leading to state bugs and races against the
callback behavior.

Correctly detect that case and propagate the error to the caller.

Fixes #51872

Signed-off-by: Andy Ross <andyross@google.com>
2023-02-11 12:14:16 +09:00
..
include kernel: Add routine to walk a wait queue 2023-02-11 06:45:13 +09:00
paging
atomic_c.c
banner.c kernel: banner: Remove unnecessary header 2023-01-09 12:07:28 -05:00
CMakeLists.txt
compiler_stack_protect.c
condvar.c
device.c
errno.c
events.c
fatal.c
futex.c
idle.c
init.c kernel: mark z_cstart to not have stack protector 2023-01-24 13:04:45 -05:00
Kconfig kernel: Kconfig: Increase the main stack size for ARM when TEST 2022-12-09 21:59:10 +09:00
Kconfig.vm
kheap.c
mailbox.c
main_weak.c
mem_domain.c
mem_slab.c
mempool.c
mmu.c
msg_q.c kernel: k_msgq: add peek at function 2023-01-26 10:00:29 +00:00
mutex.c
pipes.c kernel: pipes: ISRs use a private pipe descriptor 2023-02-11 06:45:13 +09:00
poll.c
queue.c
sched.c kernel: pipes: Change method of unpending waiters 2023-02-11 06:45:13 +09:00
sem.c
smp.c
stack.c
system_work_q.c
thread.c
timeout.c kernel: resolve static analysis false positives 2023-01-05 18:23:04 +00:00
timer.c kernel: timer: Eliminate a race condition in expiration handling 2023-02-08 10:17:56 +01:00
usage.c
userspace_handler.c
userspace.c
version.c
work.c kernel/work: Fix race under with delayed work item cancellation 2023-02-11 12:14:16 +09:00
xip.c