Files
kernel_realme_nemo/kernel
zhoumin 8408f60a5e ftrace: Add cond_resched() to ftrace_graph_set_hash()
commit 42ea22e754ba4f2b86f8760ca27f6f71da2d982c upstream.

When the kernel contains a large number of functions that can be traced,
the loop in ftrace_graph_set_hash() may take a lot of time to execute.
This may trigger the softlockup watchdog.

Add cond_resched() within the loop to allow the kernel to remain
responsive even when processing a large number of functions.

This matches the cond_resched() that is used in other locations of the
code that iterates over all functions that can be traced.

Cc: stable@vger.kernel.org
Fixes: b9b0c831be ("ftrace: Convert graph filter to use hash tables")
Link: https://lore.kernel.org/tencent_3E06CE338692017B5809534B9C5C03DA7705@qq.com
Signed-off-by: zhoumin <teczm@foxmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
2025-12-24 11:23:35 +00:00
..
2021-12-25 18:05:37 +05:30
2025-12-24 11:20:48 +00:00
2021-12-25 18:05:37 +05:30
2021-12-25 18:05:37 +05:30
2022-08-17 15:18:46 +05:30
2025-12-24 11:23:15 +00:00
2021-12-25 18:05:37 +05:30
2021-12-25 18:05:37 +05:30
2025-09-21 09:20:42 +00:00
2023-12-20 15:32:35 +01:00
2023-10-31 18:44:28 +05:30
2020-04-02 16:34:20 +02:00
2021-12-25 18:05:37 +05:30
2024-03-05 23:06:18 +05:30
2025-12-24 11:21:57 +00:00
2021-02-07 14:47:41 +01:00