XuNeo commented on code in PR #13944:
URL: https://github.com/apache/nuttx/pull/13944#discussion_r1793365772


##########
sched/group/group_argvstr.c:
##########
@@ -60,16 +61,20 @@
 
 size_t group_argvstr(FAR struct tcb_s *tcb, FAR char *args, size_t size)
 {
+  irqstate_t flags;
   size_t n = 0;
 #ifdef CONFIG_ARCH_ADDRENV
   FAR struct addrenv_s *oldenv;
 #endif
 
+  flags = enter_critical_section();
+
   /* Sanity checks and idle tasks */
 
   if (!tcb || !tcb->group || !tcb->group->tg_info || size < 1 ||

Review Comment:
   Is it possible that after checking `!tcb->group`, CPU is switched out and 
`tcb->group->tg_info` triggers the issue?
   
   Currently, only procfs and assert call this function.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to