From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Mon, 19 Jun 2017 16:17:21 +0100 Subject: [PATCH] ARM/hw_breakpoint: Fix possible recursive locking for arch_hw_breakpoint_init In-Reply-To: <20170616082238.15553-1-tony@atomide.com> References: <20170616082238.15553-1-tony@atomide.com> Message-ID: <20170619151720.GC9291@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 > Cc: Ingo Molnar > Cc: Mark Rutland > Cc: Paul E. McKenney > Cc: Peter Zijlstra > Cc: Will Deacon > Cc: Steven Rostedt > Cc: Russell King > Cc: linux-arm-kernel at lists.infradead.org > Signed-off-by: Tony Lindgren > --- > 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