]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ftrace: fix incorrect hash size in register_ftrace_direct()
authorMenglong Dong <menglong8.dong@gmail.com>
Sun, 13 Apr 2025 01:44:44 +0000 (09:44 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:47 +0000 (10:45 +0200)
commit0a6c0fc1f83f7166bfde85a07edf5915bfe413a3
tree27062211f44a8a46ac32d4715dd02cab160a2dad
parent42203e004d8e2336d1dd6818ffbbd91956daedfb
ftrace: fix incorrect hash size in register_ftrace_direct()

[ Upstream commit 92f1d3b40179b15630d72e2c6e4e25a899b67ba9 ]

The maximum of the ftrace hash bits is made fls(32) in
register_ftrace_direct(), which seems illogical. So, we fix it by making
the max hash bits FTRACE_HASH_MAX_BITS instead.

Link: https://lore.kernel.org/20250413014444.36724-1-dongml2@chinatelecom.cn
Fixes: d05cb470663a ("ftrace: Fix modification of direct_function hash while in use")
Signed-off-by: Menglong Dong <dongml2@chinatelecom.cn>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/ftrace.c