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=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 E3D1CC4363D for ; Thu, 24 Sep 2020 16:09:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91FD623600 for ; Thu, 24 Sep 2020 16:09:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728597AbgIXQJC (ORCPT ); Thu, 24 Sep 2020 12:09:02 -0400 Received: from smtprelay0079.hostedemail.com ([216.40.44.79]:52590 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728448AbgIXQJC (ORCPT ); Thu, 24 Sep 2020 12:09:02 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id DC11718029143; Thu, 24 Sep 2020 16:09:00 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: toe09_3205d4c27160 X-Filterd-Recvd-Size: 1971 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf12.hostedemail.com (Postfix) with ESMTPA; Thu, 24 Sep 2020 16:08:58 +0000 (UTC) Message-ID: Subject: Re: [PATCH] x86/irq: Use printk_deferred() on raw_spin_lock() protected sections From: Joe Perches To: Peter Zijlstra , Daniel Bristot de Oliveira Cc: x86@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Marc Zyngier , Peter Xu , Andy Lutomirski , Bjorn Helgaas , linux-kernel@vger.kernel.org Date: Thu, 24 Sep 2020 09:08:57 -0700 In-Reply-To: <20200924102822.GA2628@hirez.programming.kicks-ass.net> References: <20200924102822.GA2628@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2020-09-24 at 12:28 +0200, Peter Zijlstra wrote: > On Mon, Sep 21, 2020 at 06:22:12PM +0200, Daniel Bristot de Oliveira wrote: > > While testing hotplug I got this BUG: > > It was caused by printk() inside a code section protected by a > > raw_spin_lock() that ended up calling a serial console that > > uses a regular spin_lock(). > > > > Use the printk_deferred() to avoid calling the serial console > > in a raw_spin_lock() protected section. > > I consider printk_deferred() to be a bug, can't we just wait for the new > printk implementation to land so we don't need all this nonsense? It will be good to do a sed fixup for all these printk_deferred uses soon, but in the meantime isn't it useful to avoid BUGs?