Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752537AbbKGJUN (ORCPT ); Sat, 7 Nov 2015 04:20:13 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:37209 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752393AbbKGJUA (ORCPT ); Sat, 7 Nov 2015 04:20:00 -0500 Date: Sat, 7 Nov 2015 10:19:54 +0100 From: Peter Zijlstra To: Chris Bainbridge Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, lv.zheng@intel.com, mingo@redhat.com, rjw@rjwysocki.net, oleg@redhat.com, aystarik@gmail.com Subject: Re: [PATCH] Preserve task state in reentrant calls to ___wait_event Message-ID: <20151107091954.GE17308@twins.programming.kicks-ass.net> References: <20151106204408.GA11609@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151106204408.GA11609@localhost> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 748 Lines: 20 On Fri, Nov 06, 2015 at 08:44:08PM +0000, Chris Bainbridge wrote: > I am assuming here that wait_event_timeout() is supposed to support reentrant > calls. Not really. It is sort of allowed, provided the inner one will rarely block. And therefore the outer one will mostly work. > If not, perhaps it should BUG_ON when called with a non-running task > state, There is a warning in __might_sleep() that catches some of this. > and the SBS HC / ACPI EC code needs to be fixed to stop doing this. Yes. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/