mirror of
https://github.com/apache/nuttx.git
synced 2026-02-07 05:12:09 +08:00
Move kernel stack allocation from exec_module() (binary format execution) to nxtask_init() (task initialization) with proper type checking. Add conditional check to allocate kernel stack only for non-kernel tasks (ttype != TCB_FLAG_TTYPE_KERNEL). Enables kernel stack allocation for both exec'd tasks and regular task_create() calls in protected builds, allowing userspace to create tasks with proper kernel stack isolation. Signed-off-by: hujun5 <hujun5@xiaomi.com>