Skip to contentSkip to conversation

s390: remove useless preempt_(dis/en)able calls in ftrace code

PATCH In review Wander Lairson Costa 2 participants 2 messages Dec 8, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390: remove useless preempt_(dis/en)able calls in ftrace code

Commit ce5e48036c9e("ftrace: disable preemption when recursion locked") moved the preempt disabling/enabling code to ftrace_test_recursion_trylock() and ftrace_test_recursion_unlock(), and cleaned up all direct calls in the ftrace code. But it left s390 behind.

---
 arch/s390/kernel/ftrace.c | 2 --
 1 file changed, 2 deletions(-)
arch/s390/kernel/ftrace.c +0 -2
index 5510c7d10ddc..21d62d8b6b9a 100644
@@ -290,7 +290,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
 		return;
 
 	regs = ftrace_get_regs(fregs);
-	preempt_disable_notrace();
 	p = get_kprobe((kprobe_opcode_t *)ip);
 	if (unlikely(!p) || kprobe_disabled(p))
 		goto out;
@@ -318,7 +317,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
 	}
 	__this_cpu_write(current_kprobe, NULL);
 out:
-	preempt_enable_notrace();
 	ftrace_test_recursion_unlock(bit);
 }
 NOKPROBE_SYMBOL(kprobe_ftrace_handler);
Signature · 1 line
2.27.0
maintainer
#1 lore raw
Quoted 9 lines · Wander Lairson Costa

Commit ce5e48036c9e("ftrace: disable preemption when recursion locked") moved the preempt disabling/enabling code to ftrace_test_recursion_trylock() and ftrace_test_recursion_unlock(), and cleaned up all direct calls in the ftrace code. But it left s390 behind.

---
 arch/s390/kernel/ftrace.c | 2 --
 1 file changed, 2 deletions(-)

Thanks, but I applied already this one:
https://lore.kernel.org/r/[email protected]