From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751878AbdJPLFf (ORCPT ); Mon, 16 Oct 2017 07:05:35 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:48563 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750914AbdJPLFe (ORCPT ); Mon, 16 Oct 2017 07:05:34 -0400 X-Google-Smtp-Source: AOwi7QBdidW838LSO/irS35nu31W+o3OokbpzFtEIxMp5PgClxMckIAYVikGvnmp120ZwTtTnRfqPA== Date: Mon, 16 Oct 2017 20:05:30 +0900 From: Sergey Senozhatsky To: Steven Rostedt Cc: Sergey Senozhatsky , LKML , Petr Mladek , Peter Zijlstra , Andrew Morton Subject: Re: [PATCH] printk: Remove superfluous memory barriers from printk_safe Message-ID: <20171016110530.GA6316@tigerII.localdomain> References: <20171011124647.7781f98f@gandalf.local.home> <20171014092129.GD2973@tigerII.localdomain> <20171015202715.5c3bb075@vmware.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171015202715.5c3bb075@vmware.local.home> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (10/15/17 20:27), Steven Rostedt wrote: > > On (10/11/17 12:46), Steven Rostedt wrote: > > > From: Steven Rostedt (VMware) > > > > > > The variable printk_safe_irq_ready is set and never cleared at system > > > boot up, when there's only one CPU active. It is set before other > > > CPUs come on line. Also, it is extremely unlikely that an NMI would > > > trigger this early in boot up (which I wonder why we even have this > > > variable at all). > > > > it's not only NMI related, printk() recursion can happen at any stages, > > including... um... wait a second. ... including the "before we set up > > per-CPU areas" stage? hmm... smells like a bug? > > I think this was just being overly paranoid. hm, printk recursion is pretty easy to trigger. vscnprintf() can WARN_ON(), for instance. just pass (mistakenly) unknown printk specifier, e.g. %A, and this will do. -ss