All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
@ 2017-06-16  8:22 ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2017-06-16  8:22 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, linux-arm-kernel, linux-omap,
	Sebastian Andrzej Siewior, Ingo Molnar, Mark Rutland,
	Paul E . McKenney, Peter Zijlstra, Will Deacon, Steven Rostedt,
	Russell King

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

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

* [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
@ 2017-06-16  8:22 ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2017-06-16  8:22 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 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

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

* Re: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
  2017-06-16  8:22 ` Tony Lindgren
@ 2017-06-16 15:42   ` Sebastian Andrzej Siewior
  -1 siblings, 0 replies; 7+ messages in thread
From: Sebastian Andrzej Siewior @ 2017-06-16 15:42 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Thomas Gleixner, linux-kernel, linux-arm-kernel, linux-omap,
	Ingo Molnar, Mark Rutland, Paul E . McKenney, Peter Zijlstra,
	Will Deacon, Steven Rostedt, Russell King

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

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

* [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
@ 2017-06-16 15:42   ` Sebastian Andrzej Siewior
  0 siblings, 0 replies; 7+ messages in thread
From: Sebastian Andrzej Siewior @ 2017-06-16 15:42 UTC (permalink / raw)
  To: linux-arm-kernel

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 at lists.infradead.org
> Signed-off-by: Tony Lindgren <tony@atomide.com>

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

Thank you.

Sebastian

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

* Re: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
  2017-06-16  8:22 ` Tony Lindgren
@ 2017-06-19 15:17   ` Will Deacon
  -1 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2017-06-19 15:17 UTC (permalink / raw)
  To: Tony Lindgren
  Cc: Thomas Gleixner, linux-kernel, linux-arm-kernel, linux-omap,
	Sebastian Andrzej Siewior, Ingo Molnar, Mark Rutland,
	Paul E . McKenney, Peter Zijlstra, Steven Rostedt, Russell King

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

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

* [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
@ 2017-06-19 15:17   ` Will Deacon
  0 siblings, 0 replies; 7+ messages in thread
From: Will Deacon @ 2017-06-19 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

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 at 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

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

* [tip:smp/hotplug] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init
  2017-06-16  8:22 ` Tony Lindgren
                   ` (2 preceding siblings ...)
  (?)
@ 2017-06-20 10:27 ` tip-bot for Tony Lindgren
  -1 siblings, 0 replies; 7+ messages in thread
From: tip-bot for Tony Lindgren @ 2017-06-20 10:27 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, paulmck, bigeasy, linux, rostedt, mark.rutland,
	linux-kernel, mingo, will.deacon, hpa, peterz, tony

Commit-ID:  1b3b22507e0d45dedc6a54b26d56e0b8c4d36875
Gitweb:     http://git.kernel.org/tip/1b3b22507e0d45dedc6a54b26d56e0b8c4d36875
Author:     Tony Lindgren <tony@atomide.com>
AuthorDate: Fri, 16 Jun 2017 01:22:38 -0700
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Tue, 20 Jun 2017 12:25:22 +0200

ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init

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()")
Signed-off-by: Tony Lindgren <tony@atomide.com>
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: linux-omap@vger.kernel.org
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: "Paul E . McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/20170616082238.15553-1-tony@atomide.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

---
 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
index 63cb4c7..af2a7f1 100644
--- 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;
 	}

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

end of thread, other threads:[~2017-06-20 10:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-16  8:22 [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init Tony Lindgren
2017-06-16  8:22 ` Tony Lindgren
2017-06-16 15:42 ` Sebastian Andrzej Siewior
2017-06-16 15:42   ` Sebastian Andrzej Siewior
2017-06-19 15:17 ` Will Deacon
2017-06-19 15:17   ` Will Deacon
2017-06-20 10:27 ` [tip:smp/hotplug] " tip-bot for Tony Lindgren

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.