Skip to content
Commit d00f9b59 authored by Andy Ross's avatar Andy Ross Committed by Stephanos Ioannidis
Browse files

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: default avatarAndy Ross <andyross@google.com>
parent bb71ad55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment