linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ftrace: disable preemption when recursion locked in arch/s390/kernel/ftrace.c
@ 2021-12-08 15:15 Jerome Marchand
  2021-12-08 15:20 ` Steven Rostedt
  2021-12-08 15:48 ` Heiko Carstens
  0 siblings, 2 replies; 3+ messages in thread
From: Jerome Marchand @ 2021-12-08 15:15 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar; +Cc: 王贇, linux-kernel

It looks like commit ce5e48036c9e76a2 ("ftrace: disable preemption
when recursion locked") missed a spot in kprobe_ftrace_handler() in
arch/s390/kernel/ftrace.c.
Removes the superfluous preempt_disable/enable_notrace() there too.

Fixes: ce5e48036c9e76a2 ("ftrace: disable preemption when recursion locked")
Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
---
 arch/s390/kernel/ftrace.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c
index 5510c7d10ddc..21d62d8b6b9a 100644
--- a/arch/s390/kernel/ftrace.c
+++ b/arch/s390/kernel/ftrace.c
@@ -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);
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ftrace: disable preemption when recursion locked in arch/s390/kernel/ftrace.c
  2021-12-08 15:15 [PATCH] ftrace: disable preemption when recursion locked in arch/s390/kernel/ftrace.c Jerome Marchand
@ 2021-12-08 15:20 ` Steven Rostedt
  2021-12-08 15:48 ` Heiko Carstens
  1 sibling, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2021-12-08 15:20 UTC (permalink / raw)
  To: Jerome Marchand
  Cc: Ingo Molnar, 王贇,
	linux-kernel, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, Alexander Gordeev, linux-s390


This really needs to go through the s390 tree.

-- Steve


On Wed,  8 Dec 2021 16:15:03 +0100
"Jerome Marchand" <jmarchan@redhat.com> wrote:

> It looks like commit ce5e48036c9e76a2 ("ftrace: disable preemption
> when recursion locked") missed a spot in kprobe_ftrace_handler() in
> arch/s390/kernel/ftrace.c.
> Removes the superfluous preempt_disable/enable_notrace() there too.
> 
> Fixes: ce5e48036c9e76a2 ("ftrace: disable preemption when recursion locked")
> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
> ---
>  arch/s390/kernel/ftrace.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/s390/kernel/ftrace.c b/arch/s390/kernel/ftrace.c
> index 5510c7d10ddc..21d62d8b6b9a 100644
> --- a/arch/s390/kernel/ftrace.c
> +++ b/arch/s390/kernel/ftrace.c
> @@ -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);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ftrace: disable preemption when recursion locked in arch/s390/kernel/ftrace.c
  2021-12-08 15:15 [PATCH] ftrace: disable preemption when recursion locked in arch/s390/kernel/ftrace.c Jerome Marchand
  2021-12-08 15:20 ` Steven Rostedt
@ 2021-12-08 15:48 ` Heiko Carstens
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2021-12-08 15:48 UTC (permalink / raw)
  To: Jerome Marchand
  Cc: Steven Rostedt, Ingo Molnar, 王贇, linux-kernel

On Wed, Dec 08, 2021 at 04:15:03PM +0100, Jerome Marchand wrote:
> It looks like commit ce5e48036c9e76a2 ("ftrace: disable preemption
> when recursion locked") missed a spot in kprobe_ftrace_handler() in
> arch/s390/kernel/ftrace.c.
> Removes the superfluous preempt_disable/enable_notrace() there too.
> 
> Fixes: ce5e48036c9e76a2 ("ftrace: disable preemption when recursion locked")
> Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
> ---
>  arch/s390/kernel/ftrace.c | 2 --
>  1 file changed, 2 deletions(-)

Applied to s390 tree. Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-12-08 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-08 15:15 [PATCH] ftrace: disable preemption when recursion locked in arch/s390/kernel/ftrace.c Jerome Marchand
2021-12-08 15:20 ` Steven Rostedt
2021-12-08 15:48 ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).