From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753881AbbESHNG (ORCPT ); Tue, 19 May 2015 03:13:06 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:34170 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750862AbbESHNE (ORCPT ); Tue, 19 May 2015 03:13:04 -0400 Date: Tue, 19 May 2015 09:12:59 +0200 From: Michal Hocko To: Linus Torvalds Cc: Peter Zijlstra , Stephane Eranian , Ulrich Obergfell , Don Zickus , Ingo Molnar , Andrew Morton , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , "linux-pm@vger.kernel.org" , LKML Subject: Re: suspend regression in 4.1-rc1 Message-ID: <20150519071259.GA6847@dhcp22.suse.cz> References: <20150517185041.GA5897@dhcp22.suse.cz> <20150518073046.GO17717@twins.programming.kicks-ass.net> <20150518090336.GA6393@dhcp22.suse.cz> <20150518093150.GC21418@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 18-05-15 10:10:50, Linus Torvalds wrote: > On Mon, May 18, 2015 at 2:31 AM, Peter Zijlstra wrote: > > Subject: watchdog: Fix merge 'conflict' > > > > Two watchdog changes that came through different trees had a non > > conflicting conflict, that is, one changed the semantics of a variable > > but no actual code conflict happened. So the merge appeared fine, but > > the resulting code did not behave as expected. > > Ok, I see that people are still discussing this, but I'll apply it > as-is since I want to get rc4 out the door, and I guess people can > tweak this if there's anything else we want to do longer-term. The final patch from Peter has a typo. Without the following the system deadlocks obviously: --- >>From 215266efd5e14938d14f0f4258a70fb32f6a455b Mon Sep 17 00:00:00 2001 From: Michal Hocko Date: Tue, 19 May 2015 09:07:27 +0200 Subject: [PATCH] watchdog: fix double lock in watchdog_nmi_enable_all ab992dc38f9a ("watchdog: Fix merge 'conflict'") has introduced an obvious deadlock because of a typo. watchdog_proc_mutex should be unlocked on exit. Thanks to Miroslav Benes who was staring at the code with me and noticed this. Signed-off-by: Michal Hocko --- kernel/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index 506edcc500c4..581a68a04c64 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -621,7 +621,7 @@ void watchdog_nmi_enable_all(void) put_online_cpus(); unlock: - mutex_lock(&watchdog_proc_mutex); + mutex_unlock(&watchdog_proc_mutex); } void watchdog_nmi_disable_all(void) -- 2.1.4 -- Michal Hocko SUSE Labs