kernel: print log messages directly to the console if log_buffer is full

This commit is contained in:
2023-02-08 17:10:13 +00:00
parent 4c4178e170
commit d56fc961fa

View File

@@ -63,6 +63,10 @@ int printk(const char *format, ...)
msg[len] = '\n';
msg[len + 1] = '\0';
if (log_buffer_writep == LOG_BUFFER_SIZE - 1) {
console_write(early_console, msg, len + 1);
}
unsigned long flags;
spin_lock_irqsave(&log_buffer_lock, &flags);
save_log_message(msg);