Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1667522 > unrolled thread

[PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init

Started byTony Lindgren <tony@atomide.com>
First post2017-06-16 10:30 +0200
Last post2017-06-19 17:20 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init Tony Lindgren <tony@atomide.com> - 2017-06-16 10:30 +0200
    Re: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for  arch_hw_breakpoint_init Sebastian Andrzej Siewior <bigeasy@linutronix.de> - 2017-06-16 17:50 +0200
    Re: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for  arch_hw_breakpoint_init Will Deacon <will.deacon@arm.com> - 2017-06-19 17:20 +0200

#1667522 — [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init

FromTony Lindgren <tony@atomide.com>
Date2017-06-16 10:30 +0200
Subject[PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
Message-ID<tSUNH-5ZK-7@gated-at.bofh.it>
Recent change to use cpuhp_setup_state_cpuslocked() with commit
fe2a5cd8aa03 ("ARM/hw_breakpoint: Use cpuhp_setup_state_cpuslocked()")
missed to change the related paired cpuhp_remove_state_nocalls_cpuslocked().

Now if arch_hw_breakpoint_init() fails, we get "WARNING: possible recursive
locking detected" on the exit path.

Fixes: fe2a5cd8aa03 ("ARM/hw_breakpoint: Use
cpuhp_setup_state_cpuslocked()")
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/kernel/hw_breakpoint.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
--- a/arch/arm/kernel/hw_breakpoint.c
+++ b/arch/arm/kernel/hw_breakpoint.c
@@ -1106,7 +1106,7 @@ static int __init arch_hw_breakpoint_init(void)
 		core_num_brps = 0;
 		core_num_wrps = 0;
 		if (ret > 0)
-			cpuhp_remove_state_nocalls(ret);
+			cpuhp_remove_state_nocalls_cpuslocked(ret);
 		cpus_read_unlock();
 		return 0;
 	}
-- 
2.13.0

[toc] | [next] | [standalone]


#1667839 — Re: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init

FromSebastian Andrzej Siewior <bigeasy@linutronix.de>
Date2017-06-16 17:50 +0200
SubjectRe: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
Message-ID<tT1Fv-1ZE-5@gated-at.bofh.it>
In reply to#1667522
On 2017-06-16 01:22:38 [-0700], Tony Lindgren wrote:
> Recent change to use cpuhp_setup_state_cpuslocked() with commit
> fe2a5cd8aa03 ("ARM/hw_breakpoint: Use cpuhp_setup_state_cpuslocked()")
> missed to change the related paired cpuhp_remove_state_nocalls_cpuslocked().
> 
> Now if arch_hw_breakpoint_init() fails, we get "WARNING: possible recursive
> locking detected" on the exit path.
> 
> Fixes: fe2a5cd8aa03 ("ARM/hw_breakpoint: Use
> cpuhp_setup_state_cpuslocked()")
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Thank you.

Sebastian

[toc] | [prev] | [next] | [standalone]


#1669226 — Re: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init

FromWill Deacon <will.deacon@arm.com>
Date2017-06-19 17:20 +0200
SubjectRe: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
Message-ID<tU6Da-4lE-81@gated-at.bofh.it>
In reply to#1667522
On Fri, Jun 16, 2017 at 01:22:38AM -0700, Tony Lindgren wrote:
> Recent change to use cpuhp_setup_state_cpuslocked() with commit
> fe2a5cd8aa03 ("ARM/hw_breakpoint: Use cpuhp_setup_state_cpuslocked()")
> missed to change the related paired cpuhp_remove_state_nocalls_cpuslocked().
> 
> Now if arch_hw_breakpoint_init() fails, we get "WARNING: possible recursive
> locking detected" on the exit path.
> 
> Fixes: fe2a5cd8aa03 ("ARM/hw_breakpoint: Use
> cpuhp_setup_state_cpuslocked()")
> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/kernel/hw_breakpoint.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

This looks correct to me, so I guess it should go via -tip (where the
problematic patch is queued already).

Will

> diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
> --- a/arch/arm/kernel/hw_breakpoint.c
> +++ b/arch/arm/kernel/hw_breakpoint.c
> @@ -1106,7 +1106,7 @@ static int __init arch_hw_breakpoint_init(void)
>  		core_num_brps = 0;
>  		core_num_wrps = 0;
>  		if (ret > 0)
> -			cpuhp_remove_state_nocalls(ret);
> +			cpuhp_remove_state_nocalls_cpuslocked(ret);
>  		cpus_read_unlock();
>  		return 0;
>  	}
> -- 
> 2.13.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web