From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758873AbdJRBH0 (ORCPT ); Tue, 17 Oct 2017 21:07:26 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:54934 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758774AbdJRBHY (ORCPT ); Tue, 17 Oct 2017 21:07:24 -0400 X-Google-Smtp-Source: AOwi7QAdvmBJuHISs9jXGH9b2GVnq4rzNOJuOqlyhodpbnrxfrsB5wcF2vFTjHIVfg+TNewfi9GubA== Date: Wed, 18 Oct 2017 10:07:18 +0900 From: Sergey Senozhatsky To: pierre kuo Cc: Petr Mladek , Sergey Senozhatsky , Sergey Senozhatsky , rostedt@goodmis.org, linux-kernel@vger.kernel.org Subject: Re: [RFC V2] printk: add warning while drop partial text in msg Message-ID: <20171018010718.GA775@jagdpanzerIV> References: <1501421870-12042-1-git-send-email-vichy.kuo@gmail.com> <20170801024303.GA469@jagdpanzerIV.localdomain> <20170817010541.GA20907@jagdpanzerIV.localdomain> <20170918093905.GB1514@jagdpanzerIV.localdomain> <20171004132817.GK20084@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/18/17 01:10), pierre kuo wrote: [..] > > Well, it might get quite complicated, see printk_safe_flush_buffer(). > > BTW, after checking printk_safe_flush_buffer() and related functions, > we have one question: > a) Why in printk_safe_log_store(), we need to use atomic_xxxx operation in it? because IRQ flush work iterates all CPUs and modifies CPUs' buffer state, and this easily can race with printk_safe() or printk_nmi() on some of the CPUs. -ss