mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
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:
@@ -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;
|
clock_t delay = SYSLOG_RPMSG_WORK_DELAY;
|
||||||
size_t space = SYSLOG_RPMSG_SPACE(priv->head, priv->tail, priv->size);
|
size_t space = SYSLOG_RPMSG_SPACE(priv->head, priv->tail, priv->size);
|
||||||
|
|||||||
Reference in New Issue
Block a user