You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/01/25 03:08:03 UTC

[GitHub] [incubator-nuttx] btashton commented on a change in pull request #2737: sched: task: Fix a potential bug in nxtask_assign_pid()

btashton commented on a change in pull request #2737:
URL: https://github.com/apache/incubator-nuttx/pull/2737#discussion_r563440031



##########
File path: sched/task/task_setup.c
##########
@@ -121,17 +122,18 @@ static int nxtask_assign_pid(FAR struct tcb_s *tcb)
 #endif
           tcb->pid = next_pid;
 
-          sched_unlock();
-          return OK;
+          ret = OK;
+          goto errout;
         }
     }
 
+errout:
   /* If we get here, then the g_pidhash[] table is completely full.

Review comment:
       This comment is not correct any more since this is now _the_ return path.  Also maybe the label name should change.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org