nuttx/sched
wangyongrong f20f9ff19e sched/group: skip group_release for kernel thread group
When CONFIG_DISABLE_PTHREAD=y, HAVE_GROUP_MEMBERS is undefined and
group_leave() unconditionally calls group_release() for every exiting
thread. This destroys the shared g_kthread_group resources (mutex,
fdlist, task_info) while other kernel threads are still using them,
causing use-after-free crashes.

Fix by checking TCB_FLAG_TTYPE_KERNEL in group_leave() before calling
group_release(), so the entire release path is skipped for kernel
threads. This is safe because g_kthread_group is statically allocated
and its lifetime is the entire system.

Signed-off-by: wangyongrong <wangyongrong@xiaomi.com>
2026-05-08 13:44:51 +08:00
..
addrenv include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
clock clock_settime: don't block when up_rtc_settime is called 2026-04-28 15:15:05 -04:00
environ libc/environ: add interrupt context check to getenv 2026-01-21 10:37:55 +08:00
event sched/event: Fix uninitialized need_switch flag issue in event_post() 2025-11-04 21:43:59 +08:00
group sched/group: skip group_release for kernel thread group 2026-05-08 13:44:51 +08:00
hrtimer sched/hrtimer: Simplify the hrtimer. 2026-02-02 13:26:22 +08:00
init include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
instrument gprof: move gprof function from sched to libbuiltin/libgcc 2024-11-13 02:42:31 +08:00
irq include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
misc sched/misc: Optimize thread saving order in coredump for easier gdb debug 2026-04-14 19:33:14 +08:00
module include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
mqueue include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
paging include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
pthread include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
sched include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
semaphore include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
signal include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
task include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
timer sched/timer: Fix MISRA Rule 10.3 2026-01-22 22:14:00 +08:00
tls pthread: remove tl_lock 2026-01-26 20:56:12 +08:00
wdog include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
wqueue include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
CMakeLists.txt sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
Kconfig !boards: Remove NSH_ARCHINIT and board_app_initialize 2026-05-02 18:36:46 +08:00
Makefile Makefile: Remove make depend files by make distclean 2026-02-16 16:27:57 +01:00