diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/printk/printk.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index cf0ceacdae2f..c59d9a1567ad 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2417,9 +2417,9 @@ again: printk_safe_enter_irqsave(flags); raw_spin_lock(&logbuf_lock); if (console_seq < log_first_seq) { - len = sprintf(text, - "** %llu printk messages dropped **\n", - log_first_seq - console_seq); + len = snprintf(text, sizeof(text), + "** %llu printk messages dropped **\n", + log_first_seq - console_seq); /* messages are gone, move to first one */ console_seq = log_first_seq; |