summaryrefslogtreecommitdiff
path: root/lib/zstd/common/debug.h
diff options
context:
space:
mode:
authorNikolay Kuratov <kniv@yandex-team.ru>2025-02-06 12:01:56 +0300
committerSteven Rostedt (Google) <rostedt@goodmis.org>2025-02-28 05:02:10 +0300
commita1a7eb89ca0b89dc1c326eeee2596f263291aca3 (patch)
treec3d82cacbf3905be9040e9816c91e72ba8299570 /lib/zstd/common/debug.h
parent3908b6baf2ac20138915b5ca98338b4f063954d8 (diff)
downloadlinux-a1a7eb89ca0b89dc1c326eeee2596f263291aca3.tar.xz
ftrace: Avoid potential division by zero in function_stat_show()
Check whether denominator expression x * (x - 1) * 1000 mod {2^32, 2^64} produce zero and skip stddev computation in that case. For now don't care about rec->counter * rec->counter overflow because rec->time * rec->time overflow will likely happen earlier. Cc: stable@vger.kernel.org Cc: Wen Yang <wenyang@linux.alibaba.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Link: https://lore.kernel.org/20250206090156.1561783-1-kniv@yandex-team.ru Fixes: e31f7939c1c27 ("ftrace: Avoid potential division by zero in function profiler") Signed-off-by: Nikolay Kuratov <kniv@yandex-team.ru> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'lib/zstd/common/debug.h')
0 files changed, 0 insertions, 0 deletions