OpenBSD cvs log

created 2021-01-11T01:26:57Z
begin 2021-01-08T09:29:04Z
end 2021-01-08T11:23:57Z
path src/sys
commits 1

date 2021-01-08T11:23:57Z
author visa
files src/sys/kern/subr_log.c log diff annotate
message Fix boot-time crash on sparc64

On sparc64, initmsgbuf() is invoked before curcpu() is usable
on the boot processor. Consequently, it is unsafe to use mutexes
during the message buffer initialization. Avoid such use by skipping
log_mtx when appending a newline from initmsgbuf().

Use mbp instead of msgbufp as the buffer argument to the putchar routine
for consistency.

Bug reported and fix suggested by miod@