zephyr/lib
Andy Ross 9a594a0c1a lib/p4wq: Fix race with completed work items
Work items can be legally resubmitted from within their own handler.
Currently the p4wq detects this case by checking their thread field to
see if it's been set to NULL.  But that's a race, because if the item
was NOT resubmitted then it no longer belongs to the queue and may
have been freed or reused or otherwise clobbered legally by user code.

Instead, steal a single bit in the thread struct for this purpose.
This patch adds a K_CALLBACK_STATE bit in user_options and documents
it in such a way (as being intended for "callback manager" utilities)
that it can't be used recursively or otherwise collide.

Fixes #32052

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2021-02-14 18:17:28 -05:00
..
cmsis_rtos_v1
cmsis_rtos_v2
fnmatch license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
gui lib/gui/lvgl: Add fs_dir_t type variable initialization … 2021-02-05 07:32:20 -05:00
libc license: add missing SPDX headers 2021-02-11 08:05:16 -05:00
open-amp
os lib/p4wq: Fix race with completed work items 2021-02-14 18:17:28 -05:00
posix lib/posix/fs: Add fs_dir_t type variable initialization 2021-02-05 07:32:20 -05:00
CMakeLists.txt
Kconfig