Thread (24 messages) 24 messages, 5 authors, 2021-10-26

Re: [PATCH 1/2] ftrace: disable preemption on the testing of recursion

From: Steven Rostedt <rostedt@goodmis.org>
Date: 2021-10-12 12:17:37
Also in: linux-riscv, linuxppc-dev, lkml

On Tue, 12 Oct 2021 13:40:08 +0800
王贇 [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -52,11 +52,6 @@ static void notrace klp_ftrace_handler(unsigned long ip,
 	bit = ftrace_test_recursion_trylock(ip, parent_ip);
 	if (WARN_ON_ONCE(bit < 0))
 		return;
-	/*
-	 * A variant of synchronize_rcu() is used to allow patching functions
-	 * where RCU is not watching, see klp_synchronize_transition().
-	 */
I have to take a deeper look at this patch set, but do not remove this
comment, as it explains the protection here, that is not obvious with the
changes you made.

-- Steve

-	preempt_disable_notrace();

 	func = list_first_or_null_rcu(&ops->func_stack, struct klp_func,
 				      stack_node);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help