diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index b24ef77325ee..0e50ec9ded86 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -1323,7 +1323,7 @@ void show_rcu_tasks_trace_gp_kthread(void) { char buf[64]; - sprintf(buf, "N%d h:%lu/%lu/%lu", atomic_read(&trc_n_readers_need_end), + snprintf(buf, sizeof(buf), "N%d h:%lu/%lu/%lu", atomic_read(&trc_n_readers_need_end), data_race(n_heavy_reader_ofl_updates), data_race(n_heavy_reader_updates), data_race(n_heavy_reader_attempts));