Skip to content

Commit 0e1214d

Browse files
anchaoxiaoxiang781216
authored andcommitted
syslog/intbuffer: fix spinlock deadlock
just read the code, still have the deadlock after below change: | commit 3b6f463 | Author: chenrun1 <chenrun1@xiaomi.com> | Date: Tue Dec 31 14:31:46 2024 +0800 | | syslog_inbuffer:Fixed the lock reentry issue in single core + spinlock scenario | | Summary: | When spinlock.h is enabled in a single-core scenario, spinlock reentry and exceptions may occur when spin_lock_irqsave_wo_note is used in syslog_add_intbuffer | | Signed-off-by: chenrun1 <chenrun1@xiaomi.com> Signed-off-by: chao an <anchao.archer@bytedance.com>
1 parent 685f3ab commit 0e1214d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/syslog/syslog_intbuffer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ void syslog_add_intbuffer(FAR const char *buffer, size_t buflen)
165165
}
166166
else
167167
{
168-
syslog_flush_intbuffer(true);
168+
syslog_flush_internal(true, sizeof(g_syslog_intbuffer.buffer));
169169
space = buflen - sizeof(g_syslog_intbuffer.buffer);
170170
syslog_write_foreach(buffer, space, true);
171171
circbuf_write(&g_syslog_intbuffer.circ,

0 commit comments

Comments
 (0)