summaryrefslogtreecommitdiffstats
path: root/MAINTAINERS
diff options
context:
space:
mode:
authorNikita Kiryushin <kiryushin@ancud.ru>2024-04-01 21:43:15 +0200
committerUladzislau Rezki (Sony) <urezki@gmail.com>2024-04-15 19:43:50 +0200
commit3758f7d9917bd7ef0482c4184c0ad673b4c4e069 (patch)
tree79ddac1beff8b0e997fd00abb0e66eaa425c941c /MAINTAINERS
parentrcu: Mollify sparse with RCU guard (diff)
downloadlinux-3758f7d9917bd7ef0482c4184c0ad673b4c4e069.tar.xz
linux-3758f7d9917bd7ef0482c4184c0ad673b4c4e069.zip
rcu: Fix buffer overflow in print_cpu_stall_info()
The rcuc-starvation output from print_cpu_stall_info() might overflow the buffer if there is a huge difference in jiffies difference. The situation might seem improbable, but computers sometimes get very confused about time, which can result in full-sized integers, and, in this case, buffer overflow. Also, the unsigned jiffies difference is printed using %ld, which is normally for signed integers. This is intentional for debugging purposes, but it is not obvious from the code. This commit therefore changes sprintf() to snprintf() and adds a clarifying comment about intention of %ld format. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 245a62982502 ("rcu: Dump rcuc kthread status for CPUs not reporting quiescent state") Signed-off-by: Nikita Kiryushin <kiryushin@ancud.ru> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions