syslog_rpmsg: fix system crash when open CONFIG_SCHED_HAVE_PARENT

Reason:
nx_start use syslog at every early time event the idle thread not
full setup, then syslog_rpmsg -> work_queue -> work_signal ->
nxsig_kill -> rtcb is NULL -> crash

Fix:
sched work_queue after is_rpmsg_ept_ready() is true

Change-Id: I225469ff2526e4b810bf3e23473b55d57e64a1ff
Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2021-01-25 20:06:10 +08:00 committed by Xiang Xiao
parent d009074ed5
commit 0d24582fe0

View File

@ -186,7 +186,8 @@ static void syslog_rpmsg_putchar(FAR struct syslog_rpmsg_s *priv, int ch,
}
}
if (last && !priv->suspend && !priv->transfer)
if (last && !priv->suspend && !priv->transfer &&
is_rpmsg_ept_ready(&priv->ept))
{
clock_t delay = SYSLOG_RPMSG_WORK_DELAY;
size_t space = SYSLOG_RPMSG_SPACE(priv->head, priv->tail, priv->size);