From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A02AEC0650E for ; Mon, 1 Jul 2019 14:53:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6B9CE2064B for ; Mon, 1 Jul 2019 14:53:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="kVu6XHBf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729905AbfGAOxp (ORCPT ); Mon, 1 Jul 2019 10:53:45 -0400 Received: from merlin.infradead.org ([205.233.59.134]:35946 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726967AbfGAOxp (ORCPT ); Mon, 1 Jul 2019 10:53:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=AzAObMLhgIAN7TtItfsf2xFqs7oc6ydaRdn60wfX0pQ=; b=kVu6XHBfiekyeSau+zoOK7AFg 7l9gOGg4X1eevMDcVQs91JelMMH4SNZbEmCq48XHabxYZBrYEM5R9eg2mtK6SsSsfadcC6xvCA/ko Wk+XfU51IkFvtha8ND9ygt8FP0xIqmM//EIfCzlVYKR9S4Afc7leMXB/ldlThWv2Wl3A0kNKju166 qkX8Yj8UCIU8ypqwe1V8L9MrOnmh9g73PgVN9EqK+bjNW9MSVeck8OmRcvmxaTxQdyps0lBooHKHQ Ug3eqZdBln4cVEa4/FmSL5ufg9mG9X/1NbftZzy2r1y85dA3jChzgHxcPoFEsnGXpLRvMArPmD6LZ 52y8YNTbw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hhxgb-0000D1-QH; Mon, 01 Jul 2019 14:53:42 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 44FE6201F98F5; Mon, 1 Jul 2019 16:53:40 +0200 (CEST) Date: Mon, 1 Jul 2019 16:53:40 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , x86@kernel.org, Marc Zyngier Subject: Re: [patch V2 2/6] genirq: Fix misleading synchronize_irq() documentation Message-ID: <20190701145340.GB3402@hirez.programming.kicks-ass.net> References: <20190628111148.828731433@linutronix.de> <20190628111440.189241552@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190628111440.189241552@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 28, 2019 at 01:11:50PM +0200, Thomas Gleixner wrote: > The function might sleep, so it cannot be called from interrupt > context. Not even with care. > > Signed-off-by: Thomas Gleixner > --- > kernel/irq/manage.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > --- a/kernel/irq/manage.c > +++ b/kernel/irq/manage.c > @@ -96,7 +96,8 @@ EXPORT_SYMBOL(synchronize_hardirq); > * to complete before returning. If you use this function while > * holding a resource the IRQ handler may need you will deadlock. > * > - * This function may be called - with care - from IRQ context. > + * Can only be called from preemptible code as it might sleep when > + * an interrupt thread is associated to @irq. > */ > void synchronize_irq(unsigned int irq) > { + might_sleep(); ?