mirror of
https://github.com/apache/nuttx.git
synced 2026-08-28 21:00:44 +00:00
sched: Fix crash on early syslog message with prepended process name
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
bed8161202
commit
b145ad82b7
1 changed files with 4 additions and 2 deletions
|
|
@ -56,9 +56,11 @@ FAR struct tcb_s *nxsched_get_tcb(pid_t pid)
|
|||
irqstate_t flags;
|
||||
int hash_ndx;
|
||||
|
||||
/* Verify that the PID is within range */
|
||||
/* Verify whether g_pidhash hash table has already been allocated and
|
||||
* whether the PID is within range.
|
||||
*/
|
||||
|
||||
if (pid >= 0)
|
||||
if (g_pidhash != NULL && pid >= 0)
|
||||
{
|
||||
/* The test and the return setup should be atomic. This still does
|
||||
* not provide proper protection if the recipient of the TCB does not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue